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
Test case for a null leftargument.
@Test void testAssertPropertyReflectionEquals_leftNull() { assertFailing(() -> assertPropertyReflectionEquals("stringProperty", null, testObject) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void checkArg(Object paramObject) {\n/* 687 */ if (paramObject == null)\n/* 688 */ throw new NullPointerException(\"Argument must not be null\"); \n/* */ }", "@Test\n public void noneNullArgumentIsNullTest() throws GeneralException {\n for (String noneNullArgument : SAMLCorrelationRule.NONE_NULL_ARGUMENTS_NAME) {\n\n JavaRuleContext testRuleContext = buildTestJavaRuleContext();\n testRuleContext.getArguments().remove(noneNullArgument);\n\n assertThrows(GeneralException.class, () -> testRule.execute(testRuleContext));\n verify(testRule).internalValidation(eq(testRuleContext));\n verify(testRule, never()).internalExecute(eq(testRuleContext), any());\n }\n }", "public void testCheckNull_NullArg() {\n try {\n Util.checkNull(null, \"test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException e) {\n // good\n }\n }", "public void testCheckNull_NullArg() {\n try {\n Util.checkNull(null, \"test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException e) {\n // good\n }\n }", "@Test\n public void testCheckNull() {\n Helper.checkNull(\"non-null\", \"non-null name\");\n }", "private void assertNullHandling(UMLMessageArgument msgArg) throws Exception\r\n\t{\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((UMLMessageArgument)null));\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((Object)null));\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((UMLSymbol)null));\r\n\t}", "public void testCheckNull() {\n Util.checkNull(\"\", \"test\");\n }", "private static void checkArg(Object s) {\n if (s == null) {\n throw new NullPointerException(\"Argument must not be null\");\n }\n }", "@Test\n public void testWithNullString() throws org.nfunk.jep.ParseException\n {\n String string = null;\n Stack<Object> parameters = CollectionsUtils.newParametersStack(string);\n function.run(parameters);\n assertEquals(TRUE, parameters.pop());\n }", "@Test\n\tpublic void testNull() throws Exception {\n\t\ttestWith(null);\n\t}", "@Override\n\tpublic void visit(IsNullExpression arg0) {\n\n\t}", "@Override\n\tpublic void visit(IsNullExpression arg0) {\n\t\t\n\t}", "boolean getCalledOnNullInput();", "public static void isNull(Object arg, String argName) {\r\n if (arg != null) {\r\n throw new IllegalArgumentException(\"Argument \\\"\" + argName + \"\\\" must be null\");\r\n }\r\n }", "public static void isNull(Object arg, String argName, String message) {\r\n if (arg != null) {\r\n throw new IllegalArgumentException(\"Argument \\\"\" + argName + \"\\\": \" + message);\r\n }\r\n }", "boolean checkNull();", "public void testCheckNull() {\n Util.checkNull(\" \", \"test\");\n }", "public void testHandleGUIEvent_null() {\n try {\n eventManager.handleGUIEvent(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "static void checkNull(final Object param, final String paramName) {\r\n if (param == null) {\r\n throw new IllegalArgumentException(\"The argument '\" + paramName\r\n + \"' should not be null.\");\r\n }\r\n }", "@Test(expected = IllegalArgumentException.class)\n public void testCheckNullFailure() {\n Helper.checkNull(null, \"null-name\");\n }", "public void testAssertPropertyReflectionEquals_leftNull() {\r\n try {\r\n assertPropertyReflectionEquals(\"stringProperty\", null, testObject);\r\n fail(\"Expected AssertionFailedError\");\r\n } catch (AssertionFailedError a) {\r\n // expected\r\n }\r\n }", "public static void nonNull(Object arg, String argName) {\r\n if (arg == null) {\r\n throw new IllegalArgumentException(\"Argument \\\"\" + argName + \"\\\" cannot be null\");\r\n }\r\n }", "public void testCheckString_NullArg() {\n try {\n Util.checkString(null, \"Test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "public void testCheckString_NullArg() {\n try {\n Util.checkString(null, \"Test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "@Test(expected=IllegalArgumentException.class)\n\tpublic void testPickUpNull() {\n\t\tPlayer player = new Player(new Square(), 0);\n\t\tplayer.pickUp(null);\n\t}", "public void testFieldMatchCriteriaNullField() {\r\n try {\r\n new FieldMatchCriteria(null, \"str\");\r\n fail(\"testFieldMatchCriteriaNullField is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"testFieldMatchCriteriaNullField is failure.\");\r\n }\r\n }", "@Test\n\tvoid testCheckNull3() {\n\t\tassertTrue(DataChecker.checkNull((Object)null));\n\t}", "@Test(expected = IllegalArgumentException.class)\n public void testCheckNullWithLoggingFailure() {\n Helper.checkNullWithLogging(null, \"obj\", \"method\", LogManager.getLog());\n }", "@Ignore\n\t@Test\n\tpublic void testParamNull() {\n\t\tregisterParamException(null, keyString, valueString);\n\t\tregisterParamException(groupString, null, valueString);\n\t\tregisterParamException(groupString, keyString, null);\n\t}", "public static void nonNull(Object arg, String argName, String message) {\r\n if (arg == null) {\r\n throw new IllegalArgumentException(\"Argument \\\"\" + argName + \"\\\": \" + message);\r\n }\r\n }", "@Override\r\n\tpublic String getFirstArg() {\n\t\treturn null;\r\n\t}", "public void testValidNullPointerException() {\r\n assertNotNull(\"setup fails\", uploadRequestValidator);\r\n try {\r\n uploadRequestValidator.valid(null);\r\n fail(\"if argument is null, throw NullPointerException\");\r\n } catch (NullPointerException e) {\r\n // good\r\n }\r\n }", "public void testCheckArray_NullInArg() {\n Object[] objects = new Object[] {\"one\", null};\n try {\n Util.checkArray(objects, \"test\");\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "public boolean canProcessNull() {\n return false;\n }", "@Test\n public void testCheckNullForInjectedValue() {\n Helper.checkNullForInjectedValue(\"obj\", \"obj\");\n }", "public void testOrNPE1() {\r\n try {\r\n validator.or(null);\r\n fail(\"an NPE is expected\");\r\n }\r\n catch (NullPointerException npe) {\r\n //pass\r\n }\r\n }", "public TestCase notNull( Object obj );", "public void testChangePropertyHandler_null() {\n try {\n new ChangePropertyHandler(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n\n }", "private void checkNull(T x) throws NullPointerException\n\t{\n\t\tif (x == null)\n\t\t{\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t}", "@Test\n\tpublic void takingNullNodeTest()\n\t{\n\t\ttry\n\t\t{\n\t\t\tOsmXmlToSQLiteDatabaseConverter converter = new OsmXmlToSQLiteDatabaseConverter(new MapObjectsIdFinderFake());\n\t\t\tconverter.takeNode(null);\n\t\t\tfail();\n\t\t}\n\t\tcatch (IllegalArgumentException ex)\n\t\t{\n\t\t\t// ok\n\t\t}\n\t}", "public void testDockDockPointNull() {\n try {\n container.dock(null, new Point(1, 1));\n fail(\"the dock is null, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "@Test\n\tvoid testCheckNull1() {\n\t\tassertFalse(DataChecker.checkNull(new Integer(42)));\n\t}", "public void testDockDockPointIntNullPoint() {\n try {\n container.dock(new DockImpl(), null, 1);\n fail(\"the dock is null, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "public void testCheckArray_NullArg() {\n try {\n Util.checkArray(null, \"test\");\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "public void testBoundaryChangedEvent_1_null_1() {\n try {\n new BoundaryChangedEvent(null, oldBoundary, newBoundary);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void testRemoveGUIEventListener1_null1() {\n try {\n eventManager.removeGUIEventListener(null, EventObject.class);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "private static void m9058c(String str) {\n StackTraceElement stackTraceElement = Thread.currentThread().getStackTrace()[3];\n String className = stackTraceElement.getClassName();\n String methodName = stackTraceElement.getMethodName();\n throw ((IllegalArgumentException) m9050a(new IllegalArgumentException(\"Parameter specified as non-null is null: method \" + className + \".\" + methodName + \", parameter \" + str)));\n }", "public TestCase isNull( Object obj );", "AstroArg empty();", "public void testTransformWithNullElement() throws Exception {\n try {\n instance.transform(null, document, caller);\n fail(\"IllegalArgumentException is excepted[\" + suhClassName + \"].\");\n } catch (IllegalArgumentException iae) {\n // pass\n }\n }", "public boolean isNonNull() {\n return true;\n }", "@Test\n\tvoid testCheckNull2() {\n\t\tassertTrue(DataChecker.checkNull(null));\n\t}", "@Test\n public void nullable_matcher() throws Exception {\n mock.oneArg(((Character) (null)));\n mock.oneArg(Character.valueOf('?'));\n Mockito.verify(mock, Mockito.times(2)).oneArg(ArgumentMatchers.nullable(Character.class));\n }", "@Override\n public boolean getCalledOnNullInput() {\n return calledOnNullInput_;\n }", "@Override\n public String visit(NullLiteralExpr n, Object arg) {\n return null;\n }", "public void testHandleActionEvent_null() throws Exception {\n try {\n eventManager.handleActionEvent(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void testBoundaryChangedEvent_1_null_3() {\n try {\n new BoundaryChangedEvent(classNode, oldBoundary, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void testMouseClickedIfMouseEventNull() {\n try {\n editBoxTrigger.mouseClicked(null);\n } catch (Exception e) {\n fail(\"No exception is excpected.\");\n }\n }", "@Test\n \tpublic void testWithNullValue() {\n \t\tAssert.assertFalse(f1.equals(fnull));\n \t}", "@Test\n\tvoid testCheckNulls1() {\n\t\tassertTrue(DataChecker.checkNulls(null));\n\t}", "@Test\n public void testWithEmptyString() throws org.nfunk.jep.ParseException\n {\n Stack<Object> parameters = CollectionsUtils.newParametersStack(\"\");\n function.run(parameters);\n assertEquals(TRUE, parameters.pop());\n }", "public static void notNull(Object argument, String argumentName)\n\t{\n\t\tif (argument == null)\n\t\t{\n\t\t\tthrow new IllegalArgumentException(String.format(\n\t\t\t\t\"Argument '%1$s' can't be null.\", argumentName));\n\t\t}\n\t}", "@Test\n\tpublic void takingNullWayTest()\n\t{\n\t\ttry\n\t\t{\n\t\t\tOsmXmlToSQLiteDatabaseConverter converter = new OsmXmlToSQLiteDatabaseConverter(new MapObjectsIdFinderFake());\n\t\t\tconverter.takeWay(null);\n\t\t\tfail();\n\t\t}\n\t\tcatch (IllegalArgumentException ex)\n\t\t{\n\t\t\t// ok\n\t\t}\n\t}", "@Test\n public void testWithNonEmptyString() throws org.nfunk.jep.ParseException\n {\n Stack<Object> parameters = CollectionsUtils.newParametersStack(\"test\");\n function.run(parameters);\n assertEquals(FALSE, parameters.pop());\n }", "public void testTransformWithNullCaller() throws Exception {\n try {\n instance.transform(element, document, null);\n fail(\"IllegalArgumentException is excepted[\" + suhClassName + \"].\");\n } catch (IllegalArgumentException iae) {\n // pass\n }\n }", "@Override\n public boolean getCalledOnNullInput() {\n return calledOnNullInput_;\n }", "public void testRemoveActionEventListener1_null1() {\n try {\n eventManager.removeActionEventListener(null, UndoableAction.class);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void testDockDockPointNullPoint() {\n try {\n container.dock(new DockImpl(), null);\n fail(\"the dock is null, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "private static void checkForNullKey(String key) {\n if ( key == null ) {\n throw new NullPointerException();\n }\n }", "@Override\n\tpublic void flagNull() {\n\t\t\n\t}", "@Override\r\n\tpublic void visit(NullExpression nullExpression) {\n\r\n\t}", "public final void testChangeZOrderActionFailureElementNull() {\n try {\n new ChangeZOrderAction(null, ChangeZOrderOperationType.BACKWARD);\n fail(\"IllegalArgumentException is expected since element is null\");\n } catch (IllegalArgumentException e) {\n // good\n }\n }", "@Test(timeout = TIMEOUT, expected = IllegalArgumentException.class)\n public void testRadixNull() {\n Sorting.lsdRadixSort(null);\n }", "public void testDockDockPointNullDock() {\n try {\n container.dock(null, new Point(1, 1));\n fail(\"the dock is null, IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n }", "@Test\n public void testOnEventWithNullParameters() throws ComponentLookupException\n {\n this.mocker.getComponentUnderTest().onEvent(null, null, null);\n }", "public void testRemoveGUIEventListener2_null1() {\n try {\n eventManager.removeGUIEventListener(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void testBoundaryChangedEvent_2_null_1() {\n try {\n new BoundaryChangedEvent(null, oldBoundary, newBoundary, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "protected void assertOneArgLambdaNotNull(Object oneArgLambda) {\n if (oneArgLambda == null) {\n throw new IllegalArgumentException(\"The argument 'oneArgLambda' should not be null.\");\n }\n }", "abstract public boolean argsNotFull();", "public void testAddGUIEventListener1_null1() {\n try {\n eventManager.addGUIEventListener(null, EventObject.class);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void testBoundaryChangedEvent_1_null_2() {\n try {\n new BoundaryChangedEvent(classNode, null, newBoundary);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void testRemoveActionEventListener2_null1() {\n try {\n eventManager.removeActionEventListener(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public static void notNullArgument(Object o, String msg) throws AppException {\n\t\tif (o == null) {\n\t\t\tthrow new AppException(AppExceptionType.BAD_ARGUMENTS, msg);\n\t\t}\n\t}", "public static void checkNotNull(Object o)\r\n/* 105: */ throws NullArgumentException\r\n/* 106: */ {\r\n/* 107:257 */ if (o == null) {\r\n/* 108:258 */ throw new NullArgumentException();\r\n/* 109: */ }\r\n/* 110: */ }", "public void testRemoveGUIEventListener1_null2() {\n try {\n eventManager.removeGUIEventListener(gUIEventListener1, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "@Test\n void nullTest() {\n assertNull(sFloat1.toScrabbleInt());\n assertNull(sFloat1.and(sFloat2));\n assertNull(sFloat1.or(sFloat2));\n assertNull(sFloat1.toScrabbleBool());\n assertNull(sFloat1.toScrabbleBinary());\n assertNull(sFloat1.addToString(new ScrabbleString(\"Hello World\")));\n }", "public boolean hasLeft(){\r\n\t\tif(getLeft()!=null) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public void testAddGUIEventListener2_null1() {\n try {\n eventManager.addGUIEventListener(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "@Override\n\tpublic int isNullable(int arg0) throws SQLException {\n\t\treturn 0;\n\t}", "public void testBoundaryChangedEvent_2_null_3() {\n try {\n new BoundaryChangedEvent(classNode, oldBoundary, null, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public boolean hasLeft() {\r\n\t\treturn left != null;\r\n\t}", "@Test\n public void testCheckNullWithLogging() {\n Helper.checkNullWithLogging(\"obj\", \"obj\", \"method\", LogManager.getLog());\n }", "@Test(expected = IllegalArgumentException.class)\n public void testArgumentsNotHaveAValue() {\n System.out.println(\"Arguments do not have n\");\n assertThat(Arguments.valueOf(\"n\"), is(nullValue()));\n }", "public void testAddActionEventListener2_null1() {\n try {\n eventManager.addActionEventListener(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public static void checkNotNull(Object o, Localizable pattern, Object... args)\r\n/* 98: */ {\r\n/* 99:244 */ if (o == null) {\r\n/* 100:245 */ throw new NullArgumentException(pattern, args);\r\n/* 101: */ }\r\n/* 102: */ }", "boolean isIsNotNull();", "public void nullstill();", "boolean testAnyLeft(Tester t) {\n return t.checkExpect(this.mt.anyLeft(), false) && t.checkExpect(this.los3.anyLeft(), true)\n && t.checkExpect(this.lob1.anyLeft(), true);\n }", "public void testNullValue()\r\n {\r\n try\r\n {\r\n new IncludeDirective( IncludeDirective.REF, null, null, PROPERTIES );\r\n fail( \"no-NPE\" );\r\n }\r\n catch( NullPointerException e )\r\n {\r\n // success\r\n }\r\n }", "@Test(expected = NullPointerException.class)\n\tpublic void testNull() {\n\n\t\tString str = null;\n\t\tstr.toUpperCase();\n\t}" ]
[ "0.69670904", "0.6773204", "0.66861594", "0.66861594", "0.64510924", "0.63982004", "0.6391154", "0.63801765", "0.6363709", "0.63433605", "0.62861234", "0.62795717", "0.6230823", "0.62153435", "0.6177279", "0.6165777", "0.6154508", "0.613205", "0.6125299", "0.60671014", "0.60581803", "0.60485685", "0.60434264", "0.60434264", "0.602921", "0.6019764", "0.601737", "0.6015504", "0.60114664", "0.59879655", "0.5963355", "0.5963248", "0.5959776", "0.59531814", "0.5952993", "0.594571", "0.59274554", "0.5926433", "0.59146273", "0.5906897", "0.59059405", "0.5905144", "0.5904376", "0.58992255", "0.58561295", "0.5847577", "0.58474606", "0.5839839", "0.58368725", "0.5834579", "0.58217096", "0.5821652", "0.5816107", "0.5816081", "0.57996273", "0.57955545", "0.57873535", "0.5786803", "0.5786464", "0.5784589", "0.57808423", "0.57593155", "0.5756765", "0.5755013", "0.57501894", "0.5742084", "0.5740955", "0.5735348", "0.5724392", "0.5722418", "0.5720637", "0.571484", "0.57045233", "0.5701846", "0.5700473", "0.568751", "0.5682565", "0.5672076", "0.5670465", "0.5669713", "0.5668287", "0.5656694", "0.565219", "0.56446606", "0.5633726", "0.5632415", "0.5629019", "0.56278783", "0.5623522", "0.5617689", "0.56080246", "0.56054187", "0.55991167", "0.5596052", "0.55854136", "0.55803245", "0.5578067", "0.55765045", "0.55737823", "0.5570383" ]
0.5764889
61
Test case for a null rightargument.
@Test void testAssertPropertyReflectionEquals_rightNull() { testObject.setStringProperty(null); assertFailing(() -> assertPropertyReflectionEquals("stringProperty", "stringValue", testObject) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void noneNullArgumentIsNullTest() throws GeneralException {\n for (String noneNullArgument : SAMLCorrelationRule.NONE_NULL_ARGUMENTS_NAME) {\n\n JavaRuleContext testRuleContext = buildTestJavaRuleContext();\n testRuleContext.getArguments().remove(noneNullArgument);\n\n assertThrows(GeneralException.class, () -> testRule.execute(testRuleContext));\n verify(testRule).internalValidation(eq(testRuleContext));\n verify(testRule, never()).internalExecute(eq(testRuleContext), any());\n }\n }", "public void testCheckNull_NullArg() {\n try {\n Util.checkNull(null, \"test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException e) {\n // good\n }\n }", "public void testCheckNull_NullArg() {\n try {\n Util.checkNull(null, \"test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException e) {\n // good\n }\n }", "public void testOrNPE1() {\r\n try {\r\n validator.or(null);\r\n fail(\"an NPE is expected\");\r\n }\r\n catch (NullPointerException npe) {\r\n //pass\r\n }\r\n }", "@Test\n public void testCheckNull() {\n Helper.checkNull(\"non-null\", \"non-null name\");\n }", "public boolean hasRight() {\r\n\t\treturn right != null;\r\n\t}", "@Test\n public void nullable_matcher() throws Exception {\n mock.oneArg(((Character) (null)));\n mock.oneArg(Character.valueOf('?'));\n Mockito.verify(mock, Mockito.times(2)).oneArg(ArgumentMatchers.nullable(Character.class));\n }", "private static void checkArg(Object paramObject) {\n/* 687 */ if (paramObject == null)\n/* 688 */ throw new NullPointerException(\"Argument must not be null\"); \n/* */ }", "public void testCheckNull() {\n Util.checkNull(\"\", \"test\");\n }", "@Test\n\tpublic void takingNullWayTest()\n\t{\n\t\ttry\n\t\t{\n\t\t\tOsmXmlToSQLiteDatabaseConverter converter = new OsmXmlToSQLiteDatabaseConverter(new MapObjectsIdFinderFake());\n\t\t\tconverter.takeWay(null);\n\t\t\tfail();\n\t\t}\n\t\tcatch (IllegalArgumentException ex)\n\t\t{\n\t\t\t// ok\n\t\t}\n\t}", "@Test(expected = IllegalArgumentException.class)\n public void testCheckNullFailure() {\n Helper.checkNull(null, \"null-name\");\n }", "boolean checkNull();", "@Test(timeout = TIMEOUT, expected = IllegalArgumentException.class)\n public void testRadixNull() {\n Sorting.lsdRadixSort(null);\n }", "public boolean hasRight(){\r\n\t\tif(getRight()!=null) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private static void checkArg(Object s) {\n if (s == null) {\n throw new NullPointerException(\"Argument must not be null\");\n }\n }", "private void assertNullHandling(UMLMessageArgument msgArg) throws Exception\r\n\t{\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((UMLMessageArgument)null));\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((Object)null));\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((UMLSymbol)null));\r\n\t}", "@Override\r\n\tpublic boolean hasRightChild() {\n\t\treturn right!=null;\r\n\t}", "public void testFieldMatchCriteriaNullField() {\r\n try {\r\n new FieldMatchCriteria(null, \"str\");\r\n fail(\"testFieldMatchCriteriaNullField is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"testFieldMatchCriteriaNullField is failure.\");\r\n }\r\n }", "@Test(expected = IllegalArgumentException.class)\n public void testCheckNullWithLoggingFailure() {\n Helper.checkNullWithLogging(null, \"obj\", \"method\", LogManager.getLog());\n }", "protected Object calcRightNullRow()\n {\n return null;\n }", "@Test\n\tpublic void takingNullNodeTest()\n\t{\n\t\ttry\n\t\t{\n\t\t\tOsmXmlToSQLiteDatabaseConverter converter = new OsmXmlToSQLiteDatabaseConverter(new MapObjectsIdFinderFake());\n\t\t\tconverter.takeNode(null);\n\t\t\tfail();\n\t\t}\n\t\tcatch (IllegalArgumentException ex)\n\t\t{\n\t\t\t// ok\n\t\t}\n\t}", "public void testCheckNull() {\n Util.checkNull(\" \", \"test\");\n }", "public void testCheckString_NullArg() {\n try {\n Util.checkString(null, \"Test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "public void testCheckString_NullArg() {\n try {\n Util.checkString(null, \"Test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "@Test\n\tvoid testCheckNull2() {\n\t\tassertTrue(DataChecker.checkNull(null));\n\t}", "@Test\n\tpublic void testNullToTerm() {\n\t\tassertTrue(JAVA_NULL.termEquals(jpc.toTerm(null)));\n\t}", "@OfMethod(\"wasNull()\")\n public void testWasNull() throws Exception {\n CallableStatement instance = newClosedCall();\n\n try {\n instance.wasNull();\n fail(\"Allowed was null after close.\");\n } catch (SQLException ex) {\n checkException(ex);\n }\n }", "@Test(expected = NullPointerException.class)\n\tpublic void testNull() {\n\n\t\tString str = null;\n\t\tstr.toUpperCase();\n\t}", "boolean getCalledOnNullInput();", "@Test\n\tvoid testCheckNull1() {\n\t\tassertFalse(DataChecker.checkNull(new Integer(42)));\n\t}", "@Override\n\tpublic void visit(IsNullExpression arg0) {\n\n\t}", "public TestCase notNull( Object obj );", "public void testMouseClickedIfMouseEventNull() {\n try {\n editBoxTrigger.mouseClicked(null);\n } catch (Exception e) {\n fail(\"No exception is excpected.\");\n }\n }", "@Test\n\tpublic void testNull() throws Exception {\n\t\ttestWith(null);\n\t}", "@Override\n\tpublic void visit(IsNullExpression arg0) {\n\t\t\n\t}", "protected boolean hasRightChild(BSTNode n) {\n\t\treturn (n.right != null);\n\t}", "@Test\n public void testCheckNullForInjectedValue() {\n Helper.checkNullForInjectedValue(\"obj\", \"obj\");\n }", "@Test\n\tvoid testCheckNull3() {\n\t\tassertTrue(DataChecker.checkNull((Object)null));\n\t}", "public boolean canProcessNull() {\n return false;\n }", "@Override\n public String visit(NullLiteralExpr n, Object arg) {\n return null;\n }", "public void testHandleGUIEvent_null() {\n try {\n eventManager.handleGUIEvent(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void testAssertPropertyReflectionEquals_leftNull() {\r\n try {\r\n assertPropertyReflectionEquals(\"stringProperty\", null, testObject);\r\n fail(\"Expected AssertionFailedError\");\r\n } catch (AssertionFailedError a) {\r\n // expected\r\n }\r\n }", "protected void checkRights(String rightName) {\n\t\tcheckRights(rightName, null);\n\t}", "@Test\n public void testWithNullString() throws org.nfunk.jep.ParseException\n {\n String string = null;\n Stack<Object> parameters = CollectionsUtils.newParametersStack(string);\n function.run(parameters);\n assertEquals(TRUE, parameters.pop());\n }", "public void testCheckArray_NullArg() {\n try {\n Util.checkArray(null, \"test\");\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "@Test\n \tpublic void testWithNullValue() {\n \t\tAssert.assertFalse(f1.equals(fnull));\n \t}", "private boolean hasRight ( int pos )\n\t{\n\t\treturn false; // replace this with working code\n\t}", "public final void testChangeZOrderActionFailureElementNull() {\n try {\n new ChangeZOrderAction(null, ChangeZOrderOperationType.BACKWARD);\n fail(\"IllegalArgumentException is expected since element is null\");\n } catch (IllegalArgumentException e) {\n // good\n }\n }", "@Test\n void testAssertPropertyReflectionEquals_leftNull() {\n assertFailing(() ->\n assertPropertyReflectionEquals(\"stringProperty\", null, testObject)\n );\n }", "@Test(expected = NullPointerException.class)\n public void formatLongNullInputTest(){\n Long number = null;\n Format.formatLong(number);\n }", "public void testValidNullPointerException() {\r\n assertNotNull(\"setup fails\", uploadRequestValidator);\r\n try {\r\n uploadRequestValidator.valid(null);\r\n fail(\"if argument is null, throw NullPointerException\");\r\n } catch (NullPointerException e) {\r\n // good\r\n }\r\n }", "public void testHandleActionEvent_null() throws Exception {\n try {\n eventManager.handleActionEvent(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void testCheckArray_NullInArg() {\n Object[] objects = new Object[] {\"one\", null};\n try {\n Util.checkArray(objects, \"test\");\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "public void testGetModificationUserMatchCriteriaNullUser() {\r\n try {\r\n FieldMatchCriteria.getModificationUserMatchCriteria(null);\r\n fail(\"testGetModificationUserMatchCriteriaNullUser is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"testGetModificationUserMatchCriteriaNullUser is failure.\");\r\n }\r\n }", "@Test\n public void testEqualsReturnsFalseOnNullArg() {\n boolean equals = record.equals(null);\n\n assertThat(equals, is(false));\n }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void testBookWithNullFacilities() throws Exception {\n\t\tbookingManagement.book(USER_ID, null, validStartDate, validEndDate);\n\t}", "public static boolean MarklogicNullNodeTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"MarklogicNullNodeTest\")) return false;\n if (!nextTokenIs(b, K_NULL_NODE)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, MARKLOGIC_NULL_NODE_TEST, null);\n r = consumeTokens(b, 2, K_NULL_NODE, L_PAR);\n p = r; // pin = 2\n r = r && report_error_(b, MarklogicNullNodeTest_2(b, l + 1));\n r = p && consumeToken(b, R_PAR) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "public void testRemoveActionEventListener2_null1() {\n try {\n eventManager.removeActionEventListener(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public static void isNull(Object arg, String argName) {\r\n if (arg != null) {\r\n throw new IllegalArgumentException(\"Argument \\\"\" + argName + \"\\\" must be null\");\r\n }\r\n }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void testChangeReservationEndWithNullID() throws Exception {\n\t\tbookingManagement.changeReservationEnd(null, validEndDate);\n\t}", "public static void nonNull(Object arg, String argName) {\r\n if (arg == null) {\r\n throw new IllegalArgumentException(\"Argument \\\"\" + argName + \"\\\" cannot be null\");\r\n }\r\n }", "@Test\n public void testReadNegativeItemIsNull() throws Exception{\n String name = null;\n itemDao.read(name);\n }", "public void testNullEnum () {\n\t\tString example = null;\n\t\ttry {\n\t\t\tRadioBand temp = RadioBand.valueForString(example);\n assertNull(\"Result of valueForString should be null.\", temp);\n\t\t}\n\t\tcatch (NullPointerException exception) {\n fail(\"Null string throws NullPointerException.\");\n\t\t}\n\t}", "@Test(expected = IllegalArgumentException.class)\n\tpublic void testBookWithNullEnd() throws Exception {\n\t\tbookingManagement.book(USER_ID, Arrays.asList(room1.getId()), validStartDate, null);\n\t}", "@Test(expected = NullPointerException.class)\n public void formatBooleanNullAsInputTest() {\n Boolean someBoolean = null;\n Format.formatBoolean(someBoolean);\n }", "public void testBoundaryChangedEvent_1_null_1() {\n try {\n new BoundaryChangedEvent(null, oldBoundary, newBoundary);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "@Override\n\tpublic void flagNull() {\n\t\t\n\t}", "@Override\n public boolean isMaybeNull() {\n checkNotPolymorphicOrUnknown();\n return (flags & NULL) != 0;\n }", "public void testRemoveActionEventListener1_null1() {\n try {\n eventManager.removeActionEventListener(null, UndoableAction.class);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void testBoundaryChangedEvent_1_null_2() {\n try {\n new BoundaryChangedEvent(classNode, null, newBoundary);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "@Test\n public void wrongArgumentsReturnsNullAndPrintsMessage() {\n String[] inputArgs = new String[] {\"-i\", \"/path/\"};\n ArgumentReader sut = new ArgumentReader(inputArgs);\n\n Arguments args = sut.read();\n\n assertThat(args, nullValue());\n assertThat(errContent.toString(), containsString(\"must be provided!\"));\n assertThat(errContent.toString(), containsString(\"Usage:\"));\n }", "public void testChangePropertyHandler_null() {\n try {\n new ChangePropertyHandler(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n\n }", "private void checkNull(T x) throws NullPointerException\n\t{\n\t\tif (x == null)\n\t\t{\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t}", "public void testBoundaryChangedEvent_2_null_2() {\n try {\n new BoundaryChangedEvent(classNode, null, newBoundary, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "@Test\n public void isGameOverNull()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Run / Verify.\n assertFalse(adjudicator.isGameOver(null));\n }", "@Override\n\tpublic WhereNode getRightChild() {\n\t\treturn null;\n\t}", "public static void isNull(Object arg, String argName, String message) {\r\n if (arg != null) {\r\n throw new IllegalArgumentException(\"Argument \\\"\" + argName + \"\\\": \" + message);\r\n }\r\n }", "public T caseRightSide(RightSide object) {\r\n\t\treturn null;\r\n\t}", "@Test(expected = NullPointerException.class)\n public void formatBytesNullInputsTest() {\n Long longObject = null;\n Format.formatBytes(longObject);\n }", "public void testBoundaryChangedEvent_2_null_1() {\n try {\n new BoundaryChangedEvent(null, oldBoundary, newBoundary, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder();\n stringBuilder0.append(\"alter materialized viewjcsh%4%|@v9\");\n SQLUtil.addOptionalCondition((String) null, stringBuilder0);\n assertEquals(\"alter materialized viewjcsh%4%|@v9 or null\", stringBuilder0.toString());\n }", "public void testCtorWithNullTransferable() throws Exception {\n try {\n new PasteAssociationAction(null, namespace);\n fail(\"IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException iae) {\n // pass\n }\n }", "@Test\n\tpublic void testWithNullValue2() {\n\t\tAssert.assertFalse(fnull.equals(f1));\n\t}", "@Test\n public void testOnEventWithNullParameters() throws ComponentLookupException\n {\n this.mocker.getComponentUnderTest().onEvent(null, null, null);\n }", "@Test\n public void wrapper_testNull() throws Exception {\n try {\n Helper.processGenerateResponse(null);\n } catch (Exception e) {\n fail(\"Should never have reached here.\");\n }\n }", "@Test\n public void extractRejectionReason_null_throwIllegalArgumentException() {\n assertThrows(IllegalArgumentException.class, () -> MessageUtils.extractRejectionReason(null));\n }", "public void testAddPaymentTerm_Null() throws Exception {\r\n try {\r\n this.getManager().addPaymentTerm(null);\r\n fail(\"IllegalArgumentException is expected\");\r\n } catch (IllegalArgumentException e) {\r\n assertTrue(e.getMessage()\r\n .indexOf(\"PaymentTerm to be added should not be null\") >= 0);\r\n }\r\n }", "public void testAssertPropertyReflectionEquals_rightNull() {\r\n testObject.setStringProperty(null);\r\n try {\r\n assertPropertyReflectionEquals(\"stringProperty\", \"stringValue\", testObject);\r\n fail(\"Expected AssertionFailedError\");\r\n } catch (AssertionFailedError a) {\r\n // expected\r\n }\r\n }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void testChangeReservationEndWithNullDate() throws Exception {\n\t\tReservation res1 = dataHelper.createPersistedReservation(USER_ID, new ArrayList<String>(), validStartDate,\n\t\t\t\tvalidEndDate);\n\n\t\tbookingManagement.changeReservationEnd(res1.getId(), null);\n\t}", "protected JTextField determineNull() {\r\n String t;\r\n\r\n try {\r\n t = rightSideInput.getText();\r\n\r\n if (t.equals(\"\")) {\r\n return rightSideInput;\r\n }\r\n\r\n t = leftSideInput.getText();\r\n\r\n if (t.equals(\"\")) {\r\n return leftSideInput;\r\n }\r\n\r\n t = topInput.getText();\r\n\r\n if (t.equals(\"\")) {\r\n return topInput;\r\n }\r\n\r\n t = bottomInput.getText();\r\n\r\n if (t.equals(\"\")) {\r\n return bottomInput;\r\n }\r\n\r\n t = frontInput.getText();\r\n\r\n if (t.equals(\"\")) {\r\n return frontInput;\r\n }\r\n\r\n t = backInput.getText();\r\n\r\n if (t.equals(\"\")) {\r\n return backInput;\r\n }\r\n\r\n return rightSideInput;\r\n } catch (NullPointerException npe) {\r\n MipavUtil.displayError(\"JDialogCropBoundaryParam reports: Unknown Error\");\r\n\r\n return rightSideInput; // gotta have some thing returned\r\n }\r\n }", "@Test\n\tpublic void testOnRejectNull() {\n\t\trunTest(new PromiseTest() {\n\t\t\t@Override\n\t\t\tpublic void run(final PromiseFactory factory, final PromiseTestHandler handler) throws Exception {\n\t\t\t\tfactory.resolve(new Dummy()).then(new ResolveCallback<Dummy, Void>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Thenable<Void> onResolve(final Dummy value) {\n\t\t\t\t\t\thandler.done();\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}, null);\n\t\t\t}\n\t\t});\n\t}", "public boolean anyNull () ;", "public static void nonNull(Object arg, String argName, String message) {\r\n if (arg == null) {\r\n throw new IllegalArgumentException(\"Argument \\\"\" + argName + \"\\\": \" + message);\r\n }\r\n }", "@Test\n public void schemaNullTest() throws GeneralException {\n JavaRuleContext testRuleContext = buildTestJavaRuleContext();\n testRuleContext.getArguments().remove(JDBCBuildMapRule.ARG_SCHEMA);\n\n assertThrows(GeneralException.class, () -> jdbcBuildMapRule.execute(testRuleContext));\n verify(jdbcBuildMapRule).internalValidation(eq(testRuleContext));\n verify(jdbcBuildMapRule, never()).internalExecute(eq(testRuleContext), any());\n }", "public void testBoundaryChangedEvent_1_null_3() {\n try {\n new BoundaryChangedEvent(classNode, oldBoundary, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "@Override\r\n\tpublic void visit(NullExpression nullExpression) {\n\r\n\t}", "@Test\n public void testSpecializationIsNull() {\n boolean expected = false;\n boolean actual = hospital.canAllocateDoctorToRoom(\n null, SurgeryRoomType.small);\n assertEquals(expected, actual);\n }", "public void testRemoveGUIEventListener2_null1() {\n try {\n eventManager.removeGUIEventListener(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void testUpdatePaymentTerm_Null() throws Exception {\r\n try {\r\n this.getManager().updatePaymentTerm(null);\r\n fail(\"IllegalArgumentException is expected\");\r\n } catch (IllegalArgumentException e) {\r\n assertTrue(e.getMessage()\r\n .indexOf(\"PaymentTerm to be updated should not be null\") >= 0);\r\n }\r\n }", "@Test(expected = IllegalArgumentException.class)\n public void testArgumentsNotHaveAValue() {\n System.out.println(\"Arguments do not have n\");\n assertThat(Arguments.valueOf(\"n\"), is(nullValue()));\n }" ]
[ "0.6328223", "0.611266", "0.611266", "0.59809273", "0.5974067", "0.5962876", "0.5931139", "0.59096956", "0.590199", "0.58934844", "0.57949615", "0.57941806", "0.57763416", "0.57082725", "0.5661993", "0.5639155", "0.56112695", "0.5607692", "0.55852574", "0.5578966", "0.55763483", "0.5572593", "0.5557945", "0.5557945", "0.5526807", "0.5498573", "0.5492083", "0.5489143", "0.5469731", "0.5454235", "0.54355526", "0.54330134", "0.54271376", "0.5418379", "0.53988475", "0.53943723", "0.53886104", "0.5380789", "0.53775394", "0.53663206", "0.5360141", "0.53568596", "0.53551", "0.53521335", "0.5349407", "0.5343101", "0.5329568", "0.53282875", "0.53051925", "0.5293298", "0.5287169", "0.52616507", "0.5257357", "0.5256223", "0.5246374", "0.5245063", "0.5244771", "0.52411604", "0.52373374", "0.5235057", "0.5224725", "0.52111024", "0.5207863", "0.5203609", "0.51983094", "0.51915634", "0.5186359", "0.518162", "0.51624686", "0.5159201", "0.51568633", "0.51561373", "0.5153535", "0.5150481", "0.5148525", "0.51435256", "0.5123141", "0.512218", "0.511994", "0.51176524", "0.51101273", "0.5109959", "0.51054525", "0.51007634", "0.5099368", "0.50990915", "0.50971687", "0.5090448", "0.50896525", "0.5087622", "0.5084138", "0.5081359", "0.5077342", "0.5076782", "0.50731665", "0.50717217", "0.50672793", "0.5066904", "0.5060986", "0.5056749" ]
0.50913686
87
Test case for null as actual object argument.
@Test void testAssertPropertyReflectionEquals_actualObjectNull() { assertFailing(() -> assertPropertyReflectionEquals("aProperty", "aValue", null) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TestCase notNull( Object obj );", "public TestCase isNull( Object obj );", "@Test\n public void testCheckNullForInjectedValue() {\n Helper.checkNullForInjectedValue(\"obj\", \"obj\");\n }", "private void assertNullHandling(UMLMessageArgument msgArg) throws Exception\r\n\t{\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((UMLMessageArgument)null));\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((Object)null));\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((UMLSymbol)null));\r\n\t}", "private static void checkArg(Object paramObject) {\n/* 687 */ if (paramObject == null)\n/* 688 */ throw new NullPointerException(\"Argument must not be null\"); \n/* */ }", "@Test\n\tpublic void testNull() throws Exception {\n\t\ttestWith(null);\n\t}", "@Test\n\tvoid testCheckNull3() {\n\t\tassertTrue(DataChecker.checkNull((Object)null));\n\t}", "@Test\n public void testCheckNull() {\n Helper.checkNull(\"non-null\", \"non-null name\");\n }", "public void testCheckNull() {\n Util.checkNull(\"\", \"test\");\n }", "@Test(expected = IllegalArgumentException.class)\r\n public void testCreationFromNullOrigin()\r\n {\r\n final Circle c = new Circle(null, 0);\r\n c.equals(null);\r\n }", "@Test\n\tvoid testCheckNull1() {\n\t\tassertFalse(DataChecker.checkNull(new Integer(42)));\n\t}", "public void testGetMessage_NullObj() {\r\n try {\r\n validator.getMessage(null);\r\n fail(\"testGetMessage_NullObj is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testGetMessage_NullObj.\");\r\n }\r\n }", "public static <T> void checkNull(T obj){\n if(obj == null){\n throw new IllegalArgumentException(\"Object is null\");\n }\n }", "public void testAssertPropertyReflectionEquals_actualObjectNull() {\r\n try {\r\n assertPropertyReflectionEquals(\"aProperty\", \"aValue\", null);\r\n fail(\"Expected AssertionFailedError\");\r\n } catch (AssertionFailedError a) {\r\n // expected\r\n }\r\n }", "public boolean canProcessNull() {\n return false;\n }", "@Test\n public void noneNullArgumentIsNullTest() throws GeneralException {\n for (String noneNullArgument : SAMLCorrelationRule.NONE_NULL_ARGUMENTS_NAME) {\n\n JavaRuleContext testRuleContext = buildTestJavaRuleContext();\n testRuleContext.getArguments().remove(noneNullArgument);\n\n assertThrows(GeneralException.class, () -> testRule.execute(testRuleContext));\n verify(testRule).internalValidation(eq(testRuleContext));\n verify(testRule, never()).internalExecute(eq(testRuleContext), any());\n }\n }", "@Test\n void testAssertPropertyReflectionEquals_leftNull() {\n assertFailing(() ->\n assertPropertyReflectionEquals(\"stringProperty\", null, testObject)\n );\n }", "private boolean m16125a(Object obj) {\n return obj == null || obj.toString().equals(\"\") || obj.toString().trim().equals(\"null\");\n }", "@Override\n\tpublic void visit(IsNullExpression arg0) {\n\n\t}", "public void testAssertPropertyReflectionEquals_leftNull() {\r\n try {\r\n assertPropertyReflectionEquals(\"stringProperty\", null, testObject);\r\n fail(\"Expected AssertionFailedError\");\r\n } catch (AssertionFailedError a) {\r\n // expected\r\n }\r\n }", "@Test\n\tpublic void takingNullWayTest()\n\t{\n\t\ttry\n\t\t{\n\t\t\tOsmXmlToSQLiteDatabaseConverter converter = new OsmXmlToSQLiteDatabaseConverter(new MapObjectsIdFinderFake());\n\t\t\tconverter.takeWay(null);\n\t\t\tfail();\n\t\t}\n\t\tcatch (IllegalArgumentException ex)\n\t\t{\n\t\t\t// ok\n\t\t}\n\t}", "public void testChangePropertyHandler_null() {\n try {\n new ChangePropertyHandler(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n\n }", "@Override\n\tpublic void visit(IsNullExpression arg0) {\n\t\t\n\t}", "@Override\n\tpublic void visit(NullValue arg0) {\n\n\t}", "@Test\n void testAssertPropertyReflectionEquals_rightNull() {\n testObject.setStringProperty(null);\n assertFailing(() ->\n assertPropertyReflectionEquals(\"stringProperty\", \"stringValue\", testObject)\n );\n }", "@Test(expected = CopilotServiceInitializationException.class)\n public void testCheckNullForInjectedValueFailure() {\n Helper.checkNullForInjectedValue(null, \"obj\");\n }", "public void visitACONST_NULL(ACONST_NULL o){\n\t\t// Nothing needs to be done here.\n\t}", "@Test(expected = NullPointerException.class)\n\tpublic void testNull() {\n\n\t\tString str = null;\n\t\tstr.toUpperCase();\n\t}", "@Override\n\tpublic void visit(NullValue arg0) {\n\t\t\n\t}", "@Test\n \tpublic void testWithNullValue() {\n \t\tAssert.assertFalse(f1.equals(fnull));\n \t}", "public final void testNullObjectEquals() {\n assertFalse(testTransaction1.equals(null)); // needed for test\n // pmd doesn't like either way\n }", "@Override\n\tpublic void flagNull() {\n\t\t\n\t}", "static public void assertNull(Object object) {\n assertNull(null, object);\n }", "public void testAssertPropertyReflectionEquals_rightNull() {\r\n testObject.setStringProperty(null);\r\n try {\r\n assertPropertyReflectionEquals(\"stringProperty\", \"stringValue\", testObject);\r\n fail(\"Expected AssertionFailedError\");\r\n } catch (AssertionFailedError a) {\r\n // expected\r\n }\r\n }", "public void testAssertPropertyReflectionEquals_null() {\r\n testObject.setStringProperty(null);\r\n assertPropertyReflectionEquals(\"stringProperty\", null, testObject);\r\n }", "private static void assertObjectInGetInternalStateIsNotNull(Object object) {\n if (object == null) {\n throw new IllegalArgumentException(\"The object containing the field cannot be null\");\n }\n }", "@Test\r\n public void testEqualsNull() {\r\n SnakeSquare instance = new SnakeSquare(33, 21);\r\n try {\r\n assertEquals(false, instance.equals(null));\r\n } catch (NullPointerException e) { \r\n fail();\r\n }\r\n }", "@Test\n\tvoid testCheckNull2() {\n\t\tassertTrue(DataChecker.checkNull(null));\n\t}", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n jSONObject0.putOpt((String) null, (Object) null);\n Object object0 = JSONObject.NULL;\n assertNotNull(object0);\n }", "public void testCheckNull_NullArg() {\n try {\n Util.checkNull(null, \"test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException e) {\n // good\n }\n }", "public void testCheckNull_NullArg() {\n try {\n Util.checkNull(null, \"test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException e) {\n // good\n }\n }", "private static void checkArg(Object s) {\n if (s == null) {\n throw new NullPointerException(\"Argument must not be null\");\n }\n }", "public void testFieldMatchCriteriaNullField() {\r\n try {\r\n new FieldMatchCriteria(null, \"str\");\r\n fail(\"testFieldMatchCriteriaNullField is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"testFieldMatchCriteriaNullField is failure.\");\r\n }\r\n }", "public void testObjEqual()\n {\n assertEquals( true, Util.objEqual(null,null) );\n assertEquals( false,Util.objEqual(this,null) );\n assertEquals( false,Util.objEqual(null,this) );\n assertEquals( true, Util.objEqual(this,this) );\n assertEquals( true, Util.objEqual(\"12\",\"12\") );\n }", "static void checkNull(final Object param, final String paramName) {\r\n if (param == null) {\r\n throw new IllegalArgumentException(\"The argument '\" + paramName\r\n + \"' should not be null.\");\r\n }\r\n }", "public void testCheckNull() {\n Util.checkNull(\" \", \"test\");\n }", "public void testValidNullPointerException() {\r\n assertNotNull(\"setup fails\", uploadRequestValidator);\r\n try {\r\n uploadRequestValidator.valid(null);\r\n fail(\"if argument is null, throw NullPointerException\");\r\n } catch (NullPointerException e) {\r\n // good\r\n }\r\n }", "@Test\n\tvoid testCheckNulls2() {\n\t\tObject[] o = {2,5f,\"Test\",null,\"Test2\"};\n\t\tassertTrue(DataChecker.checkNulls(o));\n\t}", "@Test\n public void testCheckNullWithLogging() {\n Helper.checkNullWithLogging(\"obj\", \"obj\", \"method\", LogManager.getLog());\n }", "@Test(expected = IllegalArgumentException.class)\r\n public void testDetectWithNullData() throws Exception {\r\n instance.detect(null);\r\n }", "@Test(expected = IllegalArgumentException.class)\r\n public void testCreationFromNullCircle()\r\n {\r\n final Circle c = new Circle(null);\r\n c.equals(null);\r\n }", "@Test\n\tpublic void takingNullNodeTest()\n\t{\n\t\ttry\n\t\t{\n\t\t\tOsmXmlToSQLiteDatabaseConverter converter = new OsmXmlToSQLiteDatabaseConverter(new MapObjectsIdFinderFake());\n\t\t\tconverter.takeNode(null);\n\t\t\tfail();\n\t\t}\n\t\tcatch (IllegalArgumentException ex)\n\t\t{\n\t\t\t// ok\n\t\t}\n\t}", "public void testCheckArray_NullInArg() {\n Object[] objects = new Object[] {\"one\", null};\n try {\n Util.checkArray(objects, \"test\");\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "@Test\n public void testEqualsReturnsFalseOnNullArg() {\n boolean equals = record.equals(null);\n\n assertThat(equals, is(false));\n }", "private boolean isNull(Object anObject) {\n\t\tif(anObject == null) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public void testTransformWithNullElement() throws Exception {\n try {\n instance.transform(null, document, caller);\n fail(\"IllegalArgumentException is excepted[\" + suhClassName + \"].\");\n } catch (IllegalArgumentException iae) {\n // pass\n }\n }", "@Test(expected = IllegalArgumentException.class)\n public void testCheckNullWithLoggingFailure() {\n Helper.checkNullWithLogging(null, \"obj\", \"method\", LogManager.getLog());\n }", "private void checkNull(T x) throws NullPointerException\n\t{\n\t\tif (x == null)\n\t\t{\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t}", "@Test(expectedExceptions = IllegalArgumentException.class)\n public void updateNullTest() {\n reservationService.update(null);\n }", "@Test\n void testAssertPropertyReflectionEquals_null() {\n testObject.setStringProperty(null);\n assertPropertyReflectionEquals(\"stringProperty\", null, testObject);\n }", "public void testGetNullValue() {\n ValueString vs = new ValueString();\n\n assertNull(vs.getString());\n assertEquals(0.0D, vs.getNumber(), 0.0D);\n assertNull(vs.getDate());\n assertEquals(false, vs.getBoolean());\n assertEquals(0, vs.getInteger());\n assertEquals(null, vs.getBigNumber());\n assertNull(vs.getSerializable());\n }", "public void testBoundaryChangedEvent_1_null_1() {\n try {\n new BoundaryChangedEvent(null, oldBoundary, newBoundary);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "@Ignore\n\t@Test\n\tpublic void testParamNull() {\n\t\tregisterParamException(null, keyString, valueString);\n\t\tregisterParamException(groupString, null, valueString);\n\t\tregisterParamException(groupString, keyString, null);\n\t}", "@Override\n\tpublic void visit(Null n) {\n\t\t\n\t}", "@Test(expected=IllegalArgumentException.class)\n\tpublic void testPickUpNull() {\n\t\tPlayer player = new Player(new Square(), 0);\n\t\tplayer.pickUp(null);\n\t}", "boolean checkNull();", "@Test\r\n public void testRetrieveNull() {\r\n\r\n assertNull(instance.retrieve(paymentDetail1));\r\n }", "@Test\n\tvoid testCheckNulls1() {\n\t\tassertTrue(DataChecker.checkNulls(null));\n\t}", "@Override\n public boolean isMaybeNull() {\n checkNotPolymorphicOrUnknown();\n return (flags & NULL) != 0;\n }", "private static boolean isNotNull(Object object) {\n\t\tif (object != null) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void testTransformWithNullCaller() throws Exception {\n try {\n instance.transform(element, document, null);\n fail(\"IllegalArgumentException is excepted[\" + suhClassName + \"].\");\n } catch (IllegalArgumentException iae) {\n // pass\n }\n }", "@Test(expected=NullPointerException.class) @SpecAssertion(id = \"432-A4\", section=\"4.3.2\")\n public void testNullConversion1(){\n MonetaryConversions.getConversion((CurrencyUnit)null);\n }", "@Test(expected = NullPointerException.class)\n public void formatBooleanNullAsInputTest() {\n Boolean someBoolean = null;\n Format.formatBoolean(someBoolean);\n }", "@Test(expected = IllegalArgumentException.class)\n public void test_update_userNull() throws Exception {\n instance.update(null);\n }", "static public void assertNotNull(Object object) {\n assertNotNull(null, object);\n }", "public T caseOperation_Not_Equals(Operation_Not_Equals object)\r\n {\r\n return null;\r\n }", "@Test\r\n public void testExecute_inputNull() {\r\n \r\n assertThat((Object)processor.execute(null, ANONYMOUS_CSVCONTEXT)).isNull();\r\n \r\n }", "@Test\n public void nullable_matcher() throws Exception {\n mock.oneArg(((Character) (null)));\n mock.oneArg(Character.valueOf('?'));\n Mockito.verify(mock, Mockito.times(2)).oneArg(ArgumentMatchers.nullable(Character.class));\n }", "@Test(expected=NullPointerException.class) @SpecAssertion(id = \"432-A4\", section=\"4.3.2\")\n public void testNullConversion2(){\n MonetaryConversions.getConversion((String)null);\n }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void visitNullRepository() {\n\t\tTreeUtils.visit(null, ObjectId.zeroId(), new ITreeVisitor() {\n\n\t\t\tpublic boolean accept(FileMode mode, String path, String name,\n\t\t\t\t\tAnyObjectId id) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t}", "public void testMemberNotTeamMemberForProjectValidator_NullBundleInfo() {\r\n try {\r\n new MemberNotTeamMemberForProjectValidator((BundleInfo) null);\r\n fail(\"testMemberNotTeamMemberForProjectValidator_NullBundleInfo is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testMemberNotTeamMemberForProjectValidator_NullBundleInfo.\");\r\n }\r\n }", "@Test\n\tpublic void testApplicationNullValues() throws Throwable {\n\t\tApplication testedObject = new Application();\n\t\ttestedObject.setAppJson((ApplicationInfo) null);\n\t\ttestedObject.setApplicationName((String) null);\n\n\t\tassertEquals(null, testedObject.getAppJson());\n\t\tassertEquals(null, testedObject.getApplicationName());\n\t}", "public void testBoundaryChangedEvent_1_null_3() {\n try {\n new BoundaryChangedEvent(classNode, oldBoundary, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "@Test(expected = IllegalArgumentException.class)\n public void testCheckNullFailure() {\n Helper.checkNull(null, \"null-name\");\n }", "public static void main(String[] args) {\n\t\tObject o=new Object();\r\n\t\tboolean flag=o.equals(null);\r\n\t\tSystem.out.print(flag);\r\n\t}", "public final void testChangeZOrderActionFailureElementNull() {\n try {\n new ChangeZOrderAction(null, ChangeZOrderOperationType.BACKWARD);\n fail(\"IllegalArgumentException is expected since element is null\");\n } catch (IllegalArgumentException e) {\n // good\n }\n }", "@Test\n public void isGameOverNull()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Run / Verify.\n assertFalse(adjudicator.isGameOver(null));\n }", "@Test(expected=NullPointerException.class) @SpecAssertion(id = \"432-A4\", section=\"4.3.2\")\n public void testNullConversion4(){\n MonetaryConversions.getConversion((String)null, ConversionContext.of());\n }", "public void testHandleGUIEvent_null() {\n try {\n eventManager.handleGUIEvent(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void testTransformWithNullDocument() throws Exception {\n try {\n instance.transform(element, null, caller);\n fail(\"IllegalArgumentException is excepted[\" + suhClassName + \"].\");\n } catch (IllegalArgumentException iae) {\n // pass\n }\n }", "public void testNullValue()\r\n {\r\n try\r\n {\r\n new IncludeDirective( IncludeDirective.REF, null, null, PROPERTIES );\r\n fail( \"no-NPE\" );\r\n }\r\n catch( NullPointerException e )\r\n {\r\n // success\r\n }\r\n }", "@Test\n public void testUpdateNegativeItemIsNull() throws Exception{\n Item item = null;\n itemDao.update(item);\n }", "@Test\n\tvoid testCheckNulls4() {\n\t\tObject[] o = {2,5f,\"Test\",Duration.ZERO,new Station(0,0,\"Test\")};\n\t\tassertFalse(DataChecker.checkNulls(o));\n\t}", "@Override\r\n\tpublic void visit(NullExpression nullExpression) {\n\r\n\t}", "@Test(expected = NullPointerException.class)\n public void Test11() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = null;\n // Then test the method\n assertTrue(component.equals(another));\n }", "@Test\n public void testNullPositionEquals(){\n assertFalse(Maze.position(0,0).equals(null));\n }", "public void testCtorWithNullTransferable() throws Exception {\n try {\n new PasteAssociationAction(null, namespace);\n fail(\"IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException iae) {\n // pass\n }\n }", "@Test\n public void testOnEventWithNullParameters() throws ComponentLookupException\n {\n this.mocker.getComponentUnderTest().onEvent(null, null, null);\n }", "private static boolean verifyNullObject(LogManager pLogger, UnmodifiableSMG pSmg) {\n SMGValue null_value = null;\n\n // Find a null value in values\n for (SMGValue value : pSmg.getValues()) {\n if (pSmg.getObjectPointedBy(value) == SMGNullObject.INSTANCE) {\n null_value = value;\n break;\n }\n }\n\n // Verify that one value pointing to NULL object is present in values\n if (null_value == null) {\n pLogger.log(Level.SEVERE, \"SMG inconsistent: no value pointing to null object\");\n return false;\n }\n\n // Verify that NULL value returned by getNullValue() points to NULL object\n if (pSmg.getObjectPointedBy(SMGZeroValue.INSTANCE) != SMGNullObject.INSTANCE) {\n pLogger.log(Level.SEVERE, \"SMG inconsistent: null value not pointing to null object\");\n return false;\n }\n\n // Verify that the value found in values is the one returned by getNullValue()\n if (SMGZeroValue.INSTANCE != null_value) {\n pLogger.log(\n Level.SEVERE,\n \"SMG inconsistent: null value in values set not returned by getNullValue()\");\n return false;\n }\n\n // Verify that NULL object has no value\n SMGEdgeHasValueFilterByObject filter =\n SMGEdgeHasValueFilter.objectFilter(SMGNullObject.INSTANCE);\n\n if (!pSmg.getHVEdges(filter).isEmpty()) {\n pLogger.log(Level.SEVERE, \"SMG inconsistent: null object has some value\");\n return false;\n }\n\n // Verify that the NULL object is invalid\n if (pSmg.isObjectValid(SMGNullObject.INSTANCE)) {\n pLogger.log(Level.SEVERE, \"SMG inconsistent: null object is not invalid\");\n return false;\n }\n\n // Verify that the size of the NULL object is zero\n if (SMGNullObject.INSTANCE.getSize() != 0) {\n pLogger.log(Level.SEVERE, \"SMG inconsistent: null object does not have zero size\");\n return false;\n }\n\n return true;\n }", "public void testBoundaryChangedEvent_1_null_2() {\n try {\n new BoundaryChangedEvent(classNode, null, newBoundary);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }" ]
[ "0.781609", "0.75348336", "0.73348737", "0.72314835", "0.7103162", "0.7027443", "0.6848957", "0.6833671", "0.67534345", "0.6750033", "0.67409575", "0.6725542", "0.6696573", "0.66669405", "0.665983", "0.6627633", "0.6623466", "0.66023505", "0.6568106", "0.6561137", "0.65606284", "0.6560389", "0.6555431", "0.6554535", "0.6549103", "0.65465266", "0.6546078", "0.65414596", "0.6531397", "0.6528914", "0.6528754", "0.6519151", "0.65100014", "0.6497434", "0.64771473", "0.6466442", "0.6462245", "0.6447938", "0.64430857", "0.64403534", "0.64403534", "0.64395255", "0.6432512", "0.6429778", "0.6423703", "0.6397378", "0.6384587", "0.6376325", "0.63736457", "0.63691586", "0.63667494", "0.6357545", "0.6349787", "0.6341395", "0.63306457", "0.6329798", "0.6315117", "0.6313223", "0.6305034", "0.63041204", "0.6296644", "0.629131", "0.62909675", "0.6275389", "0.6263466", "0.62563986", "0.62528944", "0.6252126", "0.6248218", "0.6232519", "0.6231451", "0.6229635", "0.6218629", "0.6218304", "0.62122166", "0.61919224", "0.61770636", "0.616708", "0.6165931", "0.6164348", "0.61612177", "0.61582", "0.6146459", "0.61421", "0.61346525", "0.61304146", "0.6119792", "0.61127096", "0.61089736", "0.61076474", "0.61034226", "0.6102975", "0.6100803", "0.60924715", "0.6083548", "0.60822386", "0.6075044", "0.607401", "0.6065873", "0.6061996" ]
0.6693388
13
Test case for both null arguments.
@Test void testAssertPropertyReflectionEquals_null() { testObject.setStringProperty(null); assertPropertyReflectionEquals("stringProperty", null, testObject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean bothNull(String one, String two) {\n return (one == null && two == null);\n }", "@Test\n public void testCheckNull() {\n Helper.checkNull(\"non-null\", \"non-null name\");\n }", "public void testCheckNull_NullArg() {\n try {\n Util.checkNull(null, \"test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException e) {\n // good\n }\n }", "public void testCheckNull_NullArg() {\n try {\n Util.checkNull(null, \"test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException e) {\n // good\n }\n }", "public void testCheckNull() {\n Util.checkNull(\"\", \"test\");\n }", "private static void checkArg(Object paramObject) {\n/* 687 */ if (paramObject == null)\n/* 688 */ throw new NullPointerException(\"Argument must not be null\"); \n/* */ }", "@Test\n\tvoid testCheckNull2() {\n\t\tassertTrue(DataChecker.checkNull(null));\n\t}", "@Test\n public void noneNullArgumentIsNullTest() throws GeneralException {\n for (String noneNullArgument : SAMLCorrelationRule.NONE_NULL_ARGUMENTS_NAME) {\n\n JavaRuleContext testRuleContext = buildTestJavaRuleContext();\n testRuleContext.getArguments().remove(noneNullArgument);\n\n assertThrows(GeneralException.class, () -> testRule.execute(testRuleContext));\n verify(testRule).internalValidation(eq(testRuleContext));\n verify(testRule, never()).internalExecute(eq(testRuleContext), any());\n }\n }", "private void assertNullHandling(UMLMessageArgument msgArg) throws Exception\r\n\t{\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((UMLMessageArgument)null));\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((Object)null));\r\n\t\tif(msgArg!=null)\r\n\t\t\tassertFalse(msgArg.equals((UMLSymbol)null));\r\n\t}", "@Test\n\tvoid testCheckNulls1() {\n\t\tassertTrue(DataChecker.checkNulls(null));\n\t}", "@Test\n \tpublic void testWithNullValue() {\n \t\tAssert.assertFalse(f1.equals(fnull));\n \t}", "@Ignore\n\t@Test\n\tpublic void testParamNull() {\n\t\tregisterParamException(null, keyString, valueString);\n\t\tregisterParamException(groupString, null, valueString);\n\t\tregisterParamException(groupString, keyString, null);\n\t}", "public void testCheckArray_NullInArg() {\n Object[] objects = new Object[] {\"one\", null};\n try {\n Util.checkArray(objects, \"test\");\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "public TestCase notNull( Object obj );", "public void testCheckNull() {\n Util.checkNull(\" \", \"test\");\n }", "@Test\n\tpublic void testWithNullValue2() {\n\t\tAssert.assertFalse(fnull.equals(f1));\n\t}", "@Test\n\tvoid testCheckNull1() {\n\t\tassertFalse(DataChecker.checkNull(new Integer(42)));\n\t}", "@Test\n\tpublic void testNull() throws Exception {\n\t\ttestWith(null);\n\t}", "@Test\n\tvoid testCheckNull3() {\n\t\tassertTrue(DataChecker.checkNull((Object)null));\n\t}", "@Test\n\tvoid testCheckNulls2() {\n\t\tObject[] o = {2,5f,\"Test\",null,\"Test2\"};\n\t\tassertTrue(DataChecker.checkNulls(o));\n\t}", "boolean checkNull();", "@Test\n void nullTest() {\n assertNull(sFloat1.toScrabbleInt());\n assertNull(sFloat1.and(sFloat2));\n assertNull(sFloat1.or(sFloat2));\n assertNull(sFloat1.toScrabbleBool());\n assertNull(sFloat1.toScrabbleBinary());\n assertNull(sFloat1.addToString(new ScrabbleString(\"Hello World\")));\n }", "@Test\n public void testCheckNullForInjectedValue() {\n Helper.checkNullForInjectedValue(\"obj\", \"obj\");\n }", "public void testOrNPE1() {\r\n try {\r\n validator.or(null);\r\n fail(\"an NPE is expected\");\r\n }\r\n catch (NullPointerException npe) {\r\n //pass\r\n }\r\n }", "private static void checkArg(Object s) {\n if (s == null) {\n throw new NullPointerException(\"Argument must not be null\");\n }\n }", "@Test(expected = IllegalArgumentException.class)\n public void testCheckNullWithLoggingFailure() {\n Helper.checkNullWithLogging(null, \"obj\", \"method\", LogManager.getLog());\n }", "@Test(expected = IllegalArgumentException.class)\n public void testCheckNullFailure() {\n Helper.checkNull(null, \"null-name\");\n }", "public void testCheckArray_NullArg() {\n try {\n Util.checkArray(null, \"test\");\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "@Test(expected=IllegalArgumentException.class)\n\tpublic void testContainsUniqueChars2NullString() {\n\t\tQuestion11.containsUniqueChars2(null);\n\t}", "static <T> boolean argEquals(T a1,boolean a2, T b1,boolean b2) {\n return\n Null.equals(a1, b1) && //\n a2==b2; //\n }", "boolean getCalledOnNullInput();", "public void testBoundaryChangedEvent_2_null_1() {\n try {\n new BoundaryChangedEvent(null, oldBoundary, newBoundary, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "@Test\n public void testEqualsReturnsFalseOnNullArg() {\n boolean equals = record.equals(null);\n\n assertThat(equals, is(false));\n }", "public boolean canProcessNull() {\n return false;\n }", "@Test\n public void nullable_matcher() throws Exception {\n mock.oneArg(((Character) (null)));\n mock.oneArg(Character.valueOf('?'));\n Mockito.verify(mock, Mockito.times(2)).oneArg(ArgumentMatchers.nullable(Character.class));\n }", "public TestCase isNull( Object obj );", "public void testFieldMatchCriteriaNullField() {\r\n try {\r\n new FieldMatchCriteria(null, \"str\");\r\n fail(\"testFieldMatchCriteriaNullField is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"testFieldMatchCriteriaNullField is failure.\");\r\n }\r\n }", "@Test\n\tvoid testCheckNulls3() {\n\t\tObject[] o = {null,null,null,null,null};\n\t\tassertTrue(DataChecker.checkNulls(o));\n\t}", "@Test\n public void testCheckNullWithLogging() {\n Helper.checkNullWithLogging(\"obj\", \"obj\", \"method\", LogManager.getLog());\n }", "@Override\n\tpublic void visit(IsNullExpression arg0) {\n\n\t}", "@Test\n public void testWithNullString() throws org.nfunk.jep.ParseException\n {\n String string = null;\n Stack<Object> parameters = CollectionsUtils.newParametersStack(string);\n function.run(parameters);\n assertEquals(TRUE, parameters.pop());\n }", "public void testBoundaryChangedEvent_2_null_2() {\n try {\n new BoundaryChangedEvent(classNode, null, newBoundary, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void testCheckString_NullArg() {\n try {\n Util.checkString(null, \"Test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "public void testCheckString_NullArg() {\n try {\n Util.checkString(null, \"Test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "@Override\n\tpublic void visit(IsNullExpression arg0) {\n\t\t\n\t}", "public void testBoundaryChangedEvent_1_null_2() {\n try {\n new BoundaryChangedEvent(classNode, null, newBoundary);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "static void checkNull(final Object param, final String paramName) {\r\n if (param == null) {\r\n throw new IllegalArgumentException(\"The argument '\" + paramName\r\n + \"' should not be null.\");\r\n }\r\n }", "public void testBoundaryChangedEvent_1_null_1() {\n try {\n new BoundaryChangedEvent(null, oldBoundary, newBoundary);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void testRemoveActionEventListener2_null1() {\n try {\n eventManager.removeActionEventListener(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void testValidNullPointerException() {\r\n assertNotNull(\"setup fails\", uploadRequestValidator);\r\n try {\r\n uploadRequestValidator.valid(null);\r\n fail(\"if argument is null, throw NullPointerException\");\r\n } catch (NullPointerException e) {\r\n // good\r\n }\r\n }", "public void testAddActionEventListener2_null1() {\n try {\n eventManager.addActionEventListener(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "@Test\n public void testIsValid_NullProducesOrNullAccepts() {\n CollectorWithNullProducesOrAndAccepts collector = new CollectorWithNullProducesOrAndAccepts();\n Set errors = validator.validate(collector);\n assertFalse(errors.isEmpty());\n }", "@Test(expected = NullPointerException.class)\n\tpublic void testNull() {\n\n\t\tString str = null;\n\t\tstr.toUpperCase();\n\t}", "public void testBoundaryChangedEvent_2_null_3() {\n try {\n new BoundaryChangedEvent(classNode, oldBoundary, null, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void testAddGUIEventListener2_null1() {\n try {\n eventManager.addGUIEventListener(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void testRemoveGUIEventListener1_null2() {\n try {\n eventManager.removeGUIEventListener(gUIEventListener1, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "@Test(expected = NullPointerException.class)\n public void formatBooleanNullAsInputTest() {\n Boolean someBoolean = null;\n Format.formatBoolean(someBoolean);\n }", "public void testRemoveGUIEventListener2_null1() {\n try {\n eventManager.removeGUIEventListener(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void testRemoveActionEventListener1_null2() {\n try {\n eventManager.removeActionEventListener(actionEventListener1, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "@Test(expected = IllegalArgumentException.class)\r\n public void testCreationFromNullOrigin()\r\n {\r\n final Circle c = new Circle(null, 0);\r\n c.equals(null);\r\n }", "public void testChangePropertyHandler_null() {\n try {\n new ChangePropertyHandler(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n\n }", "public void testHandleGUIEvent_null() {\n try {\n eventManager.handleGUIEvent(null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "public void testBoundaryChangedEvent_1_null_3() {\n try {\n new BoundaryChangedEvent(classNode, oldBoundary, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "@Test\r\n public void testEqualsNull() {\r\n SnakeSquare instance = new SnakeSquare(33, 21);\r\n try {\r\n assertEquals(false, instance.equals(null));\r\n } catch (NullPointerException e) { \r\n fail();\r\n }\r\n }", "public void testAddGUIEventListener1_null2() {\n try {\n eventManager.addGUIEventListener(gUIEventListener1, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "@Test\n\tvoid testCheckNulls4() {\n\t\tObject[] o = {2,5f,\"Test\",Duration.ZERO,new Station(0,0,\"Test\")};\n\t\tassertFalse(DataChecker.checkNulls(o));\n\t}", "public boolean supportsEqualNullSyntax() {\n return true;\n }", "@Test\n public void nonNullStringPass() {\n }", "private void checkNull(T x) throws NullPointerException\n\t{\n\t\tif (x == null)\n\t\t{\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t}", "public static void isNull(Object arg, String argName, String message) {\r\n if (arg != null) {\r\n throw new IllegalArgumentException(\"Argument \\\"\" + argName + \"\\\": \" + message);\r\n }\r\n }", "public void testGetMessage_NullObj() {\r\n try {\r\n validator.getMessage(null);\r\n fail(\"testGetMessage_NullObj is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"Unknown exception occurs in testGetMessage_NullObj.\");\r\n }\r\n }", "@Test(expected = NullPointerException.class)\r\n\t\tpublic void testIntersectionWithNullInput() {\r\n\t\t\ttestingSet = new IntegerSet(null);\r\n\t\t\ttestingSet2= new IntegerSet(null); \r\n\t\t\t\r\n\t\t\t// union of 2 null sets \r\n\t\t\ttestingSet3= testingSet.intersection(testingSet, testingSet2);\r\n\t\t}", "@Test(expected=NullPointerException.class) @SpecAssertion(id = \"432-A4\", section=\"4.3.2\")\n public void testNullConversion2(){\n MonetaryConversions.getConversion((String)null);\n }", "@Test(expected=IllegalArgumentException.class)\n\tpublic void testcontainsUniqueCharsNaiveNullString() {\n\t\tQuestion11.containsUniqueCharsNaive(null);\n\t}", "public final void testNullObjectEquals() {\n assertFalse(testTransaction1.equals(null)); // needed for test\n // pmd doesn't like either way\n }", "@Test(expected = IllegalArgumentException.class)\n public void testArgumentsNotHaveAValue() {\n System.out.println(\"Arguments do not have n\");\n assertThat(Arguments.valueOf(\"n\"), is(nullValue()));\n }", "private void checkFormNullInput(Point[] points) {\n // No null inputs are allowed\n if (points == null) throw new IllegalArgumentException();\n\n for (Point p : points) {\n // No null elements are allowed\n if (p == null) {\n throw new IllegalArgumentException();\n }\n }\n }", "@Test\n public void testOnEventWithNullParameters() throws ComponentLookupException\n {\n this.mocker.getComponentUnderTest().onEvent(null, null, null);\n }", "public void testAddActionEventListener1_null2() {\n try {\n eventManager.addActionEventListener(actionEventListener1, null);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "@Test(expected = Exception.class)\n public void updateEvent_bothArgumentsNull_throwsException() throws UpdateException {\n\n this.scheduleService.updateEvent(null, null);\n }", "public void testGetModificationUserMatchCriteriaNullUser() {\r\n try {\r\n FieldMatchCriteria.getModificationUserMatchCriteria(null);\r\n fail(\"testGetModificationUserMatchCriteriaNullUser is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"testGetModificationUserMatchCriteriaNullUser is failure.\");\r\n }\r\n }", "boolean isIsNotNull();", "@Override\n\tpublic void flagNull() {\n\t\t\n\t}", "public void testTransformWithNullElement() throws Exception {\n try {\n instance.transform(null, document, caller);\n fail(\"IllegalArgumentException is excepted[\" + suhClassName + \"].\");\n } catch (IllegalArgumentException iae) {\n // pass\n }\n }", "@Test\n void nullProblem() {\n var x = (Void) null;\n var z = (String) null;\n System.out.println(x + \", \" + z);\n }", "public void testTransformWithNullCaller() throws Exception {\n try {\n instance.transform(element, document, null);\n fail(\"IllegalArgumentException is excepted[\" + suhClassName + \"].\");\n } catch (IllegalArgumentException iae) {\n // pass\n }\n }", "@Test(timeout = TIMEOUT, expected = IllegalArgumentException.class)\n public void testMergeNull() {\n Integer[] arr = {4, 2, 1, 3};\n Sorting.mergeSort(null, comparator);\n Sorting.mergeSort(arr, null);\n }", "@Test\n\tpublic void takingNullWayTest()\n\t{\n\t\ttry\n\t\t{\n\t\t\tOsmXmlToSQLiteDatabaseConverter converter = new OsmXmlToSQLiteDatabaseConverter(new MapObjectsIdFinderFake());\n\t\t\tconverter.takeWay(null);\n\t\t\tfail();\n\t\t}\n\t\tcatch (IllegalArgumentException ex)\n\t\t{\n\t\t\t// ok\n\t\t}\n\t}", "public void testRemoveGUIEventListener1_null1() {\n try {\n eventManager.removeGUIEventListener(null, EventObject.class);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "@Test\n public void testSumAllNumbersWithNullInput() {\n \t//this test currently fails on purpose\n assertEquals(null, calculator.sumAllNumbers(null));\n }", "public static void isNull(Object arg, String argName) {\r\n if (arg != null) {\r\n throw new IllegalArgumentException(\"Argument \\\"\" + argName + \"\\\" must be null\");\r\n }\r\n }", "@Override\n\tpublic void visit(NullValue arg0) {\n\n\t}", "@Test(expected = NullPointerException.class)\r\n\t\tpublic void testUnionWithNullInput() {\n\t\t\ttestingSet = new IntegerSet(null);\r\n\t\t\ttestingSet2= new IntegerSet(null); \r\n\t\t\t// union of 2 sets should result in null value \r\n\t\t\ttestingSet3= testingSet.union(testingSet, testingSet2);\r\n\t\t\t\r\n\t\t}", "@Test(expected = CopilotServiceInitializationException.class)\n public void testCheckNullForInjectedValueFailure() {\n Helper.checkNullForInjectedValue(null, \"obj\");\n }", "@Test(expected = IllegalArgumentException.class)\r\n public void testDetectWithNullData() throws Exception {\r\n instance.detect(null);\r\n }", "public void testRemoveActionEventListener1_null1() {\n try {\n eventManager.removeActionEventListener(null, UndoableAction.class);\n fail(\"IllegalArgumentException should be thrown.\");\n } catch (IllegalArgumentException iae) {\n // Success\n }\n }", "@Test\n public void testNullPositionEquals(){\n assertFalse(Maze.position(0,0).equals(null));\n }", "public boolean anyNull () ;", "@Override\n\tpublic void visit(NullValue arg0) {\n\t\t\n\t}", "@Test\n\tpublic void testValidateUpdateQueryWithNullValue2() {\n\t\twhen(repoItem.getPropertyValue(RuleProperty.TARGET)).thenReturn(DefaultRuleAssetValidator.ALL_PAGES);\n\t\tupdates.add(mockAssetView(\"query\", null));\t\t\n\t\tdefaultRuleAssetValidator.validateUpdateAsset(editorInfo, updates, null);\n\t\tverify(assetService, never()).addError(anyString(), anyString());\n\t}", "@Test\n\tpublic void testValidateUpdateTargetWithNullQuery1() {\n\t\tupdates.add(mockAssetView(\"target\", DefaultRuleAssetValidator.SEARCH_PAGES));\n\t\tupdates.add(mockAssetView(\"query\", null));\t\t\n\t\tdefaultRuleAssetValidator.validateUpdateAsset(editorInfo, updates, null);\n\t\tverify(assetService).addError(eq(RuleProperty.QUERY), anyString());\t\t\n\t}" ]
[ "0.7219919", "0.70836526", "0.70797634", "0.70797634", "0.6927687", "0.6922478", "0.69067925", "0.68714255", "0.68248", "0.6787495", "0.67801774", "0.67654693", "0.6760656", "0.67537105", "0.674699", "0.67459583", "0.6731852", "0.67273897", "0.6727203", "0.67262244", "0.67061853", "0.6692676", "0.6657187", "0.66276294", "0.660812", "0.66080755", "0.65198445", "0.65148413", "0.6500391", "0.64996934", "0.6449529", "0.6439726", "0.6388147", "0.63759816", "0.6375868", "0.6366246", "0.63651246", "0.63546735", "0.63423026", "0.63126194", "0.63110733", "0.6305847", "0.6302372", "0.6302372", "0.62768704", "0.62514347", "0.625069", "0.6238761", "0.62370205", "0.62244", "0.62225294", "0.6200428", "0.61950356", "0.61913896", "0.6189752", "0.61699486", "0.61693", "0.6144652", "0.6133831", "0.61281544", "0.60997236", "0.60786766", "0.6076905", "0.6070728", "0.60682094", "0.60618913", "0.6060182", "0.60555017", "0.6051644", "0.60444725", "0.6043341", "0.6042326", "0.60355216", "0.60352445", "0.60335934", "0.60192466", "0.60170424", "0.60147095", "0.6012794", "0.59837794", "0.59798205", "0.5972397", "0.59590685", "0.59501994", "0.5943357", "0.5937982", "0.59355223", "0.5923247", "0.5914334", "0.5912821", "0.5910676", "0.5909432", "0.5908905", "0.58984125", "0.58953434", "0.58914036", "0.5884092", "0.58768255", "0.58692837", "0.58653104", "0.58600134" ]
0.0
-1
Test for ignored default left value.
@Test void testAssertPropertyReflectionEquals_equalsIgnoredDefault() { assertPropertyReflectionEquals( "a message", "stringProperty", null, testObject, ReflectionComparatorMode.IGNORE_DEFAULTS ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasDefaultValue();", "String getDefaultValue();", "String getDefaultValue();", "public Object getDefaultValue();", "public Object getDefaultValue();", "boolean isDefault();", "boolean isDefault();", "protected final boolean toIsDefault() {\n return to < 0;\n }", "public boolean isDefault();", "public Integer checkLeft()\r\n\t{\r\n\t\treturn this.X - 1;\r\n\t}", "T getDefaultValue();", "private boolean hasLeft ( int pos )\n\t{\n\t\treturn false; // replace this with working code\n\t}", "public boolean hasLeft(){\r\n\t\tif(getLeft()!=null) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private boolean isDefault(int id) {\n return id == -1;\n }", "private void defaultForEmptyConditions()\n {\n /*\n * When any of the Conditions has all Left Hand Side, Operator and\n * Right Hand Side as empty then set Operator to default value of\n * CVL_WF_OPRSImpl.EQUAL(mimic default situation).\n * Note if this is not done then the condition will store null value\n * for Left Hand Side, Operator and Right Hand Side, and the whole condition\n * record will not be displayed on \"Manage Approval Conditions\" page\n * because the page selection query uses an equal join with R_WF_APRV_COND\n * and CVL_WF_OPRS tables.\n */\n for ( int liCtr = 1 ; liCtr <= 5 ; liCtr++ )\n {\n if( isNull(\"AND_COND_LHS_\" + liCtr) && isNull(\"AND_COND_OPR_\" + liCtr)\n && isNull(\"AND_COND_RHS_\" + liCtr) )\n {\n getData(\"AND_COND_OPR_\" + liCtr).setbyte((byte)3);\n }\n }//end for\n }", "static boolean default_formal_parameter_recover(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"default_formal_parameter_recover\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NOT_);\n r = !default_formal_parameter_recover_0(b, l + 1);\n exit_section_(b, l, m, r, false, null);\n return r;\n }", "public boolean hasLeft() {\r\n\t\treturn left != null;\r\n\t}", "@Override\n\tpublic boolean canBeLeft() {\n\t\treturn true;\n\t}", "Object getDefaultValue(String key);", "public boolean checkLeft()\n\t{\n\t\tif(col-1>=0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public void testDefaultValue() {\n if(referenceDefault == null) {\n System.out.println(\"Default value of any reference variable is null!\");\n }\n }", "private void setLeftValue()\n\t{\n\t\tstrParse = entry.getText();\n\t\tleftValue = Double.parseDouble (strParse);\n\t\tcalc.setLeftValue (leftValue);\n\t}", "OrExp getLeft();", "private static boolean default_formal_parameter_recover_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"default_formal_parameter_recover_0\")) return false;\n boolean r;\n r = consumeToken(b, RPAREN);\n if (!r) r = consumeToken(b, COMMA);\n if (!r) r = consumeToken(b, RBRACKET);\n if (!r) r = consumeToken(b, RBRACE);\n return r;\n }", "public boolean requiresLeftMarking() {\n return false;\n }", "public boolean hasREVENUEDEFAULTIND() {\n return fieldSetFlags()[7];\n }", "ParameterableElement getDefault();", "public CheckLevel getDefaultLevel() {\n return defaultLevel;\n }", "public static DefaultExpression default_() { throw Extensions.todo(); }", "public boolean isLeftKnown() {\n return left != BeaconColor.UNKNOWN;\n }", "ValueNode getDefaultTree()\n\t{\n\t\treturn defaultTree;\n\t}", "public Integer getIsDefault() {\n return isDefault;\n }", "public Integer getIsDefault() {\n return isDefault;\n }", "public boolean hasDefaultValues()\r\n\t{\r\n\t\tif (stepName != null)\r\n\t\t\treturn false;\r\n\r\n\t\tif (stepDisplayName != null)\r\n\t\t\treturn false;\r\n\r\n\t\tif (stepDescription != null)\r\n\t\t\treturn false;\r\n\r\n\t\tif (roleId != null)\r\n\t\t\treturn false;\r\n\r\n\t\tif (userId != null)\r\n\t\t\treturn false;\r\n\r\n\t\tif (permissions != null)\r\n\t\t\treturn false;\r\n\r\n\t\tif (priority != 0)\r\n\t\t\treturn false;\r\n\r\n\t\treturn true;\r\n\t}", "public boolean isSetIsLeft() {\n return EncodingUtils.testBit(__isset_bitfield, __ISLEFT_ISSET_ID);\n }", "public static int alwaysPickLeftmost(int[] arr, int left, int right) {\n return left;\n }", "void setLeft(boolean left) {\n myLeft = left;\n }", "public boolean isDefault() {\r\n\treturn bgclip == border;\r\n }", "com.google.protobuf.Value getDefaultValue();", "void hasLeft();", "@Override\r\n\tpublic boolean hasLeftChild() {\n\t\treturn left!=null;\r\n\t}", "public void setLeft(boolean b){ left = b; }", "public void setLeft(boolean b){ left = b; }", "boolean getPredefinedValuesNull();", "protected boolean isDefaultValue(Object value){\n\n return value instanceof Number && value.equals(0);\n\n }", "public boolean isLeft() {\n\t\treturn state == State.LEFT;\n\t}", "@Override\n public AbstractLValue getLeftOperand() {\n return (AbstractLValue)super.getLeftOperand();\n }", "@Override\n public AbstractLValue getLeftOperand() {\n return (AbstractLValue)super.getLeftOperand();\n }", "PreferenceDefaultValueAttribute getDefaultValue();", "@Override\r\n @Test\r\n @ConditionalIgnore(condition = IgnoreTreeAnchor.class)\r\n public void testAlsoSelectPreviousAscending() {\r\n super.testAlsoSelectPreviousAscending();\r\n }", "protected boolean anyMovesLeft() {\r\n return super.anyMovesLeft();\r\n }", "public static int getDefaultPosition()\n {\n return defaults.position;\n }", "public Integer getDefaultFlag() {\n return defaultFlag;\n }", "com.google.protobuf.ValueOrBuilder getDefaultValueOrBuilder();", "@Test\n public void testGetDeltaXLEFT()\n {\n assertEquals(Direction.LEFT.getDeltaX(), -1);\n }", "String getDefaultNull();", "boolean reachedLeft() {\n\t\treturn this.x <= 0;\n\t}", "@java.lang.Override\n public boolean hasDefaultValue() {\n return defaultValue_ != null;\n }", "@Override\r\n\tpublic MoveLeftCommand getLeft() {\n\t\treturn null;\r\n\t}", "@Override\n public int checkNoMovesLeft(List<Integer> userStates, List<Integer> agentStates) {\n boolean noMovesForPlayer1 = checkEmptyMovesForPlayer(userStates);\n boolean noMovesForPlayer2 = checkEmptyMovesForPlayer(agentStates);\n if (noMovesForPlayer1 && noMovesForPlayer2) return 0;\n else if (noMovesForPlayer1) return NO_MOVES_PLAYER1;\n else if (noMovesForPlayer2) return NO_MOVES_PLAYER2;\n else return BOTH_PLAYERS_HAVE_MOVES;\n }", "public default int getLevel(){ return 0; }", "@Override\n\tpublic WhereNode getLeftChild() {\n\t\treturn null;\n\t}", "@Override\n\tpublic boolean hasDefault()\n\t{\n\t\treturn (m_default != null);\n\t}", "public boolean GetIsByDefault()\n {\n return this._defaultSpace;\n }", "private static Double getDefaultNoDataValue() {\n\n try {\n final double dNoDataValue = Double.parseDouble(SextanteGUI.getSettingParameterValue(SextanteGeneralSettings.DEFAULT_NO_DATA_VALUE));\n return dNoDataValue;\n }\n catch (final Exception e) {\n return new Double(-99999d);\n }\n\n }", "@Test\n public void defaultValueTest() {\n String[] commandLine = new String[0];\n\n parsingEngine.addArgumentSource( DefaultValueArgProvider.class );\n parsingEngine.parse( commandLine );\n parsingEngine.validate();\n\n DefaultValueArgProvider argProvider = new DefaultValueArgProvider();\n parsingEngine.loadArgumentsIntoObject( argProvider );\n\n Assert.assertEquals(argProvider.value.intValue(), 42, \"Default value is not correctly initialized\");\n\n // Then try to override it.\n commandLine = new String[] { \"--value\", \"27\" };\n\n parsingEngine.parse( commandLine );\n parsingEngine.validate();\n\n parsingEngine.loadArgumentsIntoObject( argProvider );\n\n Assert.assertEquals(argProvider.value.intValue(), 27, \"Default value is not correctly initialized\");\n }", "public boolean leftDistributive( Operator op){\n\t return false;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }" ]
[ "0.604382", "0.5865284", "0.5865284", "0.5755174", "0.5755174", "0.5753096", "0.5753096", "0.5701294", "0.56243217", "0.55995953", "0.5515808", "0.54824686", "0.5476579", "0.543216", "0.5383249", "0.53681153", "0.5352287", "0.5339254", "0.5318922", "0.5306531", "0.5295496", "0.52915424", "0.529082", "0.52752715", "0.52629703", "0.52578586", "0.5253192", "0.52377", "0.5237064", "0.52307045", "0.5214293", "0.5199099", "0.5199099", "0.5195365", "0.5187919", "0.5185223", "0.51670057", "0.51557803", "0.51403266", "0.51394296", "0.5137814", "0.5137529", "0.5137529", "0.5134623", "0.5132101", "0.5124224", "0.5117086", "0.5117086", "0.5115768", "0.5113461", "0.5109998", "0.51075715", "0.5096976", "0.5096968", "0.5073966", "0.50719464", "0.5070458", "0.50641435", "0.5063062", "0.5051183", "0.50452286", "0.5041132", "0.5039063", "0.50347435", "0.5028701", "0.50237536", "0.5012783", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855" ]
0.0
-1
Test for ignored default left value.
@Test void testAssertPropertyLenientEquals_equalsIgnoredDefault() { assertPropertyLenientEquals("stringProperty", null, testObject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasDefaultValue();", "String getDefaultValue();", "String getDefaultValue();", "public Object getDefaultValue();", "public Object getDefaultValue();", "boolean isDefault();", "boolean isDefault();", "protected final boolean toIsDefault() {\n return to < 0;\n }", "public boolean isDefault();", "public Integer checkLeft()\r\n\t{\r\n\t\treturn this.X - 1;\r\n\t}", "T getDefaultValue();", "private boolean hasLeft ( int pos )\n\t{\n\t\treturn false; // replace this with working code\n\t}", "public boolean hasLeft(){\r\n\t\tif(getLeft()!=null) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private boolean isDefault(int id) {\n return id == -1;\n }", "private void defaultForEmptyConditions()\n {\n /*\n * When any of the Conditions has all Left Hand Side, Operator and\n * Right Hand Side as empty then set Operator to default value of\n * CVL_WF_OPRSImpl.EQUAL(mimic default situation).\n * Note if this is not done then the condition will store null value\n * for Left Hand Side, Operator and Right Hand Side, and the whole condition\n * record will not be displayed on \"Manage Approval Conditions\" page\n * because the page selection query uses an equal join with R_WF_APRV_COND\n * and CVL_WF_OPRS tables.\n */\n for ( int liCtr = 1 ; liCtr <= 5 ; liCtr++ )\n {\n if( isNull(\"AND_COND_LHS_\" + liCtr) && isNull(\"AND_COND_OPR_\" + liCtr)\n && isNull(\"AND_COND_RHS_\" + liCtr) )\n {\n getData(\"AND_COND_OPR_\" + liCtr).setbyte((byte)3);\n }\n }//end for\n }", "static boolean default_formal_parameter_recover(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"default_formal_parameter_recover\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NOT_);\n r = !default_formal_parameter_recover_0(b, l + 1);\n exit_section_(b, l, m, r, false, null);\n return r;\n }", "public boolean hasLeft() {\r\n\t\treturn left != null;\r\n\t}", "@Override\n\tpublic boolean canBeLeft() {\n\t\treturn true;\n\t}", "Object getDefaultValue(String key);", "public boolean checkLeft()\n\t{\n\t\tif(col-1>=0)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public void testDefaultValue() {\n if(referenceDefault == null) {\n System.out.println(\"Default value of any reference variable is null!\");\n }\n }", "private void setLeftValue()\n\t{\n\t\tstrParse = entry.getText();\n\t\tleftValue = Double.parseDouble (strParse);\n\t\tcalc.setLeftValue (leftValue);\n\t}", "OrExp getLeft();", "private static boolean default_formal_parameter_recover_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"default_formal_parameter_recover_0\")) return false;\n boolean r;\n r = consumeToken(b, RPAREN);\n if (!r) r = consumeToken(b, COMMA);\n if (!r) r = consumeToken(b, RBRACKET);\n if (!r) r = consumeToken(b, RBRACE);\n return r;\n }", "public boolean requiresLeftMarking() {\n return false;\n }", "public boolean hasREVENUEDEFAULTIND() {\n return fieldSetFlags()[7];\n }", "ParameterableElement getDefault();", "public CheckLevel getDefaultLevel() {\n return defaultLevel;\n }", "public static DefaultExpression default_() { throw Extensions.todo(); }", "public boolean isLeftKnown() {\n return left != BeaconColor.UNKNOWN;\n }", "ValueNode getDefaultTree()\n\t{\n\t\treturn defaultTree;\n\t}", "public Integer getIsDefault() {\n return isDefault;\n }", "public Integer getIsDefault() {\n return isDefault;\n }", "public boolean hasDefaultValues()\r\n\t{\r\n\t\tif (stepName != null)\r\n\t\t\treturn false;\r\n\r\n\t\tif (stepDisplayName != null)\r\n\t\t\treturn false;\r\n\r\n\t\tif (stepDescription != null)\r\n\t\t\treturn false;\r\n\r\n\t\tif (roleId != null)\r\n\t\t\treturn false;\r\n\r\n\t\tif (userId != null)\r\n\t\t\treturn false;\r\n\r\n\t\tif (permissions != null)\r\n\t\t\treturn false;\r\n\r\n\t\tif (priority != 0)\r\n\t\t\treturn false;\r\n\r\n\t\treturn true;\r\n\t}", "public boolean isSetIsLeft() {\n return EncodingUtils.testBit(__isset_bitfield, __ISLEFT_ISSET_ID);\n }", "public static int alwaysPickLeftmost(int[] arr, int left, int right) {\n return left;\n }", "void setLeft(boolean left) {\n myLeft = left;\n }", "public boolean isDefault() {\r\n\treturn bgclip == border;\r\n }", "com.google.protobuf.Value getDefaultValue();", "void hasLeft();", "@Override\r\n\tpublic boolean hasLeftChild() {\n\t\treturn left!=null;\r\n\t}", "public void setLeft(boolean b){ left = b; }", "public void setLeft(boolean b){ left = b; }", "boolean getPredefinedValuesNull();", "protected boolean isDefaultValue(Object value){\n\n return value instanceof Number && value.equals(0);\n\n }", "public boolean isLeft() {\n\t\treturn state == State.LEFT;\n\t}", "@Override\n public AbstractLValue getLeftOperand() {\n return (AbstractLValue)super.getLeftOperand();\n }", "@Override\n public AbstractLValue getLeftOperand() {\n return (AbstractLValue)super.getLeftOperand();\n }", "PreferenceDefaultValueAttribute getDefaultValue();", "@Override\r\n @Test\r\n @ConditionalIgnore(condition = IgnoreTreeAnchor.class)\r\n public void testAlsoSelectPreviousAscending() {\r\n super.testAlsoSelectPreviousAscending();\r\n }", "protected boolean anyMovesLeft() {\r\n return super.anyMovesLeft();\r\n }", "public static int getDefaultPosition()\n {\n return defaults.position;\n }", "public Integer getDefaultFlag() {\n return defaultFlag;\n }", "com.google.protobuf.ValueOrBuilder getDefaultValueOrBuilder();", "@Test\n public void testGetDeltaXLEFT()\n {\n assertEquals(Direction.LEFT.getDeltaX(), -1);\n }", "String getDefaultNull();", "boolean reachedLeft() {\n\t\treturn this.x <= 0;\n\t}", "@java.lang.Override\n public boolean hasDefaultValue() {\n return defaultValue_ != null;\n }", "@Override\r\n\tpublic MoveLeftCommand getLeft() {\n\t\treturn null;\r\n\t}", "@Override\n public int checkNoMovesLeft(List<Integer> userStates, List<Integer> agentStates) {\n boolean noMovesForPlayer1 = checkEmptyMovesForPlayer(userStates);\n boolean noMovesForPlayer2 = checkEmptyMovesForPlayer(agentStates);\n if (noMovesForPlayer1 && noMovesForPlayer2) return 0;\n else if (noMovesForPlayer1) return NO_MOVES_PLAYER1;\n else if (noMovesForPlayer2) return NO_MOVES_PLAYER2;\n else return BOTH_PLAYERS_HAVE_MOVES;\n }", "public default int getLevel(){ return 0; }", "@Override\n\tpublic WhereNode getLeftChild() {\n\t\treturn null;\n\t}", "@Override\n\tpublic boolean hasDefault()\n\t{\n\t\treturn (m_default != null);\n\t}", "public boolean GetIsByDefault()\n {\n return this._defaultSpace;\n }", "private static Double getDefaultNoDataValue() {\n\n try {\n final double dNoDataValue = Double.parseDouble(SextanteGUI.getSettingParameterValue(SextanteGeneralSettings.DEFAULT_NO_DATA_VALUE));\n return dNoDataValue;\n }\n catch (final Exception e) {\n return new Double(-99999d);\n }\n\n }", "@Test\n public void defaultValueTest() {\n String[] commandLine = new String[0];\n\n parsingEngine.addArgumentSource( DefaultValueArgProvider.class );\n parsingEngine.parse( commandLine );\n parsingEngine.validate();\n\n DefaultValueArgProvider argProvider = new DefaultValueArgProvider();\n parsingEngine.loadArgumentsIntoObject( argProvider );\n\n Assert.assertEquals(argProvider.value.intValue(), 42, \"Default value is not correctly initialized\");\n\n // Then try to override it.\n commandLine = new String[] { \"--value\", \"27\" };\n\n parsingEngine.parse( commandLine );\n parsingEngine.validate();\n\n parsingEngine.loadArgumentsIntoObject( argProvider );\n\n Assert.assertEquals(argProvider.value.intValue(), 27, \"Default value is not correctly initialized\");\n }", "public boolean leftDistributive( Operator op){\n\t return false;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }" ]
[ "0.604382", "0.5865284", "0.5865284", "0.5755174", "0.5755174", "0.5753096", "0.5753096", "0.5701294", "0.56243217", "0.55995953", "0.5515808", "0.54824686", "0.5476579", "0.543216", "0.5383249", "0.53681153", "0.5352287", "0.5339254", "0.5318922", "0.5306531", "0.5295496", "0.52915424", "0.529082", "0.52752715", "0.52629703", "0.52578586", "0.5253192", "0.52377", "0.5237064", "0.52307045", "0.5214293", "0.5199099", "0.5199099", "0.5195365", "0.5187919", "0.5185223", "0.51670057", "0.51557803", "0.51403266", "0.51394296", "0.5137814", "0.5137529", "0.5137529", "0.5134623", "0.5132101", "0.5124224", "0.5117086", "0.5117086", "0.5115768", "0.5113461", "0.5109998", "0.51075715", "0.5096976", "0.5096968", "0.5073966", "0.50719464", "0.5070458", "0.50641435", "0.5063062", "0.5051183", "0.50452286", "0.5041132", "0.5039063", "0.50347435", "0.5028701", "0.50237536", "0.5012783", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855", "0.5011855" ]
0.0
-1
Create a user interface.
public UserInterface(CalcEngine engine) { calc = engine; makeFrame(); frame.setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createUI() {\n\t\tthis.rootPane = new TetrisRootPane(true);\n\t\tthis.controller = new TetrisController(this, rootPane, getWorkingDirectory());\n\t\tthis.listener = new TetrisActionListener(controller, this, rootPane);\n\t\t\n\t\trootPane.setActionListener(listener);\n\t\trootPane.setGameComponents(controller.getGameComponent(), controller.getPreviewComponent());\n\t\trootPane.initialize();\n\t\t\n\t\tPanelBorder border = controller.getPlayer().getPanel().getPanelBorder(\"Tetris v\" + controller.getVersion());\n\t\tborder.setRoundedCorners(true);\n\t\tJPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));\n\t\tpanel.setBackground(getBackgroundColor(border.getLineColor()));\n\t\tpanel.setBorder(border);\n\t\tpanel.setPreferredSize(new Dimension(564, 551));\n\t\tpanel.add(rootPane);\n\t\trootPane.addPanelBorder(border, panel);\n\t\t\n\t\tthis.setContentPane(panel);\n\t\tthis.setSize(564, 550);\n\t\t\n\t\tcontroller.initializeUI();\n\t}", "public UserInterface() {\n \t setTitle(\"The Cancer Specialist - Diagnostic Application\");\n initComponents();\n }", "public void createUI() {\r\n\t\ttry {\r\n\t\t\tJPanel centerPanel = this.createCenterPane();\r\n\t\t\tJPanel westPanel = this.createWestPanel();\r\n\t\t\tm_XONContentPane.add(westPanel, BorderLayout.WEST);\r\n\t\t\tm_XONContentPane.add(centerPanel, BorderLayout.CENTER);\r\n\t\t\tm_XONContentPane.revalidate();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tRGPTLogger.logToFile(\"Exception at createUI \", ex);\r\n\t\t}\r\n\t}", "public userinterface() {\n initComponents();\n }", "public interface UICreator {\r\n // TODO convert to use View.Builder ?\r\n /**\r\n * Should instantiate the UI.\r\n * @param sim The {@link Simulator} instance for which the UI should be\r\n * created.\r\n */\r\n void createUI(Simulator sim);\r\n }", "private void initUI() {\n\t\tPanel p = new Panel();\n\t\tp.setLayout(new BorderLayout());\n\t\t\n\t\tPanel flowLayoutPanel = new Panel();\n\t\tflowLayoutPanel.setLayout(new FlowLayout());\n\t\t\n\t\ttextArea = new JTextArea();\n\t\t\n\t\tMyCloseButton exitButton = new MyCloseButton(\"Exit\");\n\t\t/*\n\t\texit.addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t\t\t\n\t\t});\n\t\t*/\n\t\tMyOpenButton saveButton = new MyOpenButton(\"Open\");\n\t\t/*\n\t\tsaveButton.addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\n\t\t});\n\t\t*/\n\t\tMySaveButton mySaveButton =new MySaveButton(\"Save\");\n\t\t//setVisible(mb);\n\t\tp.add(flowLayoutPanel, BorderLayout.SOUTH);\n\t\tflowLayoutPanel.add(exitButton);\n\t\tflowLayoutPanel.add(saveButton);\n\t\tflowLayoutPanel.add(mySaveButton);\n\t\tp.add(textArea, BorderLayout.CENTER); \n\t\tadd(p);\n\t\t\n\t\tcreateMenu();\n\t\t\n\t\tsetTitle(\"Text Editor\");\n\t\tsetSize(600, 600);\n\t\tsetLocationRelativeTo(null);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\t\n\t}", "void initUI();", "public interface IGUIFactory {\n Component label(String text);\n Component labelEmpty();\n Component fieldReadOnly(int length, String text);\n Component fieldEditable(int length, String text);\n Component fieldCalc(int length, String text, boolean readonly);\n Component button(String text);\n Component button(String text, ActionListener listener);\n Component button(ImageIcon image, ActionListener listener);\n Component password();\n Container panelEmpty();\n Container panel(LayoutManager manager);\n Container panelBordered();\n TablePanel tablePanel(IGUIEditor parent, Table table);\n TablePanel tablePanel(IGUIEditor parent, TableModel tableModel);\n Table table(TableModel tableModel);\n Component comboBoxFilled(Collection priorities);\n Component checkBox(String text);\n Component checkBox(String text, boolean flag);\n LayoutManager boxLayout(Container comp, int direction);\n LayoutManager gridLayout(int rows, int cols);\n Dimension size(int width, int height);\n JTabbedPane tabbedPane();\n JMenuItem menuItem(String text, Icon icon);\n JMenu menu(String text);\n JMenuBar menuBar();\n WindowEvent windowEvent(Window source, int id);\n}", "protected void setupUI() {\n\n }", "public void setupUI() {\r\n\t\t\r\n\t\tvPanel = new VerticalPanel();\r\n\t\thPanel = new HorizontalPanel();\r\n\t\t\r\n\t\titemName = new Label();\r\n\t\titemName.addStyleName(Styles.page_title);\r\n\t\titemDesc = new Label();\r\n\t\titemDesc.addStyleName(Styles.quest_desc);\r\n\t\titemType = new Label();\r\n\t\titemType.addStyleName(Styles.quest_lvl);\r\n\t\t\r\n\t\tVerticalPanel img = new VerticalPanel();\r\n\t\timg.add(new Image(imgDir));\r\n\t\t\r\n\t\tvPanel.add(itemName);\r\n\t\tvPanel.add(itemDesc);\r\n\t\tvPanel.add(img);\r\n\t\tvPanel.add(hPanel);\r\n\t\t\r\n\t\tVerticalPanel mainPanel = new VerticalPanel();\r\n\t\tmainPanel.setWidth(\"100%\");\r\n\t\tvPanel.addStyleName(NAME);\r\n\t\t\r\n\t\tmainPanel.add(vPanel);\r\n \tinitWidget(mainPanel);\r\n }", "private void setupUI() \n\t{\n\t\t\n\t\tthis.setLayout( new FormLayout() );\n\t\tmyInterfaceContainer = new Composite( this, SWT.NONE );\n\t\tmyInterfaceContainer.setLayoutData( FormDataMaker.makeFullFormData());\n\t\t\n\t\tsetupInterfaceContainer();\n\t}", "private void buildUserInterface() {\n\t\t// Create layout manager\n\t\tGridLayout layout = new GridLayout();\n\t\tlayout.numColumns = 2;\n\t\tlayout.horizontalSpacing = 6;\n\t\tlayout.verticalSpacing = 6;\n\t\t\n\t\t// Layout data for the text input fields\n\t\tGridData gridData = new GridData();\n\t\tgridData.horizontalAlignment = SWT.FILL;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\n\t\t// Create composite\n\t\tComposite login = new Composite(shell, SWT.NONE);\n\t\tlogin.setLayout(layout);\n\n\t\t// Add name label\n\t\tLabel nameLabel = new Label(login, SWT.NONE);\n\t\tnameLabel.setText(\"Dein Name: \");\n\n\t\t// Add name input\n\t\tname = new Text(login, SWT.SINGLE | SWT.BORDER);\n\t\tname.setText(\"test \" + (int)(Math.random() * 30));\n\t\tname.selectAll();\n\t\tname.setLayoutData(gridData);\n\n\t\t// Add server label\n\t\tLabel serverLabel = new Label(login, SWT.NONE);\n\t\tserverLabel.setText(\"Server: \");\n\n\t\t// Add server input\n\t\tserver = new Text(login, SWT.SINGLE | SWT.BORDER);\n\t\tserver.setText(\"localhost\");\n\t\tserver.setLayoutData(gridData);\n\n\t\t// Add \"join game\" button\n\t\tjoinGame = new Button(login, SWT.PUSH);\n\t\tjoinGame.setText(\"Spiel beitreten\");\n\t\tshell.setDefaultButton(joinGame);\n\n\t\t// Add \"load game\" button\n\t\tloadGame = new Button(login, SWT.PUSH);\n\t\tloadGame.setText(\"Spiel laden\");\n\n\t\tlogin.setBounds(0, 0, 250, 250);\n\n\t\t// Create composite\n\t\tComposite about = new Composite(shell, SWT.NONE);\n\t\tabout.setLayout(layout);\n\n\t\t// Add about text\n\t\tLabel aboutlabel = new Label(about, SWT.NONE);\n\t\taboutlabel.setText(AppClient.name + \"\\n\" + \"Hochschule Bremen 2011\\n\"\n\t\t\t\t+ \"Hendrik Druse, Jannes Meyer, Timur Teker\");\n\n\t\tabout.setBounds(0, 300, 250, 50);\n\t}", "private void createUserInterface()\r\n {\r\n // get content pane for attaching GUI components\r\n Container contentPane = getContentPane();\r\n\r\n // enable explicit positioning of GUI components\r\n contentPane.setLayout( null );\r\n \r\n // set up side1JLabel\r\n side1JLabel = new JLabel();\r\n side1JLabel.setBounds( 16, 16, 40, 24 );\r\n side1JLabel.setText( \"Side1:\" );\r\n contentPane.add( side1JLabel );\r\n \r\n // set up side1JTextField\r\n side1JTextField = new JTextField();\r\n side1JTextField.setBounds( 72, 16, 90, 24 );\r\n side1JTextField.setHorizontalAlignment( JTextField.RIGHT ); \r\n contentPane.add( side1JTextField );\r\n \r\n // set up side2JLabel\r\n side2JLabel = new JLabel();\r\n side2JLabel.setBounds( 16, 56, 40, 24 );\r\n side2JLabel.setText( \"Side2:\" );\r\n contentPane.add( side2JLabel );\r\n \r\n // set up side2JTextField\r\n side2JTextField = new JTextField();\r\n side2JTextField.setBounds( 72, 56, 90, 24 );\r\n side2JTextField.setHorizontalAlignment( JTextField.RIGHT );\r\n contentPane.add( side2JTextField );\r\n \r\n // set up side3JLabel\r\n side3JLabel = new JLabel();\r\n side3JLabel.setBounds( 16, 96, 40, 24 );\r\n side3JLabel.setText( \"Side3:\" );\r\n contentPane.add( side3JLabel );\r\n \r\n // set up side3JTextField\r\n side3JTextField = new JTextField();\r\n side3JTextField.setBounds( 72, 96, 90, 24 );\r\n side3JTextField.setHorizontalAlignment( JTextField.RIGHT );\r\n contentPane.add( side3JTextField );\r\n \r\n // set up messageJTextField\r\n messageJTextField = new JTextField();\r\n messageJTextField.setBounds( 16, 140, 252, 24 );\r\n messageJTextField.setEditable( false );\r\n contentPane.add( messageJTextField );\r\n \r\n // set up createJButton\r\n createJButton = new JButton();\r\n createJButton.setBounds( 178, 16, 90, 24 );\r\n createJButton.setText( \"Create\" );\r\n contentPane.add( createJButton );\r\n createJButton.addActionListener( \r\n \r\n new ActionListener() // anonymous inner class\r\n {\r\n // event handler called when createJButton is pressed\r\n public void actionPerformed( ActionEvent event )\r\n {\r\n createJButtonActionPerformed( event );\r\n }\r\n \r\n } // end anonymous inner class\r\n \r\n ); // end call to addActionListener\r\n \r\n // set properties of application's window\r\n setTitle( \"Triangle Creator\" ); // set title bar string\r\n setSize( 290, 208 ); // set window size\r\n setVisible( true ); // display window\r\n \r\n }", "public void createContents()\n\t{\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"TTS - Task Tracker System\");\n\t\t\n\t\tbtnLogIn = new Button(shell, SWT.NONE);\n\t\tbtnLogIn.setBounds(349, 84, 75, 25);\n\t\tbtnLogIn.setText(\"Log In\");\n\t\tbtnLogIn.addSelectionListener(new SelectionAdapter()\n\t\t{\n\t\t\tpublic void widgetSelected(SelectionEvent arg0)\n\t\t\t{\n\t\t\t\tif (cboxUserDropDown.getText() != \"\"\n\t\t\t\t\t\t&& cboxUserDropDown.getSelectionIndex() >= 0)\n\t\t\t\t{\n\t\t\t\t\tString selectedUserName = cboxUserDropDown.getText();\n\t\t\t\t\tusers.setLoggedInUser(selectedUserName);\n\t\t\t\t\tshell.setVisible(false);\n\t\t\t\t\tdisplay.sleep();\n\t\t\t\t\tnew TaskMainViewWindow(AccessUsers.getLoggedInUser());\n\t\t\t\t\tdisplay.wake();\n\t\t\t\t\tshell.setVisible(true);\n\t\t\t\t\tshell.forceFocus();\n\t\t\t\t\tshell.setActive();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnQuit = new Button(shell, SWT.CENTER);\n\t\tbtnQuit.setBounds(349, 227, 75, 25);\n\t\tbtnQuit.setText(\"Quit\");\n\t\tbtnQuit.addSelectionListener(new SelectionAdapter()\n\t\t{\n\t\t\tpublic void widgetSelected(SelectionEvent arg0)\n\t\t\t{\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\t\n\t\tcboxUserDropDown = new Combo(shell, SWT.READ_ONLY);\n\t\tcboxUserDropDown.setBounds(146, 86, 195, 23);\n\t\t\n\t\tinitUserDropDown();\n\t\t\n\t\tlblNewLabel = new Label(shell, SWT.CENTER);\n\t\tlblNewLabel.setBounds(197, 21, 183, 25);\n\t\tlblNewLabel.setFont(new Font(display, \"Times\", 14, SWT.BOLD));\n\t\tlblNewLabel.setForeground(new Color(display, 200, 0, 0));\n\t\tlblNewLabel.setText(\"Task Tracker System\");\n\t\t\n\t\ticon = new Label(shell, SWT.BORDER);\n\t\ticon.setLocation(0, 0);\n\t\ticon.setSize(140, 111);\n\t\ticon.setImage(new Image(null, \"images/task.png\"));\n\t\t\n\t\tbtnCreateUser = new Button(shell, SWT.NONE);\n\t\tbtnCreateUser.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tshell.setEnabled(false);\n\t\t\t\tnew CreateUserWindow(users);\n\t\t\t\tshell.setEnabled(true);\n\t\t\t\tinitUserDropDown();\n\t\t\t\tshell.forceFocus();\n\t\t\t\tshell.setActive();\n\t\t\t}\n\t\t});\n\t\tbtnCreateUser.setBounds(349, 115, 75, 25);\n\t\tbtnCreateUser.setText(\"Create User\");\n\t\t\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\r\n\t}", "private void createUI() throws FactoryException {\n assert theGame != null;\n assert ghostController != null;\n\n buttonPanel = new ButtonPanel(this);\n buttonPanel.initialize();\n\n pi = new PacmanInteraction(this, theGame);\n pi.addController(ghostController);\n buttonPanel.setListener(pi);\n this.addKeyListener(new PacmanKeyListener(pi));\n\n boardView = createBoardView();\n animator = new Animator(boardView);\n pi.addController(animator);\n\n points = new PointsPanel();\n points.initialize(theGame.getPointManager());\n theGame.attach(points);\n\n JPanel mainGrid = new JPanel();\n mainGrid.setLayout(new BorderLayout());\n mainGrid.setName(\"jpacman.topdown\");\n mainGrid.add(points, BorderLayout.NORTH);\n mainGrid.add(boardView, BorderLayout.CENTER);\n mainGrid.add(buttonPanel, BorderLayout.SOUTH);\n\n getContentPane().add(mainGrid);\n\n int width = Math.max(boardView.windowWidth(), buttonPanel.getWidth());\n int height = boardView.windowHeight() + buttonPanel.getHeight();\n setSize(width, height);\n setGridSize();\n\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n setName(\"jpacman.main\");\n setTitle(\"JPacman\");\n }", "private void $$$setupUI$$$() {\n\t\tpanel_overview = new JPanel();\n\t\tpanel_overview.setLayout(new BorderLayout(0, 0));\n\t\twebView = new WebbrowserPanel();\n\t\tpanel_overview.add(webView, BorderLayout.CENTER);\n\t}", "private void createContents() {\r\n\t\tshell = new Shell(getParent(), SWT.TITLE);\r\n\r\n\t\tgetParent().setEnabled(false);\r\n\r\n\t\tshell.addShellListener(new ShellAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void shellClosed(ShellEvent e) {\r\n\t\t\t\tgetParent().setEnabled(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tshell.setImage(SWTResourceManager.getImage(LoginInfo.class, \"/javax/swing/plaf/metal/icons/ocean/warning.png\"));\r\n\r\n\t\tsetMidden(397, 197);\r\n\r\n\t\tshell.setText(this.windows_name);\r\n\t\tshell.setLayout(null);\r\n\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Microsoft YaHei UI\", 11, SWT.NORMAL));\r\n\t\tlabel.setBounds(79, 45, 226, 30);\r\n\t\tlabel.setAlignment(SWT.CENTER);\r\n\t\tlabel.setText(this.label_show);\r\n\r\n\t\tButton button = new Button(shell, SWT.NONE);\r\n\t\tbutton.setBounds(150, 107, 86, 30);\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tshell.close();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setText(\"确定\");\r\n\r\n\t}", "public static void createGUI() {\n\t\tSimpleGUI gui = new SimpleGUI();\n\t\tgui.setVisible(true);\n\t}", "private static void createGUI(){\n DrawingArea drawingArea = new DrawingArea();\n ToolSelect utilityBar = new ToolSelect();\n MenuBar menuBar = new MenuBar();\n JFrame.setDefaultLookAndFeelDecorated(true);\n JFrame frame = new JFrame(\"GUIMk1\");\n frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );\n frame.setLayout(new BorderLayout());\n frame.getContentPane().add(utilityBar, BorderLayout.WEST);\n frame.getContentPane().add(menuBar,BorderLayout.NORTH);\n frame.getContentPane().add(drawingArea);\n frame.setLocationRelativeTo( null );\n frame.setVisible(true);\n frame.pack();\n\n }", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(838, 649);\n\n\t}", "protected void createContents() {\r\n\t\tsetText(\"SWT Application\");\r\n\t\tsetSize(450, 300);\r\n\r\n\t}", "private void initUI() {\n }", "public final void initUI() {\n\t\tsetLayout(new BoxLayout(this, BoxLayout.X_AXIS));\n\t\tadd(new Box.Filler(minSize, prefSize, null));\n\t\t\n\t\tJPanel nameChoicePanel = new JPanel();\n\t\tnameChoicePanel.setLayout(new BoxLayout(nameChoicePanel, BoxLayout.Y_AXIS));\n\t\tnameChoicePanel.setName(\"Panel\");\n\t\t\n\t\t// Add instructions for what to do:\n\t\tinstructionLabel = new JLabel(\"Enter your name here:\", JLabel.CENTER);\n\t\tinstructionLabel.setMinimumSize(new Dimension(0, 40));\n\t\tinstructionLabel.setPreferredSize(new Dimension(instructionLabel.getPreferredSize().width, 40));\n\t\tinstructionLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tnameChoicePanel.add(instructionLabel);\n\t\t\n\t\t// Add textfield for user's name\n\t\tnameField = new JTextField(10);\n\t\tnameField.setName(\"textField\");\n\t\tnameField.getDocument().addDocumentListener(this);\n\t\tnameField.setMinimumSize(new Dimension(nameField.getWidth(), 41));\n\t\tnameField.setMaximumSize(new Dimension(250, 41));\n\t\t\n\t\tnameChoicePanel.add(nameField);\n\t\t\n\t\t// Add button\n\t\ttimeToPick = new JButton(\"Pick your team\");\n\t\ttimeToPick.setName(\"Test\");\n\t\ttimeToPick.addActionListener(nameChoiceListener);\n\t\ttimeToPick.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\t\n\t\ttimeToPick.setEnabled(false);\n\t\tnameChoicePanel.add(timeToPick);\n\t\t\n\t\t// Add name choice panel dimensions\n\t\tadd(nameChoicePanel);\n\t\tadd(new Box.Filler(minSize, prefSize, null));\n\t\tnameChoicePanel.setMinimumSize(new Dimension(400,240));\n\t\tnameChoicePanel.setPreferredSize(new Dimension(400,240));\n\t}", "private void initUI() {\r\n\t\t//Äußeres Panel\r\n\t\tContainer pane = getContentPane();\r\n\t\tGroupLayout gl = new GroupLayout(pane);\r\n\t\tpane.setLayout(gl);\r\n\t\t//Abstende von den Containern und dem äußeren Rand\r\n\t\tgl.setAutoCreateContainerGaps(true);\r\n\t\tgl.setAutoCreateGaps(true);\r\n\t\t//TextFeld für die Ausgabe\r\n\t\tJTextField output = view.getTextField();\r\n\t\t//Die jeweiligen Panels für die jeweiigen Buttons\r\n\t\tJPanel brackets = view.getBracketPanel();\r\n\t\tJPanel remove = view.getTop2Panel();\r\n\t\tJPanel numbers = view.getNumbersPanel();\r\n\t\tJPanel last = view.getBottomPanel();\r\n\t\t//Anordnung der jeweiligen Panels durch den Layout Manager\r\n\t\tgl.setHorizontalGroup(gl.createParallelGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tgl.setVerticalGroup(gl.createSequentialGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tpack();\r\n\t\tsetTitle(\"Basic - Taschenrechner\");\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetResizable(false);\r\n\t}", "public void createAndShowGUI() {\n frame= new JFrame(\"TabAdmin\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setLocation(200,50);\n //Create and set up the content pane.\n \n addComponentToPane(frame.getContentPane());\n \n //Display the window.\n frame.pack();\n frame.setVisible(true);\n //create admin to operate \n \n }", "private void initUI()\r\n\t{\r\n\t\tthis.label = new Label();\r\n\t\t\r\n\t\tthis.label.setText(\"This view is also saveable\");\r\n\t\t\r\n\t\tthis.label.setSizeUndefined();\r\n\t\tthis.add(this.label);\r\n\t\tthis.setSizeFull();\r\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tLabel lblUsername = new Label(shell, SWT.NONE);\n\t\tlblUsername.setBounds(73, 30, 55, 15);\n\t\tlblUsername.setText(\"Username\");\n\t\t\n\t\tLabel lblPassword = new Label(shell, SWT.NONE);\n\t\tlblPassword.setText(\"Password\");\n\t\tlblPassword.setBounds(73, 78, 55, 15);\n\t\t\n\t\ttxtUsername = new Text(shell, SWT.BORDER);\n\t\ttxtUsername.setText(\"lisa\");\n\t\ttxtUsername.setBounds(139, 24, 209, 21);\n\t\t\n\t\ttxtPassword = new Text(shell, SWT.BORDER);\n\t\ttxtPassword.setText(\"password1\");\n\t\ttxtPassword.setBounds(139, 72, 209, 21);\n\t\t\n\t\tButton btnLogin = new Button(shell, SWT.NONE);\n\t\tbtnLogin.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnLogin.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseUp(MouseEvent e) {\n\t\t\t\tString usrname = txtUsername.getText();\n\t\t\t\tString usrpass = txtPassword.getText();\n\t\t\t\t\n\t\t\t\t// Call authenticate user credentials through authentication RMI server\n\t\t\t\tLoginInterface login;\n\t\t\t\ttry{\n\t\t\t\t\tlogin = (LoginInterface)Naming.lookup(\"rmi://localhost/login\");\n\t\t\t\t\t\n\t\t\t\t\tboolean authenticated = login.authenticate(usrname, usrpass);\n\t\t\t\t\tif(authenticated){\n\t\t\t\t\t\tSystem.out.println(\"User authenticated.\");\n\t\t\t\t\t\tclose();\n\n\t\t\t\t\t\tevaluator.EvaluatorClient.main(null);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tSystem.out.println(\"Username or password was incorrect. Please try again.\");\n\t\t\t\t\t\tlblMsgOut.setText(\"Username or password was incorrect. Please try again.\");\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}catch(Exception e2){\n\t\t\t\t\tSystem.out.println(\"LoginClient authentication exception: \" + e2);\n\t\t\t\t\tlblMsgOut.setText(\"LoginClient authentication exception: \" + e2);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLogin.setBounds(272, 118, 75, 25);\n\t\tbtnLogin.setText(\"Login\");\n\t\t\n\t\tlblMsgOut = new Label(shell, SWT.BORDER | SWT.WRAP);\n\t\tlblMsgOut.setBounds(10, 174, 414, 77);\n\t\tlblMsgOut.setText(\"Output:\");\n\n\t}", "private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"Gomaku - 5 In A Row\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setSize(600, 600);\n\n //Add the ubiquitous \"Hello World\" label.\n JPanel board = new JPanel();\n board.setSize(400, 400);\n board.set\n frame.getContentPane().add(board);\n\n //Display the window.\n frame.setVisible(true);\n }", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(656, 296);\n\n\t}", "private static void createAndShowGUI() {\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\n\n\t\tLevelEditor le = new LevelEditor();\n\t}", "public void createChooseGameUI()\n {\n \tHashMap<InventoryRunnable, InventoryItem> inventoryStuff = new HashMap<InventoryRunnable, InventoryItem>();\n \t\n \tInventoryRunnable gladiatorJoinRunnable = new GladiatorJoinInventoryRunnable(plugin);\n \t\n \tArrayList<String> gladiatorLore = new ArrayList<String>();\n \tgladiatorLore.add(\"FIGHT TO THE DEATH AND WIN YOUR FREEDOM\");\n \tgladiatorLore.add(\"GOOD LUCK WARRIOR!\");\n \tInventoryItem gladiatorItem = new InventoryItem(plugin, Material.SHIELD, \"GLADIATOR\", gladiatorLore, 1, true, 1);\n \tinventoryStuff.put(gladiatorJoinRunnable, gladiatorItem);\n \t\n \tchooseGameUI = new GUIInventory(plugin, \"MINIGAMES\", inventoryStuff, 3);\n }", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\tshell.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tfinal TabFolder tabFolder = new TabFolder(shell, SWT.NONE);\r\n\t\ttabFolder.setToolTipText(\"\");\r\n\t\t\r\n\t\tTabItem tabItem = new TabItem(tabFolder, SWT.NONE);\r\n\t\ttabItem.setText(\"欢迎使用\");\r\n\t\t\r\n\t\tTabItem tabItem_1 = new TabItem(tabFolder, SWT.NONE);\r\n\t\ttabItem_1.setText(\"员工查询\");\r\n\t\t\r\n\t\tMenu menu = new Menu(shell, SWT.BAR);\r\n\t\tshell.setMenuBar(menu);\r\n\t\t\r\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.NONE);\r\n\t\tmenuItem.setText(\"系统管理\");\r\n\t\t\r\n\t\tMenuItem menuItem_1 = new MenuItem(menu, SWT.CASCADE);\r\n\t\tmenuItem_1.setText(\"员工管理\");\r\n\t\t\r\n\t\tMenu menu_1 = new Menu(menuItem_1);\r\n\t\tmenuItem_1.setMenu(menu_1);\r\n\t\t\r\n\t\tMenuItem menuItem_2 = new MenuItem(menu_1, SWT.NONE);\r\n\t\tmenuItem_2.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tTabItem tbtmNewItem = new TabItem(tabFolder,SWT.NONE);\r\n\t\t\t\ttbtmNewItem.setText(\"员工查询\");\r\n\t\t\t\t//创建自定义组件\r\n\t\t\t\tEmpQueryCmp eqc = new EmpQueryCmp(tabFolder, SWT.NONE);\r\n\t\t\t\t//设置标签显示的自定义组件\r\n\t\t\t\ttbtmNewItem.setControl(eqc);\r\n\t\t\t\t\r\n\t\t\t\t//选中当前标签页\r\n\t\t\t\ttabFolder.setSelection(tbtmNewItem);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\tmenuItem_2.setText(\"员工查询\");\r\n\r\n\t}", "protected void createContents() {\n\t\tshell = new Shell(SWT.TITLE | SWT.CLOSE | SWT.BORDER);\n\t\tshell.setSize(713, 226);\n\t\tshell.setText(\"ALT Planner\");\n\t\t\n\t\tCalendarPop calendarComp = new CalendarPop(shell, SWT.NONE);\n\t\tcalendarComp.setBounds(5, 5, 139, 148);\n\t\t\n\t\tComposite composite = new PlannerInterface(shell, SWT.NONE, calendarComp);\n\t\tcomposite.setBounds(0, 0, 713, 200);\n\t\t\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\t\t\n\t\tMenuItem mntmFile = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmFile.setText(\"File\");\n\t\t\n\t\tMenu menu_1 = new Menu(mntmFile);\n\t\tmntmFile.setMenu(menu_1);\n\t\t\n\t\tMenuItem mntmSettings = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmSettings.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSettings settings = new Settings(Display.getDefault());\n\t\t\t\tsettings.open();\n\t\t\t}\n\t\t});\n\t\tmntmSettings.setText(\"Settings\");\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(764, 551);\n\t\tshell.setText(\"SWT Application\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\t\t\n\t\tMenuItem mntmFile = new MenuItem(menu, SWT.NONE);\n\t\tmntmFile.setText(\"File...\");\n\t\t\n\t\tMenuItem mntmEdit = new MenuItem(menu, SWT.NONE);\n\t\tmntmEdit.setText(\"Edit\");\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tcomposite.setLayoutData(BorderLayout.CENTER);\n\t\tcomposite.setLayout(null);\n\t\t\n\t\tGroup grpDirectorio = new Group(composite, SWT.NONE);\n\t\tgrpDirectorio.setText(\"Directorio\");\n\t\tgrpDirectorio.setBounds(10, 86, 261, 387);\n\t\t\n\t\tGroup grpListadoDeAccesos = new Group(composite, SWT.NONE);\n\t\tgrpListadoDeAccesos.setText(\"Listado de Accesos\");\n\t\tgrpListadoDeAccesos.setBounds(277, 86, 477, 387);\n\t\t\n\t\tLabel label = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t\tlabel.setBounds(10, 479, 744, 2);\n\t\t\n\t\tButton btnNewButton = new Button(composite, SWT.NONE);\n\t\tbtnNewButton.setBounds(638, 491, 94, 28);\n\t\tbtnNewButton.setText(\"New Button\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(composite, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(538, 491, 94, 28);\n\t\tbtnNewButton_1.setText(\"New Button\");\n\t\t\n\t\tToolBar toolBar = new ToolBar(composite, SWT.FLAT | SWT.RIGHT);\n\t\ttoolBar.setBounds(10, 10, 744, 20);\n\t\t\n\t\tToolItem tltmAccion = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmAccion.setText(\"Accion 1\");\n\t\t\n\t\tToolItem tltmAccion_1 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmAccion_1.setText(\"Accion 2\");\n\t\t\n\t\tToolItem tltmRadio = new ToolItem(toolBar, SWT.RADIO);\n\t\ttltmRadio.setText(\"Radio\");\n\t\t\n\t\tToolItem tltmItemDrop = new ToolItem(toolBar, SWT.DROP_DOWN);\n\t\ttltmItemDrop.setText(\"Item drop\");\n\t\t\n\t\tToolItem tltmCheckItem = new ToolItem(toolBar, SWT.CHECK);\n\t\ttltmCheckItem.setText(\"Check item\");\n\t\t\n\t\tCoolBar coolBar = new CoolBar(composite, SWT.FLAT);\n\t\tcoolBar.setBounds(10, 39, 744, 30);\n\t\t\n\t\tCoolItem coolItem_1 = new CoolItem(coolBar, SWT.NONE);\n\t\tcoolItem_1.setText(\"Accion 1\");\n\t\t\n\t\tCoolItem coolItem = new CoolItem(coolBar, SWT.NONE);\n\n\t}", "protected void createContents() {\n\t\tshlMenu = new Shell();\n\t\tshlMenu.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/File-delete-icon.png\"));\n\t\tshlMenu.setBackground(SWTResourceManager.getColor(255, 102, 0));\n\t\tshlMenu.setSize(899, 578);\n\t\tshlMenu.setText(\"MENU\");\n\t\t\n\t\tMenu menu = new Menu(shlMenu, SWT.BAR);\n\t\tshlMenu.setMenuBar(menu);\n\t\t\n\t\tMenuItem mnętmBookLists = new MenuItem(menu, SWT.NONE);\n\t\tmnętmBookLists.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booklist frame \n\t\t\t\tBookListFrame window = new BookListFrame();\n\t\t\t\twindow.open();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tmnętmBookLists.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Todo-List-icon.png\"));\n\t\tmnętmBookLists.setText(\"Book Lists\");\n\t\t\n\t\tMenuItem mnętmMemberList = new MenuItem(menu, SWT.NONE);\n\t\tmnętmMemberList.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call memberlistframe\n\t\t\t\tMemberListFrame window = new MemberListFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmnętmMemberList.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Misc-User-icon.png\"));\n\t\tmnętmMemberList.setText(\"Member List\");\n\t\t\n\t\tMenuItem mnętmNewItem = new MenuItem(menu, SWT.NONE);\n\t\tmnętmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call rent list\n\t\t\t\tRentListFrame rlf=new RentListFrame();\n\t\t\t\trlf.open();\n\t\t\t}\n\t\t});\n\t\tmnętmNewItem.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Time-And-Date-Calendar-icon.png\"));\n\t\tmnętmNewItem.setText(\"Rent List\");\n\t\t\n\t\tButton btnNewButton = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booksettingsframe\n\t\t\t\tBookSettingsFrame window = new BookSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Printing-Books-icon.png\"));\n\t\tbtnNewButton.setBounds(160, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call membersettingsframe\n\t\t\t\tMemberSettingsFrame window = new MemberSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_1.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Add-User-icon.png\"));\n\t\tbtnNewButton_1.setBounds(367, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_2 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tRentingFrame rf=new RentingFrame();\n\t\t\t\trf.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_2.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Statistics-icon.png\"));\n\t\tbtnNewButton_2.setBounds(567, 176, 114, 112);\n\n\t}", "protected void createContents() {\r\n\t\tsetText(Messages.getString(\"HMS.PatientManagementShell.title\"));\r\n\t\tsetSize(900, 700);\r\n\r\n\t}", "private void createUserInterface()\n {\n // get content pane for attaching GUI components\n Container contentPane = getContentPane();\n\n // enable explicit positioning of GUI components \n contentPane.setLayout( null );\n\n // set up itemsSoldJLabel\n itemsSoldJLabel = new JLabel();\n itemsSoldJLabel.setBounds( 20, 20, 130, 20 );\n itemsSoldJLabel.setText( \"Number of items sold:\" );\n contentPane.add( itemsSoldJLabel );\n\n // set up itemsSoldJTextField\n itemsSoldJTextField = new JTextField();\n itemsSoldJTextField.setBounds( 170, 20, 90, 20 );\n itemsSoldJTextField.setHorizontalAlignment( JTextField.RIGHT );\n contentPane.add( itemsSoldJTextField );\n\n // set up priceJLabel\n priceJLabel = new JLabel();\n priceJLabel.setBounds( 20, 55, 130, 20 );\n priceJLabel.setText( \"Price of items:\" );\n contentPane.add( priceJLabel );\n\n // set up priceJTextField\n priceJTextField = new JTextField();\n priceJTextField.setBounds( 170, 55, 90, 20 );\n priceJTextField.setHorizontalAlignment( JTextField.RIGHT );\n contentPane.add( priceJTextField );\n\n // set up grossSalesJLabel\n grossSalesJLabel = new JLabel();\n grossSalesJLabel.setBounds( 20, 90, 80, 20 );\n grossSalesJLabel.setText( \"Gross sales:\" );\n contentPane.add( grossSalesJLabel );\n\n // set up grossSalesJTextField\n grossSalesJTextField = new JTextField();\n grossSalesJTextField.setBounds( 170, 90, 90, 20 );\n grossSalesJTextField.setEditable( false );\n grossSalesJTextField.setHorizontalAlignment( \n JTextField.RIGHT );\n contentPane.add( grossSalesJTextField );\n\n // set up commissionJLabel\n commissionJLabel = new JLabel();\n commissionJLabel.setBounds( 20, 130, 110, 20 );\n commissionJLabel.setText( \"Commission (%):\" );\n contentPane.add( commissionJLabel );\n\n // set up commissionJSpinner\n commissionJSpinner = new JSpinner( \n new SpinnerNumberModel( 1, 1, 10, 1 ) );\n commissionJSpinner.setBounds( 170, 130, 90, 20 );\n contentPane.add( commissionJSpinner );\n commissionJSpinner.addChangeListener(\n\n new ChangeListener() // anonymous inner class\n {\n // event handler called when value in \n // commissionJSpinner changes\n public void stateChanged( ChangeEvent event )\n {\n \n }\n\n } // end anonymous inner class\n\n ); // end call to addChangeListener\n \n // set up earningsJLabel\n earningsJLabel = new JLabel();\n earningsJLabel.setBounds( 20, 170, 90, 20 );\n earningsJLabel.setText( \"Earnings:\" );\n contentPane.add( earningsJLabel );\n \n // set up earningsJTextField\n earningsJTextField = new JTextField();\n earningsJTextField.setBounds( 170, 170, 90, 20 );\n earningsJTextField.setEditable( false );\n earningsJTextField.setHorizontalAlignment( JTextField.RIGHT );\n contentPane.add( earningsJTextField );\n\n // set up calculateJButton\n calculateJButton = new JButton();\n calculateJButton.setBounds( 170, 205, 90, 25 );\n calculateJButton.setText( \"Calculate\" );\n contentPane.add( calculateJButton );\n calculateJButton.addActionListener(\n\n new ActionListener() // anonymous inner class\n {\n // event handler called when calculateJButton is pressed\n public void actionPerformed( ActionEvent event )\n {\n \n }\n\n } // end anonymous inner class\n\n ); // end call to addActionListener\n\n // set properties of application's window\n setTitle( \"Sales Commission Calculator\" ); // set window title\n setSize( 285, 285 ); // set window size\n setVisible( true ); // show window\n\n }", "public interface UserInterface {\n /**\n * Remove all objects from UserInterface.\n */\n void clear();\n\n /**\n * Add object to UserInterface.\n *\n * @param actor UI object to add.\n */\n void add(Actor actor);\n\n /**\n * Removes object from UserInterface.\n *\n * @param actor UI object to remove.\n */\n void remove(Actor actor);\n\n /**\n * Updates all UI Objects and renders stage.\n */\n void update();\n\n /**\n * Returns reference to the style store.\n *\n * @return UiStyle store\n */\n UiStyle getUiStyle();\n}", "public User_Interface() {\n initComponents();\n }", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(437, 529);\n\n\t}", "private void createContents() {\n\t\tshlEditionRussie = new Shell(getParent(), getStyle());\n\t\tshlEditionRussie.setSize(470, 262);\n\t\tshlEditionRussie.setText(\"Edition r\\u00E9ussie\");\n\t\t\n\t\tLabel lblLeFilm = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblLeFilm.setBounds(153, 68, 36, 15);\n\t\tlblLeFilm.setText(\"Le film\");\n\t\t\n\t\tLabel lblXx = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblXx.setBounds(195, 68, 21, 15);\n\t\tlblXx.setText(\"\" + getViewModel());\n\t\t\n\t\tLabel lblABient = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblABient.setText(\"a bien \\u00E9t\\u00E9 modifi\\u00E9\");\n\t\tlblABient.setBounds(222, 68, 100, 15);\n\t\t\n\t\tButton btnRevenirLa = new Button(shlEditionRussie, SWT.NONE);\n\t\tbtnRevenirLa.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tm_Infrastructure.runController(shlEditionRussie, ListMoviesController.class);\n\t\t\t}\n\t\t});\n\t\tbtnRevenirLa.setBounds(153, 105, 149, 25);\n\t\tbtnRevenirLa.setText(\"Revenir \\u00E0 la liste des films\");\n\n\t}", "public GuiController()\n {\n\n DefaultTerminalFactory terminalFactory = new DefaultTerminalFactory();\n PageStack = new ArrayDeque<>(); // Gives us a screen stack\n window = new BasicWindow(\"Just put anything, I don't even care\");\n try\n {\n screen = terminalFactory.createScreen(); //Populates screen\n screen.startScreen(); //Runs screen\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n textGUI = new MultiWindowTextGUI(screen);\n\n }", "private void createAndShowGUI (){\n\n JustawieniaPowitalne = new JUstawieniaPowitalne();\n }", "private void initializateGUI() {\n\t\t\n\t\t\n\t\tthis.menuBar = buildMenuBar();\n\t\t\n\t\tthis.toolBar = buildToolBar();\n\t\t\n\t\tthis.container = (JComponent) ContainerViewFactory.getInstance().getContainerView(null);\n\t\t\n\t\tthis.status = buildStatusBar();\n\t\t\n\t\tscrollPane = new JScrollPane();\n\t\tscrollPane.getViewport().add(this.container);\n\t\t\n\t\ttextResources.getString(\"application.title\").ifPresent(super::setTitle);\n\n\t\tif (this.menuBar != null) {\n\t\t\tsuper.setJMenuBar(this.menuBar);\n\t\t}\n\t\tsuper.setPreferredSize(MINIMUM_SIZE);\n\t\tsuper.setMinimumSize(MINIMUM_SIZE);\n\t\tsuper.setMaximumSize(new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));\n\n\t\tsuper.getRootPane().setPreferredSize(MINIMUM_SIZE);\n\t\tsuper.getRootPane().setMinimumSize(MINIMUM_SIZE);\t\t\n\t\tsuper.getRootPane().setMaximumSize(new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));\n\t\t\n\t\tsuper.setLayout(new BorderLayout());\n\t\t\n\t\tsuper.add(toolBar, BorderLayout.NORTH);\n\t\tsuper.add(scrollPane, BorderLayout.CENTER);\n\t\tsuper.add(status, BorderLayout.SOUTH);\n\t\t\n\t\tsuper.addWindowListener(new WindowAdapter() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void windowOpened(WindowEvent e) {\n\t\t\t\tinitializationDialog = buildInitializationAction();\n\t\t\t\tinitializationDialog.setVisible(true);\n\t\t\t\tinitializationDialog.toFront();\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tconfirmExitAction();\n\t\t\t}\n\t\t});\n\t\tthis.handlerInitializateGUI();\n\t}", "private void initUI() {\n\t\tfileInputPanel.setLayout(new GridBagLayout());\n\n\t\tGridBagConstraints gridBagConstraints = new GridBagConstraints();\n\t\tgridBagConstraints.insets = new Insets(10, 5, 10, 5);\n\t\tgridBagConstraints.anchor = GridBagConstraints.NORTH;\n\t\tgridBagConstraints.gridwidth = 2;\n\n\t\tJLabel title = new JLabel(\"Welcome to ANNie\");\n\t\ttitle.setFont(new Font(\"Serif\", Font.BOLD, 36));\n\n\t\tfileInputPanel.add(title, gridBagConstraints);\n\n\t\tgridBagConstraints.gridwidth = 1;\n\t\tgridBagConstraints.insets = new Insets(10, 5, 10, 5);\n\n\t\tfileInputPanel.setBorder(BorderFactory.createLineBorder(Color.black));\n\n\t\tcreateFileDropdownArea(gridBagConstraints);\n\t\tcreateLabelSelectArea(gridBagConstraints);\n\t\tcreateButtons(gridBagConstraints);\n\t}", "private static void createAndShowGUI() {\n\t\t/*\n //Create and set up the window.\n JFrame frame = new JFrame(\"HelloWorldSwing\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Add the ubiquitous \"Hello World\" label.\n JLabel label = new JLabel(\"Hello World\");\n frame.getContentPane().add(label);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n */\n\t\tfinal AC_GUI currentGUI = new AC_GUI();\n\t\t//currentGUI.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tcurrentGUI.setSize(900, 800);\n\t\t// make the frame full screen\n\t\t// currentGUI.setExtendedState(JFrame.MAXIMIZED_BOTH);\n }", "public UiFactoryImpl() {\n\t\tsuper();\n\t}", "private static void createAndShowGUI() {\n\t\tgui = new GUI();\n\t}", "public static ComponentUI createUI(JComponent x) {\n return new BasicMenuUI(); }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n editor = createEditor(project, document);\n splitter = new JBSplitter(0.4f);\n ((JBSplitter) splitter).setFirstComponent(editor.getComponent());\n// ((JBSplitter) splitter).setSecondComponent();\n }", "void createWindow();", "private void buildGUI() {\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(null);\n\t\tpanel.setBorder(LineBorder.createGrayLineBorder());\n\t\tadd(panel);\n\t\t\n\t\taddRootPaneListener();\n\t\taddLoginComp();\n\t\taddButtons();\n\t\taddTitle();\n\t}", "private static void createAndShowGUI() {\n\t\tJFrame window = MainWindow.newInstance();\n\t\t\n //Display the window.\n window.pack();\n window.setVisible(true);\n \n }", "protected void setupUI() {\n\t\t\n\t\tcontentPane = new JPanel();\n\t\tlayerLayout = new CardLayout();\n\t\tcontentPane.setLayout(layerLayout);\n\t\tControlAgendaViewPanel agendaViewPanel = new ControlAgendaViewPanel(layerLayout,contentPane);\n\t\tagendaPanelFactory = new AgendaPanelFactory();\n\t\tdayView = agendaPanelFactory.getAgendaView(ActiveView.DAY_VIEW);\n\t\tweekView = agendaPanelFactory.getAgendaView(ActiveView.WEEK_VIEW);\n\t\tmonthView = agendaPanelFactory.getAgendaView(ActiveView.MONTH_VIEW);\n\t\t\n\t\tcontentPane.add(dayView,ActiveView.DAY_VIEW.name());\n\t\tcontentPane.add(weekView,ActiveView.WEEK_VIEW.name());\n\t\tcontentPane.add(monthView,ActiveView.MONTH_VIEW.name());\n\t\n\t\tJSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,agendaViewPanel, contentPane);\n\t\tthis.setContentPane(splitPane);\n\t\t\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\t\n\t\t//MENU\n\t\tJMenu file, edit, help, view;\n\t\t\n\t\t//ITEM DE MENU\n\t\tJMenuItem load, quit, save;\n\t\tJMenuItem display, about;\n\t\tJMenuItem month, week, day;\n\t\t\n\t\t/* File Menu */\n\t\t/** EX4 : MENU : UTILISER L'AIDE FOURNIE DANS LE TP**/\n\t\t//Classe pour les listener des parties non implémentés\n\t\tclass MsgError implements ActionListener {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tJOptionPane.showMessageDialog(null, ApplicationSession.instance().getString(\"info\"), \"info\", JOptionPane.INFORMATION_MESSAGE, null);\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t//Menu File\t\n\t\tfile = new JMenu(ApplicationSession.instance().getString(\"file\"));\n\t\t\n\t\tmenuBar.add(file);\n\t\tfile.setMnemonic(KeyEvent.VK_A);\n\t\tfile.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(file);\n\t\t\n\n\t\t//a group of JMenuItems\n\t\tload = new JMenuItem(ApplicationSession.instance().getString(\"load\"),KeyEvent.VK_T);\n\t\tload.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tload.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(load);\n\t\tload.addActionListener(new MsgError());\n\t\t\n\t\tquit = new JMenuItem(ApplicationSession.instance().getString(\"quit\"),KeyEvent.VK_T);\n\t\tquit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tquit.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(quit);\n\t\t\n\t\t//LISTENER QUIT\n\t\tquit.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\t//message box yes/no pour le bouton quitter\n\t\t\t\tint dialogButton = JOptionPane.YES_NO_OPTION;\n\t\t\t\tint dialogResult = JOptionPane.showConfirmDialog (null, new String(ApplicationSession.instance().getString(\"quit?\")),\"Warning\",dialogButton);\n\t\t\t\tif(dialogResult == JOptionPane.YES_OPTION){\n\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tsave = new JMenuItem(new String(ApplicationSession.instance().getString(\"save\")),KeyEvent.VK_T);\n\t\tsave.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tsave.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tfile.add(save);\n\t\tsave.addActionListener(new MsgError());\n\t\t\n\t\t\n\t//Menu Edit \n\t\tedit = new JMenu(new String(ApplicationSession.instance().getString(\"edit\")));\n\t\t\n\t\tmenuBar.add(edit);\n\t\tedit.setMnemonic(KeyEvent.VK_A);\n\t\tedit.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\t\n\t\t//Sous menu View\n\t\t\n\t\tview = new JMenu(new String(ApplicationSession.instance().getString(\"view\")));\n\t\tview.setMnemonic(KeyEvent.VK_A);\n\t\tview.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tedit.add(view);\n\t\t\n\t\tmonth = new JMenuItem(new String(ApplicationSession.instance().getString(\"month\")),KeyEvent.VK_T);\n\t\tmonth.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tmonth.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(month);\n\t\t\t\t\n\t\tweek = new JMenuItem(new String(ApplicationSession.instance().getString(\"week\")),KeyEvent.VK_T);\n\t\tweek.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tweek.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(week);\n\t\t\n\t\tday = new JMenuItem(new String(ApplicationSession.instance().getString(\"day\")),KeyEvent.VK_T);\n\t\tday.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tday.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\tview.add(day);\n\t\t\n\t\t//LISTENER VIEW\n\t\t\n\t\t\n\t\tmonth.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tlayerLayout.last(contentPane);\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tweek.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlayerLayout.first(contentPane);\t\n\t\t\t\tlayerLayout.next(contentPane);\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t});\n\t\tday.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tlayerLayout.first(contentPane);\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\n\t//Menu Help\n\t\thelp = new JMenu(new String(ApplicationSession.instance().getString(\"help\")));\n\t\t\n\t\tmenuBar.add(help);\n\t\thelp.setMnemonic(KeyEvent.VK_A);\n\t\thelp.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(help);\n\t\t\n\t\tdisplay = new JMenuItem(new String(ApplicationSession.instance().getString(\"display\")),KeyEvent.VK_T);\n\t\tdisplay.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tdisplay.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\thelp.add(display);\n\t\tdisplay.addActionListener(new MsgError());\n\t\t\n\t\tabout = new JMenuItem(new String(ApplicationSession.instance().getString(\"about\")),KeyEvent.VK_T);\n\t\tabout.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tabout.getAccessibleContext().setAccessibleDescription(\"This doesn't really do anything\");\n\t\thelp.add(about);\n\t\tabout.addActionListener(new MsgError());\n\t\t\n\t\t\n\n\t\tthis.setJMenuBar(menuBar);\n\t\tthis.pack();\n\t\tlayerLayout.next(contentPane);\n\t}", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 395);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\t\r\n\t\tnachname = new Text(shell, SWT.BORDER);\r\n\t\tnachname.setBounds(32, 27, 76, 21);\r\n\t\t\r\n\t\tvorname = new Text(shell, SWT.BORDER);\r\n\t\tvorname.setBounds(32, 66, 76, 21);\r\n\t\t\r\n\t\tLabel lblNachname = new Label(shell, SWT.NONE);\r\n\t\tlblNachname.setBounds(135, 33, 55, 15);\r\n\t\tlblNachname.setText(\"Nachname\");\r\n\t\t\r\n\t\tLabel lblVorname = new Label(shell, SWT.NONE);\r\n\t\tlblVorname.setBounds(135, 66, 55, 15);\r\n\t\tlblVorname.setText(\"Vorname\");\r\n\t\t\r\n\t\tButton btnFgeListeHinzu = new Button(shell, SWT.NONE);\r\n\t\tbtnFgeListeHinzu.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\t//\r\n\t\t\t\tPerson p = new Person();\r\n\t\t\t\tp.setNachname(getNachname().getText());\r\n\t\t\t\tp.setVorname(getVorname().getText());\r\n\t\t\t\t//\r\n\t\t\t\tPerson.getPersonenListe().add(p);\r\n\t\t\t\tgetGuiListe().add(p.toString());\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnFgeListeHinzu.setBounds(43, 127, 147, 25);\r\n\t\tbtnFgeListeHinzu.setText(\"f\\u00FCge liste hinzu\");\r\n\t\t\r\n\t\tButton btnWriteJson = new Button(shell, SWT.NONE);\r\n\t\tbtnWriteJson.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tPerson.write2JSON();\r\n\t\t\t\t\t//\r\n\t\t\t\t\tMessageBox mb = new MessageBox(shell, SWT.ICON_INFORMATION | SWT.OK);\r\n\t\t\t\t\tmb.setText(\"JSON geschrieben\");\r\n\t\t\t\t\tmb.setMessage(Person.getPersonenListe().size() + \" Einträge erfolgreich geschrieben\");\r\n\t\t\t\t\tmb.open();\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\tMessageBox mb = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK);\r\n\t\t\t\t\tmb.setText(\"Fehler bei JSON\");\r\n\t\t\t\t\tmb.setMessage(e1.getMessage());\r\n\t\t\t\t\tmb.open();\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnWriteJson.setBounds(54, 171, 75, 25);\r\n\t\tbtnWriteJson.setText(\"write 2 json\");\r\n\t\t\r\n\t\tguiListe = new List(shell, SWT.BORDER);\r\n\t\tguiListe.setBounds(43, 221, 261, 125);\r\n\r\n\t}", "private void initGUI(User user) {\n\t\ttry {\n\t\t\tthis.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n\t\t\tthis.setTitle(\"Warehouse Application\");\n\t\t\tthis.setIconImage(new ImageIcon(getClass().getClassLoader().getResource(ApplicationConstants.WAREHOUSE_LOGO)).getImage());\n\t\t\tthis.setResizable(false);\n\t\t\tthis.setFocusTraversalKeysEnabled(false);\n\t\t\tthis.setLocation(new java.awt.Point(100, 100));\n\t\t\t{\n\t\t\t\tChangeScreen.setBlankScreen(user);\n\t\t\t}\n\t\t\t{\n\t\t\t\tmnuMain = new WarehouseMenuBar(user, this);\n\t\t\t\tsetJMenuBar(mnuMain);\n\t\t\t}\n\t\t\tpack();\n\t\t\tthis.setSize(809, 577);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public userGUI() throws Exception {\n setUpPanel();\n Screen.welcomeMessage(panel);\n buttonInit();\n cards();\n panel.add(functions);\n add(panel);\n }", "public static void main(String[] args) {\r\n UserInterface ui;\r\n try {\r\n ui = new UserInterface();\r\n \r\n ui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n ui.pack(); \r\n ui.setVisible(true); \r\n } catch(InterruptedException ex) {\r\n \r\n }\r\n\r\n }", "private void initUI() {\n\t\tthis.horizontalLayout = new XdevHorizontalLayout();\n\t\tthis.gridLayout = new XdevGridLayout();\n\t\tthis.button = new XdevButton();\n\t\tthis.button2 = new XdevButton();\n\t\tthis.label = new XdevLabel();\n\n\t\tthis.button.setCaption(\"go to HashdemoView\");\n\t\tthis.button2.setCaption(\"go to CommonView\");\n\t\tthis.label.setValue(\"Go into code tab to view comments\");\n\n\t\tthis.gridLayout.setColumns(2);\n\t\tthis.gridLayout.setRows(2);\n\t\tthis.button.setWidth(200, Unit.PIXELS);\n\t\tthis.button.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button, 0, 0);\n\t\tthis.button2.setWidth(200, Unit.PIXELS);\n\t\tthis.button2.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button2, 1, 0);\n\t\tthis.label.setWidth(100, Unit.PERCENTAGE);\n\t\tthis.label.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.label, 0, 1, 1, 1);\n\t\tthis.gridLayout.setComponentAlignment(this.label, Alignment.TOP_CENTER);\n\t\tthis.gridLayout.setSizeUndefined();\n\t\tthis.horizontalLayout.addComponent(this.gridLayout);\n\t\tthis.horizontalLayout.setComponentAlignment(this.gridLayout, Alignment.MIDDLE_CENTER);\n\t\tthis.horizontalLayout.setExpandRatio(this.gridLayout, 10.0F);\n\t\tthis.horizontalLayout.setSizeFull();\n\t\tthis.setContent(this.horizontalLayout);\n\t\tthis.setSizeFull();\n\n\t\tthis.button.addClickListener(event -> this.button_buttonClick(event));\n\t\tthis.button2.addClickListener(event -> this.button2_buttonClick(event));\n\t}", "public void createGui(){\n\t\twindow = this.getContentPane(); \n\t\twindow.setLayout(new FlowLayout());\n\n\t\t//\tAdd \"panel\" to be used for drawing \n\t\t_panel = new ResizableImagePanel();\n\t\tDimension d= new Dimension(1433,642);\n\t\t_panel.setPreferredSize(d);\t\t \n\t\twindow.add(_panel);\n\n\t\t// A menu-bar contains menus. A menu contains menu-items (or sub-Menu)\n\t\tJMenuBar menuBar; // the menu-bar\n\t\tJMenu menu; // each menu in the menu-bar\n\n\t\tmenuBar = new JMenuBar();\n\t\t// First Menu\n\t\tmenu = new JMenu(\"Menu\");\n\t\tmenu.setMnemonic(KeyEvent.VK_A); // alt short-cut key\n\t\tmenuBar.add(menu); // the menu-bar adds this menu\n\n\t\tmenuItem1 = new JMenuItem(\"Fruit\", KeyEvent.VK_F);\n\t\tmenu.add(menuItem1); // the menu adds this item\n\n\t\tmenuItem2 = new JMenuItem(\"Pacman\", KeyEvent.VK_S);\n\t\tmenu.add(menuItem2); // the menu adds this item\n\t\tmenuItem3 = new JMenuItem(\"Run\");\n\t\tmenu.add(menuItem3); // the menu adds this item \n\t\tmenuItem4 = new JMenuItem(\"Save Game\");\n\t\tmenu.add(menuItem4); // the menu adds this item\n\n\t\tmenuItem5 = new JMenuItem(\"Open Game\");\n\t\tmenu.add(menuItem5); // the menu adds this item\n\t\tmenuItem6 = new JMenuItem(\"Clear Game\");\n\t\tmenu.add(menuItem6); // the menu adds this item\n\t\tmenuItem1.addActionListener(this);\n\t\tmenuItem2.addActionListener(this);\n\t\tmenuItem3.addActionListener(this);\n\t\tmenuItem4.addActionListener(this);\n\t\tmenuItem5.addActionListener(this);\n\t\tmenuItem6.addActionListener(this);\n\n\t\tsetJMenuBar(menuBar); // \"this\" JFrame sets its menu-bar\n\t\t// panel (source) fires the MouseEvent.\n\t\t//\tpanel adds \"this\" object as a MouseEvent listener.\n\t\t_panel.addMouseListener(this);\n\t}", "private void createGUI() {\n ResizeGifPanel newContentPane = new ResizeGifPanel();\n newContentPane.setOpaque(true); \n setContentPane(newContentPane); \n }", "public UI() {\r\n\t\tsetPreferredSize(new Dimension(1100, 720));\r\n\t\tsetLayout(new BorderLayout());\r\n\t\tadd(chatPanel(), BorderLayout.CENTER);\r\n\t\tadd(serverPanel(), BorderLayout.EAST);\r\n\t\taddListeners();\r\n\t}", "private static void createAndShowGUI() {\r\n //Disable boldface controls.\r\n UIManager.put(\"swing.boldMetal\", Boolean.FALSE); \r\n\r\n //Create and set up the window.\r\n JFrame frame = new JFrame(\"Exertion Scripting\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n //Create and set up the content pane.\r\n NetletEditor newContentPane = new NetletEditor(null);\r\n newContentPane.setOpaque(true); //content panes must be opaque\r\n frame.setContentPane(newContentPane);\r\n\r\n //Display the window.\r\n frame.pack();\r\n frame.setVisible(true);\r\n }", "public BridgingUI() {\n initComponents();\n initUserActions();\n }", "private void openUserManagementWindow() {\r\n\t\tnew JFrameUser();\r\n\t}", "public void createAndShowGUI() {\n\t\tcontroller = new ControllerClass(); \r\n\r\n\t\t// Create and set up the window\r\n\t\twindowLookAndFeel();\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tsetTitle(\"Media Works - Add Screen\");\r\n\t\tsetResizable(false);\r\n\t\tadd(componentSetup());\r\n\t\tpack();\r\n\t\tsetSize(720,540);\r\n\t\tsetLocationRelativeTo(null);\r\n\t\tsetVisible(true);\r\n\t}", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "private void initUI() {\n\t\t//Creating the window for our game\n\t\tframe = new JFrame(GAME_TITLE);\n\t\tframe.setSize(BOARD_WIDTH, BOARD_HEIGHT);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setResizable(false);\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.setVisible(true);\n\t\t\n\t\t//Creating a canvas to add to the window\n\t\tcanvas = new Canvas();\n\t\tcanvas.setPreferredSize(new Dimension(BOARD_WIDTH, BOARD_HEIGHT));\n\t\tcanvas.setMaximumSize(new Dimension(BOARD_WIDTH, BOARD_HEIGHT));\n\t\tcanvas.setMinimumSize(new Dimension(BOARD_WIDTH, BOARD_HEIGHT));\n\t\t\n\t\tframe.add(canvas);\n\t\tframe.pack();\n\t\t\n\t}", "private void setupUI() {\r\n\t\tWindow.setTitle(\"Battle\");\r\n\r\n\t\tVerticalPanel panel = new VerticalPanel();\r\n\t\tpanel.addStyleName(NAME);\r\n\t\tinitWidget(panel);\r\n\t\t\r\n\t\tlabelTitle = new Label(\"Battle\");\r\n\t\tlabelTitle.addStyleName(Styles.page_title);\r\n\t\tpanel.add(labelTitle);\r\n\t\t\r\n\t\tLabel instructions = new Label(\"Click to go!\");\r\n\t\tpanel.add(instructions);\r\n\r\n\t\tHorizontalPanel hPanel = new HorizontalPanel();\r\n\t\tpanel.add(hPanel);\r\n\t\t\r\n\t\tCanvas canvas = Canvas.createIfSupported();\r\n\t\thPanel.add(canvas);\r\n\r\n\t\tVerticalPanel vPanelInfo = new VerticalPanel();\r\n\t\thPanel.add(vPanelInfo);\r\n\t\t\r\n\t\tlabelInfo = new Label();\r\n\t\tlabelInfo.addStyleName(Styles.battle_info);\r\n\t\tvPanelInfo.add(labelInfo);\r\n\t\t\r\n\t\tvPanelInfoHistory = new VerticalPanel();\r\n\t\tvPanelInfoHistory.addStyleName(Styles.battle_info_history);\r\n\t\tvPanelInfo.add(vPanelInfoHistory);\r\n\r\n\t\t\r\n\t\tcanvas.setWidth(width + \"px\");\r\n\t\tcanvas.setHeight(height + \"px\");\r\n\t\tcanvas.setCoordinateSpaceWidth(width);\r\n\t\tcanvas.setCoordinateSpaceHeight(height);\r\n\r\n\t\t//Adding handlers seems to create a performance issue in Java\r\n\t\t//mode, but likely not in javascript\r\n\t\tcanvas.addMouseDownHandler(this);\r\n//\t\tcanvas.addMouseUpHandler(this);\r\n//\t\tcanvas.addMouseMoveHandler(this);\r\n\r\n\t\tcontext2d = canvas.getContext2d();\r\n\r\n\t\tlastUpdate = System.currentTimeMillis();\r\n\t\ttimer = new Timer() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tlong now = System.currentTimeMillis();\r\n\t\t\t\tupdate(now - lastUpdate);\r\n\t\t\t\tlastUpdate = now;\r\n\r\n\t\t\t\tdraw();\r\n\t\t\t}\r\n\t\t};\r\n\t\ttimer.scheduleRepeating(1000 / 60);\r\n\t}", "private void initUI() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\trenderer = new LWJGLRenderer();\n\t\t\tgui = new GUI(stateWidget, renderer);\n\t\t\tthemeManager = ThemeManager.createThemeManager(StateWidget.class.getResource(\"gameui.xml\"), renderer);\n\t\t\tgui.applyTheme(themeManager);\n\t\t\t\n\t\t} catch (LWJGLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\r\n\tprotected void initUI() {\n\r\n\t}", "private void criaInterface() {\n\t\tColor azul = new Color(212, 212, 240);\n\n\t\tpainelMetadado.setLayout(null);\n\t\tpainelMetadado.setBackground(azul);\n\n\t\tmetadadoLabel = FactoryInterface.createJLabel(10, 3, 157, 30);\n\t\tpainelMetadado.add(metadadoLabel);\n\n\t\tbotaoAdicionar = FactoryInterface.createJButton(520, 3, 30, 30);\n\t\tbotaoAdicionar.setIcon(FactoryInterface.criarImageIcon(Imagem.ADICIONAR));\n\t\tbotaoAdicionar.setToolTipText(Sap.ADICIONAR.get(Sap.TERMO.get()));\n\t\tpainelMetadado.add(botaoAdicionar);\n\n\t\tbotaoEscolha = FactoryInterface.createJButton(560, 3, 30, 30);\n\t\tbotaoEscolha.setIcon(FactoryInterface.criarImageIcon(Imagem.VOLTAR_PRETO));\n\t\tbotaoEscolha.setToolTipText(Sap.ESCOLHER.get(Sap.TERMO.get()));\n\t\tbotaoEscolha.setEnabled(false);\n\t\tpainelMetadado.add(botaoEscolha);\n\n\t\talterarModo(false);\n\t\tatribuirAcoes();\n\t}", "private static void createGUI(){\r\n\t\tframe = new JFrame(\"Untitled\");\r\n\r\n\t\tBibtexImport bib = new BibtexImport();\r\n\t\tbib.setOpaque(true);\r\n\r\n\t\tframe.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\tframe.setContentPane(bib);\r\n\t\tframe.setJMenuBar(bib.menu);\r\n\t\tframe.pack();\r\n\t\tframe.setVisible(true);\r\n\t}", "private GUIMain() {\n\t}", "public mainUI() {\n initComponents();\n }", "private void registerUiNode() {\n }", "public LoginUI() {\n\t\tparentFrame = Main.getMainFrame();\n\t\tparentFrame.setVisible(true);\n\n\t\tsetLayout(new BorderLayout(5, 5));\n\t\tadd(initFields(), BorderLayout.NORTH);\n\t\tadd(initButtons(), BorderLayout.CENTER);\n\t}", "private void initGUI() {\n\t\tJPanel mainPanel = new JPanel(new BorderLayout());\n\t\t// This is the story we took from Wikipedia.\n\t\tString story = \"The Internet Foundation Classes (IFC) were a graphics \"\n\t\t\t\t+ \"library for Java originally developed by Netscape Communications \"\n\t\t\t\t+ \"Corporation and first released on December 16, 1996.\\n\\n\"\n\t\t\t\t+ \"On April 2, 1997, Sun Microsystems and Netscape Communications\"\n\t\t\t\t+ \" Corporation announced their intention to combine IFC with other\"\n\t\t\t\t+ \" technologies to form the Java Foundation Classes. In addition \"\n\t\t\t\t+ \"to the components originally provided by IFC, Swing introduced \"\n\t\t\t\t+ \"a mechanism that allowed the look and feel of every component \"\n\t\t\t\t+ \"in an application to be altered without making substantial \"\n\t\t\t\t+ \"changes to the application code. The introduction of support \"\n\t\t\t\t+ \"for a pluggable look and feel allowed Swing components to \"\n\t\t\t\t+ \"emulate the appearance of native components while still \"\n\t\t\t\t+ \"retaining the benefits of platform independence. This feature \"\n\t\t\t\t+ \"also makes it easy to have an individual application's appearance \"\n\t\t\t\t+ \"look very different from other native programs.\\n\\n\"\n\t\t\t\t+ \"Originally distributed as a separately downloadable library, \"\n\t\t\t\t+ \"Swing has been included as part of the Java Standard Edition \"\n\t\t\t\t+ \"since release 1.2. The Swing classes are contained in the \"\n\t\t\t\t+ \"javax.swing package hierarchy.\\n\\n\";\n\t\t// We create the TextArea and pass the story in as an argument.\n\t\tJTextArea storyArea = new JTextArea(story);\n\t\tstoryArea.setEditable(true);\n\t\tstoryArea.setWrapStyleWord(true);\n\t\t// We create the ScrollPane and instantiate it with the TextArea as an argument\n\t\tJScrollPane area = new JScrollPane(storyArea);\t\t\t\n\t\tmainPanel.add(area);\t\n\t\tthis.setContentPane(mainPanel);\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setSize(350, 300);\n\t\tthis.setVisible(true);\n\t}", "public void buildGui() {\n\t}", "public UserInterface() {\n initComponents();\n jPanel1.setVisible(true);\n jPanel4.setVisible(false);\n// jTable1.setVisible(false);\n }" ]
[ "0.71829444", "0.7132414", "0.712387", "0.6990913", "0.69422257", "0.6870739", "0.67819285", "0.6777238", "0.6760009", "0.675585", "0.6735661", "0.6706321", "0.6677355", "0.6670018", "0.6593893", "0.65625536", "0.65470654", "0.6542945", "0.6521631", "0.6495892", "0.64864635", "0.64778006", "0.64765257", "0.6473525", "0.6472717", "0.64654905", "0.64549875", "0.6448128", "0.6439904", "0.64363486", "0.6435272", "0.6434223", "0.64340633", "0.6428928", "0.64197075", "0.6416835", "0.640805", "0.64077294", "0.6404758", "0.63897973", "0.63897717", "0.6371464", "0.6366586", "0.6358493", "0.63571614", "0.63541794", "0.63487196", "0.6347613", "0.6337148", "0.63290143", "0.6323669", "0.6316226", "0.63154376", "0.6310541", "0.6307933", "0.6305921", "0.62971705", "0.62971705", "0.62971705", "0.62971705", "0.62971705", "0.62971705", "0.62971705", "0.62971705", "0.62971705", "0.62971705", "0.62971705", "0.62971705", "0.62971705", "0.62971705", "0.62971705", "0.62971705", "0.62971705", "0.62971705", "0.6290156", "0.6275837", "0.6271352", "0.62675214", "0.6254163", "0.6253293", "0.6246621", "0.62422764", "0.62410057", "0.62304676", "0.62259376", "0.6219297", "0.6216212", "0.6213918", "0.62084574", "0.62058765", "0.6196402", "0.6191591", "0.6189786", "0.6184263", "0.61745197", "0.6171011", "0.6167114", "0.6165485", "0.6162939", "0.6162829" ]
0.6498547
19
Set the visibility of the interface.
public void setVisible(boolean visible) { frame.setVisible(visible); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void setVisibility(long visibility) {\n throw new UnsupportedOperationException();\n }", "public void setVisibility(int value) {\n this.visibility = value;\n }", "public static void set_SetVisibility(aVisibility v) throws RuntimeException\n {\n UmlCom.send_cmd(CmdFamily.javaSettingsCmd, JavaSettingsCmd._setJavaSetVisibilityCmd,\n \t\t (byte) v.value());\n UmlCom.check();\n \n _set_visibility = v;\n }", "public void setVisibility(Enumerator newValue);", "public void setVisibility(Enumerator newValue);", "@Override\n\tpublic void setVisible(boolean visibility) {\n\t\t//do nothing\n\t}", "void setVisibility(Layer layer, boolean visibility);", "public static aVisibility setVisibility()\n {\n read_if_needed_();\n \n return _set_visibility;\n }", "@SuppressWarnings(\"unused\")\n void setVisible(boolean visible);", "public abstract void setVisible(boolean visible);", "@Override\n\tpublic void setVisibility(int visibility) {\n\t\tsuper.setVisibility(visibility);\n\t\tif(visibility==View.VISIBLE){\n\t\t\ttoggleOnAreaChange();\n\t\t}\n\t}", "public void setVisible(boolean val);", "public void setVisible(Boolean isVisible);", "@Override\n\tpublic void setVisible(boolean vis) {\n\t\t\n\t}", "@Override\n public void setVisible(boolean arg0)\n {\n \n }", "void setVisible(boolean visible);", "void setVisible(boolean visible);", "public void setVisible(boolean visible);", "public void setVisible(boolean v) {\n }", "public void setVisible( boolean v) {\r\n visible = v;\r\n }", "public void setVisible(Boolean visible);", "void setVisibility(ASTAccessSpecNode accessSpec)\n {\n if (accessSpec.isPublic())\n this.visibility = Visibility.PUBLIC;\n else if (accessSpec.isPrivate())\n this.visibility = Visibility.PRIVATE;\n }", "public boolean setVisible(boolean visible) {\n\t\tthrow new UnsupportedOperationException(\"readonly\");\n\t}", "public void setIsVisible(boolean isVisible);", "public void setVisible(boolean a){\n \t\tvisible = a;\n \t}", "@Override\n\tpublic void setVisible(boolean b) {\n\t\t\n\t}", "void setVisibleGlassPanel(Visibility visible);", "public void setVisible(boolean b) {\n\t\t\n\t}", "public void setVisible(boolean value) {\n\t\tvisible = value;\n\t}", "public void setIsVisible(java.lang.Boolean isVisible);", "public void setVisibility(int visibility)\n {\n for (Button b : this.buttons)\n {\n b.setVisibility(visibility);\n }\n }", "public void changeHasInvisibility()\r\n\t{\r\n\t\thasInvisibility = !hasInvisibility;\r\n\t}", "public void setVisible(boolean val)\r\n\t{\r\n\t\t_isOn = val;\r\n\t}", "public void setVisible(boolean visible)\n {\n this.visible = visible;\n }", "final void setVisible(boolean visible) {\n this.visible = visible;\n }", "public void setVisible(boolean value)\n\t{\n\t\tisVisible = value;\n\t\tif(!isVisible)\n\t\t{\n\t\t\tsetWorldRegion(null);\n\t\t}\n\t}", "public void setVisible(boolean visible){\r\n\t\tthis.visible = visible;\r\n\t}", "public void setInvisible ( boolean invisible ) {\n\t\texecute ( handle -> handle.setInvisible ( invisible ) );\n\t}", "public void setVisible(boolean visible) {\r\n this.visible = visible;\r\n }", "void setAccessible(boolean accessible);", "@Override\n public void setVisible (boolean f)\n { \n }", "public static void set_GetVisibility(aVisibility v) throws RuntimeException\n {\n UmlCom.send_cmd(CmdFamily.javaSettingsCmd, JavaSettingsCmd._setJavaGetvisibilityCmd,\n \t\t (byte) v.value());\n UmlCom.check();\n \n _get_visibility = v;\n \n }", "void\t\tsetCommandVisibility(String command, boolean flag);", "public void setVisible (boolean visible) {\n this.visible = visible;\n }", "public void setVisible(boolean visible) {\n internalGroup.setVisible(visible);\n dataTrait.visible = visible;\n }", "void setIsVisible(boolean visible) {\r\n this.isVisible = visible;\r\n this.getComponent().setVisible(isVisible);\r\n }", "private void setVis(boolean b) {\n this.setVisible(b);\n }", "@Override\n\t/**\n\t * sets the visibility modifiers for the specific class\n\t * \n\t * @param s \n\t */\n\tpublic void setVisability(String s) {\n\t\tvisability = s;\n\n\t}", "public void setVisible()\n\t{\n\t\tMainController.getInstance().setVisible(name, true);\n\t}", "public void setVisible()\r\n\t{\r\n\t\tthis.setVisible(true);\r\n\t}", "@Deprecated\n public void _internalSetVisibility(@Nullable String visibility) {\n this.visibility = visibility;\n }", "public void setVisible(boolean newVisible)\n {\n this.visible = newVisible;\n conditionallyRepaint();\n }", "public static void setVisibility(@CheckForNull Object o, int visibility) {\n if (o == null)\n return;\n if (o instanceof View)\n ((View) o).setVisibility(visibility);\n }", "public void setDisplayVisibility(boolean on) {\n if (settingVisibility) {\n return;\n }\n super.setDisplayVisibility(on);\n applyVisibilityFlags();\n }", "@Override\n public void setVisibility(int visibility) {\n // For some reason FrameView does not forward visiblity to it children. So we manually\n // override it to do so. That way when this view is invisible or gone we don't show an ad.\n int originalVisiblity = super.getVisibility();\n\n if (originalVisiblity != visibility) {\n synchronized (this) {\n // Forward the visibility event to all the children.\n int children = getChildCount();\n\n for (int i = 0; i < children; i++) {\n View child = getChildAt(i);\n child.setVisibility(visibility);\n }\n\n // Continue processing the event.\n super.setVisibility(visibility);\n\n // Get or remove ads depending on visiblity.\n if (visibility == View.VISIBLE) {\n requestFreshAd();\n } else {\n // Remove the old ad so we fade into the new one.\n removeView(ad);\n ad = null;\n invalidate();\n }\n }\n }\n }", "public void setVisible(boolean visible)\n\t{\n\t\tsuper.setVisible(visible);\n\t\trequestFocus();\n\t}", "@Override\n public void makeVisible() {\n throw new UnsupportedOperationException(\"operation not supported\");\n }", "public static void setVisible (boolean isVisible)\n\t{\n\t\tm_console.setVisible (isVisible);\n\t}", "public void setInterfaceResponsableVisible() {\n this.jDesktopPaneResponsable.setVisible(true);\n this.jLabelPositionResp.setText(Connexion.getProfilConnecte().getGrade());\n this.jDesktopPane1.setVisible(false);\n\n }", "void setOrientationVisibility(boolean visible) {\n if (!initialized){\n throw new IllegalStateException(\"Arrow wasn't initialized\");\n }\n\n if (visible){\n firstWing.setVisible(true);\n secondWing.setVisible(true);\n weightText.setVisible(true);\n }\n else {\n firstWing.setVisible(false);\n secondWing.setVisible(false);\n weightText.setVisible(false);\n }\n }", "public void setVisible(boolean newVal) {\n if (newVal != visible) {\n visible = newVal;\n listeners.firePropertyChange(PROPERTY_VISIBLE, !visible, visible);\n }\n }", "public void setVisible(boolean v) {\n\t\tif (v) {\n\t\t\trequestFocus();\n\t\t}\n\t\tsuper.setVisible(v);\n\t}", "@Override\n\tpublic void setVisible (boolean visible)\n\t{\n\t\tif (visible)\n\t\t{\n\t\t\t//this.updateLayerList();\n\t\t\t//this.updateConstrainedLayerList();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Update the amount of deformation.\n\t\t\tmCartogramWizard.setAmountOfDeformation(\n\t\t\t\tmDeformationSlider.getValue());\n\t\t\t\t\n\t\t}\n\t\t\n\t\tsuper.setVisible(visible);\n\t}", "public void setVisible(boolean is_visible){\n\t\tswingComponent.setVisible(is_visible);\n\t}", "public void setInterfaceDirigeantVisible() {\n this.jDesktopPaneDirigeant.setVisible(true);\n this.jLabelPositionDir.setText(Connexion.getProfilConnecte().getGrade());\n this.jDesktopPane1.setVisible(false);\n\n }", "public void setVisible(boolean visibile) {\n\t\tthis.visible = visibile;\n\t\tfor (GameObject gameObject : objects) {\n\t\t\tgameObject.setVisible(visibile);\n\t\t}\n\t}", "public void setVisible(boolean visible)\n\t{\n\t\tshaderMaterial.setUniform(\"AMBIENT\", \"isVisible\", new UniformBool(\n\t\t\t\tvisible));\n\t}", "private void setVisibilityRecyclerViewDebetableGoalsNow (String visibility) {\n\n if (recyclerViewDebetableGoalsNow != null) {\n\n switch (visibility) {\n\n case \"show\":\n recyclerViewDebetableGoalsNow.setVisibility(View.VISIBLE);\n break;\n case \"hide\":\n recyclerViewDebetableGoalsNow.setVisibility(View.GONE);\n break;\n }\n }\n }", "public void setInvisible(boolean b)\n\t{\n\t\t_invisible = b;\n\t}", "void setNameTagVisibility(NameTagVisibility nameTagVisibility);", "public void setGroupVisible(int group, boolean visible);", "public void setVisible(boolean visible)\n {\n frame.setVisible(visible);\n }", "public void setHidden(boolean hidden) {\n\tif (LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n\t LogWriter.logMessage(LogWriter.TRACE_DEBUG,\"setHidden() \" + hidden);\n Via via=(Via)sipHeader;\n if (hidden) {\n if ( ! this.hasParameter(Via.HIDDEN) ) \n via.setParameter(Via.HIDDEN,\"hidden\");\n }\n else via.removeParameter(Via.HIDDEN); \n }", "public void setSheetVisibility(int arg0, SheetVisibility arg1) {\n\n\t}", "void setVisivel(boolean visivel);", "public static native void _setVisible(Element elem, boolean visible) /*-{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telem.style.display = visible ? '' : 'none';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}-*/;", "public void mo3369k(int i) {\n this.f2802a.setVisibility(i);\n }", "@VisibleForTesting\n public void setAssistantVisible(boolean z) {\n updateBiometricListeningState();\n }", "public boolean isVisible(Visibility v);", "void onControlVisibilityChange(Object object, boolean visible);", "void setContentVisibilityStatus(Content content, ContentVisibilityStatus newVisibilityStatus);", "private boolean setVisible(boolean b) {\n\t\treturn b;\n\t}", "public void setVisible(boolean b) {\n // Not supported for MenuComponents\n }", "public void visibility(boolean state){ this.table.setVisible(state);}", "@Override\r\n\tpublic void setVisible(boolean visible) {\r\n\t\tsuper.setVisible(visible);\r\n\r\n\t\tif (visible) {\r\n\t\t\tupdateView();\r\n\r\n\t\t\tlogoffHandler.reset();\r\n\t\t\tif (TerminalConfig.isAutoLogoffEnable()) {\r\n\t\t\t\tautoLogoffTimer.start();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// ticketListUpdateTimer.stop();\r\n\t\t\tautoLogoffTimer.stop();\r\n\t\t}\r\n\t}", "public void setVisibleToUser(boolean visibleToUser) {\n/* 845 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private void setVisibility( int answer_visibility )\n {\n int yes_no_visibility = View.VISIBLE;\n\n if ( answer_visibility == View.VISIBLE )\n {\n yes_no_visibility = View.INVISIBLE;\n }\n\n TextView question = (TextView) findViewById( R.id.question );\n question.setVisibility( yes_no_visibility );\n\n ImageView butterfly_icon = (ImageView) findViewById( R.id.butterfly_icon );\n \n if ( yes_no_visibility == View.VISIBLE )\n {\n ((AnimationDrawable) butterfly_icon.getBackground()).start();\n }\n else\n {\n ((AnimationDrawable) butterfly_icon.getBackground()).stop();\n }\n\n butterfly_icon.setVisibility( yes_no_visibility );\n\n ImageView caterpillar_icon = (ImageView) findViewById( R.id.caterpillar_icon );\n \n if ( yes_no_visibility == View.VISIBLE )\n {\n caterpillar_icon.startAnimation( caterpillar_icon_animation );\n }\n else\n {\n caterpillar_icon_animation.cancel();\n caterpillar_icon.clearAnimation();\n }\n\n caterpillar_icon.setVisibility(yes_no_visibility);\n\n TextView answer = (TextView) findViewById( R.id.answer );\n answer.setVisibility(answer_visibility);\n\n ImageView answer_rectangle = (ImageView) findViewById( R.id.answer_rectangle );\n answer_rectangle.setVisibility(answer_visibility);\n }", "public interface GUIShell {\n public void setVisible(boolean visible);\n}", "public void setVisible(boolean visible) {\n window.setVisible(visible);\n }", "public interface VisibilityListener {\n void onVisibilityChanged(int i);\n}", "public interface C27129e {\n void onVisibilityChanged(boolean z);\n }", "public void setInfoVisible(boolean visible) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_info_propertyVisible\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_info_propertyVisible\", visible);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setInfoVisible(\" + visible + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "public void setInterface(boolean fInterface)\n {\n ensureLoaded();\n m_flags.setInterface(fInterface);\n setModified(true);\n }", "public void setVisible(boolean b) {\n\t\tframe.setVisible(b);\t\n\t}", "public static void toggleVisibility ()\n\t{\n\t\tboolean isVisible = m_console.isVisible ();\n\t\tm_console.setVisible (!isVisible);\n\t}", "private void setVisible(JLabel a, boolean b) {\n\t\ta.setVisible(b);\r\n\t}", "public void makeVisible() {\n if (isVisible()) {\n return;\n }\n pack();\n setVisible(true);\n }", "@Test\n public void testSetVisible() {\n writeBanner(getMethodName());\n }", "public void setVisible(boolean visible) {\n\t\t// when the visible becomes true to false, ExtraLife restarts.\n\t\tif(visible == false && this.visible == true) {\n\t\t\tif(restartTimer != null) {\n\t\t\t\trestartTimer.cancel();\n\t\t\t}\n\t\t\trestartTimer = new Timer();\n\t\t\trestartTimer(0);\n\t\t}\n\t\tthis.visible = visible;\n\t}", "private void m89647Ns(int i) {\n AppMethodBeat.m2504i(29822);\n C4990ab.m7417i(\"MicroMsg.LauncherUI.NewChattingTabUI\", \"[setLauncherContainerVisible] visible:%s\", Integer.valueOf(i));\n if (this.iWA == null) {\n C4990ab.m7412e(\"MicroMsg.LauncherUI.NewChattingTabUI\", \"[setLauncherContainerVisible] getActivity is null\");\n AppMethodBeat.m2505o(29822);\n return;\n }\n View findViewById = this.iWA.findViewById(2131820633);\n if (!(findViewById == null || findViewById.getVisibility() == i)) {\n findViewById.setVisibility(i);\n }\n AppMethodBeat.m2505o(29822);\n }" ]
[ "0.73048985", "0.7196782", "0.71788025", "0.7114884", "0.7114884", "0.7101406", "0.6948402", "0.69455975", "0.69233316", "0.6909892", "0.6908233", "0.6869102", "0.6842967", "0.6830484", "0.6818725", "0.67950886", "0.67950886", "0.6758479", "0.6749186", "0.67303383", "0.67155313", "0.67113566", "0.6591704", "0.6584185", "0.6544037", "0.6516143", "0.65092653", "0.64876896", "0.6485548", "0.6469849", "0.64659715", "0.6448687", "0.6424678", "0.6423219", "0.64097387", "0.64089763", "0.6380359", "0.6338795", "0.63385314", "0.6330082", "0.63071734", "0.6269966", "0.62691987", "0.62654704", "0.62507284", "0.6236776", "0.6236372", "0.6220986", "0.6170871", "0.61622244", "0.61517066", "0.61506927", "0.61285126", "0.6103323", "0.6093009", "0.6080826", "0.6076753", "0.6071253", "0.60683805", "0.6034687", "0.60337037", "0.60279566", "0.60118884", "0.5950819", "0.5929553", "0.5916731", "0.59165275", "0.59039575", "0.5900028", "0.58714306", "0.5864459", "0.58602446", "0.5848226", "0.58337027", "0.5831849", "0.5816488", "0.58138585", "0.58083594", "0.5807007", "0.5791594", "0.57897735", "0.5781585", "0.5780535", "0.57618374", "0.5747879", "0.57415175", "0.57259303", "0.571492", "0.57133967", "0.5706116", "0.5699285", "0.5690651", "0.5685569", "0.56808716", "0.56793755", "0.5678827", "0.5677777", "0.56710887", "0.56639713", "0.5662992" ]
0.5780537
82
Make the frame for the user interface.
private void makeFrame() { frame = new JFrame(calc.getTitle()); JPanel contentPane = (JPanel) frame.getContentPane(); contentPane.setLayout(new BorderLayout(8, 8)); contentPane.setBorder(new EmptyBorder(10, 10, 10, 10)); display = new JTextField(); display.setEditable(false); contentPane.add(display, BorderLayout.NORTH); JPanel buttonPanel = new JPanel(new GridLayout(6, 5)); addButton(buttonPanel, "A"); addButton(buttonPanel, "B"); addButton(buttonPanel, "C"); buttonPanel.add(new JLabel(" ")); JCheckBox check = new JCheckBox("HEX"); check.addActionListener(this); buttonPanel.add(check); addButton(buttonPanel, "D"); addButton(buttonPanel, "E"); addButton(buttonPanel, "F"); addButton(buttonPanel, "("); addButton(buttonPanel, ")"); addButton(buttonPanel, "7"); addButton(buttonPanel, "8"); addButton(buttonPanel, "9"); addButton(buttonPanel, "AC"); addButton(buttonPanel, "^"); addButton(buttonPanel, "4"); addButton(buttonPanel, "5"); addButton(buttonPanel, "6"); addButton(buttonPanel, "*"); addButton(buttonPanel, "/"); addButton(buttonPanel, "1"); addButton(buttonPanel, "2"); addButton(buttonPanel, "3"); addButton(buttonPanel, "+"); addButton(buttonPanel, "-"); buttonPanel.add(new JLabel(" ")); addButton(buttonPanel, "0"); buttonPanel.add(new JLabel(" ")); addButton(buttonPanel, "="); contentPane.add(buttonPanel, BorderLayout.CENTER); frame.pack(); hexToggle(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void makeFrame(){\n frame = new JFrame(\"Rebellion\");\n\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n frame.setSize(800,800);\n\n makeContent(frame);\n\n frame.setBackground(Color.getHSBColor(10,99,35));\n frame.pack();\n frame.setVisible(true);\n }", "public static void buildFrame() {\r\n\t\t// Make sure we have nice window decorations\r\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\r\n\t\t\r\n\t\t// Create and set up the window.\r\n\t\t//ParentFrame frame = new ParentFrame();\r\n\t\tMediator frame = new Mediator();\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t\t// Display the window\r\n\t\tframe.setVisible(true);\r\n\t}", "private void buildAndDisplayFrame() {\n\n\t\tframe.add(panelForIncomingCall, BorderLayout.NORTH);\n\t\tpanelForIncomingCall.add(welcomeThenDisplayCallInfo);\n\n\t\tframe.add(backgroundPanel, BorderLayout.CENTER);\n\t\tbackgroundPanel.add(userInstructions);\n\t\tbackgroundPanel.add(startButton);\n\t\tbackgroundPanel.add(declineDisplay);\n\n\t\tframe.add(acceptDeclineBlockBottomPanel, BorderLayout.SOUTH);\n\t\tacceptDeclineBlockBottomPanel.add(acceptButton);\n\t\tacceptDeclineBlockBottomPanel.add(declineButton);\n\t\tacceptDeclineBlockBottomPanel.add(blockButton);\n\n\t\tframe.setSize(650, 700); // sizes frame to whatever we want\n\t\tframe.setLocationRelativeTo(null); // puts at center of screen\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setVisible(true);\n\t}", "public frame() {\r\n\t\tadd(createMainPanel());\r\n\t\tsetTitle(\"Lunch Date\");\r\n\t\tsetSize(FRAME_WIDTH, FRAME_HEIGHT);\r\n\r\n\t}", "private void setupFrame()\n\t{\n\t\tthis.setContentPane(botPanel);\n\t\tthis.setSize(800,700);\n\t\tthis.setTitle(\"- Chatbot v.2.1 -\");\n\t\tthis.setResizable(true);\n\t\tthis.setVisible(true);\n\t}", "public void buildFrame();", "private void setupFrame()\n\t\t{\n\t\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\tthis.setResizable(false);\n\t\t\tthis.setSize(800, 600);\n\t\t\tthis.setTitle(\"SEKA Client\");\n\t\t\tthis.setContentPane(panel);\n\t\t\tthis.setVisible(true);\n\t\t}", "private void buildFrame() {\n String title = \"\";\n switch (formType) {\n case \"Add\":\n title = \"Add a new event\";\n break;\n case \"Edit\":\n title = \"Edit an existing event\";\n break;\n default:\n }\n frame.setTitle(title);\n frame.setResizable(false);\n frame.setPreferredSize(new Dimension(300, 350));\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n\n frame.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n // sets the main form to be visible if the event form was exited\n // and not completed.\n mainForm.getFrame().setEnabled(true);\n mainForm.getFrame().setVisible(true);\n }\n });\n }", "private void makeContent(JFrame frame){\n Container content = frame.getContentPane();\n content.setSize(700,700);\n\n makeButtons();\n makeRooms();\n makeLabels();\n\n content.add(inputPanel,BorderLayout.SOUTH);\n content.add(roomPanel, BorderLayout.CENTER);\n content.add(infoPanel, BorderLayout.EAST);\n\n }", "public static void createMainframe()\n\t{\n\t\t//Creates the frame\n\t\tJFrame foodFrame = new JFrame(\"USDA Food Database\");\n\t\t//Sets up the frame\n\t\tfoodFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfoodFrame.setSize(1000,750);\n\t\tfoodFrame.setResizable(false);\n\t\tfoodFrame.setIconImage(icon.getImage());\n\t\t\n\t\tGui gui = new Gui();\n\t\t\n\t\tgui.setOpaque(true);\n\t\tfoodFrame.setContentPane(gui);\n\t\t\n\t\tfoodFrame.setVisible(true);\n\t}", "Frame createFrame();", "private void buildFrame(){\n this.setVisible(true);\n this.getContentPane();\n this.setSize(backgrondP.getIconWidth(),backgrondP.getIconHeight());\n this.setDefaultCloseOperation(EXIT_ON_CLOSE);\t \n\t }", "private static void createAndShowGUI() {\n\n frame = new JFrame(messages.getString(\"towers.of.hanoi\"));\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n addComponentsToPane(frame.getContentPane());\n frame.pack();\n frame.setSize(800, 600);\n frame.setVisible(true);\n }", "private void makeGUI()\n {\n mainFrame = new JFrame();\n mainFrame.setPreferredSize(new Dimension(750,400));\n aw = new AccountWindow();\n mainFrame.add(aw);\n mainFrame.setVisible(true);\n mainFrame.pack();\n }", "static public void make() {\n\t\tif (window != null)\n\t\t\treturn;\n\n\t\twindow = new JFrame();\n\t\twindow.setTitle(\"Finecraft\");\n\t\twindow.setMinimumSize(new Dimension(500, 300));\n\t\twindow.setSize(asInteger(WINDOW_WIDTH), asInteger(WINDOW_HEIGHT));\n\t\twindow.setResizable(asBoolean(WINDOW_RESIZE));\n\t\twindow.setLocationRelativeTo(null);\n\t\twindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t}", "private void prepareFrame() {\n logger.debug(\"prepareFrame : enter\");\n\n // initialize the actions :\n registerActions();\n final Container container;\n\n if (Bootstrapper.isHeadless()) {\n container = null;\n } else {\n final JFrame frame = new JFrame(ApplicationDescription.getInstance().getProgramName());\n\n // handle frame icon\n final Image jmmcFavImage = ResourceImage.JMMC_FAVICON.icon().getImage();\n frame.setIconImage(jmmcFavImage);\n\n // get screen size to adjust minimum window size :\n final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n logger.info(\"screen size = {} x {}\", screenSize.getWidth(), screenSize.getHeight());\n // hack for screens smaller than 1024x768 screens:\n final int appWidth = 950;\n final int appHeightMin = (screenSize.getHeight() >= 850) ? 800 : 700;\n\n final Dimension dim = new Dimension(appWidth, appHeightMin);\n frame.setMinimumSize(dim);\n frame.addComponentListener(new ComponentResizeAdapter(dim));\n frame.setPreferredSize(INITIAL_DIMENSION);\n\n App.setFrame(frame);\n\n container = frame.getContentPane();\n }\n // init the main panel:\n createContent(container);\n\n StatusBar.show(\"application started.\");\n\n logger.debug(\"prepareFrame : exit\");\n }", "private static void createAndShowGUI()\r\n {\r\n JFrame frame = new JFrame(\"ChangingTitleFrame Application\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.getContentPane().add(new FramePanel(frame).getPanel());\r\n frame.pack();\r\n frame.setLocationRelativeTo(null);\r\n frame.setVisible(true);\r\n }", "private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"Firma digital\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.setLocationRelativeTo(null);\r\n\r\n //Create and set up the content pane.\r\n final FirmaDigital newContentPane = new FirmaDigital(frame);\r\n newContentPane.setOpaque(true); //content panes must be opaque\r\n frame.setContentPane(newContentPane);\r\n\r\n //Make sure the focus goes to the right component\r\n //whenever the frame is initially given the focus.\r\n frame.addWindowListener(new WindowAdapter() {\r\n public void windowActivated(WindowEvent e) {\r\n newContentPane.resetFocus();\r\n }\r\n });\r\n\r\n //Display the window.\r\n frame.pack();\r\n frame.setVisible(true);\r\n }", "private void customizeFrame(JFrame frame) {\r\n frame.setTitle(getTitle());\r\n frame.setResizable(false);\r\n frame.setPreferredSize(new Dimension(width + 15, height + 36));\r\n frame.setVisible(true);\r\n\r\n frame.setLayout(new BorderLayout());\r\n frame.add(panel, BorderLayout.CENTER);\r\n frame.setLocationRelativeTo(null);\r\n\r\n frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n frame.pack();\r\n }", "public void CreateTheFrame()\n {\n setSize(250, 300);\n setMaximumSize( new Dimension(250, 300) );\n setMinimumSize(new Dimension(250, 300));\n setResizable(false);\n\n pane = getContentPane();\n insets = pane.getInsets();\n\n // Apply the null layout\n pane.setLayout(null);\n }", "public void createAndShowGUI(JFrame frame) {\n providerSideBar(frame.getContentPane(), pat);\n topBarPatientInformation(frame.getContentPane(), pat);\n patientReferralPanel(frame.getContentPane());\n\n }", "private static void createAndShowGUI() {\n\t\t/*\n //Create and set up the window.\n JFrame frame = new JFrame(\"HelloWorldSwing\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Add the ubiquitous \"Hello World\" label.\n JLabel label = new JLabel(\"Hello World\");\n frame.getContentPane().add(label);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n */\n\t\tfinal AC_GUI currentGUI = new AC_GUI();\n\t\t//currentGUI.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tcurrentGUI.setSize(900, 800);\n\t\t// make the frame full screen\n\t\t// currentGUI.setExtendedState(JFrame.MAXIMIZED_BOTH);\n }", "private static void createAndShowGUI() {\r\n\t\t// Create and set up the window.\r\n\t\tframe = new JFrame(\"Captura 977R\");\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\t// Set up the content pane.\r\n\t\taddComponentsToPane(frame.getContentPane());\r\n\r\n\t\t// Display the window.\r\n\t\tframe.pack();\r\n\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\tDimension windowSize = frame.getSize();\r\n\r\n\t\tint windowX = Math.max(0, (screenSize.width - windowSize.width) / 2);\r\n\t\tint windowY = Math.max(0, (screenSize.height - windowSize.height) / 2);\r\n\r\n\t\tframe.setLocation(windowX, windowY); // Don't use \"f.\" inside\r\n\t\t// constructor.\r\n\t\tframe.setVisible(true);\r\n\t}", "public void initUI() {\n\t\tadd(board);\r\n\t\t//Set if frame is resizable by user\r\n\t\tsetResizable(false);\r\n\t\t//call pack method to fit the \r\n\t\t//preferred size and layout of subcomponents\r\n\t\t//***important head might not work correctly with collision of bottom and right borders\r\n\t\tpack();\r\n\t\t//set title for frame\r\n\t\tsetTitle(\"Snake\");\r\n\t\t//set location on screen(null centers it)\r\n\t\tsetLocationRelativeTo(null);\r\n\t\t//set default for close button of frame\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "public LoginFrame() {\n\t\tsetJFrame();\n\t\t\n\t\tbuildGUI();\n\t}", "private static void createAndShowGUI() {\n //Create and set up the window.\n JFrame frame = new JFrame(\"WAR OF MINE\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Create and set up the content pane.\n JComponent newContentPane = new Gameframe();\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.setSize(800,1000);\n frame.setVisible(true);\n }", "private void setFrame()\r\n\t{\r\n\t\tthis.setName(\"Project 3\");\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\tthis.setSize(300, 300);\r\n\t\tthis.setLocation(650, 100);\r\n\t\tthis.setVisible(false);\r\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tthis.add(panel, BorderLayout.CENTER);\r\n\t}", "private static void createGUI(){\r\n\t\tframe = new JFrame(\"Untitled\");\r\n\r\n\t\tBibtexImport bib = new BibtexImport();\r\n\t\tbib.setOpaque(true);\r\n\r\n\t\tframe.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\tframe.setContentPane(bib);\r\n\t\tframe.setJMenuBar(bib.menu);\r\n\t\tframe.pack();\r\n\t\tframe.setVisible(true);\r\n\t}", "public void launch() {\n m_frame.pack();\n m_frame.setVisible(true);\n }", "private static void createAndShowGUI() {\n Font f = new Font(\"微软雅黑\", 0, 12);\n String names[] = {\"Label\", \"CheckBox\", \"PopupMenu\", \"MenuItem\", \"CheckBoxMenuItem\",\n \"JRadioButtonMenuItem\", \"ComboBox\", \"Button\", \"Tree\", \"ScrollPane\",\n \"TabbedPane\", \"EditorPane\", \"TitledBorder\", \"Menu\", \"TextArea\",\n \"OptionPane\", \"MenuBar\", \"ToolBar\", \"ToggleButton\", \"ToolTip\",\n \"ProgressBar\", \"TableHeader\", \"Panel\", \"List\", \"ColorChooser\",\n \"PasswordField\", \"TextField\", \"Table\", \"Label\", \"Viewport\",\n \"RadioButtonMenuItem\", \"RadioButton\", \"DesktopPane\", \"InternalFrame\"\n };\n for (String item : names) {\n UIManager.put(item + \".font\", f);\n }\n //Create and set up the window.\n JFrame frame = new JFrame(\"AutoCapturePackagesTool\");\n\n String src = \"/optimizationprogram/GUICode/u5.png\";\n Image image = null;\n try {\n image = ImageIO.read(new CaptureGUI().getClass().getResource(src));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n frame.setIconImage(image);\n //frame.setIconImage(Toolkit.getDefaultToolkit().getImage(src));\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setResizable(false);\n frame.setLocation(Toolkit.getDefaultToolkit().getScreenSize().width / 2 - 520 / 2,\n Toolkit.getDefaultToolkit().getScreenSize().height / 2 - 420 / 2);\n frame.getContentPane().add(new CaptureGUI());\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }", "public void createAndShowGUI(){\r\n\t\t//You want the jframe to close everything when it is closed\r\n\t\tjframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\tif(maximized){\r\n\t\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\t\tsWidth = (int)screenSize.getWidth();\r\n\t\t\tsHeight = (int)screenSize.getHeight();\r\n\t\t\tjframe.setSize(sWidth, sHeight);\r\n\t\t\tjframe.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\t\tjframe.setUndecorated(true);\r\n\t\t\tjframe.setResizable(true);\r\n\t\t\tjframe.setVisible(true);\r\n\t\t\tcWidth = sWidth;\r\n\t\t\tcHeight = sHeight;\r\n\t\t}else{\r\n\t\t\tjframe.setResizable(false);\r\n\t\t\t//Makes the jframe visible\r\n\t\t\tjframe.setVisible(true);\r\n\t\t\t//Sets the size of the jframe\r\n\t\t\tjframe.setSize(sWidth, sHeight);\r\n\t\t\t\r\n\t\t\t//I have no fucking idea why it needs this but it does\r\n\t\t\ttry{\r\n\t\t\t\tThread.sleep(100);\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Set the content width\r\n\t\t\tcWidth = jframe.getContentPane().getWidth();\r\n\t\t\t//Set the content height\r\n\t\t\tcHeight = jframe.getContentPane().getHeight();\r\n\t\t}\r\n\r\n\t\t//Set up the game menu\r\n\t\tGameMenu gmenu = new GameMenu((Graphics2D)(jframe.getContentPane().getGraphics()),cWidth,cHeight, new Input(jframe));\r\n\t\t//Draw the main menu\r\n\t\tgmenu.drawMainMenu();\r\n\t}", "@Override\n public void run() {\n JFrame frame = new JFrame(\"Survey\");\n frame.setPreferredSize(new Dimension(300, 400));\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n createComponents(frame.getContentPane());\n frame.pack();\n frame.setVisible(true);\n }", "private void setFrame() {\r\n this.getContentPane().setLayout(null);\r\n this.addWindowListener(new WindowAdapter() {\r\n public void windowClosing(WindowEvent evt) {\r\n close();\r\n }\r\n });\r\n MainClass.frameTool.startup(this, FORM_TITLE, FORM_WIDTH, FORM_HEIGHT, \r\n false, true, false, false, FORM_BACKGROUND_COLOR,\r\n SNAKE_ICON);\r\n }", "private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"Gomaku - 5 In A Row\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setSize(600, 600);\n\n //Add the ubiquitous \"Hello World\" label.\n JPanel board = new JPanel();\n board.setSize(400, 400);\n board.set\n frame.getContentPane().add(board);\n\n //Display the window.\n frame.setVisible(true);\n }", "private static void createAndShowGUI() {\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\n\n\t\t//Create and set up the window.\n\t\tJFrame frame = new JFrame();\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setSize(500, 500);\n\t\tframe.setLocationRelativeTo(null);\n\n\t\tResultLeftView view = new ResultLeftView();\n\t\tframe.setContentPane(view);\n\t\t//Display the window.\n\t\tframe.setVisible(true);\n\t}", "public launchFrame() {\n \n initComponents();\n \n }", "private void createUI() {\n\t\tthis.rootPane = new TetrisRootPane(true);\n\t\tthis.controller = new TetrisController(this, rootPane, getWorkingDirectory());\n\t\tthis.listener = new TetrisActionListener(controller, this, rootPane);\n\t\t\n\t\trootPane.setActionListener(listener);\n\t\trootPane.setGameComponents(controller.getGameComponent(), controller.getPreviewComponent());\n\t\trootPane.initialize();\n\t\t\n\t\tPanelBorder border = controller.getPlayer().getPanel().getPanelBorder(\"Tetris v\" + controller.getVersion());\n\t\tborder.setRoundedCorners(true);\n\t\tJPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));\n\t\tpanel.setBackground(getBackgroundColor(border.getLineColor()));\n\t\tpanel.setBorder(border);\n\t\tpanel.setPreferredSize(new Dimension(564, 551));\n\t\tpanel.add(rootPane);\n\t\trootPane.addPanelBorder(border, panel);\n\t\t\n\t\tthis.setContentPane(panel);\n\t\tthis.setSize(564, 550);\n\t\t\n\t\tcontroller.initializeUI();\n\t}", "public HomeFrame() {\n super();\n\n this.setSize(400, 80);\n Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation(dim.width/2-this.getSize().width/2, dim.height/2-this.getSize().height/2);\n this.setTitle(\"Reed-Muller code sending simulator\");\n JPanel panel = new JPanel();\n\n JButton sendVector = new JButton();\n sendVector.setText(\"Vector\");\n sendVector.addActionListener(e -> new VectorFrame());\n\n JButton sendText = new JButton();\n sendText.setText(\"Text\");\n sendText.addActionListener(e -> new TextFrame());\n\n panel.add(sendVector);\n panel.add(sendText);\n\n panel.setVisible(true);\n this.add(panel);\n this.setVisible(true);\n }", "public void createAndShowGUI() {\n JFrame frame = new JFrame();\n frame.setSize(500, 500);\n frame.setTitle(\"Face Viewer\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); \n FaceComponent component = new FaceComponent();\n frame.add(component);\n frame.setVisible(true);\n }", "private static void createAndShowGUI() {\n //Create and set up the window.\n //JFrame frame = new JFrame(\"Basics of Color\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n \n //Add content to the window.\n frame.add(new ColorBasics(), BorderLayout.CENTER);\n Menu menu = new Menu();\n frame.setJMenuBar(menu.createMenuBar());\n \n //Display the window.\n frame.pack();\n frame.setVisible(true);\n frame.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n }", "private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"FEEx v. \"+VERSION);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n \n //Create and set up the content pane.\n Main p = new Main();\n p.addComponentToPane(frame.getContentPane());\n\n frame.addWindowListener(new java.awt.event.WindowAdapter() {\n @Override\n public void windowClosing(java.awt.event.WindowEvent windowEvent) {\n \tstopPolling();\n \tstopMPP();\n p.port.close();\n Utils.storeSizeAndPosition(frame);\n }\n });\n \n //Display the window.\n frame.pack();\n Utils.restoreSizeAndPosition(frame);\n frame.setVisible(true);\n }", "public void createAndShowGUI() {\n\n setTitle(title);\n // Sets what to do when frame closes\n setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n setIconImage(new ImageIcon(ClassLoader.getSystemResource(ICON_PATH)).getImage());\n\n //shows the frame\n pack();\n setLocationRelativeTo(null); //centers frame\n setVisible(true);\n }", "public MyFrame() {\n\t\tinitializeGui();\n\t\taddMouseListener(this);\n\t\taddComponentListener(this);\n\t}", "private void initUI() {\n\t\t//Creating the window for our game\n\t\tframe = new JFrame(GAME_TITLE);\n\t\tframe.setSize(BOARD_WIDTH, BOARD_HEIGHT);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setResizable(false);\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.setVisible(true);\n\t\t\n\t\t//Creating a canvas to add to the window\n\t\tcanvas = new Canvas();\n\t\tcanvas.setPreferredSize(new Dimension(BOARD_WIDTH, BOARD_HEIGHT));\n\t\tcanvas.setMaximumSize(new Dimension(BOARD_WIDTH, BOARD_HEIGHT));\n\t\tcanvas.setMinimumSize(new Dimension(BOARD_WIDTH, BOARD_HEIGHT));\n\t\t\n\t\tframe.add(canvas);\n\t\tframe.pack();\n\t\t\n\t}", "public void initializePanelToFrame() {\n\t\tnew ColorResources();\n\t\tnew TextResources().changeLanguage();\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(null);\n\t\tpanel.setPreferredSize(new Dimension(375, 812));\n\n\t\tconfigureLabels();\n\t\tconfigureButtons();\n\t\taddListeners();\n\t\taddComponentsToPanel();\n\n\t\tthis.setContentPane(panel);\n\t\tthis.pack();\n\t}", "private void createAndShowGUI()\r\n {\r\n //Create and set up the window.\r\n frame = new JFrame();\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.getContentPane().add(this);\r\n frame.addKeyListener(this);\r\n\r\n //Display the window.\r\n this.setPreferredSize(new Dimension(\r\n BLOCKSIZE * ( board.getNumCols() + 3 + nextUp.getNumCols() ),\r\n BLOCKSIZE * ( board.getNumRows() + 2 )\r\n ));\r\n\r\n frame.pack();\r\n frame.setVisible(true);\r\n }", "private static void createAndShowGUI() {\n JFrame.setDefaultLookAndFeelDecorated(true);\r\n\r\n //Create and set up the window.\r\n frame = new JFrame(\"ATC simulator\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n atcscreen = new AtcScreen();\r\n atcscreen.setOpaque(true);\r\n frame.setContentPane(atcscreen);\r\n \r\n //Display the window.\r\n frame.setSize(1000,1000);\r\n //atcscreen.setSize(300,300);\r\n //frame.pack();\r\n frame.setVisible(true);\r\n }", "@Override\n\tpublic void create() {\n\t\twithdrawFrame = new JFrame();\n\t\tthis.constructContent();\n\t\twithdrawFrame.setSize(800,500);\n\t\twithdrawFrame.show();\n\t\twithdrawFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t}", "public void buildEditFrame() {\n\n\tframe.addWindowListener(new WindowAdapter() {\n\t public void windowClosing(WindowEvent e) {\n\t\t//System.exit(0);\n\t }\n\t});\n\n\t// show the frame\n frame.setSize(Width, Height);\n\tframe.setLocation(screenSize.width/2 - Width/2,\n\t\t\t screenSize.height/2 - Height/2);\n\tframe.getContentPane().setLayout(new BorderLayout());\n\tframe.getContentPane().add(jp, BorderLayout.CENTER);\n\n\tframe.pack();\n//\t((CDFEdit)getFrame()).getDialog().setVisible(false);\n\tframe.setVisible(true);\n\n\t// Deprecated API - jp.requestDefaultFocus(); \n\tjp.requestFocus();\n\tframe.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\n }", "private static void createAndShowGUI() {\r\n JFrame.setDefaultLookAndFeelDecorated(true);\r\n\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.setLayout(new BorderLayout());\r\n\r\n JPanel parametersPanel = new JPanel();\r\n parametersPanel.setPreferredSize(new Dimension(preferredWidth, 50));\r\n \r\n addComponentsToPane(parametersPanel);\r\n \r\n frame.add(parametersPanel, BorderLayout.PAGE_START);\r\n \r\n schedulePanel.add(monLabel);\r\n schedulePanel.add(tueLabel);\r\n schedulePanel.add(wedLabel);\r\n schedulePanel.add(thuLabel);\r\n schedulePanel.add(friLabel);\r\n schedulePanel.setPreferredSize(new Dimension(preferredWidth, 500));\r\n JScrollPane scrollPane = new JScrollPane();\r\n scrollPane.setViewportView(schedulePanel);\r\n JPanel bigPanel = new JPanel(); \r\n bigPanel.setLayout(new BorderLayout());\r\n bigPanel.setPreferredSize(schedulePanel.getPreferredSize());\r\n bigPanel.add(scrollPane, BorderLayout.CENTER);\r\n frame.add(bigPanel, BorderLayout.CENTER);\r\n\r\n frame.setJMenuBar(createMenu());\r\n \r\n frame.pack();\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n \r\n frame.setVisible(true);\r\n frame.setResizable(false);\r\n }", "public void createAndShowGUI() {\n JFrame.setDefaultLookAndFeelDecorated(true);\n\n //Create and set up the window.\n\tif(open==0)\n\t\tframe = new JFrame(\"Open a file\");\n\telse if(open ==1)\n\t\tframe = new JFrame(\"Save file as\");\n //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Create and set up the content pane.\n JComponent newContentPane =this ;\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n // frame.setSize(500,500);\n//\tvalidate();\n }", "public static void createStartingFrame() {\n\t\ttry {\n\t\t\tUIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tapp_frame = new JFrame();\n\t\tapp_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tapp_frame.setSize(500, 90);\n\t\tapp_frame.setLocationRelativeTo(null);\n\t\tapp_frame.setTitle(\"Welcome!\");\n\n\t\tJPanel encompassing_panel = new JPanel();\n\t\tencompassing_panel.setBackground(new Color(24, 110, 155));\n\t\tapp_frame.setContentPane(encompassing_panel);\n\t\tencompassing_panel.setLayout(new BoxLayout(encompassing_panel, BoxLayout.Y_AXIS));\n\n\t\tJPanel field_panel = new JPanel();\n\t\tfield_panel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\n\t\tfield_panel.setBackground(new Color(24, 110, 155));\n\n\t\tJLabel username_label = new JLabel(\"Choose your username:\", SwingConstants.CENTER);\n\t\tusername_label.setFont(new Font(\"Lucida Sans Unicode\", Font.BOLD, 15));\n\t\tusername_label.setForeground(Color.white);\n\n\t\tJTextField username_textfield = new JTextField();\n\t\tusername_textfield.setColumns(12);\n\t\tusername_textfield.setPreferredSize(new Dimension(0, 25));\n\n\t\tJButton accept_button = new JButton(\"Accept\");\n\t\taccept_button.setPreferredSize(new Dimension(150, 25));\n\t\taccept_button.setBackground(new Color(196, 236, 237));\n\t\taccept_button.setOpaque(true);\n\t\taccept_button.setAlignmentX(Component.CENTER_ALIGNMENT);\n\n\t\tfield_panel.add(username_label);\n\t\tfield_panel.add(username_textfield);\n\t\tencompassing_panel.add(field_panel);\n\t\tencompassing_panel.add(Box.createRigidArea(new Dimension(0, 5)));\n\t\tencompassing_panel.add(accept_button);\n\t\tencompassing_panel.add(Box.createRigidArea(new Dimension(0, 5)));\n\t\tapp_frame.setContentPane(encompassing_panel);\n\t\tapp_frame.setVisible(true);\n\t\t\n\t\taccept_button.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(username_textfield.getText().isEmpty()) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ERROR: Please enter a username!\",\n\t\t\t\t\t\t\t\"User Initialization Error\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t} else {\n\t\t\t\t\tStockGUI game_frame = new StockGUI();\n\t\t\t\t\tapp_frame.getContentPane().removeAll();\n\t\t\t\t\tapp_frame.setContentPane(game_frame);\n\t\t\t\t\tapp_frame.revalidate();\n\t\t\t\t\tapp_frame.pack();\n\t\t\t\t\tapp_frame.setLocationRelativeTo(null);\n\t\t\t\t\tapp_frame.setSize(new Dimension(1225, 715));\n\t\t\t\t\tnewuser_obj.setUserName(username_textfield.getText());\n\t\t\t\t\t\n\t\t\t\t\tThread t = new Thread(new Runnable() {\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tSocketUtilities su = new SocketUtilities();\n\t\t\t\t\t\t\t\tif (su.socketConnect() == true) {\n\t\t\t\t\t\t\t\t\tuser_key = createUserKey(newuser_obj);\n\t\t\t\t\t\t\t\t\tSGUserKO userKO = new SGUserKO(user_key, newuser_obj);\n\t\t\t\t\t\t\t\t\tsu.sendUserKO(userKO);\n\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ERROR: Connection to Socket Server is down!\",\n\t\t\t\t\t\t\t\t\t\t\t\"Socket Server Error\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tt.start();\n\t\t\t\t\t\n\t\t\t\t\tapp_frame.setTitle(\"Stock Market Game: Welcome \" + newuser_obj.getUserName() + \"!\");\n\t\t\t\t\tapp_frame.setVisible(true);\n\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void run() {\n\t\t\t\tLayoutFrame frame = new LayoutFrame();\n\t\t\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\tframe.setVisible(true);\n\t\t\t}", "private void createAndShowGUI() {\n setSize(300, 200);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n addContent(getContentPane());\n\n //pack();\n setVisible(true);\n }", "private void buildFrame() {\n mainFrame = new JFrame();\n header = new JLabel(\"View Contact Information\");\n header.setHorizontalAlignment(JLabel.CENTER);\n header.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));\n \n infoTable.setFillsViewportHeight(true);\n infoTable.setShowGrid(true);\n infoTable.setVisible(true);\n scrollPane = new JScrollPane(infoTable);\n\n mainFrame.add(header, BorderLayout.NORTH);\n mainFrame.add(scrollPane, BorderLayout.CENTER);\n }", "FRAME createFRAME();", "private void setupFrame() {\n this.setTitle(TITRE);\n this.setPreferredSize(new Dimension(TAILLE_FRAME[1], TAILLE_FRAME[0]));\n this.setResizable(false);\n \n this.getContentPane().setBackground(new Color(0,153,0));\n this.getContentPane().setLayout(new GridLayout(3,1)); \n \n this.pack();\n Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation(dim.width/2-this.getSize().width/2, dim.height/2-this.getSize().height/2);\n \n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setVisible(true);\n }", "private void initializeFrame() {\n add(container);\n setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n pack();\n }", "private void createGUI() {\n ResizeGifPanel newContentPane = new ResizeGifPanel();\n newContentPane.setOpaque(true); \n setContentPane(newContentPane); \n }", "public void launchFrame() {\n\t\tf.getContentPane().add(sbrText);\n\t\tf.getContentPane().add(btnQuit);\n\n\t\t// Close when the close button is clicked\n\t\tf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\t// Display Frame\n\t\tf.pack(); // Adjusts frame to size of components\n\t\tf.setVisible(true);\n\t}", "public void createAndShowGUI() {\n\t\tcontroller = new ControllerClass(); \r\n\r\n\t\t// Create and set up the window\r\n\t\twindowLookAndFeel();\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tsetTitle(\"Media Works - Add Screen\");\r\n\t\tsetResizable(false);\r\n\t\tadd(componentSetup());\r\n\t\tpack();\r\n\t\tsetSize(720,540);\r\n\t\tsetLocationRelativeTo(null);\r\n\t\tsetVisible(true);\r\n\t}", "private static void createAndShowGUI() {\n\t\tJFrame window = MainWindow.newInstance();\n\t\t\n //Display the window.\n window.pack();\n window.setVisible(true);\n \n }", "public DashboardFrame() {\n WebLookAndFeel.install ();\n Controller = new Controller();\n initComponents();\n }", "public UserInterface(CalcEngine engine) {\n\t\tcalc = engine;\n\t\tmakeFrame();\n\t\tframe.setVisible(true);\n\t}", "private JFrame createFrame() {\n\t\tJFrame frmProfessorgui = new JFrame();\n\t\tfrmProfessorgui.getContentPane().setBackground(new Color(153, 204, 204));\n\t\tfrmProfessorgui.getContentPane().setForeground(SystemColor.desktop);\n\t\tfrmProfessorgui.setTitle(\"ProfessorGUI\");\n\t\tfrmProfessorgui.setBounds(100, 100, 600, 475);\n\t\tfrmProfessorgui.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tfrmProfessorgui.getContentPane().setLayout(null);\n\n\n\t\t//List, ScrollPane and Button Components\n\t\tmodel = new DefaultListModel();\n\t\tsetList();\n\t\tlist = new JList(model);\n\t\tlist.setBackground(new Color(255, 245, 238));\n\t\tJScrollPane scrollPane = new JScrollPane(list, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\n\t\tscrollPane.setBounds(10, 46, 293, 365);\n\t\tfrmProfessorgui.getContentPane().add(scrollPane);\n\n\t\tlist.setFont(new Font(\"Dialog\", Font.PLAIN, 13));\n\t\tlist.setBorder(new LineBorder(new Color(128, 128, 128), 2, true));\n\n\t\tcourse = new JButton(\"View Course\");\n\t\tcourse.setFont(new Font(\"Dialog\", Font.PLAIN, 13));\n\t\tcourse.addActionListener(new profMainListener());\n\n\t\tcourse.setBounds(390, 207, 126, 22);\n\t\tfrmProfessorgui.getContentPane().add(course);\n\n\t\tcreate = new JButton(\"Create Course\");\n\t\tcreate.setFont(new Font(\"Dialog\", Font.PLAIN, 13));\n\t\tcreate.setBounds(390, 250, 126, 22);\n\t\tfrmProfessorgui.getContentPane().add(create);\n\t\tcreate.addActionListener(new profMainListener());\n\n\t\tactivate = new JButton(\"Activate\");\n\t\tactivate.addActionListener(new profMainListener()); \n\t\tactivate.setFont(new Font(\"Dialog\", Font.PLAIN, 13));\n\t\tactivate.setBounds(390, 296, 126, 22);\n\t\tfrmProfessorgui.getContentPane().add(activate);\n\n\t\tdeactivate = new JButton(\"Deactivate\");\n\t\tdeactivate.addActionListener(new profMainListener());\n\n\t\tdeactivate.setFont(new Font(\"Dialog\", Font.PLAIN, 13));\n\t\tdeactivate.setBounds(390, 340, 126, 22);\n\t\tfrmProfessorgui.getContentPane().add(deactivate);\n\n\n\t\t//Aesthetic Pieces\n\t\tJLabel lblCourseList = new JLabel(\"Course List\");\n\t\tlblCourseList.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblCourseList.setFont(new Font(\"Dialog\", Font.BOLD, 16));\n\t\tlblCourseList.setBounds(21, 11, 261, 24);\n\t\tfrmProfessorgui.getContentPane().add(lblCourseList);\n\n\t\tJLabel lblWelcome = new JLabel(\"Welcome\");\n\t\tlblWelcome.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblWelcome.setFont(new Font(\"Dialog\", Font.BOLD, 16));\n\t\tlblWelcome.setBounds(357, 49, 191, 46);\n\t\tfrmProfessorgui.getContentPane().add(lblWelcome);\n\n\t\tJLabel lblNewLabel = new JLabel(prof.getFirstName() + \" \" + prof.getLastName());\n\t\tlblNewLabel.setFont(new Font(\"Dialog\", Font.ITALIC, 16));\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblNewLabel.setBounds(335, 82, 239, 40);\n\t\tfrmProfessorgui.getContentPane().add(lblNewLabel);\n\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBorder(new LineBorder(new Color(128, 128, 128), 2, true));\n\t\tpanel.setBackground(new Color(204, 255, 255));\n\t\tpanel.setBounds(367, 178, 174, 213);\n\t\tfrmProfessorgui.getContentPane().add(panel);\n\n\t\treturn frmProfessorgui;\n\t}", "private void createAndShowGUI() {\n //Create and set up the window.\n frame = new JFrame();\n\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.getContentPane().add(this);\n frame.addKeyListener(this);\n frame.addMouseListener(this);\n\n //Display the window.\n this.setPreferredSize(new Dimension(288, 512));\n this.addMouseListener(this);\n\n frame.pack();\n frame.setVisible(true);\n }", "private static void createAndShowGUI() {\n //Make sure we have nice window decorations.\n JFrame.setDefaultLookAndFeelDecorated(true);\n\n JFrame frame = new JFrame(\"TablePanel\");\n JPanel contentP = new JPanel();\n Box v = Box.createVerticalBox();\n Box h = Box.createHorizontalBox();\n Box h2 = Box.createHorizontalBox();\n TablePanel tablePanel = new TablePanel();\n tablePanel.setOpaque(true); //content panes must be opaque\n\n\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setContentPane(contentP);\n contentP.add(tablePanel);\n contentP.add(v);\n v.add(h);\n v.add(h2);\n\n h.add(tablePanel);\n h2.add(new JButton(\"Hello\"));\n //Display the window.\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n }", "protected void createInternalFrame() {\n\t\tJInternalFrame frame = new JInternalFrame();\n\t\tframe.setVisible(true);\n\t\tframe.setClosable(true);\n\t\tframe.setResizable(true);\n\t\tframe.setFocusable(true);\n\t\tframe.setSize(new Dimension(300, 200));\n\t\tframe.setLocation(100, 100);\n\t\tdesktop.add(frame);\n\t\ttry {\n\t\t\tframe.setSelected(true);\n\t\t} catch (java.beans.PropertyVetoException e) {\n\t\t}\n\t}", "private static void createAndShowGUI() {\r\n //Disable boldface controls.\r\n UIManager.put(\"swing.boldMetal\", Boolean.FALSE); \r\n\r\n //Create and set up the window.\r\n JFrame frame = new JFrame(\"Exertion Scripting\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n //Create and set up the content pane.\r\n NetletEditor newContentPane = new NetletEditor(null);\r\n newContentPane.setOpaque(true); //content panes must be opaque\r\n frame.setContentPane(newContentPane);\r\n\r\n //Display the window.\r\n frame.pack();\r\n frame.setVisible(true);\r\n }", "public Badminton()\n { \n frame.add(new Board()); \n frame.setSize(900, 900);\n frame.setResizable(false);\n frame.setTitle(\"PE Class\");\n //frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n }", "private void $$$setupUI$$$() {\n\t\tpanel_overview = new JPanel();\n\t\tpanel_overview.setLayout(new BorderLayout(0, 0));\n\t\twebView = new WebbrowserPanel();\n\t\tpanel_overview.add(webView, BorderLayout.CENTER);\n\t}", "public void createAndShowGUI() {\n\t\tJFrame frame = new JFrame(\"Pong\");\n\t\tframe.setResizable(false);\n\t\tframe.setVisible(true);\n\n\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tframe.add(board, BorderLayout.CENTER);\n\t\tframe.add(topPanel, BorderLayout.NORTH);\n\n\t\tframe.pack();\n\t}", "private static void createAndShowGUI() {\n \n JFrame frame = new HandleActionEventsForJButton();\n \n //Display the window.\n \n frame.pack();\n \n frame.setVisible(true);\n \n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n \n }", "private FrameUIController(){\r\n\t\t\r\n\t}", "public Jframe() {\n initComponents();\n setIndice();\n loadTextBoxs();\n }", "public void WZQFrame() {\n\t\tJFrame jf = new javax.swing.JFrame();\n\t\tjf.setTitle(\"五子棋\");\n\t\tjf.setDefaultCloseOperation(3);\n\t\tjf.setSize(1246, 1080);\n\t\tjf.setLocationRelativeTo(null);\n\t\tjf.setResizable(false);\n \n\t\tjf.setLayout(new FlowLayout());\n\t\tthis.setLayout(new FlowLayout());\n \n\t\tthis.setPreferredSize(new Dimension(1030, 1080));\n \n\t\t// this.setBackground(Color.CYAN);\n\t\t// 把面板对象添加到窗体上\n\t\tjf.add(this);\n\t\tJPanel jp1 = new JPanel();\n\t\tjp1.setPreferredSize(new Dimension(200, 1080));\n\t\tjp1.setLayout(new FlowLayout());\n\t\tjf.add(jp1);\n\t\tLoginListener ll = new LoginListener();\n\t\tString[] str = { \"悔棋\", \"重新开始\" };\n\t\tfor (int i = 0; i < str.length; i++) {\n\t\t\tJButton jbu1 = new JButton(str[i]);\n\t\t\tjbu1.setPreferredSize(new Dimension(150, 80));\n\t\t\tjbu1.setFont(new Font(\"楷体\", Font.BOLD,20));//设置字体\n\t\t\tjp1.add(jbu1);\n\t\t\tjbu1.addActionListener(ll);\n\t\t}\n\t\t\n\t\tjf.setVisible(true);\n \n\t\tGraphics g = this.getGraphics();\n \n\t\tthis.addMouseListener(ll);\n \n\t\tll.setG(g);\n\t\tll.setU(this);\n\t}", "public static void prepareGUI() {\n\t\tframe = new JFrame(\"Solid Adventure : Catch All Virtumon\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n \n //Create and set up the content pane.\n Driver demo = new Driver();\n demo.addComponentToPane(frame.getContentPane());\n\n //Display the window.\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n\t}", "public void rebuildFrame(){\n \n // Re-initialize frame with default attributes\n controlFrame.dispose();\n controlFrame = buildDefaultFrame(\"CSCI 446 - A.I. - Montana State University\");\n \n // Initialize header with default attributes\n header = buildDefaultHeader();\n \n // Initialize control panel frame with default attributes\n controlPanel = buildDefaultPanel(BoxLayout.Y_AXIS);\n \n // Combine objects\n controlPanel.add(header, BorderLayout.NORTH);\n controlFrame.add(controlPanel);\n \n }", "private static void createAndShowGUI() {\n //Make sure we have nice window decorations.\n JFrame.setDefaultLookAndFeelDecorated(true);\n\n //Create and set up the window.\n JFrame frame = new JFrame(\"MRALD Color Chooser\");\n\n //Create and set up the content pane.\n JComponent newContentPane = new MraldColorChooser(coloringItems);\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }", "private JFrame buildWindow() {\n frame = WindowFactory.mainFrame()\n .title(\"VISNode\")\n .menu(VISNode.get().getActions().buildMenuBar())\n .size(1024, 768)\n .maximized()\n .interceptClose(() -> {\n new UserPreferencesPersistor().persist(model.getUserPreferences());\n int result = JOptionPane.showConfirmDialog(panel, Messages.get().singleMessage(\"app.closing\"), null, JOptionPane.YES_NO_OPTION);\n return result == JOptionPane.YES_OPTION;\n })\n .create((container) -> {\n panel = new MainPanel(model);\n container.add(panel);\n });\n return frame;\n }", "private void createWindow() {\r\n\t\t// Create the picture frame and initializes it.\r\n\t\tthis.createAndInitPictureFrame();\r\n\r\n\t\t// Set up the menu bar.\r\n\t\tthis.setUpMenuBar();\r\n\r\n\t\t// Create the information panel.\r\n\t\t//this.createInfoPanel();\r\n\r\n\t\t// Create the scrollpane for the picture.\r\n\t\tthis.createAndInitScrollingImage();\r\n\r\n\t\t// Show the picture in the frame at the size it needs to be.\r\n\t\tthis.pictureFrame.pack();\r\n\t\tthis.pictureFrame.setVisible(true);\r\n\t\tpictureFrame.setSize(728,560);\r\n\t}", "private void buildGUI() {\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(null);\n\t\tpanel.setBorder(LineBorder.createGrayLineBorder());\n\t\tadd(panel);\n\t\t\n\t\taddRootPaneListener();\n\t\taddLoginComp();\n\t\taddButtons();\n\t\taddTitle();\n\t}", "void initGUI(int width, int height) {\r\n setSize(width, height); // set the frame size, width: 800, height: 600\r\n setBackground(Color.white); // set the background color to white\r\n Container cp = getContentPane(); // set the container\r\n cp.setBackground(getBackground()); // set the background of the container\r\n cp.setLayout(new FlowLayout(FlowLayout.LEFT)); // set the layout\r\n\r\n createMenus(cp);\r\n\r\n addMouseListener(this); // add a mouse listener\r\n addMouseMotionListener(this); // add a mouse motion listener\r\n setVisible(true); // set the attribute visible true\r\n }", "private static void createAndShowGUI() {\r\n\t\tlogger.info(\"Creating and showing the GUI\");\r\n\t\tJFrame frame = new JFrame(\"BowlingSwing\");\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.add(new BowlingSwing());\r\n\t\tframe.pack();\r\n\t\tframe.setVisible(true);\r\n\t}", "public void createUI() {\r\n\t\ttry {\r\n\t\t\tJPanel centerPanel = this.createCenterPane();\r\n\t\t\tJPanel westPanel = this.createWestPanel();\r\n\t\t\tm_XONContentPane.add(westPanel, BorderLayout.WEST);\r\n\t\t\tm_XONContentPane.add(centerPanel, BorderLayout.CENTER);\r\n\t\t\tm_XONContentPane.revalidate();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tRGPTLogger.logToFile(\"Exception at createUI \", ex);\r\n\t\t}\r\n\t}", "void frameSetUp() {\r\n\t\tJFrame testFrame = new JFrame();\r\n\t\ttestFrame.setSize(700, 400);\r\n\t\ttestFrame.setResizable(false);\r\n\t\ttestFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\ttestFrame.setLayout(new GridLayout(0, 2));\r\n\t\tmainFrame = testFrame;\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(Color.BLACK);\n\t\tframe.getContentPane().setLayout(null);\n\t\tframe.setExtendedState(JFrame.MAXIMIZED_BOTH);\n\t\t\n\t\tJLabel lblDesignCopyrights = new JLabel(\"design copyrights \\u00A9 chinmaya\");\n\t\tlblDesignCopyrights.setFont(new Font(\"Times New Roman\", Font.PLAIN, 14));\n\t\tlblDesignCopyrights.setForeground(new Color(255, 255, 224));\n\t\tlblDesignCopyrights.setBounds(1711, 1018, 183, 23);\n\t\tframe.getContentPane().add(lblDesignCopyrights);\n\t\t\n\t\tJPanel background = new JPanel();\n\t\tbackground.setLayout(null);\n\t\tbackground.setBackground(Color.DARK_GRAY);\n\t\tbackground.setBounds(14, 200, 1880, 809);\n\t\tframe.getContentPane().add(background);\n\t\t\n\t\t\n\t\tJLabel lblTypesOfMachine = new JLabel(\"MACHINE NAME\");\n\t\tlblTypesOfMachine.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblTypesOfMachine.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblTypesOfMachine.setForeground(Color.WHITE);\n\t\tlblTypesOfMachine.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tlblTypesOfMachine.setBounds(69, 378, 178, 30);\n\t\tbackground.add(lblTypesOfMachine);\n\t\t\n\t\t\n\t\tJLabel lblAppointment = new JLabel(\"LIST TO DO\");\n\t\tlblAppointment.setForeground(Color.WHITE);\n\t\tlblAppointment.setFont(new Font(\"Times New Roman\", Font.PLAIN, 30));\n\t\tlblAppointment.setBounds(69, 117, 319, 48);\n\t\tbackground.add(lblAppointment);\n\t\t\n\t\tJLabel lblQuantity = new JLabel(\"QUANTITY\");\n\t\tlblQuantity.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblQuantity.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblQuantity.setForeground(Color.WHITE);\n\t\tlblQuantity.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tlblQuantity.setBounds(69, 428, 178, 30);\n\t\tbackground.add(lblQuantity);\n\t\t\n\t\tPanel panel = new Panel();\n\t\tpanel.setLayout(null);\n\t\tpanel.setBackground(Color.BLACK);\n\t\tpanel.setBounds(0, 30, 1880, 67);\n\t\tbackground.add(panel);\n\t\t\n\t\tJButton cusbtn = new JButton(\"CUSTOMER\");\n\t\tcusbtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\t customer cr = new customer();\n\t\t cr.csStart();\n\t\t frame.dispose();\n\t\t\t}\n\t\t});\n\t\tcusbtn.setForeground(Color.WHITE);\n\t\tcusbtn.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tcusbtn.setBackground(Color.BLACK);\n\t\tcusbtn.setBounds(1257, 11, 613, 44);\n\t\tpanel.add(cusbtn);\n\t\t\n\t\tJButton bilbtn = new JButton(\"INVOICE\");\n\t\tbilbtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tadminInvoice inv= new adminInvoice();\n\t\t\t\tinv. adminInvoiceStart();\n\t\t\t\tframe.dispose();\n\n\t\t\t}\n\t\t});\n\t\tbilbtn.setForeground(Color.WHITE);\n\t\tbilbtn.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbilbtn.setBackground(Color.BLACK);\n\t\tbilbtn.setBounds(633, 11, 613, 44);\n\t\tpanel.add(bilbtn);\n\t\t\n\t\tJButton prdbtn = new JButton(\"PRODUCTS\");\n\t\tprdbtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tadminproducts prd = new adminproducts();\n\t\t\t\tprd.adminPrd();\n\t\t\t\tframe.dispose();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tprdbtn.setForeground(Color.WHITE);\n\t\tprdbtn.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tprdbtn.setBackground(Color.BLACK);\n\t\tprdbtn.setBounds(10, 11, 613, 44);\n\t\tpanel.add(prdbtn);\n\t\t\n\t\tJLabel lblCustomerName = new JLabel(\"CUSTOMER NAME\");\n\t\tlblCustomerName.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblCustomerName.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblCustomerName.setForeground(Color.WHITE);\n\t\tlblCustomerName.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tlblCustomerName.setBounds(69, 278, 178, 30);\n\t\tbackground.add(lblCustomerName);\n\t\t\n\t\tJLabel lblMachineType = new JLabel(\"MACHINE TYPE\");\n\t\tlblMachineType.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblMachineType.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblMachineType.setForeground(Color.WHITE);\n\t\tlblMachineType.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tlblMachineType.setBounds(69, 328, 178, 30);\n\t\tbackground.add(lblMachineType);\n\t\t\n\t\t\n\t\tJButton btnStore = new JButton(\"STORE\");\n\t\tbtnStore.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tString dateEntry=date.getText();\n\t\t\t\tString cusname= customerName.getText();\t\n\t\t\t\tString machType=machineType.getText();\n\t\t\t\tString machName=machineName.getText();\n\t\t\t\tString quan=quantity.getText();\n\t\t\t\tString dl= deadline.getText();\n\t\t\t\tConnection con;\n\t\t\t\tPreparedStatement insert;\n\t\t\t\t\n\t\t\t\tif(dateEntry.isEmpty()||cusname.isEmpty()||machName.isEmpty()||machType.isEmpty()||quan.isEmpty()||dl.isEmpty()) \n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"no field must be left empty\",\"registration error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\t\n\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \" Appointment added!!\");\n\t\t\t\t}\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\t\t\tcon = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/machine_works\", \"root\", \"\");\n\t\t\t\t\tinsert = con.prepareStatement(\"insert into appointment (date,cusname,machType,machName,quan,deadline) values (?,?,?,?,?,?)\");\n\t\t insert.setString(1, dateEntry);\n\t\t insert.setString(2, cusname);\n\t\t insert.setString(3, machType);\n\t\t insert.setString(4, machName);\n\t\t insert.setString(5, quan);\n\t\t insert.setString(6, dl);\n\t\t insert.executeUpdate();\n\t\t\t\t}\n\t\t\t\tcatch(Exception E)\n\t\t\t\t{\n\t\t\t\t\tE.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnStore.setForeground(Color.WHITE);\n\t\tbtnStore.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbtnStore.setBackground(Color.BLACK);\n\t\tbtnStore.setBounds(580, 578, 116, 44);\n\t\tbackground.add(btnStore);\n\t\t\n\t\tJScrollPane scrollPane = new JScrollPane();\n\t\tscrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);\n\t\tscrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\n\t\tscrollPane.setBounds(1000, 230, 613, 267);\n\t\tbackground.add(scrollPane);\n\t\t\n\t\tinvoice = new JTable();\n\t\tscrollPane.setViewportView(invoice);\n\t\t\n\t\tJLabel lblInvoice = new JLabel(\"VIEW TO-DO LIST\");\n\t\tlblInvoice.setForeground(Color.WHITE);\n\t\tlblInvoice.setFont(new Font(\"Times New Roman\", Font.PLAIN, 30));\n\t\tlblInvoice.setBounds(1010, 117, 387, 48);\n\t\tbackground.add(lblInvoice);\n\t\t\n\t\tquantity = new JTextField();\n\t\tquantity.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tquantity.setColumns(10);\n\t\tquantity.setBounds(279, 428, 289, 30);\n\t\tbackground.add(quantity);\n\t\t\n\t\tmachineName = new JTextField();\n\t\tmachineName.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tmachineName.setColumns(10);\n\t\tmachineName.setBounds(279, 328, 289, 30);\n\t\tbackground.add(machineName);\n\t\t\n\t\tmachineType = new JTextField();\n\t\tmachineType.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tmachineType.setColumns(10);\n\t\tmachineType.setBounds(279, 378, 289, 30);\n\t\tbackground.add(machineType);\n\t\t\n\t\tcustomerName = new JTextField();\n\t\tcustomerName.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tcustomerName.setColumns(10);\n\t\tcustomerName.setBounds(279, 278, 289, 30);\n\t\tbackground.add(customerName);\n\t\t\n\t\tJLabel deadlineLbl = new JLabel(\"DEADLINE\");\n\t\tdeadlineLbl.setVerticalAlignment(SwingConstants.TOP);\n\t\tdeadlineLbl.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tdeadlineLbl.setForeground(Color.WHITE);\n\t\tdeadlineLbl.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tdeadlineLbl.setBounds(69, 481, 178, 30);\n\t\tbackground.add(deadlineLbl);\n\t\t\n\t\tJLabel lblDate = new JLabel(\"DATE\");\n\t\tlblDate.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblDate.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tlblDate.setForeground(Color.WHITE);\n\t\tlblDate.setFont(new Font(\"Times New Roman\", Font.PLAIN, 19));\n\t\tlblDate.setBounds(69, 228, 178, 30);\n\t\tbackground.add(lblDate);\n\t\t\n\t\tdate = new JTextField();\n\t\tdate.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tdate.setColumns(10);\n\t\tdate.setBounds(279, 228, 289, 30);\n\t\tbackground.add(date);\n\t\t\n\t\tJButton btnView = new JButton(\"VIEW\");\n\t\tbtnView.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tConnection con = null;\n\t\t\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\t\t\tcon = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/machine_works\", \"root\", \"\");\n\t\t String query=\"select * from appointment \";\n\t\t\t\t\tPreparedStatement pst = con.prepareStatement(query);\n\t\t\t\t\tResultSet rs = pst.executeQuery();\n\t\t\t\t\t\n\t\t\t\t\tinvoice.setModel(DbUtils.resultSetToTableModel(rs));\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcatch(Exception E)\n\t\t\t\t{\n\t\t\t\t\tE.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnView.setForeground(Color.WHITE);\n\t\tbtnView.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbtnView.setBackground(Color.BLACK);\n\t\tbtnView.setBounds(1584, 578, 116, 44);\n\t\tbackground.add(btnView);\n\t\t\n\t\tdeadline = new JTextField();\n\t\tdeadline.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tdeadline.setColumns(10);\n\t\tdeadline.setBounds(279, 481, 289, 30);\n\t\tbackground.add(deadline);\n\t\t\n\t\tJPanel header = new JPanel();\n\t\theader.setLayout(null);\n\t\theader.setBackground(Color.DARK_GRAY);\n\t\theader.setBounds(14, 23, 1880, 163);\n\t\tframe.getContentPane().add(header);\n\t\t\n\t\tJPanel mwtitle = new JPanel();\n\t\tmwtitle.setLayout(null);\n\t\tmwtitle.setForeground(Color.WHITE);\n\t\tmwtitle.setBackground(Color.BLACK);\n\t\tmwtitle.setBounds(209, 7, 649, 151);\n\t\theader.add(mwtitle);\n\t\t\n\t\tJLabel label = new JLabel(\"MACHINE WORKS\");\n\t\tlabel.setForeground(Color.WHITE);\n\t\tlabel.setFont(new Font(\"Times New Roman\", Font.PLAIN, 69));\n\t\tlabel.setBounds(20, 11, 605, 72);\n\t\tmwtitle.add(label);\n\t\t\n\t\tJLabel lblWhereAllThe = new JLabel(\"Where all the WORK is done by MACHINE\");\n\t\tlblWhereAllThe.setForeground(Color.ORANGE);\n\t\tlblWhereAllThe.setFont(new Font(\"Times New Roman\", Font.PLAIN, 30));\n\t\tlblWhereAllThe.setBounds(38, 94, 581, 48);\n\t\tmwtitle.add(lblWhereAllThe);\n\t\t\n\t\tJLabel logolbl = new JLabel(\"\");\n\t\tlogolbl.setIcon(new ImageIcon(\"C:\\\\Users\\\\CHINMAYA SH\\\\Pictures\\\\download.png\"));\n\t\tlogolbl.setBounds(58, 7, 151, 151);\n\t\theader.add(logolbl);\n\t\t\n\t\tJButton lgbtn = new JButton(\"LOGOUT\");\n\t\tlgbtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Logged out Successfull !!\");\n\t\t\t\tindex ind = new index();\n\t\t\t\tind.indexStart();\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tlgbtn.setForeground(Color.WHITE);\n\t\tlgbtn.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tlgbtn.setBackground(Color.BLACK);\n\t\tlgbtn.setBounds(1674, 60, 116, 44);\n\t\theader.add(lgbtn);\n\t\t\n\t\tJButton button_1 = new JButton(\"SIGN UP\");\n\t\tbutton_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tsignup sg = new signup();\n\t\t\t\tsg.signupStart();\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tbutton_1.setForeground(Color.WHITE);\n\t\tbutton_1.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbutton_1.setBackground(Color.BLACK);\n\t\tbutton_1.setBounds(1488, 60, 116, 44);\n\t\theader.add(button_1);\n\t\t\n\t\tJButton btnAppointment = new JButton(\"TO-DO\");\n\t\tbtnAppointment.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tappointments ap = new appointments();\n\t\t\t\tap.appointmentList();\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnAppointment.setForeground(Color.WHITE);\n\t\tbtnAppointment.setFont(new Font(\"Times New Roman\", Font.PLAIN, 15));\n\t\tbtnAppointment.setBackground(Color.BLACK);\n\t\tbtnAppointment.setBounds(1309, 60, 125, 44);\n\t\theader.add(btnAppointment);\n\t\tframe.setBackground(Color.BLACK);\n\t\tframe.setBounds(100, 100, 1920\t, 1080);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\n\t}", "private static void createGUI(){\n DrawingArea drawingArea = new DrawingArea();\n ToolSelect utilityBar = new ToolSelect();\n MenuBar menuBar = new MenuBar();\n JFrame.setDefaultLookAndFeelDecorated(true);\n JFrame frame = new JFrame(\"GUIMk1\");\n frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );\n frame.setLayout(new BorderLayout());\n frame.getContentPane().add(utilityBar, BorderLayout.WEST);\n frame.getContentPane().add(menuBar,BorderLayout.NORTH);\n frame.getContentPane().add(drawingArea);\n frame.setLocationRelativeTo( null );\n frame.setVisible(true);\n frame.pack();\n\n }", "public UserFrame(User user) {\r\n\t\tsetTitle(\"\\u5B66\\u751F\\u7528\\u6237\\u754C\\u9762\");\r\n\t\t\r\n\t u1 = user;\r\n\t\tsetDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\tsetBounds(100, 100, 650, 480);\r\n\t\t\r\n\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\tsetJMenuBar(menuBar);\r\n\r\n\t\tJMenu menu = new JMenu(\"\\u529F\\u80FD\\u83DC\\u5355\");\r\n\t\tmenuBar.add(menu);\r\n\r\n\t\tJMenuItem menuItem = new JMenuItem(\"\\u67E5\\u770B\\u4E2A\\u4EBA\\u4FE1\\u606F\");\r\n\t\tmenuItem.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tcontentPane.updateUI();\r\n\t\t\t\tcontentPane.removeAll();\r\n\t\t\t\tJLabel label = new JLabel(\"\\u5B66\\u751F\\u57FA\\u672C\\u4FE1\\u606F\");\r\n\t\t\t\tlabel.setBounds(39, 24, 99, 15);\r\n\t\t\t\tcontentPane.add(label);\r\n\r\n\t\t\t\tString SNo3 = null;\r\n\t\t\t\tSNo3 = user.getUser_id();\r\n\t\t\t\t// 学生基本信息显示\r\n\t\t\t\tStudent student = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tstudent = DAOFactory.getIStudentDAOInstance().getStudentBySNo(SNo3);\r\n\t\t\t\t} catch (Exception e2) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tObject[][] objects = new Object[1][14];\r\n\t\t\t\tobjects[0][0] = student.getSNo();\r\n\t\t\t\tobjects[0][1] = student.getName();\r\n\t\t\t\tobjects[0][2] = student.getSex();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tobjects[0][3] = DAOFactory.getIAcademyDAOInstance().getANameByANo(student.getANo());\r\n\t\t\t\t} catch (Exception e2) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\ttry {\r\n\t\t\t\t\tobjects[0][4] = DAOFactory.getIDepartmentDAOInstance().getDnameByDNo(student.getDNo());\r\n\t\t\t\t} catch (Exception e2) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tobjects[0][5] = student.getSphoneNum();\r\n\t\t\t\tobjects[0][6] = student.getEnter_Date();\r\n\t\t\t\tobjects[0][7] = student.getBirthday();\r\n\t\t\t\tobjects[0][8] = student.getMidSch();\r\n\t\t\t\tobjects[0][9] = student.getExScore();\r\n\t\t\t\tobjects[0][10] = student.getIdcard();\r\n\t\t\t\tobjects[0][11] = student.getBuildingNum();\r\n\t\t\t\tobjects[0][12] = student.getRoomNum();\r\n\t\t\t\tobjects[0][13] = student.getQqNum();\r\n\t\t\t\tString header[] = { \"学号\", \"姓名\", \"性别\", \"所属学院\", \"专业\", \"电话\", \"入学日期\", \"生日\", \"毕业高校\", \"高考分数\", \"身份证号\", \"楼栋号\",\r\n\t\t\t\t\t\t\"门牌号\", \"QQ\" };\r\n\t\t\t\tDefaultTableModel model = new DefaultTableModel(objects, header) {\r\n\t\t\t\t\tpublic boolean isCellEditable(int row, int column) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tJTable infotable = new JTable(model);\r\n\t\t\t\tJScrollPane info = new JScrollPane(infotable);\r\n\t\t\t\tinfo.setBounds(39, 61, 550, 60);\r\n\t\t\t\tinfotable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);\r\n\t\t\t\tcontentPane.add(info);\r\n\r\n\t\t\t\tJLabel label_1 = new JLabel(\"\\u5B66\\u751F\\u5BB6\\u5EAD\\u60C5\\u51B5\");\r\n\t\t\t\tlabel_1.setBounds(39, 150, 80, 15);\r\n\t\t\t\tcontentPane.add(label_1);\r\n\r\n\t\t\t\t// 家庭信息\r\n\t\t\t\tFamily family4 = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfamily4 = DAOFactory.getIFamilyDAOInstance().findById(SNo3);\r\n\t\t\t\t} catch (Exception e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tObject[][] objects1 = new Object[1][8];\r\n\t\t\t\tif(family4.getFamilyNum()!=null)\r\n\t\t\t\t{\r\n\t\t\t\tobjects1[0][0] = family4.getAddress();\r\n\t\t\t\tobjects1[0][1] = family4.getFather();\r\n\t\t\t\tobjects1[0][2] = family4.getMother();\r\n\t\t\t\tobjects1[0][3] = family4.getF_PNum();\r\n\t\t\t\tobjects1[0][4] = family4.getM_PNum();\r\n\t\t\t\tobjects1[0][5] = family4.getF_job();\r\n\t\t\t\tobjects1[0][6] = family4.getM_job();\r\n\t\t\t\tif (family4.isIsAlone())\r\n\t\t\t\t\tobjects1[0][7] = \"是\";\r\n\t\t\t\telse\r\n\t\t\t\t\tobjects1[0][7] = \"否\";\r\n\t\t\t\t}\r\n\t\t\t\tString header1[] = { \"家庭地址\", \"父亲\", \"母亲\", \"父亲电话\", \"母亲电话\", \"父亲工作\", \"母亲工作\", \"是否独生\" };\r\n\t\t\t\tDefaultTableModel model1 = new DefaultTableModel(objects1, header1) {\r\n\t\t\t\t\tpublic boolean isCellEditable(int row, int column) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tJTable familytable = new JTable(model1);\r\n\t\t\t\tfamilytable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);\r\n\t\t\t\tJScrollPane family = new JScrollPane(familytable);\r\n\t\t\t\tfamily.setBounds(39, 182, 550, 63);\r\n\t\t\t\tcontentPane.add(family);\r\n\r\n\t\t\t\t// 奖惩\r\n\t\t\t\tJLabel label_2 = new JLabel(\"\\u5B66\\u751F\\u5956\\u60E9\\u60C5\\u51B5\");\r\n\t\t\t\tlabel_2.setBounds(39, 260, 80, 15);\r\n\t\t\t\tcontentPane.add(label_2);\r\n\r\n\t\t\t\tList<Award> award = null;\r\n\t\t\t\tList<Punishment> punishment = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\taward = DAOFactory.getIAwardDAOInstance().findBySNo(SNo3);\r\n\t\t\t\t\tpunishment = DAOFactory.getIPunishmentDAOInstance().findAll(SNo3);\r\n\t\t\t\t} catch (Exception e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tint index = award.size();\r\n\t\t\t\tif (index < punishment.size())\r\n\t\t\t\t\tindex = punishment.size();\r\n\r\n\t\t\t\tObject[][] objects2 = new Object[index][7];\r\n\t\t\t\tif (award != null) {\r\n\t\t\t\t\tfor (int i = 0; i < award.size(); i++) {\r\n\t\t\t\t\t\tobjects2[i][0] = award.get(i).getAwardNum();\r\n\t\t\t\t\t\tobjects2[i][1] = award.get(i).getAwardText();\r\n\t\t\t\t\t\tobjects2[i][2] = award.get(i).getMoney();\r\n\t\t\t\t\t\tobjects2[i][3] = award.get(i).getA_Date();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (punishment != null) {\r\n\t\t\t\t\tfor (int j = 0; j < punishment.size(); j++) {\r\n\t\t\t\t\t\tobjects2[j][4] = punishment.get(j).getPno();\r\n\t\t\t\t\t\tobjects2[j][5] = punishment.get(j).getPText();\r\n\t\t\t\t\t\tobjects2[j][6] = punishment.get(j).getP_Date();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tString header2[] = { \"奖励编号\", \"奖励描述\", \"奖励金额\", \"获奖日期\", \"惩罚编号\", \"惩罚描述\", \"惩罚日期\" };\r\n\t\t\t\tDefaultTableModel model2 = new DefaultTableModel(objects2, header2) {\r\n\t\t\t\t\tpublic boolean isCellEditable(int row, int column) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\tJTable awardtable = new JTable(model2);\r\n\t\t\t\tawardtable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);\r\n\t\t\t\tJScrollPane award1 = new JScrollPane(awardtable);\r\n\t\t\t\taward1.setBounds(39, 290, 550, 80);\r\n\t\t\t\tcontentPane.add(award1);\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t\tmenu.add(menuItem);\r\n\t\t// 更改密码\r\n\t\tJMenuItem menuItem_1 = new JMenuItem(\"\\u4FEE\\u6539\\u5BC6\\u7801\");\r\n\t\tmenuItem_1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tcontentPane.updateUI();\r\n\t\t\t\tcontentPane.removeAll();\r\n\r\n\t\t\t\tJPanel panel = new JPanel();\r\n\t\t\t\tpanel.setBackground(Color.LIGHT_GRAY);\r\n\t\t\t\tpanel.setBounds(140, 109, 329, 163);\r\n\t\t\t\tcontentPane.add(panel);\r\n\t\t\t\tpanel.setLayout(null);\r\n\r\n\t\t\t\tJLabel label = new JLabel(\"\\u65B0\\u5BC6\\u7801\");\r\n\t\t\t\tlabel.setBounds(34, 37, 73, 15);\r\n\t\t\t\tpanel.add(label);\r\n\r\n\t\t\t\tJLabel label_1 = new JLabel(\"\\u786E\\u5B9A\\u65B0\\u5BC6\\u7801\");\r\n\t\t\t\tlabel_1.setBounds(34, 77, 73, 15);\r\n\t\t\t\tpanel.add(label_1);\r\n\r\n\t\t\t\tNewPassword = new JPasswordField();\r\n\t\t\t\tNewPassword.setBounds(136, 34, 124, 21);\r\n\t\t\t\tpanel.add(NewPassword);\r\n\t\t\t\tNewPassword.setColumns(10);\r\n\r\n\t\t\t\tsurePassword = new JPasswordField();\r\n\t\t\t\tsurePassword.setColumns(10);\r\n\t\t\t\tsurePassword.setBounds(136, 74, 124, 21);\r\n\t\t\t\tpanel.add(surePassword);\r\n\r\n\t\t\t\tJButton button = new JButton(\"\\u786E\\u5B9A\");\r\n\t\t\t\tbutton.setBounds(126, 130, 93, 23);\r\n\t\t\t\tpanel.add(button);\r\n\t\t\t\tbutton.addActionListener(new ActionListener() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\tUser u = user;\r\n\t\t\t\t\t\tuser.setUser_password(NewPassword.getText());\r\n\t\t\t\t\t\tif (NewPassword.getText().equals(surePassword.getText())) {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tDAOFactory.getIUserDAOInstance().update(u);\r\n\t\t\t\t\t\t\t} catch (Exception e1) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(UserFrame.this, \"更改成功\", \"提示\", \r\n\t\t\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(UserFrame.this, \"两次输入不同\", \"提示\", \r\n\t\t\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\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\tmenu.add(menuItem_1);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tsetContentPane(contentPane);\r\n\t\tcontentPane.setLayout(null);\r\n\t\t\r\n\t}", "private void createFrame() {\n System.out.println(\"Assembling \" + name + \" frame\");\n }", "private void setUpFrame() {\n rootPanel = new JPanel();\n rootPanel.setLayout(new BorderLayout());\n rootPanel.setBackground(Color.darkGray);\n }", "private static void createAndShowGUI() {\n frame = new JFrame(\"Shopping Cart\");\n frame.setLocation(600,300);\n frame.setPreferredSize(new Dimension(800,700));\n frame.setResizable(false);\n //frame.setLayout(new GridLayout(2,2,5,5));\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Create and set up the content pane.\n JComponent newContentPane = new shoppingCartTableGui();\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n //Display the window.\n frame.pack();\n \n // inserting the login dialogPane here\n loginPane newLoginPane = new loginPane(frame);\n clientID = newLoginPane.getClientID();\n }", "private JFrame makeOptionsFrame(){\n MenuBarHandler menuBarHandler = new MenuBarHandler();\n JFrame optionsFrame = new JFrame(\"Options\");\n optionsFrame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n optionsFrame.setResizable(false);\n optionsFrame.setLocationRelativeTo(frame);\n followRedirect = new JCheckBox(\"follow redirect\");\n followRedirect.setSelected(true);\n followRedirect.addActionListener(menuBarHandler);\n hideOnSystemTray = new JCheckBox(\"Hide to tray\");\n hideOnSystemTray.addActionListener(menuBarHandler);\n ButtonGroup themes = new ButtonGroup();\n JRadioButton light = new JRadioButton(\"Light theme\");\n light.setSelected(true);\n JRadioButton dark = new JRadioButton(\"Dark theme\");\n light.addActionListener(menuBarHandler);\n dark.addActionListener(menuBarHandler);\n themes.add(light);\n themes.add(dark);\n optionsFrame.setLayout(new GridBagLayout());\n GridBagConstraints c = new GridBagConstraints();\n optionsFrame.add(hideOnSystemTray, c);\n optionsFrame.add(followRedirect, c);\n c.gridy = 1;\n optionsFrame.add(light, c);\n c.gridy = 2;\n optionsFrame.add(dark, c);\n optionsFrame.pack();\n return optionsFrame;\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t try {\n\t\t\t\t\tUIManager.setLookAndFeel(\"com.seaglasslookandfeel.SeaGlassLookAndFeel\");\n\t\t\t\t} catch (ClassNotFoundException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (InstantiationException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (IllegalAccessException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (UnsupportedLookAndFeelException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tsetupLibVLC();\n\t\t\t\t} catch (LibraryNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tNative.loadLibrary(RuntimeUtil.getLibVlcLibraryName(), LibVlc.class);\n\t\t\t\t\n\t\t\t\tExtendedFrame frame = new ExtendedFrame();\n\t\t\t\tframe.setResizable(true);\n\t\t\t\tframe.setSize(800, 600);\n\t\t\t\tframe.setMinimumSize(new Dimension(500, 400));\n\t\t\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n\t\t\t\tframe.setLocationRelativeTo(null);\n\t\t\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\tframe.setVisible(true);\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Welcome to Vamix!\\n\\nHope you enjoy using vamix!\\nFor help, please click in the Help menu.\\nRefer to user manual for detailed help.\\n\");\n\t\t\t}", "public EmulatorFrame() {\r\n\t\tsuper(\"Troyboy Chip8 Emulator\");\r\n\t\t\r\n\t\tsetNativeLAndF();\r\n\t\tinitComponents();\r\n\t\tinitMenubar();\r\n\t\tsetupLayout();\r\n\t\tinitFrame();\r\n\t\t//frame is now ready to run a game\r\n\t\t//running of any games must be started by loading a ROM\r\n\t}", "public void showFrame() {\n\t\tframe.pack();\n\t\t// position the frame\n\t\tDimension d = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tframe.setLocation((d.width - frame.getSize().width)/2, (d.height - frame.getSize().height)/2);\n\t\t// show the frame\n\t\tframe.setVisible(true);\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setAlwaysOnTop(true);\n\t\tframe.setBounds(100, 100, 630, 550);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setSize(650,400);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBounds(0, 0, 614, 512);\n\t\tframe.getContentPane().add(panel);\n\t\tpanel.setLayout(null);\n\t\t\n\t\tJButton buttonTreinos = new JButton(\"Visualizar treinos\");\n\t\tbuttonTreinos.setBounds(224, 136, 186, 23);\n\t\tpanel.add(buttonTreinos);\n\t\t\n\t\tJButton btnAlunos = new JButton(\"Lista de Alunos\");\n\t\tbtnAlunos.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tnew ListaDeAlunos().frame.setVisible(true);\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnAlunos.setBounds(224, 163, 186, 23);\n\t\tpanel.add(btnAlunos);\n\t\t\n\t\tJLabel lblGymManager = new JLabel(\"Gym Manager\");\n\t\tlblGymManager.setFont(new Font(\"Tahoma\", Font.PLAIN, 22));\n\t\tlblGymManager.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblGymManager.setBounds(220, 46, 165, 27);\n\t\tpanel.add(lblGymManager);\n\t\t\n\t\tJButton btnMatricularAluno = new JButton(\"Matricular Aluno\");\n\t\tbtnMatricularAluno.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tnew TelaAlunoCadastro().setVisible(true);\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnMatricularAluno.setBounds(224, 192, 186, 23);\n\t\tpanel.add(btnMatricularAluno);\n\t}", "private void build() {\r\n \tapplyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\r\n setContentPane(buildContentPane());\r\n setTitle(getWindowTitle());\r\n setJMenuBar(\r\n createMenuBuilder(this).buildMenuBar(\r\n settings,\r\n createHelpActionListener(),\r\n createAboutActionListener()));\r\n setIconImage(readImageIcon(\"eye_16x16.gif\").getImage());\r\n }", "private static void createAndShowGUI() {\n //\n // Use the normal window decorations as defined by the look-and-feel\n // schema\n //\n JFrame.setDefaultLookAndFeelDecorated(true);\n //\n // Create the main application window\n //\n mainWindow = new MainWindow();\n //\n // Show the application window\n //\n mainWindow.pack();\n mainWindow.setVisible(true);\n }", "private static void createAndShowGUI() {\n\t frame = new JFrame(\"SpringBagLayoutTextWindowDemo\");\n\t \n\t frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t \n\t //Set up the content pane.\n\t addComponentsToPane(frame.getContentPane());\n\t //frame.setSize();\n\t \n\t //Display the window.\n\t \n\t frame.pack();\n\t frame.setVisible(true);\n\t }" ]
[ "0.77120394", "0.7289795", "0.72397554", "0.71691644", "0.7095132", "0.70798427", "0.7039356", "0.7013041", "0.6975748", "0.6933419", "0.69191873", "0.69182926", "0.6908414", "0.68920046", "0.6872682", "0.68626475", "0.6858297", "0.6852797", "0.68288016", "0.6816411", "0.68053615", "0.68006665", "0.67734677", "0.6771968", "0.6771531", "0.67623645", "0.6761287", "0.6760493", "0.67547953", "0.6750613", "0.6741217", "0.6732217", "0.67313683", "0.6726987", "0.67215693", "0.6715131", "0.6713882", "0.6712323", "0.6669654", "0.6664169", "0.6654511", "0.6642857", "0.6641792", "0.66410214", "0.66395813", "0.6630988", "0.6630601", "0.66105646", "0.6591457", "0.6585089", "0.6576362", "0.65759593", "0.65759", "0.65738547", "0.6570938", "0.65605694", "0.6555884", "0.6546363", "0.6534857", "0.6534723", "0.6526899", "0.65153533", "0.65142435", "0.65126336", "0.65060127", "0.6497975", "0.64950114", "0.64831525", "0.6477264", "0.64572567", "0.6448723", "0.6448237", "0.64214784", "0.64208525", "0.64100343", "0.64068", "0.6404861", "0.6404295", "0.63965654", "0.63892215", "0.638331", "0.6379685", "0.63765323", "0.63750273", "0.6373875", "0.6373441", "0.6370031", "0.63689953", "0.63674515", "0.6362059", "0.63556755", "0.635137", "0.63506633", "0.6347925", "0.63447565", "0.6334893", "0.63323885", "0.6329609", "0.6324022", "0.63235945" ]
0.6743929
30
Add a button to the button panel.
protected void addButton(Container panel, String buttonText) { JButton button = new JButton(buttonText); button.addActionListener(this); panel.add(button); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@NotNull\n TBItemButton addButton() {\n @NotNull TBItemButton butt = new TBItemButton(myItemListener, myStats != null ? myStats.getActionStats(\"simple_button\") : null);\n myItems.addItem(butt);\n return butt;\n }", "private void addButton()\n {\n JButton button = new JButton();\n button.setSize(200, 30);\n button.setName(\"login\");\n button.setAction(new CreateUserAction());\n add(button);\n button.setText(\"Login\");\n }", "public void addButton(final JButton theButton) {\n customButtonPanel.add(theButton);\n }", "private JButton addButton(String name) {\n JButton button = new JButton(name);\n button.setActionCommand(name);\n buttonsPanel.add(button);\n return button;\n }", "void addButton_actionPerformed(ActionEvent e) {\n addButton();\n }", "public DynaForm addButton(Button button) {\n\t\treturn null;\r\n\t}", "@Override\n public void addToggleButton(Component button)\n {\n button.addFeature(new AddToggleButtonFeature(this, button));\n }", "protected JButton createAddButton() {\n JButton butAdd = new JButton();\n butAdd.setIcon(new ImageIcon(getClass().getClassLoader().getResource(\"image/add.jpg\")));\n butAdd.setToolTipText(\"Add a new item\");\n butAdd.addActionListener(new AddItemListener());\n return butAdd;\n }", "public void addButton( AbstractButton button ) {\r\n synchronized (buttons) {\r\n buttons.add( button );\r\n }\r\n }", "private void createButton() {\n this.setIcon(images.getImageIcon(fileName + \"-button\"));\n this.setActionCommand(command);\n this.setPreferredSize(new Dimension(width, height));\n this.setMaximumSize(new Dimension(width, height));\n }", "private JButton createButton(final Box addTo, final String label) {\n JButton button = new JButton(label);\n button.setActionCommand(label);\n button.addActionListener(this);\n addTo.add(button);\n return button;\n }", "public static void addButtonToPanel(JButton b, JPanel p) {\r\n\t\tp.setBorder(BorderFactory.createEmptyBorder());\r\n\t\tDimension panelSize = p.getSize();\t\t\r\n\t\tb.setPreferredSize(panelSize);\r\n\t\tp.add(b);\r\n\t}", "public void addButton(String label, ActionListener listener) {\n JButton button = new JButton(label);\n buttonPanel.add(button);\n button.addActionListener(listener);\n }", "protected Panel createButtonPanel() {\n Panel panel = new Panel();\n panel.setLayout(new PaletteLayout(2, new Point(2,2), false));\n return panel;\n }", "@Override\n\tprotected void initAddButton() {\n addBtn = addButton(\"newBtn\", TwlLocalisationKeys.ADD_BEAT_TYPE_TOOLTIP, new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tnew AddEditBeatTypePanel(true, null, BeatTypesList.this).run(); // adding\n\t\t\t\t}\n\t }); \t\t\n\t}", "private void setAddButtonUI() {\n addButton = new JButton(\"Add\");\n addButton.setForeground(new Color(247, 37, 133));\n addButton.addActionListener(this);\n addButton.setContentAreaFilled(false);\n addButton.setFocusPainted(false);\n addButton.setFont(new Font(\"Nunito\", Font.PLAIN, 14));\n addButton.setAlignmentX(Component.CENTER_ALIGNMENT);\n }", "private void addButton(final FrameContainer<?> source) {\n final JToggleButton button = new JToggleButton(source.toString(),\n IconManager.getIconManager().getIcon(source.getIcon()));\n button.addActionListener(this);\n button.setHorizontalAlignment(SwingConstants.LEFT);\n button.setMinimumSize(new Dimension(0,buttonHeight));\n button.setMargin(new Insets(0, 0, 0, 0));\n buttons.put(source, button);\n }", "private JButton createButtonAddProduct() {\n\n JButton btn = new JButton(\"Add Product\");\n btn.setEnabled(false);\n btn.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n\n // new NewProductDialog(DemonstrationApplication.this);\n }\n });\n\n return btn;\n }", "private Button addButton(Configuration config, String name) {\r\n Button button = new HintedButton(config, name);\r\n button.addActionListener(this);\r\n add(button);\r\n return button;\r\n }", "private void createButton(){\n addButton();\n addStartButton();\n }", "private void initButton() {\r\n\t\tthis.panelButton = new JPanel();\r\n\t\tthis.panelButton.setLayout(new BoxLayout(this.panelButton,\r\n\t\t\t\tBoxLayout.LINE_AXIS));\r\n\t\tthis.modifyButton = new JButton(\"Modify\");\r\n\t\tthis.buttonSize(this.modifyButton);\r\n\t\tthis.deleteButton = new JButton(\"Delete\");\r\n\t\tthis.buttonSize(this.deleteButton);\r\n\t\tthis.cancelButton = new JButton(\"Cancel\");\r\n\t\tthis.buttonSize(this.cancelButton);\r\n\r\n\t\tthis.modifyButton.addActionListener(this.editWeaponControl);\r\n\t\tthis.deleteButton.addActionListener(this.editWeaponControl);\r\n\t\tthis.cancelButton.addActionListener(this.editWeaponControl);\r\n\r\n\t\tthis.panelButton.add(this.modifyButton);\r\n\t\tthis.panelButton.add(Box.createRigidArea(new Dimension(15, 0)));\r\n\t\tthis.panelButton.add(this.deleteButton);\r\n\t\tthis.panelButton.add(Box.createRigidArea(new Dimension(15, 0)));\r\n\t\tthis.panelButton.add(this.cancelButton);\r\n\t}", "private JButton getAddButton() {\n if (addButton == null) {\n addButton = new JButton();\n addButton.setText(\"Add\");\n addButton.setToolTipText(\"Add new notification settings for a site\");\n addButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n addBalloonSettings();\n }\n });\n }\n return addButton;\n }", "private void createButtonsPanel() {\r\n Composite buttonsPanel = new Composite(this, SWT.NONE);\r\n buttonsPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));\r\n buttonsPanel.setLayout(new GridLayout(4, true));\r\n\r\n getButtonFromAction(buttonsPanel, \"New\", new NewAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Save\", new SaveAction());\r\n getButtonFromAction(buttonsPanel, \"Delete\", new DeleteAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Cancel\", new CancelAction());\r\n }", "private void createButton(JButton button, Component rightOf, Component below, int width, int height,\n JPanel panel) {\n int x = rightOf == null ? 315 : rightOf.getX() + rightOf.getWidth() + 5;\n // rightOf.getX() + rightOf.getWidth() + stdMargin()\n int y = below == null ? 10 : below.getY() + below.getHeight() + 10;\n // below.getY()+ below.getHeight() + stdMargin\n // int width = 250;\n // int height = 30;\n // textField.setOpaque(true);\n // textField.setBackground(Color.CYAN);\n\n button.setBounds(x, y, width, height);\n\n panel.add(button);\n }", "private void createButton() {\n\t\tbtnAddTask = new JButton(\"Add Task\");\n\t\tbtnSave = new JButton(\"Save\");\n\t\tbtnCancel = new JButton(\"Cancel\");\n\n\t\tbtnAddTask.addActionListener(new ToDoAction());\n\t\tbtnSave.addActionListener(new ToDoAction());\n\t\tbtnCancel.addActionListener(new ToDoAction());\n\t}", "private JPanel createButtonPanel(){\n JPanel buttonPanel = new JPanel();\n buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));\n buttonPanel.setBorder(BorderFactory.createEmptyBorder(VERTICAL_BUFFER,HORIZONTAL_BUFFER,0,HORIZONTAL_BUFFER));\n\n export = new JButton(\"Export\");\n cancel = new JButton(\"Cancel\");\n\n buttonPanel.add(Box.createHorizontalGlue());\n buttonPanel.add(export);\n buttonPanel.add(Box.createHorizontalStrut(HORIZONTAL_BUFFER));\n buttonPanel.add(cancel);\n buttonPanel.add(Box.createHorizontalGlue());\n\n return buttonPanel;\n }", "public void setAddButton(UIComponent addButton) {\r\n this.addButton = addButton;\r\n }", "JButton createTranslateButton(ParagraphTranslateGUI app) {\n ImageIcon translateIcon = new ImageIcon(\"resources/TranslateButton.png\");\n translateButton = new JButton(resizeIcon(translateIcon, this.width, this.height));\n translateButton.setBounds(this.posX, this.posY, this.width, this.height);\n\n addMouseListener(app);\n\n return translateButton;\n }", "public void setAddBtn(JButton addBtn) {\n\t\tthis.addBtn = addBtn;\n\t}", "private void addControlButton(Component comp) {\r\n\t\tif (comp instanceof JButton){\r\n\t\t\tJButton b = (JButton)comp;\r\n\t\t\tb.setSize(BUTTON_WIDTH,BUTTON_HEIGHT);\r\n\t\t\tb.setLocation(LEFT_BUTTON_PADDING, TOP_BUTTON_PADDING + (BUTTON_HEIGHT+BUTTON_PADDING) * numButtons);\r\n\t\t\tnumButtons++;\r\n\t\t}\r\n\t\telse\r\n\t\t\tthrow new IllegalArgumentException();\r\n\t}", "private void addButtonsToButtonPanel() {\n // The button to change the login accounts password\n changePasswordButton = new JButton(\"Change Password\");\n changePasswordButton.setPreferredSize(new Dimension(150, 45));\n changePasswordButton.addActionListener(this);\n changePasswordButton.setToolTipText(\"<html> Click this button to change the login accounts <b> password</b>. </html>\");\n changePasswordButton.setIcon(new ImageIcon(\"images/icons/bullet_edit.png\"));\n \n // Adds the change login accounts password to the button panel\n buttonPanel.add(changePasswordButton);\n \n \n // The button to change the login accounts security question and answer\n changeSecurityQ = new JButton(\"Change Security Question & Answer\");\n changeSecurityQ.setPreferredSize(new Dimension(250, 45));\n changeSecurityQ.addActionListener(this);\n changeSecurityQ.setToolTipText(\"<html> Click this button to change the login accounts <b> security question & answer</b>. </html>\");\n changeSecurityQ.setIcon(new ImageIcon(\"images/icons/bullet_edit.png\"));\n \n // Adds the change login accounts security question and answer to the button panel\n buttonPanel.add(changeSecurityQ);\n \n \n // The button to change the login accounts security question and answer\n cancelButton = new JButton(\"Cancel editting\");\n cancelButton.setPreferredSize(new Dimension(150, 45));\n cancelButton.addActionListener(this);\n cancelButton.setToolTipText(\"<html> Click this button to <b> cancel</b> the editing of the login account. </html>\");\n cancelButton.setIcon(new ImageIcon(\"images/icons/cancel.png\"));\n \n // Adds the change login accounts security question and answer to the button panel\n buttonPanel.add(cancelButton);\n \n // Updates the UI of the button panel\n buttonPanel.updateUI();\n }", "private void createAddButton(final Composite parent, final FunctionParameter fp, boolean addEnabled) {\n \t\t// create add button -> left\n\t\tfinal Button addButton = new Button(parent, SWT.PUSH);\n\t\taddButtons.put(fp, addButton);\n \t\taddButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, true, false, 2, 1));\n \t\taddButton.setText(\"Add parameter value\");\n \t\taddButton.setEnabled(addEnabled);\n \n \t\t// create selection listeners\n \t\taddButton.addSelectionListener(new SelectionAdapter() {\n \t\t\t@Override\n \t\t\tpublic void widgetSelected(SelectionEvent e) {\n \t\t\t\t// add text field\n \t\t\t\tList<Pair<Text, Button>> texts = inputFields.get(fp);\n \t\t\t\tboolean removeButtonsDisabled = texts.size() == fp.getMinOccurrence();\n \t\t\t\tPair<Text, Button> added = createField(addButton.getParent(), fp, null);\n \t\t\t\tadded.getFirst().moveAbove(addButton);\n \t\t\t\tadded.getSecond().moveAbove(addButton);\n \t\t\t\t\n \t\t\t\t// update add button\n \t\t\t\tif (texts.size() == fp.getMaxOccurrence())\n \t\t\t\t\taddButton.setEnabled(false);\n \n \t\t\t\t// need to enable all remove buttons or only the new one?\n \t\t\t\tif (removeButtonsDisabled)\n \t\t\t\t\tfor (Pair<Text, Button> pair : texts)\n \t\t\t\t\t\tpair.getSecond().setEnabled(true);\n \t\t\t\telse\n \t\t\t\t\tadded.getSecond().setEnabled(true);\n \n \t\t\t\t// do layout\n \t\t\t\t((Composite) getControl()).layout();\n \t\t\t\t// run validator to update ControlDecoration and updateState\n \t\t\t\tadded.getFirst().setText(\"\");\n \t\t\t\t// pack to make wizard larger if necessary\n \t\t\t\tgetWizard().getShell().pack();\n \t\t\t}\n \t\t});\n \t}", "public Component createNewToolItem() {\r\n Button button = new Button();\r\n gwtToolbarItem.addClasses(button);\r\n button.addStyleName(\"action-bar-tool-item\");\r\n return button;\r\n }", "private JButton getAddButton() {\n if (addButton == null) {\n addButton = new JButton();\n addButton.setText(\"Add User\");\n addButton.setIcon(PortalLookAndFeel.getAddIcon());\n addButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n addUser();\n }\n });\n }\n return addButton;\n }", "private JButton addButton(String label, ActionListener listener) {\n JButton button = new JButton(label);\n Font font = button.getFont();\n font = font.deriveFont(font.getSize() * 1.5f);\n button.setFont(font);\n button.addActionListener(listener);\n button.setFocusPainted(false);\n return button;\n }", "private void makeButtonPanel()\n {\n \n this.buttonPanel.setLayout(new GridLayout(10, 2, 30, 10));\n \n \n this.buttonPanel.add(this.fLabel);\n this.fName.setColumns(COL_WIDTH);\n this.buttonPanel.add(this.fName);\n\n this.buttonPanel.add(this.lLabel);\n this.lName.setColumns(COL_WIDTH);\n this.buttonPanel.add(this.lName);\n\n this.buttonPanel.add(this.idLabel);\n this.iD.setColumns(COL_WIDTH);\n this.buttonPanel.add(this.iD);\n\n this.buttonPanel.add(this.courseLabel);\n this.course.setColumns(COL_WIDTH);\n this.buttonPanel.add(this.course);\n\n this.buttonPanel.add(this.instructorLabel);\n this.instructor.setColumns(COL_WIDTH);\n this.buttonPanel.add(this.instructor);\n\n this.buttonPanel.add(this.tutorLabel);\n this.tutor.setColumns(COL_WIDTH);\n this.buttonPanel.add(this.tutor);\n \n this.buttonPanel.add(this.commentsLable);\n this.comments.setColumns(COL_WIDTH);\n this.buttonPanel.add(this.comments);\n //Removed for appointment tabel\n //this.buttonPanel.add(this.appointmentLable);\n //this.buttonPanel.add(this.appointment);\n this.buttonPanel.add(this.sessionLenLabel);\n this.sessionLength.setColumns(COL_WIDTH);\n this.sessionLength.setText(\"30\");\n this.buttonPanel.add(this.sessionLength);\n\n this.ADD_BUTTON.addActionListener(new AddButtonListener());\n //buttonPanel.add(ADD_BUTTON);\n \n \n this.addSessionPlaceHolder.add(this.buttonPanel);\n }", "public Button addButton(ButtonID buttonId) {\n\t\tfinal Button b = new Button();\n\t\tb.setText(buttonId.title);\n\t\tif (buttonId.icon != null)\n\t\t\tb.setGraphic(new ImageView(buttonId.icon));\n\t\tswitch (buttonId) {\n\t\tcase OK:\n\t\t\tb.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(final ActionEvent event) {\n\t\t\t\t\thandleOk(event);\n\t\t\t\t}\n\t\t\t});\n\t\t\t// TODO fix problematic NPE on VK_ENTER press\n\t\t\t// b.setDefaultButton(true);\n\t\t\tbreak;\n\t\tcase CANCEL:\n\t\t\tb.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(final ActionEvent event) {\n\t\t\t\t\thandleCancel(event);\n\t\t\t\t}\n\t\t\t});\n\t\t\tbreak;\n\t\tcase NEXT:\n\t\t\tb.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(final ActionEvent event) {\n\t\t\t\t\thandleNext(event);\n\t\t\t\t}\n\t\t\t});\n\t\t\tbreak;\n\t\tcase BACK:\n\t\t\tb.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(final ActionEvent event) {\n\t\t\t\t\thandleBack(event);\n\t\t\t\t}\n\t\t\t});\n\t\t\tbreak;\n\t\tcase HELP:\n\t\t\tb.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(final ActionEvent event) {\n\t\t\t\t\thandleHelp(event);\n\t\t\t\t}\n\t\t\t});\n\t\t\tbreak;\n\t\t}\n\t\torderedButtonList.add(b);\n\t\tbuttons.put(buttonId, b);\n\t\treturn b;\n\t}", "private void addButtonsToPanel() {\n\t\tselectionPanel.add(rock, BorderLayout.WEST);\n\t\tselectionPanel.add(paper, BorderLayout.CENTER);\n\t\tselectionPanel.add(scissors, BorderLayout.EAST);\n\n\t\t// Adds a border with given text\n\t\tselectionPanel.setBorder(BorderFactory\n\t\t\t\t.createTitledBorder(\"Choose wisely. . .\"));\n\t}", "public final TButton addButton(final String text, final int x, final int y,\n final TAction action) {\n\n return new TButton(this, text, x, y, action);\n }", "public Button(){\n id=1+nbrButton++;\n setBounds(((id-1)*getDimX())/(Data.getNbrLevelAviable()+1),((id-1)*getDimY())/(Data.getNbrLevelAviable()+1),getDimX()/(2*Data.getNbrLevelAviable()),getDimY()/(2*Data.getNbrLevelAviable()));\n setText(id+\"\");\n setFont(Data.getFont());\n addMouseListener(this);\n setVisible(true);\n }", "ButtonPanel() {\n setLayout(new GridLayout(0,3));\n setPreferredSize(new Dimension(1000,100));\n setVisible(true);\n setMaximumSize(new Dimension(1000,250));\n reservationButton = new JButton(\"Reservation View\");\n bookingButton = new JButton(\"Booking View\");\n searchButton = new JButton(\"Search View\");\n add(reservationButton);\n add(bookingButton);\n add(searchButton);\n \n }", "private void addGraphButton() {\n\t\tgraphButton = new JButton(\"Graph\");\n\t\tadd (graphButton, SOUTH);\n\t\tgraphButton.addActionListener(this);\n\t}", "private void addUndoButton() {\n\t\tundoButton = new EAdSimpleButton(EAdSimpleButton.SimpleButton.UNDO);\n undoButton.setEnabled(false);\n\t\ttoolPanel.add(undoButton);\n\t\tredoButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tcontroller.getCommandManager().undoCommand();\n\t\t\t}\n\n\t\t});\n\t}", "private JPanel createButtonPanel() {\n\t\tJPanel buttonPanel = new JPanel();\n\t\tbuttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS));\n\t\t\n\t\tGridBagConstraints gbc = new GridBagConstraints();\n gbc.gridwidth = GridBagConstraints.REMAINDER;\n gbc.anchor = GridBagConstraints.NORTH;\n gbc.anchor = GridBagConstraints.CENTER;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n\t\t\n\t\tJButton okBtn = new JButton(\"Close\");\n\t\t\n\t\tokBtn.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent event) {\n \tsetVisible(false);\n }\n });\n\t\t\n\t\tJPanel buttons = new JPanel(new GridBagLayout());\n buttons.add(okBtn, gbc);\n \n gbc.weighty = 1;\n\t\tbuttonPanel.add(buttons, gbc);\n\t\tbuttonPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));\n\n\t\treturn buttonPanel;\n\t}", "private JComponent getButtonPanel() {\n JPanel buttonPanel = new JPanel();\n // Open\n OpenAction openAction = new OpenAction();\n buttonPanel.add(new JButton(openAction));\n // Save\n SaveAction saveAction = new SaveAction();\n buttonPanel.add(new JButton(saveAction));\n // Save as\n SaveAsAction saveAsAction = new SaveAsAction(saveAction);\n buttonPanel.add(new JButton(saveAsAction));\n return buttonPanel;\n }", "private void buttonPanel() {\n totalButton = new JButton(\"Calculate Total\");\r\n totalButton.setPreferredSize(new Dimension(150, 60));\r\n\r\n //add an action listener to the total.\r\n totalButton.addActionListener(new TotalButtonListener());\r\n\r\n //create a button to Submit Order.\r\n orderButton = new JButton(\"Submit Order\");\r\n orderButton.setPreferredSize(new Dimension(150, 60));\r\n orderButton.setEnabled(false);\r\n\r\n //add an action listener to the button.\r\n orderButton.addActionListener(new OrderButtonListener());\r\n\r\n //create a button to reset the checkboxes.\r\n resetButton = new JButton(\"Reset\");\r\n resetButton.setPreferredSize(new Dimension(150, 60));\r\n\r\n //add an action listener to the button.\r\n resetButton.addActionListener(new ResetButtonListener());\r\n\r\n //create a button to exit the application.\r\n exitButton = new JButton(\"Exit\");\r\n exitButton.setPreferredSize(new Dimension(150, 60));\r\n\r\n //add an action listener to the button.\r\n exitButton.addActionListener(new ExitButtonListener());\r\n\r\n //put the buttons in their own panel.\r\n buttonPanel = new JPanel();\r\n buttonPanel.setLayout(new GridLayout(1, 4));\r\n buttonPanel.add(totalButton);\r\n buttonPanel.add(orderButton);\r\n buttonPanel.add(resetButton);\r\n buttonPanel.add(exitButton);\r\n }", "private JPanel createButtonPanel()\n\t{\n\t\tfinal String OK_COMMAND = \"Ok\";\n\t\tfinal String CANCEL_COMMAND = \"Cancel\";\n\t\tfinal String APPLY_COMMAND = \"Apply\";\n\n\t\tJPanel buttonPanel = new JPanel();\n\t\tbuttonPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));\n\t\tActionListener buttonListener = new ActionListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tif (e.getActionCommand().equals(OK_COMMAND))\n\t\t\t\t{\n\t\t\t\t\tStyleEditorFrame.this.setVisible(false);\n\n\t\t\t\t\tguiController.displayProgressWhileRebuilding(new Runnable()\n\t\t\t\t\t{\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tStyleEditorFrame.this.applyCurrentStyle();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tStyleEditorFrame.this.getCurrentStyleTree().updateTree();\n\t\t\t\t}\n\t\t\t\telse if (e.getActionCommand().equals(CANCEL_COMMAND))\n\t\t\t\t{\n\t\t\t\t\tStyleEditorFrame.this.setVisible(false);\n\t\t\t\t\tStyleEditorFrame.this.getCurrentStyleTree().updateTree();\n\t\t\t\t}\n\t\t\t\telse if (e.getActionCommand().equals(APPLY_COMMAND))\n\t\t\t\t{\n\t\t\t\t\tguiController.displayProgressWhileRebuilding(new Runnable()\n\t\t\t\t\t{\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tStyleEditorFrame.this.applyCurrentStyle();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tStyleEditorFrame.this.getCurrentStyleTree().updateTree();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t{\n\t\t\tJButton applyButton = new JButton(\"Apply\");\n\t\t\tapplyButton.setActionCommand(APPLY_COMMAND);\n\t\t\tbuttonPanel.add(applyButton);\n\t\t\tapplyButton.addActionListener(buttonListener);\n\t\t}\n\t\t{\n\t\t\tJButton okButton = new JButton(\"Ok\");\n\t\t\tokButton.setActionCommand(OK_COMMAND);\n\t\t\tbuttonPanel.add(okButton);\n\t\t\tokButton.addActionListener(buttonListener);\n\t\t}\n\t\t{\n\t\t\tJButton cancelButton = new JButton(\"Cancel\");\n\t\t\tcancelButton.setActionCommand(CANCEL_COMMAND);\n\t\t\tbuttonPanel.add(cancelButton);\n\t\t\tcancelButton.addActionListener(buttonListener);\n\t\t}\n\n\t\treturn buttonPanel;\n\t}", "ButtonDemo() \n {\n // construct a Button\n bChange = new JButton(\"Click Me!\"); \n\n // add the button to the JFrame\n getContentPane().add( bChange ); \n }", "private JPanel initButtonPanel() {\n JPanel buttonPanel = new JPanel();\n buttonPanel.setLayout(new FlowLayout(SwingUtilities.HORIZONTAL));\n\n completeButton = new JButton(new AbstractAction(\"Complete\") {\n\n @Override\n public void actionPerformed(ActionEvent e) {\n task.setStatus(TaskStatus.COMPLETED);\n dialog.setVisible(false);\n }\n });\n buttonPanel.add(completeButton);\n\n closeButton = new JButton(new AbstractAction(\"Close\") {\n\n @Override\n public void actionPerformed(ActionEvent e) {\n dialog.setVisible(false);\n }\n });\n buttonPanel.add(closeButton);\n\n return buttonPanel;\n }", "private void setButtonPanelComponents(){\n\t\tJPanel buttonPane = new JPanel();\n\t\tbuttonPane.setPreferredSize(new Dimension(-1,32));\n\t\tbuttonPane.setBackground(Constant.DIALOG_BOX_COLOR_BG);\n\t\tbuttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));\n\t\tgetContentPane().add(buttonPane, BorderLayout.SOUTH);\n\t\t\n\t\tsaveButton = Utilities.getInstance().initializeNewButton(\n\t\t\t-1, -1, -1, -1,\n\t\t\tImages.getInstance().saveBtnDialogImg,\n\t\t\tImages.getInstance().saveBtnDialogImgHover\n\t\t);\n\t\tbuttonPane.add(saveButton);\n\t\n\n\t\n\t}", "@Override\n\tpublic Button createButton() {\n\t\treturn new HtmlButton();\n\t}", "public void addButtonToCoolBar(JButton button) {\n\t\t_coolBar.addButton(button);\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void addButton(GuiButton guiButton, boolean enabled)\r\n\t{\r\n\t\tif (!enabled)\r\n\t\t\tguiButton.enabled = false;\r\n\t\t// field_146292_n.add(guiButton);\r\n\t\tbuttonList.add(guiButton);\r\n\t}", "private JButton getJButtonInto() {\r\n\t\tif (jButtonInto == null) {\r\n\t\t\tjButtonInto = new JButton();\r\n\t\t\tjButtonInto.setMargin(new Insets(2, 5, 2, 5));\r\n\t\t\tjButtonInto.setText(\"数据入库\");\r\n\t\t\tjButtonInto.setBounds(new Rectangle(512, 517, 70, 23));\r\n\t\t\tjButtonInto.addMouseListener(new MouseAdapter() {\r\n\t\t\t\tpublic void mouseClicked(java.awt.event.MouseEvent e) {\r\n\t\t\t\t\tDataIntoGui.this.setVisible(false);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButtonInto;\r\n\t}", "private void setupAddToReviewButton() {\n\t\tImageIcon addreview_button_image = new ImageIcon(parent_frame.getResourceFileLocation() + \"addtoreview.png\");\n\t\tJButton add_to_review = new JButton(\"\", addreview_button_image);\n\t\tadd_to_review.setBounds(374, 598, 177, 100);\n\t\tadd_to_review.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\twords_to_add_to_review.add(words_to_spell.get(current_word_number));\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t}\n\t\t});\n\t\tadd_to_review.addMouseListener(new VoxMouseAdapter(add_to_review,null));\n\t\tadd(add_to_review);\n\t}", "@Override\n public void addOpenButton(Component button)\n {\n button.addFeature(new OpenLayoutDivFeature(this));\n }", "@Override\n public Button createButton() {\n return new WindowsButton();\n }", "public void makePurchaseButton() {\r\n JButton purchase = new JButton(\"Purchase premium currency\");\r\n new Button(purchase, main);\r\n// purchase.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// purchase.setPreferredSize(new Dimension(2500, 100));\r\n// purchase.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n purchase.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n doBuyRiotPoints();\r\n }\r\n });\r\n// main.add(purchase);\r\n }", "private void generateButtonPanel() {\n buttonsPanel = new JPanel();\n playPauseButton = addButton(\"Play/Pause\");\n restartButton = addButton(\"Restart\");\n speedUpButton = addButton(\"Speed Up\");\n slowDownButton = addButton(\"Slow Down\");\n loopbackButton = addButton(\"Loopback\");\n keyCommandsButton = addButton(\"Key Commands\");\n textViewButton = addButton(\"Animation Text\");\n\n addShapeButton = addButton(\"Add Shape\");\n removeShapeButton = addButton(\"Remove Shape\");\n addKeyframeButton = addButton(\"Add Keyframe\");\n removeKeyframeButton = addButton(\"Remove Keyframe\");\n editKeyframeButton = addButton(\"Edit Keyframe\");\n clearAnimationButton = addButton(\"Clear Animation\");\n clearShapeButton = addButton(\"Clear Shape\");\n buttonsPanel.setLayout(new FlowLayout());\n\n mainPanel.add(buttonsPanel);\n }", "private JButton getAddQuantityCardButton() {\n\t\tif (addQuantityCardButton == null) {\n\t\t\taddQuantityCardButton = new JButton();\n\t\t\taddQuantityCardButton.setText(\"Добавить\");\n\t\t\taddQuantityCardButton.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tDefaultListModel model = (DefaultListModel) functionList.getModel();\n\t\t\t\t\tParseElement el = new ParseElement((ListElement) cardType.getSelectedItem(), (String)condition.getSelectedItem(), (String)value.getSelectedItem());\n\n\t\t\t\t\t((DefaultListModel) functionList.getModel()).add(model.getSize(), el);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn addQuantityCardButton;\n\t}", "private JPanel createButtons()\r\n\t{\r\n\t\tJPanel buttons = new JPanel();\r\n\t\tbuttons.setLayout(new FlowLayout(FlowLayout.TRAILING));\r\n\r\n\r\n\t\tButton save = new Button(PrimeMain1.texts.getString(\"save\"));\r\n\t\tsave.addActionListener(this);\r\n\t\tsave.setActionCommand(\"save\");\r\n\r\n\t\tButton cancel = new Button(PrimeMain1.texts.getString(\"cancel\"));\r\n\t\tcancel.addActionListener(this);\r\n\t\tcancel.setActionCommand(\"cancel\");\r\n\r\n\r\n\t\tbuttons.add(save);\r\n\t\tbuttons.add(cancel);\r\n\r\n\t\treturn buttons;\r\n\t}", "@Override\n public void addCloseButton(Component button)\n {\n button.addFeature(new CloseLayoutDivFeature(this));\n }", "private JButton addOKButton(){\n\t\tJButton okButton = new JButton(\"OK\");\n\t\tokButton.addActionListener(arg0 -> {\n\t\t\tinfo = new ChannelInfo(nameT.getText(), passwordT.getText(), null);\n\t\t\tsetVisible(false);\n\t\t});\n\t\treturn okButton;\n\t}", "private void addButtons(JPanel contentPanel, GridBagConstraints c) {\n JPanel buttonPanel = new JPanel();\n buttonPanel.setLayout(new GridBagLayout());\n GridBagConstraints gbc = new GridBagConstraints();\n\n JButton addButton = new JButton(buttonText);\n addButton.setFont(new Font(QuizAppUtilities.UI_FONT, Font.PLAIN, 16));\n addButton.addActionListener(new AddListener());\n buttonPanel.add(addButton, gbc);\n\n gbc.gridx = 1;\n gbc.insets = new Insets(0, 20, 0, 0);\n JButton cancelButton = new JButton(\"Cancel\");\n cancelButton.addActionListener(new CancelListener());\n cancelButton.setFont(new Font(QuizAppUtilities.UI_FONT, Font.PLAIN, 16));\n buttonPanel.add(cancelButton, gbc);\n\n c.gridy = 6;\n contentPanel.add(buttonPanel, c);\n }", "public void makeGetRPButton() {\r\n JButton getRP = new JButton(\"Check if a champion can be purchased with Riot Points\");\r\n new Button(getRP, main);\r\n// getRP.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// getRP.setPreferredSize(new Dimension(2500, 100));\r\n// getRP.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n getRP.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n getRiotPointsBalanceDifference();\r\n }\r\n });\r\n// main.add(getRP);\r\n }", "private void addBtnMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_addBtnMousePressed\n addBtn.setBackground(Color.decode(\"#1e5837\"));\n }", "public void addButton(HtmlSubmitButton b) {\r\n\t\t_buttons.add(b);\r\n\t\tadd(b, TYPE_COMP);\r\n\t}", "Button createButton();", "public ButtonPanel(GameFrame gf) {\n gameFrame = gf;\n JPanel buttonPanel = new JPanel();\n setFocusable(false);\n setBackground(new Color(0x696969));\n setLayout(new FlowLayout(FlowLayout.CENTER, 100, 70));\n add(startButton());\n add(saveButton());\n add(loadButton());\n add(resetButton());\n add(exitButton());\n addListeners();\n }", "protected JButton addAddButton(String legend) {\n if (legend != null) {\n AddButton.setText(legend);\n }\n AddButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n EditModel.insertRecord(BottomRow + 1);\n validate();\n repaint();\n }\n });\n AddButton.setEnabled(true);\n return AddButton;\n }", "public void makeObtainButton() {\r\n JButton obtain = new JButton(\"Obtain a new champion using Riot Points\");\r\n new Button(obtain, main);\r\n// obtain.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// obtain.setPreferredSize(new Dimension(2500, 100));\r\n// obtain.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n obtain.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n obtainChampionUsingRiotPoints();\r\n }\r\n });\r\n// main.add(obtain);\r\n }", "public void clickAddButton() {\n\t\tfilePicker.fileManButton(locAddButton);\n\t}", "private void buildAddEditStreetsButton(JPanel panel) {\n JButton addEditStreetsButton = new JButton(localization.get(\"EditStreetsLabel\"));\n addEditStreetsButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent event) {\n StreetEditor editor = new StreetEditor(InfoPanel.this, bindingService);\n editor.run();\n }\n });\n panel.add(addEditStreetsButton);\n }", "public void addButtonListener(ActionListener l)\r\n\t{\r\n\t\tbnt_pane.addButtonListener(l);\r\n\t}", "private void createButtonsForPanel(JPanel queueButtonPanel) {\n JButton playbutton = new JButton(\"Play\");\n JButton addsongbutton = new JButton(\"Add song\");\n playButtonActionListener(playbutton);\n addSongButtonActionListener(addsongbutton);\n queueButtonPanel.add(playbutton);\n queueButtonPanel.add(addsongbutton);\n }", "private void addRedoButton() {\n\t\tredoButton = new EAdSimpleButton(EAdSimpleButton.SimpleButton.REDO);\n redoButton.setEnabled(false);\n\t\ttoolPanel.add(redoButton);\n\t\tredoButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tcontroller.getCommandManager().redoCommand();\n\t\t\t}\n\n\t\t});\n\t}", "public Button addCustomButton(String id, Button button) {\n\t\torderedButtonList.add(button);\n\t\tcustomButtons.put(id, button);\n\t\treturn button;\n\t}", "public javax.swing.JButton getAddButton() {\n return addButton;\n }", "private void setupButtonPanel() {\n\n Dimension btnSize = new Dimension(100, 50);\n\n exitButton = new JButton(\"Exit\");\n playAgainButton = new JButton(\"Play Again\");\n\n exitButton.setPreferredSize(btnSize);\n playAgainButton.setPreferredSize(btnSize);\n\n buttonPanel.add(playAgainButton);\n buttonPanel.add(exitButton);\n fullPanel.add(buttonPanel, BorderLayout.SOUTH);\n\n playAgainButton.addActionListener(actionEvent -> {\n GameOver.this.dispose();\n new MainScreen();\n });\n exitButton.addActionListener(actionEvent -> System.exit(0));\n }", "public ButtonPanel(SnakeFrame snakeFrame) {\n\t\tthis.snakeFrame =snakeFrame;\n\t\t//初始化面板信息\n\t\tinitPanel();\n\t\t//初始化组件信息\n\t\tinitComponents();\n\t\t//添加组件\n\t\taddComponents();\n\t}", "public JButton getAddBtn() {\n\t\treturn addBtn;\n\t}", "private void createButtonPanel()\r\n { \r\n JPanel buttonPanel = new JPanel();\r\n buttonPanel.setLayout(new GridLayout(4, 4));\r\n\r\n buttonPanel.add(makeDigitButton(\"7\"));\r\n buttonPanel.add(makeDigitButton(\"8\"));\r\n buttonPanel.add(makeDigitButton(\"9\"));\r\n buttonPanel.add(makeOperatorButton(\"/\"));\r\n buttonPanel.add(makeDigitButton(\"4\"));\r\n buttonPanel.add(makeDigitButton(\"5\"));\r\n buttonPanel.add(makeDigitButton(\"6\"));\r\n buttonPanel.add(makeOperatorButton(\"*\"));\r\n buttonPanel.add(makeDigitButton(\"1\"));\r\n buttonPanel.add(makeDigitButton(\"2\"));\r\n buttonPanel.add(makeDigitButton(\"3\"));\r\n buttonPanel.add(makeOperatorButton(\"-\"));\r\n buttonPanel.add(makeDigitButton(\"0\"));\r\n buttonPanel.add(makeDigitButton(\".\"));\r\n buttonPanel.add(makeOperatorButton(\"=\"));\r\n buttonPanel.add(makeOperatorButton(\"+\"));\r\n\r\n add(buttonPanel, BorderLayout.CENTER);\r\n }", "public void createButtons() {\n\n addRow = new JButton(\"Add row\");\n add(addRow);\n\n deleteRow = new JButton(\"Delete row\");\n add(deleteRow);\n }", "private JPanel makeButtonPanel()\n {\n // Create the containing panel\n JPanel buttonPanel = new JPanel();\n buttonPanel.setBackground(_backColor);\n\n // Create the CANCEL button\n JButton cancelButton = new JButton(\"CANCEL\");\n // Clear editFlag and data, then return back to main action panel if Cancel is pressed\n // TODO Remove this lambda expressionl; it produces a Javadoc error\n cancelButton.addActionListener((a) -> _hdCiv.back());\n\n // Create the SUBMIT button\n JButton submitButton = new JButton(\"SUBMIT\");\n\n // Display error message if received from submit button, or new Hero if OK\n submitButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent event)\n {\n // Call the Civ to validate the attributes. If no errors, Hero\n // is created and displayed\n EnumMap<PersonKeys, String> input = submit();\n if ((input != null) && (input.size() > 0)) {\n // Create the new Hero and display it\n Hero hero = _nhCiv.createHero(input);\n _hdCiv.displayHero(hero, true); // initial Hero needs true\n }\n }\n });\n\n // Create a little space between buttons\n JLabel space = new JLabel(SPACER);\n // Add the two buttons to the panel\n buttonPanel.add(submitButton);\n buttonPanel.add(space);\n buttonPanel.add(cancelButton);\n return buttonPanel;\n }", "public JButtonsPanel() {\r\n setBorder(BorderFactory.createEtchedBorder(Color.GREEN, new Color(148, 145, 140)));\r\n\r\n jOpen.setText(BTN_OPEN);\r\n jOpen.setToolTipText(MSG_OPEN);\r\n jOpen.setBounds(new Rectangle(BTN_LEFT, BTN_VSPACE, BTN_WIDTH, BTN_HEIGHT));\r\n add(jOpen);\r\n\r\n jCheckHealth.setText(BTN_CHECK_HEALTH);\r\n jCheckHealth.setToolTipText(MSG_CHECK_HEALTH);\r\n jCheckHealth.setBounds(new Rectangle(BTN_LEFT, (int) (jOpen.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jCheckHealth);\r\n\r\n jClose.setText(BTN_CLOSE);\r\n jClose.setToolTipText(MSG_CLOSE);\r\n jClose.setBounds(new Rectangle(BTN_LEFT, (int) (jCheckHealth.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jClose);\r\n\r\n jClaim.setText(BTN_CLAIM);\r\n jClaim.setToolTipText(MSG_CLAIM);\r\n jClaim.setBounds(new Rectangle(BTN_LEFT, (int) (jClose.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jClaim);\r\n\r\n jRelease.setText(BTN_RELEASE);\r\n jRelease.setToolTipText(MSG_RELEASE);\r\n jRelease.setBounds(new Rectangle(BTN_LEFT, (int) (jClaim.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jRelease);\r\n\r\n jDeviceEnable.setText(BTN_DEVICE_ENABLE);\r\n jDeviceEnable.setToolTipText(MSG_DEVICE_ENABLE);\r\n jDeviceEnable.setBounds(new Rectangle(BTN_LEFT, (int) (jRelease.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jDeviceEnable);\r\n\r\n jDeviceDisable.setText(BTN_DEVICE_DISABLE);\r\n jDeviceDisable.setToolTipText(MSG_DEVICE_DISABLE);\r\n jDeviceDisable.setBounds(new Rectangle(BTN_LEFT, (int) (jDeviceEnable.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jDeviceDisable);\r\n\r\n jClearData.setText(BTN_CLEAR_DATA);\r\n jClearData.setToolTipText(MSG_CLEAR_DATA);\r\n jClearData.setBounds(new Rectangle(BTN_LEFT, (int) (jDeviceDisable.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jClearData);\r\n\r\n jBeginEnrollCapture.setText(BTN_BEGIN_ENROLL_CAPTURE);\r\n jBeginEnrollCapture.setToolTipText(MSG_BEGIN_ENROLL_CAPTURE);\r\n jBeginEnrollCapture.setBounds(new Rectangle(BTN_LEFT, (int) (jClearData.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jBeginEnrollCapture);\r\n\r\n jEndCapture.setText(BTN_END_CAPTURE);\r\n jEndCapture.setToolTipText(MSG_END_CAPTURE);\r\n jEndCapture.setBounds(new Rectangle(BTN_LEFT, (int) (jBeginEnrollCapture.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jEndCapture);\r\n\r\n jBeginVerifyCapture.setText(BTN_BEGIN_VERIFY_CAPTURE);\r\n jBeginVerifyCapture.setToolTipText(MSG_BEGIN_VERIFY_CAPTURE);\r\n jBeginVerifyCapture.setBounds(new Rectangle(BTN_LEFT, (int) (jEndCapture.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jBeginVerifyCapture);\r\n\r\n jIdentifyMatch.setText(BTN_IDENTIFY_MATCH);\r\n jIdentifyMatch.setToolTipText(MSG_IDENTIFY_MATCH);\r\n jIdentifyMatch.setBounds(new Rectangle(BTN_LEFT, (int) (jBeginVerifyCapture.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jIdentifyMatch);\r\n\r\n jVerifyMatch.setText(BTN_VERIFY_MATCH);\r\n jVerifyMatch.setToolTipText(MSG_VERIFY_MATCH);\r\n jVerifyMatch.setBounds(new Rectangle(BTN_LEFT, (int) (jIdentifyMatch.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jVerifyMatch);\r\n\r\n jIdentify.setText(BTN_IDENTIFY);\r\n jIdentify.setToolTipText(MSG_IDENTIFY);\r\n jIdentify.setBounds(new Rectangle(BTN_LEFT, (int) (jVerifyMatch.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jIdentify);\r\n\r\n jVerify.setText(BTN_VERIFY);\r\n jVerify.setToolTipText(MSG_VERIFY);\r\n jVerify.setBounds(new Rectangle(BTN_LEFT, (int) (jIdentify.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jVerify);\r\n }", "protected void createButtons(Panel panel) {\n panel.add(new Filler(24,20));\n\n Choice drawingChoice = new Choice();\n drawingChoice.addItem(fgUntitled);\n\n\t String param = getParameter(\"DRAWINGS\");\n\t if (param == null)\n\t param = \"\";\n \tStringTokenizer st = new StringTokenizer(param);\n while (st.hasMoreTokens())\n drawingChoice.addItem(st.nextToken());\n // offer choice only if more than one\n if (drawingChoice.getItemCount() > 1)\n panel.add(drawingChoice);\n else\n panel.add(new Label(fgUntitled));\n\n\t\tdrawingChoice.addItemListener(\n\t\t new ItemListener() {\n\t\t public void itemStateChanged(ItemEvent e) {\n\t\t if (e.getStateChange() == ItemEvent.SELECTED) {\n\t\t loadDrawing((String)e.getItem());\n\t\t }\n\t\t }\n\t\t }\n\t\t);\n\n panel.add(new Filler(6,20));\n\n Button button;\n button = new CommandButton(new DeleteCommand(\"Delete\", fView));\n panel.add(button);\n\n button = new CommandButton(new DuplicateCommand(\"Duplicate\", fView));\n panel.add(button);\n\n button = new CommandButton(new GroupCommand(\"Group\", fView));\n panel.add(button);\n\n button = new CommandButton(new UngroupCommand(\"Ungroup\", fView));\n panel.add(button);\n\n button = new Button(\"Help\");\n\t\tbutton.addActionListener(\n\t\t new ActionListener() {\n\t\t public void actionPerformed(ActionEvent event) {\n\t\t showHelp();\n\t\t }\n\t\t }\n\t\t);\n panel.add(button);\n\n fUpdateButton = new Button(\"Simple Update\");\n\t\tfUpdateButton.addActionListener(\n\t\t new ActionListener() {\n\t\t public void actionPerformed(ActionEvent event) {\n if (fSimpleUpdate)\n setBufferedDisplayUpdate();\n else\n setSimpleDisplayUpdate();\n\t\t }\n\t\t }\n\t\t);\n\n // panel.add(fUpdateButton); // not shown currently\n }", "private void createPanel() {\n JPanel panel = new JPanel();\n \n for(int i = 0; i < button.size(); i++){\n panel.add(button.get(i));\n }\n panel.add(label);\n \n add(panel);\n }", "public void createFinishedButton() {\n\t\tJButton finished = new JButton(\"Click here when finished inputting selected champions\");\n\t\tfinished.setName(\"finished\");\n\t\tfinished.setBackground(Color.GRAY);\n\t\tfinished.setForeground(Color.WHITE);\n\t\tfinished.setBorderPainted(false);\n\t\tfinished.addActionListener(this);\n\t\tfinished.setBounds(400, 50, 400, 100);\n\t\tbottomPanel.add(finished, new Integer(4));\n\t}", "private JPanel getButtonPanel() {\n\t\tif (buttonPanel == null) {\n\t\t\tFlowLayout flowLayout = new FlowLayout();\n\t\t\tflowLayout.setAlignment(java.awt.FlowLayout.RIGHT);\n\t\t\tbuttonPanel = new JPanel();\n\t\t\tbuttonPanel.setLayout(flowLayout);\n\t\t\tbuttonPanel.add(getOkButton(), null);\n\t\t}\n\t\treturn buttonPanel;\n\t}", "private JButton getCmdAdd() {\r\n\t\tif (cmdAdd == null) {\r\n\t\t\tcmdAdd = new JButton();\r\n\t\t\tcmdAdd.setText(\"\");\r\n\t\t\tcmdAdd.setToolTipText(\"Add single proxy\");\r\n\t\t\tcmdAdd.setIcon(new ImageIcon(getClass().getResource(\"/add.png\")));\r\n\t\t\tcmdAdd.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\taddProxy = getJDialog();\r\n\t\t\t\t\taddProxy.pack();\r\n\t\t\t\t\taddProxy.setSize(new Dimension(231, 144));\r\n\t\t\t\t\taddProxy.setLocationRelativeTo(jContentPane);\r\n\t\t\t\t\taddProxy.setVisible(true);\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\r\n\t\t}\r\n\t\treturn cmdAdd;\r\n\t}", "private void initPanelButtons() {\r\n\t\tthis.panelButtons = new JPanel(new GridBagLayout());\r\n\t\tthis.panelButtons.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 5));\r\n\t\tthis.panelButtons.setOpaque(false);\r\n\t\tGridBagConstraints gbc = new GridBagConstraints();\r\n\r\n\t\tgbc.gridx = 0;\r\n\t\tgbc.gridy = 0;\r\n\t\tgbc.gridwidth = 1;\r\n\t\tgbc.gridheight = 1;\r\n\t\tgbc.weightx = 1;\r\n\t\tgbc.weighty = 1;\r\n\t\tthis.returnButton.setBackground(ConstantView.COLOR_BUTTON_LOGIN);\r\n\t\tthis.returnButton.setForeground(Color.WHITE);\r\n\t\tthis.returnButton.setFocusable(false);\r\n\t\tthis.returnButton.setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\t\tthis.returnButton.setFont(ConstantView.FONT_PRINCIPAL_LABELS);\r\n\t\tthis.panelButtons.add(returnButton, gbc);\r\n\r\n\t\tgbc.gridx = 7;\r\n\t\tthis.okButton.setBackground(ConstantView.COLOR_BUTTON_LOGIN);\r\n\t\tthis.okButton.setForeground(Color.WHITE);\r\n\t\tthis.okButton.setFocusable(false);\r\n\t\tthis.okButton.setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\t\tthis.okButton.setFont(ConstantView.FONT_PRINCIPAL_LABELS);\r\n\t\tthis.okButton.addActionListener(ControlClient.getInstance());\r\n\t\tthis.okButton.setActionCommand(ClientCommands.OK_SIGN_IN.toString());\r\n\t\tthis.panelButtons.add(okButton, gbc);\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\taddBtn.setEnabled(true);\n\t\t\t}", "public void makeReceiveButton() {\r\n JButton receive = new JButton(\"Receive a new champion recommendation\");\r\n new Button(receive, main);\r\n// receive.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// receive.setPreferredSize(new Dimension(2500, 100));\r\n// receive.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n receive.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n receiveChampionRecommendation();\r\n }\r\n });\r\n// main.add(receive);\r\n }", "public void add(JRadioButton button, E enumValue, JComponent panel) {\n add(button, enumValue);\n panel.add(button);\n }", "private static void assembleAddPanel(){\n addPanel.add(addPlayerNameLabel);\n addPanel.add(newPlayerNameTextBox);\n addPlayerButton.addStyleName(\"add-button\");\n newPlayerNameTextBox.addStyleName(\"player-name-textbox\");\n addPlayerButton.addStyleName(\"btn btn-default\");\n resetRosterButton.addStyleName(\"btn btn-default\");\n addPlayerButton.setHTML(\"<span class=\\\"glyphicon glyphicon-plus\\\" aria-hidden=\\\"true\\\"></span>Add Player\");\n resetRosterButton.setHTML(\"<span class=\\\"glyphicon glyphicon-repeat\\\" aria-hidden=\\\"true\\\"></span>Reset All\");\n }", "public void addButtonToContainer(Button button) {\n if (!buttonContainer.contains(button)) {\n buttonContainer.add(button);\n button.setOnAction(event -> onBlockedUserClicked(button));\n }\n }", "private JPanel createAddAndRemoveButtons() {\n JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEADING));\n panel.add(createAddResourceButton());\n panel.add(createRemoveResourceButton());\n\n return panel;\n }", "private void addJMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addJMenuItemActionPerformed\n addJButton.doClick();\n }", "private JPanel createControllerButtonsPanel() {\n\t\tJPanel buttonPanel = new JPanel();\n\t\tJButton addSib = new JButton(\"Add Sibling\");\n\t\tJButton addChld = new JButton(\"Add Child\");\n\t\tJButton remNode = new JButton(\"Remove\");\n\t\tJButton remRoot = new JButton(\"Remove Root\");\n\t\tbuttonPanel.add(addSib);\n\t\tbuttonPanel.add(addChld);\n\t\tbuttonPanel.add(remNode);\n\n\t\t// adding a sibling action!\n\t\taddSib.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\t// Identify the node that has been selected\n\t\t\t\tDefaultMutableTreeNode selected = (DefaultMutableTreeNode) tree\n\t\t\t\t\t\t.getLastSelectedPathComponent();\n\t\t\t\tif (selected == null) return;\n\n\t\t\t\t// get the parent of the selected node\n\t\t\t\tDefaultMutableTreeNode parent = (DefaultMutableTreeNode) selected\n\t\t\t\t\t\t.getParent();\n\t\t\t\tif (parent == null)\n\t\t\t\t\treturn;\n\n\t\t\t\t// add a new node after the selected node as a child of the\n\t\t\t\t// selected node's parent\n\t\t\t\t// We add item to the MODEL! The view automatically updates.\n\t\t\t\ttModel.insertNodeInto(new DefaultMutableTreeNode(\"New Node\"),\n\t\t\t\t\t\tparent, parent.getIndex(selected) + 1);\n\n\t\t\t\t/*\n\t\t\t\t * Note: additions are done to the model, not the view. See\n\t\t\t\t * below for the treeModelListener methods.\n\t\t\t\t */\n\t\t\t}\n\t\t});\n\n\t\t// similar method for adding a child node of a selected node: note the\n\t\t// usage the getChildCount()\n\t\taddChld.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\t// Identify the node that has been selected\n\t\t\t\tDefaultMutableTreeNode selected = (DefaultMutableTreeNode) tree\n\t\t\t\t\t\t.getLastSelectedPathComponent();\n\t\t\t\tif (selected == null)\n\t\t\t\t\treturn;\n\n\t\t\t\t// add a new node as the last child of the selected node\n\t\t\t\ttModel.insertNodeInto(new DefaultMutableTreeNode(\"New Node\"),\n\t\t\t\t\t\tselected, selected.getChildCount());\n\n\t\t\t\t// Lets also expand the tree to show the new node\n\t\t\t\t// Find the array of nodes that make up the path from the root\n\t\t\t\t// to the newly added node\n\t\t\t\tTreeNode[] nodes = tModel.getPathToRoot(selected\n\t\t\t\t\t\t.getChildAt(selected.getChildCount() - 1));\n\n\t\t\t\t// Create a tree path with these nodes\n\t\t\t\tTreePath path = new TreePath(nodes);\n\t\t\t\t// Make the entire path visible and make the scroller to move to\n\t\t\t\t// the last path component\n\t\t\t\ttree.scrollPathToVisible(path);\n\t\t\t}\n\t\t});\n\n\t\t// remove some selected node: you cannot remove the root node\n\t\tremNode.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\t// Identify the node that has been selected\n\t\t\t\tDefaultMutableTreeNode selected = (DefaultMutableTreeNode) tree\n\t\t\t\t\t\t.getLastSelectedPathComponent();\n\t\t\t\tif (selected == null) return;\n\t\t\t\t\n\t\t\t\t// Identify the parent of the selected node; we are not allowing\n\t\t\t\t// the root node to be removed\n\t\t\t\tif (selected.getParent() == null)\n\t\t\t\t\treturn;\n\n\t\t\t\t// User the models remove method to remove the selected node\n\t\t\t\ttModel.removeNodeFromParent(selected);\n\t\t\t}\n\t\t});\n\n\t\treturn buttonPanel;\n\n\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tAllSongs allSongs = new AllSongs();\n\t\t\t\t\t// AllSongs allSongs = new AllSongs();\n\t\t\t\t\tJPanel jp = allSongs.displaySongsOnThePanel(new File(playListPath), false);\n\t\t\t\t\tjavax.swing.GroupLayout allSongsLayout = new javax.swing.GroupLayout(jp);\n\t\t\t\t\tjp.setLayout(allSongsLayout);\n\t\t\t\t\tallSongsLayout.setHorizontalGroup(\n\t\t\t\t\t\t\tallSongsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 510,\n\t\t\t\t\t\t\t\t\tShort.MAX_VALUE));\n\t\t\t\t\tallSongsLayout.setVerticalGroup(\n\t\t\t\t\t\t\tallSongsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 420,\n\t\t\t\t\t\t\t\t\tShort.MAX_VALUE));\n\t\t\t\t\t// JFrame frame3 = new JFrame();\n\t\t\t\t\t// frame3.setSize(500,500);\n\t\t\t\t\t// frame3.setLocation(300,200);\n\t\t\t\t\t// frame3.add(jp);\n\t\t\t\t\t// frame3.setVisible(true);\n//\t\t\t\t\tMusicPlayer.window.add(jp);\n\t\t\t\t\tMusicPlayer.window.getContentPane().add(jp);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(playListFile));\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t\t/*\n\t\t\t\t\t * On click of crete playlist button, I should be able to\n\t\t\t\t\t * create another button and add it to the panel\n\t\t\t\t\t * ????????????\n\t\t\t\t\t */\n\n\t\t\t\t}" ]
[ "0.7940039", "0.7797184", "0.7622967", "0.7481208", "0.74220043", "0.73528165", "0.7249088", "0.72074187", "0.7203826", "0.713491", "0.70704496", "0.7017589", "0.6993338", "0.6916304", "0.6895682", "0.6879013", "0.68180573", "0.68091244", "0.6779763", "0.6774182", "0.67551756", "0.67511374", "0.6746476", "0.6724033", "0.67204505", "0.6711733", "0.66925377", "0.66923153", "0.66825914", "0.66724724", "0.6671748", "0.6661407", "0.66608596", "0.6637712", "0.6613814", "0.66077733", "0.65967685", "0.65864325", "0.65667355", "0.65629023", "0.6550641", "0.65397793", "0.6524302", "0.65171754", "0.6516086", "0.65144455", "0.6509667", "0.6509192", "0.6486145", "0.6484022", "0.6473356", "0.64649594", "0.6438654", "0.64326113", "0.6425005", "0.64239025", "0.6413672", "0.6406741", "0.6403164", "0.640047", "0.6381753", "0.6371332", "0.63697815", "0.6367391", "0.6364166", "0.63607454", "0.6360112", "0.6358448", "0.63565654", "0.63449156", "0.634179", "0.63382685", "0.6336468", "0.6332464", "0.63211787", "0.6316322", "0.6314327", "0.63134927", "0.63048035", "0.6300666", "0.6281324", "0.6272872", "0.62727976", "0.6272459", "0.6270382", "0.62664056", "0.6266091", "0.6264278", "0.6263006", "0.6261044", "0.62599146", "0.6248173", "0.624259", "0.6237142", "0.62367564", "0.6236645", "0.6225945", "0.6216127", "0.62127423", "0.62126684" ]
0.74325466
4
An interface action has been performed. Find out what it was and handle it.
public void actionPerformed(ActionEvent event) { if (event.getActionCommand().equals("HEX")) { if (CalcEngine.HexaMode) { CalcEngine.HexaMode = false; } else { CalcEngine.HexaMode = true; } hexToggle(); } else { try { CalcEngine.stringInput(event.getActionCommand()); } catch (StackUnderflow e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } redisplay(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}", "abstract public void performAction();", "public abstract void onAction();", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "public interface UIAction {\n}", "public void interfaceMethod() {\n\t\tSystem.out.println(\"overriden method from interface\");\t\t\r\n\t}", "interface Action {\n /**\n * Executes the action. Called upon state entry or exit by an automaton.\n */\n void execute();\n }", "@Override\n\tpublic void action() {\n\n\t}", "protected abstract void actionExecuted(SUT system, State state, Action action);", "@Override\n public void onResult(final AIResponse result) {\n DobbyLog.i(\"Action: \" + result.getResult().getAction());\n }", "@Override\n protected void doAct() {\n }", "@Override\r\n\t\tpublic void action()\r\n\t\t{\r\n// throw new UnsupportedOperationException(\"Not supported yet.\");\r\n\t\t}", "public void performAction(HandlerData actionInfo) throws ActionException;", "@Override\r\n protected void doActionDelegate(int actionId)\r\n {\n \r\n }", "public void performAction() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public abstract void action();", "public abstract void action();", "public abstract void action();", "public abstract void action();", "public void actionSuccessful() {\n System.out.println(\"Action performed successfully!\");\n }", "public interface ActionCallBack {\n void acceptOrder(int position);\n void cancelOrder(int position);\n void readyToDeliver(int position);\n void showDetails(int position);\n\n\n\n}", "public void executeAction( String actionInfo );", "public void performAction();", "void actionCompleted(ActionLookupData actionLookupData);", "public interface ActivityAction {\r\n public void viewedActivity(String condition, String viewerFullName);\r\n}", "public interface SCDialogCallback {\n\tpublic void onAction1();\n\tpublic void onAction2();\n\tpublic void onAction3();\n\tpublic void onAction4();\n}", "public interface Action {\n void doSomething();\n}", "public interface Action {\n void doAction(GameState state);\n}", "@Override\n public void actionPerformed(ActionEvent e) {\n handleAction();\n }", "abstract protected String performAction(String input);", "public interface ActionHandler {\n ModelApiResponse handleActionChoice(ActionChoice choice);\n List<AvailableActions> getActionsCurrentlyAvailable();\n}", "public interface ICommandDisplayAction extends IAction{\r\n\r\n\t \r\n\t\r\n\tpublic void displayPallet() ;\r\n\r\n\tpublic void displayArena();\r\n\t\r\n\tpublic void displayComponent(String componentIntanceName) ;\r\n\t\r\n\tpublic void displayChain( ) ;\r\n}", "protected abstract void action(Object obj);", "@Override\n\tpublic void HandleEvent(int action) {\n\t\tsetActiveAction(action);\n\t\tSystem.out.println(\"action is :\" + action);\n\t\t\n\t}", "protected void ACTION_B_SELECT(ActionEvent arg0) {\n\t\tchoseInterface();\r\n\t}", "@Override\r\n\tpublic void actionFly() {\n\t\tSystem.out.println(\"날 수 있다.\");\r\n\t}", "@Override\n\tpublic void handleAction(Action action, Object sender, Object target) {\n\t\t\n\t}", "public void action() {\n action.action();\n }", "public interface Action {\n String execute(GameController gameController);\n}", "public interface ChoiceAction {\n}", "public void doAction(){}", "@Override\n public void action() {\n System.out.println(\"do some thing...\");\n }", "public interface InputDialogCallback {\n public void onAction1(String response);\n public void onAction2();\n\n}", "public void processAction(CIDAction action);", "@Override\n\tpublic void step(int actionType) {\n\n\t}", "protected abstract void executeActionsIfError();", "@Override\n public void act() {\n }", "public boolean onPerformAccessibilityAction(int i, Bundle bundle) {\n throw new IllegalStateException(\"Not implemented.\");\n }", "default void onActionFrame(GameIO io, GameState move) {}", "public void takeAction(BoardGameController.BoardBugAction action)\n {\n\n }", "public void actionOffered();", "@Override\r\n\tpublic void act() {\n\t\tausgeben();\r\n\t}", "public abstract ActionInMatch act();", "public interface OnClick{\n void action();\n }", "public interface ActionCompletedReceiver {\n /** Receives a completed action. */\n void actionCompleted(ActionLookupData actionLookupData);\n /** Notes that an action has started, giving the key. */\n void noteActionEvaluationStarted(ActionLookupData actionLookupData, Action action);\n }", "void determineNextAction();", "public interface IBiz{\n\tpublic void BizCallBack(Action action);//biz层接口\n}", "public void userAction(ElementInstance ei) {\r\n\t\t\r\n\t}", "public interface UserControllerCallback {\n void userAction(int code);\n}", "interface Action {\n void process(AbstractMessagingService serviceAction,\n Message message);\n\n }", "public interface IActionCallBack {\n\n /**\n *\n * @param action action\n * @return will be execute this action\n */\n boolean onPreExecute(IAction action);\n\n /**\n *\n * @param action\n * @param result\n */\n void onExecuteDone(IAction action, ActionResult result);\n\n void onExecuteCancel(IAction action);\n\n}", "@Override\r\n\t\t\tpublic void handle(ActionEvent arg0) {\n\t\t\t}", "public void action() {\n }", "@Override public void action() {\n //Do Nothing\n assert(checkRep());\n }", "@Override\n\t\t\tpublic void dealWithCustomAction(Context context, UMessage msg)\n\t\t\t{\n\t\t\t}", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "void noteActionEvaluationStarted(ActionLookupData actionLookupData, Action action);", "public interface ActionDelegate {\n /** Performs some actions in response to a user's choosing entering a Project Name on the wizardS. */\n void onSelectProject();\n \n \n\n }", "public interface Action {\n void buy();\n\n void sell();\n\n void drop();\n\n void pickup();\n\n}", "public interface EventPlayerActionsUpdate {\n\tpublic void handleEventPlayerActionsUpdate( World world, List<Action> availableActions );\n}", "public void interactWhenApproaching() {\r\n\t\t\r\n\t}", "@Override\n public void onAction(RPObject player, RPAction action) {\n }", "public interface Action { //придумываем интерфейс для описания действий, присущих роботу\n Action dogo(MapOfAction mapOfAction); //объявляем функцию для действий, которой передаём карту\n\n}", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void onActionStart(int action) {\n\t\t\n\t}", "public abstract Action getAction();", "public interface BaseballActionViewController {\n //void init();\n //void show();\n //void dismiss();\n}", "@Override\n public void onSupportActionModeFinished(ActionMode mode) {\n }", "@Override\n\tpublic void doExecute(Runnable action) {\n\t\t\n\t}", "public abstract boolean execute(ActionContext actionContext)\n throws Exception;", "@Override\n\tpublic void onActionError(int action, String message) {\n\t\t\n\t}", "public interface OnClickCallBack\n{\n public void onUIupdate();\n}", "public interface TriggerAction {\n\t\tpublic void click();\n\t}", "private void act() {\n\t\tmyAction.embodiment();\n\t}", "public abstract void executeActionButton();", "@Override\n public void accept(Action action) {\n }", "@Override\r\n\tpublic void performAction(Event e) {\n\r\n\t}", "public interface OnActionSelectedListener {\n\t\t\tpublic void onActionSelected(Tweet tweet, String action);\n\t}", "@Override\r\n\tpublic void performAction(Client client, RentUnit rentUnit) {\n\t\tSystem.err.println(\"Program was not implemented\");\r\n\t}" ]
[ "0.6466983", "0.6466983", "0.6466983", "0.6315764", "0.62947905", "0.6291376", "0.62909204", "0.6268702", "0.61953217", "0.6162881", "0.6138673", "0.61137766", "0.61011", "0.6094395", "0.6079277", "0.6060605", "0.602848", "0.6019337", "0.6016047", "0.6016047", "0.6016047", "0.6016047", "0.5999067", "0.59612656", "0.5952424", "0.5948669", "0.594763", "0.5942349", "0.5936369", "0.59314686", "0.59305763", "0.5925682", "0.5920186", "0.59183455", "0.59067565", "0.5904839", "0.58865774", "0.58732593", "0.5871646", "0.5856789", "0.5855173", "0.5848493", "0.58436286", "0.58175904", "0.57939965", "0.57917506", "0.57826895", "0.57688457", "0.57600373", "0.57575005", "0.5743104", "0.5740025", "0.5732916", "0.57323307", "0.57099", "0.5678017", "0.5666528", "0.5665402", "0.56540465", "0.56420434", "0.56404215", "0.5638546", "0.56294215", "0.5626949", "0.56265724", "0.56258935", "0.56253815", "0.56115365", "0.56107736", "0.56107736", "0.5606413", "0.5602708", "0.5589891", "0.5587277", "0.55847377", "0.5570392", "0.5566185", "0.5560917", "0.5560917", "0.5560917", "0.5560917", "0.5560917", "0.5560917", "0.5560917", "0.5560917", "0.55518025", "0.5550693", "0.5549483", "0.5545464", "0.55430347", "0.55425614", "0.5538191", "0.55216813", "0.5520743", "0.5519308", "0.551898", "0.5518223", "0.55110687", "0.5508776", "0.55071336", "0.5505942" ]
0.0
-1
/ Creates a toggle for HexaMode
private void hexToggle() { JPanel content = (JPanel) frame.getContentPane(); JPanel innerContent = (JPanel) content.getComponents()[1]; Component[] com = innerContent.getComponents(); for (Component button : com) { if (button instanceof JButton) { JButton hexButton = (JButton) button; if (hexButton.getText().matches("[A-F]")) { if (hexButton.isVisible()) { hexButton.setVisible(false); } else hexButton.setVisible(true); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void toggleEnable();", "public Toggle (Boolean setting, String name){\r\n \t\t\tthis.setting = setting;\r\n \t\t\tthis.name = name;\r\n \t\t\ttrueName = \"enabled\"; //Default names.\r\n \t\t\tfalseName = \"disabled\";\r\n \t\t}", "public void toHexMode(){\r\n for(int i=2;i<numbers.length;i++){\r\n numbers[i].setEnabled(true);\r\n }\r\n for(JButton letter : letters){\r\n letter.setEnabled(true);\r\n }\r\n this.revalidate();\r\n this.repaint();\r\n }", "public void toggle(){\n isOn = !isOn;\n }", "public ToggleButton()\n {\n this(true);\n }", "private void toggle(int a) {\n\t\ttry {\r\n\t\t\tfor (int i = 0; i < et.size(); i++) {\r\n\t\t\t\ttoogleOne(et.get(i), el.get(i), false);\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < toggle; i++) {\r\n\t\t\t\ttoogleOne(et.get(i), el.get(i), true);\r\n\t\t\t}\r\n\t\t\tlogp(INFO, getClassName(GraphicalUserInterface.class), \"toggle\", String.join(getSpace(), \"T\".concat(Library.toString(a)), \"Activated\"));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tlogp(INFO, getClassName(GraphicalUserInterface.class), \"toggle\", String.join(getSpace(), \"Error\", \"Activated\"));\r\n\t\t}\r\n\t}", "public Toggle (Boolean setting, String name, String trueName, String falseName){\r\n \t\t\tthis.setting = setting;\r\n \t\t\tthis.name = name;\r\n \t\t\tthis.trueName = trueName;\r\n \t\t\tthis.falseName = falseName;\r\n \t\t}", "void toggle();", "void enableFlipMode();", "public abstract void toggle();", "public void toggle(){\r\n isDown = !isDown;\r\n }", "public native static MenuItemToggle create();", "private JToggleButton getTglKeypad() {\r\n\t\tif (tglKeypad == null) {\r\n\t\t\ttglKeypad = new JToggleButton();\r\n\t\t\ttglKeypad.setText(\" # \");\r\n\t\t\ttglKeypad.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\ttlbKeypad.setVisible(tglKeypad.isSelected());\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn tglKeypad;\r\n\t}", "public Dargle toggle()\n\t{ m_bBoolean = ! m_bBoolean ; return this ; }", "@Override\n public void Toggle() {\n\t \n }", "public void onToggleClicked(View view) {\n boolean on = ((ToggleButton) view).isChecked();\n if (on) {\n if (!BA.isEnabled()) {\n Intent turnOn = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(turnOn, 0);\n Toast.makeText(getApplicationContext(), \"Turned on\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(getApplicationContext(), \"Already on\", Toast.LENGTH_LONG).show();\n }\n } else {\n BA.disable();\n Toast.makeText(getApplicationContext(), \"Turned off\", Toast.LENGTH_LONG).show();\n }\n }", "public void toggle() {\n if (isOn()) {\n turnOff();\n } else {\n turnOn();\n }\n }", "public ToggleControl() {\n\t\tfieldName = \"Untitled Control\";\n\t\tvalue = false;\n\t}", "public void toggle() { this.isOpen = !this.isOpen; }", "void setShutterLEDState(boolean on);", "public void setHexagon(boolean newStatus) {\n hexagon = newStatus;\n if (hexagon) {\n neighborEvenColIndex = new int[]{-1, -1, 0, 1, 0, -1};\n neighborOddColIndex = new int[]{-1, 0, 1, 1, 1, 0};\n neighborRowIndex = new int[]{0, -1, -1, 0, 1, 1};\n }\n }", "public void setToggle(boolean value) {\n getElement().setToggle(value);\n }", "@Override\r\n\t\t\t public void onClick(View v) {\n\t\t\t\t bFlagZhaopin = !bFlagZhaopin;\r\n\t\t\t\t zhaopin_btn.setChecked(bFlagZhaopin);\r\n\t\t\t }", "public void turn_on () {\n this.on = true;\n }", "@Override\r\n\tpublic void handle(ActionEvent event) {\r\n\t\tString command = ((ToggleButton) event.getSource()).getText();\r\n\t\tthis.view.getPaintPanel().setMode(command);\r\n\t\t\r\n\t}", "protected void choixModeTri(){\r\n boolean choix = false;\r\n OPMode.menuChoix=true;\r\n OPMode.telemetryProxy.addLine(\"**** CHOIX DU MODE DE TRI ****\");\r\n OPMode.telemetryProxy.addLine(\" Bouton X : GAUCHE\");\r\n OPMode.telemetryProxy.addLine(\" Bouton B : DROITE\");\r\n OPMode.telemetryProxy.addLine(\" Bouton Y : UNE SEULE COULEUR\");\r\n OPMode.telemetryProxy.addLine(\" Bouton A : MANUEL\");\r\n OPMode.telemetryProxy.addLine(\" CHOIX ? .........\");\r\n OPMode.telemetryProxy.update();\r\n while (!choix){\r\n if (gamepad.x){\r\n OPMode.modeTri = ModeTri.GAUCHE;\r\n choix = true;\r\n }\r\n if (gamepad.b){\r\n OPMode.modeTri = ModeTri.DROITE;\r\n choix = true;\r\n }\r\n if (gamepad.y){\r\n OPMode.modeTri = ModeTri.UNI;\r\n choix = true;\r\n }\r\n if (gamepad.a){\r\n OPMode.modeTri = ModeTri.MANUEL;\r\n choix = true;\r\n }\r\n }\r\n OPMode.menuChoix = false;\r\n\r\n }", "void setNightModeState(boolean b);", "@DISPID(1611006088) //= 0x60060088. The runtime will prefer the VTID if present\n @VTID(164)\n void trueColorMode(\n boolean oActivated);", "public void toggleMode() {\n if (edit_rbmi.isSelected()) filter_rbmi.setSelected(true);\n // else if (filter_rbmi.isSelected()) edgelens_rbmi.setSelected(true);\n // else if (edgelens_rbmi.isSelected()) timeline_rbmi.setSelected(true);\n else edit_rbmi.setSelected(true);\n }", "private void generateTogglePen () {\n HBox toggleBox = new HBox();\n ToggleButton penToggle = new ToggleButton(); // Up is false\n createPenToggleString(penToggle);\n penToggle.selectedProperty().addListener(e -> togglePenStatus(penToggle));\n toggleBox.getChildren().addAll(new Text(myStringResources.getString(\"penToggle\")),\n penToggle);\n myDialogVBox.getChildren().add(toggleBox);\n }", "public void switchOn();", "public boolean toggleActive(){\r\n isActive = !isActive;\r\n return isActive;\r\n }", "public void turn_off () {\n this.on = false;\n }", "@Override\n public void toggle(boolean active) {\n }", "public void toggleActive(){\n this.active = !this.active;\n }", "OnOffSwitch alarmSwitch();", "@SuppressLint(\"SetTextI18n\")\n @Override\n public void onClick(View view) {\n if (isDarkModeOn) {\n\n // if dark mode is on it\n // will turn it off\n AppCompatDelegate\n .setDefaultNightMode(\n AppCompatDelegate\n .MODE_NIGHT_NO);\n // it will set isDarkModeOn\n // boolean to false\n editor.putBoolean(\n \"isDarkModeOn\", false);\n editor.apply();\n\n // change text of Button\n // btnToggleDark.setColorFilter(ContextCompat.getColor(context, R.color.colorPrimary), android.graphics.PorterDuff.Mode.MULTIPLY);\n btndarkmodeAcitvate.setText(\"Aktiviere Dark Mode\");\n } else {\n\n // if dark mode is off\n // it will turn it on\n AppCompatDelegate\n .setDefaultNightMode(\n AppCompatDelegate\n .MODE_NIGHT_YES);\n\n // it will set isDarkModeOn\n // boolean to true\n editor.putBoolean(\n \"isDarkModeOn\", true);\n editor.apply();\n\n // change text of Button\n // btnToggleDark.setText(\n // \"Disable Dark Mode\");\n btndarkmodeAcitvate.setText(\"Deaktiviere Dark Mode\");\n }\n }", "public TogglePanel() {\r\n this(\"\");\r\n }", "@Override\r\n\t\t\t public void onClick(View v) {\n\t\t\t\t if( bFlagQiuzhi == false )\r\n\t\t\t\t {\r\n\t\t\t\t\t btn_qiuzhi_switch.setBackgroundResource(R.drawable.btn_anniu_b);\r\n\t\t\t\t }\r\n\t\t\t\t else\r\n\t\t\t\t {\r\n\t\t\t\t\t btn_qiuzhi_switch.setBackgroundResource(R.drawable.btn_anniu_a);\r\n\t\t\t\t }\r\n\t\t\t\t bFlagQiuzhi = !bFlagQiuzhi;\r\n\r\n\t\t\t }", "public ToggleButton(boolean toggleOnPress)\n {\n this.currentState = false;\n this.prevButtonState = false;\n\n this.toggleOnPress = toggleOnPress;\n }", "public void toggleState(Context context) {\n boolean state = getState(context);\n Settings.System.putInt(context.getContentResolver(), Settings.System.AIRPLANE_MODE_ON,\n state ? 0 : 1);\n // notify change\n Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED);\n intent.putExtra(\"state\", !state);\n context.sendBroadcast(intent);\n }", "public boolean switchOn(){\n if(this.is_Switched_On){\n return false;\n }\n this.is_Switched_On = true;\n return true;\n }", "@Override\r\n\t\t\t public void onClick(View v) {\n\t\t\t\t bFlagHehuo = !bFlagHehuo;\r\n\t\t\t\t hehuo_btn.setChecked(bFlagHehuo);\r\n\t\t\t }", "void setemisoraRadio(){\n emisoraRadio = !emisoraRadio;\n }", "public void turnOn() {\n\t\tisOn = true;\n\t}", "@Builder(toBuilder = true)\n FeatureToggles(Boolean flowsRerouteOnIslDiscoveryEnabled, Boolean createFlowEnabled, Boolean updateFlowEnabled,\n Boolean deleteFlowEnabled, Boolean pushFlowEnabled, Boolean unpushFlowEnabled,\n Boolean useBfdForIslIntegrityCheck, Boolean floodlightRoutePeriodicSync) {\n this.flowsRerouteOnIslDiscoveryEnabled = flowsRerouteOnIslDiscoveryEnabled;\n this.createFlowEnabled = createFlowEnabled;\n this.updateFlowEnabled = updateFlowEnabled;\n this.deleteFlowEnabled = deleteFlowEnabled;\n this.pushFlowEnabled = pushFlowEnabled;\n this.unpushFlowEnabled = unpushFlowEnabled;\n this.useBfdForIslIntegrityCheck = useBfdForIslIntegrityCheck;\n this.floodlightRoutePeriodicSync = floodlightRoutePeriodicSync;\n }", "public void configure(T aView) { aView.setText(\"ToggleButton\"); aView.setPadding(2,2,2,2); }", "static int toggleBit(int n, int pos){\n return n ^ (1<<pos);\n }", "public void turnOn() {\n\t\tOn = true;\n\t}", "public void toggle()\n\t{\n\t\tbitHolder.setValue(Math.abs(bitHolder.getValue() - 1 ));\n\t\t\n\t}", "void setBasicMode() {basicMode = true;}", "@Test\n public void testToggle() {\n // Toggle on test.\n boolean before = plug.getCondition();\n clickOn(\"ON\");\n assertNotEquals(before, plug.getCondition());\n\n // Toggle off test which also implies that the ON/OFF status is displayed.\n before = plug.getCondition();\n clickOn(\"OFF\");\n assertNotEquals(before, plug.getCondition());\n }", "void toggleInAir() {\n inAir = !inAir;\n }", "public AbstractSWTBotControl<Twistie> toggle() {\n\t\tsetFocus();\n\t\tkeyboard().typeCharacter('\\r');\n\t\treturn this;\n\t}", "private JToggleButton getDetailsToggleButton() {\r\n\t\tif (detailsToggleButton == null) {\r\n\t\t\ttry {\r\n\t\t\t\tdetailsToggleButton = new JToggleButton();\r\n\t\t\t\tdetailsToggleButton.setText(\"Vis detaljer\");\r\n\t\t\t\tdetailsToggleButton.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\t\tif (detailsToggleButton.isSelected()) {\r\n\t\t\t\t\t\t\tdetailsToggleButton.setText(\"Gjem detaljer\");\r\n\t\t\t\t\t\t\ttestAreaScrollPane.setVisible(true);\r\n\t\t\t\t\t\t\tpack();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdetailsToggleButton.setText(\"Vis detaljer\");\r\n\t\t\t\t\t\t\ttestAreaScrollPane.setVisible(false);\r\n\t\t\t\t\t\t\tpack();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t} catch (java.lang.Throwable e) {\r\n\t\t\t\t// TODO: Something\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn detailsToggleButton;\r\n\t}", "public void toggle() {\n if (!isActive)\n activate();\n else\n deactivate();\n }", "public ToHexString() {\n this(true);\n }", "public void showButtonsSettingsModeSwitch() {\n FloatingActionButton btn_settings = (FloatingActionButton)findViewById(R.id.btn_settings);\n btn_settings.setVisibility(View.VISIBLE);\n\n FloatingActionButton btn_mode_select = (FloatingActionButton)findViewById(R.id.btn_mode_select);\n btn_mode_select.setVisibility(View.VISIBLE);\n\n FloatingActionButton btn_mode_guide = (FloatingActionButton)findViewById(R.id.btn_guided);\n btn_mode_guide.setVisibility(View.VISIBLE);\n }", "public native static MenuItemToggle create(MenuItem item);", "BoolOperation createBoolOperation();", "public void flashlightSwitch()\n {\n usingFlashlight = !usingFlashlight;\n }", "public static void ToggleEnabled()\n {\n \t\tEnabled = !Enabled;\n \t\tConfigHandler.configFile.save();\n \t \t\n }", "public void toggleSignal() {\n if (green) {\n green = false;\n } else {\n green = true;\n }\n }", "public String configureOptionsMenu() {\n SharedPreferences settings = context.getSharedPreferences(PREFS, 0);\n boolean shuffle = settings.getBoolean(\"shuffle\", true);\n String buttonText = \"Hello\";\n \n if (shuffle) {\n buttonText = \" Off \";\n } else {\n buttonText = \" On \";\n }\n \n return buttonText;\n }", "public void toggle() {\n toggle(false);\n }", "@JsProperty boolean getToggles();", "private void toggleMode() {\n\t if(freestyle){\n\t\t Toast.makeText(getApplicationContext(), \"Take a picture in any pose\", Toast.LENGTH_LONG).show();\n\t\t \nmodeTextView.setText(\"Freestyle\");\nnewImgButton.setEnabled(false);\ncountdownView.setEnabled(false);\ncountdownView.setText(\"-\");\nframenumTextView.setEnabled(false);\nframenumTextView.setText(\"-\");\n\t }\n\t else{\n\t\t Toast.makeText(getApplicationContext(), \"Try to match the shape and take a picture\", Toast.LENGTH_LONG).show();\n\t\t modeTextView.setText(\"Match\");\n\t\t newImgButton.setEnabled(true);\n\t\t countdownView.setEnabled(true);\n\t\t framenumTextView.setEnabled(true);\n\t }\n\t \n\t\n}", "public void setDataSwitchEnable(boolean bEnable){\n mDataSwitch = bEnable;\n }", "public ToggleExecutable(Executable executable, String onParameter, String offParameter)\n {\n this.executable = executable;\n this.onParameter = onParameter;\n this.offParameter = offParameter;\n }", "@Override\r\n public boolean isSwitchOn() {\r\n return isOn;\r\n }", "public void setToggle(int toggle) {\n\t\tToggle[SortType - 1] = toggle;\n\t}", "static int toggleBit(int n){\n return n & (n-1);\n }", "public void toggleMod(){\r\n this.enabled = !this.enabled;\r\n this.onToggle();\r\n if(this.enabled)\r\n this.onEnable();\r\n else\r\n this.onDisable();\r\n }", "public boolean isHex()\n {\n return hex;\n }", "public boolean useHex() {\n\t\treturn useHex;\n\t}", "@JsProperty void setToggles(boolean value);", "public void setShowHexByte(boolean showHexByte) {\r\n this.showHexByte = showHexByte;\r\n }", "private void setUpToggleButton()\n {\n rememberLoginToggle_ =\n (ToggleButton) findViewById( R.id.rememberLoginToggleButton );\n try\n {\n if ( properties_.containsKey( getString( R.string.saveInfo ) ) )\n {\n rememberLoginIsSet_ =\n Boolean.parseBoolean( (properties_\n .get( getString( R.string.saveInfo ) ))\n .toString() );\n }\n else\n {\n rememberLoginIsSet_ = true;\n }\n }\n catch ( Exception ex )\n {\n System.err.print( \"Error converting to boolean: \" + ex );\n }\n\n rememberLoginToggle_.setChecked( rememberLoginIsSet_ );\n\n rememberLoginToggle_.setOnClickListener( new View.OnClickListener()\n {\n // Toggle the button on click\n @Override\n public void onClick( View v )\n {\n rememberLoginIsSet_ = !rememberLoginIsSet_;\n }\n } );\n }", "void set(boolean on);", "@Override\r\n public void onCreate(Bundle instanceState)\r\n {\r\n super.onCreate(instanceState);\r\n setContentView(R.layout.ringmode_toggle);\r\n\r\n final AudioManager audio = (AudioManager) getSystemService(Context.AUDIO_SERVICE);\r\n setupButtons(audio);\r\n\r\n }", "private static int toggle(int bitVector, int index) {\n\t\tif(index < 0)\n\t\t\treturn bitVector;\n\t\t\n\t\tint mask = 1 << index;\n\t\tif((bitVector & mask) == 0) {\n\t\t\tbitVector |= mask;\n\t\t}else {\n\t\t\tbitVector &= ~mask;\n\t\t}\n\t\t\n\t\treturn bitVector;\n\t}", "public Hex(int aX, int aY, Dimension aCanvasSize, Hextile h){\r\n\t\tx = aX;\r\n\t\ty = aY;\r\n\t\tactive = true;\r\n\t\tif((x < 0 && y < 0 && x + y < -4) || (x > 0 && y > 0 && x + y > 4)){\r\n\t\t\tactive = false;\r\n\t\t}\r\n\t\t\r\n\t\tlCenterX = ((int) ((aCanvasSize.getWidth()/2)+(innerWidth*aX)));\r\n\t\tlCenterY = ((int) (aCanvasSize.getHeight()/2)+((height*aY))+(height*aX/2));\r\n\t\t\r\n\t\thextile = h;\r\n\t\t\r\n\t\tif (h.getName().equals(\"Awful Valley\")) {\r\n\t\t\tSystem.out.println(\"My name (h) is \" + h.getName() + \" and my address is \" + h);\r\n\t\t}\r\n\t}", "public boolean isToggle() {\n return getElement().isToggle();\n }", "private boolean hexes() {\r\n return OPT(GO() && hex() && hexes());\r\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tif (button_SFX.getText().equals(\"효과음 : On\")){\n\t\t\t\tsfx=false;\n\t\t\t\tbutton_SFX.setText(\"효과음 : off\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tsfx=true;\n\t\t\t\tbutton_SFX.setText(\"효과음 : On\");\n\t\t\t}\n\t\t}", "private boolean hex() {\r\n return ALT(GO() && decimal() || OK() && SET(\"ABCDEFabcdef\"));\r\n }", "public void turnLightsOff()\n {\n set(Relay.Value.kOff);\n }", "public static void toggle(boolean[] array){\n for(int i = 1; i < array.length; ++i){\n for(int j = i; j < array.length; j += i){\n array[j] = !array[j];\n }\n }\n }", "public void handleToggleButtonEcho() {\n\t\tif (toggleButtonEcho.isSelected() == true) {\n\t\t\tcontroller.audioManipulatorUseDelayProcessor(true);\n\t\t\tsliderEchoLength.setDisable(false);\n\t\t\tsliderDecay.setDisable(false);\n\t\t\ttextFieldEchoLength.setDisable(false);\n\t\t\ttextFieldDecay.setDisable(false);\n\t\t\ttoggleButtonEcho.setText(bundle.getString(\"mixerToggleButtonOn\"));\n\t\t} else {\n\t\t\tcontroller.audioManipulatorUseDelayProcessor(false);\n\t\t\tsliderEchoLength.setDisable(true);\n\t\t\tsliderDecay.setDisable(true);\n\t\t\ttextFieldEchoLength.setDisable(true);\n\t\t\ttextFieldDecay.setDisable(true);\n\t\t\ttoggleButtonEcho.setText(bundle.getString(\"mixerToggleButtonOff\"));\n\t\t}\n\n\t}", "public String getHexa() {\n\t\treturn String.format(\"#%02x%02x%02x\", getRed(), getGreen(), getBlue());\t\t\t\t\n\t}", "@Override\n public void onClick(View view) {\n if (sharedPref.loadNightModeState()) {\n sharedPref.setNightModeState(false);\n Picasso.get().load(R.drawable.ic_night).into(night_mode);\n// switchCompat.setChecked(false);\n recreate();\n } else {\n sharedPref.setNightModeState(true);\n// switchCompat.setChecked(true);\n// night_mode.setImageIcon(R.drawable.ic_day);\n Picasso.get().load(R.drawable.ic_day).into(night_mode);\n recreate();\n }\n }", "@Override\n public void onCheckedChanged(CompoundButton toggleButton, boolean isChecked) {\n if (!isChecked) {\n viewHolder.state_endpoint_in_scene_text_view.setText(context.getResources().getString(R.string.label_off));\n state[0] = 0;\n } else {\n viewHolder.state_endpoint_in_scene_text_view.setText(context.getResources().getString(R.string.label_on));\n state[0] = 255;\n }\n // If the values are modified while the user does not check/unckeck the checkbox, then we update the value from the controller.\n int exist = mode.getPayload().indexOf(c);\n if (exist != -1) {\n mode.getPayload().get(exist).setV(state[0]);\n }\n }", "public void enable(){\r\n\t\tthis.activ = true;\r\n\t}", "public void turnOn ()\n\t{\n\t\tthis.powerState = true;\n\t}", "@DISPID(1611006088) //= 0x60060088. The runtime will prefer the VTID if present\n @VTID(163)\n boolean trueColorMode();", "public void setupToggleButtons(){\n\t\ttoggle_textContacts.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n\t\t public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t if (isChecked) {\n\t\t // The toggle is enabled\n\t\t\t if(prefsHandler.getSettings().getIsFirstTextContacts())\n\t\t\t {\n\t\t\t \tshowTextContactsTutorialDialog();\n\t\t\t }\n\t\t\t \n\t\t \tLinearLayout.LayoutParams layout_desc = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n\t\t textContactsSmallFrame.setLayoutParams(layout_desc);\n\t\t } else {\n\t\t \t// resize the frame to just show the top button\n\t\t \tLinearLayout.LayoutParams layout_desc = new LinearLayout.LayoutParams(0, 0);\n\t\t textContactsSmallFrame.setLayoutParams(layout_desc);\n\t\t }\n\t\t }\n\t\t});\n\t\t\n\t\ttoggle_NFRadio.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n\t\t public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t if (!isChecked) {\n\t\t // The toggle is disabled\n\t\t\t if(prefsHandler.getSettings().getIsFirstMusic())\n\t\t\t {\n\t\t\t \tshowMusicTutorialDialog();\n\t\t\t }\n\t\t \t// resize the frame to just show the top button\n\t\t \tLinearLayout.LayoutParams layout_desc = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n\t\t NFRadioSmallFrame.setLayoutParams(layout_desc);\n\t\t } else {\n\t\t \t// the toggle is enabled\n\t\t\t if(prefsHandler.getSettings().getIsFirstNewsFeed())\n\t\t\t {\n\t\t\t \tshowNewsTutorialDialog();\n\t\t\t }\n\t\t\t \n\t\t \tLinearLayout.LayoutParams layout_desc = new LinearLayout.LayoutParams(0, 0);\n\t\t NFRadioSmallFrame.setLayoutParams(layout_desc);\n\t\t }\n\t\t }\n\t\t});\n\t\t\n\t\ttoggle_ShakeToWake.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n\t\t public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t \tif(isChecked&&prefsHandler.getSettings().getIsFirstShakeToWake())\n\t\t {\n\t\t \t\tshowShakeTutorialDialog();\n\t\t }\n\t\t }\n\t\t});\n\t}", "public void setOn(){\n state = true;\n //System.out.println(\"Se detecto un requerimiento!\");\n\n }", "new LED();", "public boolean isShowHexByte() {\r\n return showHexByte;\r\n }", "void setBit(int index, boolean value);" ]
[ "0.6219095", "0.6063403", "0.6017939", "0.5995144", "0.5988472", "0.59478664", "0.5939954", "0.5898284", "0.5800982", "0.5779511", "0.5779434", "0.56869435", "0.5663217", "0.5606648", "0.5541335", "0.55020654", "0.5492257", "0.5402495", "0.5382249", "0.5361357", "0.5355808", "0.53303295", "0.5318755", "0.5315587", "0.53135055", "0.5253372", "0.52508366", "0.5244729", "0.5235159", "0.5219977", "0.5218853", "0.5213698", "0.52066356", "0.5202728", "0.520082", "0.5199073", "0.5196592", "0.5191411", "0.5173304", "0.515587", "0.51510197", "0.5142196", "0.51404196", "0.51379716", "0.5133017", "0.5131012", "0.5109012", "0.51089567", "0.5102108", "0.5101945", "0.5101742", "0.5097635", "0.5070472", "0.50576586", "0.50566155", "0.5046887", "0.502717", "0.50164855", "0.5012707", "0.5012201", "0.5010332", "0.5006701", "0.5003378", "0.50015265", "0.49959633", "0.49952927", "0.4992537", "0.49905407", "0.49883467", "0.49880648", "0.49847445", "0.49803475", "0.4976698", "0.49650803", "0.49638954", "0.49594837", "0.49581006", "0.49566266", "0.49541607", "0.494755", "0.49466142", "0.49422", "0.4938565", "0.4934669", "0.49269116", "0.49134654", "0.4908958", "0.4907475", "0.49056393", "0.4904005", "0.49014217", "0.48999846", "0.48953396", "0.48945585", "0.4887364", "0.48797792", "0.48763266", "0.48750392", "0.4872604", "0.48642525" ]
0.66746235
0
Update the interface display to show the current value of the calculator.
protected void redisplay() { display.setText("" + calc.getDisplayValue()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void update() {\n jTextField1.setText(mCalculator.getDisplay());\n }", "protected void updateDisplay() {\r\n setValue(Integer.toString(value.getValue()));\r\n }", "public void update() {\n\n\t\tdisplay();\n\t}", "public void displayCurrentValues() {\r\n currentX.setText(Float.toString(deltaX));\r\n currentY.setText(Float.toString(deltaY));\r\n currentZ.setText(Float.toString(deltaZ));\r\n }", "public void actionPerformed(ActionEvent e) {\n if (e.getSource() == btn1) {\n display.setText(display.getText() + \"1\");\n } else if (e.getSource() == btn2) {\n display.setText(display.getText() + \"2\");\n } else if (e.getSource() == btn3) {\n display.setText(display.getText() + \"3\");\n } else if (e.getSource() == btnPlus) {\n display.setText(display.getText() + \"+\");\n } else if (e.getSource() == btn4) {\n display.setText(display.getText() + \"4\");\n } else if (e.getSource() == btn5) {\n display.setText(display.getText() + \"5\");\n } else if (e.getSource() == btn6) {\n display.setText(display.getText() + \"6\");\n } else if (e.getSource() == btnMinus) {\n display.setText(display.getText() + \"-\");\n } else if (e.getSource() == btn7) {\n display.setText(display.getText() + \"7\");\n } else if (e.getSource() == btn8) {\n display.setText(display.getText() + \"8\");\n } else if (e.getSource() == btn9) {\n display.setText(display.getText() + \"9\");\n } else if (e.getSource() == btnMultiply) {\n display.setText(display.getText() + \"*\");\n } else if (e.getSource() == btn0) {\n display.setText(display.getText() + \"0\");\n } else if (e.getSource() == btnDivide) {\n display.setText(display.getText() + \"/\");\n } else if (e.getSource() == btnEqual) {\n String input = display.getText();\n String output = \"\";\n try {\n output = performCalculation(input);\n } catch (Exception ex) {\n output = \"ERROR\";\n }\n display.setText(output);\n } else if (e.getSource() == btnClear) {\n display.setText(\"\");\n }\n }", "public void displayCurrentValues() {\n currentX.setText(_DF.format(deltaX));\n currentY.setText(_DF.format(deltaY));\n currentZ.setText(_DF.format(deltaZ));\n }", "private void updateDisplay() {\n btnScheduleTime.setText(new StringBuilder().append(PHHelper.pad(mHour))\n .append(\":\").append(PHHelper.pad(mMinute)));\n }", "private void updateDisplayText(double change) { updateDisplayText(change, null); }", "public void updateUI(){\n\t\t\n\t\ttimeTV.setText(\"\"+String.format(\"\" + gameClock%10));\n\t\ttimeTV2.setText(\"\"+ gameClock/10+\".\");\n\t\tif (currentGameEngine!=null) {\n\t\t\tmultLeft.setText(\"multiplier: \"+currentGameEngine.getMultiplier()+\"X\");\n\t\t\tscoreTV.setText(\"\"+currentGameEngine.getScore());\n\t\t} else {\n\t\t\tscoreTV.setText(\"0\");\n\t\t}\n\n\t\t//errorTV.setText(\"\"+mFrameNum);\n\t\t\n\t\t\n\t}", "public static void currentValue()\n\t{\n\t\tcurrentVal.setText(String.valueOf(calculateHand(playersCards)));\n\t}", "private void updateDisplay() {\r\n date1.setText(\r\n new StringBuilder()\r\n // Month is 0 based so add 1\r\n .append(pDay).append(\"/\")\r\n .append(pMonth + 1).append(\"/\")\r\n .append(pYear).append(\" \"));\r\n }", "@Override\n\tprotected void UpdateUI() {\n\t\tFineModulationDisplay(FineModulation);\n\t\tAutoGreaseDisplay(AutoGrease);\n\t\tQuickcouplerDisplay(Quickcoupler);\n\t\tRideControlDisplay(RideControl);\n\t\tBeaconLampDisplay(BeaconLamp);\n\t\tMirrorHeatDisplay(MirrorHeat);\n//\t\tFNKeyDisplay(ParentActivity.LockEntertainment);\n\t}", "public void Calculation(){\n if(Symbol.equals(\"+\"))\n {\n AnswerHalf = AnswerHalf + ButtonValue;\n }\n else if(Symbol.equals(\"-\"))\n {\n AnswerHalf = AnswerHalf - ButtonValue;\n }\n else if(Symbol.equals(\"*\"))\n {\n AnswerHalf = AnswerHalf * ButtonValue;\n }\n else if(Symbol.equals(\"/\"))\n {\n AnswerHalf = AnswerHalf/ButtonValue;\n }\n printAnswer = Double.toString(AnswerHalf);\n AfterEqual = 1;\n SymbolMark = 0;\n c = 0;\n AfterAnswer = 0;\n TFCalcBox.setText(printAnswer);\n }", "private void actualizarVisor()\n {\n visor.setText(\"\" + calc.getValorEnVisor());\n }", "private void updateDisplay() { \n\t \tmDateDisplay.setText( \n\t \t\t\tnew StringBuilder()\n\t \t\t\t.append(mYear).append(\"/\")\n\t \t\t\t// Month is 0 based so add 1 \n\t \t\t\t.append(mMonth + 1).append(\"/\") \n\t \t\t\t.append(mDay).append(\" \")); \n\t \t\t\t \n\t \t\t\t \n\t \t\t\t \n\t }", "public void showValor() {\n String out = new String();\n this.setText(Integer.toString(valor));\n }", "private void displayData() {\n if (mOutlet1State) {\n //print value\n mCurrent1.setText(returnCurrent(4));\n } else {\n mCurrent1.setText(R.string.off);\n }\n //print timer data\n if (mTimer1State) {\n //print time remaining\n mTimer1.setText(returnControllerTime(7));\n } else {\n mTimer1.setText(R.string.disabled);\n }\n\n //outlet 2\n //print current\n if (mOutlet2State) {\n //print value\n mCurrent2.setText(returnCurrent(12));\n } else {\n mCurrent2.setText(R.string.off);\n }\n //print timer data\n if (mTimer2State) {\n //print time remaining\n mTimer2.setText(returnControllerTime(15));\n } else {\n mTimer2.setText(R.string.disabled);\n }\n }", "public void refreshUI() {\n float f;\n float f2;\n float f3;\n this.mSpeedView.updateNetworkSpeed(this.mCurrentSpeed.get());\n float f4 = (float) this.mCurrentSpeed.get();\n if (f4 > 1.6777216E7f) {\n f = 1.0f;\n } else {\n if (f4 > 8388608.0f) {\n f2 = ((f4 - 8388608.0f) / 8388608.0f) * 0.2f;\n f3 = 0.8f;\n } else if (f4 > 4194304.0f) {\n f2 = ((f4 - 4194304.0f) / 4194304.0f) * 0.2f;\n f3 = 0.6f;\n } else if (f4 > 2097152.0f) {\n f2 = ((f4 - 2097152.0f) / 2097152.0f) * 0.2f;\n f3 = 0.4f;\n } else {\n f = f4 > M ? (((f4 - M) / M) * 0.2f) + 0.2f : (f4 / M) * 0.2f;\n }\n f = f2 + f3;\n }\n this.mDialView.setProgress(f);\n }", "@Override\n\tprotected void UpdateUI() {\n\t\tDisplayFuelData(AverageFuelRate, LatestFuelConsumed);\n\t\t\n\t\tif(bCursurIndex == false && ParentActivity.ScreenIndex == Home.SCREEN_STATE_MENU_MONITORING_FUELHISTORY_GENERALRECORD)\n\t\t\tCursurDisplay(CursurIndex);\n\t}", "@Override\n public void repaint() {\n this.jLabel2.setText(Float.toString(this.c.getVd()));\n this.jLabel4.setText(df.format(this.c.getUu()));\n this.jLabel6.setText(this.c.getSmax());\n this.jLabel8.setText(Float.toString(this.c.getAs()));\n this.jLabel10.setText(df.format(this.c.getVc()));\n this.jLabel11.setText(this.c.getSecc());\n this.jLabel12.setText(this.c.getE());\n this.jLabel13.setText(df.format(this.c.getEval()));\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"0\");\n\t\t\t}", "private void updateDisplay() \n\t{\n\t\t// updates the date in the TextView\n if(bir.hasFocus())\n {\n\t\tbir.setText(\n\t\t\t\tnew StringBuilder()\n\t\t\t\t// Month is 0 based so add 1\n\t\t\t\t\n\t\t\t\t.append(mDay).append(\"-\")\n\t\t\t\t.append(mMonth + 1).append(\"-\")\n\t\t\t\t.append(mYear).append(\" \"));\n }else\n {\n\t\taniv.setText(\n\t\t\t\tnew StringBuilder()\n\t\t\t\t// Month is 0 based so add 1\n\t\t\t\t\n\t\t\t\t.append(mDay).append(\"-\")\n\t\t\t\t.append(mMonth + 1).append(\"-\")\n\t\t\t\t.append(mYear).append(\" \"));\n }\n\n\n\t}", "@Override\r\n public void update() {\r\n this.total = calculateTotal();\r\n }", "private void updateActualAndDisplayedResult() {\n\t\tresultTipValue = calculateTip( amountValue, percentValue, splitValue);\n\t\ttvResult.setText( \"Tip: $\" + String.format(\"%.2f\", resultTipValue) + \" per person.\" );\t\n\t}", "public void display() {\r\n dlgRates.show();\r\n }", "public void updateDisplay(){\r\n //Update the display\r\n DefaultTableModel regs = (DefaultTableModel)tblRegisters.getModel();\r\n regs.setValueAt(Integer.toHexString(board.getA()),0,0);\r\n regs.setValueAt(Integer.toHexString(board.getB()),0,1);\r\n regs.setValueAt(Integer.toHexString(board.getX()),0,2);\r\n regs.setValueAt(Integer.toHexString(board.getY()),0,3);\r\n regs.setValueAt(Integer.toBinaryString(board.getIntCCR()),0,4);\r\n lblPC.setText(Integer.toHexString(board.getPC()));\r\n lblSP.setText(Integer.toHexString(board.getSP()));\r\n }", "public void update() {\n\t\tif (this.block.getValue() != 0) {\n\t\t\tthis.displayNumberBlock.removeAll();\n\t\t\tthis.displayNumberBlock.setLayout(new GridLayout(1,1));\n\t\t\tthis.label = new JLabel(\"\" + this.block.getValue(), SwingConstants.CENTER);\n\t\t\tthis.label.setFont(new Font(\"Serif\", Font.PLAIN, 25));\n\t\t\tthis.displayNumberBlock.add(this.label, BorderLayout.CENTER);\n\t\t\t\n\t\t\tthis.displayNumberBlock.revalidate();\n\t\t} else {\n\t\t\tthis.displayNumberBlock.removeAll();\n\t\t\tthis.displayNumberBlock.setLayout(new GridLayout(3,3));\n\t\t\t\n\t\t\tfor(int i = 0; i < SudokuPanel.gameSize; i++){\n\t\t\t\tString temp = \"\";\n\t\t\t\tif(this.getBlock().getNotes()[i]){\n\t\t\t\t\ttemp = \"\" + (i+1);\n\t\t\t\t}\n\t\t\t\tJLabel tempLabel = new JLabel(temp);\n\t\t\t\ttempLabel.setFont(new Font(\"Serif\", Font.PLAIN, 10));\n\t\t\t\tthis.displayNumberBlock.add(tempLabel);\n\t\t\t}\n\t\t\tthis.displayNumberBlock.revalidate();\n\t\t}\n\t}", "public void operation() {\n\t\t\n\t\tswitch(calculation){\n\t\t\tcase 1:\n\t\t\t\ttotal = num + Double.parseDouble(textField.getText());\n\t\t\t\ttextField.setText(Double.toString(total));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\ttotal = num - Double.parseDouble(textField.getText());\n\t\t\t\ttextField.setText(Double.toString(total));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 3:\n\t\t\t\ttotal = num * Double.parseDouble(textField.getText());\n\t\t\t\ttextField.setText(Double.toString(total));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\t\ttotal = num / (Double.parseDouble(textField.getText()));\n\t\t\t\ttextField.setText(Double.toString(total));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t}", "private void updateInformation(){\n view.getPrompt().setText(getPrompt());\n view.getScore().setText(getScore());\n }", "public void updateUI(){}", "@Override\r\n public void updateUI() {\r\n }", "protected void displayOperatedValue(int value) {\n \tstack.push(value);\n \tcurrent = value;\n \tshow(current);\n \tcurrent = 0;\n }", "@Override\npublic void actionPerformed(ActionEvent ae) {\nObject obj = ae.getSource(); \n\nif(obj == myCalcView.getJbt_one()){ \n myCalcView.getJtf_result().setText(myCalcView.getJtf_result().getText()+\"1\"); \n}else if(obj == myCalcView.getJbt_two()){ \n myCalcView.getJtf_result().setText(myCalcView.getJtf_result().getText()+\"2\"); \n}else if(obj == myCalcView.getJbt_plus()){ \n v1 = myCalcView.getJtf_result().getText(); \n System.out.println(\"v1 : \"+v1); \n op = \"+\"; \n myCalcView.getJtf_result().setText(\"\"); \n}else if(obj == myCalcView.getJbt_equals()){ \n v2 = myCalcView.getJtf_result().getText(); \n System.out.println(\"v1:\"+v1 +\"-> v2 : \"+v2+\" op : \"+op); \n String result = calcurate(v1,v2,op); \n myCalcView.getJtf_result().setText(result); \n}else if(obj == myCalcView.getJbt_clear()){ \n myCalcView.getJtf_result().setText(\"\"); \n} \n}", "public void refreshDisplayData() {\n if (useLiveDisplayUpdates && displaySection.isOpen()) {\n displayPanel.setValue(device.getDisplayData(), true);\n }\n\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n payment = Float.parseFloat(txtPayment.getText());\n cashChange = String.valueOf(String.format(\"%.02f\", payment - finalTotal) );\n lblChange.setVisible(true);\n lblChange.setText(\"Change \" + \"£ \" + cashChange);\n btnPrint.setVisible(true);\n\n }", "public void displayCurrentValues() {\n currentX.setText(Float.toString(singleSample[0]));\n currentY.setText(Float.toString(singleSample[1]));\n currentZ.setText(Float.toString(singleSample[2]));\n }", "@Override\n public void refreshGui() {\n int count = call(\"getCountAndReset\", int.class);\n long nextTime = System.currentTimeMillis();\n long elapsed = nextTime - lastTime; // ms\n double frequency = 1000 * count / elapsed;\n lastTime = nextTime;\n stats.addValue(frequency);\n\n outputLbl.setText(String.format(\"%3.1f Hz\", stats.getGeometricMean()));\n }", "private void onOK() {\n show.setText(null);\n String s = (new ArithmeticExpressions(text.getText()).checkExpression());\n System.out.println(s);\n show.setText(s);\n }", "private void updateDisplay() {\r\n\t\tbtnBirthDate.setText(new StringBuilder()\r\n\t\t// Month is 0 based so add 1\r\n\t\t\t\t.append(mMonth + 1).append(\"-\").append(mDay).append(\"-\").append(mYear).append(\" \"));\r\n\t}", "public void updateDisplay(View view) {\n if(!EditText_isEmpty(total_bill) && !EditText_isEmpty(tip)) {\n float total_bill_value = Float.valueOf(total_bill.getText().toString());\n float tip_value = Float.valueOf(tip.getText().toString());\n float total_to_pay_value = total_bill_value * (1+tip_value/100);\n total_to_pay.setText(\"$\" + String.format(\"%.2f\", total_to_pay_value));\n\n float total_tip_value = total_bill_value * (tip_value/100);\n total_tip.setText(\"$\" + String.format(\"%.2f\", total_tip_value));\n\n if(!EditText_isEmpty(split_bill)) {\n float split_bill_value = Float.valueOf(split_bill.getText().toString());\n float total_per_person_value = total_to_pay_value/split_bill_value;\n total_per_person.setText(\"$\" + String.format(\"%.2f\", total_per_person_value));\n }\n }\n else {\n total_to_pay.setText(\"\");\n total_tip.setText(\"\");\n total_per_person.setText(\"\");\n }\n }", "private void updateAmplificationValue() {\n ((TextView) findViewById(R.id.zoomUpDownText)).setText(String.valueOf(curves[0].getCurrentAmplification()));\n }", "public void refresh() {\r\n\t\tneeds.setText(needs());\r\n\t\tproduction.setText(production());\r\n\t\tjobs.setText(jobs());\r\n\t\tmarketPrices.setText(marketPrices());\r\n\t\tmarketSellAmounts.setText(marketSellAmounts());\r\n\t\tmarketBuyAmounts.setText(marketBuyAmounts());\r\n\t\tcompanies.setText(companies());\r\n\t\tmoney.setText(money());\r\n\t\ttileProduction.setText(tileProduction());\r\n\t\tcapital.setText(capital());\r\n\t\thappiness.setText(happiness());\r\n\t\tland.setText(land());\r\n\t\t//ArrayList of Agents sorted from lowest to highest in money is retrieved from Tile\r\n\t\tagents=tile.getAgentsByMoney();\r\n\t\tgui3.refresh();\r\n\t\tsliderPerson.setText(\"\"+agents.get(slider.getValue()).getMoney());\r\n\t\ttick.setText(tick());\r\n\t\tthis.pack();\r\n\t}", "private void updateCardBalanceUI() {\n exactAmount.setText(decimalFormat.format(cardBalance));\n }", "public void calculateAndDisplay() {\n fromUnitString = fromUnitEditText.getText().toString();\r\n if (fromUnitString.equals(\"\")) {\r\n fromValue = 0;\r\n }\r\n else {\r\n fromValue = Float.parseFloat(fromUnitString);\r\n }\r\n\r\n // calculate the \"to\" value\r\n toValue = fromValue * ratio;\r\n\r\n // display the results with formatting\r\n NumberFormat number = NumberFormat.getNumberInstance();\r\n number.setMaximumFractionDigits(2);\r\n number.setMinimumFractionDigits(2);\r\n toUnitTextView.setText(number.format(toValue));\r\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 251, 411);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJButton btn0 = new JButton(\"0\");\n\t\tbtn0.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tString enterNumber=txtDisp.getText()+btn0.getText();\n\t\t\t\ttxtDisp.setText(enterNumber);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtn0.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tbtn0.setBounds(10, 311, 50, 50);\n\t\tframe.getContentPane().add(btn0);\n\t\t\n\t\tJButton btn_dot = new JButton(\".\");\n\t\tbtn_dot.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tString enterNumber=txtDisp.getText()+btn_dot.getText();\n\t\t\t\ttxtDisp.setText(enterNumber);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtn_dot.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tbtn_dot.setBounds(65, 311, 50, 50);\n\t\tframe.getContentPane().add(btn_dot);\n\t\t\n\t\tJButton btn_equal = new JButton(\"=\");\n\t\tbtn_equal.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tString result;\n\t\t\t\tsecondNum=Double.parseDouble(txtDisp.getText());\n\t\t\t\t\n\t\t\t\tif(op==\"+\")\n\t\t\t\t{\n\t\t\t\t\tanswer=firstNum+secondNum;\n\t\t\t\t\tresult=String.format(\"%.2f\", answer);\n\t\t\t\t\ttxtDisp.setText(result);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(op==\"-\")\n\t\t\t\t{\n\t\t\t\t\tanswer=firstNum-secondNum;\n\t\t\t\t\tresult=String.format(\"%.2f\", answer);\n\t\t\t\t\ttxtDisp.setText(result);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(op==\"*\")\n\t\t\t\t{\n\t\t\t\t\tanswer=firstNum*secondNum;\n\t\t\t\t\tresult=String.format(\"%.2f\", answer);\n\t\t\t\t\ttxtDisp.setText(result);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(op==\"/\")\n\t\t\t\t{\n\t\t\t\t\tanswer=firstNum/secondNum;\n\t\t\t\t\tresult=String.format(\"%.2f\", answer);\n\t\t\t\t\ttxtDisp.setText(result);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(op==\"%\")\n\t\t\t\t{\n\t\t\t\t\tanswer=firstNum%secondNum;\n\t\t\t\t\t//answer=firstNum/100;\n\t\t\t\t\tresult=String.format(\"%.2f\", answer);\n\t\t\t\t\ttxtDisp.setText(result+\"%\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtn_equal.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tbtn_equal.setBounds(120, 311, 50, 50);\n\t\tframe.getContentPane().add(btn_equal);\n\t\t\n\t\tJButton btn1 = new JButton(\"1\");\n\t\tbtn1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tString enterNumber=txtDisp.getText()+btn1.getText();\n\t\t\t\ttxtDisp.setText(enterNumber);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtn1.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tbtn1.setBounds(10, 250, 50, 50);\n\t\tframe.getContentPane().add(btn1);\n\t\t\n\t\tJButton btn2 = new JButton(\"2\");\n\t\tbtn2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tString enterNumber=txtDisp.getText()+btn2.getText();\n\t\t\t\ttxtDisp.setText(enterNumber);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtn2.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tbtn2.setBounds(65, 250, 50, 50);\n\t\tframe.getContentPane().add(btn2);\n\t\t\n\t\tJButton btn3 = new JButton(\"3\");\n\t\tbtn3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tString enterNumber=txtDisp.getText()+btn3.getText();\n\t\t\t\ttxtDisp.setText(enterNumber);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtn3.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tbtn3.setBounds(120, 250, 50, 50);\n\t\tframe.getContentPane().add(btn3);\n\t\t\n\t\tJButton btn4 = new JButton(\"4\");\n\t\tbtn4.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tString enterNumber=txtDisp.getText()+btn4.getText();\n\t\t\t\ttxtDisp.setText(enterNumber);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtn4.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tbtn4.setBounds(10, 189, 50, 50);\n\t\tframe.getContentPane().add(btn4);\n\t\t\n\t\tJButton btn5 = new JButton(\"5\");\n\t\tbtn5.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tString enterNumber=txtDisp.getText()+btn5.getText();\n\t\t\t\ttxtDisp.setText(enterNumber);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtn5.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tbtn5.setBounds(65, 189, 50, 50);\n\t\tframe.getContentPane().add(btn5);\n\t\t\n\t\tJButton btn6 = new JButton(\"6\");\n\t\tbtn6.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tString enterNumber=txtDisp.getText()+btn6.getText();\n\t\t\t\ttxtDisp.setText(enterNumber);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtn6.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tbtn6.setBounds(120, 189, 50, 50);\n\t\tframe.getContentPane().add(btn6);\n\t\t\n\t\tJButton btn7 = new JButton(\"7\");\n\t\tbtn7.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tString enterNumber=txtDisp.getText()+btn7.getText();\n\t\t\t\ttxtDisp.setText(enterNumber);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtn7.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tbtn7.setBounds(10, 128, 50, 50);\n\t\tframe.getContentPane().add(btn7);\n\t\t\n\t\tJButton btn8 = new JButton(\"8\");\n\t\tbtn8.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tString enterNumber=txtDisp.getText()+btn8.getText();\n\t\t\t\ttxtDisp.setText(enterNumber);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtn8.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tbtn8.setBounds(65, 128, 50, 50);\n\t\tframe.getContentPane().add(btn8);\n\t\t\n\t\tJButton btn9 = new JButton(\"9\");\n\t\tbtn9.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tString enterNumber=txtDisp.getText()+btn9.getText();\n\t\t\t\ttxtDisp.setText(enterNumber);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtn9.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tbtn9.setBounds(120, 128, 50, 50);\n\t\tframe.getContentPane().add(btn9);\n\t\t\n\t\tJButton btnAc = new JButton(\"AC\");\n\t\tbtnAc.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\ttxtDisp.setText(null);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnAc.setFont(new Font(\"Tahoma\", Font.BOLD, 10));\n\t\tbtnAc.setBounds(10, 67, 50, 50);\n\t\tframe.getContentPane().add(btnAc);\n\t\t\n\t\tJButton btn_prce = new JButton(\"%\");\n\t\tbtn_prce.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tfirstNum=Double.parseDouble(txtDisp.getText());\n\t\t\t\ttxtDisp.setText(\"\");\n\t\t\t\top=\"%\";\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtn_prce.setFont(new Font(\"Tahoma\", Font.BOLD, 12));\n\t\tbtn_prce.setBounds(65, 67, 50, 50);\n\t\tframe.getContentPane().add(btn_prce);\n\t\t\n\t\tJButton btn_div = new JButton(\"/\");\n\t\tbtn_div.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tfirstNum=Double.parseDouble(txtDisp.getText());\n\t\t\t\ttxtDisp.setText(\"\");\n\t\t\t\top=\"/\";\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtn_div.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tbtn_div.setBounds(120, 67, 50, 50);\n\t\tframe.getContentPane().add(btn_div);\n\t\t\n\t\tJButton btn_bak = new JButton(\"<-\");\n\t\tbtn_bak.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tString back=null;\n\t\t\t\t\n\t\t\t\tif(txtDisp.getText().length()>0)\n\t\t\t\t{\n\t\t\t\t\tStringBuilder strB=new StringBuilder(txtDisp.getText());\n\t\t\t\t\tstrB.deleteCharAt(txtDisp.getText().length()-1);\n\t\t\t\t\tback=strB.toString();\n\t\t\t\t\ttxtDisp.setText(back);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtn_bak.setFont(new Font(\"Tahoma\", Font.BOLD, 12));\n\t\tbtn_bak.setBounds(175, 67, 50, 50);\n\t\tframe.getContentPane().add(btn_bak);\n\t\t\n\t\tJButton btn_mul = new JButton(\"X\");\n\t\tbtn_mul.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tfirstNum=Double.parseDouble(txtDisp.getText());\n\t\t\t\ttxtDisp.setText(\"\");\n\t\t\t\top=\"*\";\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtn_mul.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tbtn_mul.setBounds(175, 128, 50, 50);\n\t\tframe.getContentPane().add(btn_mul);\n\t\t\n\t\tJButton btn_sub = new JButton(\"-\");\n\t\tbtn_sub.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tfirstNum=Double.parseDouble(txtDisp.getText());\n\t\t\t\ttxtDisp.setText(\"\");\n\t\t\t\top=\"-\";\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtn_sub.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tbtn_sub.setBounds(175, 189, 50, 50);\n\t\tframe.getContentPane().add(btn_sub);\n\t\t\n\t\tJButton btn_pls = new JButton(\"+\");\n\t\tbtn_pls.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tfirstNum=Double.parseDouble(txtDisp.getText());\n\t\t\t\ttxtDisp.setText(\"\");\n\t\t\t\top=\"+\";\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtn_pls.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tbtn_pls.setBounds(175, 250, 50, 110);\n\t\tframe.getContentPane().add(btn_pls);\n\t\t\n\t\ttxtDisp = new JTextField();\n\t\ttxtDisp.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\ttxtDisp.setFont(new Font(\"Tahoma\", Font.PLAIN, 22));\n\t\ttxtDisp.setBounds(10, 11, 215, 45);\n\t\tframe.getContentPane().add(txtDisp);\n\t\ttxtDisp.setColumns(10);\n\t\t\n\t\t\n\t}", "public void update() \n {\n System.out.print( \" \" + Integer.toOctalString( subj.getState() ) );\n }", "public void button0OnClick(View view){ display.setText(display.getText()+ \"0\");}", "@Override\n public void execute() {\n State state = getState();\n\n if(!state.getCurrentDisplay().equals(\"0\")){\n if(state.getCurrentDisplay().contains(\"-\"))\n state.setCurrentDisplay(state.getCurrentDisplay().replace(\"-\", \"\"));\n else\n state.setCurrentDisplay(\"-\" + state.getCurrentDisplay());\n }\n }", "public void action(CalculatorDisplay display){\n\t\tdisplay.setOperator(this);\n\t}", "public void updateScoreCard(){\n scoreCard.setText(correct+\"/\"+total);\n }", "private void updateTotal() {\n int total = table.getTotal();\n vip.setConsumption(total);\n if (total > 0)\n payBtn.setText(PAY + RMB + total);\n else if (total == 0)\n payBtn.setText(PAY);\n }", "public void refresh()\n\t{\n\t\tnum1 = -1;\n\t\tnum2 = -1;\n\t\tnum3 = -1;\n\t\tnum1Label.setText(\"\");\n\t\tnum2Label.setText(\"\");\n\t\tnum3Label.setText(\"\");\n\t\t\n\t\tcheckEquationButton.setEnabled(false);\n\t\t\n\t\toperationSign = getOperation(levelChosen);\n\t\t\n\t\t//Choosing the number range for each level\n\t\tfor(int i = 0; i < 9; i++)\n\t\t{\n\t\t\tif(levelChosen == 0 || levelChosen == 1 || levelChosen == 3)\n\t\t\t{\n\t\t\t\trandomNumList[i] = getRandomNum(1,9);\n\t\t\t}// end if\n\t\t\telse if(levelChosen == 2)\n\t\t\t{\n\t\t\t\trandomNumList[i] = getRandomNum(1,12);\n\t\t\t}// end else if\n\t\t}\n\t\t\n\t\toperationLabel.setText(\"\"+operationSign (operationSign));\n\t\t\n\t\t//Randomly picks three numbers that are different from each other to use to make a viable equation\n\t\tint temp = getRandomNum(0,8);\n\t\tint temp2 = getRandomNum(0,8);\n\t\tint temp3 = getRandomNum(0,8);\n\t\twhile(temp == temp2)\n\t\t{\n\t\t\ttemp2 = getRandomNum(0,8);\n\t\t}// end while loop\n\t\t\n\t\twhile(temp2 == temp3)\n\t\t{\n\t\t\ttemp3 = getRandomNum(0,8);\n\t\t}// end while loop\n\t\t\n\t\t// will make sure there will be at least one viable equation\n\t\tswitch (operationSign)\n\t\t{\n\t\t\tcase 1:\n\t\t\tcase 2:\n\t\t\trandomNumList[temp] = randomNumList[temp2] + randomNumList[temp3];\n\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\tcase 4:\n\t\t\trandomNumList[temp] = randomNumList[temp2] * randomNumList[temp3];\n\t\t}// end case statements\n\t\t\n\t\tfor(int i = 0; i < 9; i++)\n\t\t{\n\t\t\tinitButton(i);\n\t\t}//end for \n\t}", "public void displayCleanValues() {\n currentX.setText(\"0.00\");\n currentY.setText(\"0.00\");\n currentZ.setText(\"0.00\");\n }", "private void initialize() { \r\n\t\t\r\n\t\tframe = new JFrame(\"Calculator\");\r\n\t\tframe.setBounds(100, 100, 673, 862);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJLabel output = new JLabel(\"\");\r\n\t\toutput.setFont(new Font(\"Ebrima\", Font.PLAIN, 40));\r\n\t\toutput.setOpaque(true);\r\n\t\toutput.setBackground(Color.WHITE);\r\n\t\toutput.setBounds(38, 51, 560, 108);\r\n\t\tframe.getContentPane().add(output);\r\n\t\t\r\n\t\tJButton button1 = new JButton(\"1\");\r\n\t\tbutton1.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbutton1.setBounds(38, 550, 100, 100);\r\n\t\tframe.getContentPane().add(button1);\r\n\t\tbutton1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"1\";\r\n\t\t\t\teqLabel += \"1\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton button0 = new JButton(\"0\");\r\n\t\tbutton0.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbutton0.setBounds(38, 666, 100, 100);\r\n\t\tframe.getContentPane().add(button0);\r\n\t\tbutton0.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"0\";\r\n\t\t\t\teqLabel += \"0\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton buttonDot = new JButton(\".\");\r\n\t\tbuttonDot.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonDot.setBounds(153, 666, 100, 100);\r\n\t\tframe.getContentPane().add(buttonDot);\r\n\t\tbuttonDot.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \".\";\r\n\t\t\t\teqLabel += \".\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\tJButton buttonNeg = new JButton(\"(-)\");\r\n\t\tbuttonNeg.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonNeg.setBounds(268, 666, 100, 100);\r\n\t\tframe.getContentPane().add(buttonNeg);\r\n\t\tbuttonNeg.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"-\";\r\n\t\t\t\teqLabel += \"-\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton button2 = new JButton(\"2\");\r\n\t\tbutton2.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbutton2.setBounds(153, 550, 100, 100);\r\n\t\tframe.getContentPane().add(button2);\r\n\t\tbutton2.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"2\";\r\n\t\t\t\teqLabel += \"2\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton button3 = new JButton(\"3\");\r\n\t\tbutton3.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbutton3.setBounds(268, 550, 100, 100);\r\n\t\tframe.getContentPane().add(button3);\r\n\t\tbutton3.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"3\";\r\n\t\t\t\teqLabel += \"3\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton button4 = new JButton(\"4\");\r\n\t\tbutton4.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbutton4.setBounds(38, 434, 100, 100);\r\n\t\tframe.getContentPane().add(button4);\r\n\t\tbutton4.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"4\";\r\n\t\t\t\teqLabel += \"4\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton button5 = new JButton(\"5\");\r\n\t\tbutton5.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbutton5.setBounds(153, 434, 100, 100);\r\n\t\tframe.getContentPane().add(button5);\r\n\t\tbutton5.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"5\";\r\n\t\t\t\teqLabel += \"5\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton button6 = new JButton(\"6\");\r\n\t\tbutton6.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbutton6.setBounds(268, 434, 100, 100);\r\n\t\tframe.getContentPane().add(button6);\r\n\t\tbutton6.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"6\";\r\n\t\t\t\teqLabel += \"6\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton button7 = new JButton(\"7\");\r\n\t\tbutton7.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbutton7.setBounds(38, 318, 100, 100);\r\n\t\tframe.getContentPane().add(button7);\r\n\t\tbutton7.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"7\";\r\n\t\t\t\teqLabel += \"7\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton button8 = new JButton(\"8\");\r\n\t\tbutton8.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbutton8.setBounds(153, 318, 100, 100);\r\n\t\tframe.getContentPane().add(button8);\r\n\t\tbutton8.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"8\";\r\n\t\t\t\teqLabel += \"8\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton button9 = new JButton(\"9\");\r\n\t\tbutton9.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbutton9.setBounds(268, 318, 100, 100);\r\n\t\tframe.getContentPane().add(button9);\r\n\t\tbutton9.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \"9\";\r\n\t\t\t\teqLabel += \"9\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton buttonOpenParen = new JButton(\"(\");\r\n\t\tbuttonOpenParen.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonOpenParen.setBounds(383, 318, 100, 100);\r\n\t\tframe.getContentPane().add(buttonOpenParen);\r\n\t\tbuttonOpenParen.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \" ( \";\r\n\t\t\t\teqLabel += \"(\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton buttonClosedParen = new JButton(\")\");\r\n\t\tbuttonClosedParen.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonClosedParen.setBounds(498, 318, 100, 100);\r\n\t\tframe.getContentPane().add(buttonClosedParen);\r\n\t\tbuttonClosedParen.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += \" ) \";\r\n\t\t\t\teqLabel += \")\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton buttonMult = new JButton(\"x\");\r\n\t\tbuttonMult.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonMult.setBounds(383, 434, 100, 100);\r\n\t\tframe.getContentPane().add(buttonMult);\r\n\t\tbuttonMult.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (equation.equals(\"\")) {\r\n\t\t\t\t\tequation = Double.toString(result) + \" * \";\r\n\t\t\t\t\toutput.setText(\"ANS*\");\r\n\t\t\t\t\teqLabel = \"ANS*\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tequation += \" * \";\r\n\t\t\t\t\teqLabel += \"*\";\r\n\t\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton buttonDivide = new JButton(\"\\u00F7\");\r\n\t\tbuttonDivide.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonDivide.setBounds(498, 434, 100, 100);\r\n\t\tframe.getContentPane().add(buttonDivide);\r\n\t\tbuttonDivide.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (equation.equals(\"\")) {\r\n\t\t\t\t\tequation = Double.toString(result) + \" / \";\r\n\t\t\t\t\toutput.setText(\"ANS÷\");\r\n\t\t\t\t\teqLabel = \"ANS÷\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tequation += \" / \";\r\n\t\t\t\t\teqLabel += \"÷\";\r\n\t\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton buttonAdd = new JButton(\"+\");\r\n\t\tbuttonAdd.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonAdd.setBounds(383, 550, 100, 100);\r\n\t\tframe.getContentPane().add(buttonAdd);\r\n\t\tbuttonAdd.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (equation.equals(\"\")) {\r\n\t\t\t\t\tequation = Double.toString(result) + \" + \";\r\n\t\t\t\t\toutput.setText(\"ANS+\");\r\n\t\t\t\t\teqLabel = \"ANS+\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tequation += \" + \";\r\n\t\t\t\t\teqLabel += \"+\";\r\n\t\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton buttonSub = new JButton(\"-\");\r\n\t\tbuttonSub.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonSub.setBounds(498, 550, 100, 100);\r\n\t\tframe.getContentPane().add(buttonSub);\r\n\t\tbuttonSub.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (equation.equals(\"\")) {\r\n\t\t\t\t\tequation = Double.toString(result) + \" - \";\r\n\t\t\t\t\toutput.setText(\"ANS-\");\r\n\t\t\t\t\teqLabel = \"ANS-\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tequation += \" - \";\r\n\t\t\t\t\teqLabel += \"-\";\r\n\t\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton buttonAns = new JButton(\"ANS\");\r\n\t\tbuttonAns.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonAns.setBounds(383, 666, 100, 100);\r\n\t\tframe.getContentPane().add(buttonAns);\r\n\t\tbuttonAns.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation += Double.toString(result);\r\n\t\t\t\teqLabel += \"ANS\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton buttonEqual = new JButton(\"=\");\r\n\t\tbuttonEqual.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonEqual.setBounds(498, 666, 100, 100);\r\n\t\tframe.getContentPane().add(buttonEqual);\r\n\t\tbuttonEqual.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tresult = Calculator.calculatePostExp(Calculator.convertInfix(Calculator.splitExp(equation)));\r\n\t\t\t\tequation = \"\";\r\n\t\t\t\teqLabel = \"\";\r\n\t\t\t\toutput.setText(Double.toString(result));\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton btnDel = new JButton(\"DEL\");\r\n\t\tbtnDel.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbtnDel.setBounds(153, 202, 100, 100);\r\n\t\tframe.getContentPane().add(btnDel);\r\n\t\tbtnDel.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation = equation.substring(0, equation.length()-1);\r\n\t\t\t\teqLabel = equation.substring(0, eqLabel.length()-1);\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJButton buttonCLR = new JButton(\"CLR\");\r\n\t\tbuttonCLR.setFont(new Font(\"Arial Black\", Font.PLAIN, 24));\r\n\t\tbuttonCLR.setBounds(38, 202, 100, 100);\r\n\t\tframe.getContentPane().add(buttonCLR);\r\n\t\tbuttonCLR.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tequation = \"\";\r\n\t\t\t\teqLabel = \"\";\r\n\t\t\t\toutput.setText(eqLabel);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "public void refresh() {\n\t\tdisp.refresh();\n\t\tdisp.repaint();\n\t}", "public void updateCurrentDisplay(Forecast forecast) {\n if(forecast != null) {\n mTemperatureLabel.setText(String.format(\"%s\", forecast.getCurrent().getTemperature()));\n mTemperatureValueUnits.setText(String.format(\"%s\", getString(forecast.getTemperatureUnitsId())));\n mApparentTemperatureValue.setText(String.format(\"%s\", forecast.getCurrent().getApparentTemperature()));\n mApparentTemperatureUnits.setText(String.format(\"%s\", getString(forecast.getTemperatureUnitsId())));\n mTimeLabel.setText(String.format(getString(R.string.time_label_format_string), forecast.getCurrent().getFormattedTime()));\n mHumidityValue.setText(String.format(\"%s%%\", forecast.getCurrent().getHumidity()));\n mPrecipitationChanceValue.setText(String.format(\"%s%%\", forecast.getCurrent().getPrecipitationProbability()));\n mWindValue.setText(String.format(\"%s %s %s\", forecast.getCurrent().getWindSpeed(), getString(forecast.getVelocityUnitsId()), forecast.determineWindBearing(forecast)));\n mStormValue.setText(String.format(\"%s %s %s\", forecast.getCurrent().getNearestStormDistance(), getString(forecast.getDistanceUnitsId()), forecast.determineStormBearing(forecast)));\n mDewValue.setText(String.format(\"%s\", forecast.getCurrent().getDewPoint()));\n mDewValueUnits.setText(String.format(\"%s\", getString(forecast.getTemperatureUnitsId())));\n mVisibilityValue.setText(String.format(\"%s %s\", forecast.getCurrent().getVisibility(), getString(forecast.getDistanceUnitsId())));\n mPressureValue.setText(String.format(\"%s %s\", forecast.getCurrent().getPressure(), getString(forecast.getPressureUnitsId())));\n mOzoneValue.setText(String.format(\"%s %s\", forecast.getCurrent().getOzone(), getString(R.string.units_dobson)));\n mSummaryValue.setText(String.format(\"%s\", forecast.getCurrent().getSummary()));\n mTimeUntilPrecipValue.setText(String.format(\"%s\", forecast.getTimeUntilPrecipitation()));\n mLocationLabel.setText(String.format(\"%s\", getStandardAddress()));\n Drawable drawable = ContextCompat.getDrawable(this, forecast.getCurrent().getIconId(mTempestatibusApplicationSettings.getAppThemePreference(), this));\n mIconImageView.setImageDrawable(drawable);\n mDailyGridView.setAdapter(new DayAdapter(this, forecast.getDailyForecastList()));\n mDailyGridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n startDailyActivity(position);\n }\n });\n }\n toggleRefresh();\n }", "protected void updateDisplays() {\n \trecordDisplay.setText(formatField());\n \tif(updated) {\n \t\trecordDisplay.setFont(regularFont);\n \t} else {\n \t\trecordDisplay.setFont(italicFont);\n \t}\n }", "public void control()\n {\n if(this.listOperator.contains(this.operator))\n {\n\n if(this.operator.equals(\"=\")) // If the operator is \"=\"\n {\n // We ask to the model to display the result\n this.calc.getResult();\n }\n else // Else, we give the operator to the model\n {\n this.calc.setOperator(this.operator);\n }\n }\n \n // If the number is ok\n if(this.number.matches(\"^[0-9.]+$\"))\n {\n this.calc.setNumber(this.number);\n }\n\n this.operator = \"\";\n this.number = \"\";\n }", "public void updateScoreUI() {\n\t\tMap<Integer, Integer> scoreMap = gameLogic.getScoreboard().getTotalScore();\n\n\t\tlblScoreA.setText(String.valueOf(scoreMap.get(0)));\n lblScoreB.setText(String.valueOf(scoreMap.get(1)));\n lblScoreC.setText(String.valueOf(scoreMap.get(2)));\n lblScoreD.setText(String.valueOf(scoreMap.get(3)));\n\t}", "int getDisplayValue();", "@Override\n\tpublic long updateDisplay() {\n\t\treturn AppStatus.NO_REFRESH;\n\t}", "public void actionPerformed (ActionEvent ae){\n \n //displays the digit pressed and sets value needed to modify operand\n if (ae.getActionCommand().equals(\"1\")){\n addDigit(1);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"2\")){\n addDigit(2);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"3\")){\n addDigit(3);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"4\")){\n addDigit(4);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"5\")){\n addDigit(5);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"6\")){\n addDigit(6);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"7\")){\n addDigit(7);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"8\")){\n addDigit(8);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"9\")){\n addDigit(9);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"0\")){\n addDigit(0);\n clearFlag = false;\n }\n \n //Handles if the user selects an operation:\n //Set the right operand to be modified next, selects operation,\n //sets display to be cleared, adds a tooltip to the display\n if (ae.getActionCommand().equals(\"+\")){\n isLeft = false;\n operation = 0;\n clearFlag = true;\n output.setToolTipText(left + \" +\");\n }\n else if (ae.getActionCommand().equals(\"-\")){\n isLeft = false;\n operation = 1;\n clearFlag = true;\n output.setToolTipText(left + \" -\");\n }\n else if (ae.getActionCommand().equals(\"*\")){\n isLeft = false;\n operation = 2;\n clearFlag = true;\n output.setToolTipText(left + \" *\");\n }\n else if (ae.getActionCommand().equals(\"/\")){\n isLeft = false;\n operation = 3;\n clearFlag = true;\n output.setToolTipText(left + \" /\");\n }\n \n //When \"C\" is pressed the display is cleared and operands are set to zero\n if (ae.getActionCommand().equals(\"C\")){\n //Checks if the control key is pressed and cycles through displays\n if ((ae.getModifiers() & ActionEvent.CTRL_MASK) == ActionEvent.CTRL_MASK){\n count ++;\n switch (count % 3){\n case 1:\n dispContents = output.getText();\n output.setText(\"(c) 2011 Alex Mendez\"); break;\n case 2:\n output.setText(\"version 0.1\"); break;\n case 0:\n output.setText(dispContents);\n dispContents = \"\"; break;\n }\n }\n else{\n left = 0;\n right = 0;\n isLeft = true;\n operation = 99;\n clearFlag = true;\n output.setText(\"0\");\n }\n }\n \n //Calls \"Calculate\" method if \"=\" key is pressed, prepares calculator for another operation\n if (ae.getActionCommand().equals(\"=\")){\n left = calculate(left, right, operation);\n right = 0;\n isLeft = false;\n operation = 99;\n output.setText(\"\" + left);\n output.setToolTipText(\"\" + left);\n }\n }", "@Override\r\n public void infixDisplay() {\r\n System.out.print(value);\r\n }", "public void update(){\n\t\tthis.setVisible(true);\n\t}", "private void updatePanels() // updatePanels method start\n\t{\n\t\tbalanceOutput.setText(log.balanceReport());\n\t\tlogOutput.setText(log.logReport());\n\t\tATBOutput.setText(log.adjustedTrialBalance());\n\t\tISOutput.setText(log.incomeStatement());\n\t\tRESOutput.setText(log.retainedEarningsStatement());\n\t\tBSOutput.setText(log.balanceSheet());\n\t}", "public void updateResults() {\n\t\t// Do not update when there is no amount entered\n\t\tif (amountEdit.getText().toString().equalsIgnoreCase(\"\"))\n\t\t\treturn;\n\t\t\n\t\t// Transform .42 to 0.42\n\t\tif (amountEdit.getText().toString().equalsIgnoreCase(\".\")) {\n\t\t\tamountEdit.setText(\"0.\");\n\t\t\tamountEdit.setSelection(amountEdit.getText().length());\n\t\t}\n\t\t\t\n\t\tint from = (int) fromSpinner.getSelectedItemId();\n\t\tint to = (int) toSpinner.getSelectedItemId();\n\t\tDouble amount = Double.parseDouble(amountEdit.getText().toString());\n\t\tDouble result = exchangeRates.convert(from, to, amount);\n\t\t\n\t\t// Build results string and update the view\n\t\tString text = \"\";\n\t\ttext += exchangeRates.getCurrency(from) + \" \";\n\t\ttext += amount + \"\\n\";\n\t\ttext += exchangeRates.getCurrency(to) + \" \";\n\t\ttext += result.toString();\n\t\tresultsText.setText(text);\n\t}", "@Override\n public void display() {\n display.display();\n }", "public interface CalcModel {\n\t/**\n\t * Adds a listener to the model.\n\t * \n\t * @param l\n\t * listener to ad\n\t */\n\tvoid addCalcValueListener(CalcValueListener l);\n\n\t/**\n\t * Removes a listener from the model.\n\t * \n\t * @param l\n\t * listener to remove\n\t */\n\tvoid removeCalcValueListener(CalcValueListener l);\n\n\t/**\n\t * Returns a string representation of the current value in the calculator.\n\t * \n\t * @return string representation of the current value\n\t */\n\tString toString();\n\n\t/**\n\t * Returns a current value in calculator.\n\t * \n\t * @return current value in calculator\n\t */\n\tdouble getValue();\n\n\t/**\n\t * Sets the current value of the calculator to the given one.\n\t * \n\t * @param value\n\t * value to set\n\t */\n\tvoid setValue(double value);\n\n\t/**\n\t * Clears the current value in the calculator (sets it to 0).\n\t */\n\tvoid clear();\n\n\t/**\n\t * Clears the current value (sets it to 0), clears the active operand and clears\n\t * the pending binary operator.\n\t */\n\tvoid clearAll();\n\n\t/**\n\t * Swaps the sign of the current value in the calculator.\n\t */\n\tvoid swapSign();\n\n\t/**\n\t * Inserts a decimal point into the current number if one already doesn't exist.\n\t */\n\tvoid insertDecimalPoint();\n\n\t/**\n\t * Inserts a digit into the current number at the right most position.\n\t * \n\t * @param digit\n\t * new digit to be inserted\n\t */\n\tvoid insertDigit(int digit);\n\n\t/**\n\t * Checks if the active operand is set.\n\t * \n\t * @return true if active operand is set, false otherwise\n\t */\n\tboolean isActiveOperandSet();\n\n\t/**\n\t * Returns the active operand if it is set.\n\t * \n\t * @return active operand\n\t * @throws IllegalStateException\n\t * if active operand isn't set\n\t */\n\tdouble getActiveOperand();\n\n\t/**\n\t * Sets the active operand.\n\t * \n\t * @param activeOperand\n\t * a value to set as an active operand\n\t */\n\tvoid setActiveOperand(double activeOperand);\n\n\t/**\n\t * Clears the active operand.\n\t */\n\tvoid clearActiveOperand();\n\n\t/**\n\t * Returns pending binary operation.\n\t * \n\t * @return pending binary operation or null if it is not set\n\t */\n\tDoubleBinaryOperator getPendingBinaryOperation();\n\n\t/**\n\t * Sets pending binary operation.\n\t * \n\t * @param op\n\t * binary operator to set\n\t */\n\tvoid setPendingBinaryOperation(DoubleBinaryOperator op);\n}", "@Override\r\n\tpublic void update() {\n\t\tthis.repaint();\r\n\t}", "public Calculator () {\n\t\ttotal = 0; // not needed - included for clarity\n\t\thistory = \"0\";\n\t}", "public void setValuesForDisplay() {\n \tthis.trainModelGUI.tempLabel.setText(Integer.toString(this.temperature) + DEGREE + \"F\");\n\n //this.trainCars = this.trainModelGUI.numCars();\n this.trainWheels = this.trainCars * TRAIN_NUM_WHEELS;\n this.trainModelGUI.crewCountLabel.setText(Integer.toString(crew));\n this.trainModelGUI.heightVal.setText(Double.toString(truncateTo(this.trainHeight, 2)));\n this.trainModelGUI.widthVal.setText(Double.toString(truncateTo(this.trainWidth, 2)));\n this.trainModelGUI.lengthVal.setText(Double.toString(truncateTo(this.trainLength, 2)));\n this.trainModelGUI.weightVal.setText(Integer.toString(((int)this.trainWeight)));\n this.trainModelGUI.capacityVal.setText(Integer.toString(this.trainCapacity));\n this.trainModelGUI.powerVal.setText(Double.toString(truncateTo(this.powerIn/1000,2)));\n \n GPSAntenna = this.trainModelGUI.signalFailStatus();\n if(!GPSAntenna) {\n \tthis.trainModelGUI.gpsAntennaStatusLabel.setText(\"ON\");\n } else {\n \tthis.trainModelGUI.gpsAntennaStatusLabel.setText(\"OFF\");\n }\n MBOAntenna = this.trainModelGUI.signalFailStatus();\n if(!MBOAntenna) {\n \tthis.trainModelGUI.mboAntennaStatusLabel.setText(\"ON\");\n } else {\n \tthis.trainModelGUI.mboAntennaStatusLabel.setText(\"OFF\");\n }\n \t\n \tthis.trainModelGUI.timeVal.setText(trnMdl.currentTime.toString());\n \tthis.trainModelGUI.stationVal.setText(this.station);\n \t\n \tif(rightDoorIsOpen == true) {\n \tthis.trainModelGUI.rightDoorStatusLabel.setText(\"OPEN\");\n } else {\n \tthis.trainModelGUI.rightDoorStatusLabel.setText(\"CLOSED\");\n }\n \tif(leftDoorIsOpen == true) {\n \tthis.trainModelGUI.leftDoorStatusLabel.setText(\"OPEN\");\n } else {\n \tthis.trainModelGUI.leftDoorStatusLabel.setText(\"CLOSED\");\n }\n\n \tif(lightsAreOn == true) {\n \t\tthis.trainModelGUI.lightStatusLabel.setText(\"ON\");\n } else {\n \tthis.trainModelGUI.lightStatusLabel.setText(\"OFF\");\n }\n \t\n \tthis.trainModelGUI.numPassengers.setText(Integer.toString(this.numPassengers));\n \tthis.trainModelGUI.numCarsSpinner.setText(Integer.toString(this.trainCars));\n \tthis.trainModelGUI.authorityVal.setText(Double.toString(truncateTo(this.CTCAuthority/METERS_PER_MILE,2)));\n \tthis.trainModelGUI.ctcSpeedLabel.setText(Double.toString(truncateTo(this.CTCSpeed*KPH_TO_MPH,2)));\n \t\n \tif(serviceBrake) {\n \t\tthis.trainModelGUI.serviceLabel.setText(\"ON\");\n } else {\n \tthis.trainModelGUI.serviceLabel.setText(\"OFF\");\n }\n \tif(emerBrake) {\n \t\tthis.trainModelGUI.emergencyLabel.setText(\"ON\");\n } else {\n \tthis.trainModelGUI.emergencyLabel.setText(\"OFF\");\n }\n \t\n \tif(this.arrivalStatus == ARRIVING) {\n \t\tthis.trainModelGUI.arrivalStatusLabel.setText(\"ARRIVING\");\n \t} else if (this.arrivalStatus == EN_ROUTE) {\n \t\tthis.trainModelGUI.arrivalStatusLabel.setText(\"EN ROUTE\");\n \t} else if (this.arrivalStatus == APPROACHING) {\n \t\tthis.trainModelGUI.arrivalStatusLabel.setText(\"APPROACHING\");\n \t} else {\n \t\tthis.trainModelGUI.arrivalStatusLabel.setText(\"DEPARTING\");\n embarkingPassengersSet = false;\n \t}\n\n \tthis.trainModelGUI.currentSpeedLabel.setText(Double.toString(truncateTo((this.currentSpeed*MS_TO_MPH), 2)));\n \n \tif (this.lineColor.equals(\"GREEN\")) {\n \t\tthis.trainModelGUI.lblLine.setText(lineColor);\n \t\tthis.trainModelGUI.lblLine.setForeground(Color.GREEN);\n \t} else {\n \t\tthis.trainModelGUI.lblLine.setText(\"RED\");\n \t\tthis.trainModelGUI.lblLine.setForeground(Color.RED);\n }\n \t\n }", "public void displayCleanValues() {\r\n currentX.setText(\"0.0\");\r\n currentY.setText(\"0.0\");\r\n currentZ.setText(\"0.0\");\r\n }", "@Override()\n public void update() {\n showSeparator(' ');\n \n // Update time display\n showTime(alarmTime);\n \n // Clear weekday Selector\n for(int i = 0; i < DAYS.length; i++) {\n clock.getDigit(2).setText(i+2, DAYS[i]);\n }\n // Update weekday selector\n String str;\n for(int i = 0; i < DAYS.length; i++){\n str = DAYS[i];\n if(days[i]){\n str = \">\"+DAYS[i]+\"<\";\n }\n clock.getDigit(2).setText(i+2,str); \n }\n String activeText = alarm.active ? \"Disable\" : \"Enable\";\n clock.getDigit(2).setText(10, activeText);\n }", "public void display() {\n System.out.println(toString());\n }", "public void setDisplay (int iloscMin){\n display.setText(\"Miny = \" + new Integer(controller.iloscMin).toString());\n }", "public void update(){\n\t\tsetChanged();\n\t\trender();\n\t\tprintTimer();\n\t}", "public void show() {\n super.show(color, value.toString());\n }", "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 }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \".\");\n\t\t\t}", "public void updateTotalSpentLabel() {\n totalSpentLabel.setText(\"Total: $\" + duke.expenseList.getTotalAmount());\n }", "void updateScore () {\n scoreOutput.setText(Integer.toString(score));\n }", "private void statButtonClicked()\n {\n lblSTRValue.setText(dice.statRoll() + \"\");\n lblCONValue.setText(dice.statRoll() + \"\");\n lblDEXValue.setText(dice.statRoll() + \"\");\n lblAGIValue.setText(dice.statRoll() + \"\");\n lblINTValue.setText(dice.statRoll() + \"\");\n lblWISValue.setText(dice.statRoll() + \"\");\n lblCHAValue.setText(dice.statRoll() + \"\");\n lblPERValue.setText(dice.statRoll() + \"\");\n displayPowers();\n }", "public void showStatus(){\n\t\tjlMoves.setText(\"\"+moves);\n\t\tjlCorrectMoves.setText(\"\"+correctMoves);\n\t\tjlWrongMoves.setText(\"\"+wrongMoves);\n\t\tjlOpenMoves.setText(\"\"+openMoves);\n\t\tjlNumberGames.setText(\"\"+numberGames);\n\t}", "private void updateDateDisplay() {\n\t\tStringBuilder date = new StringBuilder()\n\t\t\t\t// Month is 0 based so add 1\n\t\t\t\t.append(mMonth + 1).append(\"-\").append(mDay).append(\"-\")\n\t\t\t\t.append(mYear).append(\" \");\n\n\t\tchangeDateButton.setText(date);\t\n\t}", "public Calculator () {\r\n\t\ttotal = 0; // not needed - included for clarity\r\n\t\thistory = \"\" + 0;\r\n\t}", "private void display()\r\n\t{\r\n\t\tif(cardSet.getCards().size() == 0)\r\n\t\t{\r\n\t\t\tString text = \"\";\r\n\t\t\ttextBox.setText(text);\r\n\t\t\tcardCounterTxt.setText(\"0 / 0\");\r\n\t\t\tMainRunner.getCardManager().setCurrentCard(null);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tCard card = cardSet.getCards().get(currentCardIdx);\r\n\t\t//set the current card in card manager.\r\n\t\tMainRunner.getCardManager().setCurrentCard(card);\r\n\t\tString text = \"\";\r\n\t\tif(front)\r\n\t\t{\r\n\t\t\ttext = card.getFront();\r\n\t\t\ttextBoxContainer.setStyle(\"-fx-border-color: blue\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tList<String> expl = card.getBack();\r\n\t\t\tfor(int i = 0; i < expl.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tif(i + 1 == expl.size())\r\n\t\t\t\t\ttext += expl.get(i);\r\n\t\t\t\telse\r\n\t\t\t\t\ttext += expl.get(i) + \"\\n\";\r\n\t\t\t}\r\n\t\t\ttextBoxContainer.setStyle(\"-fx-border-color: green\");\r\n\t\t}\r\n\t\ttextBox.setText(text);\r\n\t\t\r\n\t\tcardCounterTxt.setText(currentCardIdx + 1 + \" / \" + cardSet.getCards().size());\r\n\t}", "private void updateResultOnScreen() {\n teamAScoreTv.setText(Integer.toString(teamAScoreInt));\n teamBScoreTv.setText(Integer.toString(teamBScoreInt));\n\n if (teamAFoulScoreInt > 1)\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" fouls\");\n else\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" foul\");\n\n if (teamBFoulScoreInt > 1)\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" fouls\");\n else\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" foul\");\n }", "private void updateComputerPlayerMoney()\n {\n lb_money_1.setText(\"My money: \" + computerPlayer_1.getMoney());\n\n // step 2. set lb_money_2 to be \"\"My money: \" + computerPlayer_2.getMoney(), using setText() of the label\n lb_money_2.setText(\"My money: \" + computerPlayer_2.getMoney());\n }", "public void display() {\r\n System.out.println(firstPrompt + \"[\" + minScale + \"-\" + maxScale + \"]\");\r\n }", "@Override\n public void updateUi() {\n\n }", "@Override\n public void updateUi() {\n\n }", "@Override\n public void updateUi() {\n\n }", "private void updateTotal() {\r\n\t\t// We get the size of the model containing all the modules in the list.\r\n\t\tlabelTotal.setText(\"Total Modules: \" + String.valueOf(helperInstMod.model.size()));\r\n\t}", "public void updateChange(View v){\n if(tempUnit=='F')\n changeToTemp.setText(Double.toString(\n (double)Math.round(totalChangeFarenheit*10)/10)\n );\n // Display temperature in Celsius\n else\n changeToTemp.setText(Double.toString(\n (double)Math.round((totalChangeFarenheit-32)*5/9*10)/10)\n );\n }", "private void initialize() {\n\t\tfrmJavaCalculator = new JFrame();\n\t\tfrmJavaCalculator.setResizable(false);\n\t\tfrmJavaCalculator.setType(Type.UTILITY);\n\t\tfrmJavaCalculator.setTitle(\"Calculator\");\n\t\tfrmJavaCalculator.setBounds(100, 100, 278, 345);\n\t\tfrmJavaCalculator.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfrmJavaCalculator.setLocation(500, 250);\n\t\tfrmJavaCalculator.getContentPane().setLayout(null);\n\t\t\n\t\tdisplayText = new JTextField();\n\t\tdisplayText.setEditable(false);\n\t\tdisplayText.setBackground(Color.WHITE);\n\t\tdisplayText.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tdisplayText.setFont(new Font(\"Tahoma\", Font.BOLD, 22));\n\t\tdisplayText.setBounds(10, 23, 244, 36);\n\t\tfrmJavaCalculator.getContentPane().add(displayText);\n\t\tdisplayText.setColumns(10);\n\t\t\n\t\tJButton btnClear = new JButton(\"AC\");\n\t\tbtnClear.setFocusable(false);\n\t\tbtnClear.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(\"\");\n\t\t\t}\n\t\t});\n\t\tbtnClear.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtnClear.setBounds(10, 70, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btnClear);\n\t\t\n\t\tJButton btnSign = new JButton(\"+-\");\n\t\tbtnSign.setFocusable(false);\n\t\tbtnSign.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnSign.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtnSign.setBounds(74, 70, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btnSign);\n\t\t\n\t\tJButton btnMod = new JButton(\"%\");\n\t\tbtnMod.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"%\");\n\t\t\t}\n\t\t});\n\t\tbtnMod.setFocusable(false);\n\t\tbtnMod.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtnMod.setBounds(138, 70, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btnMod);\n\t\t\n\t\tJButton btnDiv = new JButton(\"\\u00F7\");\n\t\tbtnDiv.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"\\u00F7\");\n\t\t\t}\n\t\t});\n\t\tbtnDiv.setFocusable(false);\n\t\tbtnDiv.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtnDiv.setBounds(200, 70, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btnDiv);\n\t\t\n\t\tJButton btn7 = new JButton(\"7\");\n\t\tbtn7.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"7\");\n\t\t\t}\n\t\t});\n\t\tbtn7.setFocusable(false);\n\t\tbtn7.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtn7.setBounds(10, 117, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btn7);\n\t\t\n\t\tJButton btn8 = new JButton(\"8\");\n\t\tbtn8.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"8\");\n\t\t\t}\n\t\t});\n\t\tbtn8.setFocusable(false);\n\t\tbtn8.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtn8.setBounds(74, 117, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btn8);\n\t\t\n\t\tJButton btn9 = new JButton(\"9\");\n\t\tbtn9.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"9\");\n\t\t\t}\n\t\t});\n\t\tbtn9.setFocusable(false);\n\t\tbtn9.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtn9.setBounds(138, 117, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btn9);\n\t\t\n\t\tJButton btnMult = new JButton(\"\\u00D7\");\n\t\tbtnMult.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"\\u00D7\");\n\t\t\t}\n\t\t});\n\t\tbtnMult.setFocusable(false);\n\t\tbtnMult.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtnMult.setBounds(200, 117, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btnMult);\n\t\t\n\t\tJButton btn4 = new JButton(\"4\");\n\t\tbtn4.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"4\");\n\t\t\t}\n\t\t});\n\t\tbtn4.setFocusable(false);\n\t\tbtn4.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtn4.setBounds(10, 164, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btn4);\n\t\t\n\t\tJButton btn5 = new JButton(\"5\");\n\t\tbtn5.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"5\");\n\t\t\t}\n\t\t});\n\t\tbtn5.setFocusable(false);\n\t\tbtn5.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtn5.setBounds(74, 164, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btn5);\n\t\t\n\t\tJButton btn6 = new JButton(\"6\");\n\t\tbtn6.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"6\");\n\t\t\t}\n\t\t});\n\t\tbtn6.setFocusable(false);\n\t\tbtn6.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtn6.setBounds(138, 164, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btn6);\n\t\t\n\t\tJButton btnMinus = new JButton(\"-\");\n\t\tbtnMinus.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"-\");\n\t\t\t}\n\t\t});\n\t\tbtnMinus.setFocusable(false);\n\t\tbtnMinus.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtnMinus.setBounds(200, 164, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btnMinus);\n\t\t\n\t\tJButton btn1 = new JButton(\"1\");\n\t\tbtn1.setFocusable(false);\n\t\tbtn1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"1\");\n\t\t\t}\n\t\t});\n\t\tbtn1.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtn1.setBounds(10, 211, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btn1);\n\t\t\n\t\tJButton btn2 = new JButton(\"2\");\n\t\tbtn2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"2\");\n\t\t\t}\n\t\t});\n\t\tbtn2.setFocusable(false);\n\t\tbtn2.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtn2.setBounds(74, 211, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btn2);\n\t\t\n\t\tJButton btn3 = new JButton(\"3\");\n\t\tbtn3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \"3\");\n\t\t\t}\n\t\t});\n\t\tbtn3.setFocusable(false);\n\t\tbtn3.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtn3.setBounds(138, 211, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btn3);\n\t\t\n\t\tJButton btnPlus = new JButton(\"+\");\n\t\tbtnPlus.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO: check if this is the first operator\n\t\t\t\tdisplayText.setText(displayText.getText() + \"+\");\n\t\t\t}\n\t\t});\n\t\tbtnPlus.setFocusable(false);\n\t\tbtnPlus.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtnPlus.setBounds(200, 211, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btnPlus);\n\t\t\n\t\tJButton btn0 = new JButton(\"0\");\n\t\tbtn0.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO: check if this is the first digit\n\t\t\t\tdisplayText.setText(displayText.getText() + \"0\");\n\t\t\t}\n\t\t});\n\t\tbtn0.setFocusable(false);\n\t\tbtn0.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtn0.setBounds(10, 258, 118, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btn0);\n\t\t\n\t\tJButton btnDot = new JButton(\".\");\n\t\tbtnDot.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO: check if there is a decimal point already\n\t\t\t\tdisplayText.setText(displayText.getText() + \".\");\n\t\t\t}\n\t\t});\n\t\tbtnDot.setFocusable(false);\n\t\tbtnDot.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtnDot.setBounds(138, 258, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btnDot);\n\t\t\n\t\tJButton btnEqual = new JButton(\"=\");\n\t\tbtnEqual.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcalculate();\n\t\t\t}\n\t\t});\n\t\tbtnEqual.setFocusable(false);\n\t\tbtnEqual.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tbtnEqual.setBounds(200, 258, 54, 36);\n\t\tfrmJavaCalculator.getContentPane().add(btnEqual);\n\t}", "@Override\r\n public void onClick(View v) {\r\n if(!firstValue.isEmpty() &&\r\n !operand.isEmpty() &&\r\n !etDisplay.getText().toString().isEmpty()) {\r\n if( calc(firstValue, operand, etDisplay.getText().toString() )){\r\n etDisplay.setText(result);\r\n tvFirst.setText(\"\");\r\n firstValue = \"\";\r\n operand = \"\";\r\n }\r\n }\r\n }", "private void updateView()\n {\n System.out.println(this);\n repaint();\n }", "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}", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n total = total * amount2;\n String.valueOf(total);\n //displaying what user chose\n JOptionPane.showMessageDialog(null, total + \" seconds \" + nameItem +\" \"+ amount2 );\n }", "public void updateDisplayInfo() {\n updateBaseDisplayMetricsIfNeeded();\n this.mDisplay.getDisplayInfo(this.mDisplayInfo);\n this.mDisplay.getMetrics(this.mDisplayMetrics);\n onDisplayChanged(this);\n }" ]
[ "0.8419984", "0.7915619", "0.7036513", "0.6841781", "0.67001903", "0.66915977", "0.663101", "0.65862924", "0.6548088", "0.65332824", "0.65325975", "0.64934796", "0.6488891", "0.6488677", "0.6393093", "0.6386485", "0.6381857", "0.6352632", "0.63365227", "0.6324087", "0.6298212", "0.6293151", "0.6279225", "0.6273963", "0.62734044", "0.62630546", "0.6248401", "0.62477213", "0.6244824", "0.6224966", "0.6219343", "0.61728936", "0.6170471", "0.61611813", "0.6145663", "0.61362845", "0.61233777", "0.6117746", "0.61144084", "0.61000067", "0.6090574", "0.6078973", "0.60717845", "0.60508394", "0.60447943", "0.60440165", "0.60300803", "0.6020791", "0.6018782", "0.6016657", "0.60157335", "0.59975946", "0.59680444", "0.59631956", "0.59597677", "0.5952515", "0.5942379", "0.59388316", "0.5916857", "0.5911098", "0.58865297", "0.58834285", "0.5882657", "0.5862801", "0.58507633", "0.5844981", "0.58425766", "0.58332014", "0.5833161", "0.5829316", "0.58288366", "0.58277875", "0.58209085", "0.5816556", "0.58152634", "0.581155", "0.5801669", "0.580105", "0.5794938", "0.57939476", "0.57937044", "0.5788817", "0.5785818", "0.57842815", "0.5783539", "0.57800984", "0.5769537", "0.57687366", "0.57663685", "0.5761215", "0.5761215", "0.5761215", "0.57605755", "0.5755824", "0.5751771", "0.57417995", "0.5734475", "0.57326776", "0.57324994", "0.57306075" ]
0.805896
1
This method was generated by MyBatis Generator. This method returns the value of the database column t_company_recommend.id
public Integer getId() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getRecommendId() {\n return recommendId;\n }", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "public void setRecommendId(Integer recommendId) {\n this.recommendId = recommendId;\n }", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _expandoColumn.getCompanyId();\n\t}", "java.lang.String getCouponId();", "public Integer getCompanyId() {\n return companyId;\n }", "public Integer getCompanyId() {\n return companyId;\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "public Integer getCompanyId() {\n return this.companyId;\n }", "public int getCompanyId() {\n return companyId;\n }", "@Select({\n \"select\",\n \"recommended_code, user_id, recommended_url, recommended_qrcode, update_time, \",\n \"create_time\",\n \"from user_recommended_code\",\n \"where recommended_code = #{recommendedCode,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"recommended_code\", property=\"recommendedCode\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"user_id\", property=\"userId\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"recommended_url\", property=\"recommendedUrl\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"recommended_qrcode\", property=\"recommendedQrcode\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"update_time\", property=\"updateTime\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"create_time\", property=\"createTime\", jdbcType=JdbcType.TIMESTAMP)\n })\n UserRecommendedCode selectByPrimaryKey(String recommendedCode);", "CfgSearchRecommend selectByPrimaryKey(Long id);", "public Long getCompanyId() {\n return companyId;\n }", "public long getGovernorId()\n\t{\n\t\tassert this.cursor != null;\n\t\treturn this.cursor.getLong(0);\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _second.getCompanyId();\n\t}", "public long getCompanyId() {\n return companyId;\n }", "public String getCompanyId()\n {\n return companyId;\n }", "public java.lang.Integer getId_rango();", "public String getCompanyId() {\r\n return companyId;\r\n }", "public String getCompanyId() {\r\n return companyId;\r\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _scienceApp.getCompanyId();\n\t}", "private int ricavaID(String itemSelected){\n String ogg = ricavaNome(itemSelected);\n String schema = ricavaSchema(itemSelected);\n int id = -1;\n \n Statement stmt; \n ResultSet rst;\n \n try{\n stmt = Database.getDefaultConnection().createStatement();\n \n if(modalita == TRIGGER)\n rst = stmt.executeQuery(\"SELECT T.id_trigger FROM trigger1 T WHERE T.nomeTrigger = '\" + ogg + \"' AND T.schema = '\" + schema + \"'\");\n else\n rst = stmt.executeQuery(\"SELECT P.ID_procedura FROM Procedura P WHERE P.nomeProcedura = '\" + ogg + \"' AND P.schema = '\" + schema + \"'\");\n \n while(rst.next()){\n id = rst.getInt(1);\n }\n \n stmt.close();\n }catch(SQLException e){\n mostraErrore(e);\n }\n \n return id;\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _employee.getCompanyId();\n\t}", "public abstract Integer getCompteId();", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _dictData.getCompanyId();\n\t}", "public Long getCompanyId() {\r\n\t\treturn companyId;\r\n\t}", "public String getCompanyId() {\n return companyId;\n }", "NeeqCompanyAccountingFirmOnline selectByPrimaryKey(Integer id);", "public StrColumn getIprId() {\n return delegate.getColumn(\"ipr_id\", DelegatingStrColumn::new);\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _userTracker.getCompanyId();\n\t}", "@Override\n public long getCompanyId() {\n return _partido.getCompanyId();\n }", "public int getRaterId();", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _paper.getCompanyId();\n\t}", "CompanyExtend selectByPrimaryKey(Long id);", "public Integer getBrandId() {\r\n return brandId;\r\n }", "@Transient\n @Override\n public Integer getId()\n {\n return this.conservDescriptionId;\n }", "public java.lang.String getPrimaryKey() {\n\t\treturn _imageCompanyAg.getPrimaryKey();\n\t}", "TycCompanyCheckCrawler selectByPrimaryKey(Integer id);", "public String getCompanyId() {\r\n\t\treturn companyId;\r\n\t}", "public int getSalesRep_ID();", "public int getSalesRep_ID();", "public Integer getBrandId() {\n return brandId;\n }", "public Integer getBrandId() {\n return brandId;\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _changesetEntry.getCompanyId();\n\t}", "public long getLoyaltyBrandId() {\n return loyaltyBrandId;\n }", "public int getC_BPartner_ID();", "@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _buySellProducts.getPrimaryKey();\n\t}", "public ArrayList<String> getIdFromAllRecommended(ArrayList<User> recommended) {\n\t\tArrayList<String> idRecommended = new ArrayList<String>();\n\t\tfor(int i = 0; i < recommended.size(); i++) {\n\t\t\tidRecommended.add(recommended.get(i).getId());\n\t\t}\n\t\treturn idRecommended;\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _esfTournament.getCompanyId();\n\t}", "public Long getInvoiceNumber(String companyId) throws EntityException\n\t{\n\t\tDatastore ds = null;\n\t\tCompany cmp = null;\n\t\tInwardEntity invoice = null;\n\t\tObjectId oid = null;\n\t\tLong number = null;\n\n\t\ttry\n\t\t{\n\t\t\tds = Morphiacxn.getInstance().getMORPHIADB(\"test\");\n\t\t\toid = new ObjectId(companyId);\n\t\t\tQuery<Company> query = ds.createQuery(Company.class).field(\"id\").equal(oid);\n\t\t\tcmp = query.get();\n\t\t\tif(cmp == null)\n\t\t\t\tthrow new EntityException(404, \"cmp not found\", null, null);\n\n\t\t\tQuery<InwardEntity> invoiceQuery = ds.find(InwardEntity.class).filter(\"company\",cmp).filter(\"isInvoice\", true).order(\"-invoiceSerialId\");\n\t\t\tinvoice = invoiceQuery .get();\n\n\t\t\tif(invoice == null)\n\t\t\t\tnumber = Long.valueOf(1);\n\t\t\telse\n\t\t\t\tnumber = invoice.getInvoiceSerialId() + 1;\n\t\t}\n\t\tcatch(EntityException e){\n\t\t\tthrow e;\n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tthrow new EntityException(500, null, e.getMessage(), null);\n\t\t}\n\n\t\treturn number;\n\n\t}", "@Override\n\tpublic long getId() {\n\t\treturn _buySellProducts.getId();\n\t}", "public static String getRedemptionPromotionId(Connection conn, String redemptionCode) throws SQLException {\n\t\tString promoId = null;\n\t\t//TODO later the select query need to be changed to return ID column instead of Code. \n\t\tPreparedStatement ps = conn.prepareStatement(\"SELECT code FROM CUST.PROMOTION_NEW where UPPER(redemption_code) = UPPER(?) and status \"+getStatusReplacementString()+\" order by expiration_date desc\");\n\t\tps.setString(1, redemptionCode);\n\t\tResultSet rs = ps.executeQuery();\n\n\t\tif (rs.next()) {\n\t\t\tpromoId = rs.getString(\"CODE\");\n\t\t}\n\n\t\trs.close();\n\t\tps.close();\n\n\t\treturn promoId;\n\t}", "public IntColumn getModelId() {\n return (IntColumn) (isText ? textFields.computeIfAbsent(\"model_id\", IntColumn::new) :\n getBinaryColumn(\"model_id\"));\n }", "EcsSupplierRebate selectByPrimaryKey(Integer rebateId);", "public int getId()\r\n/* 75: */ {\r\n/* 76:110 */ return this.idAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI;\r\n/* 77: */ }", "private static String fetchRecruiterId(HashMap<String, Object> parameterMap) {\n\t\tString responsibleId = PsEmployeeChecklist.findByEmployeeIdAndChecklistDate((String)parameterMap.get(\"employeeId\"), (Date)parameterMap.get(\"effectiveDate\"));\n\t\tString recruiterId = CrossReferenceEmployeeId.findLegacyEmployeeIdByEmployeeId(responsibleId);\n\t\t//BEGIN-PROCEDURE HR05-GET-NEXT-OPID\n\t\t//LET $Found = 'N'\n\t\t//BEGIN-SELECT\n\t\t//COD.ZHRF_LEG_EMPL_ID\n\t\t//COD.Emplid\n\t\t//LET $PSRecruiter_Id = &COD.ZHRF_LEG_EMPL_ID\n\t\t//LET $Found = 'Y'\n\t\t//FROM PS_ZHRT_EMPID_CREF COD\n\t\t//WHERE COD.Emplid = $PSResponsible_Id\n\t\t//END-SELECT\n\t\t//IF ($Found = 'N')\n\t\tif(recruiterId == null) {\n\t\t\t//LET $Hld_Wrk_Emplid = $Wrk_Emplid\n\t\t\t//LET $Hld_LegEmplid = $LegEmplid\n\t\t\t//LET $Wrk_Emplid = $PSResponsible_Id\n\t\t\t//LET $LegEmplid //\n\t\t\t//DO Get-Legacy-OprId !From ZHRI100A.SQR\n\t\t\trecruiterId = Main.fetchNewLegacyEmployeeId(parameterMap);\n\t\t\t//LET $PSRecruiter_ID = $LegEmplid\n\t\t\t//LET $Wrk_Emplid = $Hld_Wrk_Emplid\n\t\t\t//LET $LegEmplid = $Hld_LegEmplid\n\t\t\t//END-IF !Found = 'N'\n\t\t}\n\t\t//END-PROCEDURE HR05-GET-NEXT-OPID\n\t\treturn recruiterId;\n\t}", "public Long getPersonaId();", "public long getPersonId();", "@Override\r\n\tpublic int getCustomerIdCustomerDistribution(int CostomerorId) {\n\t\tList<?> resultList = null;\r\n\t\tString sql1= \"SELECT DISTINCT company_id FROM companiesusers where user_id='\"+CostomerorId+\"'\";\r\n\t\tresultList= dao.executeSQLQuery(sql1);\r\n\t\tObject l = resultList.get(0);\r\n\t\tint Customer_ID = Integer.valueOf(String.valueOf(l));\t\r\n\t\t\r\n\t\t\r\n\t\treturn Customer_ID;\r\n\t}", "public int getM_Product_ID();", "public int getM_Product_ID();", "TycCompanyExecutiveCrawler selectByPrimaryKey(Integer id);", "int getOtherId();", "int getDoctorId();", "int getDoctorId();", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "@Id\n @GeneratedValue\n @Column(name = \"ConservDescriptionID\", unique = false, nullable = false, insertable = true, updatable = true)\n public Integer getConservDescriptionId()\n {\n return this.conservDescriptionId;\n }", "public int getIdAssignedByR(Context pContext, String pIdString)\n\t{\n\t Resources resources = pContext.getResources();\n\t String packageName = pContext.getPackageName();\n\n\t // Determine the result and return it\n\t int result = resources.getIdentifier(pIdString, \"id\", packageName);\n\t return result;\n\t}", "public ResultSet appcomp(Long comp_id)throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from company where comp_id=\"+comp_id+\"\");\r\n\treturn rs;\r\n}", "public StrColumn getRobotId() {\n return delegate.getColumn(\"robot_id\", DelegatingStrColumn::new);\n }", "public void setCompanyId(Integer value) {\n this.companyId = value;\n }", "public int getProductId(){\n connect();\n int id = 0;\n String sql = \"SELECT MAX(id_producto) FROM productos\";\n ResultSet result = null;\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n result = ps.executeQuery();\n //result = getQuery(sql);\n if(result != null){\n while(result.next()){\n id = result.getInt(1);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n }\n return id; \n }", "io.dstore.values.IntegerValue getOrderPersonId();", "private int getProductIdFromDatabase() throws ClassNotFoundException, SQLException\r\n {\n String randomKey = Helper.getRandomString();\r\n \r\n //Importiamo il driver di mysql\r\n \r\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\r\n //Tramite l'oggetto conn, stiamo creando la connessione al database \r\n Connection con = Helper.getDatabaseConnection();\r\n \r\n //L'oggetto stmt esegue fisicamente la query sul db\r\n Statement stmt=con.createStatement();\r\n //Genero la query da eseguire\r\n String query = \"INSERT INTO products (price,name,randomkey) VALUES ('\" + this.price + \"','\" + this.name + \"','\" + randomKey + \"')\";\r\n //Eseguo la query di inserimento sul DB\r\n stmt.executeUpdate(query);\r\n \r\n //Genero la query che estrae l'id della macchinetta appena inserita\r\n query = \"SELECT products_id FROM products WHERE randomkey='\" + randomKey + \"'\";\r\n //Estraggo i dati della query, associati ad un oggetto di tipo ResultSet\r\n ResultSet rs=stmt.executeQuery(query);\r\n \r\n //Leggo la prima riga dei risultati dello statement\r\n rs.next();\r\n \r\n //Converto in intero il primo campo del resultset relativo alla query precedente\r\n int retvalue =rs.getInt(1);\r\n \r\n //Cancello dal database la randomkey che non mi serve più\r\n query = \"UPDATE products SET randomkey = NULL WHERE products_id = \" + retvalue;\r\n stmt.executeUpdate(query);\r\n \r\n return retvalue;\r\n }", "java.lang.String getDocumentId();", "@Override\n public String getSearchIDFromDB(String email) {\n String sql = \"select SEARCH_ID from SEARCH a inner join customer c on \" +\n \"a.CUSTOMER_ID = c.CUSTOMER_ID where \" +\n \"c.EMAIL = '\" + email + \"' \" +\n \"order by a.CREATE_DATE desc\";\n Map<String, Object> result = jdbcTemplate.queryForMap(sql);\n return result.get(\"SEARCH_ID\").toString();\n }", "public int getOverdueBill() {\n int customer_id = 0;\n try {\n ResultSet resultset = overdueBills.executeQuery();\n while (resultset.next()) {\n customer_id = resultset.getInt(\"customer_id\");\n System.out.println(\"Customer ID: \" + customer_id);\n }\n resultset.close();\n }\n catch (SQLException exception) {\n System.out.println(\"Try Again!\");\n }\n return customer_id;\n }", "@JsonIgnore\n\t@Id\n\tpublic Long getId() {\n\t\treturn Long.valueOf(String.format(\"%d%02d\", sale.getSaleYear(), this.num));\n\t}", "List<Coupon> findByCompanyId(int companyId);", "public String getProductID(Integer randomeProductPlateNumber) {\n\t\t By currentProductLinkField = By.xpath(\"//*[@id='product-list']/div/div[\"+ randomeProductPlateNumber + \"]/a[1]\");\n\t\treturn driver.findElement(currentProductLinkField).getAttribute(\"data-linkproductid\");\n\t}", "@Id \n\t@Basic( optional = false )\n\t@Column( name = \"book_id\", nullable = false )\n\tpublic Integer getId() {\n\t\treturn this.id;\n\t\t\n\t}", "private static int getComponentIdFromCompName(String compName){\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria componentCriteria = session.createCriteria(ComponentEntity.class);\n\t\tcomponentCriteria.add(Restrictions.eq(\"componentName\",compName));\n\t\tcomponentCriteria.add(Restrictions.eq(\"delInd\", 0));\n\t\tcomponentCriteria.setMaxResults(1);\n\t\tComponentEntity com =(ComponentEntity) componentCriteria.uniqueResult();\n\t\tint compId = 0;\n\t\tif(com != null){\n\t\t\tcompId = com.getComponentId();\n\t\t}\n\t\ttxn.commit();\n\t\treturn compId;\n\t}", "public java.lang.Integer getCare_id();", "public void getFindByIdCompany() {\n log.info(\"CompaniesContactsBean => method : getFindByIdCompany()\");\n\n log.info(\"ID company\" + companiesBean.getCompaniesEntity().getId());\n this.companiesContactsEntityList = findByIdCompany(companiesBean.getCompaniesEntity());\n }", "@Select(\"select * from website_cooperativeuser where id =#{id}\")\r\n WebsiteCooperativeuser selectByPrimaryKey(String id);", "public int findBiggestId() throws SQLException {\n\t\tString sqlSentence = sqlLoader.getProperty(\"SQL_GET_BIGGEST_ID_SUPPLIER_ORDERS\");\n\t\tConnection con = Jdbc.getCurrentConnection();\n\t\tStatement st = con.createStatement();\n\n\t\tResultSet rs = st.executeQuery(sqlSentence);\n\t\tint id = 0;\n\n\t\tif (rs.next()) {\n\t\t\tid = rs.getInt(1);\n\t\t}\n\t\tJdbc.close(rs, st);\n\n\t\treturn id;\n\t}", "public Long getIdProveedor() {\r\n return idProveedor;\r\n }" ]
[ "0.68179333", "0.5987353", "0.5987353", "0.5987353", "0.5987353", "0.5987353", "0.5894158", "0.58603024", "0.58603024", "0.58603024", "0.58603024", "0.5748062", "0.57185435", "0.5705393", "0.5705393", "0.56593907", "0.56593907", "0.56593907", "0.5655056", "0.5598506", "0.55536276", "0.5534516", "0.55005664", "0.5491023", "0.54873884", "0.54748386", "0.5394337", "0.53910285", "0.53690505", "0.53690505", "0.53551364", "0.5351982", "0.5346011", "0.5337126", "0.5333886", "0.5324955", "0.53187764", "0.5303238", "0.52965254", "0.5287291", "0.52740854", "0.52682996", "0.5264629", "0.5249275", "0.5219509", "0.5217615", "0.5184699", "0.5176093", "0.5162243", "0.5155237", "0.5155237", "0.5154233", "0.5154233", "0.5146638", "0.5138941", "0.5105658", "0.50961417", "0.5086969", "0.5084756", "0.508457", "0.5079211", "0.5074486", "0.5073121", "0.5063579", "0.50628734", "0.5059588", "0.5057814", "0.5053764", "0.50473356", "0.50472546", "0.50472546", "0.50441265", "0.5036833", "0.5025886", "0.5025886", "0.5015314", "0.5015314", "0.5015314", "0.5015314", "0.5015314", "0.50054914", "0.5003242", "0.49965984", "0.49903753", "0.49825144", "0.49520183", "0.49444142", "0.49374333", "0.4936855", "0.49230328", "0.4921764", "0.49013954", "0.48948574", "0.48939663", "0.48844993", "0.48836476", "0.48814484", "0.48797944", "0.4874287", "0.48739785", "0.4870461" ]
0.0
-1
This method was generated by MyBatis Generator. This method sets the value of the database column t_company_recommend.id
public void setId(Integer id) { this.id = id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRecommendId(Integer recommendId) {\n this.recommendId = recommendId;\n }", "public Integer getRecommendId() {\n return recommendId;\n }", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_expandoColumn.setCompanyId(companyId);\n\t}", "public void setCompanyId(Integer value) {\n this.companyId = value;\n }", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n public void setCompanyId(long companyId) {\n _partido.setCompanyId(companyId);\n }", "public void setCompanyId(int companyId) {\n this.companyId = companyId;\n }", "public void setCompanyId(Integer companyId) {\n this.companyId = companyId;\n }", "public void setCompanyId(Integer companyId) {\n this.companyId = companyId;\n }", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_second.setCompanyId(companyId);\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_userTracker.setCompanyId(companyId);\n\t}", "public void setCompanyId(long companyId) {\n this.companyId = companyId;\n }", "public void setCompany(java.lang.Integer newCompany) {\n\tcompany = newCompany;\n}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_scienceApp.setCompanyId(companyId);\n\t}", "public void setCompanyId(Long companyId) {\n this.companyId = companyId;\n }", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\tmodel.setCompanyId(companyId);\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\tmodel.setCompanyId(companyId);\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\tmodel.setCompanyId(companyId);\n\t}", "public void setCompanyId(String companyId) {\r\n this.companyId = companyId;\r\n }", "public void setCompanyId(String companyId) {\r\n this.companyId = companyId;\r\n }", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_changesetEntry.setCompanyId(companyId);\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_paper.setCompanyId(companyId);\n\t}", "public void setBrandid( Integer brandid )\n {\n this.brandid = brandid ;\n }", "public void setM_Product_ID (int M_Product_ID);", "public void setM_Product_ID (int M_Product_ID);", "public void setLoyaltyBrandId(long value) {\n this.loyaltyBrandId = value;\n }", "public void setRecommendDate(Date recommendDate) {\n this.recommendDate = recommendDate;\n }", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_employee.setCompanyId(companyId);\n\t}", "public void setCompanyId(Long companyId) {\r\n\t\tthis.companyId = companyId;\r\n\t}", "public void setCompanycode(java.lang.Integer newCompany) {\n\tcompanycode = newCompany;\n}", "public void setRecommendBidPrice(BigDecimal recommendBidPrice) {\n this.recommendBidPrice = recommendBidPrice;\n }", "public int getCompanyId() {\n return companyId;\n }", "public Integer getCompanyId() {\n return companyId;\n }", "public Integer getCompanyId() {\n return companyId;\n }", "public void setIdAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI(int idAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI)\r\n/* 85: */ {\r\n/* 86:118 */ this.idAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI = idAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI;\r\n/* 87: */ }", "@SuppressWarnings(\"null\")\n private void setIDCupon() {\n int id_opinion = 1;\n ResultSet rs = null;\n Statement s = null;\n //cb_TS.addItem(\"Seleccione una opinion...\");\n //Creamos la query\n try {\n s = conexion.createStatement();\n } catch (SQLException se) {\n System.out.println(\"probando conexion de consulta\");\n }\n try {\n rs = s.executeQuery(\"SELECT id_cupon FROM cupon order by id_cupon desc LIMIT 1\");\n while (rs.next()) {\n id_opinion = Integer.parseInt(rs.getString(1))+1;\n }\n tf_ID.setText(Integer.toString(id_opinion));\n } catch (SQLException ex) {\n Logger.getLogger(N_Opinion.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void setCompanyId(String companyId) {\n this.companyId = companyId == null ? null : companyId.trim();\n }", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_esfTournament.setCompanyId(companyId);\n\t}", "public void setCompanyId(String companyId) {\r\n\t\tthis.companyId = companyId;\r\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_dictData.setCompanyId(companyId);\n\t}", "CfgSearchRecommend selectByPrimaryKey(Long id);", "public void setIdAutorizacionEmpresaSRI(int idAutorizacionEmpresaSRI)\r\n/* 79: */ {\r\n/* 80:122 */ this.idAutorizacionEmpresaSRI = idAutorizacionEmpresaSRI;\r\n/* 81: */ }", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@JsonSetter(\"company_id\")\n public void setCompanyId (String value) { \n this.companyId = value;\n }", "public Long getCompanyId() {\n return companyId;\n }", "public void setId_rango(java.lang.Integer newId_rango);", "public abstract void setCompteId(Integer pCompteId);", "public Integer getCompanyId() {\n return this.companyId;\n }", "public String getCompanyId() {\r\n return companyId;\r\n }", "public String getCompanyId() {\r\n return companyId;\r\n }", "public void assignId(int id);", "public long getCompanyId() {\n return companyId;\n }", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_permissionType.setCompanyId(companyId);\n\t}", "public String getCompanyId()\n {\n return companyId;\n }", "@Override\r\n\tpublic void setCompanyData(RentCompanyData companyData) {\n\r\n\t}", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "@Override\n\tpublic void setId(long id) {\n\t\t_buySellProducts.setId(id);\n\t}", "public void setReceiverId(int v) \n {\n \n if (this.receiverId != v)\n {\n this.receiverId = v;\n setModified(true);\n }\n \n \n }", "CompanyExtend selectByPrimaryKey(Long id);", "public void setRelProductId(int v) throws TorqueException\n {\n \n if (this.relProductId != v)\n {\n this.relProductId = v;\n setModified(true);\n }\n \n \n if (aProductRelatedByRelProductId != null && !(aProductRelatedByRelProductId.getProductId() == v))\n {\n aProductRelatedByRelProductId = null;\n }\n \n }", "final public void setId(int idp) {\n\t\tid = idp;\n\t\tidSet = true;\n\t}", "public String getCompanyId() {\n return companyId;\n }", "public void setSalesRep_ID (int SalesRep_ID);", "public void setSalesRep_ID (int SalesRep_ID);", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _expandoColumn.getCompanyId();\n\t}", "public void setIdProveedor(Integer idProveedor) {\n this.idProveedor = idProveedor;\n }", "public void setProductRelatedByRelProductIdKey(ObjectKey key) throws TorqueException\n {\n \n setRelProductId(((NumberKey) key).intValue());\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "private void setOtherId(int value) {\n \n otherId_ = value;\n }", "public Long getCompanyId() {\r\n\t\treturn companyId;\r\n\t}", "@Override\n\tpublic void modifryCompany(BeanCompany Company) {\n\t\tSession session = HibernateUtil.getSessionFactory().getCurrentSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry {\n\t\t\tsession.update(Company);\n\t\t\ttx.commit();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\ttx.rollback();\n\t\t}\n\t}", "@Override\n public void setIdFacebook(String idFacebook) {\n this.idFacebook = idFacebook;\n }", "public void setCompany(String company)\r\n {\r\n m_company = company;\r\n }", "public void setC_BPartner_ID (int C_BPartner_ID);", "public void setBrandId(Integer brandId) {\r\n this.brandId = brandId;\r\n }", "public void setNextIdStatement(EdaContext xContext) throws IcofException {\n\n\t\t// Define the query.\n\t\tString query = TkAudit.getNextIdQuery(xContext, TABLE_NAME, ID_COL);\n\n\t\t// Set and prepare the query and statement.\n\t\tsetQuery(xContext, query);\n\n\t}", "public void autoID(){\n try {\n \n System.out.println(\"trying connection\");\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n con=DriverManager.getConnection (\"jdbc:mysql://localhost:3306/airlines\",\"root\",\"root\");\n Statement s=con.createStatement();\n System.out.println(\"connection sucessful\");\n ResultSet rs=s.executeQuery(\"select MAX(ID)from customer\");\n rs.next();\n rs.getString(\"MAX(ID)\");\n if(rs.getString(\"MAX(ID)\")==null)\n {\n txtcustid.setText(\"CS001\");\n }\n else\n {\n long id=Long.parseLong(rs.getString(\"MAX(ID)\").substring(2,rs.getString(\"MAX(ID)\").length()));\n id++;\n txtcustid.setText(\"CS\"+String.format(\"%03d\", id));\n }\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(searchCustomer.class.getName()).log(Level.SEVERE, null, ex);\n \n } catch (SQLException ex) {\n Logger.getLogger(searchCustomer.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Select({\n \"select\",\n \"recommended_code, user_id, recommended_url, recommended_qrcode, update_time, \",\n \"create_time\",\n \"from user_recommended_code\",\n \"where recommended_code = #{recommendedCode,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"recommended_code\", property=\"recommendedCode\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"user_id\", property=\"userId\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"recommended_url\", property=\"recommendedUrl\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"recommended_qrcode\", property=\"recommendedQrcode\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"update_time\", property=\"updateTime\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"create_time\", property=\"createTime\", jdbcType=JdbcType.TIMESTAMP)\n })\n UserRecommendedCode selectByPrimaryKey(String recommendedCode);", "public void setCompany_mst(final arrow.businesstraceability.persistence.entity.Company_mst company_mst) {\n if (company_mst == null) {\n this.id_sarscom = null;\n }\n else {\n this.id_sarscom = company_mst.getCom_company_code();\n }\n this.company_mst = company_mst;\n }", "public void setBuyerId(Long buyerId) {\r\n this.buyerId = buyerId;\r\n }", "public void setNewsletterId(int v) \n {\n \n if (this.newsletterId != v)\n {\n this.newsletterId = v;\n setModified(true);\n }\n \n \n }", "public String getCompanyId() {\r\n\t\treturn companyId;\r\n\t}", "public void setProductRelatedByRelProductId(Product v) throws TorqueException\n {\n if (v == null)\n {\n setRelProductId( 999);\n }\n else\n {\n setRelProductId(v.getProductId());\n }\n aProductRelatedByRelProductId = v;\n }", "private void setId(int ida2) {\n\t\tthis.id=ida;\r\n\t}" ]
[ "0.678404", "0.6508946", "0.59440684", "0.59440684", "0.59440684", "0.59440684", "0.59440684", "0.5796197", "0.573953", "0.57178944", "0.57178944", "0.57178944", "0.57178944", "0.568868", "0.5627931", "0.5605439", "0.5605439", "0.5580662", "0.5523654", "0.5522375", "0.5493163", "0.5474877", "0.5421153", "0.541709", "0.541709", "0.541709", "0.541628", "0.541628", "0.53848046", "0.5352621", "0.5351633", "0.5307149", "0.5307149", "0.5286042", "0.52542955", "0.5253195", "0.5245054", "0.52355576", "0.5147746", "0.51444775", "0.51393694", "0.51393694", "0.51245654", "0.5123945", "0.5119213", "0.51099914", "0.5107568", "0.50700736", "0.5062288", "0.50465554", "0.503665", "0.503665", "0.503665", "0.503665", "0.50345516", "0.50007355", "0.5000457", "0.4990215", "0.49899453", "0.49821162", "0.49821162", "0.49800795", "0.49684104", "0.49658254", "0.49504653", "0.49380618", "0.49350846", "0.49350846", "0.49350846", "0.49350846", "0.49350846", "0.4926433", "0.49169016", "0.48977312", "0.48977143", "0.48959023", "0.4895532", "0.4892292", "0.4892292", "0.4890991", "0.4875325", "0.48738453", "0.48713815", "0.48713815", "0.48713815", "0.48704728", "0.486712", "0.48631874", "0.48536262", "0.48412326", "0.4838551", "0.480438", "0.48042172", "0.47981143", "0.47940326", "0.47926107", "0.47812644", "0.47811437", "0.47798005", "0.47711143", "0.47684065" ]
0.0
-1
This method was generated by MyBatis Generator. This method returns the value of the database column t_company_recommend.company_id
public Long getCompanyId() { return companyId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "public Integer getCompanyId() {\n return companyId;\n }", "public Integer getCompanyId() {\n return companyId;\n }", "public Integer getCompanyId() {\n return this.companyId;\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _expandoColumn.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "public int getCompanyId() {\n return companyId;\n }", "public long getCompanyId() {\n return companyId;\n }", "public Long getCompanyId() {\r\n\t\treturn companyId;\r\n\t}", "public String getCompanyId() {\r\n return companyId;\r\n }", "public String getCompanyId() {\r\n return companyId;\r\n }", "public String getCompanyId() {\n return companyId;\n }", "public String getCompanyId()\n {\n return companyId;\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _employee.getCompanyId();\n\t}", "public String getCompanyId() {\r\n\t\treturn companyId;\r\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _second.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _dictData.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _scienceApp.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _userTracker.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _paper.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _changesetEntry.getCompanyId();\n\t}", "public void setCompanyId(Integer value) {\n this.companyId = value;\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _esfTournament.getCompanyId();\n\t}", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "@Override\n public long getCompanyId() {\n return _partido.getCompanyId();\n }", "public void setCompanyId(Integer companyId) {\n this.companyId = companyId;\n }", "public void setCompanyId(Integer companyId) {\n this.companyId = companyId;\n }", "public void setCompanyId(long companyId) {\n this.companyId = companyId;\n }", "public void setCompanyId(int companyId) {\n this.companyId = companyId;\n }", "public void setCompanyId(Long companyId) {\n this.companyId = companyId;\n }", "public java.lang.Integer getCompany() {\n\treturn company;\n}", "@JsonGetter(\"company_id\")\n public String getCompanyId ( ) { \n return this.companyId;\n }", "public java.lang.Integer getCompanycode() {\n\treturn companycode;\n}", "public java.lang.String getPrimaryKey() {\n\t\treturn _imageCompanyAg.getPrimaryKey();\n\t}", "CompanyExtend selectByPrimaryKey(Long id);", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "public void setCompanyId(String companyId) {\r\n this.companyId = companyId;\r\n }", "public void setCompanyId(String companyId) {\r\n this.companyId = companyId;\r\n }", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_expandoColumn.setCompanyId(companyId);\n\t}", "public String getCompanyCode() {\r\n return companyCode;\r\n }", "public String getCompanyCode() {\r\n return companyCode;\r\n }", "public Long getInvoiceNumber(String companyId) throws EntityException\n\t{\n\t\tDatastore ds = null;\n\t\tCompany cmp = null;\n\t\tInwardEntity invoice = null;\n\t\tObjectId oid = null;\n\t\tLong number = null;\n\n\t\ttry\n\t\t{\n\t\t\tds = Morphiacxn.getInstance().getMORPHIADB(\"test\");\n\t\t\toid = new ObjectId(companyId);\n\t\t\tQuery<Company> query = ds.createQuery(Company.class).field(\"id\").equal(oid);\n\t\t\tcmp = query.get();\n\t\t\tif(cmp == null)\n\t\t\t\tthrow new EntityException(404, \"cmp not found\", null, null);\n\n\t\t\tQuery<InwardEntity> invoiceQuery = ds.find(InwardEntity.class).filter(\"company\",cmp).filter(\"isInvoice\", true).order(\"-invoiceSerialId\");\n\t\t\tinvoice = invoiceQuery .get();\n\n\t\t\tif(invoice == null)\n\t\t\t\tnumber = Long.valueOf(1);\n\t\t\telse\n\t\t\t\tnumber = invoice.getInvoiceSerialId() + 1;\n\t\t}\n\t\tcatch(EntityException e){\n\t\t\tthrow e;\n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tthrow new EntityException(500, null, e.getMessage(), null);\n\t\t}\n\n\t\treturn number;\n\n\t}", "public String getCompanyCode() {\n return companyCode;\n }", "public void getFindByIdCompany() {\n log.info(\"CompaniesContactsBean => method : getFindByIdCompany()\");\n\n log.info(\"ID company\" + companiesBean.getCompaniesEntity().getId());\n this.companiesContactsEntityList = findByIdCompany(companiesBean.getCompaniesEntity());\n }", "public void setCompanyId(Long companyId) {\r\n\t\tthis.companyId = companyId;\r\n\t}", "java.lang.String getCouponId();", "public Company findCompany(long id);", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _permissionType.getCompanyId();\n\t}", "public void setCompanyId(String companyId) {\r\n\t\tthis.companyId = companyId;\r\n\t}", "public long getGovernorId()\n\t{\n\t\tassert this.cursor != null;\n\t\treturn this.cursor.getLong(0);\n\t}", "public java.lang.Integer getCompanyheaderId () {\n\t\treturn companyheaderId;\n\t}", "public String getCompany()\n {\n return (String) getProperty(PropertyIDMap.PID_COMPANY);\n }", "public abstract Integer getCompteId();", "public String getCompany() {\n return (String) get(\"company\");\n }", "Company getCompany(int id);", "List<Coupon> findByCompanyId(int companyId);", "Optional<Company> findById(long company_id);", "@Override\r\n\tpublic int getCustomerIdCustomerDistribution(int CostomerorId) {\n\t\tList<?> resultList = null;\r\n\t\tString sql1= \"SELECT DISTINCT company_id FROM companiesusers where user_id='\"+CostomerorId+\"'\";\r\n\t\tresultList= dao.executeSQLQuery(sql1);\r\n\t\tObject l = resultList.get(0);\r\n\t\tint Customer_ID = Integer.valueOf(String.valueOf(l));\t\r\n\t\t\r\n\t\t\r\n\t\treturn Customer_ID;\r\n\t}", "public String getCompanyCd() {\r\n return companyCd;\r\n }", "public String getCompanyCd() {\r\n return companyCd;\r\n }", "public void setCompanyId(String companyId) {\n this.companyId = companyId == null ? null : companyId.trim();\n }", "public StrColumn getIprId() {\n return delegate.getColumn(\"ipr_id\", DelegatingStrColumn::new);\n }", "Company getOrCreateCompanyId(String companyID) throws Exception;", "public java.lang.String getCompanyAgId() {\n\t\treturn _imageCompanyAg.getCompanyAgId();\n\t}", "public ResultSet appcomp(Long comp_id)throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from company where comp_id=\"+comp_id+\"\");\r\n\treturn rs;\r\n}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_second.setCompanyId(companyId);\n\t}", "public String getCompany() {\n return company;\n }", "java.lang.String getBusinessId();", "public String getCompany()\n\t{\n\t\treturn getCompany( getSession().getSessionContext() );\n\t}", "public String getCompany() {\r\n\t\treturn company;\r\n\t}", "public CompanyEntity getCompany(long companyId) throws Exception {\n Connection connection = null;\n PreparedStatement preparedStatement = null;\n\n try {\n //Establish a connection from the connection manager\n connection = JdbcUtils.getConnection();\n\n //Creating the SQL query\n String sqlStatement = \"SELECT * FROM companies WHERE id = ?\";\n\n //Combining between the syntax and our connection\n preparedStatement = connection.prepareStatement(sqlStatement);\n\n //Replacing the question marks in the statement above with the relevant data\n preparedStatement.setLong(1, companyId);\n\n //Executing the update\n ResultSet resultSet = preparedStatement.executeQuery();\n\n if (!resultSet.next()) {\n throw new ApplicationException(ErrorType.GENERAL_ERROR, \"Cannot retrieve information\");\n }\n// creating an array of companies\n CompanyEntity companyEntity = new CompanyEntity();\n companyEntity.setCompanyId(resultSet.getLong(\"id\"));\n companyEntity.setCompanyName(resultSet.getString(\"company_name\"));\n companyEntity.setCompanyEmail(resultSet.getString(\"company_email\"));\n companyEntity.setCompanyPhone(resultSet.getString(\"company_phone\"));\n companyEntity.setCompanyAddress(resultSet.getString(\"company_address\"));\n\n return companyEntity;\n\n } catch (Exception e) {\n //\t\t\te.printStackTrace();\n throw new Exception(\"Failed to retrieve data\", e);\n } finally {\n //Closing the resources\n JdbcUtils.closeResources(connection, preparedStatement);\n }\n }", "public String getCompany()\r\n {\r\n return (m_company);\r\n }", "public String getCompany() {\n return company;\n }", "public String getCompany() {\n return company;\n }", "public IntColumn getModelId() {\n return (IntColumn) (isText ? textFields.computeIfAbsent(\"model_id\", IntColumn::new) :\n getBinaryColumn(\"model_id\"));\n }", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_scienceApp.setCompanyId(companyId);\n\t}", "public String getCompany() {\n\t\treturn company;\n\t}", "public String getCompany() {\n\t\treturn company;\n\t}", "NeeqCompanyAccountingFirmOnline selectByPrimaryKey(Integer id);", "private static int getComponentIdFromCompName(String compName){\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria componentCriteria = session.createCriteria(ComponentEntity.class);\n\t\tcomponentCriteria.add(Restrictions.eq(\"componentName\",compName));\n\t\tcomponentCriteria.add(Restrictions.eq(\"delInd\", 0));\n\t\tcomponentCriteria.setMaxResults(1);\n\t\tComponentEntity com =(ComponentEntity) componentCriteria.uniqueResult();\n\t\tint compId = 0;\n\t\tif(com != null){\n\t\t\tcompId = com.getComponentId();\n\t\t}\n\t\ttxn.commit();\n\t\treturn compId;\n\t}", "public CompanyBean getCompanyBean(SampletypeBean pObject) throws SQLException\n {\n CompanyBean other = CompanyManager.getInstance().createCompanyBean();\n other.setCompanyid(pObject.getCompanyid());\n return CompanyManager.getInstance().loadUniqueUsingTemplate(other);\n }", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\tmodel.setCompanyId(companyId);\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\tmodel.setCompanyId(companyId);\n\t}" ]
[ "0.69952357", "0.69952357", "0.69952357", "0.69952357", "0.69952357", "0.6982491", "0.6982491", "0.6982491", "0.6982491", "0.6979078", "0.6979078", "0.69738257", "0.6939983", "0.6806637", "0.6806637", "0.6806637", "0.67330205", "0.6723703", "0.6714523", "0.66748744", "0.66748744", "0.6621314", "0.65769964", "0.6572018", "0.654333", "0.65392", "0.64580905", "0.6427745", "0.6371804", "0.63521487", "0.632258", "0.6280907", "0.6251492", "0.6159992", "0.6159992", "0.6159992", "0.6159992", "0.6159992", "0.6146269", "0.61440116", "0.61440116", "0.5997031", "0.5977069", "0.5962055", "0.59277534", "0.59059346", "0.58978266", "0.58712107", "0.58670086", "0.5863569", "0.5863569", "0.5863569", "0.5863569", "0.5842224", "0.5842224", "0.58329964", "0.5810234", "0.5810234", "0.5794429", "0.5782249", "0.57700336", "0.5761187", "0.57002014", "0.5646462", "0.5601858", "0.5537228", "0.5530796", "0.5529597", "0.55259943", "0.5494887", "0.5470105", "0.5450309", "0.54484636", "0.5436582", "0.5406324", "0.53962666", "0.53962666", "0.53680795", "0.53622085", "0.53544873", "0.5348748", "0.53403044", "0.53367823", "0.5331434", "0.5326072", "0.53202283", "0.531797", "0.5308363", "0.5301743", "0.5300246", "0.5300246", "0.52687997", "0.5263884", "0.52592605", "0.52592605", "0.5256806", "0.5242412", "0.52388376", "0.5233222", "0.5233222" ]
0.6804942
16
This method was generated by MyBatis Generator. This method sets the value of the database column t_company_recommend.company_id
public void setCompanyId(Long companyId) { this.companyId = companyId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(Integer value) {\n this.companyId = value;\n }", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "public void setCompanyId(int companyId) {\n this.companyId = companyId;\n }", "public void setCompanyId(Integer companyId) {\n this.companyId = companyId;\n }", "public void setCompanyId(Integer companyId) {\n this.companyId = companyId;\n }", "public void setCompanyId(long companyId) {\n this.companyId = companyId;\n }", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_expandoColumn.setCompanyId(companyId);\n\t}", "public void setCompanyId(String companyId) {\r\n this.companyId = companyId;\r\n }", "public void setCompanyId(String companyId) {\r\n this.companyId = companyId;\r\n }", "@Override\n public void setCompanyId(long companyId) {\n _partido.setCompanyId(companyId);\n }", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_second.setCompanyId(companyId);\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_scienceApp.setCompanyId(companyId);\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_userTracker.setCompanyId(companyId);\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\tmodel.setCompanyId(companyId);\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\tmodel.setCompanyId(companyId);\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\tmodel.setCompanyId(companyId);\n\t}", "public void setCompanyId(Long companyId) {\r\n\t\tthis.companyId = companyId;\r\n\t}", "public void setCompany(java.lang.Integer newCompany) {\n\tcompany = newCompany;\n}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_changesetEntry.setCompanyId(companyId);\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_employee.setCompanyId(companyId);\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_paper.setCompanyId(companyId);\n\t}", "public void setCompanyId(String companyId) {\n this.companyId = companyId == null ? null : companyId.trim();\n }", "public void setCompanyId(String companyId) {\r\n\t\tthis.companyId = companyId;\r\n\t}", "public Integer getCompanyId() {\n return companyId;\n }", "public Integer getCompanyId() {\n return companyId;\n }", "public void setCompanycode(java.lang.Integer newCompany) {\n\tcompanycode = newCompany;\n}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_esfTournament.setCompanyId(companyId);\n\t}", "public Long getCompanyId() {\n return companyId;\n }", "public int getCompanyId() {\n return companyId;\n }", "public Integer getCompanyId() {\n return this.companyId;\n }", "public String getCompanyId() {\r\n return companyId;\r\n }", "public String getCompanyId() {\r\n return companyId;\r\n }", "public Long getCompanyId() {\r\n\t\treturn companyId;\r\n\t}", "public long getCompanyId() {\n return companyId;\n }", "public void setCompany(String company)\r\n {\r\n m_company = company;\r\n }", "public String getCompanyId() {\n return companyId;\n }", "public void setCompany(String company) {\n this.company = company;\n }", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_dictData.setCompanyId(companyId);\n\t}", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "public String getCompanyId() {\r\n\t\treturn companyId;\r\n\t}", "public String getCompanyId()\n {\n return companyId;\n }", "public void setCompany(String company) {\r\n\t\tthis.company = company;\r\n\t}", "public void setCompany(String company) {\n\t\tthis.company = company;\n\t}", "public void setCompany(Company aCompany) {\n company = aCompany;\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _expandoColumn.getCompanyId();\n\t}", "@JsonSetter(\"company_id\")\n public void setCompanyId (String value) { \n this.companyId = value;\n }", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_permissionType.setCompanyId(companyId);\n\t}", "@Override\n\tpublic int alterCompany(Company company) {\n\t\treturn companyDao.alterCompany(company);\n\t}", "@Override\n\tpublic void modifryCompany(BeanCompany Company) {\n\t\tSession session = HibernateUtil.getSessionFactory().getCurrentSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry {\n\t\t\tsession.update(Company);\n\t\t\ttx.commit();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\ttx.rollback();\n\t\t}\n\t}", "public void setDocumentCompany(java.lang.String documentCompany) {\n this.documentCompany = documentCompany;\n }", "@Override\r\n\tpublic void setCompanyData(RentCompanyData companyData) {\n\r\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _second.getCompanyId();\n\t}", "public void setCompany(String company) {\n\t\tthis.company = StringUtils.trimString( company );\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _scienceApp.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _employee.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _paper.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _dictData.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _userTracker.getCompanyId();\n\t}", "public void setCarCompany(String carCompany) {\n\t\tthis.carCompany = carCompany;\n\t}", "public void getFindByIdCompany() {\n log.info(\"CompaniesContactsBean => method : getFindByIdCompany()\");\n\n log.info(\"ID company\" + companiesBean.getCompaniesEntity().getId());\n this.companiesContactsEntityList = findByIdCompany(companiesBean.getCompaniesEntity());\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _changesetEntry.getCompanyId();\n\t}", "@Override\r\n\tpublic Company updateCompany(Company company) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic void updateCompany(Company company) throws Exception {\r\n\r\n\t\tconnectionPool = ConnectionPool.getInstance();\r\n\t\tConnection connection = connectionPool.getConnection();\r\n\r\n\t\tString sql = String.format(\"update Company set COMP_NAME= '%s',PASSWORD = '%s', EMAIL= '%s' where ID = %d\",\r\n\t\t\t\tcompany.getCompanyName(), company.getCompanyPassword(), company.getCompanyEmail(),\r\n\t\t\t\tcompany.getCompanyId());\r\n\r\n\t\ttry (PreparedStatement preparedStatement = connection.prepareStatement(sql)) {\r\n\r\n\t\t\tpreparedStatement.executeUpdate();\r\n\r\n\t\t\tSystem.out.println(\"update Company succeeded. id which updated: \" + company.getCompanyId());\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new Exception(\"update Compnay failed. companyId: \"+ company.getCompanyId());\r\n\t\t} finally {\r\n\t\t\tconnection.close();\r\n\t\t\tconnectionPool.returnConnection(connection);\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _esfTournament.getCompanyId();\n\t}", "CompanyExtend selectByPrimaryKey(Long id);", "public void setCompanyAgId(java.lang.String companyAgId) {\n\t\t_imageCompanyAg.setCompanyAgId(companyAgId);\n\t}", "public void setCompany(Company company, Context context) {\n // TODO: Perform networking operations here to upload company to database\n this.company = company;\n invoiceController = new InvoiceController(context, company);\n }", "public void setCompany_mst(final arrow.businesstraceability.persistence.entity.Company_mst company_mst) {\n if (company_mst == null) {\n this.id_sarscom = null;\n }\n else {\n this.id_sarscom = company_mst.getCom_company_code();\n }\n this.company_mst = company_mst;\n }", "@Override\r\n\tpublic ResponseEntity<String> updateCompany(int companyCode,Company company) {\n\r\n\t\tOptional<Company> companyData = companyRepository.findById(companyCode);\r\n\r\n\t\tif (companyData.isPresent()) {\r\n\r\n\t\t\tCompany _company = companyData.get();\r\n\t\t\t_company.setCompanyName(company.getCompanyName());\r\n\t\t\t_company.setCeo(company.getCeo());\r\n\t\t\t_company.setBrief(company.getBrief());\r\n\t\t\t_company.setStockCode(company.getStockCode());\r\n\t\t\tcompanyRepository.save(_company);\r\n\t\t\treturn new ResponseEntity<>(\"Company Updated\", HttpStatus.OK);\r\n\t\t} else {\r\n\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\r\n\t\t}\r\n\t}", "Company getOrCreateCompanyId(String companyID) throws Exception;", "public void setContactCompany(String contactCompany) {\n this.contactCompany = contactCompany;\n }", "public void setCompanyCode(String companyCode) {\r\n this.companyCode = companyCode == null ? null : companyCode.trim();\r\n }", "public void setCompanyCode(String companyCode) {\r\n this.companyCode = companyCode == null ? null : companyCode.trim();\r\n }", "public void setCompanyCode(String companyCode) {\n this.companyCode = companyCode == null ? null : companyCode.trim();\n }", "public void setCompany(SSNewCompany iCompany) {\n this.iCompany = iCompany;\n\n iTaxRate1.setValue( iCompany.getTaxRate1() );\n iTaxRate2.setValue( iCompany.getTaxRate2() );\n iTaxRate3.setValue( iCompany.getTaxRate3() );\n }", "void setAuditingCompany(ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData auditingCompany);", "@Override\n public long getCompanyId() {\n return _partido.getCompanyId();\n }", "public void setCompany(final String value)\n\t{\n\t\tsetCompany( getSession().getSessionContext(), value );\n\t}", "public SampletypeBean setCompanyBean(SampletypeBean pObject,CompanyBean pObjectToBeSet)\n {\n pObject.setCompanyid(pObjectToBeSet.getCompanyid());\n return pObject;\n }", "public void update(TmCompany tmCompany) {\n\t\ttmCompanyDao.update(tmCompany);\r\n\t}", "public void setJdCompany(String jdCompany) {\r\n\t\tthis.jdCompany = jdCompany;\r\n\t}" ]
[ "0.723806", "0.723806", "0.723806", "0.723806", "0.723806", "0.71739376", "0.7081014", "0.7081014", "0.7081014", "0.7081014", "0.7049039", "0.7022552", "0.7022552", "0.69752663", "0.69721025", "0.6846968", "0.6846968", "0.67464375", "0.6744698", "0.6676366", "0.6671094", "0.6648247", "0.6648247", "0.6648247", "0.66347843", "0.66239977", "0.65838146", "0.65659213", "0.653892", "0.64833313", "0.6482217", "0.6446567", "0.6446567", "0.64133596", "0.6350327", "0.63450253", "0.6344351", "0.6339965", "0.6319915", "0.6319915", "0.6295937", "0.6266216", "0.62580234", "0.62244534", "0.62174124", "0.6196162", "0.61895764", "0.61895764", "0.61895764", "0.61895764", "0.6186772", "0.61610746", "0.6145172", "0.6102305", "0.6066918", "0.60606533", "0.60606533", "0.60606533", "0.60535985", "0.6044677", "0.59502846", "0.59502846", "0.59502846", "0.59502846", "0.59502846", "0.5949542", "0.5902087", "0.58838296", "0.58648545", "0.58611995", "0.5794109", "0.5779902", "0.57758254", "0.5751041", "0.5743402", "0.57191664", "0.5718194", "0.56958055", "0.5690324", "0.5686553", "0.56468046", "0.5581469", "0.55797637", "0.55646735", "0.555121", "0.5531313", "0.5519405", "0.5516486", "0.55051965", "0.55050915", "0.55048066", "0.55048066", "0.55025923", "0.549603", "0.54709184", "0.54544264", "0.54507035", "0.5442969", "0.54413307", "0.5425313" ]
0.68465376
17
This method was generated by MyBatis Generator. This method returns the value of the database column t_company_recommend.object_id
public Long getObjectId() { return objectId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int getObjectId(Object object) {\n int objectId = 0;\n try {\n Field[] fields = object.getClass().getDeclaredFields();\n for (Field f : fields) {\n if (f.isAnnotationPresent(Id.class)) {\n f.setAccessible(true);\n objectId = Integer.parseInt(f.get(object).toString());\n f.setAccessible(false);\n }\n }\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n return objectId;\n }", "protected String get_object_id()\r\n\t{\r\n\t\treturn id;\r\n\t}", "protected String get_object_id()\r\n\t{\r\n\t\treturn id;\r\n\t}", "protected String get_object_id()\r\n\t{\r\n\t\treturn id;\r\n\t}", "public final int getObjectID() {\n\t\treturn objectID;\n\t}", "public int getId(AirspaceObject object)\n\t{\n\t\treturn objectToId.get(object);\n\t}", "public int getObjId() {\n return objId_;\n }", "public int getObjId() {\n return objId_;\n }", "public int getObjId() {\n return objId_;\n }", "public int getObjId() {\n return objId_;\n }", "public int getObjId() {\n return objId_;\n }", "public int getObjId() {\n return objId_;\n }", "public static int getId( Object object )\r\n {\r\n try\r\n {\r\n Method method = object.getClass().getMethod( \"getId\" );\r\n\r\n return (Integer) method.invoke( object );\r\n }\r\n catch ( NoSuchMethodException ex )\r\n {\r\n return -1;\r\n }\r\n catch ( InvocationTargetException ex )\r\n {\r\n return -1;\r\n }\r\n catch ( IllegalAccessException ex )\r\n {\r\n return -1;\r\n }\r\n }", "public int findId(@NotNull T object) {\n Logger logger = getLogger();\n int id = -1;\n try (Connection connection = getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(getFind())) {\n\n setStatement(preparedStatement, object);\n logger.info(\"Executing statement: \" + preparedStatement);\n ResultSet rs = preparedStatement.executeQuery();\n\n while (rs.next()) {\n id = rs.getInt(\"id\");\n }\n } catch (SQLException | NotEnoughDataException e) {\n logger.error(e.getMessage());\n }\n logger.info(\"Select by id: success\");\n return id;\n }", "public Integer getRecommendId() {\n return recommendId;\n }", "int getObjId();", "int getObjId();", "int getObjId();", "int getObjId();", "int getObjId();", "int getObjId();", "public String getId(Object obj) {\n String id = null;\n\n if (obj != null) {\n id = reference(obj);\n\n if (id == null && obj instanceof mxICell) {\n id = ((mxICell)obj).getId();\n\n if (id == null) {\n // Uses an on-the-fly Id\n id = mxCellPath.create((mxICell)obj);\n\n if (id.length() == 0) {\n id = \"root\";\n }\n }\n }\n }\n\n return id;\n }", "public String getObjId()\n {\n return objId;\n }", "public String getObjId() {\n return objId;\n }", "public int getObjId() {\n return instance.getObjId();\n }", "public int getObjId() {\n return instance.getObjId();\n }", "public int getObjId() {\n return instance.getObjId();\n }", "public int getObjId() {\n return instance.getObjId();\n }", "public int getObjId() {\n return instance.getObjId();\n }", "public int getObjId() {\n return instance.getObjId();\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _expandoColumn.getCompanyId();\n\t}", "private void generateObjIdIfRequired(T obj) {\n Field idField = Arrays.stream(entityClass.getDeclaredFields())\n .filter(f -> f.isAnnotationPresent(Id.class) &&\n f.isAnnotationPresent(GeneratedValue.class) &&\n f.getType().equals(Long.TYPE)) //Refers to primitive type long\n .findFirst().orElse(null);\n \n if(idField == null) return;\n\n try {\n idField.setAccessible(true);\n idField.set(obj, idCounter);\n idField.setAccessible(false);\n idCounter++;\n } catch (IllegalAccessException e) {\n throw new DBException(\"Problem generating and setting id of object: \" + entityClass.getSimpleName() + \" : \" + obj.toString(), e);\n }\n\n }", "@Override\n\tpublic Object objId() {\n\t\treturn null;\n\t}", "public String getObjectId() {\n switch (getObjectType()) {\n case Campaign:\n return campaignId;\n case Ad:\n return adId;\n case AdSet:\n return adSetId;\n case Account:\n return accountId;\n default:\n throw new IllegalArgumentException(\"Unknown object type\");\n }\n }", "public int getObjectID(){\n\t\treturn _lodNodeData.getObjectID();\n\t}", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "public int getObjid() {\n\treturn objid;\n}", "public Long getObjectKey()\n\t{\n\t\treturn objectKey;\n\t}", "public abstract long getId(T obj);", "long getID(Object item);", "public long getObjectId(Object o)\n{\n\treturn o.hashCode();\n}", "public Integer getBiObjectID() {\r\n\t\treturn biObjectID;\r\n\t}", "protected Long obtainObjectKey(Object obj)\n\t{\n\t\tif(obj instanceof GoodUnit)\n\t\t\treturn ((GoodUnit)obj).getPrimaryKey();\n\t\treturn null;\n\t}", "public String getStatusId(Object object);", "public int getObjectId() {\n\t\treturn this.objectId;\n\t}", "@Override\n public Object handleQuery(Connection connection, Object object) throws SQLException {\n Class<?> obj = object.getClass();\n int i = 1;\n if (!AnnotationProcessor.isEntity(obj))\n throw new IllegalArgumentException(obj + \"is not an Entity\");\n Entity entityAnnot = obj.getAnnotation(Entity.class);\n String[] primaryKey = entityAnnot.primaryKey();\n String delete = QueryBuilder.deleteQuery(entityAnnot.name(), primaryKey);\n List<Object> values = Stream.of(primaryKey)\n .map(key -> ClassHelper2.runGetter(key, object))\n .collect(Collectors.toList());\n try (PreparedStatement preparedStatement = connection.prepareStatement(delete)) {\n for (Object p : values) {\n preparedStatement.setObject(i, p);\n i++;\n }\n i = preparedStatement.executeUpdate();\n }\n if (returnType.isPrimitive()) {\n return i;\n }\n\n\n return object;\n }", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "ExtraQuery id(Object value);", "public String getObjID(String sysName, String objName) throws MDSException {\r\n\t\tString objID = null;\r\n\t\tString key = sysName.toUpperCase() + \".\" + objName.toUpperCase();\r\n\t\tobjID = (String) tabMap.get(key);\r\n\r\n\t\tif (objID == null || objID == \"\") {\r\n\t\t\tif (sysName == null || sysName.trim().length() == 0)\r\n\t\t\t\tthrow new MDSException(\"table : \" + objName + \" without database reference!\");\r\n\t\t\telse\r\n\t\t\t\tthrow new MDSException(\"table : \" + sysName + \".\" + objName\r\n\t\t\t\t\t\t+ \" is not loaded or some columns in this table are not loaded!\");\r\n\t\t} else\r\n\t\t\treturn objID;\r\n\t}", "public int getObjectId()\r\n/* 71: */ {\r\n/* 72:152 */ return this.objectId;\r\n/* 73: */ }", "public Integer getObjectId() {\n\t\treturn objectId;\n\t}", "public Long getId() {\r\n\t\treturn objectId;\r\n\t}", "private int ricavaID(String itemSelected){\n String ogg = ricavaNome(itemSelected);\n String schema = ricavaSchema(itemSelected);\n int id = -1;\n \n Statement stmt; \n ResultSet rst;\n \n try{\n stmt = Database.getDefaultConnection().createStatement();\n \n if(modalita == TRIGGER)\n rst = stmt.executeQuery(\"SELECT T.id_trigger FROM trigger1 T WHERE T.nomeTrigger = '\" + ogg + \"' AND T.schema = '\" + schema + \"'\");\n else\n rst = stmt.executeQuery(\"SELECT P.ID_procedura FROM Procedura P WHERE P.nomeProcedura = '\" + ogg + \"' AND P.schema = '\" + schema + \"'\");\n \n while(rst.next()){\n id = rst.getInt(1);\n }\n \n stmt.close();\n }catch(SQLException e){\n mostraErrore(e);\n }\n \n return id;\n }", "public Object getObjectId() {\n\t\treturn null;\n\t}", "public void setObjId( String objId )\n {\n this.objId = objId;\n }", "public static String getID(EObject eObject) {\n\n\t\tResource resource = eObject.eResource();\n\n\t\tString id = null;\n\n\t\tif (resource == null)\n\t\t\tid = GMFResource.getSavedID(eObject);\n\n\t\telse if (resource instanceof XMLResource)\n\t\t\tid = ((XMLResource) resource).getID(eObject);\n\n\t\tif (id != null)\n\t\t\treturn id;\n\t\telse\n\t\t\treturn MSLConstants.EMPTY_STRING;\n\t}", "public java.lang.Integer getMetaId();", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "public Object getID()\n {\n return data.siObjectID;\n }", "public String getInoId();", "public IntColumn getModelId() {\n return (IntColumn) (isText ? textFields.computeIfAbsent(\"model_id\", IntColumn::new) :\n getBinaryColumn(\"model_id\"));\n }", "public Integer getCompanyId() {\n return companyId;\n }", "public Integer getCompanyId() {\n return companyId;\n }", "public Integer getCompanyId() {\n return this.companyId;\n }", "public int getObjectId() {\n\t\t\treturn objectId;\n\t\t}", "public int getNewId(Object object) {\r\n\t\t\r\n\t\tif (object instanceof AutoParts) {\r\n\t\t\treturn goods.length; \r\n\t\t} else if (object instanceof Client) {\r\n\t\t\treturn client.length;\r\n\t\t} else if (object instanceof Shopping){\r\n\t\t\treturn shop.length;\r\n\t\t} else if (object instanceof Sale){\r\n\t\t\treturn sale.length;\r\n\t\t}\r\n\t\t\r\n\t\treturn 0; \r\n\t}", "public java.lang.Object getOpportunityID() {\n return opportunityID;\n }", "public java.lang.String getPrimaryKey() {\n\t\treturn _imageCompanyAg.getPrimaryKey();\n\t}", "@Override\n public String getStringFromDatabase(int objectID) {\n return \"From Class one result\"+objectID;\n }", "public Integer getOpportunityID() {\n return opportunityID;\n }", "public int getObjectID(){\n\t\treturn _groupNodeData.getObjectID();\n\t}", "public long getModelId();", "java.lang.String getCouponId();", "public String getObjectId() {\r\n\t\treturn objectId;\r\n\t}", "private Integer idFromCursor(Cursor cursor) {\n\t\treturn cursor.getInt(0);\n\t}", "TDwBzzxBzflb selectByPrimaryKey(String objId);", "protected abstract T getId(P object);", "Object getPrimaryKey(Object metadataID);", "Long getInvoiceId();", "abstract void setObjectId(@NotNull ResultSet rs, @NotNull T object) throws SQLException;", "public static long m3717b(Object obj) {\n return ((QueueItem) obj).getQueueId();\n }", "@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _buySellProducts.getPrimaryKey();\n\t}", "public Long getOpportunityId() {\n return opportunityId;\n }", "Object getId();", "public String getId(Object obj, boolean notificaton) {\n\t\t/* new object generate key and add to tables */\n\t\t/* <ShortClassName><Timestamp> */\n\t\tif (obj == null) {\n\t\t\treturn \"\";\n\t\t}\n\t\tString key = getKey(obj);\n\t\tif (key != null) {\n\t\t\treturn key;\n\t\t}\n\t\tkey = grammar.getId(obj, this);\n\t\tif (key != null) {\n\t\t\tput(key, obj, notificaton);\n\t\t\treturn key;\n\t\t}\n\t\treturn createId(obj, notificaton);\n\t}", "public Integer getObjNo() {\n\t\t\treturn objNo;\n\t\t}", "public int getM_Product_ID();", "public int getM_Product_ID();", "@Override\n\tpublic Integer getId() {\n\t\treturn ofertaOpexId;\n\t}", "public long getGovernorId()\n\t{\n\t\tassert this.cursor != null;\n\t\treturn this.cursor.getLong(0);\n\t}", "public java.lang.Integer getId_rango();" ]
[ "0.63947767", "0.60151494", "0.60151494", "0.60151494", "0.58793473", "0.57923657", "0.5766779", "0.5766779", "0.5766779", "0.5766779", "0.5766779", "0.5766779", "0.5756512", "0.5753453", "0.57154065", "0.5696883", "0.5696883", "0.5696883", "0.5696883", "0.5696883", "0.5696883", "0.5694258", "0.5644073", "0.5630652", "0.5516974", "0.5516974", "0.5516974", "0.5516974", "0.5516974", "0.5516974", "0.5516695", "0.5465542", "0.5433749", "0.53897226", "0.5381877", "0.536677", "0.536677", "0.536677", "0.536677", "0.536677", "0.53558874", "0.5347359", "0.53428215", "0.5325766", "0.5310475", "0.5307711", "0.5290913", "0.52775264", "0.526165", "0.52294177", "0.52267605", "0.52267605", "0.52267605", "0.52267605", "0.51924527", "0.51918477", "0.51912445", "0.51882786", "0.51695025", "0.5162909", "0.5155707", "0.51414514", "0.51298404", "0.5125043", "0.51199317", "0.51199317", "0.51199317", "0.51078033", "0.51010853", "0.5072375", "0.50689536", "0.50689536", "0.5067576", "0.50660175", "0.5057014", "0.5056969", "0.50565434", "0.5053558", "0.501896", "0.5003444", "0.49976197", "0.49813634", "0.4976241", "0.49654746", "0.49566233", "0.49554157", "0.49532038", "0.494684", "0.49423012", "0.49399674", "0.49296278", "0.492956", "0.492156", "0.49201632", "0.49192387", "0.49143463", "0.49143463", "0.49134684", "0.49115583", "0.49109945" ]
0.5056232
77
This method was generated by MyBatis Generator. This method sets the value of the database column t_company_recommend.object_id
public void setObjectId(Long objectId) { this.objectId = objectId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setObjId( String objId )\n {\n this.objId = objId;\n }", "private void setObjId(int value) {\n \n objId_ = value;\n }", "private void setObjId(int value) {\n \n objId_ = value;\n }", "private void setObjId(int value) {\n \n objId_ = value;\n }", "private void setObjId(int value) {\n \n objId_ = value;\n }", "private void setObjId(int value) {\n \n objId_ = value;\n }", "private void setObjId(int value) {\n \n objId_ = value;\n }", "abstract void setObjectId(@NotNull ResultSet rs, @NotNull T object) throws SQLException;", "public void setRecommendId(Integer recommendId) {\n this.recommendId = recommendId;\n }", "protected abstract void setId(P object, Long id);", "public void setObjId(String objId) {\n this.objId = objId == null ? null : objId.trim();\n }", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_expandoColumn.setCompanyId(companyId);\n\t}", "public void setObjid(int newValue) {\n\tthis.objid = newValue;\n}", "private void generateObjIdIfRequired(T obj) {\n Field idField = Arrays.stream(entityClass.getDeclaredFields())\n .filter(f -> f.isAnnotationPresent(Id.class) &&\n f.isAnnotationPresent(GeneratedValue.class) &&\n f.getType().equals(Long.TYPE)) //Refers to primitive type long\n .findFirst().orElse(null);\n \n if(idField == null) return;\n\n try {\n idField.setAccessible(true);\n idField.set(obj, idCounter);\n idField.setAccessible(false);\n idCounter++;\n } catch (IllegalAccessException e) {\n throw new DBException(\"Problem generating and setting id of object: \" + entityClass.getSimpleName() + \" : \" + obj.toString(), e);\n }\n\n }", "public Integer getRecommendId() {\n return recommendId;\n }", "public void setObjectElement(Object paramObject, long paramLong)\n/* */ throws SQLException\n/* */ {\n/* 916 */ if (paramObject == null)\n/* */ {\n/* 918 */ getLazyOracleArray();\n/* */ }\n/* */ \n/* 921 */ resetOracleElement(paramLong);\n/* */ \n/* 923 */ getLazyArray()[((int)paramLong)] = paramObject;\n/* */ }", "public void setBiObjectID(Integer biObjectID) {\r\n\t\tthis.biObjectID = biObjectID;\r\n\t}", "public abstract void setId(T obj, long id);", "public void setCompanyId(Integer value) {\n this.companyId = value;\n }", "public void setId(Long objectId) {\r\n\t\tthis.objectId = objectId;\r\n\t}", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "private void saveObject(Object object) {\n Connection connection = ConnectionPoll.getConnection();\n CRUDService crudService = new CRUDService(connection, object.getClass());\n try {\n Field[] fields = object.getClass().getDeclaredFields();\n Field id = null;\n for (Field f : fields) {\n if (f.isAnnotationPresent(Id.class)) {\n id = f;\n }\n }\n id.setAccessible(true);\n\n if (Integer.parseInt(id.get(object).toString()) != 0 && !id.get(object).equals(null)) {\n crudService.update((SimpleORMInterface) object);\n } else {\n crudService.insert((SimpleORMInterface) object);\n }\n id.setAccessible(false);\n ConnectionPoll.releaseConnection(connection);\n\n } catch (IllegalAccessException | NoSuchFieldException e) {\n e.printStackTrace();\n }\n }", "void setObject(String id, Object data);", "public final void setMxSheet_RowObject(com.mendix.systemwideinterfaces.core.IContext context, mxmodelreflection.proxies.MxObjectType mxsheet_rowobject)\r\n\t{\r\n\t\tif (mxsheet_rowobject == null)\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.MxSheet_RowObject.toString(), null);\r\n\t\telse\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.MxSheet_RowObject.toString(), mxsheet_rowobject.getMendixObject().getId());\r\n\t}", "public void setM_Product_ID (int M_Product_ID);", "public void setM_Product_ID (int M_Product_ID);", "public void setProductRelatedByRelProductIdKey(ObjectKey key) throws TorqueException\n {\n \n setRelProductId(((NumberKey) key).intValue());\n }", "private int getObjectId(Object object) {\n int objectId = 0;\n try {\n Field[] fields = object.getClass().getDeclaredFields();\n for (Field f : fields) {\n if (f.isAnnotationPresent(Id.class)) {\n f.setAccessible(true);\n objectId = Integer.parseInt(f.get(object).toString());\n f.setAccessible(false);\n }\n }\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n return objectId;\n }", "public Builder setObjId(int value) {\n copyOnWrite();\n instance.setObjId(value);\n return this;\n }", "public Builder setObjId(int value) {\n copyOnWrite();\n instance.setObjId(value);\n return this;\n }", "public Builder setObjId(int value) {\n copyOnWrite();\n instance.setObjId(value);\n return this;\n }", "public Builder setObjId(int value) {\n copyOnWrite();\n instance.setObjId(value);\n return this;\n }", "public Builder setObjId(int value) {\n copyOnWrite();\n instance.setObjId(value);\n return this;\n }", "public Builder setObjId(int value) {\n copyOnWrite();\n instance.setObjId(value);\n return this;\n }", "public void setOpportunityID(java.lang.Object opportunityID) {\n this.opportunityID = opportunityID;\n }", "public void setProductRelatedByProductIdKey(ObjectKey key) throws TorqueException\n {\n \n setProductId(((NumberKey) key).intValue());\n }", "protected String get_object_id()\r\n\t{\r\n\t\treturn id;\r\n\t}", "protected String get_object_id()\r\n\t{\r\n\t\treturn id;\r\n\t}", "protected String get_object_id()\r\n\t{\r\n\t\treturn id;\r\n\t}", "public final void setObjSelect(String objSelect) {\n mobjSelect = objSelect;\n }", "public void setObjectId(gov.nih.nlm.ncbi.www.ObjectIdDocument.ObjectId objectId)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.ObjectIdDocument.ObjectId target = null;\r\n target = (gov.nih.nlm.ncbi.www.ObjectIdDocument.ObjectId)get_store().find_element_user(OBJECTID$0, 0);\r\n if (target == null)\r\n {\r\n target = (gov.nih.nlm.ncbi.www.ObjectIdDocument.ObjectId)get_store().add_element_user(OBJECTID$0);\r\n }\r\n target.set(objectId);\r\n }\r\n }", "public SampletypeBean setCompanyBean(SampletypeBean pObject,CompanyBean pObjectToBeSet)\n {\n pObject.setCompanyid(pObjectToBeSet.getCompanyid());\n return pObject;\n }", "public static void setID(EObject eObject, String id) {\n\n\t\tResource resource = eObject.eResource();\n\n\t\tif (resource instanceof XMLResource)\n\t\t\t((XMLResource) resource).setID(eObject, id);\n\t}", "protected void addIdPropertyDescriptor ( Object object )\n {\n itemPropertyDescriptors.add ( createItemPropertyDescriptor ( ( (ComposeableAdapterFactory)adapterFactory ).getRootAdapterFactory (), getResourceLocator (), getString ( \"_UI_Site_id_feature\" ), getString ( \"_UI_PropertyDescriptor_description\", \"_UI_Site_id_feature\", \"_UI_Site_type\" ), GlobalPackage.Literals.SITE__ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null ) );\n }", "@Override\n public void update(Object object, Object id) throws DAOException {\n\n }", "public void set(int propID, Object obj) throws SL_Exception\n {\n switch(propID)\n {\n case PRESQL_ID:\n setPreSQL((String)obj);\n return;\n case POSTSQL_ID:\n setPostSQL((String)obj);\n return;\n case ROWOFFSET_ID:\n setRowOffSet((java.lang.Integer)obj);\n return;\n case ROWLIMIT_ID:\n setRowLimit((java.lang.Integer)obj);\n return;\n default:\n super.set(propID, obj);\n return;\n }\n\n }", "abstract void setUpdateStatementId(@NotNull PreparedStatement preparedStatement, @NotNull T object) throws SQLException;", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "private void updateObject(Object object) {\n Connection connection = ConnectionPoll.getConnection();\n CRUDService crudService = new CRUDService(connection, object.getClass());\n\n try {\n crudService.update((SimpleORMInterface) object);\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n\n ConnectionPoll.releaseConnection(connection);\n\n try {\n connection.close();\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n }", "public void setCompanyId(Integer companyId) {\n this.companyId = companyId;\n }", "public void setCompanyId(Integer companyId) {\n this.companyId = companyId;\n }", "void setObject(int index, Object value) throws SQLException;", "public void setLoyaltyBrandId(long value) {\n this.loyaltyBrandId = value;\n }", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_second.setCompanyId(companyId);\n\t}", "@Override\n public void setCompanyId(long companyId) {\n _partido.setCompanyId(companyId);\n }", "void setAssociatedObject(IEntityObject relatedObj);", "public void setReceiveObject(int receiveObject) {\n\t\tthis.receiveObject = receiveObject;\n\t}", "public void setObjectId(Integer objectId) {\n\t\tthis.objectId = objectId;\n\t}", "public void setCompanyId(int companyId) {\n this.companyId = companyId;\n }", "public void setBrandid( Integer brandid )\n {\n this.brandid = brandid ;\n }", "public void setNextIdStatement(EdaContext xContext) throws IcofException {\n\n\t\t// Define the query.\n\t\tString query = TkAudit.getNextIdQuery(xContext, TABLE_NAME, ID_COL);\n\n\t\t// Set and prepare the query and statement.\n\t\tsetQuery(xContext, query);\n\n\t}", "public final void setMxSheet_MxObjectReference(com.mendix.systemwideinterfaces.core.IContext context, mxmodelreflection.proxies.MxObjectReference mxsheet_mxobjectreference)\r\n\t{\r\n\t\tif (mxsheet_mxobjectreference == null)\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.MxSheet_MxObjectReference.toString(), null);\r\n\t\telse\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.MxSheet_MxObjectReference.toString(), mxsheet_mxobjectreference.getMendixObject().getId());\r\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\tmodel.setCompanyId(companyId);\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\tmodel.setCompanyId(companyId);\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\tmodel.setCompanyId(companyId);\n\t}", "public final void setMxSheet_RowObject(mxmodelreflection.proxies.MxObjectType mxsheet_rowobject)\r\n\t{\r\n\t\tsetMxSheet_RowObject(getContext(), mxsheet_rowobject);\r\n\t}", "public void setObject(Object aObject) {\r\n\t\tthis.object = aObject;\r\n\t}", "public void setCompanyId(long companyId) {\n this.companyId = companyId;\n }", "public void setIdAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI(int idAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI)\r\n/* 85: */ {\r\n/* 86:118 */ this.idAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI = idAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI;\r\n/* 87: */ }", "void setObjectValue(Object dataObject);", "private void setOtherId(int value) {\n \n otherId_ = value;\n }", "public void setM_Product_ID (int M_Product_ID)\n{\nset_Value (\"M_Product_ID\", new Integer(M_Product_ID));\n}", "void setObjectKey(String objectKey);", "@Override\r\n public void setObject(String object) {\n }", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_userTracker.setCompanyId(companyId);\n\t}", "public int getObjId() {\n return objId_;\n }", "public int getObjId() {\n return objId_;\n }", "public int getObjId() {\n return objId_;\n }", "public int getObjId() {\n return objId_;\n }", "public int getObjId() {\n return objId_;\n }", "public int getObjId() {\n return objId_;\n }", "public\tvoid setobject(object obj) {\r\n\t\t oop.value=obj.value;\r\n\t\t oop.size=obj.size;\r\n\t\t \r\n\t}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_scienceApp.setCompanyId(companyId);\n\t}", "@Override\n\tpublic void setId(Integer arg0) {\n\n\t}", "@Override\n\tpublic int update(Object obj) throws SQLException {\n\t\treturn 0;\n\t}", "protected void setId(EmployeeLeave employeeLeave, ResultSet rs, int rowNumber) throws SQLException{\n\t\tString id = rs.getString(EmployeeLeaveTable.COLUMN_ID);\n\t\tif(id == null){\n\t\t\t//do nothing when nothing found in database\n\t\t\treturn;\n\t\t}\n\t\n\t\temployeeLeave.setId(id);\n\t}", "public void setRId(long value) {\r\n this.rId = value;\r\n }", "public void setCompanyId(Long companyId) {\n this.companyId = companyId;\n }", "public void setCompany(java.lang.Integer newCompany) {\n\tcompany = newCompany;\n}", "@Override\n\tpublic void setCompanyId(long companyId) {\n\t\t_paper.setCompanyId(companyId);\n\t}", "public void setId(String idIn) {\n this.id = idIn;\n }", "public void setPrimaryKey(ObjectKey key)\n \n {\n setNewsletterId(((NumberKey) key).intValue());\n }", "public void update(T obj) {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tsession.update(obj);\n\t\t\n\t}" ]
[ "0.59993696", "0.5892391", "0.5892391", "0.5892391", "0.5892391", "0.5892391", "0.5892391", "0.58702415", "0.57341737", "0.571133", "0.5709747", "0.5561492", "0.5497234", "0.54410136", "0.5400082", "0.5382002", "0.53640515", "0.5362707", "0.5328958", "0.53288823", "0.5294994", "0.5294994", "0.5294994", "0.5294994", "0.5294994", "0.5273355", "0.5258706", "0.5253116", "0.52065766", "0.52065766", "0.51966214", "0.5192552", "0.5148714", "0.5148714", "0.5148714", "0.5148714", "0.5148714", "0.5148714", "0.513039", "0.5116678", "0.5110456", "0.5110456", "0.5110456", "0.51009053", "0.50946283", "0.5091326", "0.5074569", "0.5070516", "0.5049535", "0.50264037", "0.5025428", "0.50238", "0.50238", "0.50238", "0.50238", "0.50203735", "0.5003782", "0.5003782", "0.50016856", "0.49931425", "0.49754044", "0.4967543", "0.49640253", "0.49398187", "0.4938467", "0.49374628", "0.49290475", "0.4927209", "0.49239832", "0.4922733", "0.4922733", "0.4922733", "0.49185577", "0.49178332", "0.4911886", "0.48958552", "0.4893194", "0.48874754", "0.48818663", "0.48800594", "0.48692805", "0.48620725", "0.48592663", "0.48592663", "0.48592663", "0.48592663", "0.48592663", "0.48592663", "0.4857978", "0.48532665", "0.4845417", "0.48377842", "0.4837234", "0.48367473", "0.48302913", "0.48260656", "0.48230043", "0.48062095", "0.47996628", "0.4789856" ]
0.49122998
74
This method was generated by MyBatis Generator. This method returns the value of the database column t_company_recommend.object_type
public Byte getObjectType() { return objectType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getObjectTypeId();", "@Override\n public Class<?> getObjectType() {\n return this.type;\n }", "public String getType() {\n return (String) getObject(\"type\");\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic Class getObjectType()\n\t{\n\t\tObject obj = getObject();\n\t\tif (obj == null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn obj.getClass();\n\t}", "public int getObjectType()\n {\n return m_objectType;\n }", "public ModelObjectType getType() {\n return type;\n }", "fi.kapsi.koti.jpa.nanopb.Nanopb.FieldType getType();", "@Override\n\tpublic int getType() {\n\t\treturn _expandoColumn.getType();\n\t}", "protected void addOrmTypePropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_EntityAttribute_ormType_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_EntityAttribute_ormType_feature\", \"_UI_EntityAttribute_type\"),\n\t\t\t\t PersistencePackage.Literals.ENTITY_ATTRIBUTE__ORM_TYPE,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n\t\t\t\t getString(\"_UI_OrmPropertyCategory\"),\n\t\t\t\t null));\n\t}", "public Type<O> getObjectType()\n\t{\n\t\treturn this.getSettings().getObjectType();\n\t}", "public ObjType getType () {\n\t\tif (type == null) {\n\t\t\ttype = Virtue.getInstance().getConfigProvider().getObjTypes().list(id);\n\t\t}\n\t\treturn type;\n\t}", "@Override\n public Object toJdbcType(Object value) {\n return value;\n }", "public java.lang.String getSobjectType() {\r\n return sobjectType;\r\n }", "public java.lang.Long getOpcintype() {\n\t\treturn getValue(test.generated.pg_catalog.tables.PgOpclass.PG_OPCLASS.OPCINTYPE);\n\t}", "public Object getType()\r\n {\r\n\treturn type;\r\n }", "public Class<?> getObjectType() {\n return objectType;\n }", "ResultColumn getTypeIdColumn(TableReference tableReference);", "com.rpg.framework.database.Protocol.ItemType getType();", "public String objectTypeName()\r\n {\r\n return mObjectTypeName;\r\n }", "public Boolean getObjectType() {\r\n\t\treturn objectType;\r\n\t}", "public T caseDescriptionType(DescriptionType object) {\n\t\treturn null;\n\t}", "public Column.Type getType();", "public Class<?> getType() {\n switch (this.aggregate) {\n case COUNT_BIG:\n return DataTypeManager.DefaultDataClasses.LONG;\n case COUNT:\n return COUNT_TYPE;\n case SUM:\n Class<?> expressionType = this.getArg(0).getType();\n return SUM_TYPES.get(expressionType);\n case AVG:\n expressionType = this.getArg(0).getType();\n return AVG_TYPES.get(expressionType);\n case ARRAY_AGG:\n if (this.getArg(0) == null) {\n return null;\n }\n return DataTypeManager.getArrayType(this.getArg(0).getType());\n case TEXTAGG:\n return DataTypeManager.DefaultDataClasses.BLOB;\n case JSONARRAY_AGG:\n return DataTypeManager.DefaultDataClasses.JSON;\n case USER_DEFINED:\n case STRING_AGG:\n return super.getType();\n case PERCENT_RANK:\n case CUME_DIST:\n return DataTypeManager.DefaultDataClasses.DOUBLE;\n }\n if (isBoolean()) {\n return DataTypeManager.DefaultDataClasses.BOOLEAN;\n }\n if (isEnhancedNumeric()) {\n return DataTypeManager.DefaultDataClasses.DOUBLE;\n }\n if (isRanking()) {\n return super.getType();\n }\n if (this.getArgs().length == 0) {\n return null;\n }\n return this.getArg(0).getType();\n }", "public static String getJavaDatatype(Object object){\n\t\treturn object.getClass().toString().split(\" \")[1]; \n\t}", "public short getObjtype() {\n\treturn objtype;\n}", "public <T> T getObject(String columnLabel, Class<T> type) throws SQLException\n\t{\n\t\treturn null;\n\t}", "public abstract String getObjectType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "public String getRealCombotype() {\r\n return realCombotype;\r\n }", "public int getType() throws SQLException\n {\n return m_rs.getType();\n }", "public final native String getObjectType() /*-{\n\t\t\tif (!this.beanName) {\n\t\t\treturn \"JavaScriptObject\"\n\t\t\t}\n\t\t\treturn this.beanName;\n\t\t}-*/;", "Type getResultType();", "@Override\n public String toString() {\n return metaObject.getType().toString();\n }", "public ModbusObjectType getObjectType() {\r\n\t\treturn objectType;\r\n\t}", "public com.opentext.bn.converters.avro.entity.IntrospectionType getIntrospectionType() {\n return introspectionType;\n }", "public int getJdbcType();", "public com.opentext.bn.converters.avro.entity.IntrospectionType getIntrospectionType() {\n return introspectionType;\n }", "@Override\n public Class<Object> getObjectType() {\n return Object.class;\n }", "public final String getObjectType() {\n\n\t\tif (JsUtils.getNativePropertyString(this, \"beanName\") == null) return \"JavaScriptObject\";\n\t\treturn JsUtils.getNativePropertyString(this, \"beanName\");\n\n\t}", "public Class getType() {\n\t if ( type != null )\n\t return type;\n\t return long.class;\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();", "public String getText(Object object) {\n\t\tString retVal = getString(\"_UI_JuristType_type\");\n\t\tif( object instanceof JuristType ) {\n\t\t\tretVal += \" \" + ( ( JuristType ) object ).getName( );\n\t\t}\n\t\treturn retVal;\n\t}", "public static String getType() {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(App.getAppContext());\n String defaultValue = Strings.getStringByRId(R.string.c_elastic_search_type_name_default_value);\n String value = Strings.getStringByRId(R.string.c_select_elastic_search_type_name);\n String type = sp.getString(value, defaultValue);\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 String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getCriteriaType()\r\n\t{\r\n\t\treturn criteriaType;\r\n\t}", "public String getModel_type_name() {\r\n\t\treturn model_type_name;\r\n\t}", "public int getType()\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(TYPE$2);\n if (target == null)\n {\n return 0;\n }\n return target.getIntValue();\n }\n }", "public PreferencetypeBean getPreferencetypeBean(PreferenceBean pObject) throws SQLException\n {\n PreferencetypeBean other = PreferencetypeManager.getInstance().createPreferencetypeBean();\n other.setPreferencetypeid(pObject.getPreferencetypeid());\n return PreferencetypeManager.getInstance().loadUniqueUsingTemplate(other);\n }", "public String getItemObjectType() {\r\n\t\treturn itemObjectType;\r\n\t}", "public String getType(){\r\n\t\treturn this.type;\r\n\t}", "public String getType(){\r\n return type;\r\n }", "public ObjectType objectType() {\n return this.objectType;\n }", "public String getTypeSpecification(){\n return productRelation.getTypeSpecification();\n }", "public String getType(){\n return this.type;\n }", "public String getType() {\n return _type;\n }", "public DocumentType getDocumentType() {\n return documentType;\n }", "public String getType(){\n\t\treturn type;\n\t}", "public String getType(){\n\t\treturn type;\n\t}", "public abstract jq_Type getDeclaredType();", "public String getType() {\n\t\treturn _type;\n\t}", "public String get_type()\r\n\t{\r\n\t\treturn this.type;\r\n\t}", "@Type\n public int getType() {\n return mType;\n }", "@Override\n\tpublic String getText(Object object) {\n\t\tString label = ((ColumnType4)object).getName();\n\t\treturn label == null || label.length() == 0 ?\n\t\t\tgetString(\"_UI_ColumnType4_type\") :\n\t\t\tgetString(\"_UI_ColumnType4_type\") + \" \" + label;\n\t}", "public String getBusinessObjectType() {\r\n return businessObjectType;\r\n }", "public String getType()\n \t{\n \t\treturn this.type;\n \t}" ]
[ "0.6184347", "0.6002278", "0.5887912", "0.58752203", "0.5869821", "0.58655214", "0.5773421", "0.57376385", "0.5720462", "0.57190263", "0.5714449", "0.5662201", "0.564225", "0.56359655", "0.5634986", "0.5625279", "0.5561041", "0.5558718", "0.5554838", "0.5537756", "0.5535456", "0.55318934", "0.55169433", "0.54991627", "0.5493818", "0.54920655", "0.5480612", "0.54785657", "0.54785657", "0.54785657", "0.54785657", "0.54785657", "0.54785657", "0.54785657", "0.54785657", "0.54785657", "0.54785657", "0.54785657", "0.54785657", "0.54785657", "0.5453658", "0.54516345", "0.54469335", "0.54407823", "0.54381984", "0.5430093", "0.54191303", "0.5418273", "0.54094714", "0.54032964", "0.53940016", "0.5391166", "0.5371865", "0.5371865", "0.5371865", "0.5371865", "0.5371865", "0.5371865", "0.5371865", "0.5371865", "0.5371865", "0.5371865", "0.5371865", "0.5371865", "0.5371865", "0.53622246", "0.53567594", "0.53482765", "0.534401", "0.534401", "0.534401", "0.534401", "0.534401", "0.534401", "0.534401", "0.534401", "0.534401", "0.534401", "0.534401", "0.53437054", "0.53424764", "0.53291833", "0.53276825", "0.53266823", "0.5323467", "0.5317401", "0.5311513", "0.53093106", "0.5300847", "0.52986485", "0.5296611", "0.5295914", "0.5295914", "0.5295362", "0.5294756", "0.5287164", "0.5281577", "0.5280959", "0.52783465", "0.5278079" ]
0.55622435
16
This method was generated by MyBatis Generator. This method sets the value of the database column t_company_recommend.object_type
public void setObjectType(Byte objectType) { this.objectType = objectType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setObjectType(String objectType);", "@Override\n public void setObjectType(String type) {\n this.objectType = type;\n }", "public void setType(String objectType)\n\t{\n\t\tthis.type = objectType;\n\t}", "protected void addOrmTypePropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_EntityAttribute_ormType_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_EntityAttribute_ormType_feature\", \"_UI_EntityAttribute_type\"),\n\t\t\t\t PersistencePackage.Literals.ENTITY_ATTRIBUTE__ORM_TYPE,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n\t\t\t\t getString(\"_UI_OrmPropertyCategory\"),\n\t\t\t\t null));\n\t}", "public void setObjectClass(String objectClass) {\n this.objectClass = objectClass;\n }", "public final native void setObjectType(String type) /*-{\n\t\t\tthis.beanName = type;\n\t\t}-*/;", "public void setType(Object type)\r\n {\r\n\tthis.type = type;\r\n }", "public void setObjectType(Boolean objectType) {\r\n\t\tthis.objectType = objectType;\r\n\t}", "public final native void setObjectType(String type) /*-{\n\t\tthis.beanName = type;\n\t}-*/;", "void setObject(int index, Object value, int sqlType)\n throws SQLException;", "public void setDocumentType(DocumentType documentType) {\n withDocumentType(documentType);\n }", "public void setObjectClass(Class objectClass) {\n this.objectClass = objectClass;\n }", "public void setObjectType(ModbusObjectType objectType) {\r\n\t\tthis.objectType = objectType;\r\n\t}", "public SampletypeBean setCompanyBean(SampletypeBean pObject,CompanyBean pObjectToBeSet)\n {\n pObject.setCompanyid(pObjectToBeSet.getCompanyid());\n return pObject;\n }", "public void setDocumentType(DocumentType documentType) {\n this.documentType = documentType;\n }", "public void setSobjectType(java.lang.String sobjectType) {\r\n this.sobjectType = sobjectType;\r\n }", "public void setDocumentType(String documentType);", "public void setDocumentType (String DocumentType);", "protected void addOriginalTypePropertyDescriptor(Object object) {\n itemPropertyDescriptors.add\n (createItemPropertyDescriptor\n (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n getResourceLocator(),\n getString(\"_UI_Reference_originalType_feature\"),\n getString(\"_UI_PropertyDescriptor_description\", \"_UI_Reference_originalType_feature\", \"_UI_Reference_type\"),\n NoSQLSchemaPackage.Literals.REFERENCE__ORIGINAL_TYPE,\n true,\n false,\n false,\n ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n null,\n null));\n }", "protected void addTypePropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_Requirement_type_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_Requirement_type_feature\", \"_UI_Requirement_type\"),\n\t\t\t\t Y3853992Package.Literals.REQUIREMENT__TYPE,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}", "@Override\n\tpublic void setType(int type) {\n\t\t_expandoColumn.setType(type);\n\t}", "public void setBusinessObjectType(String businessObjectType) {\r\n this.businessObjectType = businessObjectType;\r\n }", "public void setC_DocType_ID (int C_DocType_ID);", "public void setC_DocType_ID (int C_DocType_ID);", "public void setResultSetType(Class<? extends ResultSet> resultSetType)\r\n/* 40: */ {\r\n/* 41: 92 */ this.resultSetType = resultSetType;\r\n/* 42: */ }", "public void associate(Object obj, Class type);", "protected void addTypePropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_Bean_type_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_Bean_type_feature\", \"_UI_Bean_type\"),\n\t\t\t\t BeansPackage.Literals.BEAN__TYPE,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}", "protected void addTypePropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_SecuritySchema_type_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_SecuritySchema_type_feature\", \"_UI_SecuritySchema_type\"),\n\t\t\t\t CorePackage.Literals.SECURITY_SCHEMA__TYPE,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}", "public void setObjtype(short newValue) {\n\tthis.objtype = newValue;\n}", "public void setObjectiveType(String objectiveType) {\n _objectiveType = objectiveType;\n }", "public void setNewObjectType(int newObjectType) {\r\n\r\n if (this.newObjectType == newObjectType) return;\r\n\r\n if (newObjectType == ReportElementType.NONE) {\r\n this.setCursor( java.awt.Cursor.getDefaultCursor());\r\n } else {\r\n this.setCursor( java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.CROSSHAIR_CURSOR));\r\n }\r\n this.newObjectType = newObjectType;\r\n }", "public T caseDescriptionType(DescriptionType object) {\n\t\treturn null;\n\t}", "void xsetProductType(x0401.oecdStandardAuditFileTaxPT1.ProductTypeDocument.ProductType productType);", "@Override\n\tpublic void setType(String type) {\n\t}", "public void setTargetObjectType(String targetObjectType) {\n this.targetObjectType = targetObjectType;\n }", "public void setResult(int type, String typeName, Class javaType) {\r\n ObjectRelationalDatabaseField field = new ObjectRelationalDatabaseField(\"\");\r\n field.setSqlType(type);\r\n field.setSqlTypeName(typeName);\r\n field.setType(javaType);\r\n getParameters().set(0, field);\r\n }", "public void setItemObjectType(String itemObjectType) {\r\n\t\tthis.itemObjectType = itemObjectType;\r\n\t}", "public void setType(Object newType) {\n if (newType == null && type == null) {\n return;\n }\n\n if (type == null || !type.equals(newType)) {\n Object oldType = type;\n type = newType;\n listeners.firePropertyChange(PROPERTY_TYPE, oldType, type);\n }\n }", "public void setDocumentType(String documentType) {\n this.documentType = documentType == null ? null : documentType.trim();\n }", "public void setPreferredType(String preferredType){\n m_preferredType = preferredType;\n }", "public void setC_DocType_ID(int C_DocType_ID) {\n //\tif (getDocumentNo() != null && getC_DocType_ID() != C_DocType_ID)\n //\t\tsetDocumentNo(null);\n super.setC_DocType_ID(C_DocType_ID);\n }", "void setForPersistentMapping_Type(Type type) {\n this.type = type;\n }", "protected void setType(String requiredType){\r\n type = requiredType;\r\n }", "public void setObject(T object)\n\t{\n\t\tthis.object = object;\n\t}", "void setObject(int index, Object value, int sqlType, int scale)\n throws SQLException;", "public void setType(String inType)\n {\n\ttype = inType;\n }", "public void setType(String type);", "public void setType(String type);", "public void setType(String type);", "void xsetInstallmentType(org.apache.xmlbeans.XmlInteger installmentType);", "public PreferenceBean setPreferencetypeBean(PreferenceBean pObject,PreferencetypeBean pObjectToBeSet)\n {\n pObject.setPreferencetypeid(pObjectToBeSet.getPreferencetypeid());\n return pObject;\n }", "public void setType(int type) {\n type_ = type;\n }", "public void setDocumentType(String documentType) {\n this.documentType = documentType;\n }", "@Override\r\n public void setObject(String object) {\n }", "public void setIdType(Integer idType) {\n this.idType = idType;\n }", "public void setNewProperty_descriptionType(int param){\n \n // setting primitive attribute tracker to true\n localNewProperty_descriptionTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localNewProperty_descriptionType=param;\n \n\n }", "public void setOpcintype(java.lang.Long value) {\n\t\tsetValue(test.generated.pg_catalog.tables.PgOpclass.PG_OPCLASS.OPCINTYPE, value);\n\t}", "public void setType(String type) {\n this.type = type;\n }", "public void setIdType(int idType) {\r\n this.idType = idType;\r\n }", "@Override\n public Object toJdbcType(Object value) {\n return value;\n }", "@Override\n\tpublic void setType(Type t) {\n\t\theldObj.setType(t);\n\t}", "public void setPropertyWithAutoTypeCast(Object obj, Object value) {\n if(value==null) {\n setProperty(obj, value);\n return;\n }\n Class<?> propType = getPropertyType();\n if(propType.isAssignableFrom(value.getClass())) {\n setProperty(obj, value);\n return;\n }\n if(value instanceof Long && propType.equals(Integer.class)) {\n setProperty(obj, Integer.valueOf(value.toString()));\n return;\n }\n if(value instanceof Double || value instanceof Float || value instanceof BigDecimal) {\n if(propType.isAssignableFrom(Double.class)) {\n setProperty(obj, Double.valueOf(value.toString()));\n return;\n } else if(propType.isAssignableFrom(Float.class)) {\n setProperty(obj, Float.valueOf(value.toString()));\n return;\n } else if(propType.isAssignableFrom(BigDecimal.class)) {\n setProperty(obj, BigDecimal.valueOf(Double.valueOf(value.toString())));\n return;\n } else {\n throw new RuntimeException(\"Illegal field value type to set \" + name);\n }\n }\n if(value instanceof java.util.Date) {\n if(propType.isAssignableFrom(java.sql.Timestamp.class)) {\n setProperty(obj, new java.sql.Timestamp(((java.util.Date) value).getTime()));\n return;\n } else if(propType.isAssignableFrom(java.sql.Date.class)) {\n setProperty(obj, new java.sql.Date(((java.util.Date) value).getTime()));\n return;\n } else {\n throw new RuntimeException(\"Illegal field value type to set \" + name);\n }\n }\n throw new RuntimeException(\"Illegal field value type to set \" + name);\n }", "public Builder setType(ModelObjectType type) {\n this.type = type;\n return this;\n }", "protected void addPersistentTypePropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_EntityAttribute_persistentType_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_EntityAttribute_persistentType_feature\", \"_UI_EntityAttribute_type\"),\n\t\t\t\t PersistencePackage.Literals.ENTITY_ATTRIBUTE__PERSISTENT_TYPE,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n\t\t\t\t getString(\"_UI_DatabasePropertyCategory\"),\n\t\t\t\t null));\n\t}", "public void setPersonType(PersonType_Tp type) { this.personType = type; }", "public void setResult(int type, String typeName, Class javaType, DatabaseField nestedType) {\r\n ObjectRelationalDatabaseField field = new ObjectRelationalDatabaseField(\"\");\r\n field.setSqlType(type);\r\n field.setSqlTypeName(typeName);\r\n field.setType(javaType);\r\n field.setNestedTypeField(nestedType);\r\n getParameters().set(0, field);\r\n }", "void setForPersistentMapping_BaseType(Type baseType) {\n this.baseType = baseType;\n }", "public void setType(long type) {\r\n this.type = type;\r\n }", "public void setType(String type) {\n setObject(\"type\", (type != null) ? type : \"\");\n }", "public void setRealCombotype(String realCombotype) {\r\n this.realCombotype = realCombotype == null ? null : realCombotype.trim();\r\n }", "public void setProductType(String newProductType){\n productRelation.setProductTypeSpecification(newProductType);\n }", "public SampletypeBean save(SampletypeBean pObject) throws SQLException\n {\n Connection c = null;\n PreparedStatement ps = null;\n StringBuffer _sql = null;\n\n try\n {\n c = getConnection();\n if (pObject.isNew())\n { // SAVE \n if (!pObject.isSampletypeidModified())\n {\n ps = c.prepareStatement(\"SELECT nextval('sampletypeid_seq')\");\n ResultSet rs = null;\n try\n {\n rs = ps.executeQuery();\n if(rs.next())\n pObject.setSampletypeid(Manager.getInteger(rs, 1));\n else\n getManager().log(\"ATTENTION: Could not retrieve generated key!\");\n }\n finally\n {\n getManager().close(ps, rs);\n ps=null;\n }\n }\n beforeInsert(pObject); // listener callback\n int _dirtyCount = 0;\n _sql = new StringBuffer(\"INSERT into sampletype (\");\n \n if (pObject.isSampletypeidModified()) {\n if (_dirtyCount>0) {\n _sql.append(\",\");\n }\n _sql.append(\"sampletypeid\");\n _dirtyCount++;\n }\n\n if (pObject.isNameModified()) {\n if (_dirtyCount>0) {\n _sql.append(\",\");\n }\n _sql.append(\"name\");\n _dirtyCount++;\n }\n\n if (pObject.isCompanyidModified()) {\n if (_dirtyCount>0) {\n _sql.append(\",\");\n }\n _sql.append(\"companyid\");\n _dirtyCount++;\n }\n\n _sql.append(\") values (\");\n if(_dirtyCount > 0) {\n _sql.append(\"?\");\n for(int i = 1; i < _dirtyCount; i++) {\n _sql.append(\",?\");\n }\n }\n _sql.append(\")\");\n\n ps = c.prepareStatement(_sql.toString(), ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n _dirtyCount = 0;\n\n if (pObject.isSampletypeidModified()) {\n Manager.setInteger(ps, ++_dirtyCount, pObject.getSampletypeid());\n }\n \n if (pObject.isNameModified()) {\n ps.setString(++_dirtyCount, pObject.getName());\n }\n \n if (pObject.isCompanyidModified()) {\n Manager.setInteger(ps, ++_dirtyCount, pObject.getCompanyid());\n }\n \n ps.executeUpdate();\n \n pObject.isNew(false);\n pObject.resetIsModified();\n afterInsert(pObject); // listener callback\n }\n else \n { // UPDATE \n beforeUpdate(pObject); // listener callback\n _sql = new StringBuffer(\"UPDATE sampletype SET \");\n boolean useComma=false;\n\n if (pObject.isSampletypeidModified()) {\n if (useComma) {\n _sql.append(\",\");\n } else {\n useComma=true;\n }\n _sql.append(\"sampletypeid\").append(\"=?\");\n }\n\n if (pObject.isNameModified()) {\n if (useComma) {\n _sql.append(\",\");\n } else {\n useComma=true;\n }\n _sql.append(\"name\").append(\"=?\");\n }\n\n if (pObject.isCompanyidModified()) {\n if (useComma) {\n _sql.append(\",\");\n } else {\n useComma=true;\n }\n _sql.append(\"companyid\").append(\"=?\");\n }\n _sql.append(\" WHERE \");\n _sql.append(\"sampletype.sampletypeid=?\");\n ps = c.prepareStatement(_sql.toString(),ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n int _dirtyCount = 0;\n\n if (pObject.isSampletypeidModified()) {\n Manager.setInteger(ps, ++_dirtyCount, pObject.getSampletypeid());\n }\n\n if (pObject.isNameModified()) {\n ps.setString(++_dirtyCount, pObject.getName());\n }\n\n if (pObject.isCompanyidModified()) {\n Manager.setInteger(ps, ++_dirtyCount, pObject.getCompanyid());\n }\n \n if (_dirtyCount == 0) {\n return pObject;\n }\n \n Manager.setInteger(ps, ++_dirtyCount, pObject.getSampletypeid());\n ps.executeUpdate();\n pObject.resetIsModified();\n afterUpdate(pObject); // listener callback\n }\n \n return pObject;\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "private boolean switchTypes(String colType, Object obj) throws BPlusEngineException {\n switch (colType) {\n case \"INT\":\n if (obj instanceof Integer) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n break;\n case \"VARCHAR\":\n if (obj instanceof String) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n break;\n case \"Double\":\n if (obj instanceof Double) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n break;\n case \"Boolean\":\n if (obj instanceof Boolean) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n break;\n case \"DATE\":\n if (obj instanceof Date) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n break;\n default:\n throw new BPlusEngineException(\"Either You spelled the Type incorectly or the type does not exist, \"\n + \"Supported types: Integer, String, Double, Boolean, Date\");\n }\n return false;\n }", "public Integer updatePaymentType(PaymentTypeObject paymentTypeObject) throws AppException;", "void setProductType(x0401.oecdStandardAuditFileTaxPT1.ProductTypeDocument.ProductType.Enum productType);", "public void setClassObject(Object obj)\n\n {\n\n this.classObject = obj;\n\n }", "public void setOldProperty_descriptionType(int param){\n \n // setting primitive attribute tracker to true\n localOldProperty_descriptionTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localOldProperty_descriptionType=param;\n \n\n }", "@Override\n public void xpathSet(String xpath, Object obj) {\n try {\n fetchJXPathContext().setValue(XPath.xpath(xpath), obj);\n } catch (JXPathException e) {\n throw new TypeXPathException(e);\n }\n }", "public final void setObjSelect(String objSelect) {\n mobjSelect = objSelect;\n }", "public void setProductType(final ProductTypeReference productType);", "public void setType(String type){\n \tthis.type = type;\n }", "void setType(Type type)\n {\n this.type = type;\n }", "public void setType(String aType) {\n iType = aType;\n }", "@JSProperty(\"type\")\n void setType(Type value);", "public void setType(String type) \n {\n this.type = type;\n }", "public void setType(Class type) {\n\t this.type = type;\n\t }", "public void setType(gov.nih.nci.calims2.domain.common.Type type) {\n this.type = type;\n }", "void setType(java.lang.String type);", "public void setObjectClass(Class objectAPI)\n {\n _objectClass = objectAPI;\n }", "void setObjectValue(Object dataObject);", "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){\n this.type = type;\n }", "public T caseAssociationType(AssociationType object) {\n\t\treturn null;\n\t}", "public void setType(String type) {\r\n\t\tthis.productType = type;\r\n\t}", "void setType(String type) {\n this.type = type;\n }", "public void setType(type type) {\r\n\t\tthis.Type = type;\r\n\t}", "@Override\n public void setPersonType(java.lang.String personType) {\n _entityCustomer.setPersonType(personType);\n }", "public void setType(int type)\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(TYPE$2);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(TYPE$2);\n }\n target.setIntValue(type);\n }\n }", "public void setType(java.lang.String newType) {\n\ttype = newType;\n}", "public void setType(Type t) {\n type = t;\n }" ]
[ "0.61911", "0.60450166", "0.60242844", "0.5907295", "0.5743566", "0.5730628", "0.57201874", "0.56818306", "0.5641928", "0.5567745", "0.556031", "0.55525476", "0.5445717", "0.5405121", "0.539054", "0.5387803", "0.5363413", "0.535357", "0.5340851", "0.53098553", "0.53074944", "0.5292428", "0.52709234", "0.52709234", "0.52444506", "0.52280986", "0.5223443", "0.52132386", "0.52065367", "0.52034956", "0.51998055", "0.5191044", "0.51826876", "0.5161474", "0.5161243", "0.5154505", "0.514935", "0.51487625", "0.5139893", "0.5126377", "0.5125742", "0.51247454", "0.5116975", "0.51106405", "0.5108361", "0.5101864", "0.5097248", "0.5097248", "0.5097248", "0.5093686", "0.50897515", "0.50857747", "0.5078819", "0.50608265", "0.5059568", "0.5053318", "0.5050027", "0.50335455", "0.50311244", "0.5030895", "0.5027372", "0.5024319", "0.5021621", "0.50174195", "0.5016999", "0.500767", "0.5002771", "0.5001143", "0.500013", "0.50001234", "0.49915594", "0.49895114", "0.49882758", "0.4985047", "0.49800327", "0.4979781", "0.4978254", "0.4975508", "0.49702895", "0.49680328", "0.4961086", "0.49552783", "0.4950663", "0.49503404", "0.49482176", "0.49480468", "0.49476153", "0.49420047", "0.4931333", "0.4930749", "0.4927547", "0.49273694", "0.49243724", "0.49202234", "0.49196166", "0.49188772", "0.4916896", "0.49076468", "0.49068004", "0.4900884" ]
0.5529307
12
This method was generated by MyBatis Generator. This method returns the value of the database column t_company_recommend.position
public Integer getPosition() { return position; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BigDecimal getRecommendPosition() {\n return recommendPosition;\n }", "public int getPosition()\n {\n return getInt(\"Position\");\n }", "public void setRecommendPosition(BigDecimal recommendPosition) {\n this.recommendPosition = recommendPosition;\n }", "public Integer getPosition() {\n return this.position;\n }", "public Integer getPosition()\n {\n return position;\n }", "public long position() {\n return _pos;\n }", "public int positionHint() {\n\t\treturn 101;\n\t}", "public java.lang.Integer getPosition() {\n return position;\n }", "public int getPosition() {\n return preferences.getInt(\"position\",0);\n }", "public int getPositionl() {\n return preferences.getInt(\"positionl\",0);\n }", "public java.lang.Integer getPosition() {\n return position;\n }", "public String getPosition(){\r\n\t\treturn position;\r\n\t}", "public int getPosition()\r\n {\r\n return position;\r\n }", "public int getPosition() {\r\n return position;\r\n }", "public int getPosition() {\n return position;\n }", "public int getPosition() {\n return position;\n }", "public int getPosition() {\n return position;\n }", "public int getPosition() {\n return position;\n }", "public int getPosition() {\r\n\t\treturn position;\r\n\t}", "public Integer getPosition();", "public BigDecimal getActualPosition() {\n return actualPosition;\n }", "public int getPosition()\n\t{\n\t\treturn position;\n\t}", "public int position() {\n return pos;\n }", "public String getPosition() {\n return position;\n }", "public String getPosition() {\n return position;\n }", "public String getPosition() {\n return position;\n }", "public String getPosition() {\n return position;\n }", "public String getPosition() {\n return position;\n }", "public Cell getPosition() {\n return position;\n }", "public int getPositionColumn(){return this.positionColumn;}", "@Override\n public Optional<Position> getPosition() {\n return this.pos;\n }", "public long getPosition();", "public final Optional<Position> getPosition() {\n return position;\n }", "public int getGlobalPosition(int position) {\n return position + getFastAdapter().getItemCount(getOrder());\n }", "public final int getPosition() {\n return position;\n }", "public IntegerTulep getPosition() {\n return position;\n }", "public final native CoOrdinates getPosition() /*-{\r\n\t\treturn this.position;\r\n\t}-*/;", "@Override\n public double getPosition()\n {\n final String funcName = \"getPosition\";\n double pos = getMotorPosition() - zeroPosition;\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", pos);\n }\n\n return pos;\n }", "public Integer getPositionnum() {\n\t\treturn positionnum;\n\t}", "public Integer getPositionId() {\n return positionId;\n }", "public double getPosition() {\n return spark_encoder.getPosition();\n }", "public java.lang.Integer getPos() {\n\t\treturn getValue(org.openforis.collect.persistence.jooq.tables.OfcLogo.OFC_LOGO.POS);\n\t}", "public int getPosition();", "public Position getPosition(){\n return this.position;\n }", "public Vector2 getPosition() {\n\t\treturn position;\n\t}", "@Override\n public int getPosition() {\n return position;\n }", "public int getPosition() {\n return models.indexOf(activeModel);\n }", "public Position getPosition() {\n\t\treturn position;\n\t}", "public Vector2 getPosition() {\n\t\treturn pos;\n\t}", "public Position getPosition()\n\t{\n\t\treturn position;\n\t}", "public Pos getPos()\r\n\t{\r\n\t\treturn position;\r\n\t}", "@PersistField(contained = true)\n public BlockVector getPosition()\n {\n return position;\n }", "public Cursor getposition(List<String> pos) {\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor res = db.rawQuery( \"select * from \"+TABLE_NAME+\" where IMGNAME=\"+pos, null );\n if (res != null)\n res.moveToFirst();\n\n return res;\n }", "public int getPosition(){\n return -1;\n }", "public GeoPoint position(){\n return position;\n }", "public long position() {\n\t\tif (mPlayer.isInitialized()) {\n\t\t\treturn mPlayer.position();\n\t\t}\n\t\treturn -1;\n\t}", "public P getEstimatedPosition() {\n return mEstimatedPosition;\n }", "public Point getPosition(){\n\t\treturn position;\n\t}", "public Optional<Integer> getPosition() {\n return this.placement.getAlleles().stream()\n .map(p -> p.getAllele().getSpdi().getPosition())\n .findFirst();\n }", "public Position getPosition() {\n return position;\n }", "public Position getPosition() {\n return position;\n }", "public Position getPosition() {\n return position;\n }", "public Position getPosition() {\n return position;\n }", "public Position getPosition() {\n return position;\n }", "public Position getPosition() {\n return position;\n }", "@java.lang.Override\n public godot.wire.Wire.Vector2 getPosition() {\n return position_ == null ? godot.wire.Wire.Vector2.getDefaultInstance() : position_;\n }", "public Vector2D getPosition() {\n\t\treturn position;\n\t}", "public String getPositionCode() {\n\t\treturn positionCode;\n\t}", "public int getPosition() {\n log.log(Level.FINE, \"position: \" + position + \"ms\");\n return position;\n }", "public int getPositionRow(){return this.positionRow;}", "public int getDocpositioncode() {\n\treturn docpositioncode;\n}", "RealLocalizable getPosition();", "public String getPositionDesc() {\n\t\treturn positionDesc;\n\t}", "@Override\n\tpublic Position getPosition() {\n\t\treturn this.posn;\n\t}", "public int getIdCadastroSelecionado(int listPosition, String condition){\n \tif (listPosition == -1){\r\n \t\treturn 0;\r\n \r\n \t}else{\r\n \treturn Integer.parseInt(Controlador.getInstancia().getCadastroDataManipulator().selectIdImoveis(condition).get(listPosition));\r\n \t}\r\n }", "default String getPos() {\n return meta(\"nlpcraft:nlp:pos\");\n }", "@Override\n public Position getPosition() {\n return position;\n }", "public GeoPoint getPosition() {\n\t\treturn position;\n\t}", "public Position getPosition() {\n return this.position;\n }", "public int getPosition(){\n\t\treturn this.cell;\n\t}", "@Override\n\t/**\n\t * returns the position of the class\n\t * \n\t * @return position\n\t */\n\tpublic int getPosition() {\n\t\treturn position;\n\t}", "public long getPos()\n\t{\n\t\treturn -1;\n\t}", "public com.hps.july.persistence.PositionAccessBean getPosition() throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n instantiateEJB();\n com.hps.july.persistence.Position localEJBRef = ejbRef().getPosition();\n if ( localEJBRef != null )\n return new com.hps.july.persistence.PositionAccessBean(localEJBRef);\n else\n return null;\n }", "public int get(int position) {\n return Integer.MIN_VALUE;\n }", "public Point2 getPosition() {\r\n return this.position;\r\n }", "public PVector getPosition(){\n\t\treturn position;\n\t}", "public int getPos();", "public int getPos();", "public String getPos(){\r\n\t\t return pos;\r\n\t }", "@Override\n public int getPositionFirstOperand() {\n return position + 1;\n }", "@Override\n public int getPositionSecondOperand() {\n return position + 2;\n }", "public final Vector2f getPosition() {\r\n return position;\r\n }", "BannerPosition selectBannerPositionByPrimaryKey(Integer id) throws SQLException;", "public final Vector2D getPosition() {\n return position;\n }", "public Integer getPositionOrder() {\n return positionOrder;\n }", "public godot.wire.Wire.Vector2 getPosition() {\n if (positionBuilder_ == null) {\n return position_ == null ? godot.wire.Wire.Vector2.getDefaultInstance() : position_;\n } else {\n return positionBuilder_.getMessage();\n }\n }", "public String getPos() {\n return this.pos;\n }", "public PVector getPosition() { return position; }", "protected int _columnOffset(int absRank) {\n\treturn absRank;\n}", "public Long getPosId() {\n return posId;\n }" ]
[ "0.6708772", "0.6257722", "0.60693675", "0.58376914", "0.5765101", "0.57626677", "0.5738417", "0.57225466", "0.56970555", "0.5677516", "0.56689143", "0.56553805", "0.5637952", "0.563791", "0.5633332", "0.5613151", "0.5613151", "0.5613151", "0.55894226", "0.55830187", "0.55763745", "0.55364674", "0.55262333", "0.55234474", "0.55234474", "0.55234474", "0.55234474", "0.55234474", "0.55125034", "0.551191", "0.5492656", "0.5489488", "0.5469128", "0.54512143", "0.5449637", "0.543198", "0.54288936", "0.5419584", "0.54001164", "0.5398151", "0.5367044", "0.5341631", "0.5326754", "0.5323818", "0.53180695", "0.5304072", "0.5303298", "0.52805305", "0.52788776", "0.5278308", "0.52731913", "0.5272585", "0.5258587", "0.5242409", "0.5238383", "0.523572", "0.5235473", "0.52301514", "0.52297825", "0.5229044", "0.5229044", "0.5229044", "0.5229044", "0.5229044", "0.5229044", "0.5223396", "0.5219447", "0.517673", "0.5171207", "0.5169125", "0.516832", "0.5163081", "0.5144109", "0.5140197", "0.51340896", "0.5134064", "0.51262957", "0.5122825", "0.51204133", "0.51188785", "0.51122814", "0.5110573", "0.510383", "0.5101702", "0.5098023", "0.5097457", "0.5074729", "0.5074729", "0.50651276", "0.5062617", "0.50616586", "0.50576836", "0.50566167", "0.50489897", "0.5048882", "0.5041732", "0.50363386", "0.50359684", "0.5035216", "0.50308335" ]
0.5761422
6
This method was generated by MyBatis Generator. This method sets the value of the database column t_company_recommend.position
public void setPosition(Integer position) { this.position = position; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRecommendPosition(BigDecimal recommendPosition) {\n this.recommendPosition = recommendPosition;\n }", "public void setPosition(Integer position);", "public void setPosition(int position)\n {\n put(\"Position\", position);\n }", "public BigDecimal getRecommendPosition() {\n return recommendPosition;\n }", "public void setPosition(java.util.List position)\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(POSITION$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(POSITION$0);\n }\n target.setListValue(position);\n }\n }", "public void setPosition(int position)\r\n {\r\n this.position = position;\r\n }", "public void setPosition(int position);", "public void setPosition(int position) {\r\r\r\r\r\r\n this.position = position;\r\r\r\r\r\r\n }", "public void setPosition(int position) {\r\n this.position = position;\r\n }", "public void setPosition(String position){\r\n\t\tthis.position = position;\r\n\t}", "public void setPosition(Position pos);", "public void setPosition(String position) {\n this.position = position;\n }", "public void setPosition(String position) {\n this.position = position;\n }", "public void setPosition(int position) {\r\n\t\tthis.position = position;\r\n\t}", "private void resetCompanyPositions(){\n // resets intPositions on all companies if they get messed up\n\n lisCompanies = daoImpl.getLisCompanies();\n\n String str = \"\";\n\n for (int i = 0; i < lisCompanies.size(); i++) {\n\n str = lisCompanies.get(i).getStrName() +\": \" + lisCompanies.get(i).getIntPosition();\n\n lisCompanies.get(i).setIntPosition(i);\n\n str = str + \" -> \" + lisCompanies.get(i).getIntPosition();\n Log.i(\"Reset Company Positions\", str);\n }\n\n daoImpl.executeUpdateCompanies(lisCompanies);\n }", "public void setPosition(String position) {\n if(position==null){\n position=\"\";\n }\n this.position = position;\n }", "public void setPosition(int newPos) {\n this.position = newPos;\n\n this.database.update(\"AnswerOptions\", \"matchingPosition = '\" + position + \"'\", \"optionId = \" + this.optionId);\n }", "public void setPosition(Position position) {\n this.position = position;\n }", "public void setPosition(Position position) {\n this.position = position;\n }", "public void setPosition(Position position) {\n this.position = position;\n }", "@Override\n public void setPosition(int position) {\n this.position = position;\n }", "public void setPosition(Position position_)\n\t{\n\t\tposition=position_;\n\t}", "void setPosition(Position position);", "void setPosition(Position position);", "public abstract void setPosition(Position position);", "public void setPosition(Position pos) {\n \tthis.position = pos;\n \t//setGrade();\n }", "public void setPosition(Position p);", "protected void setPosition(Position p) {\n\t\tposition = p;\n\t}", "void setPosition(int position) {\n mPosition = position;\n }", "public void setPosition(com.hps.july.persistence.Position arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().setPosition(arg0);\n }", "public void secondarySetPosition(com.hps.july.persistence.Position arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().secondarySetPosition(arg0);\n }", "public void setPosition(Point2 position) {\r\n this.position = position;\r\n }", "public void setPositionOrder(Integer positionOrder) {\n this.positionOrder = positionOrder;\n }", "public void setPosition(Position pos) {\n position = new Position(pos);\n }", "public final void setPosition(int p) {\n this.position = p;\n }", "public void setPos(int pos);", "public void setPos(int pos);", "public int positionHint() {\n\t\treturn 101;\n\t}", "@External\r\n\t@ClientFunc\r\n\tpublic MetaVar SetPos(MetaVarVector positionVar);", "public void setPosition(final Position param) {\n this.position = param;\n }", "public void setPosition(GeoPoint position) {\n\t\tthis.position = position;\n\t}", "public void setPositionColumn(int value){this.positionColumn = value;}", "void setPosition(Position p);", "@PropertySetter(role = POSITION)\n\t<E extends CtElement> E setPosition(SourcePosition position);", "public void setPosition(Coordinate position) {\n cPosition = position;\n }", "public void setPosCaisse(Position position) {\r\n this.pos_courante = position;\r\n\r\n }", "public void setPosition(Point position);", "public void setPosition(Point2D position)\n {\n mPosition = position;\n }", "public void setPosition(int position){\n this.alreadyPlayingService.setCurrentPosition(position);\n }", "public void PositionSet(int position);", "public void setCurrentPosition(String position){\n this.currentPosition = position;\n }", "public void setPosition(Point position) {\n this.position = position;\n }", "@Override\n\tpublic void setPosition(Position p) {\n\t\tthis.position = p;\n\n\t}", "public void setPosition(final MowerPosition position) {\n this.position = position;\n }", "public void setPositionRow(int value){this.positionRow = value;}", "public void setPosition(BlockVector position)\n {\n this.position = position;\n }", "public void setPositionnum(Integer positionnum) {\n\t\tthis.positionnum = positionnum;\n\t}", "public void storeItemPosition(long position) {\n\t\tmEditor.putLong(\"KEY_DATA_POSITION\", position);\n\t\tmEditor.commit();\n\t}", "public void setPosition(final Vector2f position);", "public void setPosition(Point newPosition);", "public void setTagPosition(int position) {\n\t\tthis.position = position;\n\t}", "public void setPosicion(int posicion){\n _posicion = posicion;\n }", "@Override\n public void changePrice(Product product, int position) {\n changeProductPrice(product, -1);\n }", "private void positionMode() {\n\t\ttestMotor.setProfile(0);\n\t\ttestMotor.ClearIaccum();\n\t\ttestMotor.set(testMotor.getPosition());\n\t\ttestMotor.ClearIaccum();\n\t}", "public void setPosition(Point p) {\r\n\t\tthis.position = p;\r\n\t\tc.setPosition(p);\r\n\t}", "public void setActualPosition(BigDecimal actualPosition) {\n this.actualPosition = actualPosition;\n }", "public void setPosition(Point position) {\n this.position = new Point(position);\n update();\n }", "public void setPosition(Vector2 p) {\n\t\tpos = p;\n\t}", "public void setPos(java.lang.Integer value) {\n\t\tsetValue(org.openforis.collect.persistence.jooq.tables.OfcLogo.OFC_LOGO.POS, value);\n\t}", "public Builder position(String position) {\n\n\t\t\tthis.position = position;\n\t\t\treturn this;\n\t\t}", "@Override\n public void setPosition(int position) {\n\n // If the service has disconnected, the SSMusicService is restarted.\n if (!serviceBound) {\n setUpAudioService(); // Sets up the SSMusicService.\n }\n\n // Signals the SSMusicService to set the song position.\n else {\n musicService.setPosition(position);\n }\n }", "public void setPositionDesc(String positionDesc) {\n\t\tthis.positionDesc = positionDesc == null ? null : positionDesc.trim();\n\t}", "public void setActualPosition(GeoPosition actualPosition) {\n//\t\tSystem.out.println(name + \".setActualPosition() :\" + actualPosition.toString());\n\t\tif(actualPosition != null)this.actualPosition = actualPosition;\n\t}", "public void setPosition(Vector2 position);", "public void setPosition(Vector2fc position){\n glfwSetWindowPos(handle, (int) position.x(), (int) position.y());\n this.position.set(position);\n }", "void setPosition(Point point);", "public void setParameterValue(final int position, final String value) {\n parameterValues.set(position-1,value);\n }", "void setPosition(){\n Random random =new Random();\n position = new Position(random.nextInt(maxrows),random.nextInt(maxcols));\n\n }", "public void set(int position, Item item) {\n if (mUseIdDistributor) {\n IdDistributor.checkId(item);\n }\n mItems.set(position - getFastAdapter().getItemCount(getOrder()), item);\n mapPossibleType(item);\n getFastAdapter().notifyAdapterItemChanged(position);\n }", "public void onitemclickmethod(int position) {\n\n position_of_image = position;\n int num1 = uploads.get(position_of_image).getNumber_likes();\n uploads.get(position_of_image).setNumber_likes(num1 + 1);\n\n String id = uploads.get(position_of_image).getId();\n int number = uploads.get(position_of_image).getNumber_likes();\n String name = uploads.get(position_of_image).getName();\n url = uploads.get(position_of_image).getImageUrl();\n\n //updating the tables\n\n Map<String, Object> map = new HashMap<>();\n map.put(id, new Upload(name, url, number, id));\n // mDatabaseRef.child(id).child(\"number_likes\").setValue(number);\n uploads.clear();\n mDatabaseRef.updateChildren(map);\n mRecyclerView.smoothScrollToPosition(position_of_image);\n\n }", "public void SetPosition(Vector2 position)\n\t{\n\t\tTransform transform = parent.transform;\n\t\ttransform.position = position;\n\t\t// Dont loose your dP!\n\t\tpreviousPosition = Vector2.Add(position,velocity.negate());\n\t}", "public void setPosition(Vector2 pos) {\n\t\tsetX(pos.x);\n\t\tsetY(pos.y);\n\t}", "public void setPosition(final Point p) {\n this.position = p;\n }", "void setOrganizationPositionList(ch.crif_online.www.webservices.crifsoapservice.v1_00.OrganizationPositionList organizationPositionList);", "@SuppressWarnings(\"null\")\n private void setIDCupon() {\n int id_opinion = 1;\n ResultSet rs = null;\n Statement s = null;\n //cb_TS.addItem(\"Seleccione una opinion...\");\n //Creamos la query\n try {\n s = conexion.createStatement();\n } catch (SQLException se) {\n System.out.println(\"probando conexion de consulta\");\n }\n try {\n rs = s.executeQuery(\"SELECT id_cupon FROM cupon order by id_cupon desc LIMIT 1\");\n while (rs.next()) {\n id_opinion = Integer.parseInt(rs.getString(1))+1;\n }\n tf_ID.setText(Integer.toString(id_opinion));\n } catch (SQLException ex) {\n Logger.getLogger(N_Opinion.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void setNodePositionXY (Point2D position) { n.setXYPositionMap(position); }", "public void setPos(Punto pos) {\n\t\tthis.pos = pos;\n\t}", "public void setPlayerPosition(CellView playerPosition) {\n this.playerPosition = playerPosition;\n }", "void setPosNr(String posNr);", "public void setPositionCode(String positionCode) {\n\t\tthis.positionCode = positionCode == null ? null : positionCode.trim();\n\t}", "public void setPosition(){\r\n currentPosition = 0; \r\n }", "public void setCompany(java.lang.Integer newCompany) {\n\tcompany = newCompany;\n}", "public void setPosition(PositionTitle position) {\n this.position = position;\n }", "public void xsetPosition(org.astrogrid.stc.coords.v1_10.beans.Double2Type position)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.astrogrid.stc.coords.v1_10.beans.Double2Type target = null;\n target = (org.astrogrid.stc.coords.v1_10.beans.Double2Type)get_store().find_element_user(POSITION$0, 0);\n if (target == null)\n {\n target = (org.astrogrid.stc.coords.v1_10.beans.Double2Type)get_store().add_element_user(POSITION$0);\n }\n target.set(position);\n }\n }", "public void set(int pos);", "@Override\n\t/**\n\t * sets the position of the class\n\t * \n\t * @param i\n\t */\n\tpublic void setPosition(int i) {\n\t\tposition = i;\n\t}", "public void setLastViewedPosition(long position) {\n mEditor.putLong(\"LastViewedPosition\", position);\n mEditor.commit();\n }", "public void place(Position position) { this.position = position; }", "protected void setMotorPositions(long lPos, long rPos) {\n leftPosition = lPos;\n rightPosition = rPos;\n }", "public void setPosition(Files f, Rank r);" ]
[ "0.6993745", "0.59610426", "0.5941133", "0.5833906", "0.582794", "0.5816658", "0.57949585", "0.579454", "0.57565445", "0.5742708", "0.56564814", "0.564058", "0.564058", "0.5616367", "0.5606265", "0.55938834", "0.5570139", "0.55647945", "0.55647945", "0.55647945", "0.5549498", "0.55330294", "0.5512584", "0.5512584", "0.5430424", "0.5405848", "0.5396256", "0.53933924", "0.53747714", "0.5372519", "0.53395647", "0.5331942", "0.5306614", "0.5281741", "0.5267053", "0.52311975", "0.52311975", "0.5227164", "0.52251786", "0.521495", "0.5205202", "0.5204509", "0.5201619", "0.5200998", "0.5196583", "0.51892525", "0.51456225", "0.5144857", "0.5129385", "0.512654", "0.5119809", "0.5110844", "0.5108615", "0.51058584", "0.50988597", "0.5084006", "0.50805926", "0.5045431", "0.5008835", "0.5007476", "0.49903733", "0.4969962", "0.4964529", "0.49629268", "0.49488747", "0.49485436", "0.4947006", "0.49461043", "0.4943804", "0.49412525", "0.49387497", "0.49207357", "0.4884777", "0.48791754", "0.4877053", "0.48749772", "0.4868691", "0.48629493", "0.4848974", "0.48392466", "0.48265034", "0.48178744", "0.48174304", "0.48154178", "0.48135403", "0.48071775", "0.48027423", "0.48017943", "0.4796373", "0.47784838", "0.47775877", "0.47763637", "0.47612512", "0.4757775", "0.47543523", "0.47490066", "0.47394475", "0.473642", "0.47321215", "0.47288156" ]
0.5837993
3
This method was generated by MyBatis Generator. This method returns the value of the database column t_company_recommend.create_time
public Date getCreateTime() { return createTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getCreatetime() {\n return createtime;\n }", "public String getCreatetime() {\r\n return createtime;\r\n }", "public Date getCreate_time() {\n return create_time;\n }", "public Date getCreate_time() {\n return create_time;\n }", "public String getCreatetime() {\n return createtime;\n }", "public String getCreatetime() {\n return createtime;\n }", "public Long getCreateTime() {\n return createTime;\n }", "public Integer getCreateTime() {\r\n return createTime;\r\n }", "public String getCreatetime() {\n\t\treturn createtime;\n\t}", "public String getCreatetime() {\n\t\treturn createtime;\n\t}", "public long getCreateTime() {\n return this.createTime;\n }", "public Date getCreatetime() {\r\n return createtime;\r\n }", "public Date getCreatetime() {\r\n return createtime;\r\n }", "public Date getCreatetime() {\r\n return createtime;\r\n }", "public Integer getCreateTime() {\n return createTime;\n }", "public Timestamp getCreateTime() {\n return createTime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Long getCreateTime() {\n\t\treturn createTime;\n\t}", "public Date getCreateTime() {\n return createTime;\n }", "public long getCreateTime() {\n return createTime_;\n }", "public String getCreateTime() {\r\n return createTime;\r\n }", "public Date getCreateTime() {\n return this.createTime;\n }", "public Date getCreateTime() {\n return this.createTime;\n }", "public java.lang.String getCreatetime () {\n\t\treturn createtime;\n\t}", "public Date getTimeCreate() {\n return timeCreate;\n }", "public java.sql.Timestamp getCreateTime () {\r\n\t\treturn createTime;\r\n\t}", "public Date getCreateTime() {\r\n return createTime;\r\n }", "public Date getCreateTime() {\r\n return createTime;\r\n }", "public Date getCreateTime() {\r\n return createTime;\r\n }", "public Date getCreateTime() {\r\n return createTime;\r\n }", "public Date getCreateTime() {\r\n return createTime;\r\n }", "public Date getCreateTime() {\r\n return createTime;\r\n }", "public String getCreateTime() {\n return createTime;\n }", "public String getCreateTime() {\n return createTime;\n }", "public String getCreateTime() {\n return createTime;\n }", "public String getCreateTime() {\n return createTime;\n }", "public String getCreateTime() {\n return createTime;\n }", "long getCreateTime();", "long getCreateTime();", "public long getCreateTime() {\n return createTime_;\n }" ]
[ "0.7190112", "0.69430786", "0.6938649", "0.6938649", "0.68888384", "0.68888384", "0.6845117", "0.68082553", "0.6802251", "0.6802251", "0.67920923", "0.6775113", "0.6775113", "0.6775113", "0.6767207", "0.67568165", "0.67443657", "0.67443657", "0.67443657", "0.67443657", "0.67443657", "0.67443657", "0.67443657", "0.67443657", "0.67199165", "0.6704012", "0.6702883", "0.66999143", "0.66980267", "0.66980267", "0.66947633", "0.6691482", "0.6668451", "0.66670775", "0.66670775", "0.66670775", "0.66670775", "0.66670775", "0.66670775", "0.66528285", "0.66528285", "0.66528285", "0.66528285", "0.66528285", "0.66455805", "0.66455805", "0.6627495" ]
0.0
-1
This method was generated by MyBatis Generator. This method sets the value of the database column t_company_recommend.create_time
public void setCreateTime(Date createTime) { this.createTime = createTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCreate_time(Date create_time) {\n this.create_time = create_time;\n }", "public void setCreate_time(Date create_time) {\n this.create_time = create_time;\n }", "public void setCreatetime(Date createtime) {\r\n this.createtime = createtime;\r\n }", "public void setCreatetime(Date createtime) {\r\n this.createtime = createtime;\r\n }", "public void setCreatetime(Date createtime) {\r\n this.createtime = createtime;\r\n }", "public void setCreatetime(Long createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "private void setCreateTime(long createTime) {\n this.createTime = createTime;\n }", "public void setCreateTime(Date createTime)\n/* */ {\n/* 184 */ this.createTime = createTime;\n/* */ }", "public void setTimeCreate(Date timeCreate) {\n this.timeCreate = timeCreate;\n }", "public void setCreatetime(String createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(String createtime) {\n this.createtime = createtime;\n }", "public void setCreateTime (java.sql.Timestamp createTime) {\r\n\t\tthis.createTime = createTime;\r\n\t}", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }", "public void setCreateTime(Date createTime) {\n this.createTime = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(createTime);\n }", "public void setCreateTime(Integer createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreatTime(Date creatTime) {\n this.creatTime = creatTime;\n }", "public void setCreatTime(Date creatTime) {\n this.creatTime = creatTime;\n }" ]
[ "0.7223736", "0.7223736", "0.6979298", "0.6979298", "0.6979298", "0.69316345", "0.69130576", "0.69130576", "0.69130576", "0.69130576", "0.69130576", "0.69130576", "0.69130576", "0.69130576", "0.68607694", "0.67719966", "0.6766541", "0.6765385", "0.6765385", "0.6731332", "0.6625879", "0.6625879", "0.6625879", "0.6625879", "0.6625879", "0.6625879", "0.6608391", "0.6598489", "0.65687114", "0.6559673", "0.6559673" ]
0.0
-1
This method was generated by MyBatis Generator. This method returns the value of the database column t_company_recommend.update_time
public Date getUpdateTime() { return updateTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getUpdateDatetime() {\n return updateDatetime;\n }", "public Date getUpdate_time() {\n return update_time;\n }", "public Date getUpdate_time() {\n return update_time;\n }", "public String getUpdatetime() {\n\t\treturn updatetime;\n\t}", "public String getUpdatetime() {\n\t\treturn updatetime;\n\t}", "public Date getUpdatetime() {\r\n return updatetime;\r\n }", "public Date getUpdatetime() {\n return updatetime;\n }", "public Date getUpdatetime() {\n return updatetime;\n }", "public java.sql.Timestamp getUpdateTime () {\r\n\t\treturn updateTime;\r\n\t}", "public Date getUpdateDatetime();", "public Date getUpdateDatime() {\r\n return updateDatime;\r\n }", "public Date getUpdateDatime() {\r\n return updateDatime;\r\n }", "public Date getUpdateDatetime() {\r\n\t\treturn updateDatetime;\r\n\t}", "public com.flexnet.opsembedded.webservices.DateTimeQueryType getUpdateTime() {\n return updateTime;\n }", "public Date getUpdateTime()\n {\n return data.updateTime;\n }", "public Date getTimeUpdate() {\n return timeUpdate;\n }", "long getTsUpdate();", "int getUpdateTriggerTime();", "@ApiModelProperty(value = \"修改时间\")\n public Date getRowUpdateTime() {\n return rowUpdateTime;\n }", "public Date getUpdatedTime() {\n return updatedTime;\n }", "public Date getUpdatedTime() {\n return updatedTime;\n }", "public Date getUpdatedTime() {\n return updatedTime;\n }", "public Timestamp getUpdateTime() {\n return updateTime;\n }", "public String getUpdTime() {\n return updTime;\n }", "public Long getUpdateTime() {\n return updateTime;\n }", "public Long getUpdateTime() {\n return updateTime;\n }", "public Date getUpdateTime()\n/* */ {\n/* 191 */ return this.updateTime;\n/* */ }", "public String getUpdateTime() {\r\n return updateTime;\r\n }", "public Long getUpdateTime() {\n\t\treturn updateTime;\n\t}", "public Integer getUpdateTime() {\n return updateTime;\n }", "public Date getUpdateTime() {\n return this.updateTime;\n }", "public String getUpdateTime() {\n return updateTime;\n }", "public String getUpdateTime() {\n return updateTime;\n }", "public String getUpdateTime() {\n return updateTime;\n }", "public String getUpdateTime() {\n return updateTime;\n }", "public java.lang.Long getTsUpdate() {\n return ts_update;\n }", "public Date getUpdateTime() {\r\n return updateTime;\r\n }", "public Date getUpdateTime() {\r\n return updateTime;\r\n }", "public Date getUpdateTime() {\r\n return updateTime;\r\n }", "public Date getUpdateTime() {\r\n return updateTime;\r\n }", "public Date getUpdateTime() {\n\t\treturn this.updateTime;\n\t}", "public int getUpdateTriggerTime() {\n return updateTriggerTime_;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getUpdateTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(UPDATETIME_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getUpdateTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(UPDATETIME_PROP.get());\n }", "public String getUpdateTime() {\n\t\t\treturn updateTime;\n\t\t}", "public java.lang.Long getTsUpdate() {\n return ts_update;\n }", "public Date getUpdateTime() {\r\n\t\treturn this.updatedTime;\r\n\t}", "public Date getUpdateTime() {\r\n\t\treturn updateTime;\r\n\t}", "public int getUpdateTriggerTime() {\n return instance.getUpdateTriggerTime();\n }", "public Date getUpdateTime() {\n\t\treturn updateTime;\n\t}", "public Date getUpdateTime() {\n\t\treturn updateTime;\n\t}", "public Date getUpdateTime() {\n\t\treturn updateTime;\n\t}", "public Date getUpdateTimeDb() {\r\n\t\treturn updateTimeDb;\r\n\t}", "public Timestamp getUpdateDate() {\n return updateDate;\n }", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();" ]
[ "0.7216178", "0.7167443", "0.7167443", "0.708995", "0.708995", "0.70618993", "0.70534116", "0.70534116", "0.69397676", "0.69346774", "0.6882119", "0.6882119", "0.68064547", "0.67782474", "0.6773409", "0.6743305", "0.67099875", "0.6689185", "0.66362", "0.6635864", "0.6635864", "0.6635864", "0.6635201", "0.6633177", "0.6633062", "0.6633062", "0.6626279", "0.6623117", "0.66182864", "0.6607235", "0.65769035", "0.6573117", "0.6573117", "0.6573117", "0.6573117", "0.6561406", "0.6542067", "0.6542067", "0.6542067", "0.6542067", "0.65371597", "0.6527718", "0.65249276", "0.65187", "0.6518368", "0.6505166", "0.64985526", "0.6490724", "0.6479113", "0.64529073", "0.64529073", "0.64529073", "0.6447618", "0.64466006", "0.64388716", "0.64388716", "0.64388716" ]
0.6486665
85
This method was generated by MyBatis Generator. This method sets the value of the database column t_company_recommend.update_time
public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }", "public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }", "public void setUpdatetime(Date updatetime) {\r\n this.updatetime = updatetime;\r\n }", "public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }", "public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }", "public void setUpdateTime (java.sql.Timestamp updateTime) {\r\n\t\tthis.updateTime = updateTime;\r\n\t}", "public void setUpdateDatime(Date updateDatime) {\r\n this.updateDatime = updateDatime;\r\n }", "public void setUpdateDatime(Date updateDatime) {\r\n this.updateDatime = updateDatime;\r\n }", "public void setUpdateDatetime(Long updateDatetime) {\n this.updateDatetime = updateDatetime;\n }", "public void setTimeUpdate(Date timeUpdate) {\n this.timeUpdate = timeUpdate;\n }", "public void setUpdateTime(DateTime updateTime) {\n this.updated = updateTime;\n }", "public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }", "public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }", "public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }", "public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }", "@Override\n\tpublic void setUpdateTime(Date updateTime) {\n\t\t\n\t}", "public void setUpdateDatetime(Date updateDatetime);", "public void setUpdateTime(Date updateTime) {\r\n\t\tthis.updateTime = updateTime;\r\n\t}", "public void setUpdateTime(LocalDateTime updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(LocalDateTime updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(LocalDateTime updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(Date updateTime)\n/* */ {\n/* 198 */ this.updateTime = updateTime;\n/* */ }", "public void setUpdateDatetime(Date updateDatetime) {\r\n\t\tthis.updateDatetime = updateDatetime;\r\n\t}", "public void setUpdateTime(Date updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}", "public void setUpdateTime(Date updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}", "public void setUpdateTime(Date updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}", "public void setUpdateTime(Timestamp updateTime) {\n this.updateTime = updateTime;\n }", "void setLastUpdatedTime();", "public void setUpdateTime(Long updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(Long updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(Integer updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(java.util.Date updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(Long updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}", "public void setUpdatedTime(Date updatedTime) {\n this.updatedTime = updatedTime;\n }", "public void setUpdatedTime(Date updatedTime) {\n this.updatedTime = updatedTime;\n }", "public void setUpdatedTime(Date updatedTime) {\n this.updatedTime = updatedTime;\n }", "public void setUpdateTime(com.flexnet.opsembedded.webservices.DateTimeQueryType updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdTime(String updTime) {\n this.updTime = updTime;\n }", "public void setUpdateTime(String updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(String updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTimeDb(Date updateTimeDb) {\r\n\t\tthis.updateTimeDb = updateTimeDb;\r\n\t}", "public void setUpdateTime(Date updateTime) {\n\t\tsetField(\"updateTime\", updateTime);\n\t}", "public void setUpdateTime(String updateTime) {\n\t\t\tthis.updateTime = updateTime;\n\t\t}", "public Long getUpdateDatetime() {\n return updateDatetime;\n }", "public void setUpdateTime(java.util.Calendar updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdatetime(String updatetime) {\n\t\tthis.updatetime = updatetime == null ? null : updatetime.trim();\n\t}", "public void setUpdatetime(String updatetime) {\n\t\tthis.updatetime = updatetime == null ? null : updatetime.trim();\n\t}", "public void setUpdateDate(Timestamp updateDate) {\n this.updateDate = updateDate;\n }", "public Date getUpdate_time() {\n return update_time;\n }", "public Date getUpdate_time() {\n return update_time;\n }", "private void setUpdateTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(UPDATETIME_PROP.get(), value);\n }", "public Date getUpdatetime() {\r\n return updatetime;\r\n }", "public void setUpdateDateTime(LocalDateTime updateDateTime) {\n\t\tthis.updateDateTime = updateDateTime;\n\t}", "public void setUpdateTime(String updateTime) {\r\n this.updateTime = updateTime == null ? null : updateTime.trim();\r\n }", "public void setUpdateTime(String updateTime) {\n this.updateTime = updateTime == null ? null : updateTime.trim();\n }", "public void setUpdateTime(String updateTime) {\n this.updateTime = updateTime == null ? null : updateTime.trim();\n }", "@Override\n\tpublic void setLastUpdatedTime(Date lastUpdated) {\n\n\t}" ]
[ "0.7364331", "0.7364331", "0.71463495", "0.7106001", "0.7106001", "0.6908528", "0.67999023", "0.67999023", "0.6785174", "0.6661945", "0.66595215", "0.66494685", "0.66494685", "0.66494685", "0.66494685", "0.66303766", "0.6588388", "0.65741944", "0.65515935", "0.65515935", "0.65515935", "0.6539623", "0.65289295", "0.6525217", "0.6525217", "0.6525217", "0.65220934", "0.6511416", "0.64988697", "0.64988697", "0.6487625", "0.6455396", "0.64426416", "0.64200914", "0.64200914", "0.64200914", "0.6419439", "0.637836", "0.6369037", "0.6369037", "0.6350453", "0.6328485", "0.6316311", "0.62660617", "0.6192582", "0.6167654", "0.6167654", "0.61545897", "0.6147475", "0.6147475", "0.6139377", "0.61295205", "0.61145586", "0.60999537", "0.60907346", "0.60907346", "0.60801715" ]
0.65825087
55
Class constructor for API > 21
@TargetApi(Build.VERSION_CODES.LOLLIPOP) public PageIndicatorLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); init(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Lollipop() {\r\n\t\t}", "private NativeSupport() {\n\t}", "private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }", "private Instantiation(){}", "public AndroidFactoryImpl() {\n\t\tsuper();\n\t}", "private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }", "private MApi() {}", "Reproducible newInstance();", "protected ApiActivityBase() {\n super();\n }", "private SystemInfo() {\r\n // forbid object construction \r\n }", "public native void constructor();", "private ClassUtil() {}", "public Libro() {\r\n }", "private AppUtils() {\n throw new UnsupportedOperationException(\"cannot be instantiated\");\n }", "Constructor() {\r\n\t\t \r\n\t }", "private Platform() {\n\t\t\n\t}", "private Aliyun() {\n\t\tsuper();\n\t}", "public _355() {\n\n }", "private C3P0Helper() { }", "private GeoUtil()\n\t{\n\t}", "public API() {}", "public Pitonyak_09_02() {\r\n }", "public Constructor(){\n\t\t\n\t}", "private XMLUtils()\r\n\t{\r\n\t}", "private AcceleoLibrariesEclipseUtil() {\n \t\t// hides constructor\n \t}", "private ClimateAlertUtils() {\n }", "private JsonUtils() {\n\t\tsuper();\n\t}", "public Tbdtokhaihq3() {\n super();\n }", "private XMLUtil() {\n\t}", "public OOP_207(){\n\n }", "private Util()\n {\n // Empty default ctor, defined to override access scope.\n }", "private JsonUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "public LibraryAdapterFactory() {\r\n\t}", "private Quantify()\n {\n throw new UnsupportedOperationException(\"Instantiation of utility classes is not supported.\");\n }", "private CLUtil()\n {\n }", "public As21Id27()\n\t{\n\t\tsuper() ;\n\t}", "private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}", "private Utils()\n {\n // Private constructor to prevent instantiation\n }", "public DeviceInfo() {}", "public Platform() { }", "private NativeLibraryLoader() {\n }", "private TouchPointManager() {\n }", "private VlcUtils()\n {\n \n }", "public CyanSus() {\n\n }", "public FactoryImpl() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.icu.text.TimeZoneNames.DefaultTimeZoneNames.FactoryImpl.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.icu.text.TimeZoneNames.DefaultTimeZoneNames.FactoryImpl.<init>():void\");\n }", "private Utils() {\n\t}", "private Utils() {\n\t}", "public Utils() {}", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private ApiUrlCreator() {\n }", "private XMLUtils() {\n }", "private Util() { }", "public ContactsProvider() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: org.gsma.joyn.contacts.ContactsProvider.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.gsma.joyn.contacts.ContactsProvider.<init>():void\");\n }", "private OSUtil()\n {\n throw new UnsupportedOperationException(\"Instantiation of utility classes is not permitted.\");\n }", "public ClassInfo() {\n }", "private SupplierLoaderUtil() {\n\t}", "private SystemInfo() {\n }", "private JadTool() { }", "private CheckingTools() {\r\n super();\r\n }", "private PhoneUtils() {\n }", "public Callback() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.hardware.radio.RadioTuner.Callback.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.hardware.radio.RadioTuner.Callback.<init>():void\");\n }", "private SupplierInfoBuilder() {\n }", "public Utils() {\n }", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "public LegacyResultMapper() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: android.hardware.camera2.legacy.LegacyResultMapper.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.hardware.camera2.legacy.LegacyResultMapper.<init>():void\");\n }", "private HttpClient() {\n\t}", "private SnapshotUtils() {\r\n\t}", "private XMLUtil()\n {\n }", "public Activity() {\n }", "private RestUtil() {\n\t}", "private Builder()\n {\n }", "CollationDataBuilder() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: android.icu.impl.coll.CollationDataBuilder.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.icu.impl.coll.CollationDataBuilder.<init>():void\");\n }", "protected abstract void construct();", "private RestClient() {\n }", "private S3Utils() {\n throw new UnsupportedOperationException(\"This class cannot be instantiated\");\n }", "private Converter()\n\t{\n\t\tsuper();\n\t}", "protected IPCGCallDetailCreator()\r\n {\r\n // empty\r\n }", "defaultConstructor(){}", "private GPSConst()\n\t{\n\t\t\n\t}", "private Util() {\n }", "private Util() {\n }", "public NameAndVersionRangeSupport()\n {\n }", "public AbstractT602()\n {\n }", "private Builder() {\n }", "private Builder() {\n }", "private JarUtils() {\n }", "private PluginAPI() {\r\n\t\tsuper();\r\n\t}", "private BufferUtil() {\n\n }", "private Util() {\n }", "private NumberUtil()\n {\n\tLog.getInstance().error(\"This Class is utility class cannot be instantiated\");\n }", "private void __sep__Constructors__() {}", "private GetMyInfo()\r\n/* 13: */ {\r\n/* 14:13 */ super(new APITag[] { APITag.INFO }, new String[0]);\r\n/* 15: */ }" ]
[ "0.72039235", "0.6812153", "0.6744566", "0.6528698", "0.64797175", "0.6452754", "0.64214706", "0.63388157", "0.63118154", "0.63051414", "0.6245523", "0.6223284", "0.6211362", "0.62103796", "0.6203127", "0.6180516", "0.6177349", "0.61640155", "0.61620104", "0.6158401", "0.615806", "0.613361", "0.6133375", "0.61211914", "0.6120988", "0.6120483", "0.61115026", "0.61054784", "0.6105018", "0.60964733", "0.609357", "0.60903275", "0.6088415", "0.6086878", "0.60841805", "0.6082127", "0.60812443", "0.60643524", "0.60638523", "0.6060581", "0.6059189", "0.60508347", "0.60476846", "0.6046263", "0.6045214", "0.6041711", "0.6041711", "0.6041351", "0.6020674", "0.6020674", "0.6020674", "0.6020674", "0.6020674", "0.6012507", "0.6003221", "0.6003221", "0.6003221", "0.6003221", "0.6001412", "0.5991914", "0.5985998", "0.59805906", "0.5980033", "0.59783703", "0.5977685", "0.5977482", "0.5975822", "0.5975284", "0.5970935", "0.5970874", "0.596763", "0.596435", "0.59540534", "0.5951245", "0.5942896", "0.59387255", "0.59387106", "0.59376115", "0.59375566", "0.59349805", "0.5931571", "0.5930356", "0.59248805", "0.5921133", "0.5911076", "0.5904459", "0.59026057", "0.5890898", "0.5888662", "0.5888662", "0.5887455", "0.5880733", "0.5874819", "0.5874819", "0.58745587", "0.5873874", "0.58622587", "0.5860996", "0.58595467", "0.58542967", "0.5852195" ]
0.0
-1
Gets page indicator text view
public TextView getIndicator() { return mIndicator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getPageText();", "abstract TextView getTextView();", "public String getTextOnPage()\n {\n return mainText.getText();\n }", "protected void onPostExecute(String page) {\n textView.setText(page);\n }", "int getPageNumber();", "int getPage();", "TextView getTitleView();", "protected View getFooterProgressView() {\n Activity activity = getActivity();\n if (activity != null) {\n return activity.getLayoutInflater().inflate(R.layout.footer_progress_layout, null);\n } else {\n return null;\n }\n }", "@Override\n\t\tpublic void onPageSelected(int arg0) {\n\t\t\tsetTextViewBG(arg0);\n\t\t}", "private void addBottomDots(int currentPage) {\n dots = new TextView[layouts.length];\n //dots is textview array\n int[] colorsActive = getResources().getIntArray(R.array.array_dot_active);\n int[] colorsInactive = getResources().getIntArray(R.array.array_dot_inactive);\n //dotslayout is linearlayout from welcome screen\n dotsLayout.removeAllViews();\n for (int i = 0; i < dots.length; i++) {\n dots[i] = new TextView(this);\n //setting bullet for every textview\n dots[i].setText(Html.fromHtml(\"&#8226;\"));\n dots[i].setTextSize(35);\n //different inactive colors for different pages(currentPage is which slide is displayed currently\n dots[i].setTextColor(colorsInactive[currentPage]);\n dotsLayout.addView(dots[i]);\n }\n\n if (dots.length > 0)\n dots[currentPage].setTextColor(colorsActive[currentPage]);\n }", "short getPageStart();", "TextView getDescriptionView();", "@Override\n public void onPageSelected(int position) {\n footerIndicator1.setImageResource(R.drawable.page_dot_2);\n footerIndicator2.setImageResource(R.drawable.page_dot_2);\n footerIndicator3.setImageResource(R.drawable.page_dot_2);\n footerIndicator4.setImageResource(R.drawable.page_dot_2);\n indicatorAction(position);\n }", "Integer getPage();", "@Override\n\t\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\t\t\tBundle savedInstanceState) {\n\t\t\t\tview=inflater.inflate(R.layout.firstpage, container, false);\n\n\t\t\t\tsc=(ScrollView) view.findViewById(R.id.scrollview);\n\t\t\t\tsc.setVerticalScrollBarEnabled(false);\n\t\t\t\tsp = getActivity().getSharedPreferences(\"SP\",0x0000);\n\t\t\t\tscrrenWidth=sp.getInt(\"ScrrenWidth\", 1080);\n\t\t\t\tscrrenHeight=sp.getInt(\"ScrrenHeight\", 1920);\n\t\t\t\trelativelayout=(RelativeLayout) view.findViewById(R.id.relativeLayout1);\n\n\t\t\t\tscrollnum=0;\n\n\t\t\t\ttvscroll1 = (TextView) view.findViewById(R.id.textview11);\n\t\t\t\ttvscroll2 = (TextView) view.findViewById(R.id.textview12);\n\t\t\t\ttvscroll3 = (TextView) view.findViewById(R.id.textview13);\n\t\t\t\ttvscroll4 = (TextView) view.findViewById(R.id.textview14);\n\t\t\t\ttvscroll5 = (TextView) view.findViewById(R.id.textview15);\n\n\t\t\t\ttv1=(TextView) view.findViewById(R.id.textView3);\n\t\t\t\ttv2=(TextView) view.findViewById(R.id.textView4);\n\t\t\t\tface= Typeface.createFromAsset (getActivity().getAssets() , \"fonts/fangz.ttf\"); \n\t\t\t\ttv1.setTypeface (face);\n\t\t\t\ttv2.setTypeface(face);\n\n\n\t\t\t\ttv3=(TextView) view.findViewById(R.id.textView5);\n\t\t\t\ttv4=(TextView) view.findViewById(R.id.textView6);\n\t\t\t\ttv5=(TextView) view.findViewById(R.id.textView7);\n\t\t\t\ttv6=(TextView) view.findViewById(R.id.textView8);\n\n\t\t\t\tcircleprogressbar=(CircleProgressBarView) view.findViewById(R.id.circleProgressBarView1);\n\t\t\t\tcircleprogressbar.setVisibility(View.VISIBLE);\n\t\t\t\tcircleprogressbar.setMax(100);\n\t\t\t\tcircleprogressbar.setProgress(0);\n\t\t\t\tcircleprogressbar.setScrrenwidth(scrrenWidth);\n\n\n\t\t\t\tbtn1=(Button) view.findViewById(R.id.button1);\n\t\t\t\tbtn1.setOnClickListener(new View.OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t//startActivity(new Intent(MainActivity.this,Buyactivity1.class));\n\t\t\t\t\t\tif(null == jobject8 || \"\".equals(jobject8) || \"{}\".equals(jobject8) || \"[]\".equals(jobject8)){ \n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\tif(sp.getBoolean(\"islogin\", false)){\n\t\t\t\t\t\t\tif(isconect){\n\t\t\t\t\t\t\t\tIntent intent=new Intent(getActivity(),Buyactivity1.class);\n\t\t\t\t\t\t\t\tintent.putExtra(\"productname\", productname);\n\t\t\t\t\t\t\t\tintent.putExtra(\"beginmoney\", beginmoney);\n\t\t\t\t\t\t\t\tintent.putExtra(\"shouxufei\", shouxufei);\n\t\t\t\t\t\t\t\tintent.putExtra(\"yuqishouyi\", yuqishouyi+\"%\");\n\t\t\t\t\t\t\t\tintent.putExtra(\"licaiqixian\", licaiqixian);\n\t\t\t\t\t\t\t\tintent.putExtra(\"yuqishouyichanshengshijian\", yuqishouyichanshengshijian);\n\t\t\t\t\t\t\t\tintent.putExtra(\"productid\", productid);\n\t\t\t\t\t\t\t\tintent.putExtra(\"fengxiandengji\", fengxiandengji);\n\t\t\t\t\t\t\t\tintent.putExtra(\"iscouldbuy\", iscouldbuy);\n\t\t\t\t\t\t\t\tintent.putExtra(\"explan\", explan);\n\t\t\t\t\t\t\t\tintent.putExtra(\"iscouldedit\", iscouldedit);\n\t\t\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\t\t}else{}\n\n\n\t\t\t\t\t\t}else{\n\n\t\t\t\t\t\t\tstartActivity(new Intent(getActivity(),Loginactivity.class));\n\t\t\t\t\t\t}\n\n\n\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\trelativelayout.setOnClickListener(new View.OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t//Toast.makeText(getActivity(), \"321321321321\", 1000).show();\n\t\t\t\t\t\tIntent intent=new Intent(getActivity(),Productdetailactivity.class);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tintent.putExtra(\"productid\", jobject1.getString(\"Ipro_id\"));\n\t\t\t\t\t\t\tintent.putExtra(\"productname\", jobject1.getString(\"Ipro_name\"));\n\t\t\t\t\t\t\tintent.putExtra(\"buynum\",\"30天购买人数 \"+jobject1.getString(\"purchaseNum\"));\n\t\t\t\t\t\t\tintent.putExtra(\"day\", \"期限(天)\"+jobject1.getString(\"dayDiff\"));\n\t\t\t\t\t\t\tintent.putExtra(\"shouyi\", String.format(\"%.2f\", jobject1.getDouble(\"pctInterest\"))+\"%\");\n\t\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\t} catch (JSONException 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\t\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tread();\n\t\t\t\treturn view;\n\t\t\t}", "public PDFViewCtrl getPdfViewCtrl() {\n/* 136 */ return this.mPdfViewCtrl;\n/* */ }", "@Override\n public CharSequence getPageTitle(int page){\n return titles[page];\n }", "@Override\n public String getText(int page) {\n String text = null;\n switch (page) {\n case E19_ALLPAGES:\n text = E19AllPages();\n break;\n case E19_COVER:\n text = E19Cover();\n break;\n case E19_MAPPAGE:\n text = E19MapPage();\n break;\n case E19_BENCHMARKS:\n text = E19Benchmarks();\n break;\n case E19_GAGES:\n text = E19Gages();\n break;\n case E19_HISTORY:\n text = E19History();\n break;\n case E19_CRESTS:\n text = E19Crests();\n break;\n case E19_LOWWATER:\n text = E19LowWater();\n break;\n case E19_CONDITIONS:\n text = E19Conditions();\n break;\n case E19_DAMAGE:\n text = E19Damage();\n break;\n case E19_STAFFGAGE:\n text = E19StaffGage();\n break;\n case E19_CONTACTS:\n text = E19Contacts();\n break;\n }\n\n return text;\n }", "private JTextField buildDocumentPageNumbers() {\r\n final JTextField textField = new JTextField();\r\n textField.setInputVerifier(new PageNumberTextFieldInputVerifier());\r\n textField.addKeyListener(new PageNumberTextFieldKeyListener());\r\n textField.addFocusListener(new FocusAdapter() {\r\n public void focusLost(FocusEvent e) {\r\n Object src = e.getSource();\r\n if (src == null)\r\n return;\r\n if (src == textField) {\r\n String fieldValue = textField.getText();\r\n int currentValue = Integer.parseInt(fieldValue);\r\n int maxValue = controller.getDocument().getNumberOfPages();\r\n if (currentValue > maxValue)\r\n textField.setText(String.valueOf(maxValue));\r\n }\r\n }\r\n });\r\n // start off with page 1.\r\n textField.setText(\"1\");\r\n return textField;\r\n }", "public PDPage getPage()\n {\n return page;\n }", "TextView getTagView();", "private JTextPane getDetailPane() {\n if (detailPane == null) {\n detailPane = new JTextPane();\n detailPane.setFont(new Font(\"Monospaced\", Font.PLAIN, 14));\n }\n return detailPane;\n }", "java.lang.String getView();", "TextView getSubTitleView();", "@Override\n public String loadTextWidget() {\n /* Get the complete E19 text and display it. */\n String text = getText(E19_ALLPAGES);\n text = text.replace(\"null\", \"\");\n\n return text;\n }", "Page getPage(int index);", "public int getActualPageNumber() {\n try {\n return (int) this.webView.getEngine().executeScript(\"PDFViewerApplication.page;\");\n } catch (RuntimeException e) {\n e.printStackTrace();\n return 0;\n }\n }", "@Override\n\tpublic View getCurrView(View convertView) {\n\t\tif(curr_content!=null){\n\t\t\tconvertView=getPageView(convertView,curr_content);\n\t\t}\n\t\treturn convertView;\n\t}", "Page getPage();", "@Override\n protected void setPageHeading(TextView headingField) {\n }", "@Override\r\n public void onPageScrolled(int row, int column, float rowOffset,\r\n float columnOffset, int rowOffsetPixels,\r\n int columnOffsetPixels) {\n mPageIndicator.onPageScrolled(row, column, rowOffset,\r\n columnOffset, rowOffsetPixels, columnOffsetPixels);\r\n }", "public abstract SpannableString getText(long presentationTimeUs);", "String getStartpage();", "public JTextPane getTextPane(int a, int b) { return paneList[a%3][b%3].getPane();}", "int getCurrentPage();", "TextView getIconTipsView();", "@Nullable\n private String getTextByRange(@NotNull final RangeInfo rangeInfo) {\n\n if (rangeInfo.isTerminationRange()) {\n return null;\n }\n else {\n final String viewText = myView.getText();\n return viewText.substring(rangeInfo.getFrom(), rangeInfo.getTo());\n }\n }", "public static ProgressView getProgress(){\n\n progress = new ProgressView();\n\n return progress;\n }", "void onPageChanged(int position);", "protected String createText() {\r\n\t\t// Default text is 1 based.\r\n\t\tNumberFormat formatter = NumberFormat.getFormat(\"#,###\");\r\n\t\tHasRows display = getDisplay();\r\n\t\tRange range = display.getVisibleRange();\r\n\t\tint pageStart = range.getStart() /*+ 1*/;\r\n\t\tint pageSize = range.getLength();\r\n\t\tint dataSize = display.getRowCount();\r\n\t\tint endIndex = Math.min(dataSize, pageStart + pageSize /*- 1*/);\r\n\t\tendIndex = Math.max(pageStart, endIndex);\r\n\t\tif(endIndex==0)\r\n\t\t\tpageStart = 0;\r\n\t\telse\r\n\t\t\tpageStart = pageStart + 1;\r\n\t\tString text = formatter.format(pageStart) + \"-\"\r\n\t\t\t\t+ formatter.format(endIndex);\r\n\t\treturn text;\r\n\t}", "protected String getPageLeft()\n {\n return \"\";\n }", "@Override\r\n public CharSequence getPageTitle(int position) {\n\r\n return tabs[position];\r\n }", "private void m3173b() {\n ViewPager viewPager = (ViewPager) findViewById(R.id.viewpager);\n FixedIndicatorView fixedIndicatorView = (FixedIndicatorView) findViewById(R.id.indicator);\n C0597f.m819a(viewPager, 1000);\n this.f2478a = new IndicatorViewPager(fixedIndicatorView, viewPager);\n final OnClickListener c05551 = new C05551(this);\n this.f2479b = new IndicatorViewPagerAdapter(this) {\n /* renamed from: b */\n final /* synthetic */ IntroActivity f2304b;\n\n public int getCount() {\n return this.f2304b.f2485m.length;\n }\n\n public View getViewForTab(int i, View view, ViewGroup viewGroup) {\n return view == null ? this.f2304b.c.f1264l.inflate(R.layout.activity_intro_indicator_item, viewGroup, false) : view;\n }\n\n public View getViewForPage(int i, View view, ViewGroup viewGroup) {\n if (view == null) {\n view = this.f2304b.c.f1264l.inflate(R.layout.activity_intro_page_item_ko, viewGroup, false);\n viewGroup = new C1063b(view);\n view.setFocusable(false);\n view.setOnClickListener(c05551);\n view.setTag(viewGroup);\n } else {\n viewGroup = (C0556a) view.getTag();\n }\n ((C1063b) viewGroup).m2266a(this.f2304b.f2485m[i]);\n return view;\n }\n };\n this.f2478a.setAdapter(this.f2479b);\n this.f2478a.setOnIndicatorPageChangeListener(new C10623(this));\n }", "public CharSequence getCurrentPage() {\n return pages.get(currentIndex);\n }", "private void createIndicators() {\n this.removeAllViews();\n int n = this.mViewpager.getAdapter().getCount();\n if (n > 0) {\n int n2 = this.mViewpager.getCurrentItem();\n int n3 = this.getOrientation();\n for (int i = 0; i < n; ++i) {\n if (n2 == i) {\n this.addIndicator(n3, this.mIndicatorBackgroundResId, this.mImmediateAnimatorOut);\n continue;\n }\n this.addIndicator(n3, this.mIndicatorUnselectedBackgroundResId, this.mImmediateAnimatorIn);\n }\n }\n }", "@Override\n public void onGetNavigationText(int arg0, String arg1) {\n\n }", "@Override\n\tpublic View getPreView(View convertView) {\n\t\tif(pre_content!=null){\n\t\t\tconvertView=getPageView(convertView,pre_content);\n\t\t}\n\t\treturn convertView;\n\t}", "public int getPageIncrement() {\n \tcheckWidget();\n \treturn pageIncrement;\n }", "private JTextPane getJTextPane() {\r\n\t\tif (jTextPane == null) {\r\n\t\t\tjTextPane = new JTextPane();\r\n\t\t\tjTextPane.setBounds(new Rectangle(99, 41, 146, 54));\r\n\t\t\tjTextPane.setText(\"预览效果\");\r\n\t\t\tjTextPane.setEditable(false);\r\n\t\t\tif(color != null)\r\n\t\t\t\tsetTextColor(color);\r\n\t\t}\r\n\t\treturn jTextPane;\r\n\t}", "public int getCurrentPage();", "Point onPage();", "public String getWholePageText(Document pageDocument) {\n\t\treturn pageDocument.body().text();\n\t}", "public TextView getTextView(String text,int textsize){\n TextView textView=new TextView(context);\n textView.setTextColor(Color.parseColor(\"#000000\"));\n textView.setTextSize(textsize);\n textView.setGravity(Gravity.CENTER);\n textView.setText(text);\n textView.setLayoutParams(layoutParams);\n return textView;\n }", "@Override\r\n\tpublic void onGetNavigationText(int arg0, String arg1) {\n\r\n\t}", "private void addIndicator() {\n createIndicator(mCurrentAdapterSize);\n mViewPager.setCurrentItem(mViewPager.getAdapter().getCount() - 1);\n }", "PagingLink(int pageNumber) {\n setText(String.valueOf(pageNumber));\n }", "@Override\n\tpublic View getNextView(View convertView) {\n\t\t\n\t\tif(next_content!=null){\n\t\t\tconvertView=getPageView(convertView,next_content);\n\t\t}\n\t\treturn convertView;\n\t}", "private View getProgressView(final BottomSheetDialog dialog) {\n LayoutInflater inflater = LayoutInflater.from(context);\n View view = inflater.inflate(R.layout.dialog_progress, null, false);\n\n ImageButton imgBtnProgressClose = (ImageButton) view.findViewById(R.id.imgBtnProgressClose);\n RecyclerView recycleViewProgress = (RecyclerView) view.findViewById(R.id.recycleViewProgress);\n recycleViewProgress.setLayoutManager(new LinearLayoutManager(context));\n ProgressAdapter progressAdapter = new ProgressAdapter(context, progressHistory);\n recycleViewProgress.setAdapter(progressAdapter);\n\n imgBtnProgressClose.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n return view;\n }", "String getParagraph();", "private String getLine(final int index) {\n Element elem = TextUtils.getParagraphElement(document, index);\n if (elem == null) {\n return null;\n }\n int start = elem.getStartOffset();\n int length = elem.getEndOffset() - start;\n String result = null;\n try {\n result = document.getText(start, length);\n } catch (final BadLocationException e) {\n }\n return result;\n }", "protected TextView textView( final int childViewIndex )\n {\n return updater.textView( childViewIndex );\n }", "public String getViewText() {\n \t\treturn \"featured-partner-view_text_t\";\n \t}", "public Integer getCurrentPage();", "private TextView getIndividualHouseholdTextView(String content) {\n TextView textView = getTextView(content);\n TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT);\n layoutParams.weight = 1f;\n textView.setLayoutParams(layoutParams);\n textView.setPadding(160, 0, 0, 20);\n textView.setTextColor(getResources().getColor(R.color.ldstools_gray_light));\n return textView;\n }", "private TextView getPhoneTextView(String content) {\n TextView textView = getTextView(content);\n TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT, TableRow.LayoutParams.WRAP_CONTENT);\n layoutParams.weight = 20f;\n layoutParams.gravity = Gravity.CENTER_VERTICAL;\n Linkify.addLinks(textView, Linkify.PHONE_NUMBERS);\n textView.setLayoutParams(layoutParams);\n textView.setPadding(45, 30, 0, 0);\n textView.setCompoundDrawablesWithIntrinsicBounds(R.drawable.phone_blue, 0, 0, 0);\n textView.setCompoundDrawablePadding(30);\n return textView;\n }", "public TextView getCounterView() {\n return mCounterView;\n }", "public abstract String getView();", "@Override\n public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n\n }", "@Override\n\tpublic void onGetNavigationText(int arg0, String arg1) {\n\n\t}", "static int getPageNumber(String value){\n int pageNumber = 1;\n if(!TextUtils.isEmpty(value)){\n pageNumber = Integer.getInteger(value, pageNumber);\n }\n return pageNumber;\n }", "@Override\n public void onPageSelected(int arg0) {\n current = arg0;\n // title.setText(content[current]);\n\n //\tToast.makeText(LearningActivity.this, \"Current = \"+arg0, Toast.LENGTH_SHORT).show();\n\n }", "public AbstractView getPrimeView()\n {\n return m_MainWindow.getPrimeView();\n }", "private void updateUi() {\n int index = mCurrentPage.getIndex();\n int pageCount = mPdfRenderer.getPageCount();\n mButtonPrevious.setEnabled(0 != index);\n mButtonNext.setEnabled(index + 1 < pageCount);\n getActivity().setTitle(getString(R.string.app_name_with_index, index + 1, pageCount));\n }", "public String getText() {\n checkWidget();\n int length = OS.GetWindowTextLength(handle);\n if (length == 0)\n return \"\";\n TCHAR buffer = new TCHAR(getCodePage(), length + 1);\n OS.GetWindowText(handle, buffer, length + 1);\n return buffer.toString(0, length);\n }", "@Test\n public void testExtractTextFromPage()\n {\n PDFExtractor instance = new PDFExtractor();\n \n int page = 0;\n String expResult = page1;\n String result = instance.extractTextFromPage(pathToFile, page);\n \n assertEquals(expResult, result);\n \n page = 1;\n expResult = page2;\n result = instance.extractTextFromPage(pathToFile, page);\n assertEquals(expResult, result);\n }", "@TargetApi(Build.VERSION_CODES.LOLLIPOP)\n public PageIndicatorLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {\n super(context, attrs, defStyleAttr, defStyleRes);\n init();\n }", "public PDFPage getPage(int anIndex) { return _pages.get(anIndex); }", "PageAgent getPage();", "@Override\n public void onPageSelected(int arg0) {\n currentPosition = arg0;\n tv_count.setText((arg0 + 1) + \"/\" + imageBigs.size());\n\n }", "private void m22265Oj() {\n this.dLm = (LinearLayout) findViewById(R.id.dot_container);\n this.f3556yH = (ViewPager) findViewById(R.id.viewPager);\n azI();\n }", "public int getPage() {\n return page;\n }", "public int getPage() {\n return page;\n }", "public int getPage() {\n return page;\n }", "public int getPage() {\n return page;\n }", "protected String getPageNavigation()\n {\n return \"\";\n }", "public String getView();", "public String getView();", "protected abstract int getContentView();", "public void addDotsIndicator(int position){\n\n slider_dots = new TextView[3];\n dotLayout.removeAllViews();\n\n for(int i = 0; i < slider_dots.length; i++){\n slider_dots[i] = new TextView(this);\n slider_dots[i].setText(Html.fromHtml(\"&#8226;\"));\n slider_dots[i].setTextSize(35);\n slider_dots[i].setTextColor(getResources().getColor(R.color.colorTransparentWhite));\n\n dotLayout.addView(slider_dots[i]);\n }\n\n if(slider_dots.length > 0){\n slider_dots[position].setTextColor(getResources().getColor(R.color.colorWhite));\n }\n }", "@Override\n public void onPageScrolled(int position, float positionOffset,\n int positionOffsetPixels) {\n\n if (positionOffset > 0 && position < mTabIndicator.size() - 1) {\n ChangeColorIconWithTextView left = mTabIndicator.get(position);\n ChangeColorIconWithTextView right = mTabIndicator.get(position + 1);\n\n left.setIconAlpha(1 - positionOffset);\n right.setIconAlpha(positionOffset);\n }\n\n }", "@NotNull\n ProgressIndicator getProgressIndicator();", "@Override\r\n public void onPageScrolled(int arg0, float arg1, int arg2) {\n\r\n }", "public int getStartOffset(int childViewIndex);", "void noDataFoundTextView();", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n switch(event.getAction()){\n case MotionEvent.ACTION_DOWN:\n System.out.println(\"---action down-----\");\n dx=event.getX();\n dy=event.getY();\n // show.setText(\"起始位置为:\"+\"(\"+event.getX()+\" , \"+event.getY()+\")\");\n break;\n case MotionEvent.ACTION_MOVE:\n //System.out.println(\"---action move-----\");\n //show.setText(\"移动中坐标为:\"+\"(\"+event.getX()+\" , \"+event.getY()+\")\");\n break;\n case MotionEvent.ACTION_UP:\n System.out.println(\"---action up-----\");\n ux=event.getX();\n uy=event.getY();\n\n if(dx>readingText.getWidth()/2){//页面三等分,中间跳出设置 设置字体大小时应重新加载页面\n // Toast.makeText(MainActivity.this, \"next\", Toast.LENGTH_SHORT).show();\n readingText.setText(getNext());\n }\n else {\n readingText.setText(getPre());\n\n //加载上一页\n //Toast.makeText(MainActivity.this, \"pre\", Toast.LENGTH_SHORT).show();\n //show.setText(\"pre:\"+\"(\"+event.getX()+\" , \"+event.getY()+\")\");\n }\n break;\n // show.setText(\"最后位置为:\"+\"(\"+event.getX()+\" , \"+event.getY()+\")\");\n }\n return true;\n }", "@Override\n\tpublic void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n\n\t\tif (positionOffset > 0) {\n\t\t\tMain_bottom_change left = mTabIndicator.get(position);\n\t\t\tMain_bottom_change right = mTabIndicator.get(position + 1);\n\n\t\t\tleft.setIconAlpha(1 - positionOffset);\n\t\t\tright.setIconAlpha(positionOffset);\n\t\t}\n\n\t}", "@Override\n public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n\n }", "private TextView getTextView(String content) {\n TextView textView = new TextView(this.getContext());\n textView.setEms(30);\n textView.setTextColor(getResources().getColor(R.color.ldstools_black));\n if(content != null && !content.isEmpty()) {\n textView.setText(content);\n }\n return textView;\n }", "void onPDFViewVisibilityChanged(int prevVisibility, int currVisibility);", "public int getEndOffset(int childViewIndex);" ]
[ "0.6874185", "0.5909505", "0.5769969", "0.55137813", "0.54589725", "0.5437079", "0.53901476", "0.53325176", "0.5329514", "0.52740324", "0.5256961", "0.525664", "0.5250561", "0.5241829", "0.52234155", "0.5217567", "0.5214308", "0.5192259", "0.51840293", "0.51303774", "0.51240516", "0.51162404", "0.51135534", "0.51008016", "0.50872195", "0.50789726", "0.5076271", "0.5072816", "0.5072801", "0.5064925", "0.5016534", "0.5015627", "0.5009951", "0.49988228", "0.49982837", "0.49831522", "0.49817306", "0.49619114", "0.49486825", "0.49441227", "0.49381068", "0.49333188", "0.49302587", "0.49120733", "0.4911799", "0.4902292", "0.4902095", "0.49015042", "0.4898599", "0.48950925", "0.4891804", "0.48912492", "0.48870963", "0.488382", "0.48769152", "0.48754787", "0.4875424", "0.4867599", "0.48620477", "0.48612085", "0.48586363", "0.4853838", "0.4853276", "0.48521292", "0.4846026", "0.48418507", "0.48417503", "0.4838611", "0.48346353", "0.48317018", "0.48254177", "0.482468", "0.48183548", "0.4811812", "0.4807785", "0.4802427", "0.4801518", "0.47997293", "0.47992042", "0.47955143", "0.47950298", "0.47950298", "0.47950298", "0.47950298", "0.47932884", "0.4792249", "0.4792249", "0.47907138", "0.4784968", "0.47761226", "0.47736284", "0.4771349", "0.47699687", "0.47516122", "0.47504506", "0.47383943", "0.47355002", "0.47353885", "0.47264442", "0.47248438" ]
0.5957066
1
Gets the loading spinner
public ProgressBar getSpinner() { return mSpinner; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LoadingStatus getLoadingStatus() {\n return loadingStatus;\n }", "public int getLoadingStatus() {\n return loadingStatus;\n }", "public ImageIcon getLoadingIcon() {\n\t\ttry {\n\t\t\treturn new ImageIcon(Image.class.getResource(\"/qu/master/blockchain/gui//resources/loading.gif\"));\n\t\t}\n\t\t\n\t\tcatch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "String getLoadingMessage();", "private void loadSpinner() {\n // Chargement du spinner de la liste des widgets\n widgetAdapter = (WidgetAdapter) DomoUtils.createAdapter(context, VOCAL);\n spinnerWidgets.setAdapter(widgetAdapter);\n\n // Chargement du spinner Box\n BoxAdapter boxAdapter = (BoxAdapter) DomoUtils.createAdapter(context, BOX);\n spinnerBox.setAdapter(boxAdapter);\n }", "public JSpinner getSpinner() {\n\t\treturn spinner;\n\t}", "@NotNull\n ProgressIndicator getProgressIndicator();", "public static String getLoadingStatusMessage() {\n return loadingStatusMessage;\n }", "public void showLoading() {\n }", "private void setupLoadingBar()\n {\n ImageView loadingImgView = findViewById(R.id.loadingImgView);\n loadingText = findViewById(R.id.loadingTextView);\n loadingBar = findViewById(R.id.loadingBar);\n\n Glide.with(this)\n .load(R.drawable.loading_spinner)\n .centerCrop()\n .transition(withCrossFade())\n .into(loadingImgView);\n }", "private Dialog buildLoadingDialog() {\n ProgressDialog dialog = new ProgressDialog(this);\n dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n dialog.setMessage(getText(R.string.dialog_loading));\n dialog.setIndeterminate(true);\n dialog.setCancelable(false);\n return dialog;\n }", "String getSpinnerText();", "public int getLoadingStatus()\n/* */ {\n/* 119 */ return this.loadingStatus;\n/* */ }", "public void initSpinner() {\n }", "@Bindable\n public LoadingState getLoadingState() {\n return loadingState;\n }", "protected abstract String getLoadingMessage();", "public RemoteViews getLoadingView() {\n return null;\n }", "public RemoteViews getLoadingView() {\n return null;\n }", "@Override\n public Boolean isLoading() {\n return loadingInProgress;\n }", "private void spinnerStart() {\n this.cordova.getActivity().runOnUiThread(new Runnable() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass6 */\n\n public void run() {\n String string;\n SplashScreen.this.spinnerStop();\n ProgressDialog unused = SplashScreen.spinnerDialog = new ProgressDialog(SplashScreen.this.webView.getContext());\n SplashScreen.spinnerDialog.setOnCancelListener(new DialogInterface.OnCancelListener() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass6.AnonymousClass1 */\n\n public void onCancel(DialogInterface dialogInterface) {\n ProgressDialog unused = SplashScreen.spinnerDialog = null;\n }\n });\n SplashScreen.spinnerDialog.setCancelable(false);\n SplashScreen.spinnerDialog.setIndeterminate(true);\n RelativeLayout relativeLayout = new RelativeLayout(SplashScreen.this.cordova.getActivity());\n relativeLayout.setGravity(17);\n relativeLayout.setLayoutParams(new RelativeLayout.LayoutParams(-2, -2));\n ProgressBar progressBar = new ProgressBar(SplashScreen.this.webView.getContext());\n RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-2, -2);\n layoutParams.addRule(13, -1);\n progressBar.setLayoutParams(layoutParams);\n if (Build.VERSION.SDK_INT >= 21 && (string = SplashScreen.this.preferences.getString(\"SplashScreenSpinnerColor\", null)) != null) {\n int parseColor = Color.parseColor(string);\n progressBar.setIndeterminateTintList(new ColorStateList(new int[][]{new int[]{16842910}, new int[]{-16842910}, new int[]{-16842912}, new int[]{16842919}}, new int[]{parseColor, parseColor, parseColor, parseColor}));\n }\n relativeLayout.addView(progressBar);\n SplashScreen.spinnerDialog.getWindow().clearFlags(2);\n SplashScreen.spinnerDialog.getWindow().setBackgroundDrawable(new ColorDrawable(0));\n SplashScreen.spinnerDialog.show();\n SplashScreen.spinnerDialog.setContentView(relativeLayout);\n }\n });\n }", "public boolean isBusyLoading() {\n\t\treturn false; // return (AppStatusLine.isBusyLoading());\n\t}", "public boolean isLoading() {\n return mIsLoading;\n }", "protected void showLoading()\n {\n progressBar = new ProgressDialog(this);\n progressBar.setTitle(\"Loading\");\n progressBar.setMessage(\"Wait while loading...\");\n progressBar.setCancelable(false); // disable dismiss by tapping outside of the dialog\n progressBar.show();\n }", "public ProgressIndicator getProgressIndicator() {\n return progressIndicator;\n }", "void showLoading(boolean isLoading);", "private void showLoading() {\n hideNoNetwork();\n mRecipesBinding.fragmentRecipesProgressBar.setVisibility(View.VISIBLE);\n }", "public final void showLoadingIndicator(boolean z) {\n if (z) {\n ProgressBar progressBar = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLoadingAuctionSaleList);\n Intrinsics.checkExpressionValueIsNotNull(progressBar, \"pbLoadingAuctionSaleList\");\n progressBar.setVisibility(0);\n return;\n }\n ProgressBar progressBar2 = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLoadingAuctionSaleList);\n Intrinsics.checkExpressionValueIsNotNull(progressBar2, \"pbLoadingAuctionSaleList\");\n progressBar2.setVisibility(8);\n }", "public boolean waitLoading() {\n\t\t\treturn waitLoading;\n\t\t}", "@Override\r\n\tpublic void showLoading(boolean isLoading) {\r\n\t\tsetSupportProgressBarIndeterminateVisibility(isLoading);\r\n\t}", "@Override\n protected void onStartLoading() {\n progressBar.setVisibility(View.VISIBLE);\n forceLoad();\n }", "private void displayLoader() {\n pDialog = new ProgressDialog(DangKyActivity.this);\n pDialog.setMessage(\"Vui lòng đợi trong giây lát...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "@Override\n\tpublic RemoteViews getLoadingView() {\n\t\treturn null;\n\t}", "public String getLoaded() {\n if (isLoaded) {\n return ui.showLoaded();\n } else {\n return ui.showLoadingError();\n }\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tloadingView.setVisibility(View.VISIBLE);\n\t\t}", "private SpinnerModel geSpinnerModel(){\n return new SpinnerNumberModel(0, 0, null, 1);\n }", "private void displayLoader() {\n pDialog = new ProgressDialog(AddReviewActivity.this);\n pDialog.setMessage(\"Adding Review...Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "private void showLoading()\n {\n relLoadingPanel.setVisibility(View.VISIBLE);\n ViewHelper.setViewGroupEnabled(scrMainContainer, false);\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n mLoadingIndicator.setVisibility(View.VISIBLE);\n }", "@Override\n protected void onStartLoading() {\n super.onStartLoading();\n\n mLoadingIndicator.setVisibility(View.VISIBLE);\n\n forceLoad();\n }", "protected final void showLoadingDialog() {\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tshowLoadingProgressDialog();\n\t\t}", "@Override\n protected void onPreExecute() {\n showLoadingProgressDialog();\n }", "@Override\n protected void onPreExecute() {\n showLoadingProgressDialog();\n }", "private void showLoading() {\n mRecycleView.setVisibility(View.INVISIBLE);\n /* Finally, show the loading indicator */\n mLoadingIndicator.setVisibility(View.VISIBLE);\n }", "public void initProgressLoader() {\n progressDialog = new ProgressDialog(this);\n progressDialog.setIndeterminate(true);\n progressDialog.setCancelable(false);\n }", "@Override\n public void setLoadingIndicator(boolean active) {\n\n if (active) {\n mBusyIndicator.setVisibility(View.VISIBLE);\n } else {\n mBusyIndicator.setVisibility(View.GONE);\n }\n }", "void showLoading(boolean visible);", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n settLoadingScr.setVisibility(View.VISIBLE);\n\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n settLoadingScr.setVisibility(View.VISIBLE);\n\n }", "public final void showLoadingIndicator(boolean z) {\n if (z) {\n ProgressBar progressBar = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLogin);\n if (progressBar != null) {\n progressBar.setVisibility(0);\n return;\n }\n return;\n }\n ProgressBar progressBar2 = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLogin);\n if (progressBar2 != null) {\n progressBar2.setVisibility(8);\n }\n }", "public void loadSpinner(){\n selectedProjectPrefs = mainActivity.getSharedPreferences(\n \"selectedProjectName\", mainActivity.MODE_PRIVATE);\n selectedProjectName = selectedProjectPrefs.getString(\"selectedProjectName\", \"\");\n\n projectListPrefs = mainActivity.getSharedPreferences(\n \"projectList\", mainActivity.MODE_PRIVATE);\n if (!projectListPrefs.contains(\"projectList\"))\n {\n addProject();\n }\n HashSet<String> defaultSet = new HashSet<>();\n projectList = new ArrayList<>(projectListPrefs.getStringSet(\"projectList\", defaultSet));\n\n Spinner projectsSpinner = mainActivity.findViewById(R.id.projects_spinner);\n ArrayAdapter<String> projectsArrayAdapter = new ArrayAdapter<>(\n this.mainActivity, android.R.layout.simple_spinner_item, projectList);\n projectsArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n projectsSpinner.setAdapter(projectsArrayAdapter);\n projectsSpinner.setSelection(projectsArrayAdapter.getPosition(selectedProjectName));\n }", "protected void setStatusSpinner() {\r\n\t\tSpinner spinner = (Spinner) mActionBar.getCustomView().findViewById(\r\n\t\t\t\tR.id.spinner_status);\r\n\t\tif (!mShowStatusFilter\r\n\t\t\t\t|| mArchiveFragmentStatePagerAdapter.getCount() == 0) {\r\n\t\t\tspinner.setVisibility(View.GONE);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Determine which statuses are actually used for the currently\r\n\t\t// selected size filter.\r\n\t\tGridDatabaseAdapter gridDatabaseAdapter = new GridDatabaseAdapter();\r\n\t\tfinal StatusFilter[] usedStatuses = gridDatabaseAdapter\r\n\t\t\t\t.getUsedStatuses(mArchiveFragmentStatePagerAdapter\r\n\t\t\t\t\t\t.getSizeFilter());\r\n\r\n\t\t// Load the list of descriptions for statuses actually used into the\r\n\t\t// array adapter.\r\n\t\tString[] usedStatusesDescription = new String[usedStatuses.length];\r\n\t\tfor (int i = 0; i < usedStatuses.length; i++) {\r\n\t\t\tusedStatusesDescription[i] = getResources().getStringArray(\r\n\t\t\t\t\tR.array.archive_status_filter)[usedStatuses[i].ordinal()];\r\n\t\t}\r\n\t\tArrayAdapter<String> adapterStatus = new ArrayAdapter<String>(this,\r\n\t\t\t\tandroid.R.layout.simple_spinner_item, usedStatusesDescription);\r\n\t\tadapterStatus\r\n\t\t\t\t.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\r\n\r\n\t\t// Build the spinner\r\n\t\tspinner.setAdapter(adapterStatus);\r\n\r\n\t\t// Restore selected status\r\n\t\tStatusFilter selectedStatusFilter = mArchiveFragmentStatePagerAdapter\r\n\t\t\t\t.getStatusFilter();\r\n\t\tfor (int i = 0; i < usedStatuses.length; i++) {\r\n\t\t\tif (usedStatuses[i] == selectedStatusFilter) {\r\n\t\t\t\tspinner.setSelection(i);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Hide spinner if only two choices are available. As one of those\r\n\t\t// choices is always \"ALL\" the choices will result in an identical\r\n\t\t// selection.\r\n\t\tspinner.setVisibility((usedStatuses.length <= 2 ? View.GONE\r\n\t\t\t\t: View.VISIBLE));\r\n\r\n\t\tspinner.setOnItemSelectedListener(new OnItemSelectedListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\r\n\t\t\t\t\tint position, long id) {\r\n\t\t\t\t// Get the selected status\r\n\t\t\t\tStatusFilter statusFilter = usedStatuses[(int) id];\r\n\r\n\t\t\t\t// Check if value for status spinner has changed.\r\n\t\t\t\tif (statusFilter != mArchiveFragmentStatePagerAdapter\r\n\t\t\t\t\t\t.getStatusFilter()) {\r\n\t\t\t\t\t// Remember currently displayed grid id.\r\n\t\t\t\t\tint gridId = getCurrentSelectedGridId();\r\n\r\n\t\t\t\t\t// Refresh pager adapter with new status.\r\n\t\t\t\t\tmArchiveFragmentStatePagerAdapter\r\n\t\t\t\t\t\t\t.setStatusFilter(statusFilter);\r\n\r\n\t\t\t\t\t// Refresh the size spinner as the content of the spinners\r\n\t\t\t\t\t// are related.\r\n\t\t\t\t\tsetSizeSpinner();\r\n\r\n\t\t\t\t\t// If possible select the grid id which was selected before\r\n\t\t\t\t\t// changing the spinner(s). Otherwise select last page.\r\n\t\t\t\t\tselectGridId(gridId);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\r\n\t\t\t\t// Do nothing\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public Spinner getSpinnerControl(Composite parent) {\n\t\tif (spinner == null) {\n\t\t\tspinner = new Spinner(parent, SWT.SINGLE | SWT.BORDER);\n\t\t\tspinner.setFont(parent.getFont());\n\t\t\tspinner.setIncrement(INCREMENT_VALUE);\n\t\t\tspinner.setMinimum(MIN_VALUE);\n\t\t\tspinner.setMaximum(MAX_VALUE);\n\t\t\tspinner.setSelection(START_VALUE);\n\t\t} else {\n\t\t\tcheckParent(spinner, parent);\n\t\t}\n\t\treturn spinner;\n\t}", "public final void showLoadingIndicator(boolean z) {\n if (z) {\n ProgressBar progressBar = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbReviewPayment);\n Intrinsics.checkExpressionValueIsNotNull(progressBar, \"pbReviewPayment\");\n progressBar.setVisibility(0);\n return;\n }\n ProgressBar progressBar2 = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbReviewPayment);\n Intrinsics.checkExpressionValueIsNotNull(progressBar2, \"pbReviewPayment\");\n progressBar2.setVisibility(8);\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tloadingAlert.show();\n\t\t}", "@Override\r\n\t\tprotected void onPreExecute() {\r\n\t\t\tsuper.onPreExecute();\r\n\t\t\tshowLoading();\r\n\t\t}", "private void displayLoader() {\n pDialog = new ProgressDialog(RegisterActivity.this);\n pDialog.setMessage(\"Signing Up.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "public JPanel getPanel()\r\n\t {\r\n\t JPanel result = new JPanel();\r\n\t spinner = new JSpinner();\r\n\t spinner.setPreferredSize(new Dimension(50, 50));\r\n\t spinner.setAlignmentY(1.5F);\r\n\t result.add(spinner);\r\n\t return result;\r\n\t }", "@Override\n public void onLoadFinished(Loader<StockPicking> loader, StockPicking stockPicking) {\n View loadingIndicator = findViewById(R.id.loading_spinner);\n loadingIndicator.setVisibility(View.GONE);\n\n // Keep data as this class attributes and update view\n mStockPicking = stockPicking;\n displayUpdate(stockPicking);\n getLoaderManager().destroyLoader(FETCH_STOCK_PICKING_LOADER_ID);\n }", "public void showLoading() {\n loadingLayout.setVisibility(View.VISIBLE);\n mapView.setVisibility(View.GONE);\n errorLayout.setVisibility(View.GONE);\n }", "public void setLoadingMessage(String loadingMessage);", "private static Widget getLoadingMessage(String msg){\n HorizontalPanel hp = new HorizontalPanel();\n\n\n if(msg == null || msg.isEmpty()){\n hp.add(new Image(DisclosureImages.INSTANCE.getLoadingImage()));\n hp.add(new HTMLPanel(\"Please wait while the data for selection is retrieved...\"));\n }else{\n hp.add(new Image(ReactomeImages.INSTANCE.exclamation()));\n hp.add(new HTMLPanel(msg));\n }\n\n hp.setSpacing(5);\n\n return hp;\n }", "@Override\n public void showLoading() {\n setRefresh(true);\n }", "public Loader getLoader() {\n\t\treturn loader;\n\t}", "private JSpinner getRadialBufferSpinner() {\n\t\tif (radialBufferSpinner == null) {\n\t\t\tInteger one = new Integer(1);\n\t\t\tInteger two = new Integer(2);\n\t\t\tInteger three = new Integer(3);\n\t\t\tSpinnerListModel listModel = new SpinnerListModel(new Integer[] {\n\t\t\t\t\tone, two, three });\n\t\t\tradialBufferSpinner = new JSpinner(listModel);\n\t\t\tradialBufferSpinner.setBounds(new java.awt.Rectangle(298, 3, 137,\n\t\t\t\t\t19));\n\n\t\t\t// Disable keyboard edits in the spinner\n\t\t\tJFormattedTextField tf = ((JSpinner.DefaultEditor) radialBufferSpinner\n\t\t\t\t\t.getEditor()).getTextField();\n\t\t\ttf.setEditable(false);\n\t\t\ttf.setBackground(Color.white);\n\t\t}\n\t\treturn radialBufferSpinner;\n\t}", "@Override\n protected void onPreExecute()\n {\n // Create a new progress dialog\n progressDialog = new ProgressDialog(MainActivity.this);\n // Set the progress dialog spinner progress bar\n progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n // Set the dialog title to 'Loading...'\n progressDialog.setTitle(\"Loading...\");\n // Set the dialog message to 'Loading application View, please wait...'\n progressDialog.setMessage(\"Loading application, please wait...\");\n // This dialog can't be canceled by pressing the back key\n progressDialog.setCancelable(false);\n // This dialog isn't indeterminate\n progressDialog.setIndeterminate(false);\n // The maximum number of items is 100\n progressDialog.setMax(100);\n // Set the current progress to zero\n progressDialog.setProgress(0);\n // Display the progress dialog\n progressDialog.show();\n }", "void setLoading(boolean isLoading);", "public interface ILoadingView {\n\n /**\n * The loading message which will be shown on the loading view.\n *\n * @return Loading message/text\n */\n String getLoadingMessage();\n}", "@Override\n public void hideLoading() {\n if (progressDialog!=null && progressDialog.isShowing()){\n progressDialog.dismiss();\n }\n }", "void showMainLoadingWheel();", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pd = new ProgressDialog(activity);\n pd.setMessage(\"Loading, Please Wait.....\");\n pd.setCancelable(false);\n pd.show();\n }", "void onLoaderLoading();", "@Override\n public void showLoading() {\n Log.i(Tag, \"showLoading\");\n }", "protected void showLoader() {\n if (progressBar != null) {\n progressBar.setVisibility(View.VISIBLE);\n }\n if(getActivity()!=null) {\n getActivity().getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,\n WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n }\n }", "@Override\n\t\tprotected void onPreExecute()\n\t\t{\n\t\t\t//Initialize the ViewSwitcher object\n\t viewSwitcher = new ViewSwitcher(LoadingScreenActivity.this);\n\t \n\t\t\tviewSwitcher.addView(ViewSwitcher.inflate(LoadingScreenActivity.this, R.layout.loadingscreen, null));\n\n\t\t\tpb_progressBar = (ProgressBar) viewSwitcher.findViewById(R.id.progressBar1);\n\t\t\t\n\t\t\tpb_progressBar.setMax(100);\n\n\t\t\tsetContentView(viewSwitcher);\n\t\t}", "private void loadSpinnerFromDB(){\n\n try {\n MyDBHandler dbHandler = new MyDBHandler(this);\n servicesFromSP.clear();\n ArrayList<String> myServices = new ArrayList<String>();\n\n servicesFromSP.addAll(dbHandler.getAllServiceTypeOfServiceProvider(companyID));\n\n for(ServiceType serviceType: servicesFromSP)\n myServices.add(serviceType.getServiceName() + \" / \" + serviceType.getHourlyRate() + \" $/H\");\n\n if(myServices.size()==0)\n Toast.makeText(this,\"Cannot load the DB or DB empty\",Toast.LENGTH_LONG).show();\n if (myServices.size()>0) {\n ArrayAdapter<String> data = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, myServices);\n data.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spin_service.setAdapter(data);\n }\n\n\n }catch(Exception ex){\n Toast.makeText(this,ex.getMessage(),Toast.LENGTH_LONG).show();\n }\n }", "private void getTaskSpinner() {\n\n StringRequest stringRequest = new StringRequest(\"https://cardtest10.000webhostapp.com/Sync_Spinner_T.php\", new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n\n try{\n\n JSONObject jsonResponse = new JSONObject(response);\n JSONArray jsonArraytask = jsonResponse.getJSONArray(\"task\");\n\n for(int i=0; i < jsonArraytask.length(); i++)\n {\n JSONObject jsonObjecttask = jsonArraytask.getJSONObject(i);\n String task = jsonObjecttask.optString(\"Type\");\n arrayTask.add(task);\n }\n\n }catch (JSONException e){\n e.printStackTrace();\n }\n\n // Applying the adapter to our spinner\n spTaskType.setAdapter(new ArrayAdapter <>(UserAreaActivity.this, android.R.layout.simple_spinner_dropdown_item, arrayTask));\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(UserAreaActivity.this, error + \"\", Toast.LENGTH_SHORT).show();\n }\n });\n\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n requestQueue.add(stringRequest);\n\n }", "@Override\n protected void onPreExecute() {\n loading = new LoadingController();\n // Show a progress spinner\n loading.showProgress(UserEditActivity.this, viewLoading, true);\n }", "@Override\n protected void onPreExecute() {\n loading = new LoadingController();\n // Show a progress spinner\n loading.showProgress(UserEditActivity.this, viewLoading, true);\n }", "private DmtLoadingLayout m31632b() {\n DmtLoadingLayout dmtLoadingLayout = new DmtLoadingLayout(this.f29078a);\n dmtLoadingLayout.setLayoutParams(new LayoutParams(-1, -1));\n return dmtLoadingLayout;\n }", "private void createSpinners() {\n\t\tsuper.addSpinner(myResources.getString(\"FishReproduce\"));\n\t\tsuper.addSpinner(myResources.getString(\"SharkDeath\"));\n\t\tsuper.addSpinner(myResources.getString(\"SharkReproduce\"));\n\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progressDialog.setMessage(\"Please wait. Loading...\");\n progressDialog.setCanceledOnTouchOutside(false);\n progressDialog.show();\n }", "public static native Record getLoadingMarker() /*-{\r\n var recordJS = $wnd.isc.ResultSet.getLoadingMarker();\r\n return @com.smartgwt.client.core.RefDataClass::getRef(Lcom/google/gwt/core/client/JavaScriptObject;)(recordJS);\r\n }-*/;", "private void showLoadingDialog() {\n mDefaultLoadingDialogFragment = new DefaultLoadingDialogFragment();\n mDefaultLoadingDialogFragment.show(getChildFragmentManager(), \"loadingDialog\");\n }", "private void cargarSpinner() {\n\n admin = new AdminSQLiteOpenHelper(this, \"activo_fijo\", null, 1);\n BaseDeDatos = admin.getReadableDatabase();\n\n List<String> opciones = new ArrayList<String>();\n opciones.add(\"Selecciona una opción\");\n\n String selectQuery = \"SELECT * FROM sucursales\" ;\n Cursor cursor = BaseDeDatos.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n // adding to tags list\n opciones.add(cursor.getString(cursor.getColumnIndex(\"local\")));\n } while (cursor.moveToNext());\n }\n\n BaseDeDatos.close();\n\n //spiner personalizado\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, opciones);\n spinner.setAdapter(adapter);\n\n }", "public void setLoadingStatus(LoadingStatus loadingStatus) {\n this.loadingStatus = loadingStatus;\n }", "@Override\n protected void onStartLoading() {\n if (idlingResource != null) {\n idlingResource.setIdleState(false);\n }\n\n if (recepts != null) {\n deliverResult(recepts);\n } else {\n mLoadingIndicator.setVisibility(View.VISIBLE);\n forceLoad();\n }\n }", "public void startLoading() {\n projects.clear();\n processContainer.setVisibility(View.VISIBLE);\n progressSpinner.setVisibility(View.VISIBLE);\n progressText.setVisibility(View.VISIBLE);\n progressText.setText(\"Getting Items...\"); // Text updated using SetProgress()\n listView.setVisibility(View.GONE);\n }", "public void setLoading(boolean loading) {\n this.loading = loading;\n }", "public void showLoadingView() {\n handleLoadingContainer(false /* showContent */, false /* showEmpty */, false /* animate */);\n }", "public Object getValue() {\n return spinner.getValue();\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pDialog = new ProgressDialog(Integrationforkhalti.this);\n pDialog.setMessage(\"Loading Please wait...\");\n pDialog.setIndeterminate(true);\n pDialog.setCancelable(false);\n pDialog.show();\n }", "@Override\r\n\t\t\t\tpublic void onLoadStarted(PhotoView container,\r\n\t\t\t\t\t\tString uri, BitmapDisplayConfig config) {\n\t\t\t\t\tspinner.setVisibility(View.VISIBLE);\r\n\t\t\t\t\tsuper.onLoadStarted(container, uri, config);\r\n\t\t\t\t}", "private void showLoadingDialogue(final String loadingMessage) {\n progressDialog.setMessage(loadingMessage);\n progressDialog.setCancelable(false);\n progressDialog.setIndeterminate(false);\n progressDialog.show();\n }", "public String getText() {\n\t\treturn loadingInfo.getInnerText();\n\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tpDialog = new ProgressDialog(activity);\n\t\t\tpDialog.setMessage(\"Loading...\");\n\t\t\tpDialog.setIndeterminate(false);\n\t\t\tpDialog.setCancelable(true);\n\t\t\tpDialog.show();\n\t\t}", "private void setLoadingDisplay() {\n if (swipeRefreshing) {\n footer.clear();\n setRefreshing(true);\n } else if (loading) {\n footer.setLoading();\n }\n }", "private void loadSpinnerData() {\n List<String> patientList = db.getAllPatient();\n\n // Creating adapter for spinner\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item, patientList);\n\n // Drop down layout style - list view with radio button\n dataAdapter\n .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // attaching data adapter to spinner\n patientIdSpn.setAdapter(dataAdapter);\n }", "protected void onPreExecute() {\r\n \tdialog = new ProgressDialog(context);\r\n \t\tdialog.setMessage(\"Loading...\");\r\n \t\tdialog.show();\r\n }", "private void progressStuff() {\n cd = new ConnectionDetector(getActivity());\n parser = new JSONParser();\n progress = new ProgressDialog(getActivity());\n progress.setMessage(getResources().getString(R.string.loading));\n progress.setIndeterminate(false);\n progress.setCancelable(true);\n // progress.show();\n }" ]
[ "0.7048059", "0.69482386", "0.6926723", "0.69063616", "0.68899393", "0.68442893", "0.6757717", "0.6635325", "0.6598687", "0.65766597", "0.65573263", "0.6505976", "0.6502662", "0.64828223", "0.644524", "0.6408703", "0.6403608", "0.6403608", "0.6364775", "0.6354566", "0.6297625", "0.62921494", "0.62418777", "0.62361324", "0.62155557", "0.62149864", "0.6198947", "0.61904293", "0.6183908", "0.61746585", "0.61363596", "0.61348844", "0.61344725", "0.61070085", "0.60605824", "0.60340685", "0.60285896", "0.5971059", "0.59684926", "0.5958183", "0.5957831", "0.59238416", "0.59238416", "0.5923551", "0.59195954", "0.5908632", "0.5904623", "0.5894915", "0.5894915", "0.58898467", "0.58712184", "0.58417445", "0.58354944", "0.58246887", "0.58199376", "0.57850873", "0.5782451", "0.5781856", "0.5765959", "0.5747918", "0.5744125", "0.57385963", "0.5736242", "0.5733018", "0.5732755", "0.57077974", "0.5694896", "0.56883454", "0.56810546", "0.5680372", "0.5679411", "0.56748563", "0.56646997", "0.56646913", "0.56602937", "0.5651634", "0.5648442", "0.56343955", "0.56343955", "0.56248057", "0.5623874", "0.56203705", "0.5614133", "0.5609122", "0.5608902", "0.560648", "0.560615", "0.56045777", "0.56035626", "0.5599667", "0.5597202", "0.55949444", "0.55871475", "0.55732936", "0.5564507", "0.55642754", "0.55623865", "0.55604565", "0.5535931", "0.55306995" ]
0.74734044
0
Sets whether to auto adjust position when there is layout changes
public void setAutoAdjustPosition(boolean autoAdjust) { mAutoAdjustPosition = autoAdjust; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAutoPosition(boolean autoPosition);", "public void setAutoLayout(boolean autoLayout)\n\t{\n\t\tthis.autoLayout = autoLayout;\n\t}", "void reconfigure() {\n computePosition(_primaryPlot.getScreenCoords(findCurrentCenterPoint()), false);\n }", "public void onSetLayoutDirection() {\n }", "@Override\n\tprotected void onLayout(boolean changed, int l, int t, int r, int b) {\n\t\tsuper.onLayout(changed, l, t, r, b);\n\t\tif(changed){\n\t\t\tthis.scrollTo(0, 0);\n\t\t}\n\t}", "private void updatePosition(){\n updateXPosition(true);\n updateYPosition(true);\n }", "public boolean isAutoPosition();", "public void setLayoutNeeded() {\n if (WindowManagerDebugConfig.DEBUG_LAYOUT) {\n Slog.w(TAG, \"setLayoutNeeded: callers=\" + Debug.getCallers(3));\n }\n this.mLayoutNeeded = true;\n }", "private void setLayout() {\n if (!mImageFragment.isAdded()) {\n mNameFrameLayout.setLayoutParams(new LinearLayout.LayoutParams(\n MATCH_PARENT, MATCH_PARENT));\n mImageFrameLayout.setLayoutParams(new LinearLayout.LayoutParams(0,\n MATCH_PARENT));\n } else {\n if (getResources().getConfiguration().orientation\n == Configuration.ORIENTATION_LANDSCAPE){\n mNameFrameLayout.setLayoutParams(new LinearLayout.LayoutParams(0,\n MATCH_PARENT, 1f));\n mImageFrameLayout.setLayoutParams(new LinearLayout.LayoutParams(0,\n MATCH_PARENT, 2f));\n }\n\n else {\n mNameFrameLayout.setLayoutParams(new LinearLayout.LayoutParams(0,\n MATCH_PARENT));\n mImageFrameLayout.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT,\n MATCH_PARENT));\n }\n }\n }", "public boolean isAutoLayout()\n\t{\n\t\treturn autoLayout;\n\t}", "@Override\n protected void onLayout(boolean changed, int l, int t, int r, int b) {\n }", "public void setAutosizing(String aValue) { setLayoutInfo(aValue); }", "@Override\n protected void onLayout(boolean changed, int left, int top, int right, int bottom) {\n\n this.center_point.set(this.getMeasuredWidth() / 2, this.getMeasuredHeight() / 2);\n\n if (this.getMeasuredWidth() > this.getMeasuredHeight()) {\n this.wheel_radius = (this.getMeasuredWidth() / 2) - this.puck_edge_overlap - 2;\n } else {\n this.wheel_radius = (this.getMeasuredHeight() / 2) - this.puck_edge_overlap - 2;\n }\n\n //Check that the puck and wheel are within reasonable limits\n this.wheel_radius = (this.wheel_radius < 3) ? 3 : this.wheel_radius;\n this.puck_radius = (this.puck_radius < this.wheel_radius) ? this.puck_radius : (this.wheel_radius / 3);\n\n this.wheel.setRadius(this.wheel_radius);\n this.setPuckRadius(this.puck_radius);\n\n this.wheel.setPosition(this.center_point);\n this.puck.setPosition(this.center_point);\n DriveControl.INSTANCE.setJoyStickPadSize(this.wheel.getBounds().width(), this.wheel.getBounds().height());\n }", "private void setLayout() {\n if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {\n recyclerView.setLayoutManager(new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL));\n\n } else if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {\n recyclerView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));\n }\n }", "private void componentPositionAdjustment() {\n // set the y position of each element\n AnchorPane.setTopAnchor(nameLabel, 30.0);\n AnchorPane.setTopAnchor(name, 30.0);\n AnchorPane.setTopAnchor(fiberLabel, 70.0);\n AnchorPane.setTopAnchor(proteinLabel, 110.0);\n AnchorPane.setTopAnchor(fatLabel, 150.0);\n AnchorPane.setTopAnchor(caloriesLabel, 190.0);\n AnchorPane.setTopAnchor(carbohydrateLabel, 230.0);\n AnchorPane.setTopAnchor(fiber, 70.0);\n AnchorPane.setTopAnchor(calories, 190.0);\n AnchorPane.setTopAnchor(fat, 150.0);\n AnchorPane.setTopAnchor(carbohydrate, 230.0);\n AnchorPane.setTopAnchor(protein, 110.0);\n AnchorPane.setTopAnchor(id, 270.0);\n AnchorPane.setTopAnchor(idLabel, 270.0);\n AnchorPane.setTopAnchor(confirm, 310.0);\n AnchorPane.setTopAnchor(cancel, 310.0);\n // set the x position of each element\n AnchorPane.setLeftAnchor(fiberLabel, 20.0);\n AnchorPane.setLeftAnchor(proteinLabel, 20.0);\n AnchorPane.setLeftAnchor(fatLabel, 20.0);\n AnchorPane.setLeftAnchor(caloriesLabel, 20.0);\n AnchorPane.setLeftAnchor(carbohydrateLabel, 20.0);\n AnchorPane.setLeftAnchor(nameLabel, 20.0);\n AnchorPane.setLeftAnchor(idLabel, 20.0);\n AnchorPane.setLeftAnchor(name, 120.0);\n AnchorPane.setLeftAnchor(fiber, 120.0);\n AnchorPane.setLeftAnchor(calories, 120.0);\n AnchorPane.setLeftAnchor(fat, 120.0);\n AnchorPane.setLeftAnchor(id, 120.0);\n AnchorPane.setLeftAnchor(carbohydrate, 120.0);\n AnchorPane.setLeftAnchor(protein, 120.0);\n AnchorPane.setLeftAnchor(confirm, 50.0);\n AnchorPane.setLeftAnchor(cancel, 200.0);\n }", "void updatePosition() {\n if (gameScreen.cursorIsOnLeft()) \n {\n // set the panel's rightmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 11/12 - getWidth(), \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n else // Otherwise the cursor must be on the right half of the screen\n {\n // set the panel's leftmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 1/12, \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n }", "private void adjustSubviewPositions()\n\t{\n\t\tif (mAdapter == null)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (mDataChanged)\n\t\t{\n\t\t\tint oldCurrentX = mCurrentX;\n\t\t\tinitView();\n\t\t\tremoveAllViewsInLayout();\n\t\t\tmNextX = oldCurrentX;\n\t\t\tmDataChanged = false;\n\t\t}\n\n\t\tif (mScroller.computeScrollOffset())\n\t\t{\n\t\t\tint scrollx = mScroller.getCurrX();\n\t\t\tmNextX = scrollx;\n\t\t}\n\n\t\tif (mNextX <=mMinX && !mCircleScrolling)\n\t\t{\n\t\t\tmNextX = mMinX;\n\t\t\tmScroller.forceFinished(true);\n\t\t\tif (mAdjustAnimation!=null)\n\t\t\t{\n\t\t\t\tmAdjustAnimation.stop();\n\t\t\t}\n\t\t}\n\t\tif (mNextX >= mMaxX && !mCircleScrolling)\n\t\t{\n\t\t\tmNextX = mMaxX;\n\t\t\tmScroller.forceFinished(true);\n\t\t\tif (mAdjustAnimation!=null)\n\t\t\t{\n\t\t\t\tmAdjustAnimation.stop();\n\t\t\t}\n\t\t}\n\n\t\tint dx = mCurrentX - mNextX;\n\n\t\t\n\t\tremoveNonVisibleItems(dx);\n\t\tfillList(dx);\n\t\tpositionItems(dx);\n\t\t\n\t\tmCurrentX = mNextX;\n\n\t\tif (!mScroller.isFinished())\n\t\t{\n\t\t\tpost(new Runnable()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\tadjustSubviewPositions();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (mFlinging)\n\t\t\t{\n\t\t\t\tscrollerFinished();\n\t\t\t}\n\t\t\tmFlinging = false;\n\t\t}\n\t\tinvalidate();\n\t}", "private void autoAdjustArrowPos(PopupWindow popupWindow, View contentView, View anchorView) {\n }", "@Override \r\n\tprotected void onLayout(boolean changed, int left, int top, int right, int bottom)\r\n\t{\n\t\tif(changed)\r\n\t\t{\r\n\t\t\tthis.calculateChildViewLayoutParams();\r\n\t\t}\r\n\t\t\r\n\t\t// Set the layout position for the menu and content\r\n\t\tthis.m_listView.layout(left, top, right, bottom);\r\n\t\tthis.m_playerInfo.layout(left, (top - this.m_currentInfoOffset), right, (bottom - this.m_currentInfoOffset));\r\n\t\tthis.m_playerControls.layout(left, (top - this.m_currentControlsOffset), right, (bottom - this.m_currentControlsOffset));\r\n\t\tthis.m_banner.layout(left, top, right, bottom);\r\n\t\t\r\n\t}", "public void setPosition(float x, float y)\n {\n bounds.offsetTo(\n x - positionAnchor.x,\n y - positionAnchor.y);\n notifyParentOfPositionChange();\n conditionallyRelayout();\n }", "public void resetPosition()\n {\n resetPosition(false);\n }", "@Override\n\tpublic void setPosition(int left)\n\t{\n\t\t_mainPanel.getElement().getStyle().setLeft(left, Style.Unit.PX) ;\n\t}", "private void setupLayout()\n\t{\n\t\tbaseLayout.putConstraint(SpringLayout.NORTH, queryButton, 70, SpringLayout.NORTH, this);\n\t\tbaseLayout.putConstraint(SpringLayout.WEST, queryButton, 49, SpringLayout.WEST, this);\n\t}", "public void setAdjustMode(boolean adjust);", "@Override // com.android.server.wm.WindowContainer\n public void onDescendantOverrideConfigurationChanged() {\n setLayoutNeeded();\n this.mWmService.requestTraversal();\n }", "public void doLayout() {\n\t if(editingComponent != null) {\n\t\tDimension cSize = getSize();\n\n\t\teditingComponent.getPreferredSize();\n\t\teditingComponent.setLocation(offset, 0);\n\t\teditingComponent.setBounds(offset, 0,\n\t\t\t\t\t cSize.width - offset,\n\t\t\t\t\t cSize.height);\n\t }\n\t}", "@Override\r\n\t\tprotected void onLayout(boolean changed, int left, int top, int right,\r\n\t\t\t\tint bottom) {\n\t\t\tLog.v(\"MyView01>onLayout\",\"f-1\");\r\n\t\t\tsuper.onLayout(changed, left, top, right, bottom);\r\n\t\t\tLog.v(\"MyView01>onLayout\",\"f-2\");\r\n\t\t}", "@Override\n\tprotected void init() {\n\t\tsuper.init();\n\t\tisAnchorPointForPosition = true;\n\t\tsetContentSize(Screen.GAME_W, Screen.GAME_H);\n\t\tsetAnchor(Graphics.HCENTER | Graphics.VCENTER);\n\t}", "protected void conditionallyRelayout()\n {\n ShapeView view = getParentView();\n \n if (view != null)\n {\n view.conditionallyRelayout();\n }\n }", "public void adjust()\n {\n }", "protected void directUpdateLayout() {\n updateLayout();\n }", "private void doLayout() {\n\t\tLinearLayout.LayoutParams playerParams =\n\t\t (LinearLayout.LayoutParams) playerView.getLayoutParams();\n\t\tif (isFullScreen) {\n\t\t // When in fullscreen, the visibility of all other views than the player should be set to\n\t\t // GONE and the player should be laid out across the whole screen.\n\t\t playerParams.width = LayoutParams.MATCH_PARENT;\n\t\t playerParams.height = LayoutParams.MATCH_PARENT;\n\t\t otherViews.setVisibility(View.GONE);\n\t\t}else{\n\t\t\t\n\t\t\tif (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {\n\t\t playerParams.width = 0;\n\t\t playerParams.height = MATCH_PARENT;\n\t\t otherViews.setVisibility(View.VISIBLE);\n\t\t playerParams.weight = 1;\n\t\t \n\t\t }else{\n\t\t \totherViews.setVisibility(View.VISIBLE);\n\t\t \tplayerParams.width = MATCH_PARENT;\n\t\t playerParams.height = WRAP_CONTENT;\n\t\t getActionBar().show();\n\t\t }\t\t\t\n\t\t} \n\t}", "private void setupLayout()\n\t{\n\t\tbaseLayout.putConstraint(SpringLayout.WEST,firstButton,107,SpringLayout.WEST, this);\n\t\tbaseLayout.putConstraint(SpringLayout.SOUTH, firstButton, -32, SpringLayout.SOUTH, this);\n\t\tbaseLayout.putConstraint(SpringLayout.WEST, firstField, 37, SpringLayout.WEST, this);\n\t\tbaseLayout.putConstraint(SpringLayout.SOUTH, firstField, -24, SpringLayout.SOUTH, this);\n\t}", "@Override\n public void requestLayout() {\n super.requestLayout();\n if (onRequestLayoutListener != null && !isRequestLayoutPosted) {\n isRequestLayoutPosted = true;\n postDelayed(requestLayoutRunnable, 33);\n }\n }", "public void setupLayout() {\n // left empty for subclass to override\n }", "@Override\n public void recalculatePositions() { \n \n }", "private void setupAutomotiveMode() {\n // reset the margin value for arrow view\n if (mArrowView != null) {\n mArrowView.setImageResource(R.drawable.automotive_common_arrow_down);\n MarginLayoutParams mlp = (MarginLayoutParams) mArrowView.getLayoutParams();\n if (null != mlp) {\n if (ActionBarUtil.IS_SUPPORT_RTL) {\n mlp.setMarginStart(mMeasureSpecM2);\n } else {\n mlp.leftMargin = mMeasureSpecM2;\n }\n mArrowView.setLayoutParams(mlp);\n }\n }\n }", "public void adjustControlContentPosition(boolean isAnimating)\r\n\t{\n\t\tint offsetY = this.m_controlAnimationScroller.getCurrY();\r\n\t\t\r\n\t\t// Offset the content view by the change in \"X\" from the previous \"X\" position\r\n\t\tthis.m_playerControls.offsetTopAndBottom(offsetY - this.m_currentControlsOffset);\r\n\t\t\r\n\t\t// Save the current scroller's \"X\" offset value as the current offset\r\n\t\tthis.m_currentControlsOffset = offsetY;\r\n\t\t\r\n\t\t// Invalidate the layout in order to render the results of the offset on the screen\r\n\t\tthis.invalidate();\r\n\t\t\r\n\t\t// If the scroller is still animating, then refresh the animation cycle using the animation handler.\r\n\t\t// Else, the animation is ended.\r\n\t\tif(isAnimating)\r\n\t\t{\r\n\t\t\tthis.m_controlAnimationHandler.postDelayed(this.m_controlAnimationRunnable, m_animationPollingInterval);\r\n\t\t}\r\n\t}", "public void setPosicao() {\n Dimension d = this.getDesktopPane().getSize();\n this.setLocation((d.width - this.getSize().width) / 2, (d.height - this.getSize().height) / 2);\n }", "@Override\n\tpublic void updatePosition() {\n\t\t\n\t}", "public final void fixAnchorPosition() {\n for(int i = 0; i < getChildren().size() - 1; i+=2) {\n Anchor anchor = (Anchor) getChildren().get(i);\n anchor.setCenterX(anchorData.get(i));\n anchor.setCenterY(anchorData.get(i+1));\n }\n head.setLayoutX(headLayoutX);\n head.setLayoutY(headLayoutY);\n }", "private void placeRecyclerViewOffScreen() {\n rvBookmarks.setTranslationX(screenWidth);\n }", "@Override\r\n\tprotected void onLayout(boolean changed, int left, int top, int right,\r\n\t\t\tint bottom) {\n\t\tfor (int i = 0; i < getChildCount(); i++) {\r\n\t\t\tfinal View child = getChildAt(i);\r\n\t\t\tif(child.getVisibility() != GONE) {\r\n\t\t\t\tfinal LayoutParams params = (LayoutParams) child.getLayoutParams();\r\n\t\t\t\t\r\n\t\t\t\tfinal int width = child.getMeasuredWidth();\r\n\t\t\t\tfinal int height = child.getMeasuredHeight();\r\n\t\t\t\t\r\n\t\t\t\tint childleft = 0;\r\n\t\t\t\tint childtop = getPaddingTop()+params.topMargin;\r\n\t\t\t\t\r\n\t\t\t\tchild.layout(childleft, childtop, childleft+width, childtop+height);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void layoutGame() {\n\t\tthis.doLayoutGame();\r\n\t\tthis.doLayoutGame();\r\n\t}", "public void setStartPosition() {\n bounds.offsetTo((SanitizorGame.mSurfaceWidth - bounds.width()) / 2,\n SanitizorGame.mSurfaceHeight - (BOTTOM_PADDING + bounds.height()));\n }", "private void recalculatePosition()\n {\n position.x = gridCoordinate.getCol()*(width+horizontal_spacing);\n position.y = gridCoordinate.getRow()*(heigh+vertical_spacing);\n }", "@Override\n\t\t\t\t\tpublic void onLayoutChange(View v, int left, int top,\n\t\t\t\t\t\t\tint right, int bottom, int oldLeft, int oldTop,\n\t\t\t\t\t\t\tint oldRight, int oldBottom) {\n\t\t\t\t\t\tint addItem = bottom - oldBottom;\n\t\t\t\t\t\tif (addItem > 0 && oldBottom > 0) {\n\t\t\t\t\t\t\tScrollView scrollView = (ScrollView) findViewById(R.id.container);\n\t\t\t\t\t\t\tLog.i(TAG, \"deltaHeight=\" + addItem + \";bottom=\"\n\t\t\t\t\t\t\t\t\t+ bottom + \";oldBottom=\" + oldBottom);\n\t\t\t\t\t\t\tscrollView.scrollBy(0, addItem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void onGlobalLayout() {\n\t\t\t\tint [] location = new int[2];\n\t\t\t\tgetLocationOnScreen(location);\n\t\t\t\tif (mWindowMgrParams.y == location[1]) {\n\t\t\t\t\t// is full screen\n\t\t\t\t\tisNotFullScreen = false;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tisNotFullScreen = true;\n\t\t\t\t}\n\n\t\t\t\t//detect screen orientation change\n\t\t\t\tPoint tempDimension = ScreenUtils.getScreenDimen((Activity) mContext);\n\t\t\t\tif (screendimension.x == tempDimension.y) {\n\t\t\t\t\t//now is in landscape\n\t\t\t\t\tif (currentdimension.x == screendimension.x) {\n\t\t\t\t\t\t// this is the first time that detect screen orientation\n\t\t\t\t\t\t// is changed to landscape\n\t\t\t\t\t\tcurrentdimension = tempDimension;\n\t\t\t\t\t\tonOrientationChanged(ScreenStateListener.ORIENTATION_LANDSCAPE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//now is in portrait\n\t\t\t\t\tif (currentdimension.x != screendimension.x) {\n\t\t\t\t\t\t// this is the first time that screen orientation\n\t\t\t\t\t\t// is recovered from landscape for the first time\n\t\t\t\t\t\tcurrentdimension = tempDimension;\n\t\t\t\t\t\tonOrientationChanged(ScreenStateListener.ORIENTATION_PORTRAIT);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@Override\n public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {\n\n final int screenHeight = getResources().getDisplayMetrics().heightPixels;\n\n //get the absolute position on screen\n final int[] bottomViewLocation = new int[2];\n mBottomSheetViewGroup.getLocationOnScreen(bottomViewLocation);\n\n // detect if it will be off screen when animation occurs\n int translationYLocation = CU.dp2px(mBottomSheetViewGroup.getContext(),mBottomSheetInitialPositionOffsetInDp) + bottomViewLocation[1];\n if (translationYLocation > screenHeight) {\n int barHeight = mTextViewDataEntry.getHeight();\n\n //snap it to the bottom of the screen\n mBottomSheetInitialPositionOffsetInDp = CU.px2dp(mBottomSheetViewGroup.getContext(), screenHeight - bottomViewLocation[1] - barHeight);\n mBottomSheetAnimator = setupBottomSheetAnimator();\n mBottomSheetViewGroup.setTranslationY(CU.dp2px(mBottomSheetViewGroup.getContext(), mBottomSheetInitialPositionOffsetInDp));\n } else {\n mBottomSheetViewGroup.setTranslationY(CU.dp2px(mBottomSheetViewGroup.getContext(), mBottomSheetInitialPositionOffsetInDp));\n }\n mBottomSheetViewGroup.removeOnLayoutChangeListener(this);\n }", "@Override\n public void onGlobalLayout() {\n if (bottom == 0) {\n txtGrayInstructions.getViewTreeObserver().removeGlobalOnLayoutListener(this);\n bottom = txtGrayInstructions.getBottom();\n }\n //showHelpView(layoutInflater);\n\n }", "@Override\n protected void onLayout(boolean changed, int l, int t, int r, int b) {\n if (flag) {\n //进行一些初始化的操作\n/* if ((mOvalHeight == -1) || (mOvalWidth == -1)) {\n if (mWidth > mHeight) {\n mOvalHeight = (mHeight - 100) / 2;\n mOvalWidth = mOvalHeight + 100;\n } else {\n mOvalWidth = (mWidth - 100) / 2;\n mOvalHeight = mOvalWidth + 100;\n }\n }else {\n mOvalWidth /= 2;\n mOvalHeight /= 2;\n }*/\n\n if (mOvalHeightMargin != -1) {\n mOvalHeight = (mHeight - mOvalHeightMargin * 2) / 2;\n } else if (mOvalHeight == -1) {\n mOvalHeight = mHeight / 2;\n }\n if (mOvalWidthMargin != -1) {\n mOvalWidth = (mWidth - mOvalWidthMargin * 2) / 2;\n } else if (mOvalWidth == -1) {\n mOvalWidth = mWidth / 2;\n }\n\n\n if ((mChildWidth == -1) && (mChildHeight == -1)) {\n mChildWidth = 50;\n mChildHeight = 50;\n }\n\n //下面是获取所有的子view,给子view分配初始位置,默认第一个是270度,相当于y轴负半轴。\n mChildCount = getChildCount();\n mChildrenView = new View[mChildCount];\n mAngles = new double[mChildCount];\n mAngles[0] = 270;\n double j = 360 / mChildCount;\n for (int i = 0; i < mChildCount; i++) {\n mChildrenView[i] = getChildAt(i);\n final int finalI = i;\n mChildrenView[i].setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n if (itemClickListener == null)\n Log.e(TAG, \"你点击了的position = \" + finalI + \",但是itemClickListener == null\");\n else {\n itemClickListener.onItemClick(v, finalI, true);\n }\n }\n });\n if (i > 0) {\n if ((mAngles[i] + j) <= 360) {\n mAngles[i] = mAngles[i - 1] + j;\n } else {\n mAngles[i] = mAngles[i - 1] + j - 360;\n }\n }\n int x = (int) (mOvalWidth * Math.cos(mAngles[i] * Math.PI / 180));\n int y = (int) (mOvalHeight * Math.sin(mAngles[i] * Math.PI / 180));\n mChildrenView[i].layout(mWidth / 2 - x - mChildWidth / 2, mHeight / 2 - y - mChildHeight / 2, mWidth / 2 - x + mChildWidth / 2, mHeight / 2 - y + mChildHeight / 2);\n }\n flag = false;\n }\n }", "public void onAttachedToWindow() {\n super.onAttachedToWindow();\n this.mFirstLayout = true;\n }", "public void setX(float x)\n {\n getBounds().offsetTo(x - positionAnchor.x, getBounds().top);\n notifyParentOfPositionChange();\n conditionallyRelayout();\n }", "public void mo9839a() {\n onLayout(false, 0, 0, 0, 0);\n }", "public void layoutSetting(PlayerHolder mHolder){\r\n // update the layout width\r\n mHolder.number.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.name.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.twomade.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.twotried.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.threemade.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.threetried.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.ftmade.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.fttried.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.defrebound.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.offrebound.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.assist.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.block.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.steal.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.turnover.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.foul.getLayoutParams().width = MultiDevInit.cellW;\r\n mHolder.point.getLayoutParams().width = MultiDevInit.cellW;\r\n // update the layout height\r\n mHolder.number.getLayoutParams().height = MultiDevInit.recordRowH;\r\n }", "@Override\n public void onInteractabilityChanged(boolean interactable) {\n maybeUpdateLayout();\n }", "public void setPosition(){\r\n currentPosition = 0; \r\n }", "private void setLayoutManager() {\r\n this.setLayout(new BorderLayout());\r\n }", "private void Myinits() {\n \n \n \n setLocationRelativeTo(this);\n }", "private void setLayout() {\n int orientation = getResources().getConfiguration().orientation;\n // if the orientation is Portrait\n if (orientation == Configuration.ORIENTATION_PORTRAIT) {\n if (!webViewFragment.isAdded()) {\n mLandmarkLayout.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT));\n mWebPageLayout.setLayoutParams(new LinearLayout.LayoutParams(0, MATCH_PARENT));\n } else {\n mLandmarkLayout.setLayoutParams(new LinearLayout.LayoutParams(0, MATCH_PARENT, 0f));\n mWebPageLayout.setLayoutParams(new LinearLayout.LayoutParams(0, MATCH_PARENT, 3f));\n\n }\n }\n else { // if the orientation is Landscape\n if (!webViewFragment.isAdded()) {\n\n mLandmarkLayout.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT));\n mWebPageLayout.setLayoutParams(new LinearLayout.LayoutParams(0, MATCH_PARENT));\n } else {\n // Make the LandmarkLayout take 1/3 of the layout's width\n mLandmarkLayout.setLayoutParams(new LinearLayout.LayoutParams(0,\n MATCH_PARENT, 1f));\n // Make the WebPageLayout take 2/3's of the layout's width\n mWebPageLayout.setLayoutParams(new LinearLayout.LayoutParams(0,\n MATCH_PARENT, 2f));\n }\n }\n }", "@Override\n\tpublic void relocate()\n\t{\n\n\t\tint w = 380, h = 65;\n\t\tint x = (this.getWidth() - w) / 2, y = (this.getHeight() - h) / 2;\n\n\t\tfullRevisionLabel.setLocation(x, y);\n\t\tfullRevisionField.setLocation(x + 280, y);\n\n\t\tminimumCommonSequenceLabel.setLocation(x, y + 40);\n\t\tminimumCommonSequenceField.setLocation(x + 280, y + 40);\n\t}", "private void setViewLayout() {\n\t\tthis.setBorder(new EmptyBorder(15, 15, 15, 15));\n\t\tthis.setLayout(new GridLayout(2, 2, 15, 15));\n\t}", "private void setWallpaperOffset()\n\t{\n\t\tif( DefaultLayout.enable_configmenu_for_move_wallpaper )\n\t\t{\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences( SetupMenu.getContext() );\n\t\t\tif( prefs.getBoolean( SetupMenu.getKey( RR.string.desktop_wallpaper_mv ) , true ) == false )\n\t\t\t{\n\t\t\t\t//当菜单中设置壁纸不随滑动而滚动时,不需要设置offset\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t//teapotXu add end\n\t\tif( animView.getUser() == targetOffset || targetOffset == -1 )\n\t\t\treturn;\n\t\tIBinder token = launcher.getWindow().getCurrentFocus().getWindowToken();\n\t\tif( token == null )\n\t\t\treturn;\n\t\tmWallpaperManager.setWallpaperOffsets( token , animView.getUser() , 0 );\n\t}", "@Override\n public void onGlobalLayout() {\n onScrollChanged(scrollView.getScrollY());\n }", "protected final void setLayouting(final boolean isLayouting) {\n this.isLayouting = isLayouting;\n }", "@Override\n\tpublic void doLayout() {\n\t\tthis.transitionsPanel.setBounds(0, 0, this.getWidth(), this.getHeight());\n\t\t//this.timersButton.setBounds(this.getWidth()-2*50, 0, 50, 50);\n\t\t//this.countersButton.setBounds(this.getWidth()-50, 0, 50, 50);\n\t\t//this.salirButton.setBounds(this.getWidth()-40,0,40, 40);\n\t\tsuper.doLayout();\n\t}", "private void positionMode() {\n\t\ttestMotor.setProfile(0);\n\t\ttestMotor.ClearIaccum();\n\t\ttestMotor.set(testMotor.getPosition());\n\t\ttestMotor.ClearIaccum();\n\t}", "@Override\n public void onLayoutChange(View v, int left, int top, int right,\n\t int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {\n\tif(oldBottom != 0 && bottom != 0 &&(oldBottom - bottom > keyHeight)){ \n\n //Toast.makeText(mContext, \"监听到软键盘弹起...\", Toast.LENGTH_SHORT).show(); \n }else if(oldBottom != 0 && bottom != 0 &&(bottom - oldBottom > keyHeight)){ \n \tmHandler.postDelayed(new Runnable() { \n \t public void run() { \n \t \t mCommentEdit.clearFocus();\n \t\t\t mCommentEdit.setHint(\"发表评论\");\n \t\t\t mCommentEdit.setText(\"\");\n \t\t\t isComment = true;\n \t\t\t YKUtil.hideKeyBoard(mContext, mCommentEdit);\n \t\t\t //Toast.makeText(mContext, \"监听到软件盘关闭...\", Toast.LENGTH_SHORT).show(); \n \t } \n \t }, 100); \n } \n }", "private void layoutBar() {\n this.setVisible(false);\n final SpringLayout layout = (SpringLayout) this.getLayout();\n final int numComponents = this.getComponentCount() - 1;\n \n SpringLayout.Constraints constraints;\n \n layout.putConstraint(SpringLayout.WEST, getComponent(0),\n Spring.constant(0), SpringLayout.WEST, this);\n layout.putConstraint(SpringLayout.EAST, getComponent(0),\n Spring.constant(-SMALL_BORDER), SpringLayout.WEST, getComponent(1));\n constraints = layout.getConstraints(getComponent(0));\n constraints.setHeight(Spring.constant(20));\n \n for (int i = 1; i < numComponents; i++) {\n layout.putConstraint(SpringLayout.EAST, getComponent(i),\n Spring.constant(-SMALL_BORDER), SpringLayout.WEST,\n getComponent(i + 1));\n constraints = layout.getConstraints(getComponent(i));\n constraints.setHeight(Spring.constant(20));\n constraints.setWidth(constraints.getWidth());\n }\n \n layout.putConstraint(SpringLayout.EAST, getComponent(numComponents),\n Spring.constant(0), SpringLayout.EAST, this);\n constraints = layout.getConstraints(getComponent(numComponents));\n constraints.setHeight(Spring.constant(20));\n constraints.setWidth(constraints.getWidth());\n this.setVisible(true);\n }", "@JsOverlay\n public final void layout() {\n Dagre.get().layout(this);\n }", "public void setGlobalLayoutListener(final View view){\n view.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {\n @Override\n public void onGlobalLayout() {\n\n Rect r = new Rect();\n view.getWindowVisibleDisplayFrame(r);\n int screenHeight = view.getRootView().getHeight();\n\n int keypadHeight = screenHeight - r.bottom;\n\n if (keypadHeight > screenHeight * 0.15) { // 0.15 ratio is perhaps enough to determine keypad height.\n mList.scrollToPosition(mAdapter.getItemCount() - 1);\n }\n }\n });\n }", "public void resetRobotPositionOnUI() {\r\n\t\tthis.x = checkValidX(1);\r\n\t\tthis.y = checkValidY(1);\r\n\t\ttoggleValid();\r\n\t\trobotImage.setLocation(Constant.MARGINLEFT + (Constant.GRIDWIDTH * 3 - Constant.ROBOTWIDTH)/2 + (x-1) * Constant.GRIDWIDTH, Constant.MARGINTOP + (Constant.GRIDHEIGHT * 3 - Constant.ROBOTHEIGHT)/2 + (y-1) * Constant.GRIDHEIGHT);\r\n\t\t\r\n\t}", "public boolean requiresLayout() {\n return true;\n }", "@Override\n public boolean canResolveLayoutDirection() {return false;}", "@Override\n public void setLayout(Layout layout) {\n checkWidget();\n return;\n }", "@Override\r\n protected void layout() {\n\r\n Check.setY(this.getHalfHeight() - Check.getHalfHeight());\r\n\r\n float asc = lblName.getFont().getDescent();\r\n\r\n lblName.setY(this.getHeight() - lblName.getHeight() + asc);\r\n lblName.setX(this.getLeftWidth());\r\n }", "@Override\n public void layout() {\n // TODO: not implemented\n }", "public void setPlace(View view){\n setPlace = (RelativeLayout)findViewById(R.id.setPlaceRelativeLayout);\n setPlace.setVisibility(View.VISIBLE);\n\n orientation = 0; // resets all params before new placement\n angleF = 0;\n rotateRight = 0;\n rotateLeft = 0;\n placeX = 0;\n placeY = 0;\n\n }", "private void positionToNearest(int orientation) {\n\t\txMovementLimit = currentdimension.x - roundBtnWidth / 2;\n\t\tyMovementLimit = currentdimension.y - roundBtnWidth / 2;\n\t\tint [] location = new int[2];\n\t\tgetLocationOnScreen(location);\n\t\tif (location[0] < currentdimension.x / 2) {\n\t\t\tmWindowMgrParams.x = 0;\t\n\t\t}\n\t\telse {\n\t\t\tmWindowMgrParams.x = xMovementLimit;\t\n\t\t}\n\t\tmWindowManager.updateViewLayout(this, mWindowMgrParams);\n\t}", "public void setSnappingToCenter(boolean snappingToCenter)\n\t{\n\t\tmSnappingToCenter = snappingToCenter;\n\t\tadjustSubviewPositions();\n\t}", "@Override\n protected void onLayout(boolean changed, int l, int t, int r, int b) {\n final int count = getChildCount();\n\n for (int i = 0; i < count; i++) {\n View child = getChildAt(i);\n if (child.getVisibility() != GONE) {\n if (i == MAX_PAGE_SIZE - 2) {\n // Log.d(TAG,\n // \"mTranslationY + mTranslationX = \"\n // + (Math.abs(mTranslationX) + Math\n // .abs(mTranslationY)));\n float moved = Math.abs(mTranslationX)\n + Math.abs(mTranslationY);\n float scale = 0.8F + moved / 2000;\n child.setScaleX(scale < 0.9F ? scale : 0.9F); // 0.8->0.9\n child.setScaleY(scale < 0.9F ? scale : 0.9F);\n float trY = 50 - (scale - 0.8F) * 250;\n child.setTranslationY(trY > 25 ? TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, trY, getResources()\n .getDisplayMetrics()) : TypedValue\n .applyDimension(TypedValue.COMPLEX_UNIT_DIP, 25,\n getResources().getDisplayMetrics())); // 50->25\n } else if (i == MAX_PAGE_SIZE - 1) {\n float moved = Math.abs(mTranslationX)\n + Math.abs(mTranslationY);\n float scale = 0.9F + moved / 2000;\n child.setScaleX(scale < 1 ? scale : 1); // 0.9 -> 1.0\n child.setScaleY(scale < 1 ? scale : 1);\n float trY = 25 - (scale - 0.9F) * 250;\n child.setTranslationY(trY > 0 ? TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, trY, getResources()\n .getDisplayMetrics()) : 0); // 25->0\n } else if (i == MAX_PAGE_SIZE) {\n // Log.d(TAG, \"mtouchDownX = \" + touchDownX\n // + \", mtouchDownY = \" + touchDownY);\n child.setTranslationX(mTranslationX);\n child.setTranslationY(mTranslationY);\n float rotation;\n if (touchDownY < (b - t) / 2) {\n rotation = mTranslationX / 20;\n } else {\n rotation = -mTranslationX / 20;\n }\n if (rotation > 0) {\n child.setRotation(rotation < 20 ? rotation : 20);\n } else {\n child.setRotation(rotation > -20 ? rotation : -20);\n }\n } else {\n child.setScaleX(0.8F);\n child.setScaleY(0.8F);\n child.setTranslationY(TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, 50, getResources()\n .getDisplayMetrics()));\n }\n }\n }\n super.onLayout(changed, l, t, r, b);\n }", "@Override\n\t\tpublic void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop,\n\t\t\t\tint oldRight, int oldBottom) {\n\t\t\t\n\t\t\tSystem.out.println(\"*\" + index +\"-\"+(right-left));\n\t\t\tcolWidth[index]=right-left;\n\t\t\n\t\t\tsetMyWidth();\n\t\t}", "@Override\n\tprotected void onLayout(boolean changed, int left, int top, int right,\n\t\t\tint bottom) {\n\t\tsuper.onLayout(changed, left, top, right, bottom);\n\t\tSystem.out.println(\"changed=\"+changed);\n\t\tSystem.out.println(\"left=\"+left);\n\t\tSystem.out.println(\"top=\"+top);\n\t\tSystem.out.println(\"right=\"+right);\n\t\tSystem.out.println(\"bottom=\"+bottom);\n\t}", "void setAnchorOffset(int anchorOffset);", "@Override\n\tprotected void onLoad() {\n\t // Reset the position attribute of the parent element\n\t //DOM.setStyleAttribute(getElement(), \"position\", \"relative\");\n\t //ResizableWidgetCollection.get().add(this);\n\t redraw();\n\t }", "boolean isWasLayouting();", "protected boolean resizeAnchors() {\n return true;\n }", "@VisibleForTesting\n protected void maybeUpdateLayout() {\n try {\n Object attributes = getWindowAttributes();\n\n int layoutValue =\n attributes.getClass().getDeclaredField(getDisplayCutoutMode()).getInt(null);\n\n attributes.getClass()\n .getDeclaredField(\"layoutInDisplayCutoutMode\")\n .setInt(attributes, layoutValue);\n\n setWindowAttributes(attributes);\n } catch (Exception ex) {\n // API is not available.\n return;\n }\n }", "private void setupAdjustViewBoundsField() {\n // The following two settings don't work when defined in XML (possible Android bug?)\n mBind.adjustViewBoundsEdit.setKeyListener(null); // Make field non-editable\n mBind.adjustViewBoundsEdit.setSelectAllOnFocus(false); // Disable selectAllOnFocus\n\n // Create the popup window showing the possible \"true\" and \"false\" inputs\n ListPopupWindow popup = new ListPopupWindow(this);\n popup.setAnchorView(mBind.adjustViewBoundsEdit);\n popup.setModal(true);\n popup.setVerticalOffset(-25);\n popup.setAdapter(new ArrayAdapter<>(this, LAYOUT_DROPDOWN_ITEM, Data.ARR_BOOL));\n // If an item is clicked, put the corresponding text in the text field\n popup.setOnItemClickListener((parent, view, position, id) -> {\n mBind.adjustViewBoundsEdit.setText(Data.ARR_BOOL[position]);\n popup.dismiss();\n });\n\n // Open the popup window on clicking inside the area of the right compound drawable\n mBind.adjustViewBoundsEdit.setOnTouchListener((view, event) -> {\n if (event.getAction() == MotionEvent.ACTION_DOWN) {\n int textFieldWidth = mBind.adjustViewBoundsEdit.getWidth();\n int iconWidth = mBind.adjustViewBoundsEdit.getCompoundDrawables()[2].getBounds().width();\n if (event.getX() >= textFieldWidth - iconWidth) {\n mBind.adjustViewBoundsEdit.requestFocus();\n popup.show();\n }\n }\n return false;\n });\n\n // If \"true\" is selected, enable the maxWidth and maxHeight fields, and vice versa\n mBind.adjustViewBoundsEdit.addTextChangedListener(new MyTextWatcher() {\n @Override\n public void afterTextChanged(Editable s) {\n if (mBind.adjustViewBoundsEdit.getText().toString().equals(Data.TRUE)) {\n // Enable labels\n mBind.maxWidthLabel.setEnabled(true);\n mBind.maxHeightLabel.setEnabled(true);\n // Enable text fields\n mBind.maxWidthEdit.setEnabled(true);\n mBind.maxHeightEdit.setEnabled(true);\n }\n else {\n // Disable labels\n mBind.maxWidthLabel.setEnabled(false);\n mBind.maxHeightLabel.setEnabled(false);\n // Disable text fields\n mBind.maxWidthEdit.setEnabled(false);\n mBind.maxHeightEdit.setEnabled(false);\n }\n }\n });\n }", "@Override\n public void onGlobalLayout() {\n if (right == 0) {\n imgStepsLast.getViewTreeObserver().removeGlobalOnLayoutListener(this);\n right = imgStepsLast.getRight();\n }\n showHelpView(layoutInflater);\n\n }", "private void setPositions(float dx, float dy) {\n\n // prevent the point to be drag outside of the parent layout on the X axis\n if (getX() + dx + 2 * POINT_RADIUS >= ((View) getParent()).getWidth())\n setX(((View) getParent()).getWidth() - 2 * POINT_RADIUS);\n else if (getX() + dx < 0)\n setX(0);\n else\n setX(getX() + dx);\n\n\n // prevent the point to be drag outside of the parent layout on the Y axis\n if (getY() + dy + 2 * POINT_RADIUS > ((View) getParent()).getHeight())\n setY(((View) getParent()).getHeight() - 2 * POINT_RADIUS);\n else if (getY() + dy < 0)\n setY(0);\n else\n setY(getY() + dy);\n\n }", "public boolean requiresLayout() {\n return false;\n }", "public boolean requiresLayout() {\n return false;\n }", "@Override\n protected void onLayout(boolean changed, int l, int t, int r, int b) {\n view_top.layout((int) mDrange + dip2px(getContext(), 20) - view_top.getMeasuredWidth() / 2, t, (int) mDrange + view_top.getMeasuredWidth() / 2 + dip2px(getContext(), 20), view_top.getMeasuredHeight());\n view_mid.layout((int) mDrange + dip2px(getContext(), 20) - view_mid.getMeasuredWidth() / 2, view_top.getMeasuredHeight(), (int) mDrange + view_mid.getMeasuredWidth() / 2 + dip2px(getContext(), 20), view_top.getMeasuredHeight() + view_mid.getMeasuredHeight());\n pb.layout(dip2px(getContext(), 20) + l, view_top.getMeasuredHeight() + view_mid.getMeasuredHeight(), r - dip2px(getContext(), 20), view_top.getMeasuredHeight() + view_mid.getMeasuredHeight() + pb.getMeasuredHeight());\n }", "@RestrictTo(value={RestrictTo.Scope.LIBRARY_GROUP})\n void autoSizeText() {\n if (!this.isAutoSizeEnabled()) {\n return;\n }\n if (this.mNeedsAutoSizeText) {\n if (this.mTextView.getMeasuredHeight() <= 0) {\n return;\n }\n if (this.mTextView.getMeasuredWidth() <= 0) {\n return;\n }\n int n = this.invokeAndReturnWithDefault((Object)this.mTextView, \"getHorizontallyScrolling\", false) != false ? 1048576 : this.mTextView.getMeasuredWidth() - this.mTextView.getTotalPaddingLeft() - this.mTextView.getTotalPaddingRight();\n int n2 = this.mTextView.getHeight() - this.mTextView.getCompoundPaddingBottom() - this.mTextView.getCompoundPaddingTop();\n if (n <= 0) {\n return;\n }\n if (n2 <= 0) {\n return;\n }\n RectF rectF = TEMP_RECTF;\n synchronized (rectF) {\n TEMP_RECTF.setEmpty();\n AppCompatTextViewAutoSizeHelper.TEMP_RECTF.right = n;\n AppCompatTextViewAutoSizeHelper.TEMP_RECTF.bottom = n2;\n float f = this.findLargestTextSizeWhichFits(TEMP_RECTF);\n if (f != this.mTextView.getTextSize()) {\n this.setTextSizeInternal(0, f);\n }\n }\n }\n this.mNeedsAutoSizeText = true;\n }", "public void defaultstatus()\n {\n try{\n this.isExpaneded = false;\n \n // hide the right annotation edit and diff area\n if (main_splitpane !=null)\n {\n main_splitpane.setDividerLocation(\n main_splitpane.getParent().getWidth() // width of wholesplitter\n - this.main_splitpane.getDividerSize() // width of divider of splitter\n );\n }}catch(Exception ex){\n System.out.println(\"error 1206151048\");\n }\n }", "public int[] calculateAutoAdjustPosition() {\n int[] result = new int[2];\n if (mMainView.getLayoutParams() == null || !(mMainView.getLayoutParams() instanceof MarginLayoutParams)) {\n return result;\n }\n // adjust position so it will align pdfviewctrl layout\n measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED);\n MarginLayoutParams mlp = (MarginLayoutParams) mMainView.getLayoutParams();\n\n\n int y;\n int verticalGravity = mGravity & Gravity.VERTICAL_GRAVITY_MASK;\n switch (verticalGravity) {\n case Gravity.TOP:\n y = mPDFViewCtrl.getTop() + mlp.topMargin;\n break;\n case Gravity.CENTER_VERTICAL:\n y = mPDFViewCtrl.getTop() + mPDFViewCtrl.getHeight() / 2 - getMeasuredHeight() / 2 + mlp.topMargin;\n break;\n default:\n y = mPDFViewCtrl.getBottom() - getMeasuredHeight() - mlp.bottomMargin;\n break;\n }\n\n result[1] = y;\n\n int x;\n int gravity = Utils.isJellyBeanMR1() ? Gravity.getAbsoluteGravity(mGravity, getLayoutDirection()) : mGravity;\n int horizontalGravity = gravity & Gravity.HORIZONTAL_GRAVITY_MASK;\n switch (horizontalGravity) {\n case Gravity.RIGHT:\n x = mPDFViewCtrl.getRight() - getMeasuredWidth()\n - mlp.leftMargin - mlp.rightMargin;\n break;\n case Gravity.CENTER_HORIZONTAL:\n x = mPDFViewCtrl.getLeft() + mPDFViewCtrl.getWidth() / 2 - getMeasuredWidth() / 2 + mlp.leftMargin;\n break;\n default:\n x = mPDFViewCtrl.getLeft() + mlp.leftMargin;\n break;\n }\n result[0] = x;\n return result;\n }", "private void setScrollDefaultState()\n {\n nestedScrollView.fullScroll(View.FOCUS_UP);\n nestedScrollView.scrollTo(0,0);\n appBarLayout.setExpanded(true);\n }", "private void updateYPosition(boolean adjustCodeWindow){\n //Move the cursor\n cursor.getPosition().y = currentText.getPosition().y;\n\n// if(adjustCodeWindow) {\n// //If the cursor is outside the bounds of the code window scroll the code window to correct it\n// if ((codeWindow.getCodeWindow().getCodeWindowPosition().y) / aspectRatio.y > cursor.getPosition().y - GeneralSettings.FONT_HEIGHT) {\n// codeWindow.changeContentsVerticalPosition((codeWindow.getCodeWindow().getCodeWindowPosition().y) / aspectRatio.y - (cursor.getPosition().y - GeneralSettings.FONT_HEIGHT));\n// cursor.getPosition().y = currentText.getPosition().y;\n// } else if (cursor.getPosition().y / aspectRatio.y > (codeWindow.getCodeWindow().getCodeWindowPosition().y + codeWindow.getCodeWindow().getCodeWindowSize().y)) {\n// codeWindow.changeContentsVerticalPosition(-(cursor.getPosition().y - (codeWindow.getCodeWindow().getCodeWindowPosition().y + codeWindow.getCodeWindow().getCodeWindowSize().y) / aspectRatio.y));\n// cursor.getPosition().y = currentText.getPosition().y;\n// }\n// }\n cursor.getPosition().y += codeWindowOffset.y;\n }", "public void updateLayout(boolean z) {\n RecyclerListView.Holder holder;\n if (this.gridView.getChildCount() <= 0) {\n RecyclerListView recyclerListView = this.gridView;\n int paddingTop = recyclerListView.getPaddingTop();\n this.scrollOffsetY = paddingTop;\n recyclerListView.setTopGlowOffset(paddingTop);\n this.containerView.invalidate();\n return;\n }\n View childAt = this.gridView.getChildAt(0);\n RecyclerListView.Holder holder2 = (RecyclerListView.Holder) this.gridView.findContainingViewHolder(childAt);\n int top = childAt.getTop();\n int dp = AndroidUtilities.dp(7.0f);\n if (top < AndroidUtilities.dp(7.0f) || holder2 == null || holder2.getAdapterPosition() != 0) {\n top = dp;\n }\n int i = top + (-AndroidUtilities.dp(11.0f));\n if (this.scrollOffsetY != i) {\n RecyclerListView recyclerListView2 = this.gridView;\n this.scrollOffsetY = i;\n recyclerListView2.setTopGlowOffset(i);\n this.stickersTab.setTranslationY((float) i);\n this.stickersSearchField.setTranslationY((float) (i + AndroidUtilities.dp(48.0f)));\n this.containerView.invalidate();\n }\n RecyclerListView.Holder holder3 = (RecyclerListView.Holder) this.gridView.findViewHolderForAdapterPosition(0);\n if (holder3 == null) {\n this.stickersSearchField.showShadow(true, z);\n } else {\n this.stickersSearchField.showShadow(holder3.itemView.getTop() < this.gridView.getPaddingTop(), z);\n }\n RecyclerView.Adapter adapter = this.gridView.getAdapter();\n StickersSearchGridAdapter stickersSearchGridAdapter2 = this.stickersSearchGridAdapter;\n if (adapter == stickersSearchGridAdapter2 && (holder = (RecyclerListView.Holder) this.gridView.findViewHolderForAdapterPosition(stickersSearchGridAdapter2.getItemCount() - 1)) != null && holder.getItemViewType() == 5) {\n FrameLayout frameLayout = (FrameLayout) holder.itemView;\n int childCount = frameLayout.getChildCount();\n float f = (float) ((-((frameLayout.getTop() - this.searchFieldHeight) - AndroidUtilities.dp(48.0f))) / 2);\n for (int i2 = 0; i2 < childCount; i2++) {\n frameLayout.getChildAt(i2).setTranslationY(f);\n }\n }\n checkPanels();\n }" ]
[ "0.7662329", "0.6923025", "0.63499045", "0.6347243", "0.6313916", "0.62943435", "0.62903064", "0.623423", "0.6226456", "0.61544335", "0.6071272", "0.6063866", "0.598293", "0.5980306", "0.5929699", "0.5925255", "0.58959186", "0.58336115", "0.5788696", "0.57740265", "0.57618636", "0.5720587", "0.57165", "0.56786615", "0.5677863", "0.5675931", "0.5646303", "0.5644392", "0.56358874", "0.5593859", "0.5583358", "0.5582367", "0.5578375", "0.5577032", "0.5563663", "0.5561915", "0.5551154", "0.5541005", "0.55403304", "0.5538747", "0.5525989", "0.5514351", "0.5498945", "0.5493782", "0.54912955", "0.54839146", "0.5483733", "0.5478933", "0.54715997", "0.54713464", "0.5466435", "0.54635155", "0.54634047", "0.5459611", "0.5445021", "0.54446983", "0.54411876", "0.54350495", "0.5416868", "0.5415027", "0.5414268", "0.5412349", "0.54077303", "0.5398783", "0.5396884", "0.538924", "0.53885543", "0.53872967", "0.5386886", "0.5385949", "0.53761905", "0.53749377", "0.5373817", "0.53689927", "0.5368983", "0.5368402", "0.5368054", "0.53654814", "0.5364254", "0.53635114", "0.53575516", "0.5354296", "0.5338933", "0.53369796", "0.53244394", "0.5323531", "0.5321354", "0.53176636", "0.5307672", "0.5293191", "0.52893215", "0.5287918", "0.5287918", "0.5287485", "0.5278364", "0.5272538", "0.5272034", "0.52717555", "0.5268695", "0.52610964" ]
0.7400873
1
Calculates the position of page indicator if it is going to adjust position automatically.
public int[] calculateAutoAdjustPosition() { int[] result = new int[2]; if (mMainView.getLayoutParams() == null || !(mMainView.getLayoutParams() instanceof MarginLayoutParams)) { return result; } // adjust position so it will align pdfviewctrl layout measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED); MarginLayoutParams mlp = (MarginLayoutParams) mMainView.getLayoutParams(); int y; int verticalGravity = mGravity & Gravity.VERTICAL_GRAVITY_MASK; switch (verticalGravity) { case Gravity.TOP: y = mPDFViewCtrl.getTop() + mlp.topMargin; break; case Gravity.CENTER_VERTICAL: y = mPDFViewCtrl.getTop() + mPDFViewCtrl.getHeight() / 2 - getMeasuredHeight() / 2 + mlp.topMargin; break; default: y = mPDFViewCtrl.getBottom() - getMeasuredHeight() - mlp.bottomMargin; break; } result[1] = y; int x; int gravity = Utils.isJellyBeanMR1() ? Gravity.getAbsoluteGravity(mGravity, getLayoutDirection()) : mGravity; int horizontalGravity = gravity & Gravity.HORIZONTAL_GRAVITY_MASK; switch (horizontalGravity) { case Gravity.RIGHT: x = mPDFViewCtrl.getRight() - getMeasuredWidth() - mlp.leftMargin - mlp.rightMargin; break; case Gravity.CENTER_HORIZONTAL: x = mPDFViewCtrl.getLeft() + mPDFViewCtrl.getWidth() / 2 - getMeasuredWidth() / 2 + mlp.leftMargin; break; default: x = mPDFViewCtrl.getLeft() + mlp.leftMargin; break; } result[0] = x; return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean computeOffset() {\n\t\tif(mRoll != null){\n\t\t\tmRoll.onRoll(getCurrentPara());\n\t\t}\n\t\treturn mScroller.computeScrollOffset();\n\t}", "@Override\n public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n float marginLefts = (position + positionOffset) * pointMargin;\n\n RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(widthDpi, widthDpi);\n params.leftMargin = (int) marginLefts;\n mRedPoint.setLayoutParams(params);\n }", "@Override\r\n public int getAbsoluteX()\r\n {\r\n try\r\n {\r\n return pageSwitcher.getAbsoluteX();\r\n }\r\n catch(NullPointerException e)\r\n {\r\n return 0;\r\n }\r\n }", "@Override\n\tpublic void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n\n\t\tif (positionOffset > 0) {\n\t\t\tMain_bottom_change left = mTabIndicator.get(position);\n\t\t\tMain_bottom_change right = mTabIndicator.get(position + 1);\n\n\t\t\tleft.setIconAlpha(1 - positionOffset);\n\t\t\tright.setIconAlpha(positionOffset);\n\t\t}\n\n\t}", "private void getInitialSeekBarPositions() {\n final ContentResolver resolver = getActivity().getContentResolver();\n portColumnsValue = Settings.System.getIntForUser(resolver,\n Settings.System.QS_COLUMNS_PORTRAIT, 3, UserHandle.USER_CURRENT);\n portRowsValue = Settings.System.getIntForUser(resolver,\n Settings.System.QS_ROWS_PORTRAIT, 3, UserHandle.USER_CURRENT);\n landColumnsValue = Settings.System.getIntForUser(resolver,\n Settings.System.QS_COLUMNS_LANDSCAPE, 4, UserHandle.USER_CURRENT);\n landRowsValue = Settings.System.getIntForUser(resolver,\n Settings.System.QS_ROWS_LANDSCAPE, 2, UserHandle.USER_CURRENT);\n }", "private void setCalculatePosition() {\n fptUserCalculated = getFilterPointDesign(drawingPad.getSelectedItems(), true);\n drawingPad.getSelectedItems().finalizeMovement();\n drawingPad.getSelectedItems().calculate(fptUserCalculated);\n drawingPad.repaint();\n }", "@Override\n protected int computeHorizontalScrollOffset() {\n return (int) -panX;\n }", "@Override\n public void recalculatePositions() { \n \n }", "private void recalculatePosition()\n {\n position.x = gridCoordinate.getCol()*(width+horizontal_spacing);\n position.y = gridCoordinate.getRow()*(heigh+vertical_spacing);\n }", "public int getRelativePositioning(int i) {\n if (i == 0) {\n return this.mRelX;\n }\n return i == 1 ? this.mRelY : 0;\n }", "@Override\n\t\t\tpublic void onPageScrolled(int position, float positionOffset,\n\t\t\t\t\tint positionOffsetPixels) {\n\t\t\t\t\n\t\t\t}", "int getScrollOffsetX();", "private void adjustSubviewPositions()\n\t{\n\t\tif (mAdapter == null)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (mDataChanged)\n\t\t{\n\t\t\tint oldCurrentX = mCurrentX;\n\t\t\tinitView();\n\t\t\tremoveAllViewsInLayout();\n\t\t\tmNextX = oldCurrentX;\n\t\t\tmDataChanged = false;\n\t\t}\n\n\t\tif (mScroller.computeScrollOffset())\n\t\t{\n\t\t\tint scrollx = mScroller.getCurrX();\n\t\t\tmNextX = scrollx;\n\t\t}\n\n\t\tif (mNextX <=mMinX && !mCircleScrolling)\n\t\t{\n\t\t\tmNextX = mMinX;\n\t\t\tmScroller.forceFinished(true);\n\t\t\tif (mAdjustAnimation!=null)\n\t\t\t{\n\t\t\t\tmAdjustAnimation.stop();\n\t\t\t}\n\t\t}\n\t\tif (mNextX >= mMaxX && !mCircleScrolling)\n\t\t{\n\t\t\tmNextX = mMaxX;\n\t\t\tmScroller.forceFinished(true);\n\t\t\tif (mAdjustAnimation!=null)\n\t\t\t{\n\t\t\t\tmAdjustAnimation.stop();\n\t\t\t}\n\t\t}\n\n\t\tint dx = mCurrentX - mNextX;\n\n\t\t\n\t\tremoveNonVisibleItems(dx);\n\t\tfillList(dx);\n\t\tpositionItems(dx);\n\t\t\n\t\tmCurrentX = mNextX;\n\n\t\tif (!mScroller.isFinished())\n\t\t{\n\t\t\tpost(new Runnable()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\tadjustSubviewPositions();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (mFlinging)\n\t\t\t{\n\t\t\t\tscrollerFinished();\n\t\t\t}\n\t\t\tmFlinging = false;\n\t\t}\n\t\tinvalidate();\n\t}", "@Override\n\t\t\tpublic void onPageScrolled(int position, float positionOffset,\n\t\t\t\t\tint positionOffsetPixels)\n\t\t\t{\n\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void onPageScrolled(int position,\n\t\t\t\t\t\t\tfloat positionOffset, int positionOffsetPixels) {\n\n\t\t\t\t\t}", "public void recallScrollPos() {\n if (_primaryPlot!=null) {\n recallScrollPos(_scrollInfo.get(_primaryPlot).makeCopy());\n }\n }", "@Override\r\n\t\tpublic void onPageScrolled(int position, float positionOffset,\r\n\t\t\t\tint positionOffsetPixels) {\n\t\t\t\r\n\t\t}", "public double getPosition(double value) {\n return getRelPosition(value) * (size - nanW - negW - posW) + (min < max ? negW : posW);\n }", "public Integer getPageX() {\n return pageX;\n }", "@Override\r\n\t\t\tpublic void onPageScrolled(int position, float positionOffset,\r\n\t\t\t\t\tint positionOffsetPixels) {\n\r\n\t\t\t}", "@Override\r\n public int getAbsoluteY()\r\n {\r\n try\r\n {\r\n return pageSwitcher.getAbsoluteY();\r\n }\r\n catch(NullPointerException e)\r\n {\r\n return 0;\r\n }\r\n }", "@Override\n public void onPageScrolled(int position,\n float positionOffset, int positionOffsetPixels) {\n }", "boolean hasScrollOffsetX();", "@Override\r\n\t\tpublic void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n\t\t}", "@Override\r\n\tpublic void onPageScrolled(int position, float positionOffset,\r\n\t\t\tint positionOffsetPixels) {\n\r\n\t}", "private void setInitialSeekBarPositions() {\n portColumns.setProgress(portColumnsValue);\n portRows.setProgress(portRowsValue);\n landColumns.setProgress(landColumnsValue);\n landRows.setProgress(landRowsValue);\n }", "@Override\r\n public void onPageScrolled(int row, int column, float rowOffset,\r\n float columnOffset, int rowOffsetPixels,\r\n int columnOffsetPixels) {\n mPageIndicator.onPageScrolled(row, column, rowOffset,\r\n columnOffset, rowOffsetPixels, columnOffsetPixels);\r\n }", "@Override\n public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n }", "public int getStartingPos ()\r\n {\r\n if ((getThickness() >= 2) && !getLine()\r\n .isVertical()) {\r\n return getLine()\r\n .yAt(getStart());\r\n } else {\r\n return getFirstPos() + (getThickness() / 2);\r\n }\r\n }", "@Override\n public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n }", "@Override\n public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n }", "@Override\n public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n }", "@Override\n public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n }", "@Override\n public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n }", "protected abstract int getXOffset();", "@Override\n\t\t\tpublic void onPageScrolled(int arg0, float arg1, int arg2) {\n\t\t\t\tcurrentPosition2 = arg0;\n\t\t\t\t\n\t\t\t}", "private void setPageSettings() {\n\n List<Element> paragraphs = br.ufrgs.artic.utils.FileUtils.getElementsByTagName(\"para\", omniPageXMLDocument.getDocumentElement());\n\n int lineCounter = 0;\n int fontSizeSum = 0;\n if (paragraphs != null && !paragraphs.isEmpty()) {\n\n int biggestTop = 0;\n int biggestLeft = 0;\n for (Element paragraphElement : paragraphs) {\n\n List<Element> linesOfParagraph = br.ufrgs.artic.utils.FileUtils.getElementsByTagName(\"ln\", paragraphElement);\n\n if (linesOfParagraph != null && !linesOfParagraph.isEmpty()) {\n for (Element lineElement : linesOfParagraph) {\n String fontFace = lineElement.getAttribute(\"fontFace\");\n\n if (fontFace == null || fontFace.isEmpty()) { //if yes, start run merge process\n augmentLineElement(lineElement);\n }\n\n if (lineElement.getAttribute(\"t\") != null && !lineElement.getAttribute(\"t\").isEmpty() &&\n lineElement.getAttribute(\"l\") != null && !lineElement.getAttribute(\"l\").isEmpty()) {\n int top = Integer.parseInt(lineElement.getAttribute(\"t\").replaceAll(\",\", \"\\\\.\"));\n\n if (top > biggestTop) {\n biggestTop = top;\n }\n\n int left = Integer.parseInt(lineElement.getAttribute(\"l\").replaceAll(\",\", \"\\\\.\"));\n\n if (left > biggestLeft) {\n biggestLeft = left;\n }\n }\n\n double fontSize = 0;\n if (lineElement.getAttribute(\"fontSize\") != null && !lineElement.getAttribute(\"fontSize\").isEmpty()) {\n fontSize = Double.valueOf(lineElement.getAttribute(\"fontSize\").replaceAll(\",\", \"\\\\.\"));\n }\n\n\n fontSizeSum += fontSize;\n lineCounter++;\n }\n }\n }\n\n averagePageFontSize = (double) fontSizeSum / lineCounter;\n\n topBucketSize = (biggestTop / 8) + 1;\n leftBucketSize = (biggestLeft / 8) + 1;\n } else {\n averagePageFontSize = null;\n }\n\n\n }", "@Override\n public void onAbsoluteScrollChange(int i) {\n }", "@Override\n public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n\n }", "private void componentPositionAdjustment() {\n // set the y position of each element\n AnchorPane.setTopAnchor(nameLabel, 30.0);\n AnchorPane.setTopAnchor(name, 30.0);\n AnchorPane.setTopAnchor(fiberLabel, 70.0);\n AnchorPane.setTopAnchor(proteinLabel, 110.0);\n AnchorPane.setTopAnchor(fatLabel, 150.0);\n AnchorPane.setTopAnchor(caloriesLabel, 190.0);\n AnchorPane.setTopAnchor(carbohydrateLabel, 230.0);\n AnchorPane.setTopAnchor(fiber, 70.0);\n AnchorPane.setTopAnchor(calories, 190.0);\n AnchorPane.setTopAnchor(fat, 150.0);\n AnchorPane.setTopAnchor(carbohydrate, 230.0);\n AnchorPane.setTopAnchor(protein, 110.0);\n AnchorPane.setTopAnchor(id, 270.0);\n AnchorPane.setTopAnchor(idLabel, 270.0);\n AnchorPane.setTopAnchor(confirm, 310.0);\n AnchorPane.setTopAnchor(cancel, 310.0);\n // set the x position of each element\n AnchorPane.setLeftAnchor(fiberLabel, 20.0);\n AnchorPane.setLeftAnchor(proteinLabel, 20.0);\n AnchorPane.setLeftAnchor(fatLabel, 20.0);\n AnchorPane.setLeftAnchor(caloriesLabel, 20.0);\n AnchorPane.setLeftAnchor(carbohydrateLabel, 20.0);\n AnchorPane.setLeftAnchor(nameLabel, 20.0);\n AnchorPane.setLeftAnchor(idLabel, 20.0);\n AnchorPane.setLeftAnchor(name, 120.0);\n AnchorPane.setLeftAnchor(fiber, 120.0);\n AnchorPane.setLeftAnchor(calories, 120.0);\n AnchorPane.setLeftAnchor(fat, 120.0);\n AnchorPane.setLeftAnchor(id, 120.0);\n AnchorPane.setLeftAnchor(carbohydrate, 120.0);\n AnchorPane.setLeftAnchor(protein, 120.0);\n AnchorPane.setLeftAnchor(confirm, 50.0);\n AnchorPane.setLeftAnchor(cancel, 200.0);\n }", "public void adjustInfoContentPosition(boolean isAnimating)\r\n\t{\n\t\tint offsetY = this.m_infoAnimationScroller.getCurrY();\r\n\t\t\r\n\t\t// Offset the content view by the change in \"X\" from the previous \"X\" position\r\n\t\tthis.m_playerInfo.offsetTopAndBottom(offsetY - this.m_currentInfoOffset);\r\n\t\t\r\n\t\t// Save the current scroller's \"X\" offset value as the current offset\r\n\t\tthis.m_currentInfoOffset = offsetY;\r\n\t\t\r\n\t\t// Invalidate the layout in order to render the results of the offset on the screen\r\n\t\tthis.invalidate();\r\n\t\t\r\n\t\t// If the scroller is still animating, then refresh the animation cycle using the animation handler.\r\n\t\t// Else, the animation is ended.\r\n\t\tif(isAnimating)\r\n\t\t{\r\n\t\t\tthis.m_infoAnimationHandler.postDelayed(this.m_infoAnimationRunnable, m_animationPollingInterval);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tLog.i(\"MUSIC_PLAYER_COMTAINER\", \"adjustInfoContentPosition: Y-Parameter info: \" + (this.m_currentInfoOffset));\r\n\t\t\tthis.OnAnimationComplete();\r\n\t\t}\r\n\t}", "public int getTabPosition() {\n checkWidget();\n return onBottom ? SWT.BOTTOM : SWT.TOP;\n }", "void updatePosition() {\n if (gameScreen.cursorIsOnLeft()) \n {\n // set the panel's rightmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 11/12 - getWidth(), \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n else // Otherwise the cursor must be on the right half of the screen\n {\n // set the panel's leftmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 1/12, \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n }", "public abstract int getStartPosition();", "void onPageChanged(int position);", "@Override\n public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n\n }", "public float XOffset() {\n\t\tfloat xoffset = 0;\n\t\tif (MouseX() + 12 + (tipw * 7 + 4) > MainSim.WinX) {\t\t\t \t// If the tooltip will be outside the window (based on mousex):\n\t\t\txoffset = (MouseX() + 12 + (tipw * 7 + 4)) - MainSim.WinX; \t\t// Find how much the tip will be drawn outside\n\t\t} else {\n\t\t\txoffset = 0;\n\t\t}\n\t\treturn xoffset;\n\t}", "@Override\n\tpublic int getPosition() {\n\t\treturn 0;\n\t}", "org.apache.xmlbeans.XmlInt xgetAnchorOffset();", "public Integer getPageY() {\n return pageY;\n }", "int getStartPosition();", "int getStartPosition();", "public double getRelativeHorizontalIncrement() {\n var pane = (ScrollPane) getNode();\n var region = getRegionToScroll();\n return region == null ? 0 : increment / (region.getWidth() - pane.getViewportBounds().getWidth());\n }", "public void AdvancePos() {\n \tswitch (data3d.TrackDirection){\n \tcase 0:\n \tc2.PositionValue += 1;\n \tc2.PositionValue = (c2.PositionValue % c2.getMaxPos());\n \tbreak;\n \tcase 1:\n \tc3.PositionValue += 1;\n \tc3.PositionValue = (c3.PositionValue % c3.getMaxPos());\n \tbreak;\n \tcase 2:\n \tc1.PositionValue += 1;\n \tc1.PositionValue = (c1.PositionValue % c1.getMaxPos());\n \tbreak;\n \tcase 3:\n \tdata3d.setElement((data3d.ActiveElement + 1) % data3d.Elements);\n \tcase 4:\n \tdata3d.setTime((data3d.ActiveTime + 1) % data3d.Times);\n \t}\n }", "public static void move() {\r\n\t\t\r\n\t\tif (ths.page == 1) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "protected void calculateStickerMargin () {\r\n \t\tif (mNextSectionChild != INVALID_POSITION) {\r\n \t\t\tfinal int top = getChildAt(mNextSectionChild).getTop();\r\n \t\t\tfinal int height = mStickerSection.getHeight();\r\n \r\n \t\t\tif (top < 0 || top > height) {\r\n \t\t\t\tmStickerMargin = 0;\r\n \t\t\t} else {\r\n \t\t\t\tmStickerMargin = top - height;\r\n \t\t\t}\r\n \t\t} else {\r\n \t\t\tmStickerMargin = 0;\r\n \t\t}\r\n \t}", "public int getOffset() {\r\n\t\t\t\tint offset = pageCount * (currentPage - 1);\r\n\t\t\t\treturn offset < 0 ? 0 : offset;\r\n\t\t\t}", "public double getRelativeVerticalIncrement() {\n var pane = (ScrollPane) getNode();\n var region = getRegionToScroll();\n return region == null ? 0 : increment / (region.getHeight() - pane.getViewportBounds().getHeight());\n }", "public void onPageScrolled(int r13, float r14, int r15) {\n /*\n r12 = this;\n int r0 = r12.mDecorChildCount\n r1 = 0\n r2 = 1\n if (r0 <= 0) goto L_0x006c\n int r0 = r12.getScrollX()\n int r3 = r12.getPaddingLeft()\n int r4 = r12.getPaddingRight()\n int r5 = r12.getWidth()\n int r6 = r12.getChildCount()\n r7 = r4\n r4 = r3\n r3 = 0\n L_0x001d:\n if (r3 >= r6) goto L_0x006c\n android.view.View r8 = r12.getChildAt(r3)\n android.view.ViewGroup$LayoutParams r9 = r8.getLayoutParams()\n com.autonavi.map.widget.RecyclableViewPager$LayoutParams r9 = (com.autonavi.map.widget.RecyclableViewPager.LayoutParams) r9\n boolean r10 = r9.isDecor\n if (r10 == 0) goto L_0x0069\n int r9 = r9.gravity\n r9 = r9 & 7\n if (r9 == r2) goto L_0x004e\n r10 = 3\n if (r9 == r10) goto L_0x0048\n r10 = 5\n if (r9 == r10) goto L_0x003b\n r9 = r4\n goto L_0x005d\n L_0x003b:\n int r9 = r5 - r7\n int r10 = r8.getMeasuredWidth()\n int r9 = r9 - r10\n int r10 = r8.getMeasuredWidth()\n int r7 = r7 + r10\n goto L_0x005a\n L_0x0048:\n int r9 = r8.getWidth()\n int r9 = r9 + r4\n goto L_0x005d\n L_0x004e:\n int r9 = r8.getMeasuredWidth()\n int r9 = r5 - r9\n int r9 = r9 / 2\n int r9 = java.lang.Math.max(r9, r4)\n L_0x005a:\n r11 = r9\n r9 = r4\n r4 = r11\n L_0x005d:\n int r4 = r4 + r0\n int r10 = r8.getLeft()\n int r4 = r4 - r10\n if (r4 == 0) goto L_0x0068\n r8.offsetLeftAndRight(r4)\n L_0x0068:\n r4 = r9\n L_0x0069:\n int r3 = r3 + 1\n goto L_0x001d\n L_0x006c:\n com.autonavi.map.widget.RecyclableViewPager$OnPageChangeListener r0 = r12.mOnPageChangeListener\n if (r0 == 0) goto L_0x007d\n com.autonavi.map.widget.RecyclableViewPager$OnPageChangeListener r0 = r12.mOnPageChangeListener\n com.autonavi.map.widget.RecyclablePagerAdapter r3 = r12.mAdapter\n int r3 = r3.getRealCount()\n int r3 = r13 % r3\n r0.onPageScrolled(r3, r14, r15)\n L_0x007d:\n com.autonavi.map.widget.RecyclableViewPager$OnPageChangeListener r0 = r12.mInternalPageChangeListener\n if (r0 == 0) goto L_0x008d\n com.autonavi.map.widget.RecyclableViewPager$OnPageChangeListener r0 = r12.mInternalPageChangeListener\n com.autonavi.map.widget.RecyclablePagerAdapter r3 = r12.mAdapter\n int r3 = r3.getRealCount()\n int r13 = r13 % r3\n r0.onPageScrolled(r13, r14, r15)\n L_0x008d:\n com.autonavi.map.widget.RecyclableViewPager$PageTransformer r13 = r12.mPageTransformer\n if (r13 == 0) goto L_0x00bd\n int r13 = r12.getScrollX()\n int r14 = r12.getChildCount()\n L_0x0099:\n if (r1 >= r14) goto L_0x00bd\n android.view.View r15 = r12.getChildAt(r1)\n android.view.ViewGroup$LayoutParams r0 = r15.getLayoutParams()\n com.autonavi.map.widget.RecyclableViewPager$LayoutParams r0 = (com.autonavi.map.widget.RecyclableViewPager.LayoutParams) r0\n boolean r0 = r0.isDecor\n if (r0 != 0) goto L_0x00ba\n int r0 = r15.getLeft()\n int r0 = r0 - r13\n float r0 = (float) r0\n int r3 = r12.getClientWidth()\n float r3 = (float) r3\n float r0 = r0 / r3\n com.autonavi.map.widget.RecyclableViewPager$PageTransformer r3 = r12.mPageTransformer\n r3.transformPage(r15, r0)\n L_0x00ba:\n int r1 = r1 + 1\n goto L_0x0099\n L_0x00bd:\n r12.mCalledSuper = r2\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.autonavi.map.widget.RecyclableViewPager.onPageScrolled(int, float, int):void\");\n }", "private Point2D computeLayoutOrigin() {\r\n\r\n\t\tDimension size = getSize();\r\n\r\n\t\tPoint2D.Float origin = new Point2D.Float();\r\n\r\n\t\torigin.x = (float) (size.width - textLayout.getAdvance()) / 2;\r\n\t\torigin.y = (float) (size.height - textLayout.getDescent() + textLayout\r\n\t\t\t\t.getAscent()) / 2;\r\n\r\n\t\treturn origin;\r\n\t}", "public int getPageIncrement() {\n \tcheckWidget();\n \treturn pageIncrement;\n }", "public int getScrollOffset() {\n return visibility.getValue();\n }", "public PointPageIndicator setCurrentPosition(int position) {\n mPosition = position;\n invalidate();\n return this;\n }", "protected Vector3D getStartPosition(){\r\n\t\treturn new Vector3D(\r\n\t\t\t\tpnlSubDeviceButtons.getPosition( TransformSpace.GLOBAL).getX(),\r\n\t\t\t\tpnlSubDeviceButtons.getPosition( TransformSpace.GLOBAL).getY() + pnlSubDeviceButtons.getHeightXY( TransformSpace.GLOBAL)\r\n\t\t);\r\n\t}", "@Override\n public PointF computeScrollVectorForPosition\n (int targetPosition) {\n return MyCustomLayoutManager.this\n .computeScrollVectorForPosition(targetPosition);\n }", "@Override\n protected void onLayout(boolean changed, int l, int t, int r, int b) {\n final int count = getChildCount();\n\n for (int i = 0; i < count; i++) {\n View child = getChildAt(i);\n if (child.getVisibility() != GONE) {\n if (i == MAX_PAGE_SIZE - 2) {\n // Log.d(TAG,\n // \"mTranslationY + mTranslationX = \"\n // + (Math.abs(mTranslationX) + Math\n // .abs(mTranslationY)));\n float moved = Math.abs(mTranslationX)\n + Math.abs(mTranslationY);\n float scale = 0.8F + moved / 2000;\n child.setScaleX(scale < 0.9F ? scale : 0.9F); // 0.8->0.9\n child.setScaleY(scale < 0.9F ? scale : 0.9F);\n float trY = 50 - (scale - 0.8F) * 250;\n child.setTranslationY(trY > 25 ? TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, trY, getResources()\n .getDisplayMetrics()) : TypedValue\n .applyDimension(TypedValue.COMPLEX_UNIT_DIP, 25,\n getResources().getDisplayMetrics())); // 50->25\n } else if (i == MAX_PAGE_SIZE - 1) {\n float moved = Math.abs(mTranslationX)\n + Math.abs(mTranslationY);\n float scale = 0.9F + moved / 2000;\n child.setScaleX(scale < 1 ? scale : 1); // 0.9 -> 1.0\n child.setScaleY(scale < 1 ? scale : 1);\n float trY = 25 - (scale - 0.9F) * 250;\n child.setTranslationY(trY > 0 ? TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, trY, getResources()\n .getDisplayMetrics()) : 0); // 25->0\n } else if (i == MAX_PAGE_SIZE) {\n // Log.d(TAG, \"mtouchDownX = \" + touchDownX\n // + \", mtouchDownY = \" + touchDownY);\n child.setTranslationX(mTranslationX);\n child.setTranslationY(mTranslationY);\n float rotation;\n if (touchDownY < (b - t) / 2) {\n rotation = mTranslationX / 20;\n } else {\n rotation = -mTranslationX / 20;\n }\n if (rotation > 0) {\n child.setRotation(rotation < 20 ? rotation : 20);\n } else {\n child.setRotation(rotation > -20 ? rotation : -20);\n }\n } else {\n child.setScaleX(0.8F);\n child.setScaleY(0.8F);\n child.setTranslationY(TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, 50, getResources()\n .getDisplayMetrics()));\n }\n }\n }\n super.onLayout(changed, l, t, r, b);\n }", "@java.lang.Override\n public int getScrollOffsetX() {\n return instance.getScrollOffsetX();\n }", "protected boolean checkScrollPosition(){\n\t\treturn false;\n\t}", "private void updatePosition(){\n updateXPosition(true);\n updateYPosition(true);\n }", "private void autoAdjustArrowPos(PopupWindow popupWindow, View contentView, View anchorView) {\n }", "private void updateRootPos() {\n if (!Root.getChildren().contains(scrollBar)) {\n scrollBar.setValue(0);\n setRootYPos(0);\n return;\n }\n\n int sbUpper = getScrollVal();\n int sbLower = sbUpper + round(windowHeight);\n\n int textHeight = getTextHeight();\n if (textHeight < sbLower) {\n setRootYPos(-(sbUpper - (sbLower - textHeight)));\n scrollBar.setValue(scrollBar.getMax());\n }\n\n int cursorYUPos = round(cursor.getY());\n int cursorYDPos = cursorYUPos + round(cursor.getHeight());\n if (cursorYUPos >= sbUpper && cursorYDPos <= sbLower) {\n return;\n }\n if (cursorYUPos < sbUpper) {\n int mov = sbUpper - cursorYUPos;\n setRootYPos(-(sbUpper - mov));\n scrollBar.setValue(sbUpper - mov);\n } else {\n int mov = cursorYDPos - sbLower;\n setRootYPos(-(sbUpper + mov));\n scrollBar.setValue(sbUpper + mov);\n }\n\n }", "private void updateShapeOffset() {\n int offsetX = scroller.getOffsetX();\n int offsetY = scroller.getOffsetY();\n shape.setOffset(offsetX, offsetY);\n }", "private int valueToPos( final double value )\n\t{\n\t\tfinal double dmin = range.getMinBound();\n\t\tfinal double dmax = range.getMaxBound();\n\t\treturn ( int ) Math.round( ( value - dmin ) * SLIDER_LENGTH / ( dmax - dmin ) );\n\t}", "void find_it () {\n xt = 210; yt = 105; fact = 50.0;\n if (viewflg != VIEW_FORCES) zoom_slider_pos_y = 50;\n current_part.spanfac = (int)(2.0*fact*current_part.aspect_rat*.3535);\n xt1 = xt + current_part.spanfac;\n yt1 = yt - current_part.spanfac;\n xt2 = xt - current_part.spanfac;\n yt2 = yt + current_part.spanfac;\n \n }", "public float getPos() {\n return ((spos-xpos))/(sposMax-sposMin);// * ratio;\n }", "private void updateScrollPosition() {\n int oldTop = scrollTop;\n int oldLeft = scrollLeft;\n scrollTop = DOM.getElementPropertyInt(getElement(), \"scrollTop\");\n scrollLeft = DOM.getElementPropertyInt(getElement(), \"scrollLeft\");\n if (connection != null && !rendering) {\n if (oldTop != scrollTop) {\n connection.updateVariable(id, \"scrollTop\", scrollTop, false);\n }\n if (oldLeft != scrollLeft) {\n connection.updateVariable(id, \"scrollLeft\", scrollLeft, false);\n }\n }\n }", "protected int getMarkerPosition() {\n\t\treturn valueToMarkerPosition(getValue());\n\t}", "public double getPlanPosition(double percentPos){\n return percentPos * (illustration.getOriginalWidth()/horizontalMeter);\n }", "private int getFooterViewPosition() {\n if (getEmptyViewCount() == 1) {\n int position = 1;\n if (mHeadAndEmptyEnable && getHeaderLayoutCount() != 0) {\n position++;\n }\n if (mFootAndEmptyEnable) {\n return position;\n }\n } else {\n return getHeaderLayoutCount() + mData.size();\n }\n return -1;\n }", "public void updateXPosition(){\r\n if (centerX + speedX <= 60) {\r\n centerX = 60;\r\n }\r\n if(centerX + bg.getBackX() > 4890) {\r\n bg.setBackX(4890-startScrolling);\r\n if(centerX + speedX >= 1500) {\r\n centerX = 1500;\r\n rect1= new FloatRect (centerX,centerY,80,110);\r\n }\r\n if(centerX < 1504) {\r\n centerX+=speedX;\r\n rect1= new FloatRect (centerX,centerY,80,110);\r\n }\r\n }\r\n else if (speedX < 0) {\r\n centerX += speedX;\r\n rect1= new FloatRect (centerX,centerY,80,110);\r\n }\r\n else {\r\n if (centerX <= startScrolling) {\r\n centerX += speedX;\r\n rect1= new FloatRect (centerX,centerY,80,110);\r\n } else {\r\n background.setPosition((-bg.getBackX ()),0);\r\n }\r\n }\r\n }", "@Override\n public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {\n\n final int screenHeight = getResources().getDisplayMetrics().heightPixels;\n\n //get the absolute position on screen\n final int[] bottomViewLocation = new int[2];\n mBottomSheetViewGroup.getLocationOnScreen(bottomViewLocation);\n\n // detect if it will be off screen when animation occurs\n int translationYLocation = CU.dp2px(mBottomSheetViewGroup.getContext(),mBottomSheetInitialPositionOffsetInDp) + bottomViewLocation[1];\n if (translationYLocation > screenHeight) {\n int barHeight = mTextViewDataEntry.getHeight();\n\n //snap it to the bottom of the screen\n mBottomSheetInitialPositionOffsetInDp = CU.px2dp(mBottomSheetViewGroup.getContext(), screenHeight - bottomViewLocation[1] - barHeight);\n mBottomSheetAnimator = setupBottomSheetAnimator();\n mBottomSheetViewGroup.setTranslationY(CU.dp2px(mBottomSheetViewGroup.getContext(), mBottomSheetInitialPositionOffsetInDp));\n } else {\n mBottomSheetViewGroup.setTranslationY(CU.dp2px(mBottomSheetViewGroup.getContext(), mBottomSheetInitialPositionOffsetInDp));\n }\n mBottomSheetViewGroup.removeOnLayoutChangeListener(this);\n }", "@Override\n public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n final int width = getWidth();\n PagerAdapter adapter = RtlViewPager.super.getAdapter();\n if (isRtl() && adapter != null) {\n int count = adapter.getCount();\n int remainingWidth = (int) (width * (1 - adapter.getPageWidth(position))) + positionOffsetPixels;\n while (position < count && remainingWidth > 0) {\n position += 1;\n remainingWidth -= (int) (width * adapter.getPageWidth(position));\n }\n position = count - position - 1;\n positionOffsetPixels = -remainingWidth;\n positionOffset = positionOffsetPixels / (width * adapter.getPageWidth(position));\n }\n mListener.onPageScrolled(position, positionOffset, positionOffsetPixels);\n }", "public void onDraw(Canvas canvas) {\n float f;\n float f2;\n super.onDraw(canvas);\n if (this.mPageMargin > 0 && this.mMarginDrawable != null && this.mItems.size() > 0 && this.mAdapter != null) {\n int scrollX = getScrollX();\n int width = getWidth();\n float f3 = (float) width;\n float f4 = ((float) this.mPageMargin) / f3;\n int i = 0;\n ItemInfo itemInfo = this.mItems.get(0);\n if (itemInfo != null) {\n float f5 = itemInfo.offset;\n int size = this.mItems.size();\n int i2 = itemInfo.position;\n int i3 = this.mItems.get(size - 1).position;\n while (i2 < i3) {\n while (i2 > itemInfo.position && i < size) {\n i++;\n itemInfo = this.mItems.get(i);\n }\n if (i2 == itemInfo.position) {\n f = (itemInfo.offset + itemInfo.widthFactor) * f3;\n f5 = itemInfo.offset + itemInfo.widthFactor + f4;\n } else {\n float pageWidth = this.mAdapter.getPageWidth(i2);\n f = (f5 + pageWidth) * f3;\n f5 += pageWidth + f4;\n }\n if (((float) this.mPageMargin) + f > ((float) scrollX)) {\n f2 = f4;\n this.mMarginDrawable.setBounds((int) f, this.mTopPageBounds, (int) (((float) this.mPageMargin) + f + 0.5f), this.mBottomPageBounds);\n this.mMarginDrawable.draw(canvas);\n } else {\n Canvas canvas2 = canvas;\n f2 = f4;\n }\n if (f > ((float) (scrollX + width))) {\n break;\n }\n i2++;\n f4 = f2;\n }\n }\n }\n }", "private int findCurrentPosition(int coordinateY) {\n /**\n * This parameter is used to find our currently center coordinateY. Because of the marginTop\n * we have set, we don't specific re-calculate centerCoordinate with adding half rect-height\n * e.g. if coordinateY = 0, the the parameter equals .5*ChildHeight, which will correctly\n * located at child view index0\n * */\n int centerRectCenterCoordinateY =\n coordinateY + (int) Math.abs(mPopItemHeight *0.5);\n /**\n * If the center coordinateY is beyond a childheight, current position will change as well\n * */\n return (centerRectCenterCoordinateY / mPopItemHeight);\n }", "private void addIndicator() {\n createIndicator(mCurrentAdapterSize);\n mViewPager.setCurrentItem(mViewPager.getAdapter().getCount() - 1);\n }", "@Override\n public double getPosition()\n {\n final String funcName = \"getPosition\";\n double pos = getMotorPosition() - zeroPosition;\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", pos);\n }\n\n return pos;\n }", "Point onPage();", "public void updatePageValueBeforeRecording() {\n // Ensure the display starts with the play cursor inside the page\n cursorTimelinePage.setValue(cursorTimelinePlay.getValue());\n\n // Place cursors to make sense\n double fltDataAmountPercent = getDataAmountAsPercent();\n if (cursorTimelinePlay.getValue() > fltDataAmountPercent) {\n // Play cursor cannot be further right than real file length percentage\n cursorTimelinePlay.setValue(fltDataAmountPercent);\n }\n if (cursorTimelineEnd.getValue() > fltDataAmountPercent) {\n // End cursor cannot be further right than real file length percentage\n cursorTimelineEnd.setValue(fltDataAmountPercent);\n }\n if (cursorTimelineEnd.getValue() < cursorTimelinePlay.getValue()) {\n // End cursor is set to real file length percentage if placed before the play cursor\n cursorTimelineEnd.setValue(fltDataAmountPercent);\n }\n }", "@Override\n public void onPageScrolled(int position, float positionOffset,\n int positionOffsetPixels) {\n\n if (positionOffset > 0 && position < mTabIndicator.size() - 1) {\n ChangeColorIconWithTextView left = mTabIndicator.get(position);\n ChangeColorIconWithTextView right = mTabIndicator.get(position + 1);\n\n left.setIconAlpha(1 - positionOffset);\n right.setIconAlpha(positionOffset);\n }\n\n }", "@Override\n public void onPageSelected(int position) {\n footerIndicator1.setImageResource(R.drawable.page_dot_2);\n footerIndicator2.setImageResource(R.drawable.page_dot_2);\n footerIndicator3.setImageResource(R.drawable.page_dot_2);\n footerIndicator4.setImageResource(R.drawable.page_dot_2);\n indicatorAction(position);\n }", "short getPageStart();", "protected void applyOffsetCorrection() {\n\t\t// Check collision with the left side of the window\n\t\tint overflow = -x;\n\t\tint balloonWidth = balloonTip.getWidth();\n\n\t\tif (overflow > 0) {\n\t\t\tx += overflow;\n\t\t\thOffset -= overflow;\n\t\t\t// Take into account the minimum horizontal offset\n\t\t\tif (hOffset < minimumHorizontalOffset) {\n\t\t\t\thOffset = minimumHorizontalOffset;\n\t\t\t\tif (flipX) {\n\t\t\t\t\tx += -overflow + (balloonWidth - preferredHorizontalOffset) - minimumHorizontalOffset;\n\t\t\t\t}else {\n\t\t\t\t\tx += -overflow + preferredHorizontalOffset - minimumHorizontalOffset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check collision with the right side of the window\n\t\toverflow = (x+balloonWidth) - balloonTip.getTopLevelContainer().getWidth();\n\t\tif (overflow > 0) {\n\t\t\tx -= overflow;\n\t\t\thOffset += overflow;\n\n\t\t\t// Take into account the minimum horizontal offset\n\t\t\tif (hOffset > balloonWidth - minimumHorizontalOffset) {\n\t\t\t\thOffset = balloonWidth - minimumHorizontalOffset;\n\t\t\t\tif (flipX) {\n\t\t\t\t\tx += overflow + preferredHorizontalOffset + minimumHorizontalOffset;\n\t\t\t\t}else {\n\t\t\t\t\tx += overflow - (balloonWidth - preferredHorizontalOffset) + minimumHorizontalOffset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}", "double a_marker_position ()\n {\n double l_return = 0.0;\n\n if (marker != null)\n {\n l_return = marker.getPosition ();\n }\n\n return l_return;\n\n }", "private void checkOffset() {\n\t\tfloat CurZ=mApplications.get(CurIndex).getZ();\r\n\t\tfloat diff=0;\r\n\t\tfloat offset=ApplicationInfo.getOffset();\r\n\t\tLog.d(TAG, \"checkOffset: \"+ApplicationInfo.Destination);\r\n\t\tif(ApplicationInfo.IsScrolling)\r\n\t\t{\r\n\t\t\tif(offset > 0 && CurZ < Constants.displayedPlace \r\n\t\t\t\t\t&& (diff=glview.floorby2(Constants.displayedPlace - CurZ)) < offset)\r\n\t\t\t{\r\n\t\t\t\toffset=diff;\r\n\t\t\t}\r\n\t\t\telse if(offset < 0 && CurZ > Constants.displayedPlace \r\n\t\t\t\t\t&& (diff=glview.floorby2(CurZ - Constants.displayedPlace)) < offset)\r\n\t\t\t{\r\n\t\t\t\toffset=-diff;\r\n\t\t\t}\r\n\t\t\tApplicationInfo.setOffset(offset);\r\n\t\t\treturn ;\r\n\t\t}\r\n \t\tswitch(ApplicationInfo.Destination)\r\n \t\t{\r\n \t\tcase Constants.TO_BACK:\r\n \t\t\tif((diff=glview.floorby2(CurZ - Constants.originPlace)) < offset)\r\n \t\t\t\toffset=-diff;\r\n \t\t\tbreak;\r\n \t\tcase Constants.TO_BACKWARD_CENTER:\r\n \t\t\tif((diff=glview.floorby2(CurZ - Constants.displayedPlace)) < offset)\r\n \t\t\t\toffset=-diff;\r\n \t\t\tbreak;\r\n \t\tcase Constants.TO_FORWARD_CENTER:\r\n \t\t\tif((diff=glview.floorby2(Constants.displayedPlace - CurZ)) < offset)\r\n \t\t\t\toffset=diff;\r\n \t\t\tbreak;\r\n \t\tcase Constants.TO_FRONT:\r\n \t\t\tif((diff=glview.floorby2(Constants.disapearedPlace - CurZ)) < offset)\r\n \t\t\t\toffset=diff;\r\n \t\t\tbreak;\r\n \t\t}\r\n \t\tApplicationInfo.setOffset(offset);\r\n\t}", "private void updateLinePositions() {\n\n\t\tif (alLabelLines.size() == 0) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tfloat fXLinePosition = fXContainerLeft + CONTAINER_BOUNDARY_SPACING;\n\n\t\t\tLabelLine firstLine = alLabelLines.get(0);\n\t\t\tfloat fYLinePosition = fYContainerCenter + (fHeight / 2.0f)\n\t\t\t\t\t- CONTAINER_BOUNDARY_SPACING - firstLine.getHeight();\n\t\t\tfirstLine.setPosition(fXLinePosition, fYLinePosition);\n\n\t\t\tfor (int i = 1; i < alLabelLines.size(); i++) {\n\t\t\t\tLabelLine currentLine = alLabelLines.get(i);\n\t\t\t\tfYLinePosition -= (currentLine.getHeight() + CONTAINER_LINE_SPACING);\n\t\t\t\tcurrentLine.setPosition(fXLinePosition, fYLinePosition);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n // Code goes here\n }", "@Override\n public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n // Code goes here\n }", "@Override\n public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\n // Code goes here\n }", "private void recalculate()\n {\n this.totalPages = this.contents.size() > 54 ? this.contents.size() / 45 : 1;\n }", "public void estimateLocations( DockLayoutComposition composition ){\n estimateLocations( composition, composition.getLayout().getLocation() );\n }" ]
[ "0.6097318", "0.5955377", "0.5895611", "0.589384", "0.57849485", "0.5760097", "0.5741138", "0.57374036", "0.5706786", "0.56591547", "0.56475234", "0.56462824", "0.5634857", "0.5630764", "0.56124794", "0.55842996", "0.5573056", "0.5562297", "0.55622566", "0.5561785", "0.5549387", "0.55431944", "0.55141085", "0.548211", "0.5476005", "0.54679865", "0.54679626", "0.5467061", "0.5449249", "0.5442279", "0.5442279", "0.5442279", "0.5442279", "0.5442279", "0.5440454", "0.5422214", "0.54206055", "0.5416754", "0.5414822", "0.5412203", "0.5409055", "0.54033893", "0.53811216", "0.537308", "0.5357599", "0.53361225", "0.53283423", "0.53224635", "0.53116524", "0.53096664", "0.5305939", "0.5305939", "0.53044826", "0.5304454", "0.5295014", "0.52884525", "0.52862155", "0.5285054", "0.5283481", "0.52741414", "0.527263", "0.5268791", "0.5268525", "0.5266142", "0.52511066", "0.52506447", "0.5247241", "0.52472395", "0.5237822", "0.5233573", "0.52333355", "0.5233175", "0.5231511", "0.52268374", "0.5222659", "0.5206256", "0.5202499", "0.519669", "0.5192754", "0.51877916", "0.51806253", "0.5176992", "0.5176965", "0.51747143", "0.5168837", "0.51641667", "0.5161806", "0.5161099", "0.51512355", "0.51468503", "0.5140121", "0.51226", "0.5120796", "0.5119605", "0.51191247", "0.5117547", "0.5117547", "0.5117547", "0.50972545", "0.5096874" ]
0.6426289
0
Listener for PDFViewCtrl visibility change event
public interface OnPDFViewVisibilityChanged { /** * This method will be invoked when PDFViewCtrl visibility has changed * * @param prevVisibility previous PDFViewCtrl visibility * @param currVisibility current PDFViewCtrl visibility */ void onPDFViewVisibilityChanged(int prevVisibility, int currVisibility); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onPDFViewVisibilityChanged(int prevVisibility, int currVisibility);", "void onControlVisibilityChange(Object object, boolean visible);", "@Subscribe\n public void onViewChangedEvent(final ViewChangedEvent event) {\n if (event.getViewKey().equals(ViewKey.HEADER)) {\n log.trace(\"Saw a ViewChangedEvent {}\", event);\n\n log.debug(\"Header now has visibility: {} \", event.isVisible());\n balanceDisplayMaV.getView().setVisible(event.isVisible());\n if (alertMessageLabel.getText().length() != 0 && event.isVisible()) {\n alertPanel.setVisible(event.isVisible());\n }\n\n balanceDisplayMaV.getView().updateView(Configurations.currentConfiguration);\n }\n }", "public void onVisible() {\r\n System.out.println(\"toolkit.AbstractDemo.onVisible()\");\r\n }", "public interface C27129e {\n void onVisibilityChanged(boolean z);\n }", "public final void updateViewVisibility() {\n boolean z;\n MediaHostStateHolder mediaHostStateHolder = this.state;\n if (getShowsOnlyActiveMedia()) {\n z = this.mediaDataManager.hasActiveMedia();\n } else {\n z = this.mediaDataManager.hasAnyMedia();\n }\n mediaHostStateHolder.setVisible(z);\n int i = getVisible() ? 0 : 8;\n if (i != getHostView().getVisibility()) {\n getHostView().setVisibility(i);\n Iterator<T> it = this.visibleChangedListeners.iterator();\n while (it.hasNext()) {\n ((Function1) it.next()).invoke(Boolean.valueOf(getVisible()));\n }\n }\n }", "void onFadingViewVisibilityChanged(boolean visible);", "public interface VisibilityListener {\n void onVisibilityChanged(int i);\n}", "@Override\n public void setVisible (boolean f)\n { \n }", "@Override\n\tpublic void setVisible(boolean vis) {\n\t\t\n\t}", "private void videoVisible() {\n }", "public boolean isRemovedToInvisibleEvent(int oldIndex) {\r\n return isVisibilityChange;\r\n }", "@Override\n public void setVisible(boolean arg0)\n {\n \n }", "@Override\n public void changed(ObservableValue<? extends Boolean> ov, Boolean onHidden, Boolean onShown) {\n }", "@Override\r\n public void onValidStateEvent(ValidStateEvent event) {\r\n if(event.getViewType() == ValidStateEvent.ViewType.Protein) {\r\n hiding = false;\r\n getView().asWidget().setVisible(true);\r\n }\r\n else {\r\n hiding = true;\r\n getView().asWidget().setVisible(false);\r\n }\r\n }", "@Override protected void onVisibilityChanged(View changedView, int visibility) {\n super.onVisibilityChanged(changedView, visibility);\n if (changedView != this) {\n return;\n }\n\n if (visibility == View.VISIBLE) {\n resume();\n } else {\n pause();\n }\n }", "private void onShowingChanged(ObservableValue<? extends Boolean> pObservable, Boolean pOldValue, Boolean pNewValue)\n\t\t{\n\t\t\tif (!pNewValue.booleanValue())\n\t\t\t{\n\t\t\t\tfireEditingComplete(ICellEditorListener.FOCUS_LOST);\n\t\t\t}\n\t\t}", "@Override\n protected void onWindowVisibilityChanged(int visibility) {\n super.onWindowVisibilityChanged(visibility);\n switch (visibility) {\n case View.GONE:\n break;\n case View.INVISIBLE:\n break;\n case View.VISIBLE:\n break;\n }\n }", "public void setVisible(boolean val);", "public void onWindowVisibilityChanged(int visibility) {\n super.onWindowVisibilityChanged(visibility);\n OnWindowVisibilityChangedListener onWindowVisibilityChangedListener = this.mOnWindowVisibilityChangedListener;\n if (onWindowVisibilityChangedListener != null) {\n onWindowVisibilityChangedListener.onWindowVisibilityChanged(visibility);\n }\n }", "public boolean isAddedFromInvisibleEvent(int newIndex) {\r\n return isVisibilityChange;\r\n }", "public boolean isVisible(){ return visible; }", "void notifyVisibilityStatusDecrease(JDPoint p);", "@Override\n public boolean isVisible()\n {\n return true;\n }", "public void setVisible(boolean v) {\n }", "@Override\n\tpublic void setVisible(boolean b) {\n\t\t\n\t}", "public boolean isVisible() { return _visible; }", "public void setVisible(Boolean isVisible);", "public void setVisible( boolean v) {\r\n visible = v;\r\n }", "public boolean isVisible();", "public boolean isVisible();", "public boolean isVisible();", "boolean isVisible();", "boolean isVisible();", "public boolean isVisible(Visibility v);", "public void scrollChanged(boolean vertical) {\n final PDF.Scrolling scroll = pdfView.getScroll(vertical);\n Point newLocation = new Point(getViewLocation());\n\n if (vertical)\n newLocation.y = scroll.getCurrent();\n else\n newLocation.x = scroll.getCurrent();\n\n if (!hasValidDocument() || newLocation.equals(getViewLocation()))\n return;\n\n final Rectangle visibleRect = getVisibleViewRect(newLocation);\n Set<Integer> pages = docCache.pagesInRect(visibleRect);\n int visiblePage = -1, newActivePage = -1;\n\n if (viewMode.isSinglePage()) {\n // determine new active page\n newActivePage = activePage;\n final int prevPage = activePage - 1;\n final int nextPage = activePage + 1;\n if (pages.contains(activePage)) {\n if (pages.contains(prevPage))\n newActivePage = prevPage;\n else if (pages.contains(nextPage) && (!pageHeightInView(activePage) || docCache.getPageBounds(activePage, true).y < visibleRect.y))\n newActivePage = nextPage;\n } else if (!pages.isEmpty())\n newActivePage = Collections.min(pages);\n\n // calculate new location of visible view\n if (newActivePage != activePage) {\n Rectangle newPageBounds = docCache.getPageBounds(newActivePage, true);\n if (newActivePage == prevPage && !pageHeightInView(newActivePage)) {\n newLocation = new Point(newPageBounds.x, (int) Math.round(newPageBounds.getMaxY() - visibleRect.getHeight()));\n } else {\n newLocation = newPageBounds.getLocation();\n }\n }\n visiblePage = newActivePage;\n\n if (newActivePage != activePage && scroll.inProgress()) {\n // prohibit page change when scroll is captured, as it causes\n // view stuttering\n return;\n }\n } else {\n if (pages.isEmpty()) {\n visiblePage = topViewPage;\n } else {\n final int visibleCenterY = (int) Math.round(visibleRect.getCenterY());\n visiblePage = Collections.min(pages);\n\n final Rectangle rectHalfTop = new Rectangle(visibleRect);\n rectHalfTop.height /= 2;\n int lastTop = visiblePage;\n for (Integer index : pages) {\n if (docCache.getPageBounds(index, false).intersects(rectHalfTop) && index > lastTop)\n lastTop = index;\n }\n\n final Rectangle rectHalfBottom = new Rectangle(visibleRect);\n rectHalfBottom.y = visibleCenterY;\n rectHalfBottom.height /= 2;\n int firstBottom = Collections.max(pages);\n for (Integer index : pages) {\n if (docCache.getPageBounds(index, false).intersects(rectHalfBottom) && index < firstBottom)\n firstBottom = index;\n }\n\n if (lastTop == firstBottom)\n newActivePage = lastTop;\n else {\n newActivePage = ((visibleCenterY - Math.round(docCache.getPageBounds(lastTop, false).getMaxY())) < (docCache.getPageBounds(firstBottom, false).y - visibleCenterY)) ? lastTop : firstBottom;\n }\n }\n }\n goToPositionAbsolute(visiblePage, newLocation);\n setActivePage(newActivePage);\n }", "private void Visibility(Boolean vis) {\n jSP1.setVisible(vis);\r\n jSP2.setVisible(vis);\r\n loadFile.setVisible(!vis);\r\n saveFile.setVisible(!vis);\r\n sourceFileLabel.setVisible(!vis);\r\n sourceFileName.setVisible(!vis);\r\n resultFileLabel.setVisible(!vis);\r\n resultFileName.setVisible(!vis);\r\n }", "public void setVisible(Boolean visible);", "public void setVisible(boolean newVal) {\n if (newVal != visible) {\n visible = newVal;\n listeners.firePropertyChange(PROPERTY_VISIBLE, !visible, visible);\n }\n }", "public abstract boolean isVisible();", "public abstract boolean isVisible();", "@Override\n\tpublic void setVisibility(int visibility) {\n\t\tsuper.setVisibility(visibility);\n\t\tif(visibility==View.VISIBLE){\n\t\t\ttoggleOnAreaChange();\n\t\t}\n\t}", "private void handleVisibility(int previousView) {\n switch (previousView) {\n case 1:\n tvFitstreetOrganizedContests.setVisibility(View.GONE);\n break;\n case 2:\n tvFitstreetParticipateContests.setVisibility(View.GONE);\n break;\n case 3:\n tvFitstreetContestsPrizeMoney.setVisibility(View.GONE);\n break;\n }\n }", "public void setVisible(boolean newVisible)\n {\n this.visible = newVisible;\n conditionallyRepaint();\n }", "public abstract void setVisible(boolean visible);", "public Boolean isVisible();", "public Boolean isVisible();", "public boolean isVisible()\n {\n return visible;\n }", "@Override // androidx.lifecycle.Observer\n public void onChanged(Boolean bool) {\n Boolean bool2 = bool;\n if (bool2 != null) {\n bool2.booleanValue();\n Views.setVisible(AdvertStatsActivity.access$getToolbarTitle$p(this.a), bool2.booleanValue());\n }\n }", "public void setVisible(boolean b) {\n\t\t\n\t}", "@Override\n\tpublic void setVisible(boolean visibility) {\n\t\t//do nothing\n\t}", "void msgViewableChanged() {\n resetViewport(start);\n }", "void setVisible(boolean visible);", "void setVisible(boolean visible);", "public void setVisible(boolean visible);", "public void sliceDisplayChanged() {\n hide();\n for (int idx = 0; idx<nChannels; idx++) {\n Displaysettings.applyDisplaysettings(ini_sources[idx], displaysettings[idx]);\n Displaysettings.applyDisplaysettings(getRegisteredSourcesAtStep(stepBack)[idx], displaysettings[idx]);\n }\n show();\n }", "public boolean isVisible(){\n \t\treturn visible;\n \t}", "void notifyVisibleBoundsChanged();", "void notifyVisibilityStatusIncrease(JDPoint p);", "@Override\r\n\t\t\tpublic void partVisible(IWorkbenchPartReference partRef) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void addOnMenuVisibilityListener(OnMenuVisibilityListener listener) {\n\t\t\n\t}", "public void setIsVisible(boolean isVisible);", "@Override\n public void makeVisible(Player viewer) {\n \n }", "@Override\n public void setVisibility(int visibility) {\n // For some reason FrameView does not forward visiblity to it children. So we manually\n // override it to do so. That way when this view is invisible or gone we don't show an ad.\n int originalVisiblity = super.getVisibility();\n\n if (originalVisiblity != visibility) {\n synchronized (this) {\n // Forward the visibility event to all the children.\n int children = getChildCount();\n\n for (int i = 0; i < children; i++) {\n View child = getChildAt(i);\n child.setVisibility(visibility);\n }\n\n // Continue processing the event.\n super.setVisibility(visibility);\n\n // Get or remove ads depending on visiblity.\n if (visibility == View.VISIBLE) {\n requestFreshAd();\n } else {\n // Remove the old ad so we fade into the new one.\n removeView(ad);\n ad = null;\n invalidate();\n }\n }\n }\n }", "public void setVisible(boolean val)\r\n\t{\r\n\t\t_isOn = val;\r\n\t}", "abstract void onHidden();", "public void onVisibilityChanged(View view, int i) {\n AppMethodBeat.m2504i(92671);\n super.onVisibilityChanged(view, i);\n if (i != 0) {\n dismissToolTip();\n }\n AppMethodBeat.m2505o(92671);\n }", "public void updateVisible(){\n if (serviceManager.isCustomerQueMode() == true && serviceManager.isManagerMode() == false) {\n this.setVisible(true);\n } else {\n this.setVisible(false);\n }\n// System.out.println(serviceManager.isCustomerQueMode());\n }", "public void stateChanged(ChangeEvent param1ChangeEvent) {\n/* 1503 */ if (param1ChangeEvent == null) {\n/* 1504 */ throw new NullPointerException();\n/* */ }\n/* 1506 */ firePropertyChange(\"AccessibleVisibleData\", \n/* 1507 */ Boolean.valueOf(false), \n/* 1508 */ Boolean.valueOf(true));\n/* */ }", "public void changeHasInvisibility()\r\n\t{\r\n\t\thasInvisibility = !hasInvisibility;\r\n\t}", "public void onWindowVisibilityChanged(int visibility) {\n super.onWindowVisibilityChanged(visibility);\n if (!isInEditMode() && this.f66a.mo7172i().f609g.mo7347a().mo7233b() && visibility != 0 && this.f66a.mo7172i().f614l.mo7348a() != null && this.f66a.mo7172i().f607e.mo7347a() != null) {\n if (!AdActivity.isShowing() || AdActivity.leftApplication()) {\n f65b.mo7098a(this.f66a.mo7172i().f607e.mo7347a(), \"onleaveapp\", (String) null);\n } else {\n f65b.mo7098a(this.f66a.mo7172i().f607e.mo7347a(), \"onopeninapp\", (String) null);\n }\n }\n }", "public boolean isVisible() {\n return true;\n }", "public void setVisible(boolean value) {\n\t\tvisible = value;\n\t}", "public void firePartVisible(final IWorkbenchPartReference ref) {\n Object[] array = getListeners();\n for (int i = 0; i < array.length; i++) {\n final IPartListener2 l;\n if (array[i] instanceof IPartListener2) {\n l = (IPartListener2) array[i];\n } else {\n continue;\n }\n fireEvent(new SafeRunnable() {\n\n @Override\n public void run() {\n l.partVisible(ref);\n }\n }, l, ref, //$NON-NLS-1$\n \"visible::\");\n }\n }", "public void updateCPView(boolean visible) {\n\t\tviewMenu.updateCPView(visible);\n\t}", "private void setFormVisible(boolean value){\r\n vb_form.setVisible(value); //Establece el estado grafico del formulario\r\n// if(value){ //Si el estado es visible entonces \r\n// vb_table.relocate(30, 439);\r\n// vb_table.setPrefHeight(133);\r\n// }else{\r\n// vb_table.relocate(30, 64);\r\n// vb_table.setPrefHeight(508);\r\n// }\r\n }", "void setVisibleGlassPanel(Visibility visible);", "@SuppressWarnings(\"unused\")\n void setVisible(boolean visible);", "public void setVisibility(int value) {\n this.visibility = value;\n }", "public boolean isVisible() {\n return true;\n }", "@Override\n\tpublic void onInvisible() {\n\n\t}", "public void partVisible(IWorkbenchPartReference partRef) {\n\t\t\t\t\n\t\t\t}", "public void setVisible(boolean aValue)\n{\n if(isVisible()==aValue) return; // If value already set, just return\n firePropertyChange(\"Visible\", _visible, _visible = aValue, -1); // Set value and fire PropertyChange\n}", "@Override\r\n\tpublic boolean isVisible() {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic void staticByViewListener() {\n\t\t\n\t}", "@Override\n\tprotected void onVisibilityChanged(View changedView, int visibility) {\n\t\tsuper.onVisibilityChanged(changedView, visibility);\n\t\tif (mode == ANIM) {\n\t\t\ttoggle_anim_visibility(visibility);\n\t\t} else {\n\t\t\tif (visibility == VISIBLE) {\n\t\t\t\tstartAnimation(rotation);\n\t\t\t} else {\n\t\t\t\tclearAnimation();\n\t\t\t}\n\t\t}\n\t}", "public void setDisplayVisibility(boolean on) {\n if (settingVisibility) {\n return;\n }\n super.setDisplayVisibility(on);\n applyVisibilityFlags();\n }", "public void visibility(boolean state){ this.table.setVisible(state);}", "@Override\n\tpublic void onHide() {\n\n\t}", "@Override\r\n\tprotected void onVisibilityChanged(View changedView, int visibility) {\n\t\tsuper.onVisibilityChanged(changedView, visibility);\r\n\t\tif (mode == ANIM) {\r\n\t\t\ttoggle_anim_visibility(visibility);\r\n\t\t} else {\r\n\t\t\tif (visibility == VISIBLE) {\r\n\t\t\t\tstartAnimation(rotation);\r\n\t\t\t} else {\r\n\t\t\t\tclearAnimation();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@DISPID(1611006060) //= 0x6006006c. The runtime will prefer the VTID if present\n @VTID(136)\n void externalReferencesAsVisible(\n boolean oVisible);", "@Override\n public void postHideEt() {\n }", "public boolean isVisible()\n {\n return visible;\n }", "private void setVis(boolean b) {\n this.setVisible(b);\n }", "public boolean isVisible() {\n\t\treturn true;\n\t}", "@Override\r\npublic void componentHidden(ComponentEvent arg0) {\n\t\r\n}", "@Override\n public void componentHidden(ComponentEvent e)\n {\n \n }", "public void setVisible()\n\t{\n\t\tMainController.getInstance().setVisible(name, true);\n\t}", "public void show() {\n visible=true;\n }", "@Override\n\t\t\t\t\tpublic void partVisible(IWorkbenchPartReference arg0) {\n\n\t\t\t\t\t}" ]
[ "0.8466879", "0.70005715", "0.69210714", "0.6564632", "0.63866556", "0.63823366", "0.6340092", "0.62977165", "0.61996317", "0.6099773", "0.6098045", "0.60739875", "0.6053392", "0.60298204", "0.6008621", "0.5968991", "0.59547466", "0.5935533", "0.5925036", "0.5914288", "0.58628464", "0.5850285", "0.58433044", "0.5822765", "0.5815901", "0.5813396", "0.5808309", "0.580593", "0.5801182", "0.5796042", "0.5796042", "0.5796042", "0.5794898", "0.5794898", "0.57819855", "0.57773733", "0.57673985", "0.5753973", "0.5742196", "0.5738397", "0.5738397", "0.572991", "0.57155365", "0.5710318", "0.568212", "0.5678169", "0.5678169", "0.5675275", "0.56736505", "0.5670104", "0.565822", "0.56578255", "0.5640946", "0.5640946", "0.5639889", "0.5627256", "0.5623114", "0.5622223", "0.5607478", "0.560126", "0.5596514", "0.5581436", "0.557422", "0.55728394", "0.55719256", "0.55485064", "0.55449647", "0.5540384", "0.5516209", "0.5512257", "0.55113524", "0.5504387", "0.5501267", "0.55012065", "0.5495329", "0.5493438", "0.5485064", "0.54829645", "0.54735094", "0.5472754", "0.54602456", "0.54560024", "0.54541475", "0.54436094", "0.5443287", "0.54314965", "0.5426546", "0.54228145", "0.5418865", "0.5416992", "0.5414612", "0.54144126", "0.5408652", "0.5404347", "0.54040945", "0.53975207", "0.53884006", "0.5385944", "0.53759164", "0.5375876" ]
0.8292154
1
This method will be invoked when PDFViewCtrl visibility has changed
void onPDFViewVisibilityChanged(int prevVisibility, int currVisibility);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface OnPDFViewVisibilityChanged {\n /**\n * This method will be invoked when PDFViewCtrl visibility has changed\n *\n * @param prevVisibility previous PDFViewCtrl visibility\n * @param currVisibility current PDFViewCtrl visibility\n */\n void onPDFViewVisibilityChanged(int prevVisibility, int currVisibility);\n }", "public final void updateViewVisibility() {\n boolean z;\n MediaHostStateHolder mediaHostStateHolder = this.state;\n if (getShowsOnlyActiveMedia()) {\n z = this.mediaDataManager.hasActiveMedia();\n } else {\n z = this.mediaDataManager.hasAnyMedia();\n }\n mediaHostStateHolder.setVisible(z);\n int i = getVisible() ? 0 : 8;\n if (i != getHostView().getVisibility()) {\n getHostView().setVisibility(i);\n Iterator<T> it = this.visibleChangedListeners.iterator();\n while (it.hasNext()) {\n ((Function1) it.next()).invoke(Boolean.valueOf(getVisible()));\n }\n }\n }", "void onControlVisibilityChange(Object object, boolean visible);", "public void onVisible() {\r\n System.out.println(\"toolkit.AbstractDemo.onVisible()\");\r\n }", "@Override\n public void setVisible (boolean f)\n { \n }", "@Override\n public void setVisible(boolean arg0)\n {\n \n }", "@Subscribe\n public void onViewChangedEvent(final ViewChangedEvent event) {\n if (event.getViewKey().equals(ViewKey.HEADER)) {\n log.trace(\"Saw a ViewChangedEvent {}\", event);\n\n log.debug(\"Header now has visibility: {} \", event.isVisible());\n balanceDisplayMaV.getView().setVisible(event.isVisible());\n if (alertMessageLabel.getText().length() != 0 && event.isVisible()) {\n alertPanel.setVisible(event.isVisible());\n }\n\n balanceDisplayMaV.getView().updateView(Configurations.currentConfiguration);\n }\n }", "@Override\n\tpublic void setVisible(boolean vis) {\n\t\t\n\t}", "void onFadingViewVisibilityChanged(boolean visible);", "@Override\n public boolean isVisible()\n {\n return true;\n }", "@Override\n\tpublic void setVisible(boolean b) {\n\t\t\n\t}", "public void setVisible(boolean val);", "public void setVisible(Boolean isVisible);", "public void setVisible(Boolean visible);", "public void setVisible(boolean newVisible)\n {\n this.visible = newVisible;\n conditionallyRepaint();\n }", "void msgViewableChanged() {\n resetViewport(start);\n }", "@Override protected void onVisibilityChanged(View changedView, int visibility) {\n super.onVisibilityChanged(changedView, visibility);\n if (changedView != this) {\n return;\n }\n\n if (visibility == View.VISIBLE) {\n resume();\n } else {\n pause();\n }\n }", "public boolean isVisible(){ return visible; }", "private void videoVisible() {\n }", "public abstract void setVisible(boolean visible);", "public boolean isVisible() { return _visible; }", "public void updateCPView(boolean visible) {\n\t\tviewMenu.updateCPView(visible);\n\t}", "public void setVisible(boolean v) {\n }", "public void setVisible(boolean b) {\n\t\t\n\t}", "public void updateVisible(){\n if (serviceManager.isCustomerQueMode() == true && serviceManager.isManagerMode() == false) {\n this.setVisible(true);\n } else {\n this.setVisible(false);\n }\n// System.out.println(serviceManager.isCustomerQueMode());\n }", "private void Visibility(Boolean vis) {\n jSP1.setVisible(vis);\r\n jSP2.setVisible(vis);\r\n loadFile.setVisible(!vis);\r\n saveFile.setVisible(!vis);\r\n sourceFileLabel.setVisible(!vis);\r\n sourceFileName.setVisible(!vis);\r\n resultFileLabel.setVisible(!vis);\r\n resultFileName.setVisible(!vis);\r\n }", "public void setVisible(boolean visible);", "private void refreshFieldsVisibility()\n {\n \n }", "@Override\n\tpublic void setVisible(boolean visibility) {\n\t\t//do nothing\n\t}", "public void setVisible()\n\t{\n\t\tMainController.getInstance().setVisible(name, true);\n\t}", "void setVisible(boolean visible);", "void setVisible(boolean visible);", "private void onShowingChanged(ObservableValue<? extends Boolean> pObservable, Boolean pOldValue, Boolean pNewValue)\n\t\t{\n\t\t\tif (!pNewValue.booleanValue())\n\t\t\t{\n\t\t\t\tfireEditingComplete(ICellEditorListener.FOCUS_LOST);\n\t\t\t}\n\t\t}", "public void setVisible( boolean v) {\r\n visible = v;\r\n }", "public void show() {\n visible=true;\n }", "public void setIsVisible(boolean isVisible);", "public boolean isVisible()\n {\n return visible;\n }", "public void setVisible(boolean newVal) {\n if (newVal != visible) {\n visible = newVal;\n listeners.firePropertyChange(PROPERTY_VISIBLE, !visible, visible);\n }\n }", "public interface C27129e {\n void onVisibilityChanged(boolean z);\n }", "public void scrollChanged(boolean vertical) {\n final PDF.Scrolling scroll = pdfView.getScroll(vertical);\n Point newLocation = new Point(getViewLocation());\n\n if (vertical)\n newLocation.y = scroll.getCurrent();\n else\n newLocation.x = scroll.getCurrent();\n\n if (!hasValidDocument() || newLocation.equals(getViewLocation()))\n return;\n\n final Rectangle visibleRect = getVisibleViewRect(newLocation);\n Set<Integer> pages = docCache.pagesInRect(visibleRect);\n int visiblePage = -1, newActivePage = -1;\n\n if (viewMode.isSinglePage()) {\n // determine new active page\n newActivePage = activePage;\n final int prevPage = activePage - 1;\n final int nextPage = activePage + 1;\n if (pages.contains(activePage)) {\n if (pages.contains(prevPage))\n newActivePage = prevPage;\n else if (pages.contains(nextPage) && (!pageHeightInView(activePage) || docCache.getPageBounds(activePage, true).y < visibleRect.y))\n newActivePage = nextPage;\n } else if (!pages.isEmpty())\n newActivePage = Collections.min(pages);\n\n // calculate new location of visible view\n if (newActivePage != activePage) {\n Rectangle newPageBounds = docCache.getPageBounds(newActivePage, true);\n if (newActivePage == prevPage && !pageHeightInView(newActivePage)) {\n newLocation = new Point(newPageBounds.x, (int) Math.round(newPageBounds.getMaxY() - visibleRect.getHeight()));\n } else {\n newLocation = newPageBounds.getLocation();\n }\n }\n visiblePage = newActivePage;\n\n if (newActivePage != activePage && scroll.inProgress()) {\n // prohibit page change when scroll is captured, as it causes\n // view stuttering\n return;\n }\n } else {\n if (pages.isEmpty()) {\n visiblePage = topViewPage;\n } else {\n final int visibleCenterY = (int) Math.round(visibleRect.getCenterY());\n visiblePage = Collections.min(pages);\n\n final Rectangle rectHalfTop = new Rectangle(visibleRect);\n rectHalfTop.height /= 2;\n int lastTop = visiblePage;\n for (Integer index : pages) {\n if (docCache.getPageBounds(index, false).intersects(rectHalfTop) && index > lastTop)\n lastTop = index;\n }\n\n final Rectangle rectHalfBottom = new Rectangle(visibleRect);\n rectHalfBottom.y = visibleCenterY;\n rectHalfBottom.height /= 2;\n int firstBottom = Collections.max(pages);\n for (Integer index : pages) {\n if (docCache.getPageBounds(index, false).intersects(rectHalfBottom) && index < firstBottom)\n firstBottom = index;\n }\n\n if (lastTop == firstBottom)\n newActivePage = lastTop;\n else {\n newActivePage = ((visibleCenterY - Math.round(docCache.getPageBounds(lastTop, false).getMaxY())) < (docCache.getPageBounds(firstBottom, false).y - visibleCenterY)) ? lastTop : firstBottom;\n }\n }\n }\n goToPositionAbsolute(visiblePage, newLocation);\n setActivePage(newActivePage);\n }", "public void setVisible()\r\n\t{\r\n\t\tthis.setVisible(true);\r\n\t}", "@Override\n protected void onWindowVisibilityChanged(int visibility) {\n super.onWindowVisibilityChanged(visibility);\n switch (visibility) {\n case View.GONE:\n break;\n case View.INVISIBLE:\n break;\n case View.VISIBLE:\n break;\n }\n }", "@Override\r\n\tpublic boolean isVisible() {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic void setVisibility(int visibility) {\n\t\tsuper.setVisibility(visibility);\n\t\tif(visibility==View.VISIBLE){\n\t\t\ttoggleOnAreaChange();\n\t\t}\n\t}", "public boolean isVisible(){\n \t\treturn visible;\n \t}", "public void setVisible(boolean val)\r\n\t{\r\n\t\t_isOn = val;\r\n\t}", "public void changeHasInvisibility()\r\n\t{\r\n\t\thasInvisibility = !hasInvisibility;\r\n\t}", "@Override\r\n\t\t\tpublic void partVisible(IWorkbenchPartReference partRef) {\n\t\t\t\t\r\n\t\t\t}", "public boolean isVisible();", "public boolean isVisible();", "public boolean isVisible();", "@Override\n public void changed(ObservableValue<? extends Boolean> ov, Boolean onHidden, Boolean onShown) {\n }", "@Override // androidx.lifecycle.Observer\n public void onChanged(Boolean bool) {\n Boolean bool2 = bool;\n if (bool2 != null) {\n bool2.booleanValue();\n Views.setVisible(AdvertStatsActivity.access$getToolbarTitle$p(this.a), bool2.booleanValue());\n }\n }", "@SuppressWarnings(\"unused\")\n void setVisible(boolean visible);", "boolean isVisible();", "boolean isVisible();", "public void setVisible(boolean value) {\n\t\tvisible = value;\n\t}", "public abstract boolean isVisible();", "public abstract boolean isVisible();", "@Override\n public void setVisibility(int visibility) {\n // For some reason FrameView does not forward visiblity to it children. So we manually\n // override it to do so. That way when this view is invisible or gone we don't show an ad.\n int originalVisiblity = super.getVisibility();\n\n if (originalVisiblity != visibility) {\n synchronized (this) {\n // Forward the visibility event to all the children.\n int children = getChildCount();\n\n for (int i = 0; i < children; i++) {\n View child = getChildAt(i);\n child.setVisibility(visibility);\n }\n\n // Continue processing the event.\n super.setVisibility(visibility);\n\n // Get or remove ads depending on visiblity.\n if (visibility == View.VISIBLE) {\n requestFreshAd();\n } else {\n // Remove the old ad so we fade into the new one.\n removeView(ad);\n ad = null;\n invalidate();\n }\n }\n }\n }", "@Override\n\tpublic void setVisible (boolean visible)\n\t{\n\t\tif (visible)\n\t\t{\n\t\t\t//this.updateLayerList();\n\t\t\t//this.updateConstrainedLayerList();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Update the amount of deformation.\n\t\t\tmCartogramWizard.setAmountOfDeformation(\n\t\t\t\tmDeformationSlider.getValue());\n\t\t\t\t\n\t\t}\n\t\t\n\t\tsuper.setVisible(visible);\n\t}", "private void setFormVisible(boolean value){\r\n vb_form.setVisible(value); //Establece el estado grafico del formulario\r\n// if(value){ //Si el estado es visible entonces \r\n// vb_table.relocate(30, 439);\r\n// vb_table.setPrefHeight(133);\r\n// }else{\r\n// vb_table.relocate(30, 64);\r\n// vb_table.setPrefHeight(508);\r\n// }\r\n }", "public void sliceDisplayChanged() {\n hide();\n for (int idx = 0; idx<nChannels; idx++) {\n Displaysettings.applyDisplaysettings(ini_sources[idx], displaysettings[idx]);\n Displaysettings.applyDisplaysettings(getRegisteredSourcesAtStep(stepBack)[idx], displaysettings[idx]);\n }\n show();\n }", "private void setVis(boolean b) {\n this.setVisible(b);\n }", "public void setVisible (boolean visible) {\n this.visible = visible;\n }", "@Override\r\n public void onValidStateEvent(ValidStateEvent event) {\r\n if(event.getViewType() == ValidStateEvent.ViewType.Protein) {\r\n hiding = false;\r\n getView().asWidget().setVisible(true);\r\n }\r\n else {\r\n hiding = true;\r\n getView().asWidget().setVisible(false);\r\n }\r\n }", "public boolean isVisible() {\n return true;\n }", "public Boolean isVisible();", "public Boolean isVisible();", "public boolean isVisible() {\n return true;\n }", "public void setVisible(boolean visible)\n {\n this.visible = visible;\n }", "public void infoProgressOn (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourInfoBinding.tourInfoProgress.getVisibility() != View.VISIBLE) {\n tabTourInfoBinding.tourInfoProgress.setVisibility(View.VISIBLE);\n }\n if (tabTourInfoBinding.tourInfoLayout.getVisibility() != View.GONE) {\n tabTourInfoBinding.tourInfoLayout.setVisibility(View.GONE);\n }\n }\n });\n }", "void init() {\n setVisible(true);\n\n }", "@Override\n public void postHideEt() {\n }", "private void handleVisibility(int previousView) {\n switch (previousView) {\n case 1:\n tvFitstreetOrganizedContests.setVisibility(View.GONE);\n break;\n case 2:\n tvFitstreetParticipateContests.setVisibility(View.GONE);\n break;\n case 3:\n tvFitstreetContestsPrizeMoney.setVisibility(View.GONE);\n break;\n }\n }", "public void setVisible(boolean visible){\r\n\t\tthis.visible = visible;\r\n\t}", "private void enforceView()\n {\n if (!visible)\n {\n StackPane sPane = (StackPane) this.temperatureView.getParent();\n\n ObservableList<Node> list = sPane.getChildren();\n for (Node node : list)\n {\n node.setVisible(false);\n }\n\n this.temperatureView.setVisible(true);\n }\n }", "public void setVisible(boolean aValue)\n{\n if(isVisible()==aValue) return; // If value already set, just return\n firePropertyChange(\"Visible\", _visible, _visible = aValue, -1); // Set value and fire PropertyChange\n}", "public void onWindowVisibilityChanged(int visibility) {\n super.onWindowVisibilityChanged(visibility);\n OnWindowVisibilityChangedListener onWindowVisibilityChangedListener = this.mOnWindowVisibilityChangedListener;\n if (onWindowVisibilityChangedListener != null) {\n onWindowVisibilityChangedListener.onWindowVisibilityChanged(visibility);\n }\n }", "public void setIsVisible(java.lang.Boolean isVisible);", "@Override\n public void wasHidden() {\n hide();\n }", "public boolean isVisible()\n {\n return visible;\n }", "public void setVisible(boolean visible) {\r\n this.visible = visible;\r\n }", "@Override\n protected void onPreExecute() {\n pb.setVisibility(View.VISIBLE);\n }", "@Override\n public void makeVisible(Player viewer) {\n \n }", "public void reevaluateStatusBarVisibility() {\n if (updateStatusBarVisibilityLocked(getDisplayPolicy().adjustSystemUiVisibilityLw(this.mLastStatusBarVisibility))) {\n this.mWmService.mWindowPlacerLocked.requestTraversal();\n }\n }", "public void setDisplayVisibility(boolean on) {\n if (settingVisibility) {\n return;\n }\n super.setDisplayVisibility(on);\n applyVisibilityFlags();\n }", "public void setVisibility(int value) {\n this.visibility = value;\n }", "public boolean isVisible () {\n return visible;\n }", "public boolean isVisible() {\n\t\treturn true;\n\t}", "public void resetIsVisible();", "final void setVisible(boolean visible) {\n this.visible = visible;\n }", "@Override\n\tpublic void onInvisible() {\n\n\t}", "public void visibility(boolean state){ this.table.setVisible(state);}", "@Override\n public void onFragmentVisible() {\n db = LegendsDatabase.getInstance(getContext());\n\n refreshCursor();\n\n if (emptyView.isShown()) {\n Crossfader.crossfadeView(emptyView, loadingView);\n }\n else {\n Crossfader.crossfadeView(listView, loadingView);\n }\n }", "public void setVisible(boolean a){\n \t\tvisible = a;\n \t}", "public void pdfChanged(Document pdfDoc) {\n ZoomMode lastZoomMode = getZoomMode();\n double lastZoom = getZoom();\n PageViewMode lastViewMode = getViewMode();\n int lastActivePage = getActivePage();\n int lastTopPage = topViewPage;\n Point2D.Float lastViewLocation = (Point2D.Float) relativeViewLocation.clone();\n\n docCache.setPDF(pdfDoc);\n docCache.setPageIndent(hasValidDocument() ? new Dimension(10, 10) : new Dimension());\n\n // update zoom\n setZoom(0.0);\n this.zoomMode = ZoomMode.ZOOM_NONE;\n if (hasValidDocument()) {\n if (lastZoomMode == ZoomMode.ZOOM_NONE)\n lastZoomMode = ZoomMode.ZOOM_FIT_PAGE;\n if (lastZoom == 0)\n lastZoom = 1.0;\n\n setZoomMode(lastZoomMode);\n if (!lastZoomMode.isFitMode())\n setZoom(lastZoom);\n }\n\n // update view mode\n this.viewMode = PageViewMode.PAGE_MODE_NONE;\n if (hasValidDocument()) {\n if (lastViewMode == PageViewMode.PAGE_MODE_NONE)\n lastViewMode = PageViewMode.PAGE_MODE_SINGLE;\n\n setViewMode(lastViewMode);\n }\n\n // update active page\n this.activePage = this.topViewPage = -1;\n if (hasValidDocument()) {\n if (!docCache.isPageValid(lastActivePage))\n lastActivePage = 0;\n if (!docCache.isPageValid(lastTopPage))\n lastTopPage = 0;\n } else {\n lastActivePage = lastTopPage = -1;\n }\n updateViewSize();\n if (lastTopPage != -1)\n goToPositionAbsolute(lastTopPage, toAbsoluteLocation(lastTopPage, lastViewLocation));\n\n // force update when document is closed\n if (!hasValidDocument())\n onViewUpdate(true);\n }", "@Override\n\tpublic boolean isVisible() {\n\t\treturn this.isVisible;\n\t}", "public boolean isVisible() {\r\n return visible;\r\n }", "public void setVisible(boolean value)\n\t{\n\t\tisVisible = value;\n\t\tif(!isVisible)\n\t\t{\n\t\t\tsetWorldRegion(null);\n\t\t}\n\t}" ]
[ "0.80326563", "0.68307817", "0.68158543", "0.6763593", "0.6701492", "0.66697276", "0.6643166", "0.65829587", "0.6387817", "0.63735974", "0.6364383", "0.63569355", "0.62963295", "0.6284036", "0.6260267", "0.6248277", "0.6227019", "0.62242997", "0.62148154", "0.6198576", "0.6192349", "0.6189919", "0.6188712", "0.6166772", "0.6160293", "0.61591184", "0.61430126", "0.6129452", "0.6122819", "0.61170816", "0.6116334", "0.6116334", "0.6110515", "0.61062837", "0.60987365", "0.60754323", "0.6066881", "0.6066698", "0.60625446", "0.6055168", "0.60315806", "0.60271007", "0.60162103", "0.6015389", "0.6014983", "0.60051256", "0.599863", "0.59837973", "0.5972569", "0.5972569", "0.5972569", "0.5970538", "0.59704626", "0.59676474", "0.5958396", "0.5958396", "0.59456843", "0.5945466", "0.5945466", "0.5940029", "0.5934522", "0.59343034", "0.5930336", "0.5917388", "0.5906925", "0.5903212", "0.5897653", "0.5891746", "0.5891746", "0.589072", "0.58891594", "0.5880432", "0.58777833", "0.58708113", "0.5857725", "0.58572704", "0.5848053", "0.58410627", "0.5832783", "0.5828775", "0.5827877", "0.58266777", "0.5814615", "0.5802584", "0.58010346", "0.5801003", "0.57977706", "0.57924294", "0.57903004", "0.57902485", "0.5789848", "0.5777182", "0.5774035", "0.5764507", "0.576101", "0.57595915", "0.5759151", "0.5754332", "0.57533336", "0.5752485" ]
0.8517467
0
TODO Autogenerated method stub
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { super.doGet(request, response); doPost(request, response); }
{ "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
We preserve the 'stableIndex' so that calls can be attributed to one host even across reshuffles
static PinUntilErrorNodeSelectionStrategyChannel of( Optional<LimitedChannel> initialChannel, DialogueNodeSelectionStrategy strategy, List<LimitedChannel> channels, DialoguePinuntilerrorMetrics metrics, Random random, Ticker ticker, String channelName) { List<PinChannel> pinChannels = IntStream.range(0, channels.size()) .mapToObj(index -> ImmutablePinChannel.builder() .delegate(channels.get(index)) .stableIndex(index) .build()) .collect(ImmutableList.toImmutableList()); /** * The *initial* list is shuffled to ensure that clients across the fleet don't all traverse the in the * same order. If they did, then restarting one upstream node n would shift all its traffic (from all * servers) to upstream n+1. When n+1 restarts, it would all shift to n+2. This results in the disastrous * situation where there might be many nodes but all clients have decided to hammer one of them. */ ImmutableList<PinChannel> initialShuffle = shuffleImmutableList(pinChannels, random); int initialPin = initialChannel // indexOf relies on reference equality since we expect LimitedChannels to be reused across updates .map(limitedChannel -> Math.max(0, initialShuffle.indexOf(limitedChannel))) .orElse(0); if (strategy == DialogueNodeSelectionStrategy.PIN_UNTIL_ERROR) { NodeList shuffling = ReshufflingNodeList.of(initialShuffle, random, ticker, metrics, channelName); return new PinUntilErrorNodeSelectionStrategyChannel(shuffling, initialPin, metrics, channelName); } else if (strategy == DialogueNodeSelectionStrategy.PIN_UNTIL_ERROR_WITHOUT_RESHUFFLE) { NodeList constant = new ConstantNodeList(initialShuffle); return new PinUntilErrorNodeSelectionStrategyChannel(constant, initialPin, metrics, channelName); } throw new SafeIllegalArgumentException("Unsupported NodeSelectionStrategy", SafeArg.of("strategy", strategy)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void rehash() \n\t{\n\t\tnumKeys++;\n LinkedList<SpacePort<String, SpaceShipValet>>[] oldPort = chainedPortList;\n chainedPortList = new LinkedList[chainedPortList.length*2];\n\n for(int i = 0; i < oldPort.length; i++)\n {\n if(oldPort[i] != null && !oldPort[i].equals(DELETED))//If there is something in the old port,\n {\n \tfor(SpacePort<String, SpaceShipValet> ports: oldPort[i])//For all the slots in the SpacePort\n \t\tdock(ports.license, ports.ship);//Add a ship\n \tnumKeys++;//Increments the number of slots\n }\n }\t\n\n\t}", "private int newIndex() {\n //return indexes.remove(0);\n return random.nextInt(81);\n }", "private void updateShuffleboard()\n {\n }", "private void reIndex()\n {\n for(int i = 0; i < NodeList.size(); i++)\n NodeList.get(i).setID(i);\n ID = NodeList.size();\n }", "public void shuffle(){\r\n int randomPos;\r\n //for each card in the deck\r\n for(int i=0; i<52; i++){\r\n randomPos = getRandomPos(i);\r\n exchangeCards(i, randomPos);\r\n }\r\n topCardIndex = 0;\r\n\t}", "protected void rehash() {\n int oldCapacity = table.length;\n ServerDescEntry oldMap[] = table;\n\n int newCapacity = oldCapacity * 2 + 1;\n ServerDescEntry newMap[] = new ServerDescEntry[newCapacity];\n\n threshold = (int)(newCapacity * loadFactor);\n table = newMap;\n\n for (int i = oldCapacity ; i-- > 0 ;) {\n for (ServerDescEntry old = oldMap[i] ; old != null ; ) {\n ServerDescEntry e = old;\n old = old.next;\n\n int index = (e.desc.sid & 0x7FFFFFFF) % newCapacity;\n e.next = newMap[index];\n newMap[index] = e;\n }\n }\n }", "public abstract void shuffled();", "public void onIndexReset();", "@Test\n public void testRandomAccessSameCache()\n {\n doStressTest(\"IdxTestRASC\", getCacheName0(), getCacheName0(),\n IdentityExtractor.INSTANCE,\n new CompositeKeyCreator()\n {\n public CompositeKey getCompositeKey(Object oKeyNatural, NamedCache cache)\n {\n return new CompositeKey(oKeyNatural, Base.getRandom().nextInt(20));\n }\n },\n /*nServers*/1, /*cRollingRestart*/0);\n }", "private static void testRendezvousHashing() {\n Map<String, AtomicInteger> HRWNodesMap = Maps.newHashMap();\r\n List<String> HRWNodes = Lists.newArrayList();\r\n for(int i = 0 ; i < nodesCount; i ++) {\r\n HRWNodes.add(\"HRWNode\"+i);\r\n HRWNodesMap.put(\"HRWNode\"+i, new AtomicInteger());\r\n }\r\n RendezvousHashing<String, String> hrw = new RendezvousHashing(charsFunnel, charsFunnel, HRWNodes);\r\n \r\n // insert keys\r\n long startTime = System.currentTimeMillis();\r\n for(int i = 0 ; i < keyCount; i++) {\r\n HRWNodesMap.get(hrw.getHash(\"\"+i)).incrementAndGet();\r\n }\r\n long endTime = System.currentTimeMillis();\r\n long timeElapsed = endTime - startTime;\r\n // System.out.println(\"Execution Time in milliseconds : \" + timeElapsed);\r\n \r\n\r\n // print out distriubution + clear\r\n for(Entry<String, AtomicInteger> entry : HRWNodesMap.entrySet()) {\r\n System.out.println(entry.getKey() + \": \" + entry.getValue().get());\r\n entry.getValue().set(0);\r\n }\r\n\r\n // remove node 3\r\n System.out.println(\"\\n=== After Removing Node 3 ===\");\r\n hrw.removeNode(\"HRWNode3\");\r\n HRWNodesMap.remove(\"HRWNode3\");\r\n\r\n // re-add\r\n for(int i = 0 ; i < keyCount; i++) {\r\n HRWNodesMap.get(hrw.getHash(\"\"+i)).incrementAndGet();\r\n }\r\n\r\n // print out distriubution again\r\n for(Entry<String, AtomicInteger> entry : HRWNodesMap.entrySet()) {\r\n System.out.println(entry.getKey() + \": \" + entry.getValue().get());\r\n }\r\n }", "@Override\n protected boolean preserveIndicesUponCompletion() {\n return true;\n }", "private void rehash() {\n\t\tint oldSize = this.size;\n\t\tint newSize = size * 2;\n\t\twhile (!isPrime(newSize))\n\t\t\tnewSize++;\n\t\tthis.size = newSize;\n\t\tDataItem[] newHashArray = new DataItem[newSize];\n\t\tString temp;\n\t\tthis.collision = 0;\n\t\tBoolean repeatValue;\n\t\tfor (int i = 0; i < oldSize; i++) {\n\t\t\tif (hashArray[i] != null && hashArray[i] != deleted)\n\t\t\t\ttemp = hashArray[i].value;\n\t\t\telse\n\t\t\t\tcontinue;\n\t\t\trepeatValue = false;\n\t\t\tint hashVal = hashFunc(temp);\n\t\t\tboolean collisionFlag = false;\n\t\t\twhile (newHashArray[hashVal] != null\n\t\t\t\t\t&& !newHashArray[hashVal].value.equals(deleted.value)) {\n\n\t\t\t\tif (!collisionFlag) {\n\n\t\t\t\t\tthis.collision++;\n\t\t\t\t\tcollisionFlag = true;\n\n\t\t\t\t}\n\t\t\t\thashVal++;\n\t\t\t\thashVal = hashVal % size;\n\n\t\t\t}\n\t\t\tif (repeatValue)\n\t\t\t\tcontinue;\n\t\t\telse {\n\t\t\t\tnewHashArray[hashVal] = hashArray[i];\n\t\t\t}\n\t\t}\n\n\t\tthis.hashArray = newHashArray;\n\t}", "public void shuffle() {\n\t\tCollections.shuffle(inds);\n\t}", "@Test\n public void reuseKeys() throws Exception {\n VolatileLookUpTable.Builder<IntOption> builder = new VolatileLookUpTable.Builder<>();\n LookUpKey key = key();\n\n key.add(new IntOption(100));\n builder.add(key, new IntOption(100));\n key.reset();\n\n key.add(new IntOption(101));\n builder.add(key, new IntOption(101));\n key.reset();\n\n key.add(new IntOption(102));\n builder.add(key, new IntOption(102));\n key.reset();\n\n LookUpTable<IntOption> table = builder.build();\n assertThat(sort(table.get(key(100))), is(values(100)));\n assertThat(sort(table.get(key(101))), is(values(101)));\n assertThat(sort(table.get(key(102))), is(values(102)));\n }", "protected void soConsumerIndex(long newValue)\r\n/* 27: */ {\r\n/* 28:139 */ C_INDEX_UPDATER.lazySet(this, newValue);\r\n/* 29: */ }", "public void updateIndex() {\n int i = this.index;\n if (i == -1 || i > HashBiMap.this.size || !Objects.equal(HashBiMap.this.keys[this.index], this.key)) {\n this.index = HashBiMap.this.findEntryByKey(this.key);\n }\n }", "public abstract void updateIndex();", "public void flipIndexes() {\n int temp = index1;\n index1 = index2;\n index2 = temp;\n }", "boolean transfer(Recycler.Stack<?> dst)\r\n/* 302: */ {\r\n/* 303:328 */ Link head = this.head;\r\n/* 304:329 */ if (head == null) {\r\n/* 305:330 */ return false;\r\n/* 306: */ }\r\n/* 307:333 */ if (head.readIndex == Recycler.LINK_CAPACITY)\r\n/* 308: */ {\r\n/* 309:334 */ if (head.next == null) {\r\n/* 310:335 */ return false;\r\n/* 311: */ }\r\n/* 312:337 */ this.head = (head = head.next);\r\n/* 313: */ }\r\n/* 314:340 */ int srcStart = head.readIndex;\r\n/* 315:341 */ int srcEnd = head.get();\r\n/* 316:342 */ int srcSize = srcEnd - srcStart;\r\n/* 317:343 */ if (srcSize == 0) {\r\n/* 318:344 */ return false;\r\n/* 319: */ }\r\n/* 320:347 */ int dstSize = dst.size;\r\n/* 321:348 */ int expectedCapacity = dstSize + srcSize;\r\n/* 322:350 */ if (expectedCapacity > dst.elements.length)\r\n/* 323: */ {\r\n/* 324:351 */ int actualCapacity = dst.increaseCapacity(expectedCapacity);\r\n/* 325:352 */ srcEnd = Math.min(srcStart + actualCapacity - dstSize, srcEnd);\r\n/* 326: */ }\r\n/* 327:355 */ if (srcStart != srcEnd)\r\n/* 328: */ {\r\n/* 329:356 */ Recycler.DefaultHandle[] srcElems = head.elements;\r\n/* 330:357 */ Recycler.DefaultHandle[] dstElems = dst.elements;\r\n/* 331:358 */ int newDstSize = dstSize;\r\n/* 332:359 */ for (int i = srcStart; i < srcEnd; i++)\r\n/* 333: */ {\r\n/* 334:360 */ Recycler.DefaultHandle element = srcElems[i];\r\n/* 335:361 */ if (Recycler.DefaultHandle.access$1500(element) == 0) {\r\n/* 336:362 */ Recycler.DefaultHandle.access$1502(element, Recycler.DefaultHandle.access$1100(element));\r\n/* 337:363 */ } else if (Recycler.DefaultHandle.access$1500(element) != Recycler.DefaultHandle.access$1100(element)) {\r\n/* 338:364 */ throw new IllegalStateException(\"recycled already\");\r\n/* 339: */ }\r\n/* 340:366 */ srcElems[i] = null;\r\n/* 341:368 */ if (!dst.dropHandle(element))\r\n/* 342: */ {\r\n/* 343:372 */ Recycler.DefaultHandle.access$502(element, dst);\r\n/* 344:373 */ dstElems[(newDstSize++)] = element;\r\n/* 345: */ }\r\n/* 346: */ }\r\n/* 347:376 */ if ((srcEnd == Recycler.LINK_CAPACITY) && (head.next != null))\r\n/* 348: */ {\r\n/* 349:378 */ reclaimSpace(Recycler.LINK_CAPACITY);\r\n/* 350: */ \r\n/* 351:380 */ this.head = head.next;\r\n/* 352: */ }\r\n/* 353:383 */ head.readIndex = srcEnd;\r\n/* 354:384 */ if (dst.size == newDstSize) {\r\n/* 355:385 */ return false;\r\n/* 356: */ }\r\n/* 357:387 */ dst.size = newDstSize;\r\n/* 358:388 */ return true;\r\n/* 359: */ }\r\n/* 360:391 */ return false;\r\n/* 361: */ }", "private static void testConsistentHashing() {\n Map<String, AtomicInteger> CHNodesMap = Maps.newHashMap();\r\n List<String> CHNodes = Lists.newArrayList();\r\n for(int i = 0 ; i < nodesCount; i ++) {\r\n CHNodes.add(\"CHNode\"+i);\r\n CHNodesMap.put(\"CHNode\"+i, new AtomicInteger());\r\n }\r\n ConsistentHashing<String, String> ch = new ConsistentHashing(charsFunnel, charsFunnel, CHNodes);\r\n \r\n // insert keys\r\n long startTime = System.currentTimeMillis();\r\n for(int i = 0 ; i < keyCount; i++) {\r\n CHNodesMap.get(ch.getHash(\"\"+i)).incrementAndGet();\r\n }\r\n long endTime = System.currentTimeMillis();\r\n long timeElapsed = endTime - startTime;\r\n // System.out.println(\"Execution Time in milliseconds : \" + timeElapsed);\r\n\r\n // print out distriubution + clear\r\n for(Entry<String, AtomicInteger> entry : CHNodesMap.entrySet()) {\r\n System.out.println(entry.getKey() + \": \" + entry.getValue().get());\r\n entry.getValue().set(0);\r\n }\r\n \r\n // remove node 3\r\n System.out.println(\"\\n=== After Removing Node 3 ===\");\r\n ch.removeNode(\"CHNode3\");\r\n CHNodesMap.remove(\"CHNode3\");\r\n \r\n // re-add\r\n for(int i = 0 ; i < keyCount; i++) {\r\n CHNodesMap.get(ch.getHash(\"\"+i)).incrementAndGet();\r\n }\r\n \r\n // print out distriubution again\r\n for(Entry<String, AtomicInteger> entry : CHNodesMap.entrySet()) {\r\n System.out.println(entry.getKey() + \": \" + entry.getValue().get());\r\n }\r\n }", "void synchronizeHostData(INDArray array);", "public void shuffle()\r\n/* 18: */ {\r\n/* 19:41 */ for (int i = 0; i < this.pop.size(); i++)\r\n/* 20: */ {\r\n/* 21:43 */ Cluster c = (Cluster)this.pop.elementAt(i);\r\n/* 22:44 */ g.setClusters(c.getClusterVector());\r\n/* 23:45 */ g.shuffleClusters();\r\n/* 24:46 */ c.setClusterVector(g.getClusters());\r\n/* 25:47 */ c.setConverged(false);\r\n/* 26: */ }\r\n/* 27: */ }", "private void rehash() {\r\n Entry[] oldHashTable = this.hashTable;\r\n this.capacity = this.capacity * 2;\r\n this.hashTable = new Entry[this.capacity];\r\n this.size = 0;\r\n for (Entry eachEntry : oldHashTable) {\r\n if (eachEntry != null) {\r\n if (!eachEntry.isDeleted) {\r\n this.add((K)eachEntry.key,(V)eachEntry.value);\r\n }\r\n }\r\n }\r\n return;\r\n }", "public void spreadShuffle()\r\n {\r\n List<Card> shuffledDeck = new ArrayList<Card>();\r\n List<Card> tempDeck = null;\r\n for (int i = 0; i < SHUFFLE_COUNT; i++) {\r\n while (cards.size() > 0)\r\n {\r\n shuffledDeck.add( drawRandom() );\r\n }\r\n tempDeck = cards;\r\n cards = shuffledDeck;\r\n tempDeck.clear();\r\n shuffledDeck = tempDeck;\r\n }\r\n }", "void shuffleDeck() {\n\t\tfor(int index = 0; index < this.getNumberOfCards(); index++) {\n\t\t\tint randomNumber = index + (int)(Math.random() * (this.getNumberOfCards() - index));\n\t\t\tCard temp = this.cardsInDeck[randomNumber];\n\t\t\tthis.cardsInDeck[randomNumber] = this.cardsInDeck[index];\n\t\t\tthis.cardsInDeck[index] = temp;\n\t\t}\n\t}", "void refreshNodeHostCount(int nodeHostCount);", "private void shuffleOnceRandom(){\n\t\t//You need to have a copy of the deck before you shuffled it so you can reference\n\t\t//It when you are trying to replace the new values\n\t\tList<Card> beforeShuffle = ourDeck.makeCopy().getCurrentDeck();\n\t\t//The topIndex tells us where we are in reference to the top half of the deck\n\t\t//Same with bottom this helps us reference the original deck to get whatever\n\t\t//Card we need and the deckIndex helps us put it in the correct spot\n\t\tint topIndex = 0, bottomIndex = ourDeck.getSize() / 2, deckIndex = 0;\n\t\t//These ints help us keep track of how many cards are left in each half\n\t\tint remainingTop = ourDeck.getSize() / 2, remainingBot = ourDeck.getSize() / 2;\n\t\tboolean shouldLoop = true;\n\t\t//This is the shuffling loop\n\t\twhile(shouldLoop){\n\t\t\t//This means the number coming from the specific deck which in this method is random\n\t\t\tint numTop = generator.nextInt(RAND_BOUND), numBot = generator.nextInt(RAND_BOUND);\n\t\t\t//After we determine the random number of cards we're using we have to do some checks\n\t\t\t//This means we wanted more than there was less therefore the stack is out\n\t\t\t//This is the stopping condition for the loop\n\t\t\tif(numTop >= remainingTop){\n\t\t\t\tnumTop = remainingTop;\n\t\t\t\tnumBot = remainingBot;\n\t\t\t\tshouldLoop = false;\n\t\t\t}\n\t\t\t\t\n\t\t\tif(numBot >= remainingBot){\n\t\t\t\tnumTop = remainingTop;\n\t\t\t\tnumBot = remainingBot;\n\t\t\t\tshouldLoop = false;\n\t\t\t}\n\t\t\t//This is where I replace the newCard into ourDeck\n\t\t\t//I iterate for the number of times we take from the top or bottom\n\t\t\tfor(int i = 1; i <= numTop; i++){\t\n\t\t\t\tCard newCard = beforeShuffle.get(topIndex);\t//I get the card we want to move\n\t\t\t\tourDeck.setCard(newCard, deckIndex);\t\t//Then I move it to the new deckIndex\n\t\t\t\ttopIndex++;\tdeckIndex++;\n\t\t\t}\n\t\t\tfor(int i = 1; i <= numBot; i++){\n\t\t\t\tCard newCard = beforeShuffle.get(bottomIndex);\n\t\t\t\tourDeck.setCard(newCard, deckIndex);\n\t\t\t\tbottomIndex++;\tdeckIndex++;\n\t\t\t}\n\t\t\tremainingTop = remainingTop - numTop;\n\t\t\tremainingBot = remainingBot - numBot;\n\t\t}\n\t}", "void indexReset();", "public void scramble(){\r\n for (int i = 0; i < data.length / 2; i++){\r\n int randomIndex1 = (int)(Math.random()*(data.length - 1));\r\n int randomIndex2 = (int)(Math.random()*(data.length - 1));\r\n swap(randomIndex1, randomIndex2);\r\n }\r\n }", "private void rehash() {\r\n\t\tSystem.out.println( \"rehashing : buckets \" + numBuckets + \" size \" + size );\r\n\t\tArrayList<MapNode<K, V>> temp = buckets;\r\n\t\tbuckets = new ArrayList();\r\n\t\tfor( int i = 0; i < 2*numBuckets; i++ ) {\r\n\t\t\tbuckets.add( null );\r\n\t\t}\r\n\t\tsize = 0; //size 0 means abi ek b element nhi h\r\n\t\tnumBuckets *= 2; //ab number of buckets double ho gya h\r\n\t\t//now we will trvrs old arraylist and linkedlist and\r\n\t\t//copy is elemenet one by one\r\n\t\tfor( int i = 0; i < temp.size(); i++ ) {\r\n\t\t\tMapNode< K, V > head = temp.get(i);\r\n\t\t\twhile( head != null ) {\r\n\t\t\t\t\r\n\t\t\t\tK key = head.key;\r\n\t\t\t\tV value = head.value;\r\n\t\t\t\tinsert( key, value );\r\n\t\t\t\thead = head.next;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic int getShuffleMode()\n\t{\n\t\treturn 0;\n\t}", "public native int toggleShuffle();", "void Rehash(){\n\t\tRehash++;\r\n\t\t//updates if the hash table changed size\r\n\t\tStockNode[] temp=new StockNode[(2*Table.length)+1];\r\n\t\t//creates a temporary table with the new size \r\n\t\tfor(int i=Table.length-1;i>=0;i--){\r\n\t\t\t//goes through each array linked list \r\n\t\t\tStockNode t=Table[i];\r\n\t\t\twhile(t!=null){\r\n\t\t\t\t//the change of node to its new proper place is done here \r\n\t\t\t\tint key = toInt(t.stockName);\r\n\t\t\t\tint index = key%temp.length;\r\n\t\t\t\tif(temp[index]!=null){\r\n\t\t\t\t\tStockNode next=temp[index].next;\r\n\t\t\t\t\twhile(next!=null){\r\n\t\t\t\t\t\ttemp[index]=next;\r\n\t\t\t\t\t\tnext=temp[index].next;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttemp[index].next=t;\r\n\t\t\t\t} else{\r\n\t\t\t\t\ttemp[index]=t;\r\n\t\t\t\t}\r\n\t\t\t\tStockNode next=t.next;\r\n\t\t\t\tt.next=null;\r\n\t\t\t\tt=next;\r\n\t\t\t}\r\n\t\t}\r\n\t\tTable=temp;\r\n\t}", "private void rehash() {\n\t HashEntry[] oldArray = array;\n\n\t // Create a new double-sized, empty table\n\t allocateArray(2 * oldArray.length);\n\t occupied = 0;\n\t theSize = 0;\n\n\t // Copy table over\n\t for (HashEntry entry : oldArray) {\n\t if (entry != null && entry.isActive)\n\t add(entry.element);\n\t }\n\t }", "private void rehash() {\n Entry<K, V>[] old = table;\n allocate((int) (old.length * INC));\n\n for (int i = 0; i < old.length; ++i) {\n if (old[i] != null) {\n for (Node<Pair<K, V>> j = old[i].list.getHead().getNext();\n j != old[i].list.getTail();\n j = j.getNext()) {\n put(j.getData().key, j.getData().value);\n }\n\n }\n }\n }", "protected int index(int hashvalue) {\r\n\t\tint hash=hashvalue& 0x7fffffff;\r\n\t\tint index = this.hashFunc1(hash) * FREE.length;////获取一个整型数值(正整数),用来定位一条数据存储\r\n\t\t// int stepSize = hashFunc2(hash);\r\n\t\tbyte[] cur = new byte[4];\r\n\t\tkeys.position(index);\r\n\t\tkeys.get(cur);\r\n\t\tint storehash=(cur[0] << 24)+ ((cur[1] & 0xFF) << 16)+ ((cur[2] & 0xFF) << 8)+ (cur[3] & 0xFF);\r\n\t\tif (storehash==hash) {\r\n\t\t\treturn index;\r\n\t\t}\r\n\t\tif (Arrays.equals(cur, FREE)) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\r\n\t\t// NOTE: here it has to be REMOVED or FULL (some user-given value)\r\n\t\tif (Arrays.equals(cur, REMOVED) || storehash!=hash) {\r\n\t\t\t// see Knuth, p. 529\r\n\t\t\tfinal int probe = (1 + (hash % (size - 2))) * FREE.length;\r\n\t\t\tint z = 0;\r\n\t\t\tdo {\r\n\t\t\t\tz++;\r\n\t\t\t\tindex += (probe); // add the step\r\n\t\t\t\tindex %= (size * FREE.length); // for wraparound\r\n\t\t\t\tcur = new byte[FREE.length];\r\n\t\t\t\tkeys.position(index);\r\n\t\t\t\tkeys.get(cur);\r\n\t\t\t\tif (z > size) {\r\n\t\t\t\t\tSDFSLogger.getLog().info(\r\n\t\t\t\t\t\t\t\"entries exhaused size=\" + this.size + \" entries=\"\r\n\t\t\t\t\t\t\t\t\t+ this.entries);\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t}\r\n\t\t\t} while (!Arrays.equals(cur, FREE)\r\n\t\t\t\t\t&& (Arrays.equals(cur, REMOVED) || storehash!=hash));\r\n\t\t}\r\n\r\n\t\treturn storehash!=hash ? -1 : index;\r\n\t}", "public void shuffle() {\n Random rand = new Random();\n for(int i = 0; i < deck.length; i++) {\n // get random index past current index\n int randomVal = i + rand.nextInt(deck.length - i);\n // swaps randomly selected card with card at index i\n Card swap = deck[randomVal];\n deck[randomVal] = deck[i];\n deck[i] = swap;\n }\n }", "@Test\n public void testCoh3733()\n {\n doSingleServerTest(\"IdxTestCoh3733\", new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(\"coh3733\");\n\n cache.addIndex(new IndexAwareExtractor()\n {\n public MapIndex createIndex(boolean fOrdered, Comparator comparator, Map mapIndex,\n BackingMapContext ctx)\n {\n MapIndex index = new SimpleMapIndex(this, false, null, ctx)\n {\n protected void removeInverseMapping(Map mapIndex, Object oIxValue, Object oKey)\n {\n Set setKeys = (Set) mapIndex.get(oIxValue);\n\n assertTrue(\"Attempted to remove non-existent index entry\",\n setKeys != null && setKeys.contains(oKey));\n super.removeInverseMapping(mapIndex, oIxValue, oKey);\n }\n };\n mapIndex.put(this, index);\n return index;\n }\n\n public MapIndex destroyIndex(Map mapIndex)\n {\n return (MapIndex) mapIndex.remove(this);\n }\n\n public Object extract(Object oTarget)\n {\n return oTarget;\n }\n }, false, null);\n cache.addMapListener(new MultiplexingMapListener()\n {\n protected void onMapEvent(MapEvent evt)\n {\n fail(\"Observed unexpected event: \" + evt);\n }\n });\n\n cache.remove(\"non-existent-key\");\n\n validateIndex(cache);\n }\n });\n }", "@Test\n public void doubleSortWithExchangeUnbalancedNodes() {\n ExternalSort es1 = new ExternalSort(OpProps.prototype(0, Long.MAX_VALUE).cloneWithMemoryExpensive(true).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), ARBTRIARY_LEAF, Collections.emptyList(), false);\n SingleSender ss = new SingleSender(OpProps.prototype(1, Long.MAX_VALUE).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), Mockito.mock(BatchSchema.class), es1, 0,\n MinorFragmentIndexEndpoint.newBuilder().setMinorFragmentId(0).build());\n Fragment f1 = new Fragment();\n f1.addOperator(ss);\n Wrapper w1 = new Wrapper(f1, 0);\n w1.overrideEndpoints(Arrays.asList(N1, N2));\n\n UnorderedReceiver or = new UnorderedReceiver(OpProps.prototype(1, Long.MAX_VALUE), Mockito.mock(BatchSchema.class), 0, Collections.emptyList(), false);\n ExternalSort es2 = new ExternalSort(OpProps.prototype(0, Long.MAX_VALUE).cloneWithMemoryExpensive(true).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), or, Collections.emptyList(), false);\n Fragment f2 = new Fragment();\n f2.addOperator(es2);\n Wrapper w2 = new Wrapper(f2, 0);\n w2.overrideEndpoints(Collections.singletonList(N1));\n\n\n MemoryAllocationUtilities.setMemory(options, ImmutableMap.of(f1, w1, f2, w2), 10 + adjustReserve);\n assertEquals(3L, es1.getProps().getMemLimit());\n assertEquals(3L, es2.getProps().getMemLimit());\n }", "private int randomIndex() {\n return StdRandom.uniform(head, tail);\n }", "@Override\r\n public void dealerShuffleDeck(){\r\n this.dealer.shuffleDecks();\r\n }", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void rehash()\r\n\t{\r\n\t\tint M = table.length;\r\n\t\tMapEntry<K, V>[] origTable = table; // save original\r\n\t\t\r\n\t\t//new table\r\n\t\ttable = new MapEntry[2*M + 1];\r\n\t\tcount = 0;\r\n\t\tmaxCount = table.length - table.length/3;\r\n\t\t\r\n\t\tfor (MapEntry<K, V> oe : origTable)\r\n\t\t{\r\n\t\t\tMapEntry<K, V> e = oe;\r\n\t\t\tif (e != null && e != DUMMY) // No need to rehash dummy\r\n\t\t\t{\r\n\t\t\t\tint slot = findSlot(e.getKey(), true);\r\n\t\t\t\ttable[slot] = e;\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void shuffleDeck() {\n\t\tfor(int i = 0; i < 1000000; i++) {\n\t\t\tint randomStelle1 = (int) (Math.random() * 32);\n\t\t\tint randomStelle2 = (int) (Math.random() * 32);\n\t\t\tPlayingCard copy = aktuellesDeck[randomStelle1];\n\t\t\taktuellesDeck[randomStelle1] = aktuellesDeck[randomStelle2];\n\t\t\taktuellesDeck[randomStelle2] = copy;\n\t\t}\n\t}", "public void onIndexUpdate();", "@Override\n public void randomize(int randomSeed) {\n Random rand = new Random(randomSeed);\n for(int j = size - 1; j > 0; j --){\n int randIndex = rand.nextInt(j);\n \n int [] tmp = data[randIndex];\n data[randIndex] = data[j];\n data[j] = tmp;\n \n int tmpl = labels[randIndex];\n labels[randIndex] = labels[j];\n labels[j] = tmpl;\n \n float tmpw = weights[randIndex];\n weights[randIndex] = weights[j];\n weights[j] = tmpw;\n }\n }", "public Cluster ResetIndex()\n {\n ResetIndex( new Random() );\n return this;\n }", "@Test\n public void testSameKeyAccessDiffCache()\n {\n doStressTest(\"IdxTestSKADC\", getCacheName0(), getCacheName1(),\n IdentityExtractor.INSTANCE,\n new CompositeKeyCreator()\n {\n public CompositeKey getCompositeKey(Object oKeyNatural, NamedCache cache)\n {\n return new CompositeKey(oKeyNatural, oKeyNatural);\n }\n },\n /*nServers*/1, /*cRollingRestart*/0);\n }", "@Override\n protected int nextIndex() {\n if (_expectedSize != _hash.size()) {\n throw new ConcurrentModificationException();\n }\n\n byte[] states = _hash._states;\n int i = _index;\n while (i-- > 0 && (states[i] != TPrimitiveHash.FULL)) ;\n return i;\n }", "private void shufflePositions() {\r\n\r\n // Inizializzo con il progressivo delle posizioni\r\n for (int i = 0; i < shufflePositions.length; i++) {\r\n shufflePositions[i] = i;\r\n }\r\n\r\n int lastIndex ;\r\n int tempIndex = 0;\r\n int tempVal = 0;\r\n\r\n// // Tecnica 1 - Knuth (gli indici da scambiare sono scelti dall'inizio in un insieme decrescente in cardinalità)\r\n// int lastIndex = shufflePositions.length;\r\n// for (int i = 0; i < shufflePositions.length-1; i++) {\r\n// tempIndex = i+secureRandom.nextInt(lastIndex); // Randomizzo le posizioni del random buffer da cui prendo i valori casuali\r\n// tempVal=shufflePositions[tempIndex];\r\n// shufflePositions[tempIndex]=shufflePositions[i];\r\n// shufflePositions[i] = tempVal; \r\n// lastIndex--;\r\n// } \r\n \r\n //Tecnica 2 - Knuth GAB Modification (gli indici casuali sono scelti dal fondo in un insieme decrescente in cardinalità)\r\n lastIndex = shufflePositions.length-1;\r\n for (int i = 0; i < shufflePositions.length - 1; i++) {\r\n tempIndex = secureRandom.nextInt(lastIndex); // Randomizzo le posizioni del random buffer da cui prendo i valori casuali\r\n tempVal = shufflePositions[tempIndex];\r\n shufflePositions[tempIndex] = shufflePositions[lastIndex];\r\n shufflePositions[lastIndex] = tempVal;\r\n lastIndex--;\r\n }\r\n \r\n// // Tecnica 3 - Algoritmo standard delle collections\r\n// Integer[]tempArray = new Integer[MaxBufferLength];\r\n// for (int i=0;i<MaxBufferLength;i++){\r\n// tempArray[i]=i;\r\n// \r\n// }\r\n// List<Integer> tempList = Arrays.asList(tempArray);\r\n//\r\n// Collections.shuffle(tempList, secureRandom);\r\n// tempArray= (Integer[]) tempList.toArray();\r\n// for (int i=0;i<shufflePositions.length;i++){\r\n// shufflePositions[i]=tempArray[i];\r\n// }\r\n }", "public void shuffle() {\n\t\tfor (int i = 51; i > 0; i--) {\n\t\t\tint rand = (int) (Math.random() * (i + 1));\n\t\t\tint temp = deck[i];\n\t\t\tdeck[i] = deck[rand];\n\t\t\tdeck[rand] = temp;\n\t\t}\n\t\tcurrentPosition = 0;\n\t}", "@Test\n public void testDropIdxOnClient() {\n GridCacheDynamicLoadOnClientTest.srvNode.getOrCreateCache(DEFAULT_CACHE_NAME).query(new SqlFieldsQuery(((\"CREATE INDEX IDX_TST ON \" + (GridCacheDynamicLoadOnClientTest.FULL_TABLE_NAME)) + \" (name desc)\"))).getAll();\n // Due to client receive created index asynchronously we need add the ugly sleep.\n doSleep(2000);\n getDefaultCacheOnClient().query(new SqlFieldsQuery(((\"DROP INDEX \" + (GridCacheDynamicLoadOnClientTest.PERSON_SCHEMA)) + \".IDX_TST\"))).getAll();\n }", "public void shuffle() {\n for (int i = size - 1; i > 0; i--) {\n swap(i, (int)(Math.random() * (i + 1)));\n }\n }", "public void resetShuffleOrder() {\n\t\tshuffleOrder = new ArrayList<Song>();\n\t\tthis.shuffleSongIndex = -1;\n\t}", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\r\n\t\tprivate void rehash() {\r\n\t\t\t// double size of array\r\n\t\t\tTableElement<K, V>[] NewDictionary = (TableElement<K, V>[]) new TableElement[dictionary.length * 2];\r\n\r\n\t\t\tcurrentCapacity = dictionary.length * 2;\r\n\r\n\t\t\t// re-mod the keys to get new hash\r\n\t\t\tfor (int i = 0; i < dictionary.length; i++) {\r\n\t\t\t\tif (dictionary[i] != null) {\r\n\t\t\t\t\tint newHash = (Math.abs(dictionary[i].getKey().hashCode()) % currentCapacity);\r\n\r\n\t\t\t\t\t// put re-hashed keys into new array\r\n\t\t\t\t\twhile (NewDictionary[newHash] != null) {\r\n\t\t\t\t\t\tint probe = getProbed(newHash);\r\n\t\t\t\t\t\tnewHash = (newHash + probe) % currentCapacity;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tTableElement element = dictionary[i];\r\n\t\t\t\t\tNewDictionary[newHash] = element;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// set old dictionary to new dictionary\r\n\t\t\tthis.dictionary = NewDictionary;\r\n\t\t}", "public void setSyncIndex(int index) {\n }", "private void refreashTableView() {\n this.scoreboard.refresh();\n sortScoreboard();\n }", "private void rehash() {\n LinkedList<Entry<K,V>>[] oldTable = table;\n table = new LinkedList[oldTable.length * 2 + 1];\n numKeys = 0;\n for (LinkedList<Entry<K, V>> list : oldTable) {\n if (list != null) {\n for (Entry<K,V> entry : list) {\n put(entry.getKey(), entry.getValue());\n numKeys++;\n }\n }\n }\n }", "public void Reset() \r\n {\r\n _index = -1;\r\n }", "protected int insertionIndex(int key) {\r\n\t\tint hash = key & 0x7fffffff;\r\n\t\tint index = this.hashFunc1(hash) * FREE.length;\r\n\t\t// int stepSize = hashFunc2(hash);\r\n\t\tbyte[] cur = new byte[4];\r\n\t\tkeys.position(index);\r\n\t\tkeys.get(cur);\r\n int storehash=(cur[0] << 24)+ ((cur[1] & 0xFF) << 16)+ ((cur[2] & 0xFF) << 8)+ (cur[3] & 0xFF);\r\n\r\n\t\tif (Arrays.equals(cur, FREE)) {\r\n\t\t\treturn index; // empty, all done\r\n\t\t} else if (storehash==key) {\r\n\t\t\treturn -index - 1; // already stored\r\n\t\t} else { // already FULL or REMOVED, must probe\r\n\t\t\t// compute the double hash\r\n\t\t\tfinal int probe = (1 + (hash % (size - 2))) * FREE.length;\r\n\r\n\t\t\t// if the slot we landed on is FULL (but not removed), probe\r\n\t\t\t// until we find an empty slot, a REMOVED slot, or an element\r\n\t\t\t// equal to the one we are trying to insert.\r\n\t\t\t// finding an empty slot means that the value is not present\r\n\t\t\t// and that we should use that slot as the insertion point;\r\n\t\t\t// finding a REMOVED slot means that we need to keep searching,\r\n\t\t\t// however we want to remember the offset of that REMOVED slot\r\n\t\t\t// so we can reuse it in case a \"new\" insertion (i.e. not an update)\r\n\t\t\t// is possible.\r\n\t\t\t// finding a matching value means that we've found that our desired\r\n\t\t\t// key is already in the table\r\n\t\t\tif (!Arrays.equals(cur, REMOVED)) {\r\n\t\t\t\t// starting at the natural offset, probe until we find an\r\n\t\t\t\t// offset that isn't full.\r\n\t\t\t\tdo {\r\n\t\t\t\t\tindex += (probe); // add the step\r\n\t\t\t\t\tindex %= (size * FREE.length); // for wraparound\r\n\t\t\t\t\tcur = new byte[FREE.length];\r\n\t\t\t\t\tkeys.position(index);\r\n\t\t\t\t\tkeys.get(cur);\r\n\t\t\t\t} while (!Arrays.equals(cur, FREE)\r\n\t\t\t\t\t\t&& !Arrays.equals(cur, REMOVED)\r\n\t\t\t\t\t\t&& storehash!=hash);\r\n\t\t\t}\r\n\r\n\t\t\t// if the index we found was removed: continue probing until we\r\n\t\t\t// locate a free location or an element which equal()s the\r\n\t\t\t// one we have.\r\n\t\t\tif (Arrays.equals(cur, REMOVED)) {\r\n\t\t\t\tint firstRemoved = index;\r\n\t\t\t\twhile (!Arrays.equals(cur, FREE)\r\n\t\t\t\t\t\t&& (Arrays.equals(cur, REMOVED) || storehash!=hash)) {\r\n\t\t\t\t\tindex += (probe); // add the step\r\n\t\t\t\t\tindex %= (size * FREE.length); // for wraparound\r\n\t\t\t\t\tcur = new byte[FREE.length];\r\n\t\t\t\t\tkeys.position(index);\r\n\t\t\t\t\tkeys.get(cur);\r\n\t\t\t\t}\r\n\t\t\t\t// NOTE: cur cannot == REMOVED in this block\r\n\t\t\t\treturn (!Arrays.equals(cur, FREE)) ? -index - 1 : firstRemoved;\r\n\t\t\t}\r\n\t\t\t// if it's full, the key is already stored\r\n\t\t\t// NOTE: cur cannot equal REMOVE here (would have retuned already\r\n\t\t\t// (see above)\r\n\t\t\treturn storehash!=hash ? -index - 1 : index;\r\n\t\t}\r\n\t}", "@Test\n public void removeThenAdd() {\n String[] expect = new String[] {\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\"};\n ard.addFirst(\"k\");\n ard.addFirst(\"j\");\n ard.addFirst(\"i\");\n ard.addFirst(\"h\");\n ard.addFirst(\"g\");\n ard.addFirst(\"f\");\n ard.addFirst(\"e\");\n ard.addFirst(\"d\");\n ard.addFirst(\"c\");\n ard.addFirst(\"b\");\n ard.addFirst(\"a\");\n\n ard.removeLast();\n ard.addFirst(\"first last element\");\n expect[10] = \"first last element\";\n assertEquals(Arrays.toString(expect), Arrays.toString(ard.getBackingArray()));\n System.out.println(\"WRAPAROUND BEHAVIOR TEST\");\n System.out.println(\"removelast then addfirst\");\n System.out.println(\"should look like this after resize: \" + Arrays.toString(expect)); //print expect\n System.out.println(\"yours looks like this: \" + Arrays.toString(ard.getBackingArray()));\n assertEquals(\"j\", ard.removeLast());\n\n ard.addLast(\"j\");\n ard.removeFirst();\n ard.addLast(\"k\");\n expect[10] = \"k\";\n assertEquals(Arrays.toString(expect), Arrays.toString(ard.getBackingArray()));\n System.out.println(\"resetting\");\n System.out.println(\"should look like this after resize: \" + Arrays.toString(expect)); //print expect\n System.out.println(\"yours looks like this: \" + Arrays.toString(ard.getBackingArray()));\n\n ard.removeFirst();\n ard.addLast(\"last first element\");\n expect[0] = \"last first element\";\n assertEquals(Arrays.toString(expect), Arrays.toString(ard.getBackingArray()));\n System.out.println(\"removefirst then addlast\");\n System.out.println(\"should look like this after resize: \" + Arrays.toString(expect)); //print expect\n System.out.println(\"yours looks like this: \" + Arrays.toString(ard.getBackingArray()));\n assertEquals(\"b\", ard.removeFirst());\n }", "public void shuffleThePresentCardToTheEnd() {\n storageCards.add(storageCards.remove());\n }", "public VShuffling( com.objectspace.voyager.space.VSubspace reference ) throws com.objectspace.voyager.VoyagerException\n {\n __connectTo( reference );\n }", "private void rehash( )\n {\n HashEntry<AnyType> [ ] oldArray = array;\n\n // Create a new double-sized, empty table\n allocateArray( 2 * oldArray.length );\n occupied = 0;\n theSize = 0;\n\n // Copy table over\n for( HashEntry<AnyType> entry : oldArray )\n if( entry != null) {\n \tput(entry.key, entry.value);\n }\n }", "public static void shuffle(Column[] tab, int iter, boolean mixup){\n\n for (int i = 0; i < iter; i++) {\n for (int j = 0; j < tab.length; j++) {\n int new_rand_index = (int) Math.floor(Math.random() * tab.length);\n if (new_rand_index != j) {\n // swap the value\n int temp = tab[new_rand_index].value;\n tab[new_rand_index] = tab[j];\n tab[j].value = temp;\n\n }\n }\n }\n\n for (int i = 0; i < tab.length; i++) {\n if (Math.random() > 0.1 && mixup){\n tab[i].value = tab[i].value + (int) Math.floor(Math.random() * 3);\n }\n\n }\n\n }", "@Override\n protected Object freshBatch(Object reuse)\n {\n throw new NotImplementedException();\n }", "void synchronizeHostData(DataBuffer buffer);", "private static void changeHomeworkIndices(ArrayList<Integer> index_order) {\n ArrayList<ArrayList<Homework>> clone = new ArrayList<>(homework.size());\n\n for(int i = 0; i < homework.size(); i++) {\n int newid = index_order.indexOf(i);\n clone.add(newid, homework.get(i));\n for(Homework h: clone.get(newid)) {\n h.setIndex(newid);\n }\n }\n\n homework = (ArrayList<ArrayList<Homework>>) clone.clone();\n }", "private void rehash(){\n\t\tHashTable that = new HashTable(2 * this.table.length);\n\t\tfor (int i = 0; i < this.table.length; i++){\n\t\t\tif (this.table[i] != null){\n\t\t\t\tthat.addRecord(this.table[i].getValue());\n\t\t\t}\n\t\t}\n\t\tthis.table = that.table;\n\t\treturn;\n\t}", "private void reHash(int a){\r\n int arrayNewSize = this.capacity();\r\n if(a == 1){\r\n arrayNewSize = arrayNewSize * 2;\r\n }\r\n else if(a == -1){\r\n arrayNewSize = arrayNewSize / 2;\r\n }\r\n String[] newHashTable = new String[arrayNewSize];\r\n String [] oldCopy = this.hashTable.clone();\r\n this.capacity = arrayNewSize;\r\n this.hashTable = newHashTable;\r\n for(String i: oldCopy){\r\n this.reHashAdd(i);\r\n }\r\n this.hashing = false;\r\n }", "public void shuffle();", "public void shuffle(){\n //After shuffling dealing starts at deck[0] again\n currentCard = 0;\n //for each card , pick another random card and swap them\n for(int first = 0; first < deck.length; first++){\n int second = randomNumbers.nextInt(NUMBER_OF_CARDS);\n\n //Swap Method to swap current card with randomly selected card\n Card temp = deck[first];\n deck[first] = deck[second];\n deck[second] = temp;\n }\n }", "public NeuralPlayer[] bestIndividual(boolean recalculate)\n\t{\n\t\tif (recalculate)\n\t\t{\n\t\t\tCollection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>(numThreads);\n\t\t\t\n\t\t\tfor (int i = 0 ; i < hosts.length; i+=partition)\n\t\t\t{\n\t\t\t\tCallable<Integer> worker = new fitnessCalculator(i,Math.min(i+partition,hosts.length),true);\n\t\t\t\ttasks.add(worker);\n\t\t\t}\n\t\t\ttry\n\t\t\t{\n\t\t\t\texecutor.invokeAll(tasks);\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Something bad happened...\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\tArrays.sort(hRandFitnesses,new ArrayComparator(1,false));\n\t\t\tArrays.sort(pRandFitnesses,new ArrayComparator(1,false));\n\t\t\tdouble bestScore = hRandFitnesses[0][1];\n\t\t\tdouble bestIndex = hRandFitnesses[0][0];\n\t\t\t\n\t\t\tif (bestScore >= bestHost)\n\t\t\t{\n\t\t\t\tif (bestScore == 100)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"WE HAVE A PERFECT HOST\");\n\t\t\t\t\tSystem.out.println(\"WE HAVE A PERFECT HOST\");\n\t\t\t\t\tReversiBoard b = new ReversiBoard(boardSize);\n\t\t\t\t\tRandomPlayer r = new RandomPlayer(-1, \"Mr Random\");\n\t\t\t\t\tGame gg = new Game(hosts[(int)bestIndex],r,b);\n\t\t\t\t\tdouble score1 = gg.playGames(1000,false)[0];\n\t\t\t\t\t\n\t\t\t\t\tgg = new Game(allTimeBestHost,r,b);\n\t\t\t\t\tdouble score2 = gg.playGames(1000,false)[0];\n\t\t\t\t\t\n\t\t\t\t\tif (score1 >= score2)\n\t\t\t\t\t{\n\t\t\t\t\t\tbestHost = bestScore;\n\t\t\t\t\t\tallTimeBestHost = new NeuralPlayer(1,\"Da best H\",(BasicNetwork)hosts[(int)bestIndex].net.clone());\n\t\t\t\t\t}\n\t\t\t\t\tperfectHosts.add(new NeuralPlayer(1,\"A good H\",(BasicNetwork)hosts[(int)bestIndex].net.clone()));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbestHost = bestScore;\n\t\t\t\t\tallTimeBestHost = new NeuralPlayer(1,\"Da best H\",(BasicNetwork)hosts[(int)bestIndex].net.clone());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tbestScore = pRandFitnesses[0][1];\n\t\t\tbestIndex = pRandFitnesses[0][0];\n\t\t\t\n\t\t\tif (bestScore >= bestPara)\n\t\t\t{\n\t\t\t\tif (bestScore == 100)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"WE HAVE A PERFECT PARASITE\");\n\t\t\t\t\tSystem.out.println(\"WE HAVE A PERFECT PARASITE\");\n\t\t\t\t\tReversiBoard b = new ReversiBoard(boardSize);\n\t\t\t\t\tRandomPlayer r = new RandomPlayer(1, \"Mr Random\");\n\t\t\t\t\tGame gg = new Game(r,parasites[(int)bestIndex],b);\n\t\t\t\t\tdouble score1 = gg.playGames(1000,false)[1];\n\t\t\t\t\t\n\t\t\t\t\tgg = new Game(allTimeBestPara,r,b);\n\t\t\t\t\tdouble score2 = gg.playGames(1000,false)[1];\n\t\t\t\t\t\n\t\t\t\t\tif (score1 >= score2)\n\t\t\t\t\t{\n\t\t\t\t\t\tbestPara = bestScore;\n\t\t\t\t\t\tallTimeBestPara = new NeuralPlayer(-1,\"Da best P\",(BasicNetwork)parasites[(int)bestIndex].net.clone());\n\t\t\t\t\t}\n\t\t\t\t\tperfectParasites.add(new NeuralPlayer(-1,\"A good P\",(BasicNetwork)parasites[(int)bestIndex].net.clone()));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbestPara = bestScore;\n\t\t\t\t\tallTimeBestPara = new NeuralPlayer(-1,\"Da best P\",(BasicNetwork)parasites[(int)bestIndex].net.clone());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tNeuralPlayer[] result = {allTimeBestHost,allTimeBestPara};\n\t\treturn result;\n\t}", "boolean isNeedSharding();", "public void shuffle() {\n\t\tRandom random = new Random();\n\t\tint dealtCards = this.dealtCards.get();\n\t\tfor (int i = dealtCards; i < Deck.DECK_SIZE; i++) {\n\t\t\t// Obtain random position for available cards.\n\t\t\tint randomNumber = dealtCards + random.nextInt((Deck.DECK_SIZE - dealtCards));\n Card tempCard = cards.get(i);\n // Swap cards position.\n cards.set(i, cards.get(randomNumber));\n cards.set(randomNumber, tempCard);\n }\n\t}", "protected abstract void playShuffled();", "void shuffle();", "void shuffle();", "StackManipulation cached();", "private void updateActivePlayer() {\n indexOfActivePlayer++;\n if (indexOfActivePlayer == players.size()) {\n String previousPlayer = players.get(indexOfActivePlayer - 1).getName();\n Collections.shuffle(players);\n while (players.get(0).getName() == previousPlayer) {\n Collections.shuffle(players);\n }\n indexOfActivePlayer = 0;\n }\n }", "public void shuffle() {\n\t\tfor (int i = 0; i < cards.size(); i++){\n\t\t\t//exchange card i with the random card from i to cards.size() - 1\n\t\t\tint j = Randoms.randomIntInRange(i, cards.size() - 1);\n\t\t\tT c1 = cards.get(i);\n\t\t\tT c2 = cards.get(j);\n\t\t\tcards.set(i, c2);\n\t\t\tcards.set(j, c1);\n\t\t}\n\t}", "public void shuffle() {\r\n for ( int i = deck.size()-1; i > 0; i-- ) {\r\n int rand = (int)(Math.random()*(i+1));\r\n SpoonsCard temp = deck.get(i);\r\n deck.set(i, deck.get(rand));\r\n deck.set(rand, temp);\r\n }\r\n cardsUsed = 0;\r\n }", "public void rehash() {\r\n // Save a reference to origTable\r\n LinkedList<Entry<K,V>>[] origTable = mainTable;\r\n // Double capacity of this mainTable\r\n mainTable = new LinkedList[2 * origTable.length + 1];\r\n\r\n // Reinsert all items in origTable into expanded mainTable.\r\n numberOfKeys = 0;\r\n for (int i = 0; i < origTable.length; i++) {\r\n if (origTable[i] != null) {\r\n for (Entry<K,V> nextEntry : origTable[i]) {\r\n // Insert entry in expanded mainTable\r\n insert(nextEntry.key, nextEntry.value);\r\n }\r\n }\r\n }\r\n }", "public static void shuffle(int[] tab, int iter, boolean mixup){\n\n for (int i = 0; i < iter; i++) {\n for (int j = 0; j < tab.length; j++) {\n int new_rand_index = (int) Math.floor(Math.random() * tab.length);\n if (new_rand_index != j) {\n // swap the value\n int temp = tab[new_rand_index];\n tab[new_rand_index] = tab[j];\n tab[j] = temp;\n\n }\n }\n }\n\n for (int i = 0; i < tab.length; i++) {\n if (Math.random() > 0.1 && mixup){\n tab[i] = tab[i] + (int) Math.floor(Math.random() * 3);\n }\n \n }\n\n }", "private void shuffleAndGiveCards() {\n\n List<Card> tmpDeck= new ArrayList<Card>(deck); \n Collections.shuffle(tmpDeck, shuffleRng);\n \n for (int i=0; i<players.size(); ++i) {\n int startIndex= Jass.HAND_SIZE*i; //So for player 0 the startIndex will be 0, for player2 9, etc...\n int endIndex = Jass.HAND_SIZE*(i+1); //So for player 1 the endIndex will be 9, for player2 18, etc...\n\n CardSet hand= CardSet.of(tmpDeck.subList(startIndex, endIndex));\n PlayerId player = PlayerId.ALL.get(i);\n\n players.get(player).updateHand(hand);\n handsOfCards.put(player, hand); \n }\n }", "public void reuse() {}", "void setIdx(int i);", "@ShuffleMode\n public abstract int getShuffleMode();", "public void UpdatePushIndex() {\n\t\tsetorgetState(true,false);\n\t}", "void updateStableBuffer(LinkedList<double[]> stableStates, double[] nextMi) {\n\t\t// Recycle matrices at the end\n\t\tdouble[] stableState;\n\t\tif(stableStates.size() > maxLookback) {\n\t\t\tstableState = stableStates.removeLast();\n\t\t}\n\t\telse {\n\t\t\tstableState = new double[nStates];\n\t\t}\n\t\t\n\t\tdouble[] prevState = stableStates.getFirst();\n\t\tfor(int ix = 0; ix < nStates; ++ix) {\n\t\t\tif(maxStateLengths[ix] > 1) {\n\t\t\t\tint trans = selfTransitions[ix];\n\t\t\t\tif(trans != -1) {\n\t\t\t\t\tif (Double.isInfinite(nextMi[trans]))\n\t\t\t\t\t\tstableState[ix] = prevState[ix];\n\t\t\t\t\telse\n\t\t\t\t\t\tstableState[ix] = prevState[ix] + nextMi[trans];\t\t\t\t\n\t\t\t\t\t//log.info(String.format(\"stableState[%d] = %f = %f + %f\", ix, stableState[ix], prevState[ix], nextMi[trans]));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Now add this to the beginning.\n\t\tstableStates.addFirst(stableState);\n\t}", "public void UpdatePopIndex(){\n\t\tsetorgetState(true,true);\n\t}", "private int calcIndex(K key) {\n\t\treturn Math.abs(key.hashCode() % capacity);\n\t}", "public static void shuffle(int data[]) {\n\n }", "public void hinduShuffle()\r\n {\r\n List<Card> cut = new ArrayList<Card>();\r\n List<Card> cut2 = new ArrayList<Card>();\r\n List<Card> shuffledDeck = new ArrayList<Card>();\r\n int cutPoint = 0;\r\n int cutPoint2 = 0;\r\n for (int x = 0; x < SHUFFLE_COUNT; x++) {\r\n cutPoint = rand.nextInt( cards.size()-1 );\r\n cutPoint2 = rand.nextInt( cards.size() - cutPoint ) + cutPoint;\r\n for (int i = 0; i < cutPoint; i++) {\r\n cut.add(draw());\r\n }\r\n for (int i = cutPoint2; i < cards.size(); i++) {\r\n cut2.add(draw());\r\n }\r\n for (int i = 0; i < cut.size(); i++) {\r\n shuffledDeck.add(cut.remove(0));\r\n }\r\n for (int i = 0; i < cards.size(); i++) {\r\n shuffledDeck.add(cards.remove(0));\r\n }\r\n for (int i = 0; i < cut2.size(); i++) {\r\n shuffledDeck.add(cut2.remove(0));\r\n }\r\n cut = cards;\r\n cut.clear();\r\n cut2.clear();\r\n cards = shuffledDeck;\r\n }\r\n }", "private void changeCurIndex() {\n\t\tint TexID=-1;\r\n\t\tif(ApplicationInfo.Destination == Constants.TO_FRONT)\r\n\t\t{\r\n\t\t\tCurIndex=++CurIndex >= mApplications.size()? 0 : CurIndex;\r\n\t\t\tif((TexID=mApplications.get(getPreIndex()).getReady()) != -1)\r\n\t\t\t\tunSetTexID(TexID);\r\n \t\t\tmApplications.get(getPreIndex()).setReady(-1);\r\n\t\t}\r\n\t\telse if(ApplicationInfo.Destination == Constants.TO_BACK)\r\n\t\t{\r\n\t\t\tCurIndex=--CurIndex < 0? mApplications.size()-1 : CurIndex;\r\n\t\t\tif((TexID=mApplications.get(getNextIndex()).getReady()) != -1)\r\n\t\t\t\tunSetTexID(TexID);\r\n\t\t\tmApplications.get(getNextIndex()).setReady(-1);\r\n\t\t}\r\n\t\tLog.d(TAG, \"changeCurIndex :\"+CurIndex);\r\n\t}", "@Override\n public boolean hasStableIds() {\n return true;\n }", "public void shuffle()\r\n\t{\r\n\t\tRandom rand = ThreadLocalRandom.current();\r\n\t\t\r\n\t\tfor (int i = topCard; i > 0; i--)\r\n\t\t{\r\n\t\t\tint index = rand.nextInt(i + 1);\r\n\t\t\tString temp = cards[index];\r\n\t\t\tcards[index] = cards[i];\r\n\t\t\tcards[i] = temp;\r\n\t\t}\r\n\t}", "private int indexFor(K key) {\n int hash = hash(key.hashCode());\n return hash % this.container.length;\n }", "private void setIndices() {\r\n\r\n\t\t// Index where dry sample is written\r\n\t writeIndex = 0;\r\n\t\treadIndexBLow = 0;\r\n\t\treadIndexBHigh = 0;\r\n\r\n\t\tif (sweepUp) {\r\n\t\t\t// Sweeping upward, start at max delay\r\n\t\t readIndexALow = AudioConstants.SAMPLEBUFFERSIZE;\r\n\t\t\r\n\t\t}\telse\t{\r\n\t\t\r\n\t\t\t// Sweeping downward, start at min delay\r\n\t\t\tif (numberOfChannels == 1)\r\n\t\t\t\treadIndexALow = delayBufferSize - 2;\r\n\t\t\telse\r\n\t\t\t\treadIndexALow = delayBufferSize - 4;\r\n\t\t}\r\n\t\t// Initialize other read ptr\r\n\t\tif (numberOfChannels == 1)\r\n\t\t\treadIndexAHigh = readIndexALow + 1;\r\n\t\telse\r\n\t\t\treadIndexAHigh = readIndexALow + 2;\r\n\t}", "public void shuffle() {\r\n for (int i = 0; i < this.numCards; i++) {\r\n int spot = (int) (Math.random() * ((this.numCards - 1) - i + 1) + i);\r\n Card temp = cards[i];\r\n cards[i] = cards[spot];\r\n cards[spot] = temp;\r\n\r\n\r\n }\r\n }", "protected void rehash() {\n int oldCapacity = table.length;\n Entry oldMap[] = table;\n\n int newCapacity = oldCapacity * 2 + 1;\n Entry newMap[] = new Entry[newCapacity];\n\n threshold = (int) (newCapacity * loadFactor);\n table = newMap;\n\n for (int i = oldCapacity; i-- > 0; ) {\n for (Entry old = oldMap[i]; old != null; ) {\n Entry e = old;\n old = old.next;\n\n int index = (e.key & 0x7FFFFFFF) % newCapacity;\n e.next = newMap[index];\n newMap[index] = e;\n }\n }\n }", "public int[] flip() {\n if (used.size() == total)\n return new int[] {};\n\n int index = new Random().nextInt(total);\n while (used.contains(index))\n index = ++index % total;\n used.add(index);\n\n return new int[] {index / cols, index % cols};\n }" ]
[ "0.5697894", "0.5624492", "0.5496296", "0.54340935", "0.5424244", "0.53039056", "0.5288327", "0.5269549", "0.52277386", "0.52182907", "0.5163292", "0.5130579", "0.5129206", "0.51190406", "0.51027656", "0.50895613", "0.5089032", "0.5054672", "0.5047961", "0.50379896", "0.50257444", "0.50237507", "0.50221395", "0.50098133", "0.4995907", "0.49928638", "0.49822018", "0.49806166", "0.49633178", "0.49607217", "0.49606752", "0.4955819", "0.49532768", "0.4952287", "0.495052", "0.49424374", "0.49387857", "0.49171704", "0.4908055", "0.49018806", "0.48911315", "0.4885579", "0.48777595", "0.48629662", "0.48565575", "0.48497707", "0.48360604", "0.48226523", "0.48209304", "0.48046696", "0.47944397", "0.47916964", "0.4771595", "0.47675535", "0.47655466", "0.47574288", "0.47574028", "0.47505894", "0.47494075", "0.47464412", "0.47462437", "0.47417724", "0.4741457", "0.47394487", "0.47366086", "0.47339544", "0.4733879", "0.47336033", "0.47329703", "0.4728053", "0.47255343", "0.47219437", "0.4720194", "0.47199747", "0.47167575", "0.47159562", "0.47159562", "0.47131667", "0.47093245", "0.47025645", "0.47003594", "0.46992868", "0.46970767", "0.46965665", "0.46963376", "0.4692254", "0.4691138", "0.46906027", "0.46751988", "0.46643725", "0.46622598", "0.4658066", "0.46546417", "0.4653603", "0.46527636", "0.46459973", "0.46423405", "0.46409225", "0.46401677", "0.4635797", "0.4633633" ]
0.0
-1
We specifically don't switch 429 responses to support transactional workflows where it is important for a large number of requests to all land on the same node, even if a couple of them get rate limited in the middle.
@Override public void onSuccess(Response response) { if (Responses.isServerErrorRange(response) || (Responses.isQosStatus(response) && !Responses.isTooManyRequests(response))) { OptionalInt next = incrementHostIfNecessary(pin); instrumentation.receivedErrorStatus(pin, channel, response, next); } else { instrumentation.successfulResponse(channel.stableIndex()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void requestRateLimited();", "public void incrementActiveRequests() \n {\n ++requests;\n }", "private synchronized int getNextRequestCode(){\r\n return currentRequestCode++;\r\n }", "public static long getApiMaxInflightRequests() {\n return 5000L;\n }", "public int getCountRequests() {\n/* 415 */ return this.countRequests;\n/* */ }", "public static void main(String[] args) throws InterruptedException {\n\n Random random = new Random();\n RateLimitingVOne rateLimiter = new RateLimitingVOne();\n UUID userId = UUID.randomUUID();\n\n List<Request> allRequests = new ArrayList<>();\n\n long start = System.currentTimeMillis();\n for (int i = 1; i < 100; i++) {\n int count = random.nextInt(10);\n Request nr = new Request(count> 0 ? count : 1, System.currentTimeMillis(), i);\n allRequests.add(nr);\n rateLimiter.handleNewRequest(nr, userId);\n// sleep(random.nextInt(350));\n sleep(250);\n }\n\n long elapsed = System.currentTimeMillis() - start;\n\n System.out.println(\"Time ---- >> \"+ elapsed);\n\n for (Request tr : allRequests) {\n long since = (tr.timestamp - start);\n int count = tr.isRejected ? -tr.requestsCount : tr.requestsCount;\n System.out.println(tr.sequence+\", \"+ since + \" , \" + count);\n }\n\n\n Request r = rateLimiter.userRequestLog.get(userId);\n int count =0;\n while (r.previous != null) {\n count++;\n r = r.previous;\n }\n\n System.out.println(count);\n\n\n }", "OptimizeResponse() {\n\n\t}", "private void resendWorkaround() {\r\n synchronized(waiters) {\r\n if(waiters.size() > 0 && lastResponseNumber == responseNumber && System.currentTimeMillis() - lastProcessedMillis > 450) {\r\n // Resend last request(s)\r\n for(Integer i : waiters.keySet()) {\r\n System.err.println(Thread.currentThread() + \": Resending: $\" + i + \"-\" + waiters.get(i));\r\n writer.println(\"$\" + i + \"-\" + waiters.get(i));\r\n writer.flush();\r\n lastProcessedMillis = System.currentTimeMillis();\r\n }\r\n }\r\n }\r\n }", "@Override\n protected boolean isResponseStatusToRetry(Response response)\n {\n return response.getStatus() / 4 != 100;\n }", "@Override\n public OrderResponseDto buy(OrderRequestDto orderRequestDto){\n if(CollectionUtils.isEmpty(orderRequestDto.getOrderItemList())){\n throw new BusinessException(SystemErrorCodeEnum.ILLEGAL_PARAMETER.getCode(),\n SystemErrorCodeEnum.ILLEGAL_PARAMETER.getMessage());\n }\n\n ThreadFactory orderPromotionThreadFactory = new ThreadFactoryBuilder().setNameFormat(\"order-promotion-%d\").build();\n ExecutorService orderPromotionProcessThreadPool = new ThreadPoolExecutor(5, 200, 0L,\n TimeUnit.MILLISECONDS, new LinkedBlockingDeque<>(1024), orderPromotionThreadFactory,\n new ThreadPoolExecutor.AbortPolicy());\n\n //Execute as individual parallel tasks for promotion settlement process of each sku item\n CompletionService<List<SkuSettlementDto>> orderSettlementSvc = new ExecutorCompletionService<>(orderPromotionProcessThreadPool);\n orderRequestDto.getOrderItemList().parallelStream().forEach(oi -> {\n //Validation for sku basic info\n SkuInfo skuInfo = skuRepository.selectById(oi.getSkuId());\n if(skuInfo == null){\n throw new BusinessException(BusinessErrorCodeEnum.CANNOT_FOUND_SKU_BASE_INFO.getCode(),\n BusinessErrorCodeEnum.CANNOT_FOUND_SKU_BASE_INFO.getMessage());\n }\n\n //Query related rule exists or not\n PromotionRule filter = new PromotionRule();\n filter.setPromotionSkuId(oi.getSkuId());\n filter.setDelete(false);\n Wrapper<PromotionRule> wrapper = new EntityWrapper<>(filter);\n PromotionRule promotionRule = promotionRuleRepository.selectOne(wrapper);\n //If no corresponding promotion rule, return\n if(promotionRule == null){\n return;\n }\n\n orderSettlementSvc.submit(new Callable() {\n @Override\n public SkuSettlementDto call() throws Exception {\n //Start execute promotion settlement process\n PromotionProcessBaseStrategy strategy = promotionProcessContext.getPromotionProcessBaseStrategy(\n PromotionRuleTypeEnum.getValueByCode(promotionRule.getPromotionRuleType()));\n\n ProcessSkuSettlementBo processSkuSettlementBo = new ProcessSkuSettlementBo();\n processSkuSettlementBo.setPromotionRule(promotionRule);\n processSkuSettlementBo.setSkuInfo(skuInfo);\n BeanUtils.copyProperties(oi, processSkuSettlementBo);\n\n return strategy.processSkuSettlement(processSkuSettlementBo);\n }\n });\n });\n\n //Get the summary result of each task\n List<SkuSettlementDto> processResultSkuList = new ArrayList();\n orderRequestDto.getOrderItemList().parallelStream().forEach(oi -> {\n try {\n SkuSettlementDto processedSkuInfo = (SkuSettlementDto)orderSettlementSvc.take().get();\n if(processedSkuInfo != null) {\n processResultSkuList.add(processedSkuInfo);\n }\n } catch (InterruptedException | ExecutionException e) {\n throw new BusinessException(BusinessErrorCodeEnum.PROCESS_SKU_PROMOTION_SETTLEMENT_FAILED.getCode(),\n BusinessErrorCodeEnum.PROCESS_SKU_PROMOTION_SETTLEMENT_FAILED.getMessage() + e.getStackTrace());\n }\n });\n\n orderPromotionProcessThreadPool.shutdown();\n\n OrderResponseDto orderResponseDto = null;\n if(!CollectionUtils.isEmpty(processResultSkuList)){\n orderResponseDto = new OrderResponseDto();\n orderResponseDto.setSkuSettlementResultList(processResultSkuList);\n\n //Calculate total order actual paid amount\n List<BigDecimal> allSkuSubtotalAmount = processResultSkuList.stream()\n .map(SkuSettlementDto::getSubTotalAmount)\n .collect(Collectors.toList());\n if(!CollectionUtils.isEmpty(allSkuSubtotalAmount)){\n orderResponseDto.setActualTotalPaidAmount(allSkuSubtotalAmount.stream()\n .reduce(BigDecimal.ZERO, BigDecimal::add)\n .setScale(2));\n }\n }\n\n return orderResponseDto;\n }", "public int getRequestRetryCount() {\n \t\treturn 1;\n \t}", "public void incrementNumExtendedRequests() {\n this.numExtendedRequests.incrementAndGet();\n }", "private void refreshRateLimit() {\n\t\tfinal String METHOD_NAME = \"refreshRateLimit\";\n\t\tLOGGER.entering(CLASS_NAME, METHOD_NAME);\n\t\tfinal String rateLimitResourceUrl = \"https://api.github.com/rate_limit\";\n\t\tUriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(rateLimitResourceUrl)\n\t\t\t\t.queryParam(\"client_id\", clientId).queryParam(\"client_secret\", clientSecret);\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\tResponseEntity<String> response = restTemplate.exchange(builder.toUriString(), HttpMethod.GET,\n\t\t\t\tnew HttpEntity<>(new HttpHeaders()), String.class);\n\t\tif (response.getStatusCode() != HttpStatus.OK) {\n\t\t\tthrow new RateLimitExceededException(\"Error connecting to GitHub. could not refresh rate limit\");\n\t\t}\n\t\ttry {\n\t\t\tJSONParser parser = new JSONParser();\n\t\t\tJSONObject responseObject = (JSONObject) parser.parse(response.getBody());\n\t\t\tJSONObject resources = (JSONObject) responseObject.get(\"resources\");\n\t\t\tJSONObject core = (JSONObject) resources.get(\"core\");\n\t\t\tJSONObject search = (JSONObject) resources.get(\"search\");\n\t\t\tcoreRateLimit = (Long) core.get(\"limit\");\n\t\t\tsearchRateLimit = (Long) search.get(\"limit\");\n\t\t\tLOGGER.logp(Level.INFO, CLASS_NAME, METHOD_NAME, \"Core rate limit : \" + coreRateLimit + \", search rate limit : \" + searchRateLimit);\n\t\t} catch (ParseException ex) {\n\t\t\tLOGGER.logp(Level.SEVERE, CLASS_NAME, METHOD_NAME, ex.getMessage());\n\t\t}\n\t\tLOGGER.exiting(CLASS_NAME, METHOD_NAME);\n\t}", "private String sendRequest(String responseType, String token, Object body, String path, String expectResult, int statusCode) {\n RestAssured.config = RestAssured.config().sslConfig(SSLConfig.sslConfig().allowAllHostnames());\n\n Map<String, Object> header = new HashMap<>();\n header.put(\"Accept-Language\", \"en,ar\");\n if (body != null) {\n if (body instanceof Map) {\n Map<String, Object> bodyMap = (Map) body;\n if (bodyMap.containsKey(\"Accept-Language\")) {\n header.put(\"Accept-Language\", bodyMap.get(\"Accept-Language\"));\n }\n }\n }\n if (token != null) header.put(\"Authorization\", token);\n\n RequestSpecification request = given()\n .contentType(\"application/json\")\n .headers(header);\n\n if (body != null) request.body(body);\n\n request.when();\n\n// bypass statusCode - 429 ------------------------------------------------------\n Response resp = setResponse(responseType, request, path);\n\n if (resp.statusCode() == statusCode429) {\n sleep(2000);\n log(\"statusCode - \" + resp.statusCode());\n resp = setResponse(responseType, request, path);\n }\n\n String response = resp\n .then()\n .log().all()\n .statusCode(statusCode)\n .extract().response()\n .asString();\n// ---------------------------------------------------------------------------------\n\n\n// without bypass statusCode - 429 ----------------------------------------------\n// String response = setResponse(responseType, request, path)\n// .then()\n// .statusCode(statusCode)\n// .log().all()\n// .extract().response()\n// .asString();\n// ---------------------------------------------------------------------------------\n\n if (expectResult.equals(allResult)) return response;\n return from(response).getString(expectResult);\n }", "void rateLimitReset();", "private void retryTask(HttpServletResponse resp) {\n resp.setStatus(500);\n }", "public boolean isTooManyRequests() {\n if (this.getCode() != null && this.getCode() == CODE_TOO_MANY_REQUESTS) {\n return true;\n }\n return false;\n }", "public void incrementNumAbandonRequests() {\n this.numAbandonRequests.incrementAndGet();\n }", "private void viewPendingRequests() {\n\n\t}", "@Override\n\tpublic void onRepeatRequest(HttpRequest request,int requestId, int count) {\n\t\t\n\t}", "private void handleResponse(List<TryTrackingIndexAction<T>> actions, IndexBatchResponse batchResponse) {\n if (batchResponse.getStatusCode() == HttpURLConnection.HTTP_ENTITY_TOO_LARGE && batchResponse.getCount() == 1) {\n IndexAction<T> action = actions.get(0).getAction();\n if (onActionErrorConsumer != null) {\n onActionErrorConsumer.accept(new OnActionErrorOptions<>(action)\n .setThrowable(createDocumentTooLargeException()));\n }\n return;\n }\n\n List<TryTrackingIndexAction<T>> actionsToRetry = new ArrayList<>();\n boolean has503 = batchResponse.getStatusCode() == HttpURLConnection.HTTP_UNAVAILABLE;\n if (batchResponse.getResults() == null) {\n /*\n * Null results indicates that the entire request failed. Retry all documents.\n */\n actionsToRetry.addAll(actions);\n } else {\n /*\n * We got back a result set, correlate responses to their request document and add retryable actions back\n * into the queue.\n */\n for (IndexingResult result : batchResponse.getResults()) {\n String key = result.getKey();\n TryTrackingIndexAction<T> action = actions.stream()\n .filter(a -> key.equals(a.getKey()))\n .findFirst()\n .orElse(null);\n\n if (action == null) {\n LOGGER.warning(\"Unable to correlate result key {} to initial document.\", key);\n continue;\n }\n\n if (isSuccess(result.getStatusCode())) {\n if (onActionSucceededConsumer != null) {\n onActionSucceededConsumer.accept(new OnActionSucceededOptions<>(action.getAction()));\n }\n } else if (isRetryable(result.getStatusCode())) {\n has503 |= result.getStatusCode() == HttpURLConnection.HTTP_UNAVAILABLE;\n if (action.getTryCount() < maxRetries) {\n action.incrementTryCount();\n actionsToRetry.add(action);\n } else {\n if (onActionErrorConsumer != null) {\n onActionErrorConsumer.accept(new OnActionErrorOptions<>(action.getAction())\n .setThrowable(createDocumentHitRetryLimitException())\n .setIndexingResult(result));\n }\n }\n } else {\n if (onActionErrorConsumer != null) {\n onActionErrorConsumer.accept(new OnActionErrorOptions<>(action.getAction())\n .setIndexingResult(result));\n }\n }\n }\n }\n\n if (has503) {\n currentRetryDelay = calculateRetryDelay(backoffCount.getAndIncrement());\n } else {\n backoffCount.set(0);\n currentRetryDelay = Duration.ZERO;\n }\n\n if (!CoreUtils.isNullOrEmpty(actionsToRetry)) {\n reinsertFailedActions(actionsToRetry);\n }\n }", "public static void main(String... args) {\n List<Integer> data = new ArrayList<Integer>();\n data.add(1);\n data.add(1);\n data.add(1);\n data.add(1);\n data.add(2);\n data.add(2);\n data.add(3);\n data.add(4);\n data.add(4);\n data.add(4);\n data.add(4);\n data.add(5);\n data.add(5);\n data.add(5);\n data.add(5);\n data.add(6);\n data.add(6);\n data.add(7);\n data.add(7);\n data.add(7);\n data.add(8);\n data.add(9);\n data.add(10);\n data.add(10);\n data.add(10);\n data.add(10);\n data.add(10);\n data.add(11);\n data.add(12);\n data.add(12);\n\n int count = droppedRequests(data);\n System.out.println(count);\n }", "@Override\n public Flux<Response> statefulChannel(Publisher<Request> messages, ByteBuf metadata) {\n Flux.from(messages).limitRate(8).subscribe(processor::onNext);\n return responseFlux;\n }", "private boolean requestLimitReached() {\n\t\treturn (requestCount >= maximumRequests);\n\t}", "protected abstract boolean sendNextRequests();", "@Nonnegative\n @CheckReturnValue\n public abstract int getRemainingRequests();", "public boolean isAllowPartialRetryRequests() {\n\t\treturn false;\n\t}", "private int spreadWriteRequests() {\n return RANDOM.nextInt(MAX_SLEEP_TIME);\n }", "@Test\n @Category(FastTest.class)\n public void handleDownloadsExceededCorrectly() throws Exception {\n stubFor(get(urlPathMatching(\"/download/0/.*\"))\n .willReturn(aResponse()\n .withStatus(500)\n .withHeader(\"Content-Type\", \"text/html\")\n .withBodyFile(\"download-limit-exceeded.html\")));\n\n // call service under test\n migrator.migrate(getClass().getResource(TESTFILE_VALID_BOOK));\n\n // verify that our logic attempted download twice\n verify(getRequestedFor(urlEqualTo(\n \"/download/0/?token=abcdef\")));\n }", "@Override\n public long getResponseQueueSize() {\n return 0;\n }", "public long getAmountRequested();", "public Long get_cacheparameterizedinvalidationrequestsrate() throws Exception {\n\t\treturn this.cacheparameterizedinvalidationrequestsrate;\n\t}", "public void setRequestNum(int amount){\n requestNum = amount;\n }", "public void incrementNumAddRequests() {\n this.numAddRequests.incrementAndGet();\n }", "@ApiModelProperty(value = \"The maximum number of payments to return in a single response. This value cannot exceed 200.\")\n public Integer getLimit() {\n return limit;\n }", "public Long get_cacheparameterizedrequestsrate() throws Exception {\n\t\treturn this.cacheparameterizedrequestsrate;\n\t}", "public void incrementNumUnbindRequests() {\n this.numUnbindRequests.incrementAndGet();\n }", "@Test\n public void pledgeRedeemVoteTest() throws IOException {\n TestCommon.getAccountInfo(topj, account);\n\n // redeem vote\n// ResponseBase<XTransactionResponse> redeemTokenVote = topj.unStakeVote(account, new BigInteger(\"1000\"));\n// System.out.println(\"un stake vote hash >> \" + redeemTokenVote.getData().getOriginalTxInfo().getTxHash() + \" > is success > \" + redeemTokenVote.getData().isSuccess());\n// TestCommon.getAccountInfo(topj, account);\n\n // set vote\n// Map<String, BigInteger> voteInfo = new HashMap<>();\n// String nodeAddress = \"T-0-LaFmRAybSKTKjE8UXyf7at2Wcw8iodkoZ8\";\n// voteInfo.put(nodeAddress, BigInteger.valueOf(5000));\n// ResponseBase<XTransactionResponse> setVoteResult = topj.voteNode(account, voteInfo);\n// System.out.println(\"set vote hash >> \" + setVoteResult.getData().getOriginalTxInfo().getTxHash() + \" >> is success > \" + setVoteResult.getData().isSuccess());\n//\n// TestCommon.getAccountInfo(topj, account);\n\n // cancel vote\n// voteInfo.put(nodeAddress, BigInteger.valueOf(200));\n// ResponseBase<XTransactionResponse> cancelVoteResult = topj.unVoteNode(account, voteInfo);\n// System.out.println(\"cancel vote hash >> \" + cancelVoteResult.getData().getOriginalTxInfo().getTxHash() + \" >> is success > \" + setVoteResult.getData().isSuccess());\n//\n// TestCommon.getAccountInfo(topj, account);\n\n// account.setAddress(\"T-0-LeP9oXqB8uLCBNCd9BsfULUYhSyDknt1q2\");\n// ResponseBase<VoteUsedResponse> r = topj.listVoteUsed(account);\n// ResponseBase<VoteUsedResponse> r = topj.listVoteUsed(account, \"T00000LKF18dpN5yGuBBpg38ZQyC8vpdzy6YQfPe\");\n// System.out.println(\"list vote used > \" + r.getData().getVoteInfos().get(\"T00000LKF18dpN5yGuBBpg38ZQyC8vpdzy6YQfPe\"));\n\n Map<String, String> result = Topj.generateV3Args(\"T80000968927100f3cb7b23e8d477298311648978d8613\", Arrays.asList(\"f8a49466ab344963eaa071f9636faac26b0d1a399003259466ab344963eaa071f9636faac26b0d1a3990032586010203040506830304058801020304050607088831323334353637388b68656c6c6f20776f726c648d746f7020756e69742074657374b8410051a134afd1fc323b4477d774a249742860c0d200f874ad6f3299c5270304e7f501423897a3d8e1613d339102af7f3011f901d85b0f848a27434a261563e259ee\"));\n\n System.out.println(\"generateV3Args > \" + JSON.toJSONString(result));\n }", "public Long get_cachetotnonparameterizedinvalidationrequests() throws Exception {\n\t\treturn this.cachetotnonparameterizedinvalidationrequests;\n\t}", "public Long get_cacheinvalidationrequestsrate() throws Exception {\n\t\treturn this.cacheinvalidationrequestsrate;\n\t}", "public void resumeRequests() {\n requestTracker.resumeRequests();\n }", "@Then(\"DisLike counter increases by one\")\n\tpublic void dis_like_counter_increases_by_one() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "public void resetProductResponseIndex() {\r\n/* 41 */ this.currentProductResponseIndex = 0;\r\n/* */ }", "static void logUnifiedConsentThrottledRequests(boolean isRequestThrottled) {\n RecordHistogram.recordBooleanHistogram(\n \"Search.ContextualSearch.UnifiedConsent.ThrottledRequests\", isRequestThrottled);\n }", "long getRequestsCount();", "public void pauseRequests() {\n requestTracker.pauseRequests();\n }", "RESPONSE tally();", "protected short maxRetries() { return 15; }", "int getActiveBlockRequestsNumber() {\n return blockRequests.size();\n }", "@Override\r\n public void onBatchCompleted(GraphRequestBatch graphRequests) {\n }", "public int getMinResponseRate() {\n return _minResponseRate;\n }", "public abstract boolean isRateLimit();", "@Override\n public void onNext(GeneralListDataPojo generalPojo) {\n Log.d(TAG,TAG+\" onNext\");\n alterProgressBar();\n int statusCode = (int) generalPojo.getStatusCode();\n //Check for error\n if(statusCode!=mApiConstants.SUCCESS){\n Log.d(TAG,TAG+\" onNext ERROR statusCode = \"+statusCode);\n String errorMessage = generalPojo.getError().get(0).getErrMessage();\n if(!TextUtils.isEmpty(errorMessage)){\n showErrorAlert(errorMessage);\n }else{\n showErrorAlert(getString(R.string.general_error_server));\n }\n }else{\n Log.d(TAG,TAG+\" onNext statusCode = \"+statusCode);\n String isVerified = generalPojo.getData().get(0).getIsVerified();\n String memberID = generalPojo.getData().get(0).getMemberId();\n String isActive = generalPojo.getData().get(0).getActive();\n\n if(!TextUtils.isEmpty(memberID)){\n mSharedPreference.setPreferenceString(mSharedPreference.MEMBER_ID, memberID);\n }else{\n Log.d(TAG,TAG+\" onNext member id is empty\");\n }\n\n if(!TextUtils.isEmpty(isVerified) && !TextUtils.isEmpty(isActive)) {\n\n if (isVerified.equalsIgnoreCase(mApiConstants.STATUS_1) && isActive.equalsIgnoreCase(mApiConstants.STATUS_1)) {\n Log.d(TAG,TAG+\" onNext = isVerified = 1 && isActive = 1\");\n //User registered and verified email, but would have deleted the app\n showErrorAlert(getString(R.string.already_registered));\n mSharedPreference.setPreferenceInt(mSharedPreference.VERIFIED_STATUS, 1);\n\n } else if (isVerified.equalsIgnoreCase(mApiConstants.STATUS_1) && isActive.equalsIgnoreCase(mApiConstants.STATUS_0)) {\n Log.d(TAG,TAG+\" onNext = isVerified = 1 && isActive = 0\");\n //When registered user is banned from backend due to xyz reason. Contact support.\n showErrorAlert(getString(R.string.user_blocked));\n mSharedPreference.setPreferenceInt(mSharedPreference.VERIFIED_STATUS, 1);\n\n } else if (isVerified.equalsIgnoreCase(mApiConstants.STATUS_0) && isActive.equalsIgnoreCase(mApiConstants.STATUS_0)) {\n Log.d(TAG,TAG+\" onNext = isVerified = 0 && isActive = 0\");\n //Email Not verified\n mSharedPreference.setPreferenceInt(mSharedPreference.VERIFIED_STATUS, 0);\n //show OTP screen\n showOTPScreen();\n }\n }else{\n showErrorAlert(getString(R.string.general_error_server));\n }\n }\n }", "long getInnerStatusCode();", "public Long get_cachenonparameterizedinvalidationrequestsrate() throws Exception {\n\t\treturn this.cachenonparameterizedinvalidationrequestsrate;\n\t}", "public interface Limiter {\n public boolean needLimit(RequestContext context);\n}", "private boolean handleHttpRequests(int[] timeInterval) {\n //generate 3 random data\n int userId1 = ThreadLocalRandom.current().nextInt(POPULATION);\n int userId2 = ThreadLocalRandom.current().nextInt(POPULATION);\n int userId3 = ThreadLocalRandom.current().nextInt(POPULATION);\n\n int timeInterval1 = ThreadLocalRandom.current().nextInt(timeInterval[1] - timeInterval[0]+1) + timeInterval[0];\n int timeInterval2 = ThreadLocalRandom.current().nextInt(timeInterval[1] - timeInterval[0]+1) + timeInterval[0];\n int timeInterval3 = ThreadLocalRandom.current().nextInt(timeInterval[1] - timeInterval[0]+1) + timeInterval[0];\n int stepCount1 = ThreadLocalRandom.current().nextInt(5000);\n int stepCount2 = ThreadLocalRandom.current().nextInt(5000);\n int stepCount3 = ThreadLocalRandom.current().nextInt(5000);\n\n try {\n long startTime = System.currentTimeMillis();\n Response response = postUserData(userId1,DAY_NUM,timeInterval1,stepCount1);\n countResponse(startTime,response);\n\n startTime = System.currentTimeMillis();\n response = postUserData(userId2,DAY_NUM,timeInterval2,stepCount2);\n countResponse(startTime,response);\n\n startTime = System.currentTimeMillis();\n response = getCurrentUserData(userId1);\n countResponse(startTime,response);\n\n startTime = System.currentTimeMillis();\n response = getSingleUserData(userId1, DAY_NUM);\n countResponse(startTime,response);\n\n startTime = System.currentTimeMillis();\n response = postUserData(userId3,DAY_NUM,timeInterval3,stepCount3);\n countResponse(startTime,response);\n\n } catch (Exception e) {\n // System.out.println(\"Exception in Post1: \" + e.getClass().getSimpleName());\n System.out.println(e.getMessage() + \"\\n\" + e.getCause());\n return false;\n }\n\n printer.numOfRequestsSent(5);\n return true;\n }", "public void customLoadMoreDataFromApi(int offset) {\n }", "public interface RateLimiter {\n\n String rateLimiterId();\n\n boolean isRateLimited(String identity);\n\n}", "@Scheduled(fixedDelay = 15000)\n\tpublic void scheduleFixedDelayTask() {\n\t\t\n\t\tList<Tx> listaTx = txRepo.findAll();\n\t\t\n\t\tfor (Tx tx : listaTx) {\n\t\t\tif(tx.getStatus().equals(TxStatus.PENDING)) {\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t \"Fixed delay task - \" + System.currentTimeMillis() / 20000);\n\t\t\t\t//to be implemented\n\t\t\t\t\n\t\t\t\tString auth = \"Bearer \" + tx.getSbi().getBitcoinAddress();\n\t\t\t\tHttpHeaders headers = new HttpHeaders();\n\t\t\t\theaders.add(\"Authorization\", auth);\n\t\t\t\t\n\t\t\t\tInteger orderId = tx.getorder_id();\n\t\t\t\t\n\t\t\t\tGetOrderResponseDTO getOrderDTO = new GetOrderResponseDTO();\n\t\t\t\t\n\t\t\t ResponseEntity<Object> responseEntity = new RestTemplate().exchange(\"https://api-sandbox.coingate.com/v2/orders/\" + orderId, HttpMethod.GET,\n\t\t\t\t\t\tnew HttpEntity<Object>(getOrderDTO, headers), Object.class);\n\t\t\t \n\t\t\t \n\t\t\t ObjectMapper mapper = new ObjectMapper();\n\t\t\t\tmapper.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);\n\t\t\t\tGetOrderResponseDTO gorResponse = new GetOrderResponseDTO();\n\t\t\n\t\t\t\tgorResponse = mapper.convertValue(responseEntity.getBody(), GetOrderResponseDTO.class);\n\t\t\n\t\t\t \n\t\t\t System.out.println(\"Order status: \" + gorResponse.getStatus());\n\t\t\t\t\n\t\t\t if(gorResponse.getStatus().equals(\"paid\") || \n\t\t\t \t\tgorResponse.getStatus().equals(\"invalid\") || \n\t\t\t \t\tgorResponse.getStatus().equals(\"expired\") || \n\t\t\t \t\tgorResponse.getStatus().equals(\"canceled\")) {\n\t\t\t \t\n\t\t\t \t//naredne tri linije mi nisu nista jasne zasto sam ovo radio pre mesec dana\n\t\t\t \tTx tx2 = new Tx();\n\t\t \t\ttx2 = txRepo.findByusername(gorResponse.getId());\n\t\t \t\tSystem.out.println(\"TX: \" + tx2.getorder_id());\n\t\t \t\t\n\t\t \t\tRestTemplate restTemplate = new RestTemplate();\n\t\t \t\t\n\t\t \t\tTxInfoDto txInfo;\n\t\t\t \t\n\t\t\t \tif(gorResponse.getStatus().equals(\"paid\")) {\n\t\t\t \t\t\n\t\t\t \t\ttx.setStatus(TxStatus.PAID);\n\t\t\t \t\ttxInfo = new TxInfoDto(tx.getorder_id(), TxStatusReqHandler.SUCCESS, \"https://localhost:8764/bitCoin\");\n\t\t\t \t\t\t\n\t\t\t \t} else if(gorResponse.getStatus().equals(\"invalid\")) {\n\t\t\t \t\ttx.setStatus(TxStatus.FAILED);\n\t\t\t \t\ttxInfo = new TxInfoDto(tx.getorder_id(), TxStatusReqHandler.FAILED, \"https://localhost:8764/bitCoin\");\n\t\t\t \t} else if(gorResponse.getStatus().equals(\"expired\")){\n\t\t\t \t\ttx.setStatus(TxStatus.EXPIRED);\n\t\t\t \t\ttxInfo = new TxInfoDto(tx.getorder_id(), TxStatusReqHandler.FAILED, \"https://localhost:8764/bitCoin\");\n\t\t\t \t} else {\n\t\t\t \t\ttx.setStatus(TxStatus.CANCELED);\n\t\t\t \t\ttxInfo = new TxInfoDto(tx.getorder_id(), TxStatusReqHandler.ERROR, \"https://localhost:8764/bitCoin\");\n\t\t\t \t}\n\t\t\t \t\n\t\t\t \ttxRepo.save(tx);\n\t\t \t\tResponseEntity<TxInfoDto> r = restTemplate.postForEntity(\"https://localhost:8111/request/updateTxAfterPaymentIsFinished\", txInfo, TxInfoDto.class);\n\t\t \t\n\t\t\t \t\n\t\t\t \t\n\t\t\t \t\n\t\t\t \t\n\t\t\t }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Nikom nista\");\n\t\t\t\tlogger.info(\"Scheduled is working...\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Nema transakcija :(\");\n\t\t\n\t/*\tif(IS_CREATE) {\n\t\t\tSystem.out.println(\n\t\t\t\t \"Fixed delay task - \" + System.currentTimeMillis() / 20000);\n\t\t\t\t\t\t \t\n\t\t String authToken = STATIC_TOKEN;\n\t\t \n\t\t\tHttpHeaders headers = new HttpHeaders();\n\t\t\theaders.add(\"Authorization\", authToken);\n\t\t\t\n\t\t\tSystem.out.println(\"authtoken : \" + authToken);\n\t\t \n\t\t\tGetOrderResponseDTO getOrderDTO = new GetOrderResponseDTO();\n\t\t\t\n\t\t ResponseEntity<Object> responseEntity = new RestTemplate().exchange(\"https://api-sandbox.coingate.com/v2/orders/\" + STATIC_ID, HttpMethod.GET,\n\t\t\t\t\tnew HttpEntity<Object>(getOrderDTO, headers), Object.class);\n\t\t \n\t\t \n\t\t ObjectMapper mapper = new ObjectMapper();\n\t\t\tmapper.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);\n\t\t\tGetOrderResponseDTO gorResponse = new GetOrderResponseDTO();\n\t\n\t\t\tgorResponse = mapper.convertValue(responseEntity.getBody(), GetOrderResponseDTO.class);\n\t\n\t\t \n\t\t System.out.println(\"Order status: \" + gorResponse.getStatus());\n\t\t \n\t\t if(gorResponse.getStatus().equals(\"paid\") || gorResponse.getStatus().equals(\"invalid\") || gorResponse.getStatus().equals(\"expired\")) {\n\t\t \t\n\t\t \t/*Tx tx = new Tx();\n\t \t\ttx = txRepo.findByOrder_Id(gorResponse.getId());\n\t \t\tSystem.out.println(\"TX: \" + tx.getorder_id());\n\t\t \t\n\t\t \tif(gorResponse.getStatus().equals(\"paid\")) {\n\t\t \t\t//promenimo u bazi\n\t\t \t\t//txRepo.getOne((Integer)gorResponse.getId());\n\t\t \t\ttx.setStatus(TxStatus.PAID);\n\t\t \t\t\n\t\t \t} else if(gorResponse.getStatus().equals(\"invalid\")) {\n\t\t \t\ttx.setStatus(TxStatus.FAILED);\n\t\t \t} else {\n\t\t \t\ttx.setStatus(TxStatus.EXPIRED);\n\t\t \t}\n\t\t \t\n\t\t \ttxRepo.save(tx);*/\n\t\t /*\t\n\t\t \tIS_CREATE = false;\n\t\t }\n\t\t\t\t\t \n\t\t\t\t \n\t\t} else {\n\t\t\tSystem.out.println(\"Nikom nista\");\n\t\t\tlogger.info(\"Scheduled is working...\");\n\t\t}*/\n\t\t\n\t \n\t \n\t}", "public List<Integer> getRequests () {\n return requests;\n }", "public void testPrioritizeContention() throws Exception\n {\n ResourceContentionManager rcm = rezmgr.getContentionManager();\n\n // Handler impl used for testing...\n class Handler implements ResourceContentionHandler\n {\n public boolean called = false;\n\n public int ret = 1;\n\n public ResourceUsage req = null;\n\n public ResourceUsage[] own = null;\n\n public String proxy = null;\n\n public void reset(int ret)\n {\n this.ret = ret;\n called = false;\n req = null;\n own = null;\n proxy = null;\n }\n\n /**\n * Returns based on value of <i>ret</i>.\n * <ol>\n * <li>-1 then null\n * <li>0 then [0]\n * <li>1 then [owners.length] with requester at front\n * </ol>\n */\n public ResourceUsage[] resolveResourceContention(ResourceUsage requester, ResourceUsage owners[])\n {\n called = true;\n req = requester;\n own = owners;\n\n if (ret == -1)\n return null;\n else if (ret == 0)\n return new ResourceUsage[0];\n else\n {\n ResourceUsage[] prior = new ResourceUsage[owners.length];\n prior[0] = requester;\n System.arraycopy(owners, 0, prior, 1, owners.length - 1);\n return prior;\n }\n }\n\n public void resourceContentionWarning(ResourceUsage newRequest, ResourceUsage[] currentReservations)\n {\n // does nothing for now\n }\n\n }\n ResourceManager.Client client = new ResourceManager.Client(new DummyClient(), new Proxy(),\n new ResourceUsageImpl(new AppID(1, 4), 1), new Context(new AppID(1, 4)));\n ResourceManager.Client clients[] = {\n new ResourceManager.Client(new DummyClient(), new Proxy(), new ResourceUsageImpl(new AppID(2, 2), 2),\n new Context(new AppID(2, 2))),\n new ResourceManager.Client(new DummyClient(), new Proxy(), new ResourceUsageImpl(new AppID(1, 1), 1),\n new Context(new AppID(1, 1))),\n new ResourceManager.Client(new DummyClient(), new Proxy(), new ResourceUsageImpl(new AppID(4, 4), 4),\n new Context(new AppID(4, 4))),\n new ResourceManager.Client(new DummyClient(), new Proxy(), new ResourceUsageImpl(new AppID(3, 3), 3),\n new Context(new AppID(3, 3))),\n new ResourceManager.Client(new DummyClient(), new Proxy(), new ResourceUsageImpl(new AppID(2, 2), 2),\n new Context(new AppID(2, 2))),\n new ResourceManager.Client(new DummyClient(), new Proxy(), new ResourceUsageImpl(new AppID(4, 5), 4),\n new Context(new AppID(4, 5))),\n new ResourceManager.Client(new DummyClient(), new Proxy(), new ResourceUsageImpl(new AppID(5, 5), 5),\n new Context(new AppID(5, 5))),\n new ResourceManager.Client(new DummyClient(), new Proxy(), new ResourceUsageImpl(new AppID(4, 3), 4),\n new Context(new AppID(4, 3))), };\n ResourceUsage usages[] = new ResourceUsage[clients.length];\n for (int i = 0; i < clients.length; ++i)\n usages[i] = clients[i].resusage;\n\n try\n {\n ResourceManager.Client[] prioritized;\n\n // Call with null handler\n int r = 0;\n prioritized = rezmgr.prioritizeContention(client, clients);\n assertNotNull(\"Should not return null (given no handler)\", prioritized);\n assertEquals(\"Unexpected array size (given no handler)\", clients.length + 1, prioritized.length);\n int last = 256;\n for (int i = 0; i < prioritized.length; ++i)\n System.out.println(((Context) prioritized[i].context).priority + \" \"\n + position(clients, prioritized[i]));\n for (int i = 0; i < prioritized.length; ++i)\n {\n int prior = prioritized[i].getUsagePriority();\n assertTrue(\"Expected sorted by priority (given no handler) [\" + i + \"]\", last >= prior);\n // If same priority as last, verify that ordering is correct\n // Current definition is to go based upon original order in\n // owner list\n if (last == prior)\n {\n assertTrue(\"Expected equal priority to maintin existing order\",\n position(clients, prioritized[i]) > position(clients, prioritized[i - 1]));\n }\n\n last = prior;\n }\n\n // Add Handler\n Handler handler = new Handler();\n rcm.setResourceContentionHandler(handler);\n\n // Expect manager to prioritize\n handler.reset(-1);\n r = 1;\n prioritized = rezmgr.prioritizeContention(client, clients);\n assertTrue(\"Expected handler to be called\", handler.called);\n assertSame(\"Expected given requester to be used\", client.resusage, handler.req);\n assertNotNull(\"Expected owners array to be non-null\", handler.own);\n assertEquals(\"Expected owners length to be same as specified\", clients.length, handler.own.length);\n for (int i = 0; i < clients.length; ++i)\n assertEquals(\"Unexpected owner id passed to handler\", usages[i], handler.own[i]);\n assertNotNull(\"Should not return null (given null)\", prioritized);\n assertEquals(\"Unexpected array size (given null)\", clients.length + 1, prioritized.length);\n last = 256;\n for (int i = 0; i < prioritized.length; ++i)\n {\n int prior = prioritized[i].getUsagePriority();\n assertTrue(\"Expected sorted by priority (given null) [\" + i + \"]\", last >= prior);\n last = prior;\n }\n\n // Expect empty array\n handler.reset(0);\n r = 2;\n prioritized = rezmgr.prioritizeContention(client, clients);\n assertTrue(\"Expected handler to be called\", handler.called);\n assertSame(\"Expected given requester to be used\", client.resusage, handler.req);\n assertNotNull(\"Expected owners array to be non-null\", handler.own);\n assertEquals(\"Expected owners length to be same as specified\", clients.length, handler.own.length);\n for (int i = 0; i < clients.length; ++i)\n assertEquals(\"Unexpected owner id passed to handler\", usages[i], handler.own[i]);\n assertNotNull(\"Should not return null (given 0)\", prioritized);\n assertEquals(\"Unexpected array size (given 0)\", 0, prioritized.length);\n\n // Expect specified array\n handler.reset(1);\n r = 3;\n prioritized = rezmgr.prioritizeContention(client, clients);\n assertTrue(\"Expected handler to be called\", handler.called);\n assertSame(\"Expected given requester to be used\", client.resusage, handler.req);\n assertNotNull(\"Expected owners array to be non-null\", handler.own);\n assertEquals(\"Expected owners length to be same as specified\", clients.length, handler.own.length);\n for (int i = 0; i < clients.length; ++i)\n assertEquals(\"Unexpected owner id passed to handler\", usages[i], handler.own[i]);\n assertNotNull(\"Should not return null\", prioritized);\n assertEquals(\"Unexpected array size\", clients.length, prioritized.length);\n assertEquals(\"Unexpected array entry [0]\", client, prioritized[0]);\n // Actually, just expect to be sorted by AppID\n // When we have same AppID, might be reordered...\n // Let's assign priority numbers to each AppID...\n // And then make sure that clients are sorted accordingly\n // !!! Minor issue here... is if AppID is represented more than once\n // in array returned by handler... which one is used to specify\n // priority?\n // First position or last? Here we assume last.\n // TODO (TomH) Resolve with new resource contention\n /*\n * Hashtable idprior = new Hashtable(); for(int i = 0; i <\n * handler.own.length; ++i) idprior.put(handler.own[i].getAppID(),\n * new Integer(handler.own.length-i)); last = handler.own.length+1;\n * for(int i = 1; i < prioritized.length; ++i) { Integer p =\n * (Integer)idprior.get(((Context)prioritized[i].context).id);\n * assertNotNull(\"AppID wasn't passed to handler to begin with\", p);\n * int prior = p.intValue();\n * assertTrue(\"Expected clients to be in priority order\", last >=\n * prior); last = prior; }\n */\n\n // Replace the handler\n Handler replace = new Handler();\n rcm.setResourceContentionHandler(replace);\n handler.reset(0);\n replace.reset(0);\n prioritized = rezmgr.prioritizeContention(client, clients);\n assertTrue(\"Replacement handler should be called\", replace.called);\n assertFalse(\"Original handler should NOT be called\", handler.called);\n handler = replace;\n\n // Check for empty owners\n handler.reset(-1);\n prioritized = rezmgr.prioritizeContention(client, new ResourceManager.Client[0]);\n assertTrue(\"Expected handler to be called\", handler.called);\n assertTrue(\"Expected empty owners\", handler.own.length == 0);\n assertNotNull(\"Should not return null (no owners)\", prioritized);\n assertEquals(\"Unexpected array size (no owners)\", 1, prioritized.length);\n assertEquals(\"Unexpected entry (no owners)\", client, prioritized[0]);\n\n // Remove the handler\n rcm.setResourceContentionHandler(null);\n handler.reset(0);\n prioritized = rezmgr.prioritizeContention(client, clients);\n assertFalse(\"Handler was removed, should not be called\", handler.called);\n assertNotNull(\"Should not return null (removed)\", prioritized);\n assertEquals(\"Unexpected array size (removed)\", clients.length + 1, prioritized.length);\n last = 256;\n for (int i = 0; i < prioritized.length; ++i)\n {\n int prior = prioritized[i].getUsagePriority();\n assertTrue(\"Expected sorted by priority (removed) [\" + i + \"]\", last >= prior);\n last = prior;\n }\n }\n finally\n {\n // Clear handler\n rcm.setResourceContentionHandler(null);\n }\n\n }", "@Test\n public void shouldReturnOnErrorWithRequestNotPermittedUsingFlowable() {\n RateLimiterConfig rateLimiterConfig = RateLimiterConfig.custom()\n .limitRefreshPeriod(Duration.ofMillis(CYCLE_IN_MILLIS))\n .limitForPeriod(PERMISSIONS_RER_CYCLE)\n .timeoutDuration(TIMEOUT_DURATION)\n .build();\n\n // Create a RateLimiterRegistry with a custom global configuration\n RateLimiter rateLimiter = RateLimiter.of(LIMITER_NAME, rateLimiterConfig);\n\n assertThat(rateLimiter.getPermission(rateLimiter.getRateLimiterConfig().getTimeoutDuration()));\n\n Flowable.fromIterable(makeEleven())\n .lift(RateLimiterOperator.of(rateLimiter))\n .test()\n .assertError(RequestNotPermitted.class)\n .assertNotComplete()\n .assertSubscribed();\n\n assertThat(!rateLimiter.getPermission(rateLimiter.getRateLimiterConfig().getTimeoutDuration()));\n\n RateLimiter.Metrics metrics = rateLimiter.getMetrics();\n\n assertThat(metrics.getAvailablePermissions()).isEqualTo(0);\n assertThat(metrics.getNumberOfWaitingThreads()).isEqualTo(0);\n }", "@Override\n\tpublic double sendbid() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic double sendbid() {\n\t\treturn 0;\n\t}", "@Test\n public void testResponseThrottleTime() {\n Set<ApiKeys> authenticationKeys = EnumSet.of(ApiKeys.SASL_HANDSHAKE, ApiKeys.SASL_AUTHENTICATE);\n // Newer protocol apis include throttle time ms even for cluster actions\n Set<ApiKeys> clusterActionsWithThrottleTimeMs = EnumSet.of(ApiKeys.ALTER_PARTITION, ApiKeys.ALLOCATE_PRODUCER_IDS, ApiKeys.UPDATE_FEATURES);\n for (ApiKeys apiKey: ApiKeys.clientApis()) {\n Schema responseSchema = apiKey.messageType.responseSchemas()[apiKey.latestVersion()];\n BoundField throttleTimeField = responseSchema.get(\"throttle_time_ms\");\n if ((apiKey.clusterAction && !clusterActionsWithThrottleTimeMs.contains(apiKey))\n || authenticationKeys.contains(apiKey))\n assertNull(throttleTimeField, \"Unexpected throttle time field: \" + apiKey);\n else\n assertNotNull(throttleTimeField, \"Throttle time field missing: \" + apiKey);\n }\n }", "Page<HrDocumentRequest> getRejectedDocumentRequests(Pageable pageable);", "public JSONObject getAdvanceForGSTR3BTaxable(JSONObject reqParams) throws JSONException, ServiceException {\n String companyId=reqParams.optString(\"companyid\");\n JSONObject jSONObject = new JSONObject();\n double taxableAmountAdv = 0d;\n double IGSTAmount = 0d;\n double CGSTAmount = 0d;\n double SGSTAmount = 0d;\n double CESSAmount = 0d;\n reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n if (reqParams.optBoolean(\"at\")) {\n /**\n * Get Advance for which invoice not linked yet\n */\n\n reqParams.put(\"at\", true);\n List<Object> receiptList = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n JSONArray bulkData = gSTR1DeskeraServiceDao.createJsonForAdvanceDataFetchedFromDB(receiptList, reqParams);\n Map<String, JSONArray> advanceMap = AccountingManager.getSortedArrayMapBasedOnJSONAttribute(bulkData, GSTRConstants.receiptadvanceid);\n for (String advdetailkey : advanceMap.keySet()) {\n double rate = 0d;\n JSONArray adDetailArr = advanceMap.get(advdetailkey);\n JSONObject advanceobj = adDetailArr.getJSONObject(0);\n taxableAmountAdv += advanceobj.optDouble(GSTRConstants.receiptamount) - advanceobj.optDouble(GSTRConstants.receipttaxamount);\n for (int index = 0; index < adDetailArr.length(); index++) {\n JSONObject invdetailObj = adDetailArr.getJSONObject(index);\n String defaultterm = invdetailObj.optString(GSTRConstants.defaultterm);\n\n /**\n * Iterate applied GST and put its Percentage and Amount\n * accordingly\n */\n double termamount = invdetailObj.optDouble(GSTRConstants.termamount);\n double taxrate = invdetailObj.optDouble(GSTRConstants.taxrate);\n /**\n * calculate tax amount by considering partial case\n */\n termamount = (advanceobj.optDouble(GSTRConstants.receiptamount) - advanceobj.optDouble(GSTRConstants.receipttaxamount)) * invdetailObj.optDouble(GSTRConstants.taxrate) / 100;\n if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n IGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n CGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n CESSAmount += termamount;\n }\n }\n }\n\n// reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n// reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n// List<Object> AdvData = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n// for (Object object : AdvData) {\n// Object[] data = (Object[]) object;\n// String term = data[1].toString();\n// double termamount = (Double) data[0];\n// if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// IGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// CGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n// CESSAmount += termamount;\n// }\n// }\n } else {\n /**\n * Get Advance for which invoice isLinked\n */\n reqParams.put(\"atadj\", true);\n List<Object> receiptList = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n JSONArray bulkData = gSTR1DeskeraServiceDao.createJsonForAdvanceDataFetchedFromDB(receiptList, reqParams);\n Map<String, JSONArray> advanceMap = AccountingManager.getSortedArrayMapBasedOnJSONAttribute(bulkData, GSTRConstants.receiptadvanceid);\n for (String advdetailkey : advanceMap.keySet()) {\n double rate = 0d;\n JSONArray adDetailArr = advanceMap.get(advdetailkey);\n JSONObject advanceobj = adDetailArr.getJSONObject(0);\n taxableAmountAdv += advanceobj.optDouble(GSTRConstants.adjustedamount);\n for (int index = 0; index < adDetailArr.length(); index++) {\n JSONObject invdetailObj = adDetailArr.getJSONObject(index);\n String defaultterm = invdetailObj.optString(GSTRConstants.defaultterm);\n\n /**\n * Iterate applied GST and put its Percentage and Amount\n * accordingly\n */\n double termamount = invdetailObj.optDouble(GSTRConstants.termamount);\n double taxrate = invdetailObj.optDouble(GSTRConstants.taxrate);\n /**\n * calculate tax amount by considering partial case\n */\n termamount = advanceobj.optDouble(GSTRConstants.adjustedamount) * invdetailObj.optDouble(GSTRConstants.taxrate) / 100;\n if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n IGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n CGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n CESSAmount += termamount;\n }\n }\n }\n\n// reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n// reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n// List<Object> AdvDataLinked = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n// for (Object object : AdvDataLinked) {\n// Object[] data = (Object[]) object;\n// String term = data[1].toString();\n// double termamount = (Double) data[0];\n// taxableAmountAdv = (Double) data[2];\n// if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// IGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// CGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n// CESSAmount += termamount;\n// }\n// }\n }\n\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount(taxableAmountAdv,companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount(IGSTAmount,companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount(CGSTAmount,companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount(SGSTAmount,companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount(CESSAmount,companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount(IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount(taxableAmountAdv+IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n return jSONObject;\n }", "@Override\r\n public void onTrackLimitationNotice(int numberOfLimitedStatuses) {\n }", "@Override\r\n public void onTrackLimitationNotice(int numberOfLimitedStatuses) {\n }", "int getRequestsCount();", "int getRequestsCount();", "public abstract boolean isNextBlocked();", "private void cancelFetch() {\n cancelOperation(QUERY_NEW_CALLS_TOKEN);\n cancelOperation(QUERY_OLD_CALLS_TOKEN);\n }", "@Test\n public void furtherRequestsDelay() throws Exception {\n final byte[] response = new byte[16];\n final StreamManager manager = new StreamManager() {\n @Override\n public ManagedBuffer getChunk(long streamId, int chunkIndex) {\n Uninterruptibles.sleepUninterruptibly(FOREVER, TimeUnit.MILLISECONDS);\n return new NioManagedBuffer(ByteBuffer.wrap(response));\n }\n };\n RpcHandler handler = new RpcHandler() {\n @Override\n public void receive(\n TransportClient client,\n ByteBuffer message,\n RpcResponseCallback callback) {\n throw new UnsupportedOperationException();\n }\n\n @Override\n public StreamManager getStreamManager() {\n return manager;\n }\n };\n\n context = new TransportContext(conf, handler);\n server = context.createServer();\n clientFactory = context.createClientFactory();\n TransportClient client = clientFactory.createClient(TestUtils.getLocalHost(), server.getPort());\n\n // Send one request, which will eventually fail.\n TestCallback callback0 = new TestCallback();\n client.fetchChunk(0, 0, callback0);\n Uninterruptibles.sleepUninterruptibly(1200, TimeUnit.MILLISECONDS);\n\n // Send a second request before the first has failed.\n TestCallback callback1 = new TestCallback();\n client.fetchChunk(0, 1, callback1);\n Uninterruptibles.sleepUninterruptibly(1200, TimeUnit.MILLISECONDS);\n\n // not complete yet, but should complete soon\n assertEquals(-1, callback0.successLength);\n assertNull(callback0.failure);\n callback0.latch.await(60, TimeUnit.SECONDS);\n assertTrue(callback0.failure instanceof IOException);\n\n // make sure callback1 is called.\n callback1.latch.await(60, TimeUnit.SECONDS);\n // failed at same time as previous\n assertTrue(callback1.failure instanceof IOException);\n }", "public void processBlockwiseResponseTransferFailed() {\n //to be overridden by extending classes\n }", "public void retryRequired(){\n startFetching(query);\n }", "private static synchronized String getNextRequestId()\n {\n if (++nextRequestId < 0)\n {\n nextRequestId = 0;\n }\n String id = Integer.toString(nextRequestId);\n return id;\n }", "public native void disableRetransmitCountFactorInRTO();", "private void fetchNextBlock() {\n try {\n \tSearchClient _client = new SearchClient(\"cubansea-instance\");\n \tWebSearchResults _results = _client.webSearch(createNextRequest());\n \t\tfor(WebSearchResult _result: _results.listResults()) {\n \t\t\tresults.add(new YahooSearchResult(_result, cacheStatus+1));\n \t\t\tcacheStatus++;\n \t\t}\n \t\tif(resultCount == -1) resultCount = _results.getTotalResultsAvailable().intValue();\n } catch (IOException e) {\n\t\t\tthrow new TechnicalError(e);\n\t\t} catch (SearchException e) {\n\t\t\tthrow new TechnicalError(e);\n\t\t}\n\t}", "private synchronized void incrementPending() {\n\t\tpending++;\n\t}", "@Override\n public void onErrorResponse(VolleyError error) {\n getRandom(); //repeating call here might automatically make it happen B/C success rate of this call is roughly 50/50\n }", "private void getBlockListNetworkCall(final Context context, int offset, int limit) {\n\n HashMap<String, Object> serviceParams = new HashMap<String, Object>();\n HashMap<String, Object> tokenServiceHeaderParams = new HashMap<String, Object>();\n\n tokenServiceHeaderParams.put(Keys.TOKEN, UserSharedPreference.readUserToken());\n serviceParams.put(Keys.LIST_OFFSET, offset);\n serviceParams.put(Keys.LIST_LIMIT, limit);\n\n new WebServicesVolleyTask(context, false, \"\",\n EnumUtils.ServiceName.get_blocked_user,\n EnumUtils.RequestMethod.GET, serviceParams, tokenServiceHeaderParams, new AsyncResponseCallBack() {\n\n @Override\n public void onTaskComplete(TaskItem taskItem) {\n\n if (taskItem != null) {\n\n if (taskItem.isError()) {\n if (getUserVisibleHint())\n showNoResult(true);\n } else {\n try {\n\n if (taskItem.getResponse() != null) {\n\n JSONObject jsonObject = new JSONObject(taskItem.getResponse());\n\n // todo parse actual model\n JSONArray favoritesJsonArray = jsonObject.getJSONArray(\"users\");\n\n Gson gson = new Gson();\n Type listType = new TypeToken<List<BlockUserBO>>() {\n }.getType();\n List<BlockUserBO> newStreams = (List<BlockUserBO>) gson.fromJson(favoritesJsonArray.toString(),\n listType);\n\n totalRecords = jsonObject.getInt(\"total_records\");\n if (totalRecords == 0) {\n showNoResult(true);\n } else {\n if (blockListAdapter != null) {\n if (startIndex != 0) {\n //for the case of load more...\n blockListAdapter.removeLoadingItem();\n } else {\n //for the case of pulltoRefresh...\n blockListAdapter.clearItems();\n }\n }\n\n showNoResult(false);\n setUpBlockListRecycler(newStreams);\n }\n }\n } catch (Exception ex) {\n showNoResult(true);\n ex.printStackTrace();\n }\n }\n }\n }\n });\n }", "public synchronized void tryExecuteRequests(){\n Object lpid = getLocalProcessID();\n\n JDSUtility.debug(\"[PBFTSever:handle(token)] s\" + lpid + \", at time \" + getClockValue() + \", is going to execute requests.\");\n\n //if(isValid(proctoken)){\n long startSEQ = getStateLog().getNextExecuteSEQ();\n long finalSEQ = getHCWM();//proctoken.getSequenceNumber();\n long lcwm = getLCWM();\n\n PBFTRequestInfo rinfo = getRequestInfo();\n\n int viewn = getCurrentViewNumber();\n\n int f = getServiceBFTResilience();\n\n for(long currSEQ = startSEQ; currSEQ <= finalSEQ && currSEQ > lcwm; currSEQ ++){\n\n if(!(getPrepareInfo().count(viewn, currSEQ) >= (2* f) && getCommitInfo().count(viewn, currSEQ) >= (2 * f +1))){\n return;\n }\n\n if(rinfo.hasSomeRequestMissed(currSEQ)){\n JDSUtility.debug(\"[tryExecuteRequests()] s\" + lpid+ \", at time \" + getClockValue() + \", couldn't executed \" + currSEQ + \" because it has a missed request.\");\n return;\n }\n\n if(rinfo.wasServed(currSEQ)){\n continue;\n }\n\n executeSequencedComand(currSEQ);\n//\n// PBFTPrePrepare preprepare = getPrePrepareInfo().get(viewn, currSEQ);\n//\n// for(String digest : preprepare.getDigests()){\n// StatedPBFTRequestMessage loggedRequest = rinfo.getStatedRequest(digest);\n// PBFTRequest request = loggedRequest.getRequest();//rinfo.getRequest(digest); //statedReq.getRequest();\n//\n// IPayload result = lServer.executeCommand(request.getPayload());\n//\n// PBFTReply reply = createReplyMessage(request, result);\n// loggedRequest.setState(RequestState.SERVED);\n// loggedRequest.setReply(reply);\n//\n// JDSUtility.debug(\n// \"[tryExecuteRequests()] s\" + lpid + \", at time \" + getClockValue() + \", executed \" + request + \" (CURR-VIEWN{ \" + viewn + \"}; SEQN{\" + currSEQ + \"}).\"\n// );\n//\n// JDSUtility.debug(\"[tryExecuteRequests()] s\" + lpid + \", at time \" + getClockValue() + \", has the following state \" + lServer.getCurrentState());\n//\n// loggedRequest.setReplySendTime(getClockValue());\n//\n// if(rinfo.isNewest(request)){\n// IProcess client = new BaseProcess(reply.getClientID());\n// emit(reply, client);\n// }\n//\n// }//end for each leafPartDigest (tryExecuteRequests and reply)\n \n IRecoverableServer lServer = (IRecoverableServer)getServer();\n JDSUtility.debug(\n \"[tryExecuteRequests()] s\" + lpid + \", at time \" + getClockValue() + \", after execute SEQN{\" + currSEQ + \"} has the following \" +\n \"state \" + lServer.getCurrentState()\n );\n\n getStateLog().updateNextExecuteSEQ(currSEQ);\n\n long execSEQ = getStateLog().getNextExecuteSEQ() -1;\n long chkPeriod = getCheckpointPeriod();\n\n\n if(execSEQ > 0 && (((execSEQ+1) % chkPeriod) == 0)){\n PBFTCheckpoint checkpoint;\n try {\n checkpoint = createCheckpointMessage(execSEQ);\n getDecision(checkpoint);\n rStateManager.addLogEntry(\n new CheckpointLogEntry(\n checkpoint.getSequenceNumber(),\n rStateManager.byteArray(),\n checkpoint.getDigest()\n )\n );\n\n\n emit(checkpoint, getLocalGroup().minus(getLocalProcess()));\n handle(checkpoint);\n } catch (Exception ex) {\n Logger.getLogger(PBFTServer.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n\n if(rinfo.hasSomeWaiting()){\n if(isPrimary()){\n batch();\n }else{\n scheduleViewChange();\n }\n }\n }\n }", "private void incWaiters()\r\n/* 443: */ {\r\n/* 444:530 */ if (this.waiters == 32767) {\r\n/* 445:531 */ throw new IllegalStateException(\"too many waiters: \" + this);\r\n/* 446: */ }\r\n/* 447:533 */ this.waiters = ((short)(this.waiters + 1));\r\n/* 448: */ }", "@Then(\"Like counter increases by one\")\n\tpublic void like_counter_increases_by_one() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "@Override\n public abstract long getResponseCount();", "public Long get_cachetotparameterizedinvalidationrequests() throws Exception {\n\t\treturn this.cachetotparameterizedinvalidationrequests;\n\t}", "public interface RequestResponse {\n /**\n * Checks if the request was successful and returned no error.\n * @return true if the request was successful\n */\n boolean isSuccessful();\n\n /**\n * Gets HTTP status code received by the server as a reaction to the request.\n * @return response status code\n */\n int getStatusCode();\n\n /**\n * Gets HTTP status message received by the server as a reaction to the request.\n * @return response status message\n */\n String getStatusMessage();\n\n /**\n * <p>Checks, if the request failed because of rate limitation.</p>\n * <p>If this happens, you probably used too many similar requests (like add reaction) one after another.\n * If this happens because of spamming requests, try waiting after each one with {@link Future#get()}.\n * If this happens randomly, it can be caused by different modules doing same actions. Try again.</p>\n * <p><b>Warning:</b> if you exceed the limits too often, you risk getting banned.</p>\n * @return true if the request failed due to rate limit\n */\n boolean isRateLimited();\n}", "public void loadNextDataFromApi(int offset) {\n client.getMoreMentionsTimeline(maxId, new JsonHttpResponseHandler(){\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n\n for (int i = 0; i < response.length(); i++){\n //get json object in the position index\n //create a tweet object with json object\n //add the tweet object to the arraylist of tweets\n //notify changes to adapter\n Tweet tweet = null;\n try {\n tweet = Tweet.fromJson(response.getJSONObject(i));\n tweets.add(tweet);\n adapter.notifyItemInserted(tweets.size() - 1);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if (tweet.uid < maxId){\n maxId = tweet.uid;\n Log.d(\"MaxId\", String.valueOf(maxId));\n }\n\n }\n }\n });\n\n }", "public void markRequestRetryMerge() throws JNCException {\n markLeafMerge(\"requestRetry\");\n }", "@Override\n public abstract long getRequestCount();", "private static HttpResponse handleExceptionalStatus(\n HttpResponse response,\n UUID requestId,\n ApiName apiName,\n CloseableHttpClient httpClient,\n HttpUriRequest request,\n RequestBuilder requestBuilder)\n throws IOException, IngestResponseException, BackOffException {\n if (!isStatusOK(response.getStatusLine())) {\n StatusLine statusLine = response.getStatusLine();\n LOGGER.warn(\n \"{} Status hit from {}, requestId:{}\",\n statusLine.getStatusCode(),\n apiName,\n requestId == null ? \"\" : requestId.toString());\n\n // if we have a 503 exception throw a backoff\n switch (statusLine.getStatusCode()) {\n // If we have a 503, BACKOFF\n case HttpStatus.SC_SERVICE_UNAVAILABLE:\n throw new BackOffException();\n case HttpStatus.SC_UNAUTHORIZED:\n LOGGER.warn(\"Authorization failed, refreshing Token succeeded, retry\");\n requestBuilder.refreshToken();\n requestBuilder.addToken(request);\n response = httpClient.execute(request);\n if (!isStatusOK(response.getStatusLine())) {\n throw new SecurityException(\"Authorization failed after retry\");\n }\n break;\n default:\n String blob = consumeAndReturnResponseEntityAsString(response.getEntity());\n throw new IngestResponseException(\n statusLine.getStatusCode(),\n IngestResponseException.IngestExceptionBody.parseBody(blob));\n }\n }\n return response;\n }", "@NotNull\n/* */ public NextAction processRequest(@NotNull Packet request) {\n/* 66 */ T param = this.argsBuilder.getParameter(request);\n/* 67 */ NoSuspendResumer resumer = new NoSuspendResumer();\n/* */ \n/* 69 */ AsyncProviderCallbackImpl callback = new AsyncProviderCallbackImpl(request, resumer);\n/* 70 */ AsyncWebServiceContext ctxt = new AsyncWebServiceContext(getEndpoint(), request);\n/* */ \n/* 72 */ LOGGER.fine(\"Invoking AsyncProvider Endpoint\");\n/* */ try {\n/* 74 */ getInvoker(request).invokeAsyncProvider(request, param, callback, (WebServiceContext)ctxt);\n/* 75 */ } catch (Throwable e) {\n/* 76 */ LOGGER.log(Level.SEVERE, e.getMessage(), e);\n/* 77 */ return doThrow(e);\n/* */ } \n/* */ \n/* 80 */ synchronized (callback) {\n/* 81 */ if (resumer.response != null) {\n/* */ \n/* */ \n/* 84 */ ThrowableContainerPropertySet tc = (ThrowableContainerPropertySet)resumer.response.getSatellite(ThrowableContainerPropertySet.class);\n/* 85 */ Throwable t = (tc != null) ? tc.getThrowable() : null;\n/* */ \n/* 87 */ return (t != null) ? doThrow(resumer.response, t) : doReturnWith(resumer.response);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 92 */ callback.resumer = new FiberResumer();\n/* 93 */ return doSuspend();\n/* */ } \n/* */ }", "public void incrementNumCompareRequests() {\n this.numCompareRequests.incrementAndGet();\n }", "public List getPendingRequests(PendingRequest pendingRequest);", "private synchronized void addNext(final RequestResponseMsg reqRespMsg) {\n\t\tshowTotalSend(); \n\n\t\tif (this.isAlreadyClosed()) {\n\t\t\tmakeNewOsgpServiceClient(reqRespMsg);\n\t\t} else {\n\t\t\tif (reqRespMsg == null) {\n\t\t\t\tcloseStream();\n\t\t\t} else {\n\t\t\t\tthis.msgCount++;\n\t\t\t\taddNextRequest(reqRespMsg);\n\t\t\t\tif (this.msgCount >= MAX_MSG_COUNT) {\n\t\t\t\t\tcloseStream();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void requestId(long requestId);", "void requestId(long requestId);", "@Test\n public void testHandleRequestForGraphQLSubscriptions() {\n\n ThrottleHandler throttleHandler = new ThrottlingHandlerWrapper(timer, new ThrottleDataHolder(),\n throttleEvaluator, accessInformation);\n Axis2MessageContext messageContext = Mockito.mock(Axis2MessageContext.class);\n org.apache.axis2.context.MessageContext axis2MessageContext =\n Mockito.mock(org.apache.axis2.context.MessageContext.class);\n Mockito.when(messageContext.\n getAxis2MessageContext()).thenReturn(axis2MessageContext);\n Mockito.when(axis2MessageContext.getIncomingTransportName()).thenReturn(\"ws\");\n Mockito.when(messageContext.getProperty(APIConstants.GRAPHQL_SUBSCRIPTION_REQUEST)).thenReturn(true);\n Assert.assertTrue(throttleHandler.handleRequest(messageContext));\n\n Mockito.when(axis2MessageContext.getIncomingTransportName()).thenReturn(\"wss\");\n Assert.assertTrue(throttleHandler.handleRequest(messageContext));\n\n // clean up message context\n Mockito.when(messageContext.getProperty(APIConstants.GRAPHQL_SUBSCRIPTION_REQUEST)).thenReturn(false);\n Mockito.when(axis2MessageContext.getIncomingTransportName()).thenReturn(\"http\");\n }", "public int getThrottledOpWaitTime() {\n return ZooKeeperServer.getThrottledOpWaitTime();\n }" ]
[ "0.5786817", "0.5766637", "0.5644317", "0.5564209", "0.5499861", "0.5494812", "0.5444402", "0.52574944", "0.5183944", "0.5147976", "0.5123521", "0.5113365", "0.5106784", "0.50849164", "0.50552374", "0.50305283", "0.5028631", "0.50224185", "0.5012869", "0.49752995", "0.49656853", "0.49085507", "0.4906604", "0.49009287", "0.48873836", "0.4880711", "0.487787", "0.48451704", "0.4826144", "0.4824848", "0.48243222", "0.4802551", "0.47934902", "0.47798344", "0.47722524", "0.4755637", "0.47512326", "0.47476164", "0.47425652", "0.47338957", "0.47219497", "0.47106677", "0.47072527", "0.46971527", "0.4694199", "0.46925744", "0.46914145", "0.46774378", "0.46624985", "0.46599168", "0.46412456", "0.46386963", "0.4631521", "0.4609271", "0.46062198", "0.4605461", "0.46021444", "0.46019077", "0.45997444", "0.45992655", "0.45988154", "0.4598371", "0.4597532", "0.4580169", "0.4580169", "0.45692688", "0.45635235", "0.45624688", "0.4558826", "0.4558826", "0.45472524", "0.45472524", "0.45463508", "0.4536891", "0.4533383", "0.45296127", "0.45294294", "0.4525693", "0.45226607", "0.45204163", "0.45199016", "0.4518564", "0.45147744", "0.45139083", "0.45134762", "0.45117515", "0.45024443", "0.45023346", "0.45016366", "0.44982725", "0.4497591", "0.44969603", "0.44961026", "0.4495829", "0.44940314", "0.44912884", "0.44885862", "0.4484172", "0.4484172", "0.44789347", "0.44724673" ]
0.0
-1
If we have some reason to think the currentIndex is bad, we want to move to the next host. This is done with a compareAndSet to ensure that out of order responses which signal information about a previous host don't kick us off a good one.
private OptionalInt incrementHostIfNecessary(int pin) { int nextIndex = (pin + 1) % nodeList.size(); boolean saved = currentPin.compareAndSet(pin, nextIndex); return saved ? OptionalInt.of(nextIndex) : OptionalInt.empty(); // we've moved on already }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected final void moveToNextIndex() {\n\t\t\t// doing the assignment && < 0 in one line shaves\n\t\t\t// 3 opcodes...\n\t\t\tif ( (_index = nextIndex()) < 0 ) { throw new NoSuchElementException(); }\n\t\t}", "private void advance() {\n assert currentItemState == ItemProcessingState.COMPLETED || currentIndex == -1\n : \"moving to next but current item wasn't completed (state: \" + currentItemState + \")\";\n currentItemState = ItemProcessingState.INITIAL;\n currentIndex = findNextNonAborted(currentIndex + 1);\n retryCounter = 0;\n requestToExecute = null;\n executionResult = null;\n assert assertInvariants(ItemProcessingState.INITIAL);\n }", "void moveNext()\n\t{\n\t\tif (cursor != null) \n\t\t{\n\t\t\tif (cursor == back) \n\t\t\t{\n\t\t\t\tcursor = null;\n index = -1; //added cause i was failing the test scripts and forgot to manage the indices \n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcursor = cursor.next; //moves cursor toward back of the list\n index++; //added cause i was failing to the test scripts and forgot to manage the indicies\n\t\t\t}\n\t\t}\n\t}", "public void checkHostGraphAndNextStep() {\r\n\t\tif (this.hostGraph != null) {\r\n\t\t\tthis.stepPanel.setStep(StepPanel.STEP_STOP_GRAPH);\r\n\t\t\tthis.gragraNames.setSelectedIndex(-1);\r\n\t\t}\r\n\t}", "private void changeCurIndex() {\n\t\tint TexID=-1;\r\n\t\tif(ApplicationInfo.Destination == Constants.TO_FRONT)\r\n\t\t{\r\n\t\t\tCurIndex=++CurIndex >= mApplications.size()? 0 : CurIndex;\r\n\t\t\tif((TexID=mApplications.get(getPreIndex()).getReady()) != -1)\r\n\t\t\t\tunSetTexID(TexID);\r\n \t\t\tmApplications.get(getPreIndex()).setReady(-1);\r\n\t\t}\r\n\t\telse if(ApplicationInfo.Destination == Constants.TO_BACK)\r\n\t\t{\r\n\t\t\tCurIndex=--CurIndex < 0? mApplications.size()-1 : CurIndex;\r\n\t\t\tif((TexID=mApplications.get(getNextIndex()).getReady()) != -1)\r\n\t\t\t\tunSetTexID(TexID);\r\n\t\t\tmApplications.get(getNextIndex()).setReady(-1);\r\n\t\t}\r\n\t\tLog.d(TAG, \"changeCurIndex :\"+CurIndex);\r\n\t}", "public void setIndexNextBoard(int index) throws IllegalArgumentException;", "public void incrementCurrentIndex() {\n currentIndex++;\n }", "private int getNextSectionIndex(int currentIndex) {\n boolean found = false;\n int index = -1;\n\n SubModule subModule = sections.get(currentIndex);\n\n for (int i = 0; i < leftPaneList.size(); i++) {\n if (leftPaneList.get(i) instanceof SubModule) {\n if (found) {\n index = ((SubModule) leftPaneList.get(i)).getIndex();\n break;\n }\n if (subModule.equals(leftPaneList.get(i))) {\n found = true;\n\n }\n\n }\n }\n Log.d(\"SectionsListFragment\", \"method: getNextSectionIndex called, index found = \" + index);\n return index;\n\n\n // find next in left pane list and get index\n\n\n }", "private void prepareNext() {\n this.hasNext = false;\n while (!this.hasNext && this.nodesIterator.hasNext()) {\n this.next = this.nodesIterator.next();\n this.hasNext = this.computeHasNext();\n }\n }", "public void setNext()\n {\n\t int currentIndex = AL.indexOf(currentObject);\n\t currentObject = AL.get(currentIndex +1);\n\t \n\t// never let currentNode be null, wrap to head\n\tif (currentObject == null)\n\t\tcurrentObject = firstObject;\n }", "private MovingEntity nextTarget(MovingEntity currTarget, ArrayList<MovingEntity> availableTargets, ArrayList <MovingEntity> battlers){\n int currIndex = availableTargets.indexOf(currTarget);\n\n if (currTarget.getCurrHP() > 0) {\n return currTarget;\n }\n\n // currTarget is now dead, remove from availableTargets and battlers\n availableTargets.remove(currTarget);\n battlers.remove(currTarget);\n \n if(currIndex < availableTargets.size()){\n System.out.println(currTarget.getID() + \" is dead, moving on to next target is \" + availableTargets.get(currIndex).getID());\n return availableTargets.get(currIndex);\n } else {\n return null;\n }\n }", "public boolean MoveNext()\r\n { \r\n _index++;\r\n\r\n return _index < Count;\r\n }", "@Override\n public void advance() {\n if (isCurrent()) {\n prev = cursor;\n cursor = cursor.getNext();\n } else {\n throw new IllegalStateException(\"There is no current element.\");\n }\n }", "public void next() {\n Solver<ArrayList<Integer>> mySolver =\n new Solver<ArrayList<Integer>>();\n ArrayList<ArrayList<Integer>> Solution =\n mySolver.SolveBFS(this);\n\n //Reset 'tried' to none\n tried = new HashSet<ArrayList<Integer>>();\n\n //Set up the nextState\n ArrayList<Integer> nextState = new ArrayList<Integer>();\n\n if(Solution.size() == 0) {\n //No Solution\n } else if (Solution.size() == 1) {\n nextState = Solution.get(0);\n curBoard = nextState;\n } else {\n nextState = Solution.get(1);\n curBoard = nextState;\n moveCount++;\n }\n clearStack();\n\n\tsetChanged();\n\tnotifyObservers();\n }", "private void incrementZIndexForNext(Container current) {\n\n Container next = current.getNext();\n\n if (next != null) {\n\n final WidgetEntity widgetOfGreater = next.getWidget();\n if (widgetOfGreater.getZIndex().equals(current.getWidget().getZIndex())) {\n widgetOfGreater.incZ();\n }\n incrementZIndexForNext(next);\n }\n }", "public void advance( )\r\n {\r\n\t if(isCurrent() != true){// Implemented by student.\r\n\t throw new IllegalStateException(\"no current element\");\r\n\t }\r\n\t else\r\n\t \t precursor = cursor;\r\n\t \t cursor = cursor.getLink(); // Implemented by student.\r\n }", "private void setNextSuccessor() {\n if (lastBlock != null) // if it is the first block, do nothing\n lastBlock.addSuccessor(currentBlock);\n blocks.add(currentBlock); // Add currentBlock to the global list of blocks\n lastBlock = currentBlock;\n }", "@Override\n public int nextIndex()\n {\n return idx+1; \n }", "public void next(){\n\t\tboundIndex = (boundIndex+1)%buttonBounds.length;\n\t\tupdateButtonBounds();\n\t}", "@Override\n\tpublic boolean canMoveToNext() {\n\t\treturn true;\n\t}", "public void showNextAd() {\n if (reInitializeCampaign) clearExternalAds();\n int extViewIndicator = getChildCount() - (1 + numInternalChildren);\n AppyAdService.getInstance().debugOut(TAG,\"External view indicator is \"+extViewIndicator+\". Indexes: current=\"+curAd+\", next=\"+nextAd+\", base=\"+baseAd);\n if ((extViewIndicator < nextAd) && (nextAd > (numInternalChildren-1))) {\n addAdView(tozAdCampaign.get(nextAd));\n }\n if (reInitializeCampaign && (nextAd == 0) && (numInternalChildren > 0) && (getDisplayedChild() == 0)) {\n AppyAdService.getInstance().debugOut(TAG,\"Leaving root internal ad (index=0) displayed (first pass with new ad campaign)\");\n }\n else {\n AppyAdService.getInstance().debugOut(TAG,\"Current ad bumped to next index\");\n if (nextAd != getDisplayedChild()) {\n setInAnimation(AppyAdService.getInstance().setAnimation(\"in\", tozAdCampaign.get(nextAd)));\n setOutAnimation(AppyAdService.getInstance().setAnimation(\"out\", tozAdCampaign.get(curAd)));\n setDisplayedChild(nextAd);\n }\n curAd = nextAd;\n }\n if (reInitializeCampaign) initializeCounters();\n }", "protected void next(long currentFrame) {\n\t\tDirection dir = scan();\n\t\t\t\t\n\t\t// Check moving\n\t\tif (dir != Direction.None) {\n\t\t\t\n\t\t\t_myState.direction = dir;\n\t\t\t\n\t\t\t// Add the key frame\n\t\t\tsetKeyFrame(currentFrame);\n\t\t\t\n\t\t\t// Check for a grunt\n\t\t\tArrayList<Grunt> list = _level.getCellManager().getGruntsAt(_myState.target);\n\t\t\tfor (Grunt grunt: list) {\n\t\t\t\t// Check the grunt has already entered the tile\n\t\t\t\tif (grunt.getTile().equals(_myState.target)) {\n\t\t\t\t\t\n\t\t\t\t\t// Check if the grunt is still nearby\n\t\t\t\t\tif (grunt.getSpeed() == 0 || grunt.getKeyFrame() > currentFrame - 20) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Kill the grunt\n\t\t\t\t\t\tgrunt.getBehaviour().webify();\n\t\t\t\t\t\t\n\t\t\t\t\t\tspin(currentFrame);\t\t\t\t\t\t\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t// Check enterable\n\t\t\tif (_policy.getEnterableAt(_myState.target)) {\n\t\t\t\twalk(currentFrame);\n\t\t\t\treturn;\n\t\t\t\t\n\t\t\t} else if (_level.getMap().getTileTraits(_myState.target).contains(\"hole\")) {\n\t\t\t\t\n\t\t\t\t// Start spinning a web\n\t\t\t\tspin(currentFrame);\n\t\t\t\treturn;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Stop the spider\n\t\tif (_myState.motion != SpiderMotion.Stopped) {\n\n\t\t\t// Stop moving\n\t\t\t_myState.moving = false;\n\t\t\t\n\t\t\t_myState.motion = SpiderMotion.Stopped;\n\t\t\t// Change the animation\n\t\t\t_animation = ResourceLoader.getAnimationForPath(\"spiderz/Idle\" + _myState.direction.toString());\n\t\t}\n\t\t\n\t\t// Stall for one turn\n\t\tsetStaticKeyFrame(currentFrame, 1);\n\t\t\n\t}", "public void skipToNext() {\n try {\n mSessionBinder.next(mContext.getPackageName(), mCbStub);\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling next.\", e);\n }\n }", "protected int handleNext(int position) {\n/* 283 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private void setNext(WeakOrderQueue next)\r\n/* 242: */ {\r\n/* 243:268 */ assert (next != this);\r\n/* 244:269 */ this.next = next;\r\n/* 245: */ }", "public void goToNext() {\r\n\t\tif (curr == null)\r\n\t\t\treturn;\r\n\t\tprev = curr;\r\n\t\tcurr = curr.link;\r\n\t}", "protected void setCurrentElement(TestElement currentElement) throws NextIsNullException {\n }", "public void gotoNext(){\r\n if(curr == null){\r\n return;\r\n }\r\n prev = curr;\r\n curr = curr.link;\r\n }", "private void setReadyNext() {\n\t\tint nextIndex=getNextIndex();\r\n\t\tLog.d(TAG, \"setReadyNext: \"+nextIndex);\r\n\t\tmApplications.get(nextIndex).resetToBackPlace();\r\n\t\tif(mApplications.get(nextIndex).getReady() == -1)\r\n\t\t\tsetTexId(nextIndex);\r\n\t}", "public void movePointerForward() throws EndTaskException {\n\t\tpickBeeper();\n\t\tmove();\n\t\tputBeeper();\n\t}", "@Override\n public void run() {\n if (getCurrentItem() + 1 == adapter.getCount()) {\n adapter.markAsFinished();\n }\n\n // Transition to next question\n setCurrentItem(getCurrentItem() + 1);\n\n pendingTransition = false;\n }", "private void next() {\n if (position < tracks.size()) {\n Player.getInstance().stop();\n\n // Set a new position:\n ++position;\n\n ibSkipPreviousTrack.setImageDrawable(getResources()\n .getDrawable(R.drawable.ic_skip_previous_track_on));\n\n try {\n Player.getInstance().play(tracks.get(position));\n } catch (IOException playerException) {\n playerException.printStackTrace();\n }\n\n setImageDrawable(ibPlayOrPauseTrack, R.drawable.ic_pause_track);\n setCover(Player.getInstance().getCover(tracks.get(position), this));\n\n tvTrack.setText(tracks.get(position).getName());\n tvTrackEndTime.setText(playerUtils.toMinutes(Player.getInstance().getTrackEndTime()));\n }\n\n if (position == tracks.size() - 1) {\n ibSkipNextTrack.setImageDrawable(getResources()\n .getDrawable(R.drawable.ic_skip_next_track_off));\n }\n }", "private void prevAddress(){\n\t\tif (this.addressIndex <= 0){\n\t\t\t this.addressIndex = this.addresses.length -1; \n\t\t\t}\n\t\t\telse{\n\t\t\t\tthis.addressIndex--;\n\t\t\t}\n\t\tthis.displayServer = this.addresses[addressIndex];\n\t\t\n\t}", "public boolean prepareNextAd() {\n boolean retVal = false;\n\n if (tozAdCampaign.size() <= 1) return (retVal);\n\n AppyAdService.getInstance().debugOut(TAG,\"Preparing next Ad... indexes: current=\"+curAd+\", next=\"+nextAd+\", base=\"+baseAd+\", last=\"+lastAd+\", repeatCycle=\"+repeatCycle);\n\n if ((repeatCycle != null) && (repeatCycle < 0)) return (false);\n\n if (curAd < lastAd) {\n nextAd = curAd + 1;\n retVal = true;\n AppyAdService.getInstance().debugOut(TAG,\"Prepared next Ad... next=\"+nextAd);\n }\n else if ((curAd == lastAd) && (curAd != baseViewIndex)) {\n nextAd = baseViewIndex;\n retVal = true;\n AppyAdService.getInstance().debugOut(TAG,\"Prepped next Ad... next=\"+nextAd+\" (Set to base view index, pending repeat cycle check.)\");\n if (repeatCycle != null) {\n repeatCycle--;\n if (repeatCycle < 0) {\n if (finalViewIndex != null) {\n if (finalViewIndex > lastAd) finalViewIndex = lastAd;\n if (finalViewIndex < 0) finalViewIndex = 0;\n nextAd = finalViewIndex;\n AppyAdService.getInstance().debugOut(TAG,\"Prepared next Ad... next=\"+nextAd+\" (Set to final view index)\");\n }\n }\n }\n }\n\n return (retVal);\n }", "@Test\n public void testSkip() throws Exception {\n List<MediaSessionCompat.QueueItem> queue = QueueHelper.getPlayingQueueFromSearch(\n \" \", null, provider);\n assertTrue(queue.size() > 3);\n\n QueueManager queueManager = createQueueManagerWithValidation(null, -1, queue);\n queueManager.setCurrentQueue(\"Queue 1\", queue);\n\n // start on index 3\n long expectedQueueId = queue.get(3).getQueueId();\n assertTrue(queueManager.setCurrentQueueItem(expectedQueueId));\n assertEquals(expectedQueueId, queueManager.getCurrentMusic().getQueueId());\n\n // skip to previous (expected: index 2)\n expectedQueueId = queue.get(2).getQueueId();\n assertTrue(queueManager.skipQueuePosition(-1));\n assertEquals(expectedQueueId, queueManager.getCurrentMusic().getQueueId());\n\n // skip twice to previous (expected: index 0)\n expectedQueueId = queue.get(0).getQueueId();\n assertTrue(queueManager.skipQueuePosition(-2));\n assertEquals(expectedQueueId, queueManager.getCurrentMusic().getQueueId());\n\n // skip to previous (expected: index 0, by definition)\n expectedQueueId = queue.get(0).getQueueId();\n assertTrue(queueManager.skipQueuePosition(-1));\n assertEquals(expectedQueueId, queueManager.getCurrentMusic().getQueueId());\n\n // skip to 2 past the last index (expected: index 1, because\n // newindex = (index + skip) % size, by definition)\n expectedQueueId = queue.get(1).getQueueId();\n assertTrue(queueManager.skipQueuePosition(queue.size() + 1));\n assertEquals(expectedQueueId, queueManager.getCurrentMusic().getQueueId());\n }", "@Test\n public void testSetInvalidQueueItem() throws Exception {\n List<MediaSessionCompat.QueueItem> queue = QueueHelper.getPlayingQueueFromSearch(\n \" \", null, provider);\n\n int expectedItemIndex = queue.size() - 1;\n\n // Latch for 1 test, because queueItem setters will fail and not trigger the validation\n // listener\n CountDownLatch latch = new CountDownLatch(1);\n QueueManager queueManager = createQueueManagerWithValidation(latch, expectedItemIndex,\n queue);\n\n // test 1: set the current queue\n queueManager.setCurrentQueue(\"Queue 1\", queue);\n\n // test 2: set queue index to an invalid queueId (we assume MAX_VALUE is invalid, because\n // queueIds are, in uAmp, defined as the item's index, and no queue is big enough to have\n // a MAX_VALUE index)\n assertFalse(queueManager.setCurrentQueueItem(Integer.MAX_VALUE));\n\n // test 3: set queue index to an invalid negative queueId\n assertFalse(queueManager.setCurrentQueueItem(-1));\n\n // test 3: set queue index to the expectedItem using its mediaId\n assertFalse(queueManager.setCurrentQueueItem(\"INVALID_MEDIA_ID\"));\n\n latch.await(5, TimeUnit.SECONDS);\n }", "public void moveForwardOneBlock() {\n\t\tBlockInterface nextBlock = this.currentBlock.goesto(previousBlock);\n\t\tthis.previousBlock = this.currentBlock;\n\t\tthis.currentBlock = nextBlock;\n\t\tif(nextBlock instanceof BlockStation){\n\t\t\tString nbname = ((BlockStation)nextBlock).getStationName();\n\t\t\tif(schedule.containsKey(nbname)){\n\t\t\t\tschedule.remove(nbname);\n\t\t\t\t((SchedulePane)c.schedulepane).reloadSchedual();\n\t\t\t}\n\t\t}\n\t}", "public boolean executeNext(){\n if(this.queue_set == false)\n {\n this.loadQueue();\n this.resetComputation();\n }\n Integer limit = this.queue.size();\n Integer act_ID = this.queue.getFirst();\n this.queue.removeFirst();\n while(this.getBlockByID(act_ID).isPrepared() == false){// block is not prepared -> move him to the end of queue ant take next one\n limit--;\n if(limit == 0)\n {\n System.out.println(\"Error - any prepared block!\");\n this.queue.addLast(act_ID);\n this.msgAnyPrepared();\n return false;\n }\n this.queue.addLast(act_ID);\n act_ID = this.queue.getFirst();\n this.queue.removeFirst();\n }\n System.out.println(\"Executing block (\" + act_ID + \")\");\n this.getBlockByID(act_ID).execute();\n if(this.queue.isEmpty())\n {\n System.out.println(\"All blocks were computed!\");\n this.msgAllExecuted();\n this.queue_set = false;\n return false;\n }\n return true;\n }", "public void previousSolution() {\r\n\t\tif (solutionIndex > 0) {\r\n\t\t\tsolutionIndex--;\r\n\t\t\tcreateObjectDiagram(solutions.get(solutionIndex));\r\n\t\t} else {\r\n\t\t\tLOG.info(LogMessages.pagingFirst);\r\n\t\t}\r\n\t}", "protected final int nextIndex() {\n\t\t\tif ( _expectedSize != TOrderedHashMap.this.size() ) { throw new ConcurrentModificationException(); }\n\n\t\t\tObject[] set = TOrderedHashMap.this._set;\n\t\t\tint i = _index + 1;\n\t\t\twhile (i <= _lastInsertOrderIndex &&\n\t\t\t\t(_indicesByInsertOrder[i] == EMPTY || set[_indicesByInsertOrder[i]] == TObjectHash.FREE || set[_indicesByInsertOrder[i]] == TObjectHash.REMOVED)) {\n\t\t\t\ti++;\n\t\t\t}\n\t\t\treturn i <= _lastInsertOrderIndex ? i : -1;\n\t\t}", "public void updateFrontUnknown() {\n\t\tfrontUnknown = new ArrayList<int[]>();\n\t\tfor (int i = 0; i < unknown.size(); i++) {\n\t\t\tint[] pair = unknown.get(i).clone();\n\t\t\tif (findAdjacentSafe(pair).size() != 0) {\n\t\t\t\tfrontUnknown.add(pair);\n\t\t\t}\n\t\t}\n\t}", "public void goToPointer() throws EndTaskException {\n\t\twhile (notNextToABeeper()) {\n\t\t\tmove();\n\t\t}\n\t}", "public boolean advanceStep() {\n\t\t// TODO: Implement\n\t\t/*System.out.println(\"Before:\");\n\t\tfor(int i=0; i < getSlotCount(); i++)\n\t\t{\n\t\t\tif(inFlightBeans.get(i)==null)\n\t\t\t\tSystem.out.println(i+\"=null\");\n\t\t\telse\n\t\t\t\tSystem.out.println(i+\" not null:\" + inFlightBeans.get(i).getXPos());\n\t\t}*/\n\t\t\n\t\tboolean anyStatusChange=false;\n\t\tBean prev=null; \n\t\tBean bean=inFlightBeans.get(0);\n\t\t\n\t\tfor(int i=0; i < getSlotCount(); i++)\n\t\t{\n\t\t\tif(i < getSlotCount()-1)\n\t\t\t{\n\t\t\t\t//System.out.println(\"i < count-2\");\n\t\t\t\tprev = bean;\n\t\t\t\tbean = inFlightBeans.get(i+1);\n\t\t\t\tif(prev!=null) prev.choose();\n\t\t\t\tinFlightBeans.set(i+1, prev);\t\t\n\t\t\t\tanyStatusChange = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//System.out.println(\"i else: \" + i);\n\t\t\t\tif(bean != null) {\n\t\t\t\t\tthis.slotBean.get(bean.getXPos()).add(bean);\n\t\t\t\t\tanyStatusChange= true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\t\t\t\n\t\t}\n\t\tinsertBean();\n\t\tif(inFlightBeans.get(0) != null) inFlightBeans.get(0).reset();\n\t\t//System.out.println(\"After:\");\n\t\t/*for(int i=0; i < getSlotCount(); i++)\n\t\t{\n\t\t\tif(inFlightBeans.get(i)==null)\n\t\t\t\tSystem.out.println(i+\"=null\");\n\t\t\telse\n\t\t\t\tSystem.out.println(i+\" not null:\" + inFlightBeans.get(i).getXPos());\n\t\t}*/\n\t\treturn anyStatusChange;\n\n\t}", "private int nextIndex() {\n return ThreadLocalRandom.current().nextInt(currentIndex, tracks.size());\n }", "public void next() {\n\t\telements[(currentElement - 1)].turnOff();\n\t\tif (elements.length > currentElement) {\n\t\t\telements[currentElement].turnOn();\n\t\t\tcurrentElement++;\n\t\t} else {\n\t\t\texit();\n\t\t}\n\t}", "void movePrev()\n\t{\n\t\tif (cursor != null) \n\t\t{\n\t\t\tif (cursor == front) \n\t\t\t{\n\t\t\t\tcursor = null;\n index = -1; //added this because i kept failing the test cases on the grading script\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcursor = cursor.prev; //moves cursor toward front of the list\n index--; //added this because i kept failing the test cases on the grading script\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\tpublic int nextIndex() {\n\t\t\treturn 0;\n\t\t}", "public void next()\n\t{\n\t\tSystem.err.print(\"-\");\n\t\tif(pp.available())\n\t\t{\n\t\t\tSystem.err.print(\"+\");\n\t\t\timg_header=pp.getFrameHeader();\n\t\t\tbi=pp.getFrame();\n\t\t\tip[ip_index].setImage(bi);\n\t\t\tip[ip_index].repaint();\n\t\t\tip_index++;\n\t\t\t//ip_index%=cols*rows;\n\t\t\tip_index%=tiles;\n\t\t\tpp.next();\n\t\t}\n\t\tif(panel_glass.isVisible() || is_paused)\n\t\t{\n\t\t\tupdateInfoPanel();\n\t\t\tpanel_buffer_fill.setValue(pp.getBufferFillLevel());\n\t\t\tpanel_buffer_fill.repaint();\n\t\t\tif(is_paused)\n\t\t\t{\n\t\t\t\ttry{Thread.sleep(10);}catch(Exception e){}\n\t\t\t}\n\t\t}\n\t}", "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}", "@Override\n protected int nextIndex() {\n if (_expectedSize != _hash.size()) {\n throw new ConcurrentModificationException();\n }\n\n byte[] states = _hash._states;\n int i = _index;\n while (i-- > 0 && (states[i] != TPrimitiveHash.FULL)) ;\n return i;\n }", "public void advance() {\n\t\tif(isFinalFrame(current)) {\n\t\t\tthrow new IllegalStateException(\"Invalid Entry\"); // input sanitization if last frame (cant advance further )\n\t\t\t\n\t\t}\n\t\tif (!current.movesFinished()) { // input sanitization -- cant advance if the user hasnt exercised all the frames moves\n\t\t\tthrow new IllegalStateException(\"Invalid Entry\");\n\t\t}\n\t\telse current = frames.get(frames.indexOf(current) + 1); // else updates the current frame to frame at next index. \n\t}", "public void handleNextCode() {\n setCurrentCode((currentIndex + 1) % codeCount);\n }", "public Host getCurrentHost() {\n\t\tif (current == null) {\n\t\t\tString id = SystemHelper.os.getSystemUUID();\n\t\t\tfor (Host host : config.getHosts()) {\n\t\t\t\tif (id.equals(host.getId())) {\n\t\t\t\t\tcurrent = host;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn current;\n\t}", "private void nextButtonActionPerformed(ActionEvent e) {\n // TODO add your code here\n int remainItem = this.list.size() - 6 * (this.page + 1);\n\n if(remainItem <= 0){\n Warning.run(\"No more page here.\");\n }\n else{\n this.page++;\n this.update();\n }\n }", "public void nextTurn(){\n\t\tthis.setCurrentElement(this.getCurrentElement().getNext());\n\t}", "public boolean move(\n int index\n )\n {\n if(this.index > index)\n {moveStart();}\n\n while(this.index < index\n && moveNext());\n\n return getCurrent() != null;\n }", "public int nextIndex() {\n return curIndex;\n }", "public static CellView getNextCellView(CellView currentCellView)\n {\n int currentCellViewIndex;\n if (PlayerController.isAHomeArrivalMove())\n {\n currentCellViewIndex = getHomeCellIndex();\n }else\n {\n currentCellViewIndex = cellViewList.indexOf(currentCellView);\n }\n return cellViewList.get(currentCellViewIndex + 1);\n }", "private Enemy findNextEnemy(int currentIndex) {\n if(enemiesLeft[currentIndex] > 0) {\n enemiesLeft[currentIndex] -=1;\n Enemy next = currentEnemies[currentIndex].clone();\n next.setCoords(map.getStart()[0],map.getStart()[1]);\n return next;\n } else if(currentIndex < enemiesLeft.length){\n return findNextEnemy(currentIndex+1); //recursively traverses the array till all enemies are spawned i guess\n } else {\n return null;\n }\n }", "public void goToNext()\n {\n if (current != null)\n {\n previous = current;\n current = current.nLink;\n } // end if\n else if (head != null)\n {\n System.out.println(\"Iteration reached end of line.\");\n System.exit(0);\n } // else if\n else\n {\n System.out.println(\"You can't iterate an empty list.\");\n System.exit(0);\n }\n }", "public abstract boolean isNextBlocked();", "private void considerQueue(){\r\n\t\tif (queuedDialog != dialogToDisplay){\r\n\t\t\t// check to see if is skippable and if is finished\r\n\t\t\tif (thisDialog.get(dialogToDisplay).isSkippable()){\r\n\t\t\t// if isSkippable(), then it doesn't matter whether its done yet or not - we go on\r\n\t\t\t\tthisDialog.get(dialogToDisplay).switchBoxState();\r\n\t\t\t}else {\r\n\t\t\t\t// if its not skippable, check to see if its done yet.\r\n\t\t\t\tif (thisDialog.get(dialogToDisplay).isFinished()){\r\n\t\t\t\t\t// if so, go on\r\n\t\t\t\t\tthisDialog.get(dialogToDisplay).switchBoxState();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void keepWalking() {\n\t\t// move along the current segment\n\t\tif (UserParameters.socialInteraction) speed = progressSocial(moveRate);\n\t\telse speed = progress(moveRate);\n\t\tcurrentIndex += speed;\n\t\t// check to see if the progress has taken the current index beyond its goal\n\t\t// given the direction of movement. If so, proceed to the next edge\n\t\tif (linkDirection == 1 && currentIndex > endIndex) {\n\t\t\tCoordinate currentPos = segment.extractPoint(endIndex);\n\t\t\tupdatePosition(currentPos);\n\t\t\ttransitionToNextEdge(currentIndex - endIndex);\n\t\t}\n\t\telse if (linkDirection == -1 && currentIndex < startIndex) {\n\t\t\tCoordinate currentPos = segment.extractPoint(startIndex);\n\t\t\tupdatePosition(currentPos);\n\t\t\ttransitionToNextEdge(startIndex - currentIndex);\n\t\t}\n\t\telse {\n\t\t\t// just update the position!\n\t\t\tCoordinate currentPos = segment.extractPoint(currentIndex);\n\t\t\tupdatePosition(currentPos);\n\t\t}\n\t}", "public int nextIndex() {\r\n throw new UnsupportedOperationException();\r\n }", "private void nextStep(){\n if(vMaze == null)\n mainMessage.setText(\"You must load a maze first!\");\n else try{\n vMaze.step();\n tileBox.getChildren().clear();\n tileBox.getChildren().add(vMaze.getTiles());\n\n mainMessage.setText(\"You took one step.\");\n if(vMaze.getRouteFinder().isFinished())\n mainMessage.setText(\"You reached the end!\");\n } catch (NoRouteFoundException e){\n mainMessage.setText(e.getMessage());\n }\n }", "public void resetCurrent(){\r\n curr = head;\r\n }", "@Test\n public void testSet_After_Next() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n instance.set(9);\n int expResult = 1;\n\n assertEquals(expResult, baseList.indexOf(9));\n }", "public void moveNext() {\n\t\tcurrentElement++;\n\t}", "public void reset(){\n\t\tthis.currentIndex = 0;\n\t}", "public void setPrevious()\n {\n\tint currentIndex = AL.indexOf(currentObject);\n\t currentObject = AL.get(currentIndex -1);\n\t\n\t// never let currentNode be null, wrap to head\n\tif (currentObject == null)\n\t\tcurrentObject = lastObject;\n }", "void nextPage() throws IndexOutOfBoundsException;", "private void doNextRow(){\n\t\tmove();\n\t\twhile (frontIsClear()){\n\t\t\talternateBeeper();\n\t\t}\n\t\tcheckPreviousSquare();\t\n\t}", "private void transport_nextSong() {\n if (thisSong.getTrackNumber() != thisAlbum.size()) {\n thisSong = thisAlbum.get(thisSong.getTrackNumber());\n timerStop();\n setViewsForCurrentSong();\n setStyle_ofTransportControls();\n transport_play();\n }\n }", "@Override\n public void moveTowards(int destination) throws FragileItemBrokenException {\n if(delaying){\n delaying = false;\n } else {\n super.moveTowards(destination);\n delaying = true;\n }\n }", "public void incrementIndex() {\n\t\tindex++;\n\t\tif (nextItem != null) {\n\t\t\tnextItem.incrementIndex();\n\t\t}\n\t}", "public int nextIndex()\n {\n // TODO: implement this method\n return -1;\n }", "@Test\n public void testSet_After_Previous() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n instance.previous();\n\n instance.set(9);\n int expResult = 1;\n\n assertEquals(expResult, baseList.indexOf(9));\n }", "public void nextHard() {\n\t\titerator.next();\n\t}", "private void goForwardOne() \n {\n if (m_bufferOffset_ < 0) {\n // we're working on the source and not normalizing. fast path.\n // note Thai pre-vowel reordering uses buffer too\n m_source_.setIndex(m_source_.getIndex() + 1);\n }\n else {\n // we are in the buffer, buffer offset will never be 0 here\n m_bufferOffset_ ++;\n }\n }", "private void handleZswapdFail() {\n if (curState == 2) {\n handler.removeMessages(7);\n curState = 0;\n }\n if (curState == 0) {\n curReclaimFailCount++;\n Slog.i(TAG, \"zswapd fail, now Fail count:\" + curReclaimFailCount);\n long curTime = SystemClock.uptimeMillis();\n if (lastReclaimFailTime == -1) {\n lastReclaimFailTime = curTime;\n } else if (reclaimFailCount <= curReclaimFailCount) {\n int curBuffer = getCurBufferSize();\n if (minTargetBuffer == targetBuffer) {\n Message msg = handler.obtainMessage();\n Slog.i(TAG, \"zswapd keep fail, targetBuffer is min, call kill, curBuf: \" + curBuffer);\n msg.what = 1;\n handler.sendMessage(msg);\n }\n targetBuffer = curBuffer;\n targetBuffer = Math.min(maxTargetBuffer, targetBuffer);\n targetBuffer = Math.max(targetBuffer, minTargetBuffer);\n Trace.traceBegin(8, \"zswapd fail:\" + targetBuffer);\n int i = targetBuffer;\n setBuffer(i, i - lowBufferStep, highBufferStep + i, swapReserve);\n Trace.traceEnd(8);\n Slog.i(TAG, \"handle zswapd fail a lot, current buffer: \" + curBuffer + \", targetBuffer: \" + targetBuffer);\n lastReclaimFailTime = curTime;\n curReclaimFailCount = 0;\n }\n }\n }", "@Override\r\n public int nextIndex() {\r\n if (next == null) {\r\n return size; \r\n }\r\n return nextIndex - 1;\r\n }", "@Override\n public void stepUp(Cell currentCell) {\n if(currentCell.getOldNoOfAliveNeighbours()==3)\n {\n currentCell.setState(new Alive());\n }\n }", "@Test\n public void testSetValidQueueItem() throws Exception {\n List<MediaSessionCompat.QueueItem> queue = QueueHelper.getPlayingQueueFromSearch(\n \" \", null, provider);\n\n int expectedItemIndex = queue.size() - 1;\n MediaSessionCompat.QueueItem expectedItem = queue.get(expectedItemIndex);\n // Latch for 3 tests\n CountDownLatch latch = new CountDownLatch(3);\n QueueManager queueManager = createQueueManagerWithValidation(latch, expectedItemIndex,\n queue);\n\n // test 1: set the current queue\n queueManager.setCurrentQueue(\"Queue 1\", queue);\n\n // test 2: set queue index to the expectedItem using its queueId\n assertTrue(queueManager.setCurrentQueueItem(expectedItem.getQueueId()));\n\n // test 3: set queue index to the expectedItem using its mediaId\n assertTrue(queueManager.setCurrentQueueItem(expectedItem.getDescription().getMediaId()));\n\n latch.await(5, TimeUnit.SECONDS);\n }", "void tryToFindNextKing()\n {\n if (nodeIds.size() != 0)\n {\n int nextKingId = Collections.max(nodeIds);\n CommunicationLink nextKing = allNodes.get(nextKingId);\n nextKing.sendMessage(new Message(\n Integer.toString(nextKingId), nextKing.getInfo(), myInfo, KING_IS_DEAD));\n }\n }", "public void setNext(Tile next){\n\t\tthis.next=next;\n\t}", "private void moveMatchingNodeToNextElement(Node tmp) {\n for (int i = 0; i < ALL_LINKED_LISTS.size();i++) {\n Node next = ALL_LINKED_LISTS.get(i);\n if (tmp.equals(next)) {\n next = next.next;\n ALL_LINKED_LISTS.put(i, next);\n break;\n }\n }\n }", "@Override\r\n\t\tpublic Item next() {\r\n\t\t\tif (!hasNext()) {\r\n\t\t\t\tthrow new NoSuchElementException();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn queue[index[i++]];\r\n\t\t\t}\r\n\t\t}", "private void next()\r\n {\r\n if(currentCard != stack.getChildren().size()- 1) // if we are not at the last card\r\n {\r\n currentCard++; // make the next card the current card\r\n \r\n // move through the cards: show the current card, hide the others\r\n for(int i = 0; i <= stack.getChildren().size()- 1; i++)\r\n {\r\n if(i == currentCard)\r\n {\r\n stack.getChildren().get(i).setVisible(true);\r\n }\r\n else\r\n {\r\n stack.getChildren().get(i).setVisible(false);\r\n }\r\n }\r\n }\r\n }", "public void setNextDest(int nextDest) {\n\t\tthis.nextDestination = nextDest;\n\t}", "public void movePointerBackward() throws EndTaskException {\n\t\tpickBeeper();\n\t\tturnAround();\n\t\tmove();\n\t\tputBeeper();\n\t}", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }", "public boolean SetNext(List v_next){\n\tnext = v_next ;\n\treturn true ;\n }" ]
[ "0.6214779", "0.6062746", "0.59199834", "0.5412903", "0.52448934", "0.5179153", "0.5141887", "0.5113796", "0.50855356", "0.5066376", "0.50480455", "0.5045059", "0.50096875", "0.4967164", "0.49621424", "0.4927192", "0.49249882", "0.49218944", "0.49205887", "0.49132928", "0.48933923", "0.48776793", "0.48770535", "0.4876939", "0.48732486", "0.48622394", "0.48542792", "0.48268095", "0.4817589", "0.48059812", "0.48020065", "0.47973996", "0.47963437", "0.47915873", "0.478177", "0.47790748", "0.47788548", "0.47748756", "0.4768614", "0.47630095", "0.47541523", "0.4738194", "0.47336838", "0.47320884", "0.47220123", "0.47191304", "0.47134534", "0.47061908", "0.46934965", "0.46813232", "0.46769533", "0.46592122", "0.46551797", "0.4642486", "0.46125156", "0.45980337", "0.459456", "0.4593018", "0.45780095", "0.4573223", "0.4572899", "0.45663732", "0.45577157", "0.45572725", "0.45559257", "0.45543668", "0.45468876", "0.45463982", "0.45435578", "0.4541596", "0.4541093", "0.45388457", "0.4537722", "0.45343742", "0.4530613", "0.4528565", "0.45263544", "0.45229146", "0.45174667", "0.4516409", "0.451635", "0.45148203", "0.45039955", "0.44958144", "0.44936058", "0.4488223", "0.4486953", "0.44841525", "0.4480241", "0.44776127", "0.44775814", "0.44775814", "0.44775814", "0.44775814", "0.44775814", "0.44775814", "0.44775814", "0.44775814", "0.44775814", "0.44775814" ]
0.5889371
3
Returns a new shuffled list, without mutating the input list (which may be immutable).
private static <T> ImmutableList<T> shuffleImmutableList(List<T> sourceList, Random random) { List<T> mutableList = new ArrayList<>(sourceList); Collections.shuffle(mutableList, random); return ImmutableList.copyOf(mutableList); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void shuffle(java.util.List arg0, java.util.Random arg1)\n { return; }", "private static ArrayList<String> createShuffledDeck(ArrayList<String> originDeck) {\n\t\t// Make a copy of the originDeck, making sure we never change the originDeck\n\t\t// so we can always use it again to generate a new deck\n\t\tArrayList<String> deckCopy = new ArrayList<String>(originDeck);\n\t\tArrayList<String> shuffledDeck = new ArrayList<String>(); // Create empty deck of proper size\n\t\t\n\t\t// While the temporary deck copy is NOT empty, keep pulling cards randomly and add them to the shuffled deck\n\t\twhile (!deckCopy.isEmpty()) {\n\t\t\tint pullIndex = randy.nextInt(deckCopy.size());\n\t\t\tString pulledCard = deckCopy.get(pullIndex);\n\t\t\tshuffledDeck.add(pulledCard);\n\t\t\tdeckCopy.remove(pullIndex);\n\t\t}\n\t\t\n\t\t// Return shuffled deck\n\t\treturn shuffledDeck;\n\t}", "public static IntArrayList shuffle(IntArrayList list, Random random) {\n int maxHalf = list.size() / 2;\n for (int x1 = 0; x1 < maxHalf; x1++) {\n int x2 = random.nextInt(maxHalf) + maxHalf;\n int tmp = list.buffer[x1];\n list.buffer[x1] = list.buffer[x2];\n list.buffer[x2] = tmp;\n }\n return list;\n }", "public int[] shuffle() {\r\n if (nums == null) return nums;\r\n int tmp = 0;\r\n \r\n int[] newNums = nums.clone();\r\n \r\n for (int i=1; i<newNums.length; i++) {\r\n int selectPos = rd.nextInt(i+1);\r\n tmp = newNums[i];\r\n newNums[i] = newNums[selectPos];\r\n newNums[selectPos] = tmp;\r\n }\r\n \r\n return newNums;\r\n }", "default Stream<T> reshuffle() {\n return reshuffle(null);\n }", "public int[] shuffle() {\n Collections.shuffle(list);\n int[] temp = new int[list.size()];\n for (int i = 0; i < list.size(); i++) {\n temp[i] = list.get(i);\n }\n return temp;\n }", "public static void shuffle(java.util.List arg0)\n { return; }", "public List<Fruit> generateShuffled(int listType) {\r\n final List<Fruit> list = innerGenerate(listType);\r\n Collections.shuffle(list);\r\n return Collections.unmodifiableList(list);\r\n }", "public void spreadShuffle()\r\n {\r\n List<Card> shuffledDeck = new ArrayList<Card>();\r\n List<Card> tempDeck = null;\r\n for (int i = 0; i < SHUFFLE_COUNT; i++) {\r\n while (cards.size() > 0)\r\n {\r\n shuffledDeck.add( drawRandom() );\r\n }\r\n tempDeck = cards;\r\n cards = shuffledDeck;\r\n tempDeck.clear();\r\n shuffledDeck = tempDeck;\r\n }\r\n }", "public static <E> ArrayList<E> scrambleArrayList(ArrayList<E> inArr)\n {\n ArrayList<E> scrambleArr = new ArrayList();\n scrambleArr.addAll(inArr);\n Random rndVar = new Random();\n int size = inArr.size();\n E tempStr;\n\n for(int k = 0; k < size; k++) {\n int i = rndVar.nextInt(size);\n tempStr = scrambleArr.get(i);\n scrambleArr.remove(i);\n scrambleArr.add(tempStr);\n\n } //for\n\n return scrambleArr;\n\n }", "public static ArrayList<Integer> shuffleList(ArrayList<Integer> list) {\n Collections.shuffle(list);\n return list;\n }", "public int[] shuffle() {\n int[] shuffle = nums.clone();\n for(int i = 0; i < shuffle.length; i++){\n int index = random.nextInt(i + 1);\n swap(shuffle,i,index);\n }\n return shuffle;\n }", "public static <E> void shuffle(ArrayList<E> list) {\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tint index = (int)(Math.random() * list.size());\n\t\t\tE temp = list.get(i);\n\t\t\tlist.set(i, list.get(index));\n\t\t\tlist.set(index, temp);\n\t\t}\n\t}", "public void remove() {\n if (count == 0) {\n return;\n }\n \n Random rand = new Random();\n int index = rand.nextInt(count);\n for (int i = index; i < count - 1; i++) {\n list[i] = list[i+1];\n }\n count--; \n }", "public void shuffle() {\n for (int i = size - 1; i > 0; i--) {\n swap(i, (int)(Math.random() * (i + 1)));\n }\n }", "public void shuffle() {\n List<Card> shuffledCards = new ArrayList<>(52);\n while (cards.size() > 0) {\n int index = random.nextInt(cards.size());\n shuffledCards.add(cards.remove(index));\n }\n cards = shuffledCards;\n }", "public static <T> int[] shuffle(List<T> list) {\r\n int[] permutation = new int[list.size()];\r\n for (int i = 0; i < permutation.length; i++) {\r\n permutation[i] = i;\r\n }\r\n \r\n for (int i = list.size() - 1; i >= 1; i--) {\r\n T tmp = list.get(i);\r\n int j = MathUtils.random(i);\r\n list.set(i, list.get(j));\r\n list.set(j, tmp);\r\n int t = permutation[i];\r\n permutation[i] = permutation[j];\r\n permutation[j] = t;\r\n }\r\n return permutation;\r\n }", "public int[] shuffle() {\n int[] result = reset();\n\n Random rand = new Random();\n for (int i = 0; i < result.length; i++) {\n int j = rand.nextInt(result.length - i) + i;\n int tmp = result[i];\n result[i] = result[j];\n result[j] = tmp;\n }\n return result;\n }", "public int[] shuffle() {\n int[] shuffle = new int[nums.length];\n int[] clone = nums.clone();\n int last = clone.length - 1;\n for(int i = 0; i < clone.length; i++){\n int index = random.nextInt(last + 1);\n shuffle[i] = clone[index];\n clone[index] = clone[last--];\n }\n return shuffle;\n }", "public void shuffle();", "public void shuffle() {\n Collections.shuffle(this);\n }", "public static void shuffle(String[] arrayList){\n int num=arrayList.length; \n for(int j=0;j<60;j++){ // the number of shuffling>50 times, so I choose 60 times\n for(int i=0;i<num;i++){ \n int index=(int)(Math.random()*num);\n //Swap the position of elements in the array at that index with the first element\n String temp=arrayList[i]; \n arrayList[i]=arrayList[index];\n arrayList[index]=temp;\n }}}", "public void shuffle() {\n\t\t\t/*\n\t\t\t * This is very different from the sort method because:\n\t\t\t * @ we decant the cards into an array list;\n\t\t\t * @ we use a library function to do the work;\n\t\t\t * The implementation you write for the sort method should\n\t\t\t * have *neither* of these characteristics.\n\t\t\t */\n\t\t\tList<Card> cards = new ArrayList<Card>();\n\t\t\twhile (!isEmpty()) {\n\t\t\t\tcards.add(draw());\n\t\t\t}\n\t\t\tCollections.shuffle(cards);\n\t\t\tfor (Card c: cards) {\n\t\t\t\tadd(c);\n\t\t\t}\n\t\t}", "void shuffle();", "void shuffle();", "public ArrayList<SongInfo> getShuffledSongs(boolean reshuffle);", "public static <T> List<T> mirrored(List<T> l) throws IllegalArgumentException {\n if (l.isEmpty()) {\n throw new IllegalArgumentException();\n }\n List<T> mirroredList1 = new ArrayList<T>(l);\n List<T> mirroredList2 = new ArrayList<T>(l);\n Collections.reverse(mirroredList2);\n mirroredList2 = mirroredList2.subList(1, mirroredList2.size());\n mirroredList1.addAll(mirroredList2);\n return mirroredList1;\n }", "public static Character[] shuffle(Character[] list) {\n int x;\n Character[] shuffle2 = new Character[list.length];\n ArrayList<Integer> safety = new ArrayList<Integer>();\n for (int i = 0; i < list.length; i++) {\n x = randint(0, list.length - 1);\n while (safety.contains(x)) {\n x = randint(0, list.length - 1);\n }\n shuffle2[i] = list[x];\n safety.add(x);\n }\n return shuffle2;\n }", "public int[] shuffle() {\n\t\t\tif (originalArr == null)\n\t\t\t\treturn null;\n\t\t\tint randomArr[] = originalArr.clone();\n\t\t\tfor (int i = 1; i < originalArr.length; i++) {\n\t\t\t\tint newIndex = random.nextInt(i + 1);\n\t\t\t\tswap(i, newIndex, randomArr);\n\t\t\t}\n\t\t\treturn randomArr;\n\t\t}", "public int[] shuffle() {\r\n int max = nums.length - 1;\r\n for (int i = 0; i < nums.length; i++) {\r\n int index = new Random().nextInt(max)%(max - i + 1) + i;\r\n int tmp = nums[i];\r\n nums[i] = nums[index];\r\n nums[index] = tmp;\r\n }\r\n return nums;\r\n }", "public static ArrayList<String> shuffleCards(ArrayList<String> arrayList,int player){\n System.out.println(\"the cards are shuffule properly\");\n ArrayList<String> temp = new ArrayList<>();\n while(! arrayList.isEmpty()){\n int loc = (int) (Math.random()*arrayList.size());\n temp.add(arrayList.get(loc));\n arrayList.remove(loc);\n }\n arrayList = temp;\n display(arrayList);\n cardFlowCompute(arrayList,player);\n return arrayList;\n }", "public static List arrayShuffle(List arrayToShuffle)\n\t{\n\t\tCollections.shuffle(arrayToShuffle);\n\t\treturn arrayToShuffle;\n\t}", "public int[] shuffle() {\n int i = random.nextInt(nums.length);\n int j = random.nextInt(nums.length);\n swap(temp, i , j);\n return temp;\n }", "public void shuffle() {\n\t\tCollections.shuffle(Arrays.asList(reel));\n\t}", "public static int[] shuffle() {\n Random random = new Random();\n for (int i = 0; i < len; i++) {\n int j = random.nextInt(len);\n int temp = nums[i];\n nums[i] = nums[j];\n nums[j] = temp;\n }\n return nums;\n }", "public abstract void shuffled();", "public int[] shuffle() {\n\t\tRandom r = new Random();\n\t\tfor (int i = 0; i < this.nums.length; i++) {\n\t\t\tint index = r.nextInt(this.nums.length);\n\t\t\tif (i != index) {\n\t\t\t\tnums[i] = nums[i] ^ nums[index];\n\t\t\t\tnums[index] = nums[i] ^ nums[index];\n\t\t\t\tnums[i] = nums[i] ^ nums[index];\n\t\t\t}\n\t\t}\n\t\treturn nums;\n\t}", "@SuppressWarnings(\"unchecked\")\n Stream<T> reshuffle(@Nullable String name);", "public static void randomize( ArrayList<Integer> L) {\n\tRandom rng = new Random();\n\tInteger tmp1, tmp2;\n\tInteger randInd1, randInd2;\n\tint limit = L.size();\n\tfor (int i = 0; i < limit; i++) { // number of times to swap\n\t randInd1 = new Integer( rng.nextInt(L.size()) );\n\t randInd2 = new Integer( rng.nextInt(L.size()) );\n\t while (randInd2 == randInd1 && L.size() > 1) {\n\t\trandInd2 = rng.nextInt(L.size());\n\t }\n\t tmp1 = L.get(randInd1);\n\t tmp2 = L.get(randInd2);\n\t L.set(randInd1, tmp2);\n\t L.set(randInd2, tmp1);\n\t}\n }", "public void shuffle(){\n Collections.shuffle(Arrays.asList(this.deck));\n }", "public int[] shuffle() {\n for (int i = nums.length - 1; i >= 0; i--) {\n swap(i, rnd.nextInt(i + 1));\n }\n \n return nums;\n }", "public void shuffle() {\n\t\tCollections.shuffle(inds);\n\t}", "@Test\n\tpublic void createListFromList() {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"AAPL\");\n\t\tlist.add(\"MSFT\");\n\n\t\t// Create a copy using constructor of ArrayList\n\t\tList<String> copy = new ArrayList<>(list);\n\n\t\tassertTrue(list.equals(copy));\n\t}", "private void shuffleDeck()\r\n {\n cardList = new ArrayList<Card>(deck);\r\n // shuffle the deck of cards using the ArrayList\r\n Collections.shuffle(getCardList());\r\n // convert it back to a HashSet\r\n deck = new HashSet<Card>(getCardList());\r\n }", "public int[] shuffle() {\n int[] shuffled = Arrays.copyOf(origin, origin.length);\n \n for (int i = shuffled.length - 1; i > 0; i--) {\n int index = random.nextInt(i + 1);\n int temp = shuffled[i];\n shuffled[i] = shuffled[index];\n shuffled[index] = temp;\n }\n return shuffled;\n }", "public List<E> clone();", "public static void main(String[] args) {\n ArrayList<String>colors= new ArrayList<>();\n colors.add(\"red\");\n colors.add(\"green\");\n colors.add(\"Orange\");\n colors.add(\"white\");\n colors.add(\"black\");\n System.out.println(\"list before shuffling: \" + colors );\n Collections.shuffle(colors);\n System.out.println(\"list after shuffling:\" + colors);\n\n\n\n }", "public void shuffle(){\r\n Collections.shuffle(cards);\r\n }", "public static Node copyRandomList2(Node head) {\n\n\t\t//setting up duplicate nodes in between\n\t\tif (head == null) return head;\n\t\tNode curr = head;\n\t\twhile (curr != null) {\n\t\t\tNode node = new Node(curr.val);\n\t\t\tNode next = curr.next;\n\t\t\tcurr.next = node;\n\t\t\tnode.next = next;\n\t\t\tcurr = next;\n\t\t}\n\n\t\t//setting up random for duplicates\n\t\tNode p = head;\n\t\twhile (p != null) {\n\t\t\tcurr = p.next;\n\t\t\tcurr.random = p.random == null ? null : p.random.next;\n\t\t\tp = curr.next;\n\t\t}\n\n\t\t//removing the duplicate list of nodes from the modified\n\t\tNode res = new Node(-1), prev = res;\n\t\tp = head;\n\t\twhile (p != null) {\n\t\t\tcurr = p.next;\n\t\t\tprev.next = curr;\n\t\t\tprev = curr;\n\t\t\tp.next = p.next.next;\n\t\t\tp = p.next;\n\t\t}\n\t\treturn res.next;\n\t}", "private static void shuffleJoinSwapAndcloneLinkedList() {\n\t\tLinkedList<Integer> list = new LinkedList<Integer>();\n\t\tlist.add(10);\n\t\tlist.add(20);\n\t\tlist.add(30);\n\t\tlist.add(40);\n\t\tlist.add(50);\n\t\tSystem.out.println(\"LinkedList is : \" + list);\n\n\t\tLinkedList<Integer> list1 = new LinkedList<Integer>();\n\t\tlist.add(60);\n\t\tlist.add(70);\n\t\tlist.add(80);\n\t\tlist.add(90);\n\t\tlist.add(100);\n\t\tSystem.out.println(\"LinkedList is : \" + list1);\n\n\t\t// clone the LinkedList\n\t\tSystem.out.println(\"shuffle the element in the LinkedList \" + list);\n\n\t\t// Shuffle all numbers in LinkedList\n\t\tCollections.shuffle(list);\n\t\tSystem.out.println(\"shuffle the element in the LinkedList \" + list);\n\n\t\t// swap two numbers in LinkedList\n\t\tCollections.swap(list, 01, 04);\n\t\tSystem.out.println(\"Swapping the element in the LinkedList \" + list);\n\n\t}", "public RandomListNode copyRandomList2(RandomListNode head){\n RandomListNode currP = head;\n \n //copy the node\n while(currP != null){\n RandomListNode tmp = new RandomListNode(currP.label);\n tmp.next = currP.next;\n currP.next = tmp;\n currP = tmp.next;\n }\n \n currP = head;\n //copy the random pointer\n while(currP != null){\n \n if(currP.random != null){\n currP.next.random = currP.random.next; \n }\n \n currP = currP.next.next;\n }\n \n //decouple the list\n RandomListNode safehead = new RandomListNode(0);\n RandomListNode p = safehead;\n currP = head;\n \n while(currP != null){\n p.next = currP.next;\n currP.next = currP.next.next;\n currP = currP.next;\n p = p.next;\n }\n \n return safehead.next;\n }", "public static <T> List<T> unmodifiableList(List<T> original) {\n ArrayList<T> list = new ArrayList<>(original.size());\n original.forEach(list::add);\n return Collections.unmodifiableList(list);\n }", "private int[] shuffle() {\n int len = data_random.length;\n Random rand = new Random();\n for (int i = 0; i < len; i++) {\n int r = rand.nextInt(len);\n int temp = data_random[i];\n data_random[i] = data_random[r];\n data_random[r]=temp;\n }\n return data_random;\n }", "public void shuffle() {\n for (int i = 0; i < this.cards.length ; i++ ) {\n double x = Math.floor(Math.random() * ((double)this.cards.length - (double)0)) + (double)0;\n Card temp = this.cards[i];\n this.cards[i]= this.cards[(int)x];\n this.cards[(int)x]= temp;\n }\n }", "public int[] shuffle() {\n if (nums == null) {\n return null;\n }\n int[] a = nums.clone();\n for (int j = 1; j < a.length; j++) {\n // 类似蓄水池采样算法\n // i == j -> 1/(1+j)\n // j != j -> (1 - 1/(1+j)) * (1/j) = 1/(1/j)\n int i = random.nextInt(j + 1);\n swap(a, i, j);\n }\n return a;\n }", "private void shuffle(ArrayList<Product> dataSet) {\n\t\tfor (int i = 0; i < dataSet.size(); i++) {\n\t\t\tint k = rand(0, i);\n\t\t\tProduct temp = dataSet.get(k);\n\t\t\tdataSet.set(k, dataSet.get(i));\n\t\t\tdataSet.set(i, temp);\n\t\t}\t\n\t}", "public void shuffle() {\n\t\tfor (int i = 0; i < cards.size(); i++){\n\t\t\t//exchange card i with the random card from i to cards.size() - 1\n\t\t\tint j = Randoms.randomIntInRange(i, cards.size() - 1);\n\t\t\tT c1 = cards.get(i);\n\t\t\tT c2 = cards.get(j);\n\t\t\tcards.set(i, c2);\n\t\t\tcards.set(j, c1);\n\t\t}\n\t}", "public void shuffle() {\n Random rand = new Random();\n for(int i = 0; i < deck.length; i++) {\n // get random index past current index\n int randomVal = i + rand.nextInt(deck.length - i);\n // swaps randomly selected card with card at index i\n Card swap = deck[randomVal];\n deck[randomVal] = deck[i];\n deck[i] = swap;\n }\n }", "public void shuffle() {\r\n for (int i = 0; i < this.numCards; i++) {\r\n int spot = (int) (Math.random() * ((this.numCards - 1) - i + 1) + i);\r\n Card temp = cards[i];\r\n cards[i] = cards[spot];\r\n cards[spot] = temp;\r\n\r\n\r\n }\r\n }", "public void shuffle(){\n Collections.shuffle(this.deckOfCards);\n }", "public void shuffle()\r\n\t{\r\n\t\tRandom rand = ThreadLocalRandom.current();\r\n\t\t\r\n\t\tfor (int i = topCard; i > 0; i--)\r\n\t\t{\r\n\t\t\tint index = rand.nextInt(i + 1);\r\n\t\t\tString temp = cards[index];\r\n\t\t\tcards[index] = cards[i];\r\n\t\t\tcards[i] = temp;\r\n\t\t}\r\n\t}", "public CardStack shuffle() {\n Card[] arr = new Card[cards.size()];\n List<Card> cardsList = Arrays.asList(cards.toArray(arr));\n Collections.shuffle(cardsList);\n cards.removeAllElements();\n cards.addAll(cardsList);\n return this;\n }", "public int[] shuffle() {\n int[] shuffled = new int[length];\n for (int i = 0; i < length; i++)\n shuffled[i] = nums[i];\n for (int i = 0; i < length; i++) {\n int randomIndex = (int) (Math.random() * length);\n int temp = shuffled[i];\n shuffled[i] = shuffled[randomIndex];\n shuffled[randomIndex] = temp;\n }\n return shuffled;\n }", "@Override\r\n\tpublic void reset() {\r\n\t\tthis.priorityElements = Lists.newArrayList(originalElements);\r\n\t\tCollections.shuffle(priorityElements);\r\n\t\tthis.currentElements = Lists.newArrayListWithExpectedSize(2 * originalElements.size());\r\n\t\tthis.currentElements.addAll(originalElements);\r\n\t}", "public void shuffle()\n\t{\n\t\tHashSet<Integer> usedRandoms = new HashSet<Integer>();\n\t\tthis.currentCard = 0;\n\t\tint i= 0;\n\t\twhile (i < deck.length)\n\t\t{\n\t\t\tint another = this.rand.nextInt(NUMBER_OF_CARDS);\n\t\t\tif(!usedRandoms.contains(another))\n\t\t\t{\n\t\t\t\tCard temp = this.deck[i];\n\t\t\t\tthis.deck[i] = this.deck[another];\n\t\t\t\tthis.deck[another] = temp;\n\t\t\t\ti++;\n\t\t\t\tusedRandoms.add(another);\n\t\t\t}\n\t\t}\n\t}", "public static void shufleArray(ArrayList<Number> list) {\r\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\t// generisemo prvi indeks.\r\n\t\t\tint indx1 = (int) (Math.random() * list.size());\r\n\t\t\t// generisemo drugi index.\r\n\t\t\tint indx2 = (int) (Math.random() * list.size());\r\n\t\t\t// cuvamo elemenat sa prvog indeksa.\r\n\t\t\tNumber temp = list.get(indx1);\r\n\t\t\t// Kopiramo elemenat sa drugog indeksa preko prvog elementa.\r\n\t\t\tlist.set(indx1, list.get(indx2));\r\n\t\t\t// Kopiramo temp (prvi elemenat) preko drugog elementa.\r\n\t\t\tlist.set(indx2, temp);\r\n\t\t}\r\n\t}", "public void shuffle() {\n\t\tRandom randIndex = new Random();\n\t\tint size = cards.size();\n\t\t\n\t\tfor(int shuffles = 1; shuffles <= 20; ++shuffles)\n\t\t\tfor (int i = 0; i < size; i++) \n\t\t\t\tCollections.swap(cards, i, randIndex.nextInt(size));\n\t\t\n\t}", "public void Shuffle() {\n\t\tCollections.shuffle(cards);\n\t}", "public RandomListNode copyRandomList(RandomListNode head) {\n if (head == null) return null;\n\n // replicate next nodes\n RandomListNode p = head;\n while (p != null) {\n RandomListNode copy = new RandomListNode(p.label);\n copy.next = p.next;\n p.next = copy;\n p = copy.next;\n }\n\n // replicate random nodes\n p = head;\n while (p != null) {\n RandomListNode copy = p.next;\n if (p.random != null) copy.random = p.random.next;\n p = copy.next;\n }\n\n // decouple two lists\n p = head;\n RandomListNode newHead = head.next;\n while (p != null) {\n RandomListNode copy = p.next;\n p.next = copy.next;\n if (copy.next != null) copy.next = copy.next.next;\n p = p.next;\n }\n return newHead;\n }", "public void shuffle() {\r\n\t\tCollections.shuffle(cards);\r\n\t\t// : Shuffle with random seed each time, then we can save the seed\r\n\t\t// Collections.shuffle(cards, new Random(10));\r\n\t}", "public static void randomize(List<String> list) {\n\t\tfor (int i = list.size() - 1; i > 0; i--) {\n\t\t\tint rand = (int)( Math.random() * i );\n\t\t\tString temp = list.get(i);\n\t\t\tlist.set(i, list.get(rand));\n\t\t\tlist.set(rand, temp);\n\t\t}\n\t}", "private List<Tuple> randomSampleFromList(List<Tuple> list, int sampleSize, boolean withReplacement,\n\t\t\tRandom randomGenerator) {\n\t\tList<Tuple> sample = new LinkedList<Tuple>();\n\n\t\tif (list.size() <= sampleSize) {\n\t\t\tsample.addAll(list);\n\t\t} else {\n\t\t\tSet<Integer> usedIndexes = new HashSet<Integer>();\n\t\t\tint resultsCounter = 0;\n\t\t\twhile (resultsCounter < sampleSize && usedIndexes.size() < list.size()) {\n\t\t\t\tint randomIndex = randomGenerator.nextInt(list.size());\n\t\t\t\tif (withReplacement || !usedIndexes.contains(randomIndex)) {\n\t\t\t\t\tsample.add(list.get(randomIndex));\n\t\t\t\t\tresultsCounter++;\n\t\t\t\t\tusedIndexes.add(randomIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn sample;\n\t}", "public void shuffle() {\n\t\tfor (int i = 51; i > 0; i--) {\n\t\t\tint rand = (int) (Math.random() * (i + 1));\n\t\t\tint temp = deck[i];\n\t\t\tdeck[i] = deck[rand];\n\t\t\tdeck[rand] = temp;\n\t\t}\n\t\tcurrentPosition = 0;\n\t}", "public void shuffle() {\n\t\tfor (int i = deck.length - 1; i > 0; i--) {\n\t\t\tint rand = (int) (Math.random() * (i + 1));\n\t\t\tCard temp = deck[i];\n\t\t\tdeck[i] = deck[rand];\n\t\t\tdeck[rand] = temp;\n\t\t}\n\t\tcardsUsed = 0;\n\t}", "public void shuffle(){ \n \n Collections.shuffle(cardDeck);\n /*Random rand = new Random();\n for(int i = 0 ; i < 110 ; i++){\n int firstCard = rand.nextInt(110);\n int secondCard = rand.nextInt(110);\n Collections.swap(cardDeck,firstCard,secondCard);\n }*/\n }", "void shuffleDeck() {\n\t\tfor(int index = 0; index < this.getNumberOfCards(); index++) {\n\t\t\tint randomNumber = index + (int)(Math.random() * (this.getNumberOfCards() - index));\n\t\t\tCard temp = this.cardsInDeck[randomNumber];\n\t\t\tthis.cardsInDeck[randomNumber] = this.cardsInDeck[index];\n\t\t\tthis.cardsInDeck[index] = temp;\n\t\t}\n\t}", "public void shuffle() {\r\n for ( int i = deck.size()-1; i > 0; i-- ) {\r\n int rand = (int)(Math.random()*(i+1));\r\n SpoonsCard temp = deck.get(i);\r\n deck.set(i, deck.get(rand));\r\n deck.set(rand, temp);\r\n }\r\n cardsUsed = 0;\r\n }", "public int[] shuffle() {\n int[] res = new int[nums.length];\n int r;\n for (int i = 0; i < nums.length; i++) {\n r = random.nextInt(i + 1);\n res[i] = res[r];\n res[r] = nums[i];\n }\n\n\n return res;\n }", "public void shuffleDeck() {\n for (int i = 0; i < TOTAL_NUMBER_OF_CARDS - 1; i++) {\n Random r = new Random();\n int x = r.nextInt(TOTAL_NUMBER_OF_CARDS);\n Card y = deck.get(x);\n deck.set(x, deck.get(i));\n deck.set(i, y);\n }\n }", "public void shuffle() {\n\t\tRandom random = new Random();\n\t\tint dealtCards = this.dealtCards.get();\n\t\tfor (int i = dealtCards; i < Deck.DECK_SIZE; i++) {\n\t\t\t// Obtain random position for available cards.\n\t\t\tint randomNumber = dealtCards + random.nextInt((Deck.DECK_SIZE - dealtCards));\n Card tempCard = cards.get(i);\n // Swap cards position.\n cards.set(i, cards.get(randomNumber));\n cards.set(randomNumber, tempCard);\n }\n\t}", "ArrayList deepCopyShapeList(List aShapeList){\n ArrayList newList = new ArrayList();\r\n\r\n if (aShapeList.size() > 0) {\r\n Iterator iter = aShapeList.iterator();\r\n\r\n while (iter.hasNext())\r\n newList.add(((TShape)iter.next()).copy());\r\n }\r\n return\r\n newList;\r\n}", "@Override\n public <T> T[] shuffle(T[] elements) {\n return super.shuffle(elements);\n }", "public ArrayList<E> clone() {\n ArrayList<E> temp = new ArrayList<E>();\n temp.size = this.size;\n temp.capacity = this.capacity;\n temp.list = Arrays.copyOf(this.list, this.list.length);\n return temp;\n }", "public void shuffle() {\r\n\t\tCollections.shuffle(cards);\r\n\t}", "public Deck randomShuffle(){\n\t\tshuffleOnceRandom();\n\t\tshuffleOnceRandom();\n\t\treturn ourDeck;\n\t}", "public List<T> getCopyOfUnfilteredItemList(){\n synchronized (listsLock){\n if (originalList != null){\n return new ArrayList<T>(originalList);\n } else {\n // if original list is null filtered list is unfiltered\n return new ArrayList<T>(filteredList);\n }\n }\n }", "public void shuffle() {\n\n\tcardsLeft = cards.length;\n\tfor (int i=cards.length-1; i>=0; --i) {\n\n\t int r = (int)(Math.random()*(i+1)); // pick a random pos <= i\n\n\t Card t = cards[i];\n\t cards[i] = cards[r];\n\t cards[r] = t;\n\n\t}\n }", "public void shuffle() {\n\t\tCollections.shuffle(Shoe);\n\t}", "public ArrayList<PrizeCard> scramble() {\n java.util.Random rand1 = new java.util.Random();\n ArrayList<PrizeCard> scrambled = new ArrayList<PrizeCard>();\n scrambled = prizeCards;\n /* write your code here */\n\n\n\n for (int i = 0; i < 40; i++) {\n if (i % 10 == 0) {\n int rand = rand1.nextInt(39 / 10) * 10;\n PrizeCard temp = prizeCards.get(i);\n scrambled.set(i, prizeCards.get(rand));\n scrambled.set(rand, temp);\n } else if (i % 2 == 0) {\n int rand = rand1.nextInt(39 / 2) * 2;\n PrizeCard temp = prizeCards.get(i);\n scrambled.set(i, prizeCards.get(rand));\n scrambled.set(rand, temp);\n } else {\n int rand = (rand1.nextInt(38 / 2) * 2) + 1;\n PrizeCard temp = prizeCards.get(i);\n scrambled.set(i, prizeCards.get(rand));\n scrambled.set(rand, temp);\n }\n }\n\n return scrambled;\n }", "public void shuffle() {\n\t\tCollections.shuffle(cards);\n\t}", "public static void shuffle(Object[] a) {\r\n int N = a.length;\r\n for (int i = 0; i < N; i++) {\r\n int r = i + uniform(N-i); // between i and N-1\r\n Object temp = a[i];\r\n a[i] = a[r];\r\n a[r] = temp;\r\n }\r\n }", "public void shuffle()\n\t{\n\t\tCollections.shuffle(card);\n\t}", "public static void shuffle( Object[] a ) {\n int N = a.length;\n for ( int i = 0; i < N; i++ ) {\n int r = i + uniform( N - i ); // between i and N-1\n Object temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "public RandomListNode copyRandomList(RandomListNode head) {\n RandomListNode cur = head;\n while(cur!=null){\n RandomListNode copyhead = new RandomListNode(cur.label);\n copyhead.next = cur.next;\n cur.next = copyhead;\n cur = copyhead.next;\n }\n \n //copy pointer\n cur = head;\n while(cur != null){\n RandomListNode copynode = cur.next;\n if(cur.random != null){\n copynode.random = cur.random.next;\n }\n cur = copynode.next;\n }\n \n //decouple them\n cur = head;\n RandomListNode dummy = head == null? null:head.next;\n while(cur != null){\n RandomListNode temp = cur.next;\n cur.next = temp.next;\n if(temp.next!=null) temp.next = temp.next.next;\n cur = cur.next;\n }\n return dummy;\n }", "RandomnessSource copy();", "private void shuffleOrder() {\n\t\t// Simple shuffle: swap each piece with some other one\n\t\tfor (int i = 0; i < order.size(); i++) {\n\t\t\tint j = (int) (Math.random() * order.size());\n\t\t\tInteger pi = order.get(i);\n\t\t\torder.set(i, order.get(j));\n\t\t\torder.set(j, pi);\n\t\t}\n\t}", "public void shuffle()\n {\n Collections.shuffle(artefacts);\n }", "public static void shuffle( int[] a ) {\n int N = a.length;\n \n for ( int i = 0; i < N; i++ ) {\n int r = i + uniform( N - i ); // between i and N-1\n int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "public static <T> List<T> immutableList(T... elements){\n return Collections.unmodifiableList(Arrays.asList(elements.clone()));\n }", "private List<Pair<Tuple, String>> randomSampleFromList(List<Pair<Tuple, String>> list, int sampleSize, boolean withReplacement,\n\t\t\tRandom randomGenerator) {\n\t\tList<Pair<Tuple, String>> sample = new ArrayList<Pair<Tuple, String>>();\n\n\t\tif (list.size() <= sampleSize) {\n\t\t\tsample.addAll(list);\n\t\t} else {\n\t\t\tSet<Integer> usedIndexes = new HashSet<Integer>();\n\t\t\tint resultsCounter = 0;\n\t\t\twhile (resultsCounter < sampleSize) {\n\t\t\t\tint randomIndex = randomGenerator.nextInt(list.size());\n\t\t\t\tif (withReplacement || !usedIndexes.contains(randomIndex)) {\n\t\t\t\t\tsample.add(list.get(randomIndex));\n\t\t\t\t\tresultsCounter++;\n\t\t\t\t\tusedIndexes.add(randomIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn sample;\n\t}" ]
[ "0.6614739", "0.65660584", "0.6560417", "0.6535085", "0.6484433", "0.64775956", "0.6474545", "0.6473149", "0.64578164", "0.64476407", "0.64459914", "0.64101464", "0.6390531", "0.6373922", "0.6367781", "0.6363213", "0.63568753", "0.6345229", "0.63169885", "0.6294249", "0.62773854", "0.62655777", "0.62509245", "0.6249102", "0.6249102", "0.62203735", "0.620669", "0.6187015", "0.61852676", "0.6170285", "0.6166453", "0.6134455", "0.61199015", "0.6115195", "0.6112127", "0.6100497", "0.60678333", "0.6067117", "0.60649663", "0.6052888", "0.60463166", "0.6040987", "0.60150445", "0.60147095", "0.6010819", "0.5999733", "0.59934396", "0.59787166", "0.5959767", "0.595312", "0.59508836", "0.59497124", "0.5915492", "0.5894993", "0.58914465", "0.5874423", "0.5856539", "0.5842265", "0.58330333", "0.5830987", "0.58147734", "0.5809459", "0.58044356", "0.57942134", "0.578762", "0.5785074", "0.57636553", "0.5739935", "0.57361", "0.5721955", "0.57215804", "0.57016385", "0.5701509", "0.56972414", "0.5689503", "0.5684793", "0.56787974", "0.5673637", "0.56669337", "0.5662769", "0.5660327", "0.56587124", "0.565574", "0.56460744", "0.5642898", "0.56427133", "0.5641548", "0.56384987", "0.5622213", "0.5589925", "0.55810404", "0.55782753", "0.5567362", "0.55631715", "0.55623204", "0.55546427", "0.5552421", "0.5544306", "0.5539987", "0.5538118" ]
0.73229307
0
put the camera in a bad position
@Override public void simpleInitApp() { cam.setLocation(new Vector3f(-2.336393f, 11.91392f, -7.139601f)); cam.setRotation(new Quaternion(0.23602544f, 0.11321983f, -0.027698677f, 0.96473104f)); Material mat = new Material(assetManager,"Common/MatDefs/Light/Lighting.j3md"); mat.setFloat("Shininess", 15f); mat.setBoolean("UseMaterialColors", true); mat.setColor("Ambient", ColorRGBA.Yellow.mult(0.2f)); mat.setColor("Diffuse", ColorRGBA.Yellow.mult(0.2f)); mat.setColor("Specular", ColorRGBA.Yellow.mult(0.8f)); Material matSoil = new Material(assetManager,"Common/MatDefs/Light/Lighting.j3md"); matSoil.setFloat("Shininess", 15f); matSoil.setBoolean("UseMaterialColors", true); matSoil.setColor("Ambient", ColorRGBA.Gray); matSoil.setColor("Diffuse", ColorRGBA.Black); matSoil.setColor("Specular", ColorRGBA.Gray); Spatial teapot = assetManager.loadModel("Models/Teapot/Teapot.obj"); teapot.setLocalTranslation(0,0,10); teapot.setMaterial(mat); teapot.setShadowMode(ShadowMode.CastAndReceive); teapot.setLocalScale(10.0f); rootNode.attachChild(teapot); Geometry soil = new Geometry("soil", new Box(800, 10, 700)); soil.setLocalTranslation(0, -13, 550); soil.setMaterial(matSoil); soil.setShadowMode(ShadowMode.CastAndReceive); rootNode.attachChild(soil); DirectionalLight light=new DirectionalLight(); light.setDirection(new Vector3f(-1, -1, -1).normalizeLocal()); light.setColor(ColorRGBA.White.mult(1.5f)); rootNode.addLight(light); // load sky Spatial sky = SkyFactory.createSky(assetManager, "Textures/Sky/Bright/FullskiesBlueClear03.dds", SkyFactory.EnvMapType.CubeMap); sky.setCullHint(Spatial.CullHint.Never); rootNode.attachChild(sky); FilterPostProcessor fpp = new FilterPostProcessor(assetManager); int numSamples = getContext().getSettings().getSamples(); if (numSamples > 0) { fpp.setNumSamples(numSamples); } pf = new PosterizationFilter(); fpp.addFilter(pf); viewPort.addProcessor(fpp); initInputs(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void processCamera() {\n\t\tif (Mario.getX() > 300) {\n\t\t\tlevelCompound.move(-Mario.xVel, 0);\n\t\t\tPhysics.moveHitboxes(-Mario.xVel, 0);\n\t\t\tPhysics.moveEnemies(-Mario.xVel, 0);\n\t\t\tMario.setLocation(299, Mario.getY());\n\n\t\t\tlevelCompound.move(-3, 0);\n\t\t\tPhysics.moveHitboxes(-3, 0);\n\t\t\tPhysics.moveEnemies(-3, 0);\n\t\t}\n\t}", "private void changeCameraPosition() {\n yPosition = mPerspectiveCamera.position.y;\n if (isMovingUp) {\n yPosition += 0.1;\n if (yPosition > 20)\n isMovingUp = false;\n } else {\n yPosition -= 0.1;\n if (yPosition < 1)\n isMovingUp = true;\n }\n\n mPerspectiveCamera.position.set(xPosition, yPosition, zPosition);\n mPerspectiveCamera.update();\n }", "public void restoreCamera() {\r\n float mod=1f/10f;\r\n p.camera(width/2.0f, height/2.0f, cameraZ,\r\n width/2.0f, height/2.0f, 0, 0, 1, 0);\r\n p.frustum(-(width/2)*mod, (width/2)*mod,\r\n -(height/2)*mod, (height/2)*mod,\r\n cameraZ*mod, 10000);\r\n }", "@Override\n\tpublic void moveCamera() {\n\n\t}", "public void moveCam() {\n float x = this.cam_bind_x; //current pos the camera is binded to\n float y = this.cam_bind_y;\n\n //this amazing camera code is from: https://stackoverflow.com/questions/24047172/libgdx-camera-smooth-translation\n Vector3 target = new Vector3(x+MathUtils.cos(Global.m_angle)*20,y+MathUtils.sin(Global.m_angle)*20,0);\n final float speed = 0.1f, ispeed=1.0f-speed;\n\n Vector3 cameraPosition = cam.position;\n cameraPosition.scl(ispeed);\n target.scl(speed);\n cameraPosition.add(target);\n cam.position.set(cameraPosition);\n\n this.updateCam();\n\n }", "public static void setCameraFrame() {\n\t\tCAMERA.src = VERTICES[CAMERA.v];\n\t\tVector zc = CAMERA.src.d.scale(-1).normalized();\n\t\tCAMERA.zAxis = zc;\n\t\tVector xc = MathUtils.cross(CAMERA.src.d, new Vector(0, 1, 0)).normalized();\n\t\tCAMERA.xAxis = xc;\n\t\tVector yc = MathUtils.cross(zc, xc).normalized();\n\t\tCAMERA.yAxis = yc;\n\t\t\n\t\tSystem.out.println(\"***** just set camera: \" + CAMERA.toString());\n\t}", "private void updateCamera() {\n\t\tVector3f x = new Vector3f();\n\t\tVector3f y = new Vector3f();\n\t\tVector3f z = new Vector3f();\n\t\tVector3f temp = new Vector3f(this.mCenterOfProjection);\n\n\t\ttemp.sub(this.mLookAtPoint);\n\t\ttemp.normalize();\n\t\tz.set(temp);\n\n\t\ttemp.set(this.mUpVector);\n\t\ttemp.cross(temp, z);\n\t\ttemp.normalize();\n\t\tx.set(temp);\n\n\t\ty.cross(z, x);\n\n\t\tMatrix4f newMatrix = new Matrix4f();\n\t\tnewMatrix.setColumn(0, x.getX(), x.getY(), x.getZ(), 0);\n\t\tnewMatrix.setColumn(1, y.getX(), y.getY(), y.getZ(), 0);\n\t\tnewMatrix.setColumn(2, z.getX(), z.getY(), z.getZ(), 0);\n\t\tnewMatrix.setColumn(3, mCenterOfProjection.getX(),\n\t\t\t\tmCenterOfProjection.getY(), mCenterOfProjection.getZ(), 1);\n\t\ttry {\n\t\t\tnewMatrix.invert();\n\t\t\tthis.mCameraMatrix.set(newMatrix);\n\t\t} catch (SingularMatrixException exc) {\n\t\t\tLog.d(\"Camera\",\n\t\t\t\t\t\"SingularMatrixException on Matrix: \"\n\t\t\t\t\t\t\t+ newMatrix.toString());\n\t\t}\n\t}", "private void moveCamera(float tpf) {\n //Place the camera at the node\n this.getCamera().setLocation(cameraNode.getLocalTranslation().multLocal(1,0,1).add(0, 2, 0));\n cameraNode.lookAt(cam.getDirection().mult(999999), new Vector3f(0,1,0)); //Makes the gun point\n if (im.up) {\n cameraNode.move(getCamera().getDirection().mult(tpf).mult(10));\n }\n else if (im.down) {\n cameraNode.move(getCamera().getDirection().negate().mult(tpf).mult(10));\n }\n if (im.right) {\n cameraNode.move(getCamera().getLeft().negate().mult(tpf).mult(10));\n }\n else if (im.left) {\n cameraNode.move(getCamera().getLeft().mult(tpf).mult(10));\n }\n }", "public void resetRobotPositionOnUI() {\r\n\t\tthis.x = checkValidX(1);\r\n\t\tthis.y = checkValidY(1);\r\n\t\ttoggleValid();\r\n\t\trobotImage.setLocation(Constant.MARGINLEFT + (Constant.GRIDWIDTH * 3 - Constant.ROBOTWIDTH)/2 + (x-1) * Constant.GRIDWIDTH, Constant.MARGINTOP + (Constant.GRIDHEIGHT * 3 - Constant.ROBOTHEIGHT)/2 + (y-1) * Constant.GRIDHEIGHT);\r\n\t\t\r\n\t}", "private Camera() {\n viewport = new Rectangle();\n dirtyAreas = new ArrayList<Rectangle>();\n renderedAreas = new ArrayList<Rectangle>();\n fullUpdate = false;\n dirtyAreaCounter = 0;\n }", "private void moveCameraToPosWithinBoardBounds(float x, float y) {\n // the camera position is the center coordinate of the displayed area --> cam.viewport.../2\n cam.position.x = MathUtils.clamp(x,\n cam.viewportWidth/2 - (cam.viewportWidth/2)*(1-getZoomFactor()),\n cam.viewportWidth/2 + (cam.viewportWidth/2)*(1-getZoomFactor()));\n cam.position.y = MathUtils.clamp(cam.viewportHeight-y,\n cam.viewportHeight/2 - (cam.viewportHeight/2)*(1-getZoomFactor()),\n cam.viewportHeight/2 + (cam.viewportHeight/2)*(1-getZoomFactor()));\n cam.update();\n }", "public void cameraUpdate(float delta) {\n Vector3 vPosition = cam.position;\n\n // a + (b-a) * trail amount \n // target\n // a = the current cam position\n //b the current player posistion\n\n\n //determines which player the camera follows\n if (Gdx.input.isKeyJustPressed(Input.Keys.SPACE)) {\n nCurrentPlayer = nCurrentPlayer * -1;\n }\n if (nCurrentPlayer > 0) {\n vPosition.x = cam.position.x + (bplayer.getPosition().x * PPM - cam.position.x) * 0.1f;\n vPosition.y = cam.position.y + (bplayer.getPosition().y * PPM - cam.position.y) * 0.1f;\n } else {\n vPosition.x = cam.position.x + (bplayer2.getPosition().x * PPM - cam.position.x) * 0.1f;\n vPosition.y = cam.position.y + (bplayer2.getPosition().y * PPM - cam.position.y) * 0.1f;\n }\n cam.position.set(vPosition);\n cam.update();\n }", "@Override\n\tpublic void shiftCamera() {\n\t\t\n\t}", "public void checkCameraLimits()\n {\n //Daca camera ar vrea sa mearga prea in stanga sau prea in dreapta (Analog si pe verticala) ea e oprita (practic cand se intampla acest lucru Itemul asupra caruia se incearca centrarea nu mai e in centrul camerei )\n\n if(xOffset < 0 )\n xOffset = 0;\n else if( xOffset > refLinks.GetMap().getWidth()* Tile.TILE_WIDTH - refLinks.GetWidth())\n xOffset =refLinks.GetMap().getWidth()* Tile.TILE_WIDTH - refLinks.GetWidth();\n if(yOffset<0)\n yOffset = 0;\n if(yOffset > refLinks.GetMap().getHeight()*Tile.TILE_HEIGHT - refLinks.GetHeight())\n {\n yOffset = refLinks.GetMap().getHeight()*Tile.TILE_HEIGHT - refLinks.GetHeight();\n }\n }", "private void adjustCameraPosition() {\n if (upward) {\n\n if (tilt<90) {\n tilt ++;\n zoom-=0.01f;\n } else {\n upward=false;\n }\n\n } else {\n if (tilt>0) {\n tilt --;\n zoom+=0.01f;\n } else {\n upward=true;\n }\n }\n }", "private static void verifyViewPoint() {\n if (viewPoint.x < 0)\n viewPoint.x = 0;\n if (viewPoint.y < 0)\n viewPoint.y = 0;\n if (viewPoint.x > map.WIDTH - GAME_WIDTH * zoom)\n viewPoint.x = map.WIDTH - ((int) (GAME_WIDTH * zoom));\n if (viewPoint.y > map.HEIGHT - GAME_HEIGHT * zoom)\n viewPoint.y = map.HEIGHT - ((int) (GAME_HEIGHT * zoom));\n }", "public void move(Camera camera) {\n stormCloud.setPosition(0, camera.getPositionY() - 387 * 2);\n cloudRectangle.setPosition(stormCloud.getX(),stormCloud.getY());\n }", "public void setCameraPosition(Point position) {\n setCamera(position, getCamera().lookAt);\n }", "@Override\n\tpublic void pan(Vector2 delta) {\n\t\t// keep camera within borders\n\t\tfloat x = Utils.between(viewCamera.position.x + delta.x, bounds.min.x, bounds.max.x);\n\t\tfloat y = Utils.between(viewCamera.position.y + delta.y, bounds.min.y, bounds.max.y);\n\t\tviewCamera.position.set(x, y, 0);\n\t\tviewCamera.update();\n\t}", "void loopy() {\n if (position.y < -50) {\n position.y = Constants.height + 50;\n } else\n if (position.y > Constants.height + 50) {\n position.y = -50;\n }\n if (position.x< -50) {\n position.x = Constants.width +50;\n } else if (position.x > Constants.width + 50) {\n position.x = -50;\n }\n }", "private void fixView(final float newX, final float newY) {\n final float x = this.worldView.getX();\n final float y = this.worldView.getY();\n final float scale = this.worldView.getScale();\n final int width = this.worldView.getMasterImage().getWidth();\n final int height = this.worldView.getMasterImage().getHeight();\n\n float updatedX = Math.max(0, newX);\n float updatedY = Math.max(0, newY);\n\n\n if (width * scale + x > width) {\n updatedX = width - (width * scale);\n }\n if (height * scale + y > height) {\n updatedY = height - (height * scale);\n }\n\n this.worldView.setX(updatedX);\n this.worldView.setY(updatedY);\n\n }", "public void setCameraPos(CamPos in){\r\n\t\tresolveCamPos(in);\r\n\t\tpan_servo.setAngle(cur_pan_angle);\r\n\t\ttilt_servo.setAngle(cur_tilt_angle);\r\n\t\t\r\n\t\t\r\n\t}", "public void updateCamera() {\n\t}", "private void setCamera() {\n\t\tVector viewTranslation = controller.getCameraPosition();\n\n\t\tGL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);\n\t\tGL11.glMatrixMode(GL11.GL_PROJECTION);\n\t\tGL11.glLoadIdentity();\n\n\t\tfloat whRatio = (float) windowWidth / (float) windowHeight;\n\t\tGLU.gluPerspective(controller.getFOV(), whRatio, 1, 100000);\n\t\tGLU.gluLookAt((float) viewTranslation.x, (float) viewTranslation.y,\n\t\t\t\t(float) controller.getCameraDistance(), (float) viewTranslation.x,\n\t\t\t\t(float) viewTranslation.y, 0, 0, 1, 0);\n\n\t\tGL11.glMatrixMode(GL11.GL_MODELVIEW);\n\t\tGL11.glLoadIdentity();\n\t}", "public void centerCameraOn(GameObject thing) {\r\n\t\tthis.cameraX = (int)(thing.getX() - Game.WIDTH / 2);\r\n\t\tthis.cameraY = (int) (thing.getY() - Game.HEIGHT / 2);\r\n\t}", "public void reset() {\n\t\tmCenterOfProjection = new Vector3f(0, 0, 15);\n\t\tmLookAtPoint = new Vector3f(0, 0, 0);\n\t\tmUpVector = new Vector3f(0, 1, 0);\n\t\tmCameraMatrix = new Matrix4f();\n\t\tthis.update();\n\t}", "private void moveCameraWithinBoardBounds(float deltaX, float deltaY) {\n // zoom factor is incorporated to make (absolute) camera movement slower when zoomed in\n // so it's always the same visual velocity\n float newX = cam.position.x - deltaX*getZoomFactor();\n float newY = cam.position.y + deltaY*getZoomFactor();\n moveCameraToPosWithinBoardBounds(newX, cam.viewportHeight-newY);\n }", "public Camera() {\n\t\treset();\n\t}", "@Override\n\tpublic void pan(Vector3 delta) {\n\t\t// keep camera within borders\n\t\tfloat x = Utils.between(viewCamera.position.x + delta.x, bounds.min.x, bounds.max.x);\n\t\tfloat y = Utils.between(viewCamera.position.y + delta.y, bounds.min.y, bounds.max.y);\n\t\tfloat z = Utils.between(viewCamera.position.z + delta.z, bounds.min.z, bounds.max.z);\n\t\tviewCamera.position.set(x, y, z);\n\t\tviewCamera.update();\n\t}", "@Override\n public void setCameraRelativeFrame(Rect frame) {\n mPhotoView.setCameraRelativeFrame(frame);\n }", "public void caminar(){\n if(this.robot.getOrden() == true){\n System.out.println(\"Ya tengo la orden, caminare a la cocina para empezar a prepararla.\");\n this.robot.asignarEstadoActual(this.robot.getEstadoCaminar());\n }\n }", "private void setCameraView() {\n double bottomBoundary = mUserPosition.getLatitude() - .1;\n double leftBoundary = mUserPosition.getLongitude() - .1;\n double topBoundary = mUserPosition.getLatitude() + .1;\n double rightBoundary = mUserPosition.getLongitude() + .1;\n\n mMapBoundary = new LatLngBounds(\n new LatLng(bottomBoundary, leftBoundary),\n new LatLng(topBoundary, rightBoundary)\n );\n\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngBounds(mMapBoundary, 500,500,1));\n }", "public static void camDebug(Camera camera) {\n\t}", "public void swim() {\r\n\t\tif(super.getPosition()[0] == Ocean.getInstance().getWidth()-71){\r\n\t\t\tinvX = true;\r\n\t\t} else if(super.getPosition()[0] == 0){\r\n\t\t\tinvX = false;\r\n\t\t}\r\n\t\tif(super.getPosition()[1] == Ocean.getInstance().getDepth()-71){\r\n\t\t\tinvY = true;\r\n\t\t} else if(super.getPosition()[1] == 0){\r\n\t\t\tinvY = false;\r\n\t\t}\r\n\t\tif(invX){\r\n\t\t\tsuper.getPosition()[0]-=1;\r\n\t\t} else {\r\n\t\t\tsuper.getPosition()[0]+=1;\r\n\t\t}\r\n\t\tif(invY){\r\n\t\t\tsuper.getPosition()[1]-=1;\r\n\t\t} else {\r\n\t\t\tsuper.getPosition()[1]+=1;\r\n\t\t}\r\n\t}", "public void resetPose() {\n }", "private void resetRayo() {\n rayo.setX(getWidth() / 2 - 10);\n rayo.setY(getHeight() - player.getHeight() - 50);\n }", "private void handleScreenBoundaries() {\n\t\tif (tiledMapHelper.getCamera().position.x < screenWidth / 2) {\n\t\t\ttiledMapHelper.getCamera().position.x = screenWidth / 2;\n\t\t}\n\t\tif (tiledMapHelper.getCamera().position.x >= tiledMapHelper.getWidth()\n\t\t\t\t- screenWidth / 2) {\n\t\t\ttiledMapHelper.getCamera().position.x = tiledMapHelper.getWidth()\n\t\t\t\t\t- screenWidth / 2;\n\t\t}\n\n\t\tif (tiledMapHelper.getCamera().position.y < screenHeight / 2) {\n\t\t\ttiledMapHelper.getCamera().position.y = screenHeight / 2;\n\t\t}\n\t\tif (tiledMapHelper.getCamera().position.y >= tiledMapHelper.getHeight()\n\t\t\t\t- screenHeight / 2) {\n\t\t\ttiledMapHelper.getCamera().position.y = tiledMapHelper.getHeight()\n\t\t\t\t\t- screenHeight / 2;\n\t\t}\n\t}", "public PinholeCamera(Point cameraPosition, Vec towardsVec, Vec upVec, double distanceToPlain) {\n\t\tthis.cameraPosition = cameraPosition;\n\n\t\tthis.upVec = upVec.normalize();\n\t\tthis.rightVec = towardsVec.normalize().cross(upVec).normalize();\n\n\t\tthis.distanceToPlain = distanceToPlain;\n\t\tthis.plainCenterPoint = cameraPosition.add(towardsVec.normalize().mult(distanceToPlain));\n\t}", "private void setCamera(GL2 gl, GLU glu)\n {\n Boundary bc = simulation.getBoundary();\n int w = (int) (bc.getMaxSize(0)-bc.getMinSize(0));\n int h = (int) (bc.getMaxSize(1)-bc.getMinSize(1));\n\n gl.glViewport(0, 0, w, h);\n\n\n gl.glMatrixMode(GL2.GL_PROJECTION);\n gl.glLoadIdentity();\n //opening angle, ratio of height and width, near and far\n glu.gluPerspective(80.0, 1,0.1,3*( bc.getMaxSize(2)-bc.getMinSize(2)));\n\n gl.glTranslatef(0.5f*(float) bc.getMinSize(0),-0.5f*(float) bc.getMinSize(1),1.5f*(float) bc.getMinSize(2));\n // gl.glTranslatef(0.5f*(float) (bc.getMaxSize(0)+bc.getMinSize(0)),0.5f*(float)(bc.getMaxSize(1)+ bc.getMinSize(1)),(float) -(bc.getMaxSize(2)-bc.getMinSize(2)));\n\n }", "public void updateCam()\r\n {\n \ttry{\r\n \tSystem.out.println();\r\n \tNIVision.IMAQdxGrab(curCam, frame, 1);\r\n \tif(curCam == camCenter){\r\n \t\tNIVision.imaqDrawLineOnImage(frame, frame, NIVision.DrawMode.DRAW_VALUE, new Point(320, 0), new Point(320, 480), 120);\r\n \t}\r\n server.setImage(frame);}\n \tcatch(Exception e){}\r\n }", "@Override\n public void onCameraMoveStarted(int reason) {}", "private void setTheScene()\n {\n board.setLocalRotation(Quaternion.IDENTITY);\n board.rotate(-FastMath.HALF_PI, -FastMath.HALF_PI, 0);\n board.setLocalTranslation(0, 0, -3);\n\n cam.setLocation(new Vector3f(0, 0, 10));\n cam.lookAt(Vector3f.ZERO, Vector3f.UNIT_Y);\n }", "private void configureCamera() {\n float fHeight = cam.getFrustumTop() - cam.getFrustumBottom();\n float fWidth = cam.getFrustumRight() - cam.getFrustumLeft();\n float fAspect = fWidth / fHeight;\n float yDegrees = 45f;\n float near = 0.02f;\n float far = 20f;\n cam.setFrustumPerspective(yDegrees, fAspect, near, far);\n\n flyCam.setMoveSpeed(5f);\n\n cam.setLocation(new Vector3f(2f, 4.7f, 0.4f));\n cam.setRotation(new Quaternion(0.348f, -0.64f, 0.4f, 0.556f));\n }", "public void startCamera()\n {\n startCamera(null);\n }", "public void stopMoving()\n {\n mouthPosition = 0;\n }", "public void moveToLastAcceptableLocation(){\n\t\tthis.x=this.xTemp;\n\t\tthis.y=this.yTemp;\n\t}", "public void correctPosition(Rectangle bounds) {\n\t\tif(!enabled())\n\t\t\treturn;\n\t\t\n\t\tbounds = Maths.wider(bounds, 20);\n\t\t\n\t\tif(!bounds.contains(renderX, track.getY())) {\n\t\t\trenderX = track.getX();\n\t\t}\n\t\tif(!bounds.contains(track.getX(), renderY)) {\n\t\t\trenderY = track.getY();\n\t\t}\n\t}", "@Override\n public void setCamera (GL2 gl, GLU glu, GLUT glut) {\n glu.gluLookAt(0, 0, 2.5, // from position\n 0, 0, 0, // to position\n 0, 1, 0); // up direction\n }", "private void myMoveCamera(CameraPosition cameraPosition, final CallbackContext callbackContext) {\n CameraUpdate cameraUpdate = CameraUpdateFactory.newCameraPosition(cameraPosition);\n this.myMoveCamera(cameraUpdate, callbackContext);\n }", "public void paint(){\n\t\tif(this.x+GameScreen.backCam<900 && this.x+GameScreen.backCam>-60){\n\t\t\tGraphicsHandler.drawImage(texture,this.x+GameScreen.backCam,this.y+GameScreen.yCam,size,size);\n\t\t}\n\t}", "public void syncPositionSilent() {\n MathUtil.setVector(this.syncAbsPos, this.liveAbsPos);\n this.syncYaw = this.liveYaw;\n this.syncPitch = this.livePitch;\n this.syncVel = this.liveVel;\n }", "public void strafeLeft(){\r\n\t\t//Following the camera:\r\n\t\tif(loc[1] > 1)\r\n\t\t{\r\n\t\t\tthis.loc[0] -= Math.sin(Math.toRadians(heading))*distance; \r\n\t\t\tthis.loc[2] -= Math.cos(Math.toRadians(heading))*distance;\r\n\t\t}\r\n\t}", "public void boom() {\n\t\tboom.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = boom;\n\t}", "public void originalSpace() {\n\t\tpos.x = 65;\n\t\tpos.y = p.height/2 + 100;\n\t\t\n\t}", "public void performOptimalPlacement(CameraPlacementProblem problem)\n {\n \tint i, j, index = 0, maxTiles = 0;\n \t//ArrayList<Camera> cameraList = new ArrayList<Camera>();\n\n \t//Iterate through all optimal amera placements, and select\n \t//the best one (Highest covered tiles)\n \tfor (i = 0; i < optimalDir.size(); i++)\n \t{\n \t\tif (optimalDir.get(i)[1] > maxTiles && isValid(optimalDir.get(i)[2], optimalDir.get(i)[3]))\n \t\t{\n \t\t\tmaxTiles = optimalDir.get(i)[1];\n \t\t\tindex = i;\n \t\t}\n \t}\n\n \tCamera camera = new Camera(new Pointd(optimalDir.get(index)[2], optimalDir.get(index)[3]), optimalDir.get(index)[0]);\n\n \t//System.out.println(\"Removing: [ \" + optimalDir.get(index)[0] + \" \" + optimalDir.get(index)[1] + \" \" + optimalDir.get(index)[2] + \" \" + optimalDir.get(index)[3] + \" ]\");\n\n \t//Now remove camera from optimalDir (because currently in cameraList)\n \t//optimalDir.remove(index);\n\n \tcameraList.add(camera);\n }", "@Override\n public void onDrawFrame(GL10 gl10) {\n glClear(GL_COLOR_BUFFER_BIT);\n\n Location drawCameraLocation;\n\n //Don't draw until camera location is known\n if (mCurrentCameraLocation == null && mNewCameraLocation == null) {\n //Log.d(LOG_TAG, \"onDraw 1\");\n return;\n } else if (mCurrentCameraLocation == null && mNewCameraLocation != null) {\n //Log.d(LOG_TAG, \"onDraw 2\");\n mCurrentCameraLocation = mNewCameraLocation;\n drawCameraLocation = mCurrentCameraLocation;\n } else if (mCurrentCameraLocation != null && mNewCameraLocation != null && mTargetCameraLocation == null) {\n //Log.d(LOG_TAG, \"onDraw 3\");\n\n float distance = mNewCameraLocation.distanceTo(mCurrentCameraLocation);\n\n ///Increment step to target location when new camera location\n // is greater than 1.5 meters from current location\n if (distance > 1.5f) {\n mTargetCameraLocation = mNewCameraLocation;\n }\n\n drawCameraLocation = mCurrentCameraLocation;\n }\n\n //Provide increment location (if necessary) for smooth changes in camera positions\n else if (mCurrentCameraLocation != null && mTargetCameraLocation != null) {\n //Log.d(LOG_TAG, \"onDraw 4\");\n float cameraDistance = mCurrentCameraLocation.distanceTo(mTargetCameraLocation);\n\n\n float x = (float) mCameraStep / TOTALCAMERASTEPS;\n //float y = (float)Math.pow(x,3)*(x*(6*x-15)+10);\n //float y = (float)Math.pow(x,2)*(3-2*x); //smoothstep\n float y = x;\n\n float incDistance = y * cameraDistance;\n float bearing = mCurrentCameraLocation.bearingTo(mTargetCameraLocation);\n\n bearing = (bearing + 360) % 360;\n\n drawCameraLocation = calculateDestinationLocation(mCurrentCameraLocation, bearing, incDistance);\n drawCameraLocation.setAccuracy(mTargetCameraLocation.getAccuracy());\n\n mCameraStep++;\n\n if (mCameraStep == TOTALCAMERASTEPS) {\n //mCurrentCameraLocation = mTargetCameraLocation;\n mCurrentCameraLocation = drawCameraLocation;\n mTargetCameraLocation = null;\n mCameraStep = 0;\n }\n } else {//Never should come to this\n Log.d(LOG_TAG, \"onDraw 5\");\n\n drawCameraLocation = mCurrentCameraLocation;\n }\n\n /*\n setLookAtM(viewMatrix, 0, viewValues[0], viewValues[1], viewValues[2]\n , viewValues[3], viewValues[4], viewValues[5]\n , viewValues[6], viewValues[7], viewValues[8]);\n */\n\n multiplyMM(viewMatrix, 0, rotationMatrix, 0, modelSensorMatrix, 0);\n // Multiply the view and projection matrices together.\n multiplyMM(viewProjectionMatrix, 0, projectionMatrix, 0, viewMatrix, 0);\n\n\n //Process each image texture with drawCameraLocation\n for (ImageTexture it : mImageTextures) {\n\n\n if (it == null) {\n return;\n }\n\n double ItAngle;\n double distance = drawCameraLocation.distanceTo(it.mLocation);\n\n\n\n /*\n if (distance > (drawCameraLocation.getAccuracy() /0.68f))\n {\n ItAngle = (drawCameraLocation.bearingTo(it.mLocation) + 360) % 360;\n it.rotateAroundCamera((float) ItAngle );\n\n Log.d(LOG_TAG, \"onDrawFrame: distance = \" + distance + \" > \" + (drawCameraLocation.getAccuracy() /0.68f) + \", ItAngle = \" +ItAngle );\n }\n //Within accuracy radius\n else {\n distance = 4;\n }\n\n */\n\n ItAngle = (drawCameraLocation.bearingTo(it.mLocation) + 360) % 360;\n\n\n if (distance != 0 || ItAngle != 0.0f) {\n it.rotateAroundCamera((float) ItAngle);\n it.moveFromToCamera((float) -distance * 0.79f);\n }\n\n\n Log.d(LOG_TAG, \"onDrawFrame: distance = \" + distance + \" > \" + (drawCameraLocation.getAccuracy() / 0.68f) + \", ItAngle = \" + ItAngle);\n Log.d(LOG_TAG, \"onDrawFrame: drawCameraLocation = \" + drawCameraLocation.getLatitude() + \", \" + drawCameraLocation.getLongitude()\n + \" \" + it.mLocation.getLatitude() + \", \" + it.mLocation.getLongitude());\n\n\n String debugStr = \"Camera: \" + String.format(\"%5.6f\", drawCameraLocation.getLatitude()) + \", \" + String.format(\"%5.6f\", drawCameraLocation.getLongitude())\n + \"\\nAccuracy: \" + String.format(\"%5.7f\", drawCameraLocation.getAccuracy()) + \", Z: \" + String.format(\"%3.1f\", mAzimuth)\n //+ \"\\nImage: \" + String.format(\"%5.7f\",it.mLocation.getLatitude()) + \", \" + String.format(\"%5.7f\",it.mLocation.getLongitude())\n + \"\\nDistance: \" + String.format(\"%5.5f\", distance) + \", ItAngle: \" + String.format(\"%3.7f\", it.mCameraRotationAngle);\n\n\n float[] modelMatrix = it.calculateModelMatrix();\n multiplyMM(modelViewProjectionMatrix, 0, viewProjectionMatrix, 0, modelMatrix, 0);\n mTextureShaderProgram.useProgram();\n mTextureShaderProgram.setUniforms(modelViewProjectionMatrix, it.mTextureId, it.opacity);//every object sets its own mvpMatrix, texture, and alpha values\n it.bindData(mTextureShaderProgram);\n it.draw();\n }\n }", "public void movbolitas() {\n x += vx;\n y += vy;\n if (x > width || x < 0) {\n vx *= -1;\n }\n if (y > height || y < 0) {\n vy *= -1;\n }\n }", "public void setPosition(Point position){\r\n this.position.set(position.x, position.y);\r\n\r\n this.shadow.setPosition(position);\r\n this.surface.setPosition(position);\r\n this.shading.setPosition(position);\r\n\r\n\r\n this.setBounds(new Rect(\r\n this.position.x - this.radius,\r\n this.position.y - this.radius,\r\n this.position.x + this.radius,\r\n this.position.y + this.radius\r\n ));\r\n \r\n }", "public void setCameraPosition(float x, float y, float z) {\n\t\tthis.x=x;\n\t\tthis.y=y;\n\t\tthis.z=z;\n\t}", "@Override\r\n\tpublic void reset() {\n\t\tposition.set(0, 0);\r\n\t\talive = false;\r\n\t}", "protected void warp() {\n\t\tRandom r = new Random();\n\t\t\n\t\t// Get random index from coordinates list\n\t\tint nextPos = r.nextInt(this.coords.length);\n\t\t\n\t\t// Set new position for monster\n\t\tthis.setBounds(this.coords[nextPos].width, this.coords[nextPos].height, mWidth, mHeight);\n\t\t\n\t\tthis.setVisible(true);\n\t}", "@Override\r\n public void act() \r\n {\n int posx = this.getX();\r\n int posy = this.getY();\r\n //calculamos las nuevas coordenadas\r\n int nuevox = posx + incx;\r\n int nuevoy = posy + incy;\r\n \r\n //accedemos al mundo para conocer su tamaño\r\n World mundo = this.getWorld();\r\n if(nuevox > mundo.getWidth())//rebota lado derecho\r\n {\r\n incx = -incx;\r\n }\r\n if(nuevoy > mundo.getHeight())//rebota en la parte de abajo\r\n {\r\n incy = -incy;\r\n }\r\n \r\n if(nuevoy < 0)//rebota arriba\r\n {\r\n incy = -incy;\r\n }\r\n if(nuevox < 0)//rebota izquierda\r\n {\r\n incx = -incx;\r\n }\r\n //cambiamos de posicion a la pelota\r\n this.setLocation(nuevox,nuevoy);\r\n }", "public void toggleCamera() {\n\t\tif (map != null && map.getCameraPosition().zoom != MBDefinition.DEFAULT_ZOOM && carLatLng!=null) {\n\t\t\tmap.moveCamera(CameraUpdateFactory.newLatLngZoom(carLatLng, MBDefinition.DEFAULT_ZOOM));\n\t\t} else if (map != null && carMarker != null && pickupMarker != null) {\n\t\t\tLatLngBounds.Builder builder = new LatLngBounds.Builder();\n\n\t\t\tbuilder.include(carMarker.getPosition());\n\t\t\tbuilder.include(pickupMarker.getPosition());\n\n\t\t\tLatLngBounds bounds = builder.build();\n\n\t\t\tint padding = 150; // offset from edges of the map in pixels\n\t\t\tCameraUpdate cu = CameraUpdateFactory.newLatLngBounds(bounds, padding);\n\t\t\tmap.moveCamera(cu);\n\t\t}\n\t}", "public void setCamera(Camera camera) {\r\n\t\tthis.camera = camera;\r\n\t}", "private void move() {\n\t\t\tx += Math.PI/12;\n\t\t\thead.locY = intensity * Math.cos(x) + centerY;\n\t\t\thead.yaw = spinYaw(head.yaw, 3f);\n\t\t\t\t\t\n\t\t\tPacketHandler.teleportFakeEntity(player, head.getId(), \n\t\t\t\tnew Location(player.getWorld(), head.locX, head.locY, head.locZ, head.yaw, 0));\n\t\t}", "Rover(){\n\t\tthis.id = 0;\n\t\tthis.x = 0;\n\t\tthis.y = 0;\n\t\tthis.orientation = Directions.NORTH;\n\t\tthis.mapW=this.defaultMapW;\n\t\tthis.mapH=this.defaultMapH;\n\t}", "public abstract void makeSafeZone(float renderHeight);", "public void setupCamera() {\r\n p.camera(width/2.0f, height/2.0f, cameraZ,\r\n width/2.0f, height/2.0f, 0, 0, 1, 0);\r\n\r\n if(isTiling) {\r\n float mod=1f/10f;\r\n p.frustum(width*((float)tileX/(float)tileNum-.5f)*mod,\r\n width*((tileX+1)/(float)tileNum-.5f)*mod,\r\n height*((float)tileY/(float)tileNum-.5f)*mod,\r\n height*((tileY+1)/(float)tileNum-.5f)*mod,\r\n cameraZ*mod, 10000);\r\n }\r\n\r\n }", "void cameraError(Exception error);", "@Override\n public void onCameraChange(CameraPosition arg0) {\n center = map.getCameraPosition().target;\n Log.v(\"Center\", \"lattitude=\" + center.latitude + \" &longitude=\" + center.longitude);\n map.clear();\n }", "public void moveViewTo(int newX, int newY) {\n int scaledWidth = (int) (TileDataRegister.TILE_WIDTH * scale);\n int scaledHeight = (int) (TileDataRegister.TILE_HEIGHT * scale);\n int baseX = (int) (map.getWidth() * TileDataRegister.TILE_WIDTH * scale) / 2;\n\n int x = baseX + (newY - newX) * scaledWidth / 2;\n x -= viewPortWidth * 0.5;\n\n int y = (newY + newX) * scaledHeight / 2;\n y -= viewPortHeight * 0.5;\n\n targetXOffset = -1 * x;\n targetYOffset = -1 * y;\n\n doPan = true;\n\n gameChanged = true;\n }", "public void configureCamera(){\n try{\n camera = Camera.open(findBackFacingCamera());\n } catch (Exception e){}\n\n if(camera != null) {\n cameraView = new CameraView(this.getApplicationContext(), camera);\n FrameLayout camera_view = (FrameLayout)findViewById(R.id.CameraView);\n camera_view.addView(cameraView);\n }\n }", "public void setCamPos(Point camPos) {\n this.camPos = new Point(\n Constants.WINDOW_SIZE.getX() / 2 - camPos.getX(),\n Constants.WINDOW_SIZE.getY() / 2 - camPos.getY()\n ).multiply(-1);\n }", "public void setCamera(Point position, Point lookAt) {\n setValueInTransaction(PROP_CAMERA, new Camera(position, lookAt));\n }", "@Override\n\tpublic void pan(float x, float y, float z) {\n\t\t// keep camera within borders\n\t\tx = Utils.between(viewCamera.position.x + x, bounds.min.x, bounds.max.x);\n\t\ty = Utils.between(viewCamera.position.y + y, bounds.min.y, bounds.max.y);\n\t\tz = Utils.between(viewCamera.position.z + z, bounds.min.z, bounds.max.z);\n\t\tviewCamera.position.set(x, y, z);\n\t\tviewCamera.update();\n\t}", "public void offsetCamera(Location offset){\n //updateCoordinateToScreenPosition();\n xCameraOffset = offset.getX();\n yCameraOffset = offset.getY();\n }", "void cameraSetup();", "private void setOrigin() {\n Hep3Vector origin = VecOp.mult(CoordinateTransformations.getMatrix(), _sensor.getGeometry().getPosition());\n // transform to p-side\n Polygon3D psidePlane = this.getPsidePlane();\n Translation3D transformToPside = new Translation3D(VecOp.mult(-1 * psidePlane.getDistance(),\n psidePlane.getNormal()));\n this._org = transformToPside.translated(origin);\n }", "public void setCamera(Camera camera) {\n mCamera = camera;\n }", "private void setupCamera(GL gl) {\r\n\t\tgl.glMatrixMode(GL.GL_MODELVIEW);\r\n\t\t// If there's a rotation to make, do it before everything else\r\n\t\tgl.glLoadIdentity();\r\n if (rotationMatrix == null) {\r\n\t\t\trotationMatrix = new double[16];\r\n\t\t\tgl.glGetDoublev(GL.GL_MODELVIEW, rotationMatrix, 0);\r\n\t\t}\r\n\t\tif (nextRotationAxis != null) {\r\n\t\t\tgl.glRotated(nextRotationAngle, nextRotationAxis.x, nextRotationAxis.y, nextRotationAxis.z);\r\n\t\t\tnextRotationAngle = 0;\r\n\t\t\tnextRotationAxis = null;\r\n\t\t}\r\n\t\tgl.glMultMatrixd(rotationMatrix, 0);\r\n\t\tgl.glGetDoublev(GL.GL_MODELVIEW, rotationMatrix, 0);\r\n\t\t// Move the objects according to the camera (instead of moving the camera)\r\n\t\tif (zoom != 0) {\r\n\t\t\tdouble[] oldMatrix = new double[16];\r\n\t\t\tgl.glGetDoublev(GL.GL_MODELVIEW, oldMatrix, 0);\r\n\t\t\tgl.glLoadIdentity();\r\n\t\t\tgl.glTranslated(0, 0, zoom);\r\n\t\t\tgl.glMultMatrixd(oldMatrix, 0);\r\n\t\t}\r\n\t}", "private void escape(){\n\t\tBall result = Calculations.probe(this, (int)Math.max(GameField.HEIGHT, GameField.WIDTH), RADIUS, quadrant);\n\t\t//if result ball is null, no valid position was found in the current quadrant\n\t\t//probe again, this time accepting any valid position within the game field, this should never happen\n\t\tif(result == null)\n\t\t\tresult = Calculations.probe(this, (int)Math.max(GameField.HEIGHT, GameField.WIDTH), \n\t\t\t\t\tRADIUS, new Rectangle2D.Double(0, 0, GameField.WIDTH, GameField.HEIGHT));\n\t\tif(result == null)\n\t\t\treturn;\n\t\tsetCenterX(result.getCenterPoint().getX());\n\t\tsetCenterY(result.getCenterPoint().getY());\n\t}", "@Override\n protected void flamemove ()\n {\n \n }", "static void setViewPointRelevantTo(Point point) {\n point.translate(-1 * viewPoint.x, -1 * viewPoint.y);\n point.x /= Map.zoom;\n point.y /= Map.zoom;\n point.translate(viewPoint.x, viewPoint.y);\n viewPoint.setLocation(point.x - GAME_WIDTH / 2, point.y - GAME_HEIGHT / 2);\n verifyViewPoint();\n }", "protected void stopAndViewToPast()\n {\n if(!widgg.common.bFreeze){ \n widgg.common.bFreeze = true;\n //now ixDataShow remain unchanged.\n } else {\n int ixdDataSpread = ixDataShowRight - ixDataShown[pixelOrg.xPixelCurve * 5/10];\n //int ixDataShowRight1 = ixDataShown[nrofValuesShow * 7/8];\n //int ixdDataSpread = ixDataShowRight - ixDataShowRight1;\n ixDataShowRight -= ixdDataSpread;\n if((ixDataShowRight - widgg.ixDataWr) < 0 && (widgg.ixDataWr - ixDataShowRight) < ixdDataSpread) {\n //left end reached.\n ixDataShowRight = widgg.ixDataWr + ixdDataSpread;\n }\n }\n widgg.redraw(100, 200);\n //System.out.println(\"left-bottom\");\n \n }", "private void fall(){\n \n if(getYFromCamera() > -20 && getYFromCamera() < 20){\n getWorld().setCameraLocation(getGlobalX(),getGlobalY() + vSpeed);\n }\n World w = getWorld();\n Level currentLevel = (Level)(w);\n currentLevel.checkHeight(getGlobalY());\n setGlobalLocation(getGlobalX(), getGlobalY() + vSpeed);\n vSpeed = vSpeed + acceleration;\n changeJumping(true);\n }", "public void mueveBala() {\n switch (direccion) {\n case NORTE:\n posY -= velocidadBala;\n break;\n case SUR:\n posY += velocidadBala;\n break;\n case ESTE:\n posX += velocidadBala;\n break;\n case OESTE:\n posX -= velocidadBala;\n break;\n }\n actualizaHitbox();\n }", "public void bomb() {\n\t\tbomb.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = bomb;\n\t}", "@Override\r\n\tpublic void surfaceCreated(SurfaceHolder holder) {\n\t\tinitialCamera();\r\n\t}", "public void resetPaddleToStartingPosition(){\n myRectangle.setX(initialXLocation);\n }", "protected void updateCameraPosition() {\n if (!mIsMapStatic && mMap != null && mMapConfiguration != null && mIsMapLoaded) {\n updateCameraPosition(mMapConfiguration.getCameraPosition());\n }\n }", "public void pre() {\r\n if(!isTiling) return;\r\n if(firstFrame) firstFrame=false;\r\n else if(secondFrame) {\r\n secondFrame=false;\r\n tileInc();\r\n }\r\n setupCamera();\r\n }", "public void resetPosition()\n {\n resetPosition(false);\n }", "void setPos(Vec3 pos);", "void setPosition(Vector3f position);", "public void moveRobber(HexLocation loc) {\n\n\t}", "public void keepObjectInsideGameWindow(Vector2f position) {\n if(keepInsideWindow) {\n if(position.x > Game.WIDTH) {\n position.x = 0.0f;\n } else if(position.x < 0.0f) {\n position.x = Game.WIDTH;\n }\n if(position.y > Game.HEIGHT) {\n position.y = 0.0f;\n } else if(position.y < 0.0f) {\n position.y = Game.HEIGHT;\n }\n }\n }", "public void putFrame()\n {\n if (currImage != null)\n {\n super.putFrame(currImage, faceRects, new Scalar(0, 255, 0), 0);\n }\n }", "public void setCamera(Camera camera) {\r\n\t\tsynchronized(camera) {\r\n\t\t\tthis.camera = camera;\r\n\t\t}\r\n\t}", "public void resetPosition() {\n\t\tposition = new double[3];\n\t\tgyroOffset = 0;\n\t}", "private void setCamera(GL gl_, GLU glu) {\n \tGL2 gl2 = gl_.getGL2();\r\n gl2.glMatrixMode(GL2.GL_PROJECTION);\r\n gl2.glLoadIdentity();\r\n\r\n // Perspective.\r\n float widthHeightRatio = (float) getWidth() / (float) getHeight();\r\n glu.gluPerspective(45, widthHeightRatio, 1 , 4000 );\r\n glu.gluLookAt(camPosition.getEyeX(), camPosition.getCenterY(), camPosition.getCameraDist(),\r\n \t\tcamPosition.getCenterX(), \r\n \t\tcamPosition.getCenterY(), \r\n \t\t0, \r\n \t\t\t0, 1, 0);\r\n\r\n // Change back to model view matrix.\r\n gl2.glMatrixMode(GL2.GL_MODELVIEW);\r\n gl2.glLoadIdentity();\r\n }", "public void checkPosition(){\n int absPos = mArm.getSensorCollection().getPulseWidthPosition();\n // mArm.configSelectedFeedbackSensor(FeedbackDevice.QuadEncoder);\n mArm.setSelectedSensorPosition(absPos - offset);\n }" ]
[ "0.64793706", "0.6385879", "0.6347316", "0.62918246", "0.6221743", "0.61876774", "0.60630864", "0.6046585", "0.60401756", "0.6009652", "0.5973151", "0.59573406", "0.59368616", "0.5922237", "0.59194547", "0.58759755", "0.5875408", "0.5855984", "0.58511096", "0.5827562", "0.5812793", "0.5786474", "0.57833314", "0.57441974", "0.5741534", "0.57370037", "0.5715729", "0.569628", "0.5666047", "0.5581598", "0.5580008", "0.5568883", "0.55587065", "0.5537875", "0.55320466", "0.55318356", "0.5529955", "0.5517333", "0.551327", "0.55088764", "0.5502817", "0.5499511", "0.5494277", "0.5490838", "0.54883444", "0.5473254", "0.5460658", "0.5455219", "0.5453928", "0.5439164", "0.5435464", "0.5431425", "0.5427027", "0.5421644", "0.5416645", "0.54086804", "0.54078454", "0.5386535", "0.5383918", "0.53819567", "0.5373274", "0.5370179", "0.53583467", "0.5342405", "0.5340934", "0.5332499", "0.53305733", "0.5328006", "0.53190976", "0.5318707", "0.53084296", "0.5302909", "0.52996075", "0.5284549", "0.52806085", "0.5279581", "0.5274937", "0.5263223", "0.5259831", "0.52593046", "0.5255535", "0.52532804", "0.52522415", "0.5250323", "0.5245206", "0.5244823", "0.5242883", "0.523773", "0.52360964", "0.5234013", "0.52339107", "0.5233051", "0.5228124", "0.522709", "0.5219409", "0.52180696", "0.5216802", "0.5214551", "0.52138615", "0.52134967", "0.521303" ]
0.0
-1
Scans the contents of the ZIP archive and populates the combo box.
public void scanZipFile() { new SwingWorker<Void, String>() { protected Void doInBackground() throws Exception { ZipInputStream zin = new ZipInputStream(new FileInputStream( zipname)); ZipEntry entry; while ((entry = zin.getNextEntry()) != null) { publish(entry.getName()); zin.closeEntry(); } zin.close(); return null; } protected void process(List<String> names) { for (String name : names) fileCombo.addItem(name); } }.execute(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void loadZipFile(final String name) {\r\n\t\tfileCombo.setEnabled(false);\r\n\t\tfileText.setText(\"\");\r\n\t\tnew SwingWorker<Void, Void>() {\r\n\t\t\tprotected Void doInBackground() throws Exception {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tZipInputStream zin = new ZipInputStream(\r\n\t\t\t\t\t\t\tnew FileInputStream(zipname));\r\n\t\t\t\t\tZipEntry entry;\r\n\r\n\t\t\t\t\t// find entry with matching name in archive\r\n\t\t\t\t\twhile ((entry = zin.getNextEntry()) != null) {\r\n\t\t\t\t\t\tif (entry.getName().equals(name)) {\r\n\t\t\t\t\t\t\t// read entry into text area\r\n\t\t\t\t\t\t\tScanner in = new Scanner(zin);\r\n\t\t\t\t\t\t\twhile (in.hasNextLine()) {\r\n\t\t\t\t\t\t\t\tfileText.append(in.nextLine());\r\n\t\t\t\t\t\t\t\tfileText.append(\"\\n\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tzin.closeEntry();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tzin.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\tprotected void done() {\r\n\t\t\t\tfileCombo.setEnabled(true);\r\n\t\t\t}\r\n\t\t}.execute();\r\n\t}", "public FileSelectionFrame() throws ZipException, IOException {\n initComponents();\n new FileSelectionFrame().setVisible(true);\n\n\n }", "public String searchByZipUI() {\n console.promptForPrintPrompt(\" +++++++++++++++++++++++++++++++++++++\");\n console.promptForPrintPrompt(\" + PLEASE ENTER ZIPCODE TO SEARCH BY +\");\n console.promptForPrintPrompt(\" +++++++++++++++++++++++++++++++++++++\");\n console.promptForString(\"\");\n String zip = console.promptForString(\" ZIPCODE: \");\n return zip;\n }", "private void initComboBox() {\n\t\tsynchronized (realTimeComboModel.files) {\n\t\t\trealTimeComboModel.files.clear();\n\t\t\t\n\t\t\tSet<TopComponent> comps = TopComponent.getRegistry().getOpened();\n\t\t\tfor (TopComponent tc : comps) {\n\t\t\t\tNode[] arr = tc.getActivatedNodes();\n\t\t\t\tif (arr != null) {\n\t\t\t\t\tfor (int j = 0; j < arr.length; j++) {\n\t\t\t\t\t\tDataObject dataObject = (DataObject) arr[j].getCookie(DataObject.class);\n\t\t\t\t\t\tFile file = new File(dataObject.getPrimaryFile().getPath());\n\t\t\t\t\t\tif (file.exists() && file.isFile()/* && !temp.contains(file.getName())*/) {\n\t\t\t\t\t\t\trealTimeComboModel.files.add(file);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tcomboBox.setRenderer(new RealTimeComboRenderer()); // if no this line, combobox will show nothing after refeshing with few files\n\t}", "public void getFileChooser(){\r\n \r\n FileNameExtensionFilter txtfilter = new FileNameExtensionFilter(\"*.txt\", \"txt\");\r\n //FileNameExtensionFilter pngfilter = new FileNameExtensionFilter(\"*.png\", \"png\");\r\n FileNameExtensionFilter zipfilter = new FileNameExtensionFilter(\"*.zip\", \"zip\");\r\n \r\n final JFileChooser fc = new JFileChooser();\r\n fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\r\n fc.setAcceptAllFileFilterUsed(false);\r\n fc.setDialogTitle(\"Choose directory [USQ_DATA] or File\");\r\n //filter txt and png\r\n //fc.setFileFilter(pngfilter);\r\n fc.setFileFilter(txtfilter);\r\n fc.setFileFilter(zipfilter);\r\n \r\n try{\r\n fc.setCurrentDirectory(new File(workplace));\r\n }catch(Exception e) {\r\n FileSystemView fsv = FileSystemView.getFileSystemView();\r\n wppath = fsv.getDefaultDirectory();\r\n File rd = new File(wppath.getAbsolutePath() + \"/USQ_Reporter.txt\");\r\n rd.delete();\r\n try {\r\n setDir();\r\n } catch (FileNotFoundException ex) {\r\n JOptionPane.showMessageDialog(null, \"file not found.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n } catch (IOException ex) {\r\n JOptionPane.showMessageDialog(null, \"IOException when get file.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }\r\n int returnVal = fc.showOpenDialog(this);\r\n if(returnVal == JFileChooser.APPROVE_OPTION) {\r\n File file = fc.getSelectedFile();\r\n //if txt from zip, dont copy to old\r\n fromzip = false;\r\n if(!file.exists()) {\r\n JOptionPane.showMessageDialog(null, \"file doesn't exist.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n } else if(file.isDirectory()) {\r\n File files[] = file.listFiles();\r\n File old = new File(workplace + \"/old\");\r\n //create old folder\r\n if(!old.exists())old.mkdir();\r\n if(old.exists()&&old.isFile())old.mkdir();\r\n for(int i=0 ; i<files.length ; i++) {\r\n if(files[i].isFile()) {\r\n readFile(files[i]);\r\n if(files[i].getName().equals(\"USQRecorders.txt\"))\r\n createSes(files[i]);\r\n }\r\n }\r\n //delete read in dir\r\n for(int i=0 ; i<files.length ; i++){\r\n boolean b =files[i].delete();\r\n System.out.println(files[i].getAbsolutePath() + \" \" + b);\r\n }\r\n file.delete(); \r\n } else if (file.isFile()) {\r\n File old = new File(workplace + \"/old\");\r\n //create old folder\r\n if(old.exists()&&old.isFile())old.mkdir();\r\n if(!old.exists())old.mkdir();\r\n if(file.getName().endsWith(\".zip\")){fromzip=true;}else{fromzip=false;}\r\n readFile(file);\r\n if(file.getName().equals(\"USQRecorders.txt\"))\r\n createSes(file);\r\n }\r\n \r\n //delete read in file\r\n file.delete();\r\n }\r\n }", "private static void populateZipcodeList() {\n\t\t// only load the data once...\n\t\tif (ZipCodes.zipCodesList.size() > 0) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tList<String> headers = null;\n\t\tList<String> values = null;\n\t\tString line = null;\n\t\t\n\t\t// create handle the source data file\n\t\tInputStream stream = ZipCodes.class.getResourceAsStream(\"zipCodes.csv\");\n\t\tBufferedReader buffer = new BufferedReader(new InputStreamReader(stream));\n\n try {\n\t\t\t// pull header row\n \theaders = Arrays.asList(buffer.readLine().split(\",\"));\n \t\n \t// add data rows\n \twhile((line = buffer.readLine()) != null) {\n \t\n \t\tHashMap<String, String> zip = new HashMap<String, String>();\n \t\tvalues = Arrays.asList(line.split(\",\"));\n \t\tfor (int i = 0; i < headers.size(); i++) {\n \t\t\tzip.put(headers.get(i), values.get(i));\n \t\t}\n \t\tZipCodes.zipCodesList.add(zip);\n\t\t\t}\n\t\t\tstream.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "private void ComboBoxLoader (){\n try {\n if (obslistCBOCategory.size()!=0)\n obslistCBOCategory.clear();\n /*add the records from the database to the ComboBox*/\n rset = connection.createStatement().executeQuery(\"SELECT * FROM category\");\n while (rset.next()) {\n String row =\"\";\n for(int i=1;i<=rset.getMetaData().getColumnCount();i++){\n row += rset.getObject(i) + \" \";\n }\n obslistCBOCategory.add(row); //add string to the observable list\n }\n\n cboCategory.setItems(obslistCBOCategory); //add observable list into the combo box\n //text alignment to center\n cboCategory.setButtonCell(new ListCell<String>() {\n @Override\n public void updateItem(String item, boolean empty) {\n super.updateItem(item, empty);\n if (item != null) {\n setText(item);\n setAlignment(Pos.CENTER);\n Insets old = getPadding();\n setPadding(new Insets(old.getTop(), 0, old.getBottom(), 0));\n }\n }\n });\n\n //listener to the chosen list in the combo box and displays it to the text fields\n cboCategory.getSelectionModel().selectedItemProperty().addListener((obs, oldValue, newValue)->{\n if(newValue!=null){\n Scanner textDisplay = new Scanner((String) newValue);\n txtCategoryNo.setText(textDisplay.next());\n txtCategoryName.setText(textDisplay.nextLine());}\n\n });\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n }", "private void initComboBox() {\n jComboBox1.removeAllItems();\n listaDeInstrutores = instrutorDao.recuperarInstrutor();\n listaDeInstrutores.forEach((ex) -> {\n jComboBox1.addItem(ex.getNome());\n });\n }", "public void run() {\n try {\n handleZipFiles(file);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public void ImportNaimoZipFileByUser(){\n File mPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);\n final Manager_FileDialog managerFileDialog = new Manager_FileDialog(this, mPath, \".zip\");\n managerFileDialog.addFileListener(new Manager_FileDialog.FileSelectedListener() {\n public void fileSelected(File file) {\n managerFileDialog.removeFileListener(this);\n //ImportNaimoZipFile(file.getPath());\n new ImportNaimoZipFile(WordListActivity.this,file.getPath()).execute();\n }\n });\n managerFileDialog.showDialog();\n }", "public static void main(String[] args) {\n File directoryPath = new File(\"C:\\\\Users\\\\jarek\\\\Downloads\");\n //List of all files and directories\n String[] contents = directoryPath.list();\n\n Pattern p= Pattern.compile(\"zip$\");\n Matcher m;\n Vector<String> lis = new Vector<>();\n for(int i = 0; i< Objects.requireNonNull(contents).length; i++){\n m=p.matcher(contents[i]);\n if(m.find()) lis.addElement(contents[i]);\n }\n System.out.println(\"List of files and directories in the specified directory:\");\n for (String content : contents) {\n System.out.println(content);\n }\n }", "@Override\n public void start(Stage primaryStage) {\n final List<String> items = Arrays.asList(new String[] {\n // Strings of file names.\n });\n\n final ComboBox<String> comboBox = new ComboBox<>(\n FXCollections.observableArrayList(items));\n\n primaryStage.setTitle(\"File Selector\");\n\n comboBox.setEditable(true);\n\n comboBox.valueProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue ov, String t, String t1) {\n address = t1;\n }\n });\n\n button.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent e) {\n if (comboBox.getValue() != null &&\n !comboBox.getValue().toString().isEmpty()){\n notification.setText(\"File selected: \" + comboBox.getValue());\n comboBox.setValue(null);\n }\n else {\n notification.setText(\"You have not selected a file!\");\n }\n }\n });\n\n comboBox.getEditor().textProperty()\n .addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observable,\n String oldValue, String newValue) {\n final TextField editor = comboBox.getEditor();\n final String selected = comboBox.getSelectionModel()\n .getSelectedItem();\n if (selected == null || !selected.equals(editor.getText())) {\n filterItems(newValue, comboBox, items);\n comboBox.show();\n if (comboBox.getItems().size() == 1) {\n final String onlyOption = comboBox.getItems().get(0);\n final String current = editor.getText();\n if (onlyOption.length() > current.length()) {\n editor.setText(onlyOption);\n // This only works using Platform.runLater(...)\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n editor.selectRange(current.length(), onlyOption.length());\n }\n });\n }\n }\n }\n }\n });\n/**************************************************************************************\n * The commented-out code is an attempt to revert to the full list on a selection being made.\n * It seems to make this work we need to delay the processing until after the default handlers have been invoked;\n * hence the Platform.runLater(...).\n * May not be desirable from a usability standpoint anyway.\n * Scrolling is affected with this enabled; if you type and then use the arrow keys for selection, it will not\n * scroll to the selected item on the first press of the arrow keys.\n\n// comboBox.setOnAction(new EventHandler<ActionEvent>() {\n// @Override\n// public void handle(ActionEvent event) {\n// // Reset so all options are available:\n// Platform.runLater(new Runnable() {\n// @Override\n// public void run() {\n// String selected = comboBox.getSelectionModel().getSelectedItem();\n// if (comboBox.getItems().size() < items.size()) {\n// comboBox.setItems(FXCollections.observableArrayList(items));\n// String newSelected = comboBox.getSelectionModel()\n// .getSelectedItem();\n// if (newSelected == null || !newSelected.equals(selected)) {\n// comboBox.getSelectionModel().select(selected);\n// }\n// }\n// }\n// });\n// }\n// });\n\n**************************************************************************************/\n\n GridPane grid = new GridPane();\n grid.setVgap(4);\n grid.setHgap(10);\n grid.add(comboBox, 1, 0);\n grid.add(button, 0, 3);\n grid.add (notification, 1, 3, 3, 1);\n\n primaryStage.setTitle(\"File Selector\");\n\n Scene scene = new Scene(new Group(), 450, 250);\n\n Group root = (Group)scene.getRoot();\n root.getChildren().add(grid);\n primaryStage.setScene(scene);\n primaryStage.show();\n }", "@SuppressWarnings(\"unchecked\")\n private void addComboBox() throws Exception{\n\n Connection con = Coagent.getConnection();\n PreparedStatement query = con.prepareStatement(\"SELECT Publisher_Name FROM publishers;\");\n ResultSet result = query.executeQuery();\n\n while(result.next()){\n jComboBoxAdd.addItem(result.getString(1));\n }\n }", "public void loadMeals(){\n //Create a service to load all the Meals / Recipes from the database in a background thread\n LoadAllRecipesService service = new LoadAllRecipesService();\n\n //When the service is successful set the returned Recipes / Meals to various comboBoxes\n service.setOnSucceeded(new EventHandler<WorkerStateEvent>() {\n @Override\n public void handle(WorkerStateEvent workerStateEvent) {\n recipesFromDatabase = service.getValue();\n comboMealSelection.setItems(recipesFromDatabase);\n //A test\n breakfastCombo.setItems(recipesFromDatabase);\n lunchCombo.setItems(recipesFromDatabase);\n dinnerCombo.setItems(recipesFromDatabase);\n }\n });\n\n\n if (service.getState() == Service.State.SUCCEEDED){\n service.reset();\n service.start();\n } else if (service.getState() == Service.State.READY){\n service.start();\n }\n }", "private void fillComboBox() {\n jComboBoxFilterChains.setModel(new DefaultComboBoxModel(ImageFilterManager.getObject().getListOfFilters().toArray()));\n }", "public ZipDatabase() throws IOException {\r\n int line = 0;\r\n InputStream is = this.getClass().getResourceAsStream(\"zip.txt\");\r\n BufferedReader br = new BufferedReader(new InputStreamReader(is));\r\n String input;\r\n // parses entries of the form:\r\n // 03064,NH,NASHUA\r\n try {\r\n while ((input = br.readLine()) != null) {\r\n line++;\r\n StringTokenizer st = new StringTokenizer(input, \",\");\r\n if (st.countTokens() == 3) {\r\n String zip = st.nextToken();\r\n String state = st.nextToken();\r\n String city = st.nextToken();\r\n city = fixupCase(city);\r\n zipDB.put(zip, new ZipInfo(zip, city, state));\r\n } else {\r\n throw new IOException(\"Bad zip format, line \" + line);\r\n }\r\n }\r\n } finally {\r\n br.close();\r\n }\r\n }", "@Override\n public void run() {\n txt_Nombre.setVisible(false);\n //ocultamos el boton Enviar\n btnaceptar.setVisible(false);\n //ocultamos boton Eliminar archivo\n btnEliminarArchivo.setVisible(false);\n //Ocultamos boton Seleccionar archivo\n btnselecionar.setVisible(false);\n //preparamos la salida de datos del Zip\n ZipOutputStream zout;\n //preparamos la salida de datos para el archivo\n BufferedOutputStream bos;\n try {\n //creamos el archivo y lo guardamos \n ruta=nombreZip+\".zip\";\n //creamos el flujo de salida hacia el archivo Zip\n bos = new BufferedOutputStream(new FileOutputStream(ruta));\n zout = new ZipOutputStream(bos);\n int i=0;\n //Hacemos visibles todos los componentes de las barras de progreso\n lblGeneral.setVisible(true);\n barraGeneral.setVisible(true);\n barra.setVisible(true);\n barra.setStringPainted(true);\n //ponemosd de color verde la barra\n barraGeneral.setForeground(Color.GREEN);\n //habilitamos el String del porcentaje\n barraGeneral.setStringPainted(true);\n //ponemos el valor Maximo de la barra\n barraGeneral.setMaximum((int)(pesoTotal/100));\n //ponemos el valor Minimo\n barraGeneral.setMinimum(0);\n //variable para el progreso de la barra General\n long leidoTotal=0;\n lbInfo.setHorizontalAlignment(JLabel.LEFT);\n for (String documento : documentos) {\n //creamos una nueva entrada/ducumento para el Zip\n ZipEntry ze = new ZipEntry(nombres.get(i));\n //agregamos la entrada al Zip\n zout.putNextEntry(ze);\n //obtenemos el archivo \n File arch=new File(documentos.get(i));\n //Indicamos cual archivo se esta comprimiendo\n lbInfo.setText(\"comprimiendo: \"+arch.getName());\n //obtenemos el tamaño del archivo\n long tamañoArch=arch.length();\n //ponemos el valor maximo de a la barra individual\n barra.setMaximum((int)(tamañoArch/100));\n //ponemos el valor minimo\n barra.setMinimum(0);\n //cambiamos el color de la barra\n barra.setForeground(Color.GREEN);\n barra.setValue(0);\n //creamos el Stream de entrada del archivo\n BufferedInputStream bis=new BufferedInputStream(new FileInputStream(documentos.get(i)));\n //tamaño de buffer para lectura del archivo\n byte[] info=new byte[4096];\n //variable para el progreso de la barra individual\n long leido=0;\n //Ciclo para lectura del archivo\n while(leido<tamañoArch)\n {\n //Verifica que se puedan leer otros 4KB \n if((leido+4096)<tamañoArch)\n {\n //leemos 4KB del Archivo\n bis.read(info);\n //agregamos los 4KB a las variables de progreso\n leido+=4096;\n leidoTotal+=4096;\n }\n else\n {\n //si no se puede leer 4KB lee el resto del archivo\n int resto=(int)(tamañoArch-leido);\n //damos el tamaño al arreglo\n info=new byte[resto];\n //leemos el resto del archivo\n bis.read(info);\n //agregamos el resto del a las variables de progreso\n leido+=resto;\n leidoTotal+=resto;\n }\n //escribimos en el archivo Zip\n zout.write(info);\n //ponemos el valor en la barra individual\n barra.setValue((int)(leido/100));\n //ponemos el valor en la barra general\n barraGeneral.setValue((int)(leidoTotal/100));\n }\n //cerramos la escritura a la entradadel Zip\n zout.closeEntry();\n //aumentamos el valor del contador\n i++;\n }\n //cerramos la escritura al archivo Zip\n zout.close();\n } catch (FileNotFoundException ex) {\n Logger.getLogger(EnviarArchivo.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(EnviarArchivo.class.getName()).log(Level.SEVERE, null, ex);\n } \n //verificamos que tipo de envio se selecciono\n if(rbtnSimultaneo.isSelected())\n {\n //orden para archivos simultaneos y envios individuales\n orden.enviarArchivoSimultaneo(ruta,ip);\n }\n else\n {\n //orden para envio Secuencial\n orden.envioArchivoSecuencial(ruta);\n }\n //llamamos el metodo cerrar para cerrar la ventana\n cerrar();\n }", "public void pullingUploadedDocuments() {\n new Thread(() -> {\n mySqlConn sql = new mySqlConn();\n List<Document> documents = sql.getAllDocuments();\n if (documents != null) {\n ObservableList<Document> list = FXCollections.observableArrayList(documents);\n combo_uploaded.setItems(list);\n }\n }).start();\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void loadFiles(){\n\n\t\t/* Remove all names from the combo boxes to begin with */\n\t\tpath1.removeAllItems();\n\t\tpath2.removeAllItems();\n\n\t\t/* List all files in the current working directory */\n\t\tFile file = new File(\"./\");\n\t\tFile[] configs =file.listFiles();\n\n\t\t/* For every file */\n\t\tfor (int i=0;i<configs.length;i++){\n\n\t\t\t/* Retrieve the name and if it ends with .con extension then add it\n\t\t\t * to the two combo boxes */\n\t\t\tString name = configs[i].getName();\n\t\t\tif((!(name.length()<4)) && name.substring(name.length()-4).equals(\".con\")){\n\t\t\t\tpath1.addItem(name.substring(0,name.length()-4));\n\t\t\t\tpath2.addItem(name.substring(0,name.length()-4));\n\t\t\t}\n\t\t}\n\t}", "public static void run() {\n try (Viewer viewer = new Viewer(TestFiles.SAMPLE_ZIP_WITH_FOLDERS)) {\n ViewInfo viewInfo = viewer.getViewInfo(ViewInfoOptions.forHtmlView());\n\n System.out.println(\"File type: \" + viewInfo.getFileType());\n System.out.println(\"Pages count: \" + viewInfo.getPages().size());\n System.out.println(\"Folders: \");\n System.out.println(\" - /\");\n\n String rootFolder = \"\";\n readFolders(viewer, rootFolder);\n }\n\n System.out.println(\"\\nView info retrieved successfully.\");\n }", "public static void readZip(String zipPath, boolean sort) throws IOException {\n // Load zip and its entries\n ZipFile zip = new ZipFile(new File(zipPath));\n Enumeration<? extends ZipEntry> entries = zip.entries();\n // Read every entry and load it to the HashMap\n while(entries.hasMoreElements()) {\n ZipEntry zipEntry = entries.nextElement();\n InputStream entryStream = zip.getInputStream(zipEntry);\n //Used only for the decoding mode\n //Compressed file that contains the Coded Data\n if(\"codedData.gz\".equals(zipEntry.getName())){\n FileInputStream in = new FileInputStream(\"codedData.gz\");\n GZIPInputStream gis = new GZIPInputStream(in);\n ObjectInputStream ois = new ObjectInputStream(gis);\n try {\n dataList = (ArrayList<CodedData>) (ois.readObject());\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(ProjectePractiques.class.getName()).log(Level.SEVERE, null, ex);\n }\n }else{\n BufferedImage image = ImageIO.read(entryStream);\n imageNames.add(zipEntry.getName()); \n imageDict.put(zipEntry.getName(), image);\n }\n }\n zip.close();\n // Sort the image names list\n if(sort){\n Collections.sort(imageNames, (String f1, String f2) -> f1.compareTo(f2)); \n }\n }", "private void setupComboBox(){\n\n //enhanced for loop populates book comboBox with books\n for(Book currentBook : books){ //iterates through books array\n bookCB.addItem(currentBook.getTitle()); //adds book titles to comboBox\n }\n\n //enhanced for loop populates audio comboBox with audio materials\n for(AudioVisualMaterial currentAudio : audio){ //iterates through audio array\n audioCB.addItem(currentAudio.getAuthor()); //adds audio authors to comboBox\n }\n\n //enhanced for loop populates video comboBox with video materials\n for(AudioVisualMaterial currentVideo : video){ //iterates through video array\n videoCB.addItem(currentVideo.getTitle()); //adds video titles to comboBox\n }\n }", "public void initialize() {\n fillCombobox();\n }", "public mLoadCustomers() {\n initComponents();\n setLocationRelativeTo(null);\n this.getContentPane().setBackground(Color.blue);\n FileNameExtensionFilter filtro = new FileNameExtensionFilter(\".txt\",\"txt\");\n jFileChooser1.setFileFilter(filtro);\n jFileChooser1.setAcceptAllFileFilterUsed(false);\n }", "public void populateQualityCombo() {\n\n // Making a list of poster qualities\n List<KeyValuePair> qualityList = new ArrayList<KeyValuePair>() {{\n\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w92, \"Thumbnail\\t[ 92x138 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w154, \"Tiny\\t\\t\\t[ 154x231 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w185, \"Small\\t\\t[ 185x278 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w342, \"Medium\\t\\t[ 342x513 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w500, \"Large\\t\\t[ 500x750 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w780, \"xLarge\\t\\t[ 780x1170 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_original, \"xxLarge\\t\\t[ HD ]\"));\n }};\n\n // Converting the list to an observable list\n ObservableList<KeyValuePair> obList = FXCollections.observableList(qualityList);\n\n // Filling the ComboBox\n cbPosterQuality.setItems(obList);\n\n // Setting the default value for the ComboBox\n cbPosterQuality.getSelectionModel().select(preferences.getInt(\"mediaQuality\", 3));\n }", "private void buildCountryComboBox() {\n ResultSet rs = DatabaseConnection.performQuery(\n session.getConn(),\n Path.of(Constants.QUERY_SCRIPT_PATH_BASE + \"SelectCountryByID.sql\"),\n Collections.singletonList(Constants.WILDCARD)\n );\n\n ObservableList<Country> countries = FXCollections.observableArrayList();\n try {\n if (rs != null) {\n while (rs.next()) {\n int id = rs.getInt(\"Country_ID\");\n String name = rs.getString(\"Country\");\n countries.add(new Country(id, name));\n }\n }\n } catch (Exception e) {\n Common.handleException(e);\n }\n\n countryComboBox.setItems(countries);\n\n countryComboBox.setConverter(new StringConverter<>() {\n @Override\n public String toString(Country item) {\n return item.getCountryName();\n }\n\n @Override\n public Country fromString(String string) {\n return null;\n }\n });\n }", "private void readData() {\n try (BufferedReader br = new BufferedReader(new InputStreamReader(getClass().getClassLoader().getResourceAsStream(fileName)))) {\n String line;\n while ((line = br.readLine()) != null) {\n String[] parts = line.split(\",\");\n int zip = Integer.parseInt(parts[0]);\n String name = parts[1];\n\n zipMap.put(zip, name);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private boolean extractSettingsZip(File fSettingsZip, String destDir, int index)\n {\n boolean result = false;\n try\n {\n //m_logWriter.write(\"Unzipping to destination: \"+destDir+\"\\n\");\n //m_logWriter.flush();\n \tboolean backFavFile = false;\n \tFile dest = new File(destDir);\n \tif (dest.exists()) {\n \t\tString userPath = destDir + \"/userdata/\";\n \t\tFile userFile = new File(userPath);\n \t\tString favDir = userPath + Update.FavouriteFile;\n \t\tFile favFile = new File(favDir);\n \t\tif (userFile.exists() && favFile.exists()) {\n \t\t\tCopyFile(userPath, Update.FavouriteFile, Update.pathSD);\n \t\t\tbackFavFile = true;\n \t\t}\n \t\t\n \t\tDeleteDir(destDir);\n \t}\n \telse\n \t\tdest.mkdirs();\n \t\n publishProgress(PROGRESS_EXTRACT, (int)(0.5 * index));\n // open the zip\n ZipFile zip = new ZipFile(fSettingsZip);\n int count=0;\n int zipSize = zip.size();\n Enumeration<? extends ZipEntry> entries = zip.entries();\n //while(entries.hasMoreElements())\n while (true)\n {\n if (isCancelled()) {\n \tresult = false;\n \tm_ErrorCode = 4;\n break;\n }\n\n if (m_DownloadStop)\n \tcontinue;\n \n if (!entries.hasMoreElements())\n \tbreak;\n \n // todo: update progress\n ZipEntry ze = (ZipEntry)entries.nextElement();\n count++;\n String entryName = ze.getName();\n String destFullpath = destDir+\"/\"+entryName;\n //m_logWriter.write(\"Extracting: \"+destFullpath+\"\\n\");\n File fDestPath = new File(destFullpath);\n if (ze.isDirectory())\n {\n fDestPath.mkdirs();\n publishProgress(PROGRESS_EXTRACT, (int)(0.5 * (index + count*100/zipSize)));\n continue;\n }\n fDestPath.getParentFile().mkdirs();\n\n // write file\n try {\n InputStream is = zip.getInputStream(ze);\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(destFullpath));\n int n=0;\n byte buf[] = new byte[4096];\n while((n = is.read(buf, 0, 4096)) > -1)\n {\n bos.write(buf, 0, n);\n }\n // close\n is.close();\n bos.close();\n } catch(IOException ioe) {\n \tm_ErrorCode = 5;\n //m_logWriter.write(\"Could not write, error: \"+ioe.toString());\n }\n\n // update progress\n //publishProgress(PROGRESS_EXTRACT, (count*100/zipSize));\n }\n\n // close zip and bail\n zip.close();\n //m_logWriter.write(\"Successfully extracted: \"+fSettingsZip.getName()+\"\\n\");\n //m_logWriter.flush();\n if (backFavFile) {\n \t\tString userPath = destDir + \"/userdata/\";\n \t\tFile userFile = new File(userPath);\n \t\tif (!userFile.exists())\n \t\t\tuserFile.mkdirs();\n \t\t\n \t\tFile inputFile = new File(Update.pathSD + Update.FavouriteFile);\n \t\tif (inputFile.exists())\n \t\t\tCopyFile(Update.pathSD, Update.FavouriteFile, userPath);\n }\n \n result = !isCancelled();\n }\n catch(Exception e)\n {\n //Log.e(\"SettingsDownloader\", \"Error: \"+e.toString());\n result = false;\n m_ErrorCode = 6;\n }\n\n return result;\n }", "@FXML\n void loadComboBoxLocationValues() {\n ArrayList<Location> locations = LocationDAO.LocationSEL(-1);\n comboBoxLocation.getItems().clear();\n if (!locations.isEmpty())\n for (Location location : locations) {\n comboBoxLocation.getItems().addAll(location.getLocationID());\n }\n }", "private void initCombobox() {\n comboConstructeur = new ComboBox<>();\n comboConstructeur.setLayoutX(100);\n comboConstructeur.setLayoutY(250);\n\n\n BDDManager2 bddManager2 = new BDDManager2();\n bddManager2.start(\"jdbc:mysql://localhost:3306/concession?characterEncoding=utf8\", \"root\", \"\");\n listeConstructeur = bddManager2.select(\"SELECT * FROM constructeur;\");\n bddManager2.stop();\n for (int i = 0; i < listeConstructeur.size(); i++) {\n comboConstructeur.getItems().addAll(listeConstructeur.get(i).get(1));\n\n\n }\n\n\n\n\n\n\n }", "public void readZip(File f) {\r\n try {\r\n unzip(f);\r\n File file = new File(workplace + \"/temp/USQ_IMAGE\");\r\n File old = new File(workplace + \"/old\");\r\n if(!old.exists())old.mkdir();\r\n if(old.exists()&&old.isFile())old.mkdir();\r\n File files[] = file.listFiles();\r\n for(int i=0 ; i<files.length ; i++){\r\n readFile(files[i]);\r\n }\r\n //new session\r\n createSes(f);\r\n } catch (Exception ex) {\r\n JOptionPane.showMessageDialog(null, \"read zip file failed.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n ex.printStackTrace();\r\n }\r\n }", "public void fillCompBox() {\n\t\tcomboBoxName.removeAllItems();\n\t\tint counter = 0;\n\t\tif (results.getResults() != null) {\n\t\t\tList<String> scenarios = new ArrayList<String>(results.getResults().keySet());\n\t\t\tCollections.sort(scenarios);\n\t\t\tfor (String s : scenarios) {\n\t\t\t\tcomboBoxName.insertItemAt(s, counter);\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t}", "private void fillComboBox() {\n List<String> times = this.resultSimulation.getTimes();\n this.timesComboBox.getItems().addAll(times);\n this.timesComboBox.getSelectionModel().select(0);\n }", "@Override\r\n\tprotected void InitComboBox() {\n\t\t\r\n\t}", "public void searchAreaZIP(Connection connection, int zip) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE zip = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setZip(zip);\n pStmt.setInt(1, getZip());\n\n try {\n\n System.out.printf(\" Hotels in %d:\\n\", getZip());\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }", "public void setComboBoxValues() {\n String sql = \"select iName from item where iActive=? order by iName asc\";\n \n cbo_iniName.removeAllItems();\n try {\n pst = conn.prepareStatement(sql);\n pst.setString(1,\"Yes\");\n rs = pst.executeQuery();\n \n while (rs.next()) {\n cbo_iniName.addItem(rs.getString(1));\n }\n \n }catch(Exception e) {\n JOptionPane.showMessageDialog(null,\"Item list cannot be loaded\");\n }finally {\n try{\n rs.close();\n pst.close();\n \n }catch(Exception e) {}\n }\n }", "public void getData()\n\t{\n\t\tif (jobEntry.getName() != null) wName.setText( jobEntry.getName() );\n\t\twName.selectAll();\n\t\tif (jobEntry.getZipFilename()!= null) wZipFilename.setText( jobEntry.getZipFilename() );\n\t\tif (jobEntry.getWildcardSource()!= null) wWildcardSource.setText( jobEntry.getWildcardSource() );\n\n\t\tif (jobEntry.getWildcard()!= null) wWildcard.setText( jobEntry.getWildcard() );\n\t\tif (jobEntry.getWildcardExclude()!= null) wWildcardExclude.setText( jobEntry.getWildcardExclude() );\n\t\tif (jobEntry.getSourceDirectory()!= null) wTargetDirectory.setText( jobEntry.getSourceDirectory() );\n\t\tif (jobEntry.getMoveToDirectory()!= null) wMovetoDirectory.setText( jobEntry.getMoveToDirectory() );\n\n\t\tif (jobEntry.afterunzip>=0)\n\t\t{\n\t\t\twAfterUnZip.select(jobEntry.afterunzip );\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\twAfterUnZip.select(0 ); // NOTHING\n\t\t}\n\t\t\n\t\twAddFileToResult.setSelection(jobEntry.isAddFileToResult());\n\t\twArgsPrevious.setSelection(jobEntry.getDatafromprevious());\n\t\twAddDate.setSelection(jobEntry.isDateInFilename());\n\t\twAddTime.setSelection(jobEntry.isTimeInFilename());\n\t\t\n\t\tif (jobEntry.getDateTimeFormat()!= null) wDateTimeFormat.setText( jobEntry.getDateTimeFormat() );\n\t\twSpecifyFormat.setSelection(jobEntry.isSpecifyFormat());\n\t\t\n\t\twRootZip.setSelection(jobEntry.isCreateRootFolder());\n\t\twCreateFolder.setSelection(jobEntry.isCreateFolder());\n\t\t\n \tif (jobEntry.getLimit()!= null) \n\t\t\twNrErrorsLessThan.setText( jobEntry.getLimit());\n\t\telse\n\t\t\twNrErrorsLessThan.setText(\"10\");\n \t\n\t\tif(jobEntry.getSuccessCondition()!=null)\n\t\t{\n\t\t\tif(jobEntry.getSuccessCondition().equals(jobEntry.SUCCESS_IF_AT_LEAST_X_FILES_UN_ZIPPED))\n\t\t\t\twSuccessCondition.select(1);\n\t\t\telse if(jobEntry.getSuccessCondition().equals(jobEntry.SUCCESS_IF_ERRORS_LESS))\n\t\t\t\twSuccessCondition.select(2);\n\t\t\telse\n\t\t\t\twSuccessCondition.select(0);\t\n\t\t}else wSuccessCondition.select(0);\n\t\t\n\t\twAddOriginalTimestamp.setSelection(jobEntry.isOriginalTimestamp());\n\t\twSetModificationDateToOriginal.setSelection(jobEntry.isOriginalModificationDate());\n\t\twIfFileExists.select(jobEntry.getIfFileExist());\n\t\twcreateMoveToDirectory.setSelection(jobEntry.isCreateMoveToDirectory());\n\t}", "private void downloadZippedDirectory(String selectedFolder) {\n if (selectedFolder != null) {\n File file = getFile(selectedFolder);\n StreamSource zipSource = getZipSource(file);\n getMainWindow().open(new VaadinFileDownloadResource(zipSource, selectedFolder+\".zip\", 0, getMainWindow().getApplication()), \"_self\");\n }\n }", "public void Listar()\n {\n File diretorio = new File(dir_arq_download);\n File[] arquivos = diretorio.listFiles();\n if(arquivos != null)\n {\n int length = arquivos.length;\n for(int i = 0; i < length; ++i)\n {\n File f = arquivos[i];\n if (f.isFile())\n {\n Arquivos.add(f.getName());\n }\n }\n\n ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>\n (this,android.R.layout.simple_dropdown_item_1line, Arquivos);\n SpnListarArquivos.setAdapter(arrayAdapter);\n }\n }", "private void init() {\r\n try {\r\n // extracts just sizes only.\r\n ZipFile zf = new ZipFile(jarFileName);\r\n Enumeration e = zf.entries();\r\n ZipEntry zentry = null;\r\n while (e.hasMoreElements()) {\r\n zentry = (ZipEntry) e.nextElement();\r\n if (debugOn) {\r\n System.out.println(dumpZipEntry(zentry));\r\n }\r\n htSizes.put(zentry.getName(), (int) zentry.getSize());\r\n }\r\n if (zf != null) {\r\n zf.close();\r\n }\r\n zf = null;\r\n e = null;\r\n zentry = null;\r\n // extract resources and put them into the hashtable.\r\n FileInputStream fis = new FileInputStream(jarFileName);\r\n BufferedInputStream bis = new BufferedInputStream(fis);\r\n ZipInputStream zis = new ZipInputStream(bis);\r\n ZipEntry ze = null;\r\n while ((ze = zis.getNextEntry()) != null) {\r\n if (ze.isDirectory()) {\r\n continue;\r\n }\r\n if (debugOn) {\r\n System.out.println(\"ze.getName()=\" + ze.getName() + \",\" + \"getSize()=\" + ze.getSize());\r\n }\r\n int size = (int) ze.getSize();\r\n // -1 means unknown size.\r\n if (size == -1) {\r\n size = ((Integer) htSizes.get(ze.getName())).intValue();\r\n }\r\n byte[] b = new byte[size];\r\n int rb = 0;\r\n int chunk = 0;\r\n while ((size - rb) > 0) {\r\n chunk = zis.read(b, rb, size - rb);\r\n if (chunk == -1) {\r\n break;\r\n }\r\n rb += chunk;\r\n }\r\n // add to internal resource hashtable\r\n htJarContents.put(ze.getName(), b);\r\n b = null;\r\n if (debugOn) {\r\n System.out.println(ze.getName() + \" rb=\" + rb + \",size=\" + size + \",csize=\"\r\n + ze.getCompressedSize());\r\n }\r\n }\r\n if (fis != null) {\r\n fis.close();\r\n }\r\n if (bis != null) {\r\n bis.close();\r\n }\r\n if (zis != null) {\r\n zis.close();\r\n }\r\n fis = null;\r\n bis = null;\r\n zis = null;\r\n ze = null;\r\n } catch (NullPointerException e) {\r\n System.out.println(\"done.\");\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void populateRegionFilterComboBox() {\n Collection<String> uniqueRegions = new TreeSet<>();\n for (ReceiverRecord record : records) {\n uniqueRegions.add(record.getRegion());\n }\n regionFilterComboBox.getItems().removeAll(regionFilterComboBox.getItems());\n regionFilterComboBox.getItems().add(regionString);\n regionFilterComboBox.getItems().addAll(uniqueRegions);\n regionFilterComboBox.getSelectionModel().select(0);\n }", "public void initIcons(){\n\t \troot_iconsFileNames = new ArrayList<String>();\n\t root_iconsBitmaps = new ArrayList<Bitmap>(); \n \t\ttry{\n \t\t\tResources res = this.getResources();\n \t\t\tInputStream iconInputStream = res.openRawResource(R.raw.icons);\n \t\t\tZipInputStream zipStream = new ZipInputStream(iconInputStream);\n \t\t ZipEntry entry;\n\n \t\t while ((entry = zipStream.getNextEntry()) != null) {\n \t\t \t//file name may start with MACOSX. This is strange, ignore it.\n \t\t \tString fileName = entry.getName();\n \t\t \tif(fileName.length() > 1){\n\t \t\t \tif(fileName.contains(\".png\") && !entry.isDirectory()){\n\t \t\t \t\tif(!fileName.contains(\"MACOSX\")){ //OSX adds junk sometimes, ignore it\n\t \t\t \t\t\tfileName = fileName.replace(\"icons/\",\"\");\n\t \t\t \t\t\tBitmap iconBitmap = BitmapFactory.decodeStream(zipStream); \n\t \t\t \t\t\troot_iconsFileNames.add(fileName);\n\t \t\t \t\t\troot_iconsBitmaps.add(iconBitmap);\n\t \t\t \t\t\t//Log.i(\"ZZ\", \"loading bitmaps: \" + fileName); \n\t \t\t \t\t}\n\t \t\t \t} //macosx\n\t \t\t } // fileName\n \t\t }//end while\n \t\t \n \t\t //clean up\n \t\t if(zipStream != null){\n \t\t \tzipStream.close();\n \t\t }\n \t\t \n \t\t}catch(Exception ex){\n \t\t\t Log.i(\"ZZ\", \"getZippedIcon: \" + ex.toString()); \n \t\t}\t \n\t }", "private void scanJarArchive() throws AnalyzerException {\n\t\tJarFile jarFile;\n\t\ttry {\n\t\t\tjarFile = new JarFile(archive);\n\t\t} catch (IOException ioe) {\n\t\t\tthrow new AnalyzerException(\"Cannot build jar file on archive '\"\n\t\t\t\t\t+ archive + \"'.\", ioe);\n\t\t}\n\t\tEnumeration<? extends ZipEntry> en = jarFile.entries();\n\t\twhile (en.hasMoreElements()) {\n\t\t\tZipEntry e = en.nextElement();\n\t\t\tString name = e.getName();\n\t\t\t// iterate through the jar file\n\t\t\tif (name.toLowerCase().endsWith(\".class\")) {\n\t\t\t\ttry {\n\t\t\t\t\tnew ClassReader(jarFile.getInputStream(e)).accept(\n\t\t\t\t\t\t\tscanVisitor, ClassReader.SKIP_CODE);\n\t\t\t\t} catch (Exception ioe) {\n\t\t\t\t\tthrow new AnalyzerException(\n\t\t\t\t\t\t\t\"Error while analyzing file entry '\" + name\n\t\t\t\t\t\t\t\t\t+ \"' in jar file '\" + archive + \"'\", ioe);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tjarFile.close();\n\t\t} catch (IOException ioe) {\n\t\t\tlogger.warn(\"Error while trying to close the file '\" + jarFile\n\t\t\t\t\t+ \"'\", ioe);\n\t\t}\n\n\t}", "private void loadCombos() throws Exception {\r\n\t\titemsBranchOffices = new ArrayList<SelectItem>();\r\n\t\titemsFarms = new ArrayList<SelectItem>();\r\n\t\tList<Farm> farmsCurrent = farmDao.farmsList();\r\n\t\tif (farmsCurrent != null) {\r\n\t\t\tfor (Farm farm : farmsCurrent) {\r\n\t\t\t\titemsFarms\r\n\t\t\t\t\t\t.add(new SelectItem(farm.getIdFarm(), farm.getName()));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws Exception {\r\n ZipDatabase zipDB = new ZipDatabase();\r\n\r\n BufferedReader br = \r\n new BufferedReader(new InputStreamReader(System.in));\r\n while (true) {\r\n System.out.print(\"Enter zip: \");\r\n String zip = br.readLine();\r\n System.out.println(\"Input: \" + zip);\r\n\r\n ZipInfo info = zipDB.lookup(zip);\r\n System.out.println(\"Output: \" + info);\r\n }\r\n }", "private void onUpdateSelected() {\r\n mUpdaterData.updateOrInstallAll_WithGUI(\r\n null /*selectedArchives*/,\r\n false /* includeObsoletes */,\r\n 0 /* flags */);\r\n }", "public void carregaCidadeSelecionada(String nome) throws SQLException{\n String sql = \"SELECT nome FROM tb_cidades where uf='\"+cbUfEditar.getSelectedItem()+\"'\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n ResultSet rs = preparador.executeQuery();\n //passando valores do banco para o objeto result; \n \n try{ \n while(rs.next()){ \n \n String list = rs.getString(\"nome\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbCidadeEditar.addItem(list);\n \n \n \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n cbCidadeEditar.setSelectedItem(nome);\n \n \n \n \n }", "@Override\n public void run() {\n buildings = Building.getBuildingData();\n buildingList = (ObservableList<Building>) buildings;\n\n //gets all the buildings that have food that you can order.\n buildingsWithFood = new ArrayList<Integer>();\n for (int i = 0; i != buildings.size(); i++) {\n int buildingId = buildings.get(i).getBuildingId().getValue();\n if (!Food.getFoodByBuildingId(buildingId).isEmpty()) {\n buildingsWithFood.add(buildings.get(i).getBuildingId().getValue());\n }\n }\n //sets the values for the combobox.\n buildingComboBox.setItems(buildingList);\n buildingComboBox.setConverter(getBuildingComboBoxConverter());\n\n loaded = true;\n synchronized (this) {\n this.notifyAll();\n }\n }", "public static void fillComboBox() {\r\n\t\ttry {\r\n\t\t\tStatement statement = connection.createStatement();\r\n\t\t\tresults = statement.executeQuery(\"Select PeopleName from people \");\r\n\t\t\twhile (results.next()) {\r\n\t\t\t\tString peopleName = results.getString(\"PeopleName\");\r\n\t\t\t\tcomboBox.addItem(peopleName);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t \te.printStackTrace();\r\n\t\t}\r\n\t}", "private void buildComboBoxes() {\n buildCountryComboBox();\n buildDivisionComboBox();\n }", "private void initComponents() {\n\n\t\tfolder = new File(SRC_FOLDER);\n\t\tfileList = folder.listFiles();\n\n\t\tjLabel1 = new javax.swing.JLabel();\n\t\tjTextField1 = new javax.swing.JTextField();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tsetDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n\t\tjLabel1.setText(\"please enter the tag to filter on:\");\n\n\t\tjTextField1.setText(\"[BIOME:ANY_LAND]\");\n\t\tjTextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjTextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjButton1.setText(\"search\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n\t\tgetContentPane().setLayout(layout);\n\t\tlayout.setHorizontalGroup(\n\t\t\t\tlayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t.addComponent(jTextField1, javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t.addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n\t\t\t\t\t\t\t\t.addContainerGap())\n\t\t\t\t\t\t\t\t.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t.addContainerGap())\n\t\t\t\t);\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t\t.addComponent(jLabel1)\n\t\t\t\t\t\t.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(jButton1)\n\t\t\t\t\t\t.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n\t\t\t\t);\n\n\t\tpack();\n\t}", "private void setupComboBox() {\n nodeSelectComboBox.setEditable(true);\n\n getNodes();\n\n // Set to all nodes\n nodeSelectComboBox.setItems(FXCollections.observableList(new LinkedList<String>(nodeIDs.keySet())));\n nodeSelectComboBox.setOnAction(param -> {\n longName = nodeSelectComboBox.getValue();\n nodeID = nodeIDs.get(longName);\n if(eventHandler != null) {\n eventHandler.handle(param);\n }\n });\n // Filter nodes based on user input\n nodeSelectComboBox.setOnKeyReleased(param -> {\n nodeSelectComboBox.setItems(FXCollections.observableList(new LinkedList<String>(nodeIDs.keySet()).stream()\n .filter(longName -> showNode(longName, nodeSelectComboBox.getValue())).collect(Collectors.toList())));\n });\n }", "@Override\r\n public void extractArchive(ArchiveExtractor decompressor) throws ArcException {\r\n\r\n\tString fileName = ManipString.substringAfterFirst(this.idSource, \"_\");\r\n\r\n\tboolean uncompressInProgress=false;\r\n\tFile dir = new File(this.archiveChargement + \".dir\");\r\n\tif (!dir.exists()) {\r\n\t\ttry {\r\n\t\t if (dir.mkdir())\r\n\t\t {\r\n\t\t \tStaticLoggerDispatcher.debug(LOGGER,\"$$\"+Thread.currentThread().getId()+\" is decompressing \"+dir.getAbsolutePath());\r\n\t\t \tdecompressor.extract(this.archiveChargement);\r\n\t\t \tuncompressInProgress=true;\r\n\t\t }\r\n\t\t}\r\n\t\t catch (Exception ex)\r\n\t\t{\r\n\t\t\t throw new ArcException(ex, ArcExceptionMessage.FILE_EXTRACT_FAILED, this.archiveChargement).logFullException();\r\n\t\t}\r\n\t}\r\n\t\r\n\tif (!uncompressInProgress) {\r\n\t\t\t// check if file exists\r\n\t File toRead = new File(dir + File.separator + ManipString.redoEntryName(fileName));\r\n\t while (!toRead.exists()) {\r\n\t \ttry {\r\n\t\t\t\tThread.sleep(MILLISECOND_UNCOMPRESSION_CHECK_INTERVAL);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\tThread.currentThread().interrupt();\r\n\t\t\t StaticLoggerDispatcher.error(LOGGER, \"Error in thread sleep extractArchive()\");\r\n\t\t\t}\r\n\t \ttoRead = new File(dir + File.separator + ManipString.redoEntryName(fileName));\r\n\t }\r\n\t}\r\n\r\n\r\n\t\r\n }", "private void loadDatabase(){\n \t\n String db = jFieldDBFile.getText().trim();\n boolean badzip = false;\n \n Collection<String> zf = new LinkedList<String>();\n \n // handle zipcodes if zip filtering specified\n if(jCheckBoxZipFilter.isSelected()){\n\t \n \tString zips = jTextFieldZipcodes.getText().trim();\n\t \n\t String[] z = zips.split(\",\");\n\t for(int i = 0; i < z.length; i++){\n\t \tzf.add(z[i].trim());\n\t }\n\t \n\t for(String s : zf){\n\t \tif(s.length() != 5){\n\t \t\tbadzip = true;\n\t \t}\n\t \ttry{\n\t \t\tInteger.parseInt(s);\n\t \t}catch(NumberFormatException ex){\n\t \t\tbadzip = true;\n\t \t}\n\t }\n\t \n }\n \n // if the zipcode input is bad\n if(badzip){\n \toutputResults(\"Please check your zipcodes.\\nA zipcode must be a 5 digit number...\\n\");\n \tjButtonDBLoad.setForeground(new java.awt.Color(255, 37, 37));\n \tjButtonDBLoad.setText(\"Check Zipcodes\");\n }else{\n\t // attempt to load database\n\t try{\n\t \t\n\t \tif(DEBUG_SETDB) db = DEBUG_DB;\n\t \t\n\t \tjButtonDBLoad.setForeground(Color.BLACK);\n\t \tjButtonDBLoad.setText(\"Loading...\");\n\t \tvirtualGPS = DirectionsFinder.getDirectionsFinder(db, zf);\n\t jButtonDBLoad.setText(\"Load Database\");\n\t \n\t \tjPanelAddr.setVisible(true);\n\t \tjPanelDB.setVisible(false);\n\t jButtonDBToAddr.setVisible(true);\n\t \t\n\t }catch(InvalidDatabaseException ex){\n\t \toutputResults(\"Please check the database path.\\nThe path name must refer \" +\n\t \t\t\t\"to a valid Tiger Database...\\n\");\n\t jButtonDBLoad.setForeground(new java.awt.Color(255, 37, 37));\n\t jButtonDBLoad.setText(\"Check Database\");\n\t }\n }\n \t\n }", "public ComboBox1() {\n initComponents();\n agregarItems();\n\n }", "private void populateMyLocationsBox(){\n\t\t\t//locBar.removeActionListener(Jcombo);\n\t\t\tlocBar.removeAllItems();\n\t\t\tfor (int i = 0; i < app.getMyLocations().length; i ++){\n\t\t\t\tlocation tempLoc = app.getMyLocations()[i];\n\t\t\t\tif (tempLoc.getCityID() != 0){\n\t\t\t\t\tString val = tempLoc.getName() + \", \" + tempLoc.getCountryCode() + \" Lat: \" + tempLoc.getLatitude() + \" Long: \" + tempLoc.getLongitude();\n\t\t\t\t\tlocBar.addItem(val);\n\t\t\t\t} \n\t\t\t}\n\t\t\tif (locBar.getItemCount() == 0){\n\t\t\t\tlocBar.addItem(\"--Empty--\");\n\t\t\t} else {\n\t\t\t\tlocBar.addItem(\"--Remove?--\");\n\t\t\t}\n\t\t\tlocBar.addActionListener(Jcombo);\n\t\t}", "private void populateSelectedBranches() {\n\t\ttry {\n\t\t\tStationsDTO[] stations = handler.getAllBranches();\n\t\t\tif (null != stations) {\n\t\t\t\tint len = stations.length;\n\t\t\t\tfor (int i = 0; i < len; i++) {\n\t\t\t\t\tcbSB.add(stations[i].getName() + \" - \"\n\t\t\t\t\t\t\t+ stations[i].getId());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\texception.printStackTrace();\n\t\t}\n\t}", "private void buttonBrowseFileClicked(java.awt.event.ActionEvent evt) {\n\t\tString tableName = null;\n\t\tfinal JFileChooser fc = new JFileChooser();\n\n\t\tfc.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\n\t\t\t\tgetLabelFileOperationStatus().setText(\"Scanning backup files...Please wait\");\n\n\t\t\t\tgetLabelFileOperationStatus().setVisible(true);\n\n\t\t\t}\n\t\t});\n\n\t\tfc.showOpenDialog(new JLabel(\"Select the Backup File\"));\n\t\tFile restoreFile = fc.getSelectedFile();\n\n\t\ttry {\n\n\t\t\tBackupRestoreFileUtil fileUtil = new BackupRestoreFileUtil(restoreFile);\n\n\t\t\t// readFilesDialog = new ReadFilesDialog(new JFrame(), true,\n\t\t\t// fileUtil);\n\t\t\t// readFilesDialog.setVisible(true);\n\t\t\tList<HbaseTableObject> restoredTableData = fileUtil.restoreFromFiles(this);\n\n\t\t\tif (restoredTableData.size() > 0) {\n\n\t\t\t\ttableName = restoredTableData.get(0).getTableStructure().getHTableName();\n\t\t\t\tlistRestoreupAllTablesModel.addElement(tableName);\n\t\t\t\ttableObjects.put(tableName, restoredTableData);\n\t\t\t\tlong rows = (restoredTableData.size() - 1) * 20001 + restoredTableData.get(restoredTableData.size() - 1).getTableData().getHbaseTableData().size();\n\t\t\t\tthis.getLabelFileOperationStatus().setText(\"Status: Completed Reading Files (~\" + rows + \"rows available)\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Nothing to restore\", \"Warning\", JOptionPane.WARNING_MESSAGE);\n\t\t\t}\n\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Failed to find valid rows\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\n\t\t}\n\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblHitSortFile = new javax.swing.JLabel();\n cmbSelectHitSortFile = new javax.swing.JComboBox();\n\n lblHitSortFile.setFont(new java.awt.Font(\"Tahoma\", 1, 11));\n lblHitSortFile.setText(org.openide.util.NbBundle.getMessage(HitSortFilePanel.class, \"HitSortFilePanel.lblHitSortFile.text\")); // NOI18N\n\n cmbSelectHitSortFile.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n cmbSelectHitSortFile.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cmbSelectHitSortFileActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(lblHitSortFile)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cmbSelectHitSortFile, javax.swing.GroupLayout.PREFERRED_SIZE, 204, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblHitSortFile)\n .addComponent(cmbSelectHitSortFile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n }", "private void updateKeyComboBox() {\n keyPairDropDown.removeAllItems();\n for (Identity pair : keyLoader.getLoadedPairs()) {\n keyPairDropDown.addItem(pair.getName());\n }\n }", "private ZipEntry parseCentralDirectoryEntry() throws IOException {\n // Positions the archive at the \"compressed size\" and read the value.\n skipBytes(ZipConstants.CENSIZ - ZipConstants.CENVEM);\n long compressSize = getInt();\n\n // Positions the archive at the \"filename length\" and read the value.\n skipBytes(ZipConstants.CENNAM - ZipConstants.CENLEN);\n int fileNameLen = getShort();\n\n // Reads the extra field length and the comment length.\n int extraLen = getShort();\n int commentLen = getShort();\n\n // Positions the archive at the \"local file header offset\" and read the value.\n skipBytes(ZipConstants.CENOFF - ZipConstants.CENDSK);\n long localHeaderOffset = getInt();\n\n // Reads the file name.\n byte[] fileNameBuf = new byte[fileNameLen];\n archive.read(ByteBuffer.wrap(fileNameBuf));\n String fileName = new String(fileNameBuf, Charset.forName(\"UTF-8\"));\n\n // Skips the extra field and the comment.\n skipBytes(extraLen + commentLen);\n\n ZipEntry entry = new ZipEntry();\n entry.setSize(compressSize);\n entry.setLocalHeaderOffset(localHeaderOffset);\n entry.setName(fileName);\n\n return entry;\n }", "public void setCombobox() throws IOException {\n try {\n fileReader = new FileReader(\"data/textFiles/gameState.txt\");\n bufferedReader = new BufferedReader(fileReader);\n //remove all items and reload the existing in the file\n comboBox1.removeAllItems();\n //always add \"Trial\" as user\n comboBox1.addItem(\"Trial\");\n //read the file till the end is reached\n while ((line = bufferedReader.readLine()) != null) {\n tokens = line.split(\",\");\n //add all names from the file(names are at first position)\n comboBox1.addItem(tokens[0]);\n }\n } catch (IOException ex) {\n System.out.println(ex);\n } finally {\n if (bufferedReader != null) {\n bufferedReader.close();\n }\n if (fileReader != null) {\n fileReader.close();\n }\n }\n }", "void fillCombo_name(){\n combo_name.setItems(FXCollections.observableArrayList(listComboN));\n }", "public FilesArchived(File rootDir, String zip) {\n this.root = rootDir;\n this.compression = (\"zstd\".equals(zip)) ? Compression.ZSTD : Compression.GZIP;\n rescan();\n Thread thread = new Thread(this::run);\n thread.setDaemon(true);\n thread.setName(\"FilesArchived-maintainer\");\n thread.start();\n }", "public void actionPerformed(ActionEvent e){\n if(stateComboBox.getSelectedIndex() >= 0){ \r\n String userIDFound = null; \r\n boolean isStateExists = false; \r\n try { \r\n //Read file using buffered reader. \r\n BufferedReader br = new BufferedReader(new FileReader(FILE_PATH_LOCATION)); \r\n String sCurrentLine =br.readLine(); \r\n while (sCurrentLine != null) { \r\n String state = null; \r\n String zipCode = null; \r\n \r\n //Parse each line in the text file using \"|\" \r\n StringTokenizer st = new StringTokenizer(sCurrentLine,\"|\"); \r\n \r\n //Set User Name - Second string is user name \r\n if(st.hasMoreTokens()) { \r\n state = st.nextToken(); \r\n System.out.println(state); \r\n } \r\n \r\n //Set password - Third String is password \r\n if(st.hasMoreTokens()) { \r\n zipCode = st.nextToken(); \r\n System.out.println(zipCode); \r\n } \r\n String comboBoxState = (String) stateComboBox.getSelectedItem(); \r\n //If user name and password match in each line, then return true \r\n if(state != null && comboBoxState.equalsIgnoreCase(state)) { \r\n isStateExists = true; \r\n break; \r\n } \r\n sCurrentLine = br.readLine(); \r\n } \r\n } \r\n catch (Exception FILENOTFOUND) { \r\n System.out.println(\"File not found!\"); \r\n } \r\n try { \r\n BufferedReader br2 = new BufferedReader(new FileReader(FILE_PATH_STADIUMS)); \r\n String sCurrentLine2 = br2.readLine(); \r\n while(sCurrentLine2 != null) { \r\n String stateString = null; \r\n String stadium = null; \r\n \r\n //Parse each line in the text file using \"|\" \r\n StringTokenizer st2 = new StringTokenizer(sCurrentLine2,\"|\"); \r\n \r\n //Set User Name - Second string is user name \r\n if(st2.hasMoreTokens()) { \r\n stateString = st2.nextToken(); \r\n System.out.println(stateString); \r\n } \r\n \r\n //Set password - Third String is password \r\n if(st2.hasMoreTokens()) { \r\n stadium = st2.nextToken(); \r\n System.out.println(stadium); \r\n } \r\n String comboBoxState = (String) stateComboBox.getSelectedItem(); \r\n if(stateString != null && comboBoxState.equalsIgnoreCase(stateString)){ \r\n System.out.println(\"Test1\"); \r\n allStadiums[countStadium] = stadium; \r\n countStadium++; \r\n \r\n System.out.println(\"Test2\"); \r\n } \r\n \r\n //Read next line \r\n sCurrentLine2 = br2.readLine(); \r\n } \r\n } \r\n catch (Exception FILENOTFOUND) { \r\n System.out.println(\"File not found!\"); \r\n } \r\n } \r\n PublicUserFrame.this.setSize(250, 500); \r\n panel02 = new JPanel(); \r\n panel02.setLayout(new GridLayout(countStadium,1,5,5)); \r\n stadiumRadioButton = new JRadioButton[15]; \r\n for(int i=0; i<allStadiums.length; i++){ \r\n if(allStadiums[i] != null){ \r\n System.out.println(\"Test3:\" + allStadiums[i]); \r\n stadiumRadioButton[i] = new JRadioButton(allStadiums[i]); \r\n panel02.add(stadiumRadioButton[i]); \r\n stadiumButtonGroup.add(stadiumRadioButton[i]); \r\n System.out.println(i); \r\n } \r\n } \r\n add(panel02, bLayout.CENTER); \r\n RadioButtonListener rbListener = new RadioButtonListener(); \r\n for(int i=0; i<stadiumRadioButton.length; i++){ \r\n if(stadiumRadioButton[i] != null){ \r\n stadiumRadioButton[i].addItemListener(rbListener); \r\n } \r\n } \r\n }", "public void fillTESBox(JComboBox<String> tessit) {\n\t\tfor(int i=0; i < listOfFiles.length; i++) {\n\t\t\tif ( isAcceptableFile( listOfFiles[i]) ){\n\t\t\t\ttessit.addItem( getEditedFilename(listOfFiles[i]) );\n\t\t\t\tfileMap.put( getEditedFilename(listOfFiles[i]), listOfFiles[i] );\n\t}\t}\t}", "private void cargarArchivoAlumnos() {\n String aux = \"\";\n String texto = \"\";\n\n JFileChooser file = new JFileChooser();\n file.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\n\n //Filtro\n FileNameExtensionFilter filtro = new FileNameExtensionFilter(\"*.XML\", \"xml\");\n\n file.setFileFilter(filtro);\n\n int seleccion = file.showOpenDialog(this);\n\n if (seleccion == JFileChooser.APPROVE_OPTION) {\n File fichero = file.getSelectedFile();\n\n insertarAlumnos(fichero.getPath());\n\n }\n }", "private void processJar(String jarname){\n ZipFile zf=null;\n Enumeration entries=null;\n // open the zip file and get the list of entries\n try{\n zf=new ZipFile(jarname);\n entries=zf.entries();\n }catch(IOException e){\n throw new InstantiationError(\"IOException:\"+e.getMessage() + \"\\n\" +\n \"failed on file \" + jarname );\n }\n\n // prepare some variables for looping through\n ZipEntry entry=null;\n String name=null;\n\n // go through the entries\n while(entries.hasMoreElements()){\n entry=(ZipEntry)entries.nextElement();\n name=checkName(entry.getName(),0);\n if(name!=null) addParameter(name);\n }\n\n // clean up\n try{\n zf.close();\n }catch(IOException e){\n // doesn't matter now\n }\n }", "private void initData() {\n\t\tcomboBoxInit();\n\t\tinitList();\n\t}", "public CustomComboBoxModel() {\n\t\t// TODO Auto-generated constructor stub\n\t\tZipcodeDAO dao = new ZipcodeDAO();\n\t\tdatas = dao.allSido();\n\t}", "public void setDirectoryEntries( byte[][] entries )\n {\n if ( entries != null && entries.length > 0 )\n {\n // Remember the entries set.\n _currentEntries = entries;\n\n String[] values = new String[ entries.length ];\n\n for ( int i = 0 ; i < values.length ; i++ )\n values[i] = new String( entries[i] ).trim();\n\n // Create a new model for the passed entries...\n DefaultComboBoxModel comboBoxModel = new DefaultComboBoxModel( values );\n // ...and add that to the combo box.\n _comboBox.setModel( comboBoxModel );\n }\n else\n {\n _currentEntries = null;\n _comboBox.setModel( new DefaultComboBoxModel() );\n }\n\n setEnabled( _currentEntries != null );\n }", "@Override\n\tpublic void initialize(URL location, ResourceBundle resources) {\n\t\tcombobox.setItems(list);\n\t\tcombobox2.setItems(list2);\n\t\t\n\t}", "private void populateCladeCombo() throws SQLException {\n new SQLWorker<String>(\"Fetching database list...\", \"Unable to fetch database list from UCSC.\") {\n @Override\n public String doInBackground() throws SQLException {\n if (table != null) {\n genomeDB = table.getDatabase();\n } else {\n String selectedDB = SettingsUtils.getString(plugin, \"GENOME\");\n if (selectedDB != null) {\n genomeDB = plugin.getDatabase(selectedDB);\n }\n }\n ResultSet rs = plugin.hgcentral.executeQuery(\"SELECT DISTINCT name,description,genome,clade FROM dbDb NATURAL JOIN genomeClade WHERE active='1' ORDER by clade,orderKey\");\n String lastClade = null;\n String selectedClade = null;\n List<GenomeDef> cladeGenomes = new ArrayList<GenomeDef>();\n while (rs.next()) {\n String dbName = rs.getString(\"name\");\n GenomeDef genome = new GenomeDef(dbName, rs.getString(\"genome\") + \" - \" + rs.getString(\"description\"));\n \n // In the database, clades are stored in lowercase, and Nematodes are called worms.\n String clade = rs.getString(\"clade\");\n if (clade.equals(\"worm\")) {\n clade = \"Nematode\";\n } else {\n clade = Character.toUpperCase(clade.charAt(0)) + clade.substring(1);\n }\n if (genomeDB != null && dbName.equals(genomeDB.getName())) {\n selectedClade = clade;\n }\n \n if (!clade.equals(lastClade)) {\n if (lastClade != null) {\n cladeGenomeMap.put(lastClade, cladeGenomes);\n cladeGenomes = new ArrayList<GenomeDef>();\n }\n lastClade = clade;\n }\n cladeGenomes.add(genome);\n }\n cladeGenomeMap.put(lastClade, cladeGenomes);\n return selectedClade;\n }\n \n @Override\n public void done(String selectedClade) throws SQLException {\n cladeCombo.setModel(new DefaultComboBoxModel(new String[] { \"Mammal\", \"Vertebrate\", \"Deuterostome\", \"Insect\", \"Nematode\", \"Other\" }));\n if (selectedClade != null) {\n cladeCombo.setSelectedItem(selectedClade);\n } else {\n cladeCombo.setSelectedIndex(0);\n }\n }\n };\n }", "@FXML\n\tprivate void initialize() {\n\t\tlistNomType = FXCollections.observableArrayList();\n\t\tlistIdType=new ArrayList<Integer>();\n\t\ttry {\n\t\t\tfor (Type type : typeDAO.recupererAllType()) {\n listNomType.add(type.getNomTypeString());\n listIdType.add(type.getIdType());\n }\n\t\t} catch (ConnexionBDException e) {\n\t\t\tnew Popup(e.getMessage());\n\t\t}\n\t\tcomboboxtype.setItems(listNomType);\n\n\t}", "public void start()\n {\n FileVector = FileHandler.getFileList( harvesterDirName , filterArray, false );\n iter = FileVector.iterator();\n }", "public String[][] readFilesUsingFileChooser() {\r\n Vector<ZipFile> logs = new Vector<ZipFile>();\r\n Vector<String> marioData = new Vector<>();\r\n Vector<Vector<Integer>> marioActions = new Vector<Vector<Integer>>();\r\n Vector<Level> levels = new Vector<Level>();\r\n\r\n JFileChooser chooser = new JFileChooser();\r\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\r\n \"MarioAi Log files\", \"zip\");\r\n chooser.setMultiSelectionEnabled(true);\r\n chooser.setFileFilter(filter);\r\n\r\n int returnVal = chooser.showOpenDialog(this);\r\n if (returnVal == JFileChooser.APPROVE_OPTION) {\r\n for (File file : chooser.getSelectedFiles()) {\r\n try {\r\n logs.add(new ZipFile(file));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n Scanner scan = null;\r\n for (ZipFile zip : logs) {\r\n marioData.add(zip.getName());\r\n if (zip.getEntry(\"actions.act\") != null) {\r\n try {\r\n scan = new Scanner(zip.getInputStream(zip.getEntry(\"actions.act\")));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n Byte act;\r\n Vector<Integer> actions = new Vector<Integer>();\r\n while ((act = scan.nextByte()) != null) {\r\n actions.add(act.intValue());\r\n }\r\n marioActions.add(actions);\r\n }\r\n if (zip.getEntry(\"level.lvl\") != null) {\r\n ObjectInputStream ois = null;\r\n try {\r\n ois = new ObjectInputStream(zip.getInputStream(zip.getEntry(\"level.lvl\")));\r\n Level lvl = (Level) ois.readObject();\r\n levels.add(lvl);\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } catch (ClassNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n }", "private void refreshDataPopup() {\n ObservableList<TblCompanyBalanceBankAccount> companyBalanceBankAccountSourceItems = FXCollections.observableArrayList(loadAllDataCompanyBalanceBankAccount(selectedBalance));\r\n cbpCompanyBalanceBankAccountSource.setItems(companyBalanceBankAccountSourceItems);\r\n\r\n //Company Balance - Bank Account (destination)\r\n ObservableList<TblCompanyBalanceBankAccount> companyBalanceBankAccountDestinationItems = FXCollections.observableArrayList(loadAllDataCompanyBalanceBankAccount(selectedBalance));\r\n cbpCompanyBalanceBankAccountDestination.setItems(companyBalanceBankAccountDestinationItems);\r\n }", "private ObservableList<String> fillComboBox() {\n\t\tObservableList<String> list = FXCollections.observableArrayList();\n\t\t\n\t\t/* Test Cases */\n\t\t\tlist.addAll(\"Item Code\", \"Description\");\n\t\t\n\t\treturn list;\n\t}", "private void fill( File fileDirectory )\n\t{\n\t\t// title\n\t\tsetTitle( fileDirectory.getAbsolutePath() );\n\n\t\t// file list\n\t\tFile[] aFile = fileDirectory.listFiles( getFileFilter() );\n\t\tList<FileInfo> listFileInfo = new ArrayList<FileInfo>();\n\t\tif( null != aFile )\n\t\t{\n\t\t\tfor( File fileTemp : aFile )\n\t\t\t{\n\t\t\t\tlistFileInfo.add( new FileInfo( fileTemp.getName(), fileTemp ) );\n\t\t\t}\n\t\t\tCollections.sort( listFileInfo );\n\t\t}\n\t\t// Add peth to back to parent folder\n\t\tif( null != fileDirectory.getParent() )\n\t\t{\n\t\t\tlistFileInfo.add( 0, new FileInfo( \"..\", new File( fileDirectory.getParent() ) ) );\n\t\t}\n\n\t\tm_fileinfoarrayadapter = new FileInfoArrayAdapter( this, listFileInfo );\n\t\tm_listview.setAdapter( m_fileinfoarrayadapter );\n\t}", "public List<Clazz> loadAndScanJar()\n\t\t\tthrows ClassNotFoundException, ZipException, IOException {\n\t\tsuper.addURL(new File(path).toURI().toURL());\n\t\tList<Clazz> representations=new ArrayList<Clazz>();\n\n\t\t// Count the classes loaded\n\t\t// Your jar file\n\t\tFile f = new File(path);\n\n\t\tJarFile jar = new JarFile(path);\n\t\t// Getting the files into the jar\n\t\tEnumeration<? extends JarEntry> enumeration = jar.entries();\n\n\t\t// Iterates into the files in the jar file\n\t\twhile (enumeration.hasMoreElements()) {\n\t\t\tZipEntry zipEntry = enumeration.nextElement();\n\t\t\t// Is this a class?\n\t\t\tif (zipEntry.getName().endsWith(\".class\")) {\n\t\t\t\t// Relative path of file into the jar.\n\t\t\t\tString className = zipEntry.getName();\n\t\t\t\t// Complete class name\n\t\t\t\tclassName = className.replace(\".class\", \"\").replace(\"/\", \".\");\n\t\t\t\t// Load class definition from JVM\n\t\t\t\tClass<?> clazz = this.loadClass(className);\n\t\t\t\ttry {\n\t\t\t\t\t\tClazz actual = new Clazz(clazz.getName());\n\t\t\t\t\t\tfor (java.lang.reflect.Method m : clazz.getMethods()) {\n\t\t\t\t\t\t\tactual.addMethod(m.getReturnType().getName(), m.getName(), getScope(m.getModifiers()),\n\t\t\t\t\t\t\t\t\tModifier.isAbstract(m.getModifiers()), Modifier.isStatic(m.getModifiers()));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (java.lang.reflect.Field m : clazz.getFields()) {\n\t\t\t\t\t\t\tactual.addVariable(m.getType().getName(), m.getName(), getScope(m.getModifiers()),\n\t\t\t\t\t\t\t\t\tModifier.isStatic(m.getModifiers()));\n\t\t\t\t\t\t}\n\t\t\t\t\t\trepresentations.add(actual);\n\n\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tjar.close();\n\t\treturn representations;\n\t}", "private void updateListView() {\n fileList.getItems().setAll(files.readList());\n //System.out.println(System.currentTimeMillis() - start + \" мс\");\n }", "public static void loadAllPlaylistInCombo(JComboBox combo)\n {\n \n String text = \"\";\n \n int i=1;\n\n int amountOfPlaylist=(PlaylistXmlFile.getNumberOfPlaylist());\n \n while (i<=amountOfPlaylist)\n {\n text = (\"Playlist \" + i);\n \n combo.addItem(text);\n \n i++;\n }\n }", "public void fillExistCombo() {\n String comboQuery = \"select * from Customer where fname = fname\";\n try {\n prepState = run.connect().prepareStatement(comboQuery);\n resSet = prepState.executeQuery();\n\n while (resSet.next()) {\n custCombo.addItem(resSet.getString(2));\n }\n\n } catch (SQLException ex) {\n System.out.println(\"SQLException: \" + ex.getMessage());\n }\n }", "public void carregaCidadeModificada() throws SQLException{\n String sql = \"SELECT nome FROM tb_cidades where uf='\"+cbUfEditar.getSelectedItem()+\"'\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n \n ResultSet rs = preparador.executeQuery();\n cbCidadeEditar.removeAllItems();\n //passando valores do banco para o objeto result; \n try{ \n \n while(rs.next()){ \n \n String list = rs.getString(\"nome\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbCidadeEditar.addItem(list); \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n \n }", "public Upload() {\n initComponents();\n ConnectionOracle con = new ConnectionOracle();\n con.conect();\n Statement st = null;\n ResultSet rs = null;\n String query = \"SELECT NOMBRE_MATERIA, NOMBRE_MAESTRO FROM MATERIA, MAESTRO, CLASE WHERE CLASE.MAESTRO_IDMAESTRO = MAESTRO.IDMAESTRO AND CLASE.MATERIA_IDMATERIA = MATERIA.IDMATERIA\";\n String materia = null;\n try{\n st = con.conex.createStatement();\n rs = st.executeQuery(query);\n while(rs.next()){\n this.combo_class.addItem(rs.getString(\"NOMBRE_MATERIA\") +\" \"+ rs.getString(\"NOMBRE_MAESTRO\"));\n }\n }catch(SQLException e){\n System.out.println(\"Error\");\n System.out.println(e.getMessage());\n }\n }", "@Override\n public ObservableList<File> call() {\n this.updateTitle(\"Collections Finder Task\");\n collectionsToAdd = FXCollections.<File>observableArrayList();\n foldersToSearch = new ArrayList<>();\n foldersToSearch.add(startingFolder);\n while (foldersToSearch.size() > 0) {\n if (this.isCancelled()) { break; }\n searchNextFolder();\n }\n return collectionsToAdd;\n }", "public void refreshMenu() {\n ObservableList list = FXCollections.observableArrayList();\n FileParser_Interface[] parsers = {new FileParser_DHCPnetworks(), new FileParser_RouterVlanNetwork(), new FileParser_SwitchConfigs(), new FileParser_VlanTagsOther()};\n list.addAll(Arrays.asList(parsers));\n this.setItems(list);\n //this.getSelectionModel().selectFirst(); // causes NullPointerExceptions when used, thou are warned\n this.setConverter(new ParserConverter());\n }", "void populateLittlesComboBox(JComboBox box) {\n box.addItem(\"Clear\");\n TreeMap<String, ArrayList<String>> sortedlittles = new TreeMap<>();\n sortedlittles.putAll(matching.littlesPreferences);\n for (Map.Entry lilprefs : sortedlittles.entrySet()) {\n String littleName = lilprefs.getKey().toString();\n box.addItem(littleName);\n }\n }", "public static void main(String[] args) throws Exception {\n readZipFile(FILE_NAME);\n }", "public void addLocationToComboBox() throws Exception{}", "private void setUpListeners() {\n\n showMetadataButton.addActionListener(e -> {\n\n File file = baseController.getFileChooser().pickSingleFileChooser(\"images\");\n\n if (file != null) {\n\n // EXTRACT strings from METADATA object\n ArrayList<String> metadataParsed = baseController.getExtractMetadata().extractMetadata(file);\n\n MetadataWindow metadataWindow = new MetadataWindow(\"Metadata\", metadataParsed);\n metadataWindow.setVisible(true);\n }\n });\n\n compressFilesButton.addActionListener(e -> {\n\n List<File> filesToCompress = null;\n\n try {\n filesToCompress = Arrays.asList(Objects.requireNonNull(baseController.getFileChooser().pickMultipleFilesFromFileChooser()));\n\n } catch (Exception exception) {\n\n // nothing to do here\n }\n\n if (filesToCompress != null) {\n\n JPasswordField passwordField = new JPasswordField();\n int okCxl = JOptionPane.showConfirmDialog(\n this,\n passwordField,\n \"Enter Password\",\n JOptionPane.OK_CANCEL_OPTION,\n JOptionPane.PLAIN_MESSAGE);\n\n if (okCxl == JOptionPane.OK_OPTION) {\n\n String password = new String(passwordField.getPassword());\n\n if (!password.isEmpty()) {\n\n boolean result = baseController.getCompression().compressFilesToZip(filesToCompress, password);\n if (result) {\n compressionResultLabel.setVisible(true);\n compressionResultLabel.setText(\"Files successfully compressed.\");\n }\n\n } else {\n\n JOptionPane.showMessageDialog(\n this,\n \"No password entered\",\n \"Warning\",\n JOptionPane.WARNING_MESSAGE);\n }\n }\n }\n });\n\n decompressFilesButton.addActionListener(e -> {\n\n File file = baseController.getFileChooser().pickSingleFileChooser(\"zip\");\n\n if (file != null) {\n\n // Zip encrypted with a password\n try {\n if (new ZipFile(file).isEncrypted()) {\n\n JPasswordField passwordField = new JPasswordField();\n int okCxl = JOptionPane.showConfirmDialog(\n this,\n passwordField,\n \"Enter Password\",\n JOptionPane.OK_CANCEL_OPTION,\n JOptionPane.PLAIN_MESSAGE);\n\n if (okCxl == JOptionPane.OK_OPTION) {\n\n String password = new String(passwordField.getPassword());\n\n if (!password.isEmpty()) {\n\n boolean result = baseController.getCompression().deCompressEncryptedZip(file, password);\n if (result) {\n compressionResultLabel.setVisible(true);\n compressionResultLabel.setText(\"Files successfully decompressed.\");\n } else {\n JOptionPane.showMessageDialog(this,\n \"Wrong password!\",\n \"Warning\",\n JOptionPane.ERROR_MESSAGE);\n }\n } else {\n\n JOptionPane.showMessageDialog(\n this,\n \"No password entered\",\n \"Warning\",\n JOptionPane.WARNING_MESSAGE);\n }\n }\n }\n\n // Zip without a password\n else {\n\n boolean result = baseController.getCompression().deCompressUnencryptedZip(file);\n if (result) {\n compressionResultLabel.setVisible(true);\n compressionResultLabel.setText(\"Files successfully decompressed.\");\n }\n }\n\n } catch (IOException ioException) {\n\n LOGGER.log(Level.SEVERE, ioException.toString(), ioException);\n }\n }\n });\n\n messageShorteningButton.addActionListener(e -> {\n\n File file = baseController.getFileChooser().pickSingleFileChooser(\"txt\");\n\n if (file != null) {\n\n File modifiedFile = baseController.getDictionary().applyMessageShortening(file, 1);\n\n if (modifiedFile != null) {\n\n messageShorteningResultLabel.setVisible(true);\n messageShorteningResultLabel.setText(\"Successfully applied dictionary\");\n }\n }\n });\n }", "public void viewBestCompressionForSelected() throws IOException {\n\t\tfinal List<Project> selectedItems = selectionList.getSelectionModel().getSelectedItems();\n\t\tif (selectedItems.size() == 1) {\n\t\t\tfinal Project project = selectedItems.get(0);\n\t\t\tfinal FXMLSpringLoader loader = new FXMLSpringLoader(appContext);\n\t\t\tfinal Dialog<Project> dialog = loader.load(\"classpath:view/Home_ViewRuleSet.fxml\");\n\t\t\t((ViewRuleSetController) loader.getController()).setProject(project);\n\t\t\tdialog.initOwner(addProject.getScene().getWindow());\n\t\t\tdialog.showAndWait();\n\t\t}\n\t}", "void onUnzipCompleted(String output);", "private void initializeOrganFilterComboBox() {\n organFilterComboBox.setItems(organs);\n organFilterComboBox.getItems()\n .addAll(organString, \"Liver\", \"Kidneys\", \"Heart\", \"Lungs\", \"Intestines\",\n \"Corneas\", \"Middle Ear\", \"Skin\", \"Bone\", \"Bone Marrow\", \"Connective Tissue\");\n organFilterComboBox.getSelectionModel().select(0);\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t\tfecha = new Date();\r\n\t\t\r\n\t\tlistaBancos = new ArrayList<SelectItem>();\r\n\t\tlistaRegiones = new ArrayList<SelectItem>();\r\n\t\tlistaCiudades = new ArrayList<SelectItem>();\r\n\t\tlistaComunas = new ArrayList<SelectItem>();\r\n\t\t\r\n\t\tfor(EmpresaDTO empresa : configJProcessService.selectEmpresasByOrganizacion(1))\r\n\t\t\tlistaBancos.add(new SelectItem(empresa.getId(), empresa.getNombre()));\r\n\t}", "private void loadDropDownInfo() {\n\t\tif(isConnected) {\n\t\t\ttry {\n\t\t\t\tlocationBuilder = connection.getLocationData();\n\n\t\t\t\tbuildingComboData = locationBuilder.getBLDGList();\n\t\t\t\tcampusComboData = locationBuilder.getCampusList();\n\t\t\t\troomComboData = locationBuilder.getRMList();\n\n\t\t\t\tbuildingCombo.setItems(buildingComboData);\n\t\t\t\tcampusCombo.setItems(campusComboData);\n\t\t\t\troomCombo.setItems(roomComboData);\n\n\t\t\t\tbuildingCombo.getSelectionModel().selectFirst();\n\t\t\t\tcampusCombo.getSelectionModel().selectFirst();\n\t\t\t\troomCombo.getSelectionModel().selectFirst();\n\t\t\t} // End try statement \n\t\t\tcatch (SQLException e) {\n\t\t\t\tsetNotificationAnimation(\"Connection Problem, Could Not Pull Information\", Color.RED);\n\t\t\t} // End catch statement \n\t\t} // End if statement\n\t\telse {\n\t\t\tsetNotificationAnimation(\"Not Connect\", Color.RED);\n\t\t} // End else statement \n\t}", "private void handleBrowse() {\n\t\tContainerSelectionDialog dialog = new ContainerSelectionDialog(\n\t\t\t\tgetShell(), ResourcesPlugin.getWorkspace().getRoot(), false,\n\t\t\t\t\"Select new file container\");\n\t\tif (dialog.open() == ContainerSelectionDialog.OK) {\n\t\t\tObject[] result = dialog.getResult();\n\t\t\tif (result.length == 1) {\n\t\t\t\tcontainerSourceText.setText(((Path) result[0]).toString());\n\t\t\t}\n\t\t}\n\t}", "private void cargarCmbColores(){\n MapaColores.getMap().forEach((k,v)->cmbColores.getItems().add(k));\n cmbColores.getSelectionModel().selectFirst();\n }", "private void helperDisplayProjectFiles ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tString[] fileNameList = DataController.scenarioGetFileNames();\r\n\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentComboboxFileName().removeAllItems();\r\n\r\n\t\t\tfor (int i = 0; i < fileNameList.length; i++)\r\n\t\t\t{\r\n\t\t\t\tmainFormLink.getComponentPanelLeft().getComponentComboboxFileName().addItem(fileNameList[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "private static void extractFile(ZipInputStream inStreamZip, FSDataOutputStream destDirectory) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(destDirectory);\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = inStreamZip.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }" ]
[ "0.68167526", "0.5950626", "0.57061696", "0.5560422", "0.55538577", "0.5403483", "0.5211471", "0.5195684", "0.51952106", "0.5188248", "0.5185015", "0.5136056", "0.5116724", "0.5103213", "0.5098314", "0.50856686", "0.50734156", "0.5062823", "0.50186676", "0.5016373", "0.50128734", "0.50123256", "0.49951437", "0.49944353", "0.49844643", "0.4976021", "0.49699298", "0.49645603", "0.4953596", "0.49470022", "0.49412036", "0.4936666", "0.49330038", "0.48998863", "0.48848683", "0.48811212", "0.48658323", "0.4851675", "0.48515293", "0.4849578", "0.48461688", "0.48429817", "0.4825416", "0.4822462", "0.480451", "0.47974426", "0.47948554", "0.4794527", "0.4789731", "0.47880813", "0.47822204", "0.4776411", "0.4769489", "0.47653213", "0.47619277", "0.4757073", "0.475393", "0.47495422", "0.47440025", "0.47374034", "0.4737138", "0.4736782", "0.47291884", "0.47273698", "0.47261283", "0.47250402", "0.47226116", "0.47217894", "0.47148293", "0.47103375", "0.4708921", "0.4702134", "0.47019455", "0.46926814", "0.46827856", "0.46817425", "0.46774292", "0.4675855", "0.46751285", "0.46741176", "0.46659306", "0.46628287", "0.4662216", "0.4662093", "0.46620232", "0.4654927", "0.46538943", "0.4649537", "0.46492642", "0.46475697", "0.4646085", "0.46425706", "0.46330088", "0.46282274", "0.4620104", "0.4616713", "0.46065357", "0.46063226", "0.46037954", "0.46034968" ]
0.74152136
0
Loads a file from the ZIP archive into the text area
public void loadZipFile(final String name) { fileCombo.setEnabled(false); fileText.setText(""); new SwingWorker<Void, Void>() { protected Void doInBackground() throws Exception { try { ZipInputStream zin = new ZipInputStream( new FileInputStream(zipname)); ZipEntry entry; // find entry with matching name in archive while ((entry = zin.getNextEntry()) != null) { if (entry.getName().equals(name)) { // read entry into text area Scanner in = new Scanner(zin); while (in.hasNextLine()) { fileText.append(in.nextLine()); fileText.append("\n"); } } zin.closeEntry(); } zin.close(); } catch (IOException e) { e.printStackTrace(); } return null; } protected void done() { fileCombo.setEnabled(true); } }.execute(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void decodeFile(InlineCssTextArea area, String name) {\n //checks if user has set a default directory\n String initialDir = \"\";\n if (SaveProperties.getPath() != null) {\n initialDir = SaveProperties.getPath();\n }\n File selectedFile;\n if (name == null) {\n FileChooser fileChooser = new FileChooser();\n fileChooser.setTitle(\"Load document\");\n fileChooser.setInitialDirectory(new File(initialDir));\n fileChooser.setSelectedExtensionFilter(\n new FileChooser.ExtensionFilter(\"TXT files (*.txt)\", \"*.txt\"));\n selectedFile = fileChooser.showOpenDialog(null);\n } else {\n selectedFile = new File(name);\n }\n if (selectedFile != null) {\n try {\n FileInputStream fis = new FileInputStream(selectedFile);\n ObjectInputStream ois = new ObjectInputStream(fis);\n Note note = (Note) ois.readObject();\n DocumentHandler.decode(area, note.getContent());\n if (controller != null) {\n controller.addToNotesList(note);\n }\n\n fis.close();\n } catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n controller.getMlc().fileFormatError();\n }\n }\n }", "public FileSelectionFrame() throws ZipException, IOException {\n initComponents();\n new FileSelectionFrame().setVisible(true);\n\n\n }", "@Override\n public void run() {\n txt_Nombre.setVisible(false);\n //ocultamos el boton Enviar\n btnaceptar.setVisible(false);\n //ocultamos boton Eliminar archivo\n btnEliminarArchivo.setVisible(false);\n //Ocultamos boton Seleccionar archivo\n btnselecionar.setVisible(false);\n //preparamos la salida de datos del Zip\n ZipOutputStream zout;\n //preparamos la salida de datos para el archivo\n BufferedOutputStream bos;\n try {\n //creamos el archivo y lo guardamos \n ruta=nombreZip+\".zip\";\n //creamos el flujo de salida hacia el archivo Zip\n bos = new BufferedOutputStream(new FileOutputStream(ruta));\n zout = new ZipOutputStream(bos);\n int i=0;\n //Hacemos visibles todos los componentes de las barras de progreso\n lblGeneral.setVisible(true);\n barraGeneral.setVisible(true);\n barra.setVisible(true);\n barra.setStringPainted(true);\n //ponemosd de color verde la barra\n barraGeneral.setForeground(Color.GREEN);\n //habilitamos el String del porcentaje\n barraGeneral.setStringPainted(true);\n //ponemos el valor Maximo de la barra\n barraGeneral.setMaximum((int)(pesoTotal/100));\n //ponemos el valor Minimo\n barraGeneral.setMinimum(0);\n //variable para el progreso de la barra General\n long leidoTotal=0;\n lbInfo.setHorizontalAlignment(JLabel.LEFT);\n for (String documento : documentos) {\n //creamos una nueva entrada/ducumento para el Zip\n ZipEntry ze = new ZipEntry(nombres.get(i));\n //agregamos la entrada al Zip\n zout.putNextEntry(ze);\n //obtenemos el archivo \n File arch=new File(documentos.get(i));\n //Indicamos cual archivo se esta comprimiendo\n lbInfo.setText(\"comprimiendo: \"+arch.getName());\n //obtenemos el tamaño del archivo\n long tamañoArch=arch.length();\n //ponemos el valor maximo de a la barra individual\n barra.setMaximum((int)(tamañoArch/100));\n //ponemos el valor minimo\n barra.setMinimum(0);\n //cambiamos el color de la barra\n barra.setForeground(Color.GREEN);\n barra.setValue(0);\n //creamos el Stream de entrada del archivo\n BufferedInputStream bis=new BufferedInputStream(new FileInputStream(documentos.get(i)));\n //tamaño de buffer para lectura del archivo\n byte[] info=new byte[4096];\n //variable para el progreso de la barra individual\n long leido=0;\n //Ciclo para lectura del archivo\n while(leido<tamañoArch)\n {\n //Verifica que se puedan leer otros 4KB \n if((leido+4096)<tamañoArch)\n {\n //leemos 4KB del Archivo\n bis.read(info);\n //agregamos los 4KB a las variables de progreso\n leido+=4096;\n leidoTotal+=4096;\n }\n else\n {\n //si no se puede leer 4KB lee el resto del archivo\n int resto=(int)(tamañoArch-leido);\n //damos el tamaño al arreglo\n info=new byte[resto];\n //leemos el resto del archivo\n bis.read(info);\n //agregamos el resto del a las variables de progreso\n leido+=resto;\n leidoTotal+=resto;\n }\n //escribimos en el archivo Zip\n zout.write(info);\n //ponemos el valor en la barra individual\n barra.setValue((int)(leido/100));\n //ponemos el valor en la barra general\n barraGeneral.setValue((int)(leidoTotal/100));\n }\n //cerramos la escritura a la entradadel Zip\n zout.closeEntry();\n //aumentamos el valor del contador\n i++;\n }\n //cerramos la escritura al archivo Zip\n zout.close();\n } catch (FileNotFoundException ex) {\n Logger.getLogger(EnviarArchivo.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(EnviarArchivo.class.getName()).log(Level.SEVERE, null, ex);\n } \n //verificamos que tipo de envio se selecciono\n if(rbtnSimultaneo.isSelected())\n {\n //orden para archivos simultaneos y envios individuales\n orden.enviarArchivoSimultaneo(ruta,ip);\n }\n else\n {\n //orden para envio Secuencial\n orden.envioArchivoSecuencial(ruta);\n }\n //llamamos el metodo cerrar para cerrar la ventana\n cerrar();\n }", "private void load() {\n try {\n StringBuilder sb = new StringBuilder();\n InputStreamReader isr = new InputStreamReader(SpellCheckerDemo.class.getResourceAsStream(\"/org/jdesktop/swingx/demo/JuliusCaesar.txt\"));\n BufferedReader br = new BufferedReader(isr);\n String str;\n while((str = br.readLine()) != null) {\n sb.append(str);\n sb.append(\"\\n\");\n }\n str = sb.toString();\n textArea.setText(str);\n } catch (Throwable t) {\n logger.log(Level.SEVERE,\"Unable to load the text.\",t);\n }\n }", "public void btn_action_abrirArchivo() {\n FileChooser fileChooser = new FileChooser();\n\n //Set extension filter\n FileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter(\"TXT files (*.txt)\", \"*.txt\");\n fileChooser.getExtensionFilters().add(extFilter);\n\n //Show save file dialog\n File file = fileChooser.showOpenDialog(miPrimaryStage);\n //File file = new File(\"fichero.txt\");\n if(file != null){\n // ta_insertar_texto_id.setText(readFile(file));\n ca_insertar_texto_id.replaceText(readFile(file));\n }\n }", "public void ImportNaimoZipFileByUser(){\n File mPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);\n final Manager_FileDialog managerFileDialog = new Manager_FileDialog(this, mPath, \".zip\");\n managerFileDialog.addFileListener(new Manager_FileDialog.FileSelectedListener() {\n public void fileSelected(File file) {\n managerFileDialog.removeFileListener(this);\n //ImportNaimoZipFile(file.getPath());\n new ImportNaimoZipFile(WordListActivity.this,file.getPath()).execute();\n }\n });\n managerFileDialog.showDialog();\n }", "public void loadFile() {\n\t\t\n\t\tString fileloc = \"\";\n\t\tif(!prf.foldername.getText().equals(\"\"))\n\t\t\tfileloc += prf.foldername.getText()+\"/\";\n\t\t\n\t\tString filename = JOptionPane.showInputDialog(null,\"Enter the filename.\");\n\t\tfileloc += filename;\n\t\tFile fl = new File(fileloc);\n\t\t\n\t\tif(!fl.exists()) {\n\t\t\tJOptionPane.showMessageDialog(null, \"The specified file doesnt exist at the given location.\");\n\t\t} else {\n\t\t\tMinLFile nminl = new MinLFile(filename);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tFileReader flrd = new FileReader(fileloc);\n\t\t\t\tBufferedReader bufread = new BufferedReader(flrd);\n\t\t\t\t\n\t\t\t\tnminl.CodeArea.setText(\"\");\n\t\t\t\n\t\t\t\tString str;\n\t\t\t\twhile((str = bufread.readLine()) != null) {\n\t\t\t\t\tDocument doc = nminl.CodeArea.getDocument();\n\t\t\t\t\ttry {\n\t\t\t\t\tdoc.insertString(doc.getLength(), str, null);\n\t\t\t\t\t} catch (BadLocationException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbufread.close();\n\t\t\t\tflrd.close();\n\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\t\t\n\t\t\t\n\t\t\tJComponent panel = nminl;\n\t\t\t\n\t\t\ttabbedPane.addTab(filename, null, panel,\n\t\t\t\t\tfilename);\t\t\n\t\t\ttabbedPane.setMnemonicAt(0, 0);\n\t\t}\t\n\t}", "public static void readFromFileToTextArea() {\n textFile = new File(field.getText());\n Scanner fileScanner;\n try {\n fileScanner = new Scanner(textFile);\n textArea.setText(\"\");\n String line = \"\";\n while (fileScanner.hasNextLine()) {\n line = fileScanner.nextLine() + (fileScanner.hasNextLine() ? \"\\n\" : \"\");\n textArea.append(line);\n originalContent += line;\n }\n fileScanner.close();\n } catch (FileNotFoundException e) {\n // TODO Notify user via GUI JPanelblahblahblah\n System.err.println(\"File '\" + textFile + \"' not found.\");\n e.printStackTrace();\n }\n frame.setTitle(textFile.toString());\n textArea.requestFocus();\n textArea.getDocument().addDocumentListener(new TextAreaChangeListener());\n }", "@FXML\n public void openFile(Event e) {\n String inputData = \"\";\n File file = chooser.showOpenDialog(open.getScene().getWindow());\n\n try {\n inputData = new String(Files.readAllBytes(file.toPath()));\n } catch (IOException error) {\n error.getSuppressed();\n }\n\n input.setFont(Font.font(\"monospaced\"));\n input.setText(inputData);\n\n Stage primary = (Stage) open.getScene().getWindow();\n primary.setTitle(file.getName());\n }", "public void readZip(File f) {\r\n try {\r\n unzip(f);\r\n File file = new File(workplace + \"/temp/USQ_IMAGE\");\r\n File old = new File(workplace + \"/old\");\r\n if(!old.exists())old.mkdir();\r\n if(old.exists()&&old.isFile())old.mkdir();\r\n File files[] = file.listFiles();\r\n for(int i=0 ; i<files.length ; i++){\r\n readFile(files[i]);\r\n }\r\n //new session\r\n createSes(f);\r\n } catch (Exception ex) {\r\n JOptionPane.showMessageDialog(null, \"read zip file failed.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n ex.printStackTrace();\r\n }\r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\tint re = jfc.showOpenDialog(f);\n\t\t\t\tfile = jfc.getSelectedFile();\n\t\t\t\tif (re == 0) {\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tFileReader fr = new FileReader(file);\n\t\t\t\t\t\tint ch;\n\t\t\t\t\t\tString str = \"\";\n\n\t\t\t\t\t\twhile ((ch = fr.read()) != -1) {\n\t\t\t\t\t\t\tstr += (char) ch;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tta.setText(str);\n\t\t\t\t\t\tfr.close();\n\t\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t\tSystem.out.println(ex.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "protected InputStream loadFile(String zipPath) throws Exception {\n\t\treturn Files.newInputStream(Paths.get(zipPath));\n\t}", "public static String readTextFromZip(ZipInputStream zis) throws IOException {\n \t\tByteArrayOutputStream out = readZipEntry(zis);\n \t\tString data = out.toString();\n \t\tout.close();\n \t\treturn data;\n \t}", "static void LeerArchivo(){ \r\n \t//iniciamos el try y si no funciona se hace el catch\r\n\r\n try{ \r\n \t//se crea un objeto br con el archivo de txt\r\n \tBufferedReader br = new BufferedReader( \r\n \tnew FileReader(\"reporte.txt\")\r\n );\r\n String s;\r\n //Mientras haya una linea de texto se imprime\r\n while((s = br.readLine()) != null){ \r\n System.out.println(s);\r\n }\r\n //se cierra el archivo de texto\r\n br.close(); \r\n } catch(Exception ex){\r\n \t//si no funciona se imprime el error\r\n System.out.println(ex); \r\n }\r\n }", "public SourceFile(File file) throws Exception {\r\n\t\t// this.file = file;\r\n\t\tthis.zipFile = new ZipFile(file, \"UTF-8\");\r\n\t}", "void load_from_file(){\n\t\tthis.setAlwaysOnTop(false);\n\t\t\n\t\t/**\n\t\t * chose file with file selector \n\t\t */\n\t\t\n\t\tFileDialog fd = new FileDialog(this, \"Choose a file\", FileDialog.LOAD);\n\t\t\n\t\t//default path is current directory\n\t\tfd.setDirectory(System.getProperty(\"user.dir\"));\n\t\tfd.setFile(\"*.cmakro\");\n\t\tfd.setVisible(true);\n\t\t\n\t\t\n\t\t\n\t\tString filename = fd.getFile();\n\t\tString path = fd.getDirectory();\n\t\tString file_withpath = path + filename;\n\t\t\n\t\t\n\t\tif (filename != null) {\n\t\t\t System.out.println(\"load path: \" + file_withpath);\t\n\t\t\n\t\t\t \n\t\t\t /**\n\t\t\t * read object from file \n\t\t\t */\n\t\t\t\ttry {\n\t\t\t\t\tObjectInputStream in = new ObjectInputStream(new FileInputStream(file_withpath));\n\n\t\t\t\t\tKey_Lists = Key_Lists.copy((key_lists) in.readObject());\n\n\t\t\t\t\tkeys_area.setText(Key_Lists.arraylist_tostring());\t\t\n\t\t\t\t\t\n\t\t\t\t\tin.close();\n\t\t\t\t\t\n\t\t\t\t\tinfo_label.setForeground(green);\n\t\t\t\t\tinfo_label.setText(\"file loaded :D\");\n\t\t\t\t\t\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tinfo_label.setForeground(white);\n\t\t\t\t\tinfo_label.setText(\"wrong file format\");\n\t\t\t\t\tSystem.out.println(\"io exception\");\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tthis.setAlwaysOnTop(true);\n\t\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tFile file = new File(FILE_NAME);\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tFileInputStream fis = openFileInput(FILE_NAME);\n\t\t\t\t\tInputStreamReader isr = new InputStreamReader(fis);\n\t\t\t\t\t\n\t\t\t\t\tchar[] data = new char[fis.available()];\n\t\t\t\t\tisr.read(data);\n\t\t\t\t\t\n\t\t\t\t\tString buf = new String(data);\n\t\t\t\t\ttext.setText(buf);\n\t\t\t\t\t\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "private void addContent(JTextArea t, String f) {\n\t\tString line;\n\t\ttry {\n\n \n\t\t\tInputStream iStream = getClass().getClassLoader()\n\t\t\t\t\t.getResourceAsStream(f);\n\t\t\tInputStreamReader isr = new InputStreamReader(iStream);\n\t\t\tBufferedReader reader = new BufferedReader(isr);\n\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tt.append(line);\n\t\t\t\tt.append(\"\\n\");\n\t\t\t}\n\t\t\tiStream.close();\n\t\t\tisr.close();\n\t\t\treader.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t}\n\t}", "public FileViewer()\n {\n // initialise instance variables\n super(\"File Viewer 1.0\");\n setSize(300,400);\n getContentPane().add(txtIsiFile);\n try{\n txtIsiFile.setText(fl1.bacaFile(\"data.txt\"));\n }catch(Exception e){e.printStackTrace();}\n setVisible(true);\n }", "public static void open() {\n JFileChooser fileChooser;\n String fileContent;\n String path = FileLoader.loadFile(\"path.txt\");\n if (path != null) {\n fileChooser = new JFileChooser(path);\n } else {\n fileChooser = new JFileChooser((FileSystemView.getFileSystemView().getHomeDirectory()));\n }\n\n fileChooser.setDialogTitle(\"Select text file\");\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"Text files\",\"mytxt\");\n fileChooser.addChoosableFileFilter(filter);\n fileChooser.setAcceptAllFileFilterUsed(true);\n\n if (fileChooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {\n path = fileChooser.getSelectedFile().getParent();\n FileLoader.saveFile(\"path.txt\", path, false);\n fileContent = FileLoader.loadFile(fileChooser.getSelectedFile().getAbsolutePath());\n TextEditor.setFileName(fileChooser.getSelectedFile().getAbsolutePath());\n TextEditor.getTextArea().setText(fileContent);\n }\n }", "public void open() {\n\t\tJFileChooser fc = new JFileChooser(\"./\");\n\t\tBufferedReader br = null;\n\t\tFileReader fr = null;\n\t\tfc.showOpenDialog(null);\n\t\ttry {\n\t\t\tfr = new FileReader(fc.getSelectedFile().getAbsolutePath());\n\t\t\tbr = new BufferedReader(fr);\n\t\t\t//make sure textArea is empty\n\t\t\ttextArea.setText(\"\");\n\t\t\t//loop to read all lines in file\n\t\t\twhile(br.readLine() != null) {\n\t\t\t\ttextArea.append(br.readLine() + \"\\n\");\n\t\t\t}\n\t\t}\n\t\tcatch (IOException ie) {\n\t\t\tie.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t\tfr.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (IOException 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}", "public void getFileChooser(){\r\n \r\n FileNameExtensionFilter txtfilter = new FileNameExtensionFilter(\"*.txt\", \"txt\");\r\n //FileNameExtensionFilter pngfilter = new FileNameExtensionFilter(\"*.png\", \"png\");\r\n FileNameExtensionFilter zipfilter = new FileNameExtensionFilter(\"*.zip\", \"zip\");\r\n \r\n final JFileChooser fc = new JFileChooser();\r\n fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\r\n fc.setAcceptAllFileFilterUsed(false);\r\n fc.setDialogTitle(\"Choose directory [USQ_DATA] or File\");\r\n //filter txt and png\r\n //fc.setFileFilter(pngfilter);\r\n fc.setFileFilter(txtfilter);\r\n fc.setFileFilter(zipfilter);\r\n \r\n try{\r\n fc.setCurrentDirectory(new File(workplace));\r\n }catch(Exception e) {\r\n FileSystemView fsv = FileSystemView.getFileSystemView();\r\n wppath = fsv.getDefaultDirectory();\r\n File rd = new File(wppath.getAbsolutePath() + \"/USQ_Reporter.txt\");\r\n rd.delete();\r\n try {\r\n setDir();\r\n } catch (FileNotFoundException ex) {\r\n JOptionPane.showMessageDialog(null, \"file not found.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n } catch (IOException ex) {\r\n JOptionPane.showMessageDialog(null, \"IOException when get file.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }\r\n int returnVal = fc.showOpenDialog(this);\r\n if(returnVal == JFileChooser.APPROVE_OPTION) {\r\n File file = fc.getSelectedFile();\r\n //if txt from zip, dont copy to old\r\n fromzip = false;\r\n if(!file.exists()) {\r\n JOptionPane.showMessageDialog(null, \"file doesn't exist.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n } else if(file.isDirectory()) {\r\n File files[] = file.listFiles();\r\n File old = new File(workplace + \"/old\");\r\n //create old folder\r\n if(!old.exists())old.mkdir();\r\n if(old.exists()&&old.isFile())old.mkdir();\r\n for(int i=0 ; i<files.length ; i++) {\r\n if(files[i].isFile()) {\r\n readFile(files[i]);\r\n if(files[i].getName().equals(\"USQRecorders.txt\"))\r\n createSes(files[i]);\r\n }\r\n }\r\n //delete read in dir\r\n for(int i=0 ; i<files.length ; i++){\r\n boolean b =files[i].delete();\r\n System.out.println(files[i].getAbsolutePath() + \" \" + b);\r\n }\r\n file.delete(); \r\n } else if (file.isFile()) {\r\n File old = new File(workplace + \"/old\");\r\n //create old folder\r\n if(old.exists()&&old.isFile())old.mkdir();\r\n if(!old.exists())old.mkdir();\r\n if(file.getName().endsWith(\".zip\")){fromzip=true;}else{fromzip=false;}\r\n readFile(file);\r\n if(file.getName().equals(\"USQRecorders.txt\"))\r\n createSes(file);\r\n }\r\n \r\n //delete read in file\r\n file.delete();\r\n }\r\n }", "void open() {\n \tJFileChooser fileopen = new JFileChooser();\n int ret = fileopen.showDialog(null, \"Open file\");\n\n if (ret == JFileChooser.APPROVE_OPTION) {\n document.setFile(fileopen.getSelectedFile());\n textArea.setText(document.getContent());\n }\n }", "private void choosefileBtnActionPerformed(ActionEvent evt) {\r\n JFileChooser filechooser = new JFileChooser();\r\n int returnValue = filechooser.showOpenDialog(panel);\r\n if(returnValue == JFileChooser.APPROVE_OPTION) {\r\n filename = filechooser.getSelectedFile().toString();\r\n fileTxtField.setText(filename);\r\n codeFile = filechooser.getSelectedFile();\r\n assemblyreader = new mipstoc.read.CodeReader(codeFile);\r\n inputTxtArea.setText(assemblyreader.getString());\r\n }\r\n \r\n }", "public void openFile() {\n\t\tJFileChooser choose = new JFileChooser();\n\t\t if(choose.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {\n\t\t\t\ttry {\n\t\t\t\t\tFile selectedFile = choose.getSelectedFile();\n\t\t\t\t\tdir=choose.getCurrentDirectory().toString();\n\t\t\t\t\tScanner readFile = new Scanner(selectedFile);\n\t\t\t\t\tif(!frame.textArea.getText().isEmpty()) {\n\t\t\t\t\t\tframe.textArea.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t\twhile(readFile.hasNext()) {\n\t\t\t\t\t\tString currentLine = readFile.nextLine();\n\t\t\t\t\t\tframe.textArea.append(currentLine+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\tframe.setTitle(selectedFile.getName()+\"-Text Editor\");\n\t\t\t\t\tframe.originalText=frame.textArea.getText();\n\t\t\t\t\treadFile.close();\n\t\t\t\t} catch (FileNotFoundException ex) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"File Not Found\");\n\t\t\t\t}\n\n\t\t }\n\t}", "protected void getFile(ZipEntry e) throws IOException {\n String zipName = e.getName();\n switch (mode) {\n case EXTRACT:\n if (zipName.startsWith(\"/\")) {\n if (!warnedMkDir)\n System.out.println(\"Ignoring absolute paths\");\n warnedMkDir = true;\n zipName = zipName.substring(1);\n }\n // if a directory, just return. We mkdir for every file,\n // since some widely-used Zip creators don't put out\n // any directory entries, or put them in the wrong place.\n if (zipName.endsWith(\"/\")) {\n return;\n }\n // Else must be a file; open the file for output\n // Get the directory part.\n int ix = zipName.lastIndexOf('/');\n if (ix > 0) {\n //String dirName = zipName.substring(0, ix);\n String fileName = zipName.substring(ix + 1, zipName.length());\n zipName = fileName;\n\n }\n String targetFile = this.unzipFileTargetLocation;\n File file = new File(targetFile);\n if (!file.exists())\n file.createNewFile();\n FileOutputStream os = null;\n InputStream is = null;\n try {\n os = new FileOutputStream(targetFile);\n is = zippy.getInputStream(e);\n int n = 0;\n while ((n = is.read(b)) > 0)\n os.write(b, 0, n);\n\n } finally {\n if (is != null) {\n try {\n is.close();\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n if (os != null) {\n try {\n os.close();\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n }\n break;\n case LIST:\n // Not extracting, just list\n if (e.isDirectory()) {\n System.out.println(\"Directory \" + zipName);\n } else {\n System.out.println(\"File \" + zipName);\n }\n break;\n default:\n throw new IllegalStateException(\"mode value (\" + mode + \") bad\");\n }\n }", "public void loadFile(){\n returnValue = this.showOpenDialog(null);\n if (returnValue == JFileChooser.APPROVE_OPTION) {\n selected = new File(this.getSelectedFile().getAbsolutePath());\n Bank.customer=(new CustomerFileReader(selected)).readCustomer();\n }\n }", "private void setDownloadButton() throws FileNotFoundException {\r\n Button downloadButton;\r\n if (parent.getParentUI().language.equals(\"Deutsch\")) {\r\n downloadButton = new Button(\"Paket Download\");\r\n } else {\r\n downloadButton = new Button(\"Download Package\");\r\n }\r\n downloadButton.setWidth(\"100%\");\r\n downloadButton.addStyleName(ValoTheme.BUTTON_SMALL);\r\n downloadButton.addStyleName(ValoTheme.LABEL_SMALL);\r\n buttonLayout.addComponent(downloadButton);\r\n buttonLayout.setComponentAlignment(downloadButton, Alignment.TOP_CENTER);\r\n\r\n // get base id of the object in question\r\n String sourceDirPath = valuesMapLocal.get(\"localpath\");\r\n\r\n // zip on the fly\r\n StreamResource myResource4 =\r\n new StreamResource(\r\n new StreamSource() {\r\n private static final long serialVersionUID = 1L;\r\n final ByteArrayOutputStream out = new ByteArrayOutputStream();\r\n\r\n @Override\r\n public InputStream getStream() {\r\n Path directory2 = Paths.get(sourceDirPath);\r\n try (ZipOutputStream zipStream = new ZipOutputStream(out)) {\r\n Files.walk(directory2)\r\n .filter(path -> !Files.isDirectory(path))\r\n .forEach(\r\n path -> {\r\n try {\r\n addToZipStream(\r\n path, zipStream, sourceDirPath);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n });\r\n } catch (IOException e) {\r\n System.out.println(\"Error while zipping.\" + e);\r\n }\r\n return new ByteArrayInputStream(out.toByteArray());\r\n }\r\n },\r\n valuesMapLocal.get(\"digitalObjectId\") + \".zip\");\r\n\r\n FileDownloader fileDownloader3 = new FileDownloader(myResource4);\r\n fileDownloader3.extend(downloadButton);\r\n\r\n downloadButton.addClickListener(\r\n new Button.ClickListener() {\r\n private static final long serialVersionUID = 1L;\r\n\r\n public void buttonClick(ClickEvent event) {\r\n parent.getParentUI().log(\"Click on package download button\");\r\n }\r\n });\r\n }", "public releasetxt(java.awt.Frame parent, boolean modal) {\n super(parent, modal);\n initComponents();\n \n // release.txt einlesen und darstellen\n BufferedReader in = null;\n try {\n in = new BufferedReader(new FileReader(\"release.txt\"));\n String zeile = null;\n while ((zeile = in.readLine()) != null) {\n jTextArea1.append(zeile+\"\\n\");\n System.out.println(\"Gelesene Zeile: \" + zeile);\n }\n jTextArea1.setCaretPosition(0);\n \n } catch (IOException ex) {\n Logger.getLogger(invoiceIT.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n try {\n in.close();\n } catch (IOException ex) {\n Logger.getLogger(invoiceIT.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public FilesInputStreamLoad readFile() throws ArcException {\r\n\tFile dir = new File(this.archiveChargement + \".dir\");\r\n\tString fileName = ManipString.substringAfterFirst(this.idSource, \"_\");\r\n\tFile toRead = new File(dir + File.separator + ManipString.redoEntryName(fileName));\r\n\tFilesInputStreamLoad filesInputStreamLoadReturned = null;\r\n\ttry {\r\n\t\tfilesInputStreamLoadReturned = new FilesInputStreamLoad (toRead);\r\n\t} catch (IOException ioReadException) {\r\n\t\tthrow new ArcException(ioReadException, ArcExceptionMessage.FILE_READ_FAILED, toRead);\r\n\t}\r\n\treturn filesInputStreamLoadReturned;\r\n }", "@FXML\n void loadButtonClicked(ActionEvent event) throws FileNotFoundException\n {\n FileChooser file = new FileChooser();\n\n file.setTitle(\"Load file (.txt)\");\n\n file.getExtensionFilters().addAll(new FileChooser.ExtensionFilter(\"Text Files\", \"*.txt\"));\n\n File selectedFile = file.showOpenDialog(listView.getScene().getWindow());\n\n // Create new file with all info on file, do this in a method\n loadFile(selectedFile);\n\n // Send all this info to the list in order to create new one\n for(int i=0; i<Item.getToDoList().size(); i++)\n {\n // Display items\n display();\n\n }\n }", "void onUnzipCompleted(String output);", "public void Open(){\n\tJFileChooser j = new JFileChooser(\"\"); \n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"txt\", \"TXT\");\n j.setFileFilter(filter); \n\n\t// Invoke the showsOpenDialog function to show the save dialog \n int r = j.showOpenDialog(null); \n\n\t// If the user selects a file \n\tif (r == JFileChooser.APPROVE_OPTION) { \n // Set the label to the path of the selected directory \n File fi = new File(j.getSelectedFile().getAbsolutePath()); \n\n try { \n\t\t// String \n\t\tString s1 = \"\", sl = \"\"; \n\n\t\t// File reader \n\t\tFileReader fr = new FileReader(fi); \n\n\t\t// Buffered reader \n\t\tBufferedReader br = new BufferedReader(fr); \n\n\t\t// Initilize sl \n\t\tsl = br.readLine(); \n\n\t\t// Take the input from the file \n\t\twhile ((s1 = br.readLine()) != null) { \n \t\tsl = sl + \"\\n\" + s1; \n\t\t} \n\n\t\t// Set the text \n\t\tt.setText(sl); \n } \n catch (Exception evt) { \n\t\tJOptionPane.showMessageDialog(f, evt.getMessage()); \n } \n\t} \n\t// If the user cancelled the operation \n\telse\n JOptionPane.showMessageDialog(f, \"the user cancelled the operation\"); \n\t\t\n }", "public static void readZip(String zipPath, boolean sort) throws IOException {\n // Load zip and its entries\n ZipFile zip = new ZipFile(new File(zipPath));\n Enumeration<? extends ZipEntry> entries = zip.entries();\n // Read every entry and load it to the HashMap\n while(entries.hasMoreElements()) {\n ZipEntry zipEntry = entries.nextElement();\n InputStream entryStream = zip.getInputStream(zipEntry);\n //Used only for the decoding mode\n //Compressed file that contains the Coded Data\n if(\"codedData.gz\".equals(zipEntry.getName())){\n FileInputStream in = new FileInputStream(\"codedData.gz\");\n GZIPInputStream gis = new GZIPInputStream(in);\n ObjectInputStream ois = new ObjectInputStream(gis);\n try {\n dataList = (ArrayList<CodedData>) (ois.readObject());\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(ProjectePractiques.class.getName()).log(Level.SEVERE, null, ex);\n }\n }else{\n BufferedImage image = ImageIO.read(entryStream);\n imageNames.add(zipEntry.getName()); \n imageDict.put(zipEntry.getName(), image);\n }\n }\n zip.close();\n // Sort the image names list\n if(sort){\n Collections.sort(imageNames, (String f1, String f2) -> f1.compareTo(f2)); \n }\n }", "public void leseTextEin()\r\n\t{\n\t\tif( this.text != \"\" )\r\n\t\t\treturn;\r\n\t\t\r\n\t StringBuffer buffer = new StringBuffer();\r\n\t BufferedReader input = null;\r\n\t \r\n\t try \r\n\t {\r\n\t \tinput = new BufferedReader( new FileReader(this.dateipfad) );\r\n\t \tString line = null; \r\n\t \twhile ((line=input.readLine()) != null)\r\n\t \t{\r\n\t \t\tbuffer.append(line); \r\n\t \t\tbuffer.append(System.getProperty(\"line.separator\"));\r\n\t \t}\r\n\t }\r\n\t catch (IOException ex)\r\n\t { ex.printStackTrace(); }\r\n\t finally \r\n\t {\r\n\t \ttry\r\n\t \t{\r\n\t \t\tif (input!= null) \r\n\t \t\t\tinput.close();\r\n\t \t}\r\n\t \tcatch (IOException ex)\r\n\t \t{ ex.printStackTrace(); }\r\n\t }\r\n\t this.text = buffer.toString();\r\n\t}", "public ZipDatabase() throws IOException {\r\n int line = 0;\r\n InputStream is = this.getClass().getResourceAsStream(\"zip.txt\");\r\n BufferedReader br = new BufferedReader(new InputStreamReader(is));\r\n String input;\r\n // parses entries of the form:\r\n // 03064,NH,NASHUA\r\n try {\r\n while ((input = br.readLine()) != null) {\r\n line++;\r\n StringTokenizer st = new StringTokenizer(input, \",\");\r\n if (st.countTokens() == 3) {\r\n String zip = st.nextToken();\r\n String state = st.nextToken();\r\n String city = st.nextToken();\r\n city = fixupCase(city);\r\n zipDB.put(zip, new ZipInfo(zip, city, state));\r\n } else {\r\n throw new IOException(\"Bad zip format, line \" + line);\r\n }\r\n }\r\n } finally {\r\n br.close();\r\n }\r\n }", "public static String readFileInZipFolder(String zipFolderPath, String relativeFilePath) {\n\t\tFile file = new File(zipFolderPath);\n\t\tZipFile zipFile = null;\n\t\tString text = \"\";\n\t\tInputStream in = null;\n\t\tOutputStream out = null;\n\t\ttry {\n\t\t\tzipFile = new ZipFile(file);\n\n\t\t\tEnumeration<? extends ZipEntry> entries = zipFile.entries();\n\n\t\t\twhile (entries.hasMoreElements()) {\n\t\t\t\tZipEntry entry = entries.nextElement();\n\t\t\t\tString entryName = entry.getName();\n\t\t\t\tif (entryName.equals(relativeFilePath)) {\n\t\t\t\t\tin = new BufferedInputStream(zipFile.getInputStream(entry));\n\t\t\t\t\tout = new ByteArrayOutputStream();\n\n\t\t\t\t\tbyte[] buf = new byte[1024];\n\t\t\t\t\tint len;\n\t\t\t\t\twhile ((len = in.read(buf)) > 0) {\n\t\t\t\t\t\tout.write(buf, 0, len);\n\t\t\t\t\t}\n\n\t\t\t\t\ttext = out.toString();\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (zipFile != null) {\n\t\t\t\ttry {\n\t\t\t\t\tzipFile.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (out != null) {\n\t\t\t\ttry {\n\t\t\t\t\tout.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn text;\n\n\t}", "public void load(String filename){\n //Create a file if its not already on disk\n File extDir = new File(this.getFilesDir(), filename);\n\n //Read text from file\n StringBuilder text = new StringBuilder();\n\n\n //Needs lots of try and catch blocks because so much can go wrong\n try{\n\n BufferedReader br = new BufferedReader(new FileReader(extDir));\n String line;\n\n while ((line = br.readLine()) != null) {\n text.append(line);\n text.append('\\n');\n }//end while\n\n br.close();//Close the buffer\n }//end try\n catch (FileNotFoundException e){//If file not found on disk here.\n Toast.makeText(this, \"There was no data to load\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n\n catch (IOException e)//If io Exception here\n {\n Toast.makeText(this, \"Error loading file\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }//end catch\n\n\n //Set the data from the file content and conver it to a String\n String data = new String(text);\n\n //Safety first Parse data if available.\n if (data.length() > 0) {\n parseXML(data);\n }\n else\n Toast.makeText(this, \"There is no data to display\", Toast.LENGTH_LONG).show();\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent event)\r\n\t\t{\n\t\t\tString filePath = filePathField.getText();\r\n\t\t\tif(filePath.isBlank())\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Input cannot be blank. Please enter a valid file path.\",\r\n\t\t\t\t\t\t\"Invalid Input\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Create file from given filePath and read through it using Scanner.\r\n\t\t\t\tFile file = new File(filePath);\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tString fileText = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Read contents of file and create string containing all lines of text.\r\n\t\t\t\t\tScanner scan = new Scanner(file);\r\n\t\t\t\t\twhile (scan.hasNextLine())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString line = scan.nextLine() + \"\\n\";\r\n\t\t\t\t\t\tfileText += line;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscan.close();\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Set the text of the text area to the string we just created.\r\n\t\t\t\t\tfilePreviewTextArea.setText(fileText);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Set the cursor/caret position to the top to fix annoying bug where scroll bar is at bottom\r\n\t\t\t\t\tfilePreviewTextArea.setCaretPosition(0);\r\n\t\t\t\t}\r\n\t\t\t\tcatch(FileNotFoundException e)\r\n\t\t\t\t{\r\n\t\t\t\t\tfilePreviewTextArea.setText(\"Could not open file: \" + file.getPath());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public void initialize() {\r\n\t\t\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\tJScrollPane scrollPane = new JScrollPane();\r\n\t\tframe.getContentPane().add(scrollPane, BorderLayout.CENTER);\r\n\t\t\r\n\t\t\r\n\t\tJTextArea textArea = new JTextArea();\r\n\t\ttextArea.setEditable(false);\r\n\t\tscrollPane.setViewportView(textArea);\r\n\t\t\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tframe.getContentPane().add(panel, BorderLayout.SOUTH);\r\n\t\tpanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\r\n\t\t\r\n\t\t\r\n\t\tJButton btnNewButton = new JButton(\"DECRYPT\");\r\n\t\tbtnNewButton.addActionListener(new ActionListener() {\r\n\t\t\t\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tfinal File folder = new File(inputPath);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tString ispis=Readfile.listFilesForFolder(folder, dbPath);\r\n\t\t\t\t\ttextArea.setText(ispis);\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}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tpanel.add(btnNewButton);\r\n\t\t\r\n\t\tJButton btnExport = new JButton(\"EXPORT\");\r\n\t\tbtnExport.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t\tfinal File folder = new File(inputPath);\r\n\t\t\t\ttry {\r\n\t\t\t\t\toutput.listFilesForFolder(folder, dbPath, outputPath, newKey);\r\n\t\t\t\t\t\r\n\t\t\t\t\tFile fileToZip = new File(outputPath+\"/out\");\r\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(outputPath+\"/CompressedOut.zip\");\r\n\t\t\t\t ZipOutputStream zipOut = new ZipOutputStream(fos);\r\n\t\t\t\t Ziper.zipFile(fileToZip, fileToZip.getName(), zipOut);\r\n\t\t\t \r\n\t\t\t zipOut.close();\r\n\t\t\t fos.close();\r\n\t\t\t File brisi=new File(outputPath+\"/out\");\r\n\t\t\t Del.deleteDir(brisi); \r\n\t\t\t\t JOptionPane.showMessageDialog(null,\"Successfully exported!\");\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}\r\n\t\t\t}\r\n\t\t});\r\n\t\tpanel.add(btnExport);\r\n\t}", "@FXML\n void readFromFile(ActionEvent event)throws FileNotFoundException {\n BoxSetting bx = new BoxSetting(devTempBox,devHumBox,presDevBox,maxTempDevBox,minTempDevBox,measTxt,presChart,humidChart,tempChart,tempBox,humidBox,presBox,maxTempBox,minTempBox,meanTempBox,meanHumidBox,meanPresBox,meanMaxTempBox,meanMinTempBox,meanTempBox,meanHumidBox,meanPresBox);\n cityBox.setText(readNameBox.getText());\n bx.fromFileDisp(tc.fromFile(readNameBox.getText()));\n }", "private void readData() {\n try (BufferedReader br = new BufferedReader(new InputStreamReader(getClass().getClassLoader().getResourceAsStream(fileName)))) {\n String line;\n while ((line = br.readLine()) != null) {\n String[] parts = line.split(\",\");\n int zip = Integer.parseInt(parts[0]);\n String name = parts[1];\n\n zipMap.put(zip, name);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "void openFile() {\n\t\tJFileChooser fileChooser = new JFileChooser(desktopPath);\n\t\tint returnVal = fileChooser.showOpenDialog(null);\n if(returnVal == JFileChooser.APPROVE_OPTION) {\n \tString filePath = fileChooser.getSelectedFile().getPath();\n File file = new File(filePath);\n textEditor.setText(\"\");\n try {\n \tScanner in = new Scanner(file);\n \twhile(in.hasNextLine()) {\n \t\ttextEditor.append(in.nextLine()+'\\n');\n \t}\n \tin.close();\n \ttextAreaChanged = false;\n \tsavedFilePath = filePath;\n } catch (Exception ex) {\n \terrorTextArea.setForeground(Color.RED);\n\t\t\t\terrorTextArea.setText(\"Error loding file\");\n\t\t\t}\n }\n\t}", "public void scanZipFile() {\r\n\t\tnew SwingWorker<Void, String>() {\r\n\t\t\tprotected Void doInBackground() throws Exception {\r\n\t\t\t\tZipInputStream zin = new ZipInputStream(new FileInputStream(\r\n\t\t\t\t\t\tzipname));\r\n\t\t\t\tZipEntry entry;\r\n\t\t\t\twhile ((entry = zin.getNextEntry()) != null) {\r\n\t\t\t\t\tpublish(entry.getName());\r\n\t\t\t\t\tzin.closeEntry();\r\n\t\t\t\t}\r\n\t\t\t\tzin.close();\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\tprotected void process(List<String> names) {\r\n\t\t\t\tfor (String name : names)\r\n\t\t\t\t\tfileCombo.addItem(name);\r\n\r\n\t\t\t}\r\n\t\t}.execute();\r\n\t}", "@Test\r\n public void testUnzipArchive() throws Exception {\r\n\r\n\r\n (new ZipUtils(\"Cp866\")).unzipArchive(\r\n \"src/test/resources/archive/testfile.zip\",\r\n \"target/test-classes/import/archive\"\r\n );\r\n\r\n File [] files = (new File(\"target/test-classes/import/archive\")).listFiles();\r\n\r\n boolean found = false;\r\n \r\n for (File file : files) {\r\n if (file.getAbsolutePath().contains(\"Привет, я файло.txt\")) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n assertTrue(found);\r\n\r\n\r\n }", "void importDivision(Connection con, ZipFile zip) throws Exception;", "public ASCTerrain(String zfile) {\n int count;\n try {\n ZipInputStream zis = new ZipInputStream(ASCTerrain.class.getResourceAsStream(\"/assets/\" + zfile));\n ZipEntry ze = zis.getNextEntry();\n System.out.println(\"Opening file: \" + ze.getName());\n byte[] asc = new byte[(int) ze.getSize()];\n count = 0;\n // Read the entire data for the file.\n while (count < ze.getSize()) {\n count += zis.read(asc, count, (int) (ze.getSize() - count));\n }\n process(readFile(asc));\n zis.closeEntry();\n zis.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void downloadZippedDirectory(String selectedFolder) {\n if (selectedFolder != null) {\n File file = getFile(selectedFolder);\n StreamSource zipSource = getZipSource(file);\n getMainWindow().open(new VaadinFileDownloadResource(zipSource, selectedFolder+\".zip\", 0, getMainWindow().getApplication()), \"_self\");\n }\n }", "public void run() {\n try {\n handleZipFiles(file);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public void ExtractFileFromJar()\n\t{\n\t\tString thisDir = getClass().getResource(\"\").getPath();\n\t\t\n\t\tif(thisDir.contains(\"file:\")) //Mac system path\n\t\t\tthisDir= thisDir.replace(\"file:\", \"\");\n\t\telse //Windows system path \"/C:/\", we need to get rid of the first '/'\n\t\t\tthisDir= thisDir.substring(1);\n\t\t\n\t\t//System.out.println(\"thisDir is \"+thisDir);\n\t\tString jarPath = thisDir.replace(\"!/data/\", \"\"); //Get path of jar file\n\t\tint lastSlashIndex = jarPath.lastIndexOf(\"/\");\n\t\tjarFileName = new String(jarPath.substring(lastSlashIndex+1));\n\t\tdestDir = thisDir.replace(jarFileName+\"!/data/\", \"\"); //Set destDir as the current folder in which jar file sits\n\n\t\t//Find Jar file\n\t\ttry {\n\t\t\tFile jarFile = new File(jarPath);\n\t\t\tif (jarFile.isDirectory() || !jarFile.exists()) { //If we cant find jar File in this jarPath\n\t\t\t\t//In windows it is like this \"C:/Users/Esheen/Desktop/ConnChem_1.1.0/Simulation/data/\" \n\t\t\t\tFile newJarfile = new File(jarPath);\n\t\t\t\tString parent = newJarfile.getParentFile().getParent();\n\t\t\t\tparent = parent.concat(new String(\"\\\\\"+jarFileName));\n\t\t\t\t\n\t\t\t\tjarPath= new String(parent);\n\t\t\t\t\n\t\t\t} \n\t\t\tjava.util.jar.JarFile jar = new java.util.jar.JarFile(jarPath);\n\t\t\t\n\t\t\t//Unzip database from jar file\n\t\t\tZipEntry entry = jar.getEntry(\"data/chemdb\");\n\t\t\tFile outputFile = new File(destDir, dbFileName);\n\t\t\t\n\t\t\t\tif (entry.isDirectory()) { // if its a directory, create it\n\t\t\t\t\toutputFile.mkdir();\n\t\t\t\t}\n\t\t\t\tInputStream in = jar.getInputStream(entry);\n\t\t\t\tFileOutputStream fos = new java.io.FileOutputStream(outputFile);\n\t\t\t\twhile (in.available() > 0) { // write contents of 'is' to 'fos'\n\t\t\t\t\tfos.write(in.read());\n\t\t\t\t}\n\t\t\t\tfos.close();\n\t\t\t\tin.close();\n\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\r\n\tpublic void createControl(Composite parent) {\r\n\t\tComposite container = new Composite(parent, SWT.NULL);\r\n\t\t// container.setTouchEnabled(true);\r\n\r\n\t\tsetControl(container);\r\n\r\n\t\tLabel lblAgentName = new Label(container, SWT.NONE);\r\n\t\tlblAgentName.setBounds(102, 54, 177, 13);\r\n\t\tlblAgentName.setText(\"Please enter the ZIP filename :\");\r\n\r\n\t\tfileText = new Text(container, SWT.BORDER);\r\n\t\tfileText.setText(\"C:\\\\Documents and Settings\\\\jlouis\\\\My Documents\\\\Downloads\\\\apache_net.zip\");\r\n\t\tfileText.setBounds(102, 75, 289, 19);\r\n\r\n\t\tButton btnBrowse = new Button(container, SWT.NONE);\r\n\t\tbtnBrowse.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\r\n\t\t\t\tFileDialog fileDialog = new FileDialog(getShell());\r\n\t\t\t\tfileDialog.setFilterPath(System.getProperty(\"user.home\"));\r\n\t\t\t\tfileDialog.setText(\"Please select a zip file and click OK\");\r\n\r\n\t\t\t\tString filename = fileDialog.open();\r\n\t\t\t\tif (filename != null) {\r\n\t\t\t\t\tfileText.setText(filename);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnBrowse.setBounds(102, 100, 68, 23);\r\n\t\tbtnBrowse.setText(\"Browse\");\r\n\t}", "@AutoEscape\n\tpublic String getZip();", "public FilePane(DownloadProvider provider) {\n super();\n this.provider = provider;\n }", "public void openFile() throws IOException {\n\t\tclientOutput.println(\">>> Unesite putanju do fajla fajla koji zelite da otvorite: \");\n\t\tuserInput = clientInput.readLine();\n\n\t\tizabraniF = new File(userInput);\n\n\t\t// Provera tipa fajla (.txt ili binarni)\n\t\tif (izabraniF.getName().endsWith(\".txt\")) {\n\t\t\tBufferedReader br = null;\n\t\t\ttry {\n\t\t\t\tbr = new BufferedReader(new FileReader(userInput));\n\n\t\t\t\tboolean kraj = false;\n\n\t\t\t\twhile (!kraj) {\n\t\t\t\t\tpom = br.readLine();\n\t\t\t\t\tif (pom == null)\n\t\t\t\t\t\tkraj = true;\n\t\t\t\t\telse\n\t\t\t\t\t\tclientOutput.println(pom);\n\t\t\t\t}\n\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tpom = null;\n\t\t\ttry {\n\t\t\t\tFileInputStream fIs = new FileInputStream(izabraniF);\n\t\t\t\tbyte[] b = new byte[(int) izabraniF.length()];\n\t\t\t\tfIs.read(b);\n\t\t\t\tpom = new String(Base64.getEncoder().encode(b), \"UTF-8\");\n\t\t\t\tclientOutput.println(pom);\n\t\t\t\tfIs.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tclientOutput.println(\">>> Fajl nije pronadjen!\");\n\t\t\t}\n\t\t}\n\t}", "public void load() \n throws IOException\n {\n mText = null;\n mTicks.clear();\n \n if (mLoadTicks && isAlreadyTicked()) {\n File tickFile = getTickFile(false);\n ZipFile zip = new ZipFile(tickFile);\n\n String basename = null;\n \n // Find ticked file name from ZIP\n Enumeration<? extends ZipEntry> entries = zip.entries();\n while (entries.hasMoreElements()) {\n ZipEntry entry = entries.nextElement();\n String name = entry.getName();\n int idx = name.indexOf(TickConstants.TICK_ENTRY_EXT);\n if (idx != -1) {\n basename = name.substring(0, idx); \n }\n }\n \n // file\n ZipEntry fileEntry = zip.getEntry(basename);\n byte[] data = FileUtil.load(zip.getInputStream(fileEntry));\n mText = new String(data, \"UTF-8\");\n\n // registry\n mRegistry = new TickRegistry();\n mRegistry.loadDefinitions();\n\n // ticks\n ZipEntry tickEntry = zip.getEntry(basename + TickConstants.TICK_ENTRY_EXT);\n mTicks.addAll(loadTicks(zip.getInputStream(tickEntry)));\n \n mBasename = basename;\n } else {\n byte[] data = FileUtil.load(mFile);\n mText = new String(data, \"UTF-8\");\n mBasename = mFile.getName();\n \n // registry\n mRegistry = new TickRegistry();\n mRegistry.loadDefinitions();\n }\n }", "public void run() {\n UIManager.put(\"swing.boldMetal\", Boolean.FALSE); \n String str = FileChooserDemo.selectFile();\n if (str == null){\n \t\n }else{\n \ttext_field.setText(str);\n }\n }", "private void unzipDownloadedFile(String zipFile) throws ZipException, IOException{\n\t int BUFFER = 2048;\n\t \n\t // get zip file\n\t File file = new File(zipFile);\n\t ZipFile zip = new ZipFile(file);\n\t \n\t // unzip to directory of the same name\n\t // When sip is a directory, this gets two folders\n\t //String newPath = zipFile.substring(0, zipFile.length() - 4);\n\t //new File(newPath).mkdir();\n\t \n\t // unzip to parent directory of the zip file\n\t // This is assuming zip if of a directory\n\t String newPath = file.getParent();\n\t \n\t // Process each entry\n\t Enumeration<? extends ZipEntry> zipFileEntries = zip.entries();\n\t while (zipFileEntries.hasMoreElements())\n\t {\n\t // grab a zip file entry\n\t ZipEntry entry = (ZipEntry) zipFileEntries.nextElement();\n\t String currentEntry = entry.getName();\n\t File destFile = new File(newPath, currentEntry);\n\t File destinationParent = destFile.getParentFile();\n\n\t // create the parent directory structure if needed\n\t destinationParent.mkdirs();\n\n\t if (!entry.isDirectory())\n\t {\n\t BufferedInputStream is = new BufferedInputStream(zip.getInputStream(entry));\n\t int currentByte;\n\t // establish buffer for writing file\n\t byte data[] = new byte[BUFFER];\n\n\t // write the current file to disk\n\t FileOutputStream fos = new FileOutputStream(destFile);\n\t BufferedOutputStream dest = new BufferedOutputStream(fos,\n\t BUFFER);\n\n\t // read and write until last byte is encountered\n\t while ((currentByte = is.read(data, 0, BUFFER)) != -1) {\n\t dest.write(data, 0, currentByte);\n\t }\n\t dest.flush();\n\t dest.close();\n\t is.close();\n\t }\n\n\t if (currentEntry.endsWith(\".zip\"))\n\t {\n\t // found a zip file, try to open\n\t \tunzipDownloadedFile(destFile.getAbsolutePath());\n\t }\n\t }\n\t zip.close();\n\t}", "void loadArticleMenuItem_actionPerformed(ActionEvent e) {\n\n // Action from Open... Show the OpenFileDialog\n openFileDialog.show();\n String fileName = openFileDialog.getFile();\n\n if (fileName != null) {\n NewsArticle art = new NewsArticle(fileName);\n\n art.readArticle(fileName);\n articles.addElement(art);\n filterAgent.score(art, filterType); // score the article\n refreshTable();\n articleTextArea.setText(art.getBody());\n articleTextArea.setCaretPosition(0); // move cursor to start of article\n }\n }", "public void load_from_file() {\r\n // prompting file name from user\r\n System.out.print(\"Enter in FileName:\\n>\");\r\n\r\n // taking user input of file name\r\n String filename = Menu.sc.next();\r\n Scanner input;\r\n\r\n // try to open file, if fails throws exception and returns to main menu\r\n try {\r\n input = new Scanner(new FileReader(filename));\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Unable to open file!!\");\r\n System.out.println();\r\n return;\r\n }\r\n\r\n int count = 0; // variable to count number of address entry read\r\n\r\n /* reading data until end of file */\r\n while (input.hasNextLine()) {\r\n String firstName = \"\", lastName = \"\", street = \"\", city = \"\", state = \"\", email = \"\", phone = \"\";\r\n int zip = 0;\r\n if (input.hasNextLine())\r\n firstName = input.nextLine();\r\n if (input.hasNextLine())\r\n lastName = input.nextLine();\r\n if (input.hasNextLine())\r\n street = input.nextLine();\r\n if (input.hasNextLine())\r\n city = input.nextLine();\r\n if (input.hasNextLine())\r\n state = input.nextLine();\r\n if (input.hasNextLine())\r\n zip = Integer.parseInt(input.nextLine());\r\n if (input.hasNextLine())\r\n phone = input.nextLine();\r\n if (input.hasNext())\r\n email = input.nextLine();\r\n if (input.hasNext())\r\n input.nextLine();\r\n addressEntryList.add(new AdressEntry(firstName, lastName, street, city, state, zip, phone, email));\r\n count++;\r\n }\r\n\r\n /*\r\n printing number of address entry variables\r\n and printing total number of AddressEntry in the list\r\n */\r\n System.out.println(\"Read in \" + count + \" new Addresses, successfully loaded, currently \"\r\n + addressEntryList.size() + \" Addresses\");\r\n input.close();\r\n System.out.println();\r\n }", "public void seleccionarArchivo(){\n JFileChooser j= new JFileChooser();\r\n FileNameExtensionFilter fi= new FileNameExtensionFilter(\"pdf\",\"pdf\");\r\n j.setFileFilter(fi);\r\n int se = j.showOpenDialog(this);\r\n if(se==0){\r\n this.txtCurriculum.setText(\"\"+j.getSelectedFile().getName());\r\n ruta_archivo=j.getSelectedFile().getAbsolutePath();\r\n }else{}\r\n }", "public GestorArchivos(String numeroArchivo)\r\n {\r\n this.rutaArchivoEntrada = new File(\"archivostexto/in/in\" + numeroArchivo + \".txt\").getAbsolutePath().replace(\"\\\\\", \"/\");\r\n this.rutaArchivoSalida = new File(\"archivostexto/out/out\" + numeroArchivo + \".txt\").getAbsolutePath().replace(\"\\\\\", \"/\");\r\n }", "public void abrirArchivo() {\r\n try {\r\n entrada = new Scanner(new File(\"estudiantes.txt\"));\r\n } // fin de try\r\n catch (FileNotFoundException fileNotFoundException) {\r\n System.err.println(\"Error al abrir el archivo.\");\r\n System.exit(1);\r\n } // fin de catch\r\n }", "private void openFile() {\n\t\t\n\t\n\t\t\t\n\t\tFile file = jfc.getSelectedFile();\n\t\tint a = -1;\n\t\tif(file==null&&!jta.getText().equals(\"\"))\n\t\t{\n\t\t\ta = JOptionPane.showConfirmDialog(this, \"저장?\");\n\t\t\n\t\t}\n\t\tswitch (a){\n\t\tcase 0:\n\t\t\ttry {\n\t\t\t\tint c = -1;\n\t\t\t\tif(file==null)\n\t\t\t\t{\n\t\t\t\t\tc = jfc.showSaveDialog(this);\n\t\t\t\t}\n\t\t\t\tif(file!= null || c ==0)\n\t\t\t\t{\t\n\t\t\t\t\tFileWriter fw = new FileWriter(jfc.getSelectedFile());\n\t\t\t\t\tfw.write(jta.getText());\n\t\t\t\t\tfw.close();\n\t\t\t\t\tSystem.out.println(\"파일을 저장하였습니다\");\n\t\t\t\t}\n\t\t\t} catch (Exception e2) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tSystem.out.println(e2.getMessage());\n\t\t\t}\n\t\tbreak;\n\t\tcase 1:\n\t\t\ttry {\n\t\t\t\tint j=-1;\n\t\t\t\tif(file==null)\n\t\t\t\t{\n\t\t\t\t\tj = jfc.showOpenDialog(this);\n\t\t\t\t}\n\t\t\t\tif(file!= null || j == 1)\n\t\t\t\t{\t\n\t\t\t\t\tFileReader fr = new FileReader(file);\n\n\t\t\t\t\tString str=\"\";\n\t\t\t\t\twhile((j=fr.read())!=-1)\n\t\t\t\t\t{\n\t\t\t\t\t\tstr = str+(char)j;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tjta.setText(str);\n\t\t\t\t\t\n\t\t\t\t\tsetTitle(file.getName());\n\t\t\t\t\t\n\t\t\t\t\tfr.close();\n\t\t\t\t}\n\t\t\t}\t\n\t\t\tcatch (Exception e2) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tSystem.out.println(e2.getMessage());\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tint d= jfc.showOpenDialog(this);\n\t\t\n\t\tif(d==0)\n\t\t\ttry {\n\t\t\t\tFileReader fr = new FileReader(jfc.getSelectedFile());\n\t\t\t\tint l;\n\t\t\t\tString str=\"\";\n\t\t\t\twhile((l=fr.read())!=-1)\n\t\t\t\t{\n\t\t\t\t\tstr = str+(char)l;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tjta.setText(str);\n\t\t\t\t\n\t\t\t\tfr.close();\n\t\n\t\t\t\t\t\n\t\t\t} catch (Exception e2) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tSystem.out.println(e2.getMessage());\n\t\t\t}\n\t}", "private void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "private void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "private static void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "private void updateDataPreview(File file) throws IOException {\n\n\t\t\tfileLabel.setText(\"\");\n\t\t\tString fileName = file.getName();\n\n\t\t\tStringBuilder contents = new StringBuilder();\n\t\t\tBufferedReader reader = null;\n\n\t\t\ttry {\n\t\t\t\treader = new BufferedReader(new InputStreamReader(\n\t\t\t\t\t\tnew FileInputStream(file), Charsets.getUtf8()));\n\t\t\t\tString text;\n\t\t\t\tint lineCount = 0;\n\t\t\t\t// read at most 20 lines\n\t\t\t\twhile ((text = reader.readLine()) != null && lineCount < 20) {\n\t\t\t\t\tcontents.append(text)\n\t\t\t\t\t\t\t.append(System.getProperty(\"line.separator\"));\n\t\t\t\t\tlineCount++;\n\t\t\t\t}\n\n\t\t\t\tStringBuilder fileInfo = new StringBuilder();\n\n\t\t\t\tif (fileName.length() > 20) {\n\t\t\t\t\tfileInfo.append(fileName.substring(0, 20));\n\t\t\t\t\tfileInfo.append(\"..\");\n\t\t\t\t} else {\n\t\t\t\t\tfileInfo.append(fileName);\n\t\t\t\t}\n\n\t\t\t\tfileLabel.setText(fileInfo.toString());\n\n\t\t\t\tif (contents.length() == 0) {\n\t\t\t\t\tcontents.append(app.getLocalization()\n\t\t\t\t\t\t\t.getMenu(\"PreviewUnavailable\"));\n\t\t\t\t}\n\n\t\t\t\tdataPreviewPanel.setText(contents.toString());\n\t\t\t\tdataPreviewPanel.setCaretPosition(0);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (reader != null) {\n\t\t\t\t\t\treader.close();\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}", "public FilesArchived(File rootDir, String zip) {\n this.root = rootDir;\n this.compression = (\"zstd\".equals(zip)) ? Compression.ZSTD : Compression.GZIP;\n rescan();\n Thread thread = new Thread(this::run);\n thread.setDaemon(true);\n thread.setName(\"FilesArchived-maintainer\");\n thread.start();\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\ttry {\n\t\t\t\tString path = IOHandler.loadFile();\n\t\t\t\tif (path != null) {\n\t\t\t\t\tFile f = new File(path);\n\t\t\t\t\tScanner scanner = new Scanner(f);\n\t\t\t\t\tString key = scanner.nextLine();\n\t\t\t\t\tString input = \"\";\n\t\t\t\t\tif (view.isCBCMode()) {\n\t\t\t\t\t\tString iv = scanner.nextLine();\n\t\t\t\t\t\tview.setIV(iv);\n\t\t\t\t\t}\n\t\t\t\t\twhile (scanner.hasNextLine())\n\t\t\t\t\t\tinput += scanner.nextLine() + \"\\n\";\n\t\t\t\t\tscanner.close();\n\t\t\t\t\tview.setKey(key);\n\t\t\t\t\tview.setInputArea(input);\n\t\t\t\t}\n\t\t\t} catch (FileNotFoundException fnf) {\n\t\t\t\tview.displayErrorMessage(\"Error: File not found!\");\n\t\t\t}\n\t\t}", "public void unZip(String apkFile) throws Exception \r\n\t{\r\n\t\tLog.p(tag, apkFile);\r\n\t\tFile file = new File(apkFile);\r\n\t\r\n\t\t/*\r\n\t\t * Create the Base Directory, whose name should be same as Zip file name.\r\n\t\t * All decompressed contents will be placed under this folder.\r\n\t\t */\r\n\t\tString apkFileName = file.getName();\r\n\t\t\r\n\t\tif(apkFileName.indexOf('.') != -1)\r\n\t\t\tapkFileName = apkFileName.substring(0, apkFileName.indexOf('.'));\r\n\t\t\r\n\t\tLog.d(tag, \"Folder name: \"+ apkFileName);\r\n\t\t\r\n\t\tFile extractFolder = new File((file.getParent() == null ? \"\" : file.getParent() + File.separator) + apkFileName);\r\n\t\tif(!extractFolder.exists())\r\n\t\t\textractFolder.mkdir();\r\n\t\t\r\n\t\t/*\r\n\t\t * Read zip entries.\r\n\t\t */\r\n\t\tFileInputStream fin = new FileInputStream(apkFile);\r\n\t\tZipInputStream zin = new ZipInputStream(new BufferedInputStream(fin));\r\n\t\t\r\n\t\t/*\r\n\t\t * Zip InputStream shifts its index to every Zip entry when getNextEntry() is called.\r\n\t\t * If this method returns null, Zip InputStream reaches EOF.\r\n\t\t */\r\n\t\tZipEntry ze = null;\r\n\t\tBufferedOutputStream dest;\r\n\t\t\r\n\t\twhile((ze = zin.getNextEntry()) != null)\r\n\t\t{\r\n\t\t\tLog.d(tag, \"Zip entry: \" + ze.getName() + \" Size: \"+ ze.getSize());\r\n\t\t\t/*\r\n\t\t\t * Create decompressed file for each Zip entry. A Zip entry can be a file or directory.\r\n\t\t\t * ASSUMPTION: APK Zip entry uses Unix style File seperator- \"/\"\r\n\t\t\t * \r\n\t\t\t * 1. Create the prefix Zip Entry folder, if it is not yet available\r\n\t\t\t * 2. Create the individual Zip Entry file.\r\n\t\t\t */\r\n\t\t\tString zeName = ze.getName();\r\n\t\t\tString zeFolder = zeName;\r\n\t\t\t\r\n\t\t\tif(ze.isDirectory())\r\n\t\t\t{\r\n\t\t\t\tzeName = null; // Don't create Zip Entry file\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tif(zeName.indexOf(\"/\") == -1) // Zip entry uses \"/\"\r\n\t\t\t\t\tzeFolder = null; // It is File. don't create Zip entry Folder\r\n\t\t\t\telse {\r\n\t\t\t\t\tzeFolder = zeName.substring(0, zeName.lastIndexOf(\"/\"));\r\n\t\t\t\t\tzeName = zeName.substring( zeName.lastIndexOf(\"/\") + 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tLog.d(tag, \"zeFolder: \"+ zeFolder +\" zeName: \"+ zeName);\r\n\t\t\t\r\n\t\t\t// Create Zip Entry Folder\r\n\t\t\tFile zeFile = extractFolder;\r\n\t\t\tif(zeFolder != null)\r\n\t\t\t{\r\n\t\t\t\tzeFile = new File(extractFolder.getPath() + File.separator + zeFolder);\r\n\t\t\t\tif(!zeFile.exists())\r\n\t\t\t\t\tzeFile.mkdirs();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Create Zip Entry File\r\n\t\t\tif(zeName == null)\r\n\t\t\t\tcontinue;\r\n\t\t\t\r\n\t\t\t// Keep track of XML files, they are in Android Binary XML format\r\n\t\t\tif(zeName.endsWith(\".xml\"))\r\n\t\t\t\txmlFiles.add(zeFile.getPath() + File.separator + zeName);\r\n\t\t\t\r\n\t\t\t// Keep track of the Dex/ODex file. Need to convert to Jar\r\n\t\t\tif(zeName.endsWith(\".dex\") || zeName.endsWith(\".odex\"))\r\n\t\t\t\tdexFile = zeFile.getPath() + File.separator + zeName;\r\n\t\t\t\r\n\t\t\t// Keep track of Resources.arsc file- resources.arsc\r\n\t\t\tif(zeName.endsWith(\".arsc\"))\r\n\t\t\t\tresFile = zeFile.getPath() + File.separator + zeName;\r\n\t\t\t\r\n\t\t\t// Write Zip entry File to the disk\r\n\t\t\tint count;\r\n\t\t\tbyte data[] = new byte[BUFFER];\r\n\t\t\t\r\n\t\t\tFileOutputStream fos = new FileOutputStream(zeFile.getPath() + File.separator + zeName);\r\n\t\t\tdest = new BufferedOutputStream(fos, BUFFER);\r\n\r\n\t\t\twhile ((count = zin.read(data, 0, BUFFER)) != -1) \r\n\t\t\t{\r\n\t\t\t\tdest.write(data, 0, count);\r\n\t\t\t}\r\n\t\t\tdest.flush();\r\n\t\t\tdest.close();\r\n\t\t}\r\n\r\n\t\t// Close Zip InputStream\r\n\t\tzin.close();\r\n\t\tfin.close();\r\n\t}", "public Resource cargarArchivo(String nombreArchivo) throws MalformedURLException;", "private void loadButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_loadButtonMouseClicked\n // open file dialog\n FileDialog dialog = new FileDialog(this, \"Choisir le fichier dictionnaire\", FileDialog.LOAD);\n dialog.setFile(\"*.txt\");\n dialog.setVisible(true);\n \n String filename = dialog.getFile();\n if(filename != null) // if user selected a file\n {\n filename = dialog.getDirectory() + filename;\n lexiNodeTrees = DictioFileOperations.loadListFromFile(filename);\n \n if(lexiNodeTrees != null) // if list was successfully retrieved\n {\n loadedDictionaryFilename = filename;\n refreshAllWordsList();\n \n // clear text area and search suggestion\n searchSuggestionList.setModel(new DefaultListModel());\n definitionTextArea.setText(\"\");\n searchField.setText(\"\");\n }\n \n else // if file could not be loaded, show error dialog\n JOptionPane.showMessageDialog(this, \"ERREUR: Le fichier n'a \"\n + \"pas pu être chargé!\\n\\nVérifiez que le fichier est \"\n + \"valid est contient <<mot & définition>> sur toutes \"\n + \"les lignes\\n\\n\", \"ERREUR\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public void leeArchivo() throws IOException {\n // defino el objeto de Entrada para tomar datos\n BufferedReader brwEntrada;\n try {\n // creo el objeto de entrada a partir de un archivo de texto\n brwEntrada = new BufferedReader(new FileReader(\"datos.txt\"));\n } catch (FileNotFoundException e) {\n // si marca error es que el archivo no existia entonces lo creo\n File filPuntos = new File(\"datos.txt\");\n PrintWriter prwSalida = new PrintWriter(filPuntos);\n // le pongo datos ficticios o de default\n // lo cierro para que se grabe lo que meti al archivo\n prwSalida.close();\n // lo vuelvo a abrir porque el objetivo es leer datos\n brwEntrada = new BufferedReader(new FileReader(\"datos.txt\"));\n }\n // con el archivo abierto leo los datos que estan guardados\n brwEntrada.close();\n }", "public void openFile() {\n\t\tfc.setCurrentDirectory(new File(System.getProperty(\"user.dir\")));\n\t\tint returnVal = fc.showOpenDialog(null);\n\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile file = fc.getSelectedFile();\n\t filename.setText(file.getName());\n\t try {\n\t\t\t\tmodel.FileContent(file);\t//read the content of the input file\n\t\t\t\tplotContent.repaint();\t//repaint the JComponent\n\t\t\t\t\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void openItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openItemActionPerformed\n if (fileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {\n File file = fileChooser.getSelectedFile();\n String t = \"\";\n if (file.isFile()) {\n if ((file.getName().toLowerCase().endsWith(\".jpg\")\n || file.getName().toLowerCase().endsWith(\".png\"))) {\n files.add(file.getAbsolutePath());\n flist.add(file);\n } else if (file.getName().toLowerCase().endsWith(\".pdf\")) {\n parsePDF(file.getAbsolutePath());\n flist.add(file);\n }\n t += file.getAbsolutePath() + \"\\n\";\n } else {\n for (File f : file.listFiles()) {\n if (f.isFile() && (f.getName().toLowerCase().endsWith(\".jpg\")\n || f.getName().toLowerCase().endsWith(\".png\"))) {\n files.add(f.getAbsolutePath());\n flist.add(f);\n t += f.getAbsolutePath() + \"\\n\";\n } else if (f.isFile() && f.getName().toLowerCase().endsWith(\".pdf\")) {\n parsePDF(f.getAbsolutePath());\n flist.add(f);\n t += f.getAbsolutePath() + \"\\n\";\n }\n }\n }\n textArea.setText(t);\n } else {\n System.out.println(\"File access cancelled.\");\n }\n }", "private void entryFileButtonActionPerformed(java.awt.event.ActionEvent evt) {\n JFileChooser chooser = new JFileChooser();\n chooser.setDialogTitle(\"Select Entries File\");\n File workingDirectory = new File(System.getProperty(\"user.dir\"));\n chooser.setCurrentDirectory(workingDirectory);\n if (chooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) {\n entryFile = chooser.getSelectedFile();\n entryFileLabel.setText(getFileName(entryFile));\n pcs.firePropertyChange(\"ENTRY\", null, entryFile);\n }\n }", "public void connect() throws IOException {\r\n this.zipFile = new ZipFile(file);\r\n this.zipEntry = zipFile.getEntry(zipEntryName);\r\n if (zipEntry == null)\r\n throw new IOException(\"Entry \" + zipEntryName + \" not found in file \" + file);\r\n this.connected = true;\r\n }", "public AppGenALexicos(File f) {\n initComponents();\n String cadena = \"\";\n try {\n FileReader fr = new FileReader(f);\n try (BufferedReader br = new BufferedReader(fr)) {\n while ((cadena = br.readLine()) != null) {\n jTextArea1.append(cadena + \"\\n\");\n }\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(AppCompiladores.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(AppCompiladores.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n public void onClick(View arg0) {\n\n File f=new File(e1.getText().toString());\n\n String s=\"\";\n StringBuilder sb=new StringBuilder();\n FileReader fr = null;\n try {\n fr = new FileReader(f);\n\n } catch (FileNotFoundException e) {\n\n//\tTODO Auto-generated catch block\n\n e.printStackTrace();\n }\n BufferedReader br=new BufferedReader(fr);\n try {\n while((s=br.readLine())!=null)\n {\n sb.append(s+\"\\n\");\n }\n } catch (IOException e) {\n\n// TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n Toast.makeText(getApplicationContext(), \"File ReadSuccessfully\", Toast.LENGTH_LONG).show();\n e2.setText(sb);\n }", "protected void onPostExecute(String filename) {\r\n\t\t\t// dismiss the dialog once got all details\r\n\t\t\tpDialog.dismiss();\r\n\t\t\ttampil.loadData(html, \"text/html\", \"UTF-8\");\r\n\t\t\t// tampil.setText(html));\r\n\r\n\t\t}", "public void loadRecentPaneFiles() {\r\n // create streams\r\n \r\n boolean exists = (new File(fileWithFileListOfPaneRecentFiles)).exists();\r\nif (exists) {\r\n \r\n try {\r\n // open the file containing the stored list of recent files\r\n FileInputStream input = new FileInputStream(fileWithFileListOfPaneRecentFiles);\r\n \r\n //create reader stream\r\n BufferedReader recentsReader= new BufferedReader(new InputStreamReader(input));\r\n\r\n recentPaneFiles.clear(); // clear the Vector of recent files\r\n String currentLine; // refill it from disk\r\n while ((currentLine = recentsReader.readLine()) != null)\r\n if (recentPaneFiles.indexOf(currentLine) == -1) // file not already in list\r\n recentPaneFiles.add(currentLine);\r\n\r\n recentsReader.close();\r\n input.close();\r\n updateRecentPaneFilesMenu(); // update the recent files menu\r\n\r\n }\r\n catch(java.io.IOException except)\r\n {\r\n System.out.println(\"IO exception in readRecentsFiles. File: \"+fileWithFileListOfPaneRecentFiles+\" not found\");\r\n recentPaneFilesMenu.removeAll(); // clear previous menu items\r\n clearRecentFilesJMenuItem = new JMenuItem(\"Clear the list of recent files\");\r\n clearRecentFilesJMenuItem.addActionListener(new ActionListener() {\r\n\r\n public void actionPerformed(ActionEvent e) {\r\n recentPaneFiles.clear();\r\n recentPaneFilesMenu.removeAll();\r\n }\r\n });\r\n\r\n recentPaneFilesMenu.add(clearRecentFilesJMenuItem);\r\n mainJMenuBar.add(recentPaneFilesMenu); // finally add the recent files menu to the main menu bar\r\n \r\n }\r\n }\r\n }", "private static void extractFile(ZipInputStream inStreamZip, FSDataOutputStream destDirectory) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(destDirectory);\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = inStreamZip.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }", "private static void taskContentsFileRestore() {\n try {\n String taskContentsFilePath;\n BufferedReader taskContentsLocation = new BufferedReader(new FileReader(FILE_PATH_CONTENT));\n taskContentsFilePath = taskContentsLocation.readLine();\n\n if (taskContentsFilePath != null) {\n PrintWriter taskContentsWriter = new PrintWriter(taskContentsFilePath);\n for (String content : fileContent) {\n taskContentsWriter.println(content);\n }\n taskContentsWriter.close();\n }\n taskContentsLocation.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void unzip(Context context, InputStream zipFile) {\n try (BufferedInputStream bis = new BufferedInputStream(zipFile)) {\n try (ZipInputStream zis = new ZipInputStream(bis)) {\n ZipEntry ze;\n int count;\n byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];\n while ((ze = zis.getNextEntry()) != null) {\n try (FileOutputStream fout = context.openFileOutput(ze.getName(), Context.MODE_PRIVATE)) {\n while ((count = zis.read(buffer)) != -1)\n fout.write(buffer, 0, count);\n }\n }\n }\n } catch (IOException | NullPointerException ex) {\n Log.v(MainActivity.TAG, \"Zip not opened.\\n\"+ex.getMessage());\n }\n }", "public void save(){\n\tif(currentFile == null){\n\t // TODO: add popup to select where to save file and file name\n\t // currentFile = new TextFile(os, title, null);\n\t}else{\n\t currentFile.setBody(textArea.getText());\n\t}\n }", "public void LoadTxt(File Arquivo) {\n if (Arquivo.exists()) {\r\n\r\n try {\r\n\r\n FileReader FR = new FileReader(Arquivo);\r\n BufferedReader BW = new BufferedReader(new InputStreamReader(new FileInputStream(Arquivo.getAbsolutePath()), \"ISO-8859-1\"));\r\n\r\n //BufferedReader BW = new BufferedReader(FR);\r\n\r\n String dados;\r\n String[] paraArray = new String[3];\r\n String matricula;\r\n \r\n String serie = Arquivo.getName();\r\n int pos = serie.lastIndexOf(\".\");\r\n if (pos > 0) {\r\n serie = serie.substring(0, pos);\r\n }\r\n\r\n Sala novaSala = new Sala(serie); //CRIANDO SALA COM NOME DE TURMA\r\n salas2.add(novaSala); // ADICIONANDO SALA NA LISTA DE SALAS\r\n while ((dados = BW.readLine()) != null) {\r\n paraArray = dados.split(\";\");\r\n\r\n matricula = /*Integer.parseInt*/ (paraArray[0]);\r\n //senha = /*Integer.parseInt*/(paraArray[2]);\r\n Dados novoDado = new Dados(matricula, paraArray[1], paraArray[2]);\r\n\r\n novoDado.setSerie(serie); //ADICIONANDO TURMA AO DADO\r\n novaSala.getDadosalas().add(novoDado); //ADICIONANDO DADOS A LISTA DE DADOS QUE ESTA EM SALA\r\n\r\n }\r\n \r\n\r\n BW.close();\r\n FR.close();\r\n\r\n } catch (Exception e) {\r\n System.out.println(\"Erro ao carregar arquivo acima\");\r\n System.out.println(e.getMessage());\r\n\r\n }\r\n\r\n } else {\r\n System.out.println(\"Nenhum arquivo de dados encontrado\");\r\n }\r\n\r\n }", "private static String extractTextFromFile(InputStream is, FormStackInfo info, \n\t\t\t\t\t\t\t\t\t\t\tString password, String title) throws IOException {\n\t\tInputStreamReader isr = new InputStreamReader(is);\n\t\tBufferedReader reader = new BufferedReader(isr);\n\t\tString linetext = \"\";\n\t\tString fulltext = \"\";\n\t\t\n\t\t// We read the file line by line\n\t\twhile ((linetext = reader.readLine()) != null) {\n\t\t\tfulltext += linetext; //Appends the line to the Full Text\n\t\t}\n\t\tfulltext = fulltext.replace(\"$CourseTitle\", title)\n\t\t\t\t\t\t\t.replace(\"$Email\", info.getEmail())\n\t\t\t\t\t\t\t.replace(\"$Password\", password);\n\t\treturn fulltext;\n\t}", "public void fileLoaderMethod(String filename) {\n\t\t\n\t\tString fileloc = \"\";\n\t\tif(!prf.foldername.getText().equals(\"\"))\n\t\t\tfileloc += prf.foldername.getText()+\"/\";\n\t\t\n\t\tfileloc += filename;\n\t\tFile fl = new File(fileloc);\n\t\t\n\t\tString code = \"\";\n\t\t\n\t\tif(!fl.exists()) {\n\t\t\tJOptionPane.showMessageDialog(null, \"The specified file doesnt exist at the given location.\");\n\t\t} else {\t\n\t\t\ttry {\n\t\t\t\tFileReader flrd = new FileReader(fileloc);\n\t\t\t\tBufferedReader bufread = new BufferedReader(flrd);\t\t\n\t\t\t\tString str;\n\t\t\t\twhile((str = bufread.readLine()) != null) {\n\t\t\t\t\tcode += str + \"\\n\";\n\t\t\t\t}\t\t\n\t\t\t\tbufread.close();\n\t\t\t\tflrd.close();\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\t\n\t\tinterpretorMainMethod(code, 0);\n\t}", "@FXML\n void importFromFile() {\n generalTextArea.clear();\n clearEverything();\n\n try {\n FileChooser chooser = new FileChooser();\n chooser.setTitle(\"Open Source File for the Import\");\n chooser.getExtensionFilters().addAll(new FileChooser.ExtensionFilter(\"Text Files\", \"*.txt\"));\n Stage stage = new Stage();\n File sourceFile = chooser.showOpenDialog(stage); //get the reference of the source file\n Scanner input = new Scanner(sourceFile);\n\n while (input.hasNextLine()) {\n String line = input.nextLine();\n handleImportLines(line);\n }\n input.close();\n\n } catch (IOException | NullPointerException ex) {\n generalTextArea.appendText(\"There was an error with accessing your imported file. Please try with a valid file. \\n\");\n return;\n }\n generalTextArea.appendText(\"Successfully imported database\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jButtonSelectFile = new javax.swing.JButton();\n jTextField = new javax.swing.JTextField();\n jButtonUpload = new javax.swing.JButton();\n textArea = new java.awt.TextArea();\n jLabel3 = new javax.swing.JLabel();\n textArea1 = new java.awt.TextArea();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel1.setBackground(new java.awt.Color(255, 255, 255));\n jLabel1.setFont(new java.awt.Font(\"Berlin Sans FB\", 1, 24)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"ANALIZADOR LÉXICO\");\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 10, -1, 40));\n\n jLabel2.setFont(new java.awt.Font(\"Tw Cen MT Condensed Extra Bold\", 1, 48)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 153));\n jLabel2.setText(\"MiniPHP\");\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 40, 200, 53));\n\n jButtonSelectFile.setFont(new java.awt.Font(\"Trebuchet MS\", 1, 12)); // NOI18N\n jButtonSelectFile.setText(\"SELECCIONAR ARCHIVO\");\n jButtonSelectFile.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButtonSelectFileMouseClicked(evt);\n }\n });\n jButtonSelectFile.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonSelectFileActionPerformed(evt);\n }\n });\n getContentPane().add(jButtonSelectFile, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 120, 170, 40));\n\n jTextField.setEditable(false);\n getContentPane().add(jTextField, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 120, 340, 40));\n\n jButtonUpload.setFont(new java.awt.Font(\"Trebuchet MS\", 1, 12)); // NOI18N\n jButtonUpload.setText(\"ANALIZAR ARCHIVO\");\n jButtonUpload.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonUploadActionPerformed(evt);\n }\n });\n getContentPane().add(jButtonUpload, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 180, 170, 40));\n\n textArea.setEditable(false);\n getContentPane().add(textArea, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 260, 290, 210));\n\n jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/background/590x300.jpg\"))); // NOI18N\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 590, 260));\n\n textArea1.setEditable(false);\n getContentPane().add(textArea1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 260, 290, 210));\n\n pack();\n }", "void selectFile(){\n JLabel lblFileName = new JLabel();\n fc.setCurrentDirectory(new java.io.File(\"saved\" + File.separator));\n fc.setDialogTitle(\"FILE CHOOSER\");\n FileNameExtensionFilter xmlfilter = new FileNameExtensionFilter(\n \"json files (*.json)\", \"json\");\n fc.setFileFilter(xmlfilter);\n int response = fc.showOpenDialog(this);\n if (response == JFileChooser.APPROVE_OPTION) {\n lblFileName.setText(fc.getSelectedFile().toString());\n }else {\n lblFileName.setText(\"the file operation was cancelled\");\n }\n System.out.println(fc.getSelectedFile().getAbsolutePath());\n }", "@Override\r\n public void extractArchive(ArchiveExtractor decompressor) throws ArcException {\r\n\r\n\tString fileName = ManipString.substringAfterFirst(this.idSource, \"_\");\r\n\r\n\tboolean uncompressInProgress=false;\r\n\tFile dir = new File(this.archiveChargement + \".dir\");\r\n\tif (!dir.exists()) {\r\n\t\ttry {\r\n\t\t if (dir.mkdir())\r\n\t\t {\r\n\t\t \tStaticLoggerDispatcher.debug(LOGGER,\"$$\"+Thread.currentThread().getId()+\" is decompressing \"+dir.getAbsolutePath());\r\n\t\t \tdecompressor.extract(this.archiveChargement);\r\n\t\t \tuncompressInProgress=true;\r\n\t\t }\r\n\t\t}\r\n\t\t catch (Exception ex)\r\n\t\t{\r\n\t\t\t throw new ArcException(ex, ArcExceptionMessage.FILE_EXTRACT_FAILED, this.archiveChargement).logFullException();\r\n\t\t}\r\n\t}\r\n\t\r\n\tif (!uncompressInProgress) {\r\n\t\t\t// check if file exists\r\n\t File toRead = new File(dir + File.separator + ManipString.redoEntryName(fileName));\r\n\t while (!toRead.exists()) {\r\n\t \ttry {\r\n\t\t\t\tThread.sleep(MILLISECOND_UNCOMPRESSION_CHECK_INTERVAL);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\tThread.currentThread().interrupt();\r\n\t\t\t StaticLoggerDispatcher.error(LOGGER, \"Error in thread sleep extractArchive()\");\r\n\t\t\t}\r\n\t \ttoRead = new File(dir + File.separator + ManipString.redoEntryName(fileName));\r\n\t }\r\n\t}\r\n\r\n\r\n\t\r\n }", "private void grabarArchivo() {\n\t\tPrintWriter salida;\n\t\ttry {\n\t\t\tsalida = new PrintWriter(new FileWriter(super.salida));\n\t\t\tsalida.println(this.aDevolver);\n\t\t\tsalida.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void get_text() {\n InputStream inputStream = JsonUtil.class.getClassLoader().getResourceAsStream(\"data.txt\");\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\n StringBuilder sb = new StringBuilder();\n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line);\n }\n } catch (Exception e) {\n e.printStackTrace();\n System.out.println(e.getMessage());\n }\n this.text = sb.toString().trim();\n }", "private void openFile(File file){\r\n\t\ttry {\r\n\t\t\tlocal.openFile(file);\r\n\t\t\topenFile = file;\r\n\t\t\tframe.setTitle(file.getName());\r\n\t\t\tedit = false;\r\n\t\t\tBibtexPrefs.addOpenedFile(file);\r\n\t\t\tpopulateRecentMenu();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\terrorDialog(e.toString());\r\n\t\t} catch (IllegalArgumentException e){\r\n\t\t\terrorDialog(\"The bibtex file \" +file.getPath()+ \" appears to be invalid.\\n\"\r\n\t\t\t\t\t+ \"Parsing error occured because you have the following in your file:\\n\"\r\n\t\t\t\t\t+e.getMessage());\r\n\t\t}\r\n\t}", "private void load(FileInputStream input) {\n\t\t\r\n\t}", "public String loadFromFile() {\n StringBuilder sb = new StringBuilder();\n try {\n Log.d(\"DEBUG\", this.context.getPackageName());\n Log.d(\"DEBUG\", this.file);\n FileInputStream fis = context.openFileInput(file);\n BufferedReader br = new BufferedReader(new InputStreamReader(fis, this.encoding));\n String line;\n while(( line = br.readLine()) != null ) {\n sb.append( line );\n sb.append( '\\n' );\n }\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n return sb.toString();\n }", "void loadProducts(String filename);", "private void addFileToTarGz(TarArchiveOutputStream tOut, String path, String base) throws IOException {\n File f = new File(path);\n String entryName = base + f.getName();\n TarArchiveEntry tarEntry = new TarArchiveEntry(f, entryName);\n tOut.putArchiveEntry(tarEntry);\n Platform.runLater(() -> fileLabel.setText(\"Processing \" + f.getPath()));\n\n if (f.isFile()) {\n FileInputStream fin = new FileInputStream(f);\n IOUtils.copy(fin, tOut);\n fin.close();\n tOut.closeArchiveEntry();\n } else {\n tOut.closeArchiveEntry();\n File[] children = f.listFiles();\n if (children != null) {\n for (File child : children) {\n addFileToTarGz(tOut, child.getAbsolutePath(), entryName + \"/\");\n }\n }\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\treadFromFile(excelname);\n\t\t\t}" ]
[ "0.59036225", "0.58296096", "0.57938695", "0.57304543", "0.5714483", "0.5661321", "0.56310093", "0.5516618", "0.54578453", "0.5441189", "0.53521216", "0.5340722", "0.5319838", "0.53143555", "0.529607", "0.52940667", "0.52751404", "0.52004963", "0.5176933", "0.51694846", "0.5159609", "0.51588786", "0.51458585", "0.51419145", "0.5095966", "0.508559", "0.50825125", "0.5080901", "0.505826", "0.5033566", "0.50260794", "0.5022435", "0.50143063", "0.5013288", "0.50077856", "0.49929088", "0.4986515", "0.49804917", "0.4973837", "0.49662673", "0.4953485", "0.49507865", "0.49463493", "0.49250534", "0.4920367", "0.4918483", "0.49086982", "0.4903353", "0.49006742", "0.4898327", "0.48921514", "0.48911974", "0.48902547", "0.48860115", "0.4873921", "0.48672715", "0.4857395", "0.48452967", "0.48289678", "0.48283356", "0.48282972", "0.48182246", "0.48177275", "0.4812427", "0.4812427", "0.48053032", "0.4797842", "0.47942916", "0.47886628", "0.47842434", "0.47820073", "0.47808683", "0.4758176", "0.47573164", "0.4749509", "0.47484463", "0.47315633", "0.47122824", "0.47097912", "0.47090217", "0.4707936", "0.47074506", "0.4705579", "0.4704141", "0.46954992", "0.46905366", "0.46887556", "0.46857288", "0.46833166", "0.46775594", "0.4674435", "0.46739635", "0.46720585", "0.46652845", "0.46631104", "0.46620417", "0.46482965", "0.46476823", "0.46454677", "0.46430558" ]
0.7689719
0
private constructor for singleton pattern
private ExampleSubsystem() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Singleton(){}", "private Singleton()\n\t\t{\n\t\t}", "private Singleton() {\n\t}", "private Singleton() { }", "private SingletonObject() {\n\n\t}", "private Singleton(){\n }", "private SingletonSample() {}", "private SingletonSigar(){}", "private LazySingleton(){}", "private Instantiation(){}", "private SparkeyServiceSingleton(){}", "private SingletonEager(){\n \n }", "private J2_Singleton() {}", "private Singleton() {\n if (instance != null){\n throw new RuntimeException(\"Use getInstance() to create Singleton\");\n }\n }", "private SingletonDoubleCheck() {}", "private LazySingleton() {\n if (null != INSTANCE) {\n throw new InstantiationError(\"Instance creation not allowed\");\n }\n }", "private LoggerSingleton() {\n\n }", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "private EagerlySinleton()\n\t{\n\t}", "private EagerInitializedSingleton() {\n\t}", "private EagerInitializedSingleton() {\n\t}", "private InnerClassSingleton(){}", "private MySingleton() {\r\n\t\tSystem.out.println(\"Only 1 object will be created\");\r\n\t}", "private InstanceUtil() {\n }", "private Utils()\n {\n // Private constructor to prevent instantiation\n }", "private Singleton2A(){\n\t\tif(instance != null){\n\t\t\tthrow new RuntimeException(\"One instance already created cant create other\");\n\t\t}\t\t\n\t\tSystem.out.println(\"I am private constructor\");\n\t}", "private Util()\n {\n // Empty default ctor, defined to override access scope.\n }", "private MApi() {}", "private SingleObject()\r\n {\r\n }", "private ObjectFactory() { }", "Reproducible newInstance();", "private Service() {}", "private SingletonClass() {\n x = 10;\n }", "private EagerInitializationSingleton() {\n\t}", "public SingletonVerifier() {\n }", "private LOCFacade() {\r\n\r\n\t}", "private SingleTon() {\n\t}", "private TagCacheManager(){\n //AssertionError不是必须的. 但它可以避免不小心在类的内部调用构造器. 保证该类在任何情况下都不会被实例化.\n //see 《Effective Java》 2nd\n throw new AssertionError(\"No \" + getClass().getName() + \" instances for you!\");\n }", "private StreamFactory()\n {\n /*\n * nothing to do\n */\n }", "private SingleObject(){\n }", "private Utils() {\n\t}", "private Utils() {\n\t}", "private Supervisor() {\r\n\t}", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "private Singleton()\r\n\t{\r\n\t\tSystem.out.println(\"1st instance of class Singleton created\");\r\n\t\tstr = \"Constructor init\";\r\n\t}", "private SingletonAR() {\n System.out.println(Thread.currentThread().getName()\n + \": creating SingletonAR\");\n }", "private SingleObject(){}", "private SingletonH() {\n System.out.println(Thread.currentThread().getName()\n + \": creating SingletonH\");\n }", "private Utility() {\n\t}", "private ResourceFactory() {\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}", "private ChainingMethods() {\n // private constructor\n\n }", "private BusquedaMaker() {\n\t\tinit();\n\t}", "private LocatorFactory() {\n }", "private FeedRegistry() {\n // no-op for singleton pattern\n }", "private SystemInfo() {\r\n // forbid object construction \r\n }", "private Util() {\n }", "private PermissionUtil() {\n throw new IllegalStateException(\"you can't instantiate PermissionUtil!\");\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private SnapshotUtils() {\r\n\t}", "private GeneralServicesImpl() {\r\n\t}", "private PerksFactory() {\n\n\t}", "private Util() {\n }", "private Util() {\n }", "private QcTestRunner()\n\t{\n\t\t// To prevent external instantiation of this class\n\t}", "private StaticData() {\n\n }", "private A(){\n System.out.println(\"Instance created\");\n }", "private Registry() {\n dbgLog.fine(\"Registry constructor is called\");\n }", "public StubPrivateConstructorPair() {\r\n this(null, null);\r\n }", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private SingletonClass() {\n objects = new ArrayList<>();\n }", "private FixtureCache() {\n\t}", "private JsonUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "private Mocks() { }", "private ObjectRepository() {\n\t}", "private FlowExecutorUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "private FactoryCacheValet() {\n\t\tsuper();\n\t}", "private Marinator() {\n }", "private Marinator() {\n }", "private SingletonLectorPropiedades() {\n\t}", "private DPSingletonLazyLoading(){\r\n\t\tthrow new RuntimeException();//You can still access private constructor by reflection and calling setAccessible(true)\r\n\t}", "private PropertySingleton(){}", "private Settings()\n {}", "private Util() { }", "private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }", "private DataManager() {\n }", "private BookmarkStore() {\n }", "private Settings() {}", "private UtilsCache() {\n\t\tsuper();\n\t}", "private ArticleMgr() {\r\n\r\n\t}", "private Settings() { }", "private WolUtil() {\n }", "private PropertiesLoader() {\r\n\t\t// not instantiable\r\n\t}" ]
[ "0.85439694", "0.8541998", "0.85217637", "0.84979975", "0.8401996", "0.8252496", "0.80485964", "0.8003059", "0.7978344", "0.7873491", "0.78097016", "0.771452", "0.77120113", "0.76974905", "0.7689763", "0.768853", "0.75913125", "0.7542409", "0.7521589", "0.74739224", "0.74739224", "0.74610335", "0.7454551", "0.74529004", "0.74502075", "0.744219", "0.7438429", "0.7306188", "0.73014975", "0.7278911", "0.72427255", "0.7233501", "0.7222116", "0.72110903", "0.7204741", "0.7170457", "0.71555996", "0.71471584", "0.7146263", "0.7142714", "0.71191597", "0.71191597", "0.7118613", "0.7116459", "0.71077055", "0.70891", "0.7071217", "0.70682937", "0.7065206", "0.70623475", "0.7052142", "0.7036933", "0.70278376", "0.7018609", "0.70115584", "0.69868255", "0.6979713", "0.69691724", "0.69563866", "0.69552773", "0.69552773", "0.69552773", "0.69552773", "0.69552773", "0.69484717", "0.69464296", "0.6938793", "0.69323486", "0.69323486", "0.6928245", "0.6924339", "0.69025487", "0.6901289", "0.6900454", "0.6899524", "0.6899524", "0.6899524", "0.6899524", "0.6897112", "0.6888032", "0.6880826", "0.687193", "0.6871489", "0.68648434", "0.68565196", "0.6851398", "0.6851398", "0.6842329", "0.6835132", "0.68202174", "0.68186307", "0.6818314", "0.68169606", "0.6816328", "0.6815292", "0.6815057", "0.6810234", "0.6799228", "0.6792369", "0.6791994", "0.6789574" ]
0.0
-1
===================================================================================== Public Methods =====================================================================================
@Override public void initDefaultCommand() { // Set the default command for a subsystem here. // setDefaultCommand(new MySpecialCommand()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "public final void mo51373a() {\n }", "private stendhal() {\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\t\tprotected void saveContext() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n protected void init() {\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override public int describeContents() { return 0; }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\r\n protected void end() {\r\n\r\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic int describeContents() {\n\t\t\t\treturn 0;\n\t\t\t}", "@Override\n protected void prot() {\n }", "@Override\n\t\t\tpublic void end() {\n\t\t\t\t\n\t\t\t}", "@Override\n public void initialize() {\n \n }", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n protected void end() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n void init() {\n }", "@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\r\n\tpublic void init() {}", "@Override\n\t\tprotected void reset()\n\t\t{\n\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\n\t\t\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n protected void execute() {\n \n }", "@Override\n\t\tpublic void close() {\n\t\t\t\n\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\t\t\tpublic void reset() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void init() {}", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n protected void initData() {\n }", "@Override\n protected void initData() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }" ]
[ "0.61833036", "0.61277515", "0.6067942", "0.5951925", "0.593585", "0.58820736", "0.5869487", "0.5869487", "0.5869487", "0.5869487", "0.5869487", "0.5869487", "0.5856861", "0.58395684", "0.58160895", "0.5794771", "0.57859266", "0.57859266", "0.5785857", "0.5776638", "0.5775704", "0.5775704", "0.5750373", "0.57491857", "0.5736836", "0.5700425", "0.56950104", "0.56950104", "0.56895757", "0.56825197", "0.5682063", "0.56702286", "0.56671715", "0.56633455", "0.5652352", "0.5649458", "0.5611811", "0.5604213", "0.56026506", "0.5592095", "0.5586294", "0.5579943", "0.5579943", "0.5579943", "0.5579943", "0.5579943", "0.5579943", "0.5578112", "0.5578112", "0.55588067", "0.555719", "0.5552976", "0.55485487", "0.55456275", "0.55456275", "0.5545622", "0.55449617", "0.5542234", "0.55398136", "0.55373335", "0.5535473", "0.5533794", "0.5529796", "0.55253774", "0.55253774", "0.55253774", "0.55253774", "0.5520284", "0.55184644", "0.5517707", "0.5515871", "0.5515871", "0.5513205", "0.55117095", "0.5505695", "0.5505695", "0.5505695", "0.55010235", "0.5500011", "0.54985416", "0.54985416", "0.54936594", "0.54936594", "0.5491583", "0.5489278", "0.54854846", "0.54840523", "0.5470717", "0.547006", "0.546838", "0.546838", "0.5458508", "0.5453074", "0.544766", "0.5444965", "0.5442448", "0.54411894", "0.54411894", "0.5430441", "0.5430441", "0.5430441" ]
0.0
-1
===================================================================================== Special Methods for ISubsystem =====================================================================================
@Override public void updateLogData(LogDataBE logData) { //logData.AddData("Carriage: LimitSwitch", String.valueOf(get_isCubeInCarriage())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected String getSubsystem() {\n return subsystem;\n }", "public PnuematicSubsystem() {\n\n }", "public ChassisSubsystem() {\n \tleftMotor.setInverted(RobotMap.leftMotorInverted);\n \trightMotor.setInverted(RobotMap.rightMotorInverted);\n \tleftMiniCIM.setInverted(RobotMap.leftMiniCIMInverted);\n \trightMiniCIM.setInverted(RobotMap.rightMiniCIMInverted);\n }", "public static Subsystem getWpiSubsystem()\n {\n if ( ourInstance == null )\n {\n throw new IllegalStateException( myName + \" Not Constructed Yet\" );\n }\n return (Subsystem) ourInstance;\n }", "public IRSensorSubsystem() {\n\n }", "private ExampleSubsystem()\n {\n\n }", "public DriveSubsystem() {\n }", "public interface Subsystem {\n public String getName();\n public boolean isInitialized();\n public void init();\n public void destroy();\n}", "public static SubsystemNodeContainer createSubsystemNodeContainer() {\n Map<String, String> properties = new HashMap<String, String>();\n properties.put(\"String\", \"String\");\n TransferHandler handler = new TransferHandler(\"\");\n SubsystemNodeContainer snc = null;\n try {\n snc = new SubsystemNodeContainer(AccuracyTestHelper.createGraphNodeForSubsystem(), properties, handler);\n } catch (IllegalGraphElementException e) {\n TestCase.fail(\"Should not throw exception here.\");\n }\n return snc;\n }", "public final SubSystem getSubSystem(){\n return this.peripheralSubSystem;\n }", "public interface SubsystemEnum {\n\n SubsystemBase getSubsystem();\n\n}", "public interface CustomerSubsystem {\n\t/** Use for loading order history,\n\t * default addresses, default payment info,\n\t * saved shopping cart,cust profile\n\t * after login*/\n public void initializeCustomer(Integer id, int authorizationLevel) throws BackendException;\n\n /**\n * Returns true if user has admin access\n */\n public boolean isAdmin();\n\n\n /**\n * Use for saving an address created by user\n */\n public void saveNewAddress(Address addr) throws BackendException;\n\n /**\n * Use to supply all stored addresses of a customer when he wishes to select an\n\t * address in ship/bill window. Requires a trip to the database.\n\t */\n public List<Address> getAllAddresses() throws BackendException;\n\n /** Used whenever a customer name needs to be accessed, after login */\n public CustomerProfile getCustomerProfile();\n\n /** Used when ship/bill window is first displayed, after login */\n public Address getDefaultShippingAddress();\n\n /** Used when ship/bill window is first displayed, after login */\n public Address getDefaultBillingAddress();\n\n /** Used when payment window is first displayed (after login) */\n public CreditCard getDefaultPaymentInfo();\n /**\n\n /**\n\t * Runs address rules and returns the cleansed address.\n * If a RuleException is thrown, this represents a validation error\n * and the error message should be extracted from the exception and displayed\n */\n public Address runAddressRules(Address addr) throws RuleException, BusinessException;\n\n /**\n * Runs payment rules;\n * if a RuleException is thrown, this represents a validation error\n * and the error message should be extracted and displayed\n */\n public void runPaymentRules(Address addr, CreditCard cc) throws RuleException, BusinessException;\n\n /**\n\t * Customer Subsystem is responsible for obtaining all the data needed by\n\t * Credit Verif system -- it does not (and should not) rely on the\n\t * controller for this data.\n\t */\n\tpublic void checkCreditCard() throws BusinessException;\n\n\n /**\n * Returns this customer's order history, stored in the Customer Subsystem (not\n * read from the database). Used by other subsystems\n * to read current user's order history (not used during login process)\n * */\n public List<Order> getOrderHistory();\n\n\n\n\n\n\n /**\n * Stores address as shipping address in this customer's shopping cart\n\t */\n public void setShippingAddressInCart(Address addr);\n\n /**\n * Stores address as billing address in this customer's shopping cart\n\t */\n public void setBillingAddressInCart(Address addr);\n\n /** Stores credit card in this customer's shopping cart */\n public void setPaymentInfoInCart(CreditCard cc);\n\n\n /**\n * Called when user submits final order -- customer sends its shopping cart to order subsystem\n\t * and order subsystem extracts items from shopping cart and prepares order\n\t */\n public void submitOrder() throws BackendException;\n\n /**\n * After an order is submitted, the list of orders cached in CustomerSubsystemFacade\n * will be out of date; this method should cause order data to be reloaded\n */\n public void refreshAfterSubmit() throws BackendException;\n\n /**\n\t * Used whenever the shopping cart needs to be displayed\n\t */\n public ShoppingCartSubsystem getShoppingCart();\n\n /**\n\t * Saves shopping cart to database\n\t */\n public void saveShoppingCart() throws BackendException;\n\n\n\n\n\n // TESTING\n public DbClassAddressForTest getGenericDbClassAddress();\n public CustomerProfile getGenericCustomerProfile();\n\n}", "private static void setSubsystems()\n {\n //Components\n //Talons\n frontLeftTalon.setName(\"DrivetrainSubsystem\", \"FrontLeftDriveTalon\");\n frontRightTalon.setName(\"DrivetrainSubsystem\", \"FrontRightDriveTalon\");\n rearLeftTalon.setName(\"DrivetrainSubsystem\", \"RearLeftDriveTalon\");\n rearRightTalon.setName(\"DrivetrainSubsystem\", \"RearRightDriveTalon\");\n //Sensors\n //navX.setName(\"SensorSubsystem\", \"NavX\");\n System.out.print(pigeon.getAbsoluteCompassHeading());\n \n //Subsystems\n drivetrainSubsystem.setName(\"DrivetrainSubsystem\", \"DrivetrainSubsystem\");\n sensorSubsystem.setName(\"SensorSubsystem\", \"SensorSubsystem\");\n }", "public ShoppingCartSubsystem getShoppingCart();", "public VisionSubsystem() {\n\n }", "public interface OsSystemCycle extends EcucContainer {\n}", "org.hyperflex.roscomponentmodel.System getSystem();", "public DriveSubsystem() {\n\t\tJaguar frontLeftCIM = new Jaguar(RobotMap.D_FRONT_LEFT_CIM);\n\t\tJaguar rearLeftCIM = new Jaguar(RobotMap.D_REAR_LEFT_CIM);\n\t\tJaguar frontRightCIM = new Jaguar(RobotMap.D_FRONT_RIGHT_CIM);\n\t\tJaguar rearRightCIM = new Jaguar(RobotMap.D_REAR_RIGHT_CIM);\n\t\t\n\t\tdrive = new RobotDrive(frontLeftCIM, rearLeftCIM, frontRightCIM, rearRightCIM);\n\t}", "public static IElbowSubsystem getInstance()\n {\n if ( ourInstance == null )\n {\n throw new IllegalStateException( myName + \" Not Constructed Yet\" );\n }\n return ourInstance;\n }", "public interface Software extends Item, Technical\r\n{\r\n\t/**\r\n\t * A list of services provided by software\r\n\t * This is used in signals and messages between\r\n\t * software.\r\n\t *\r\n\t * @author Bo Zimmerman\r\n\t *\r\n\t */\r\n\tpublic enum SWServices\r\n\t{\r\n\t\tTARGETING,\r\n\t\tIDENTIFICATION,\r\n\t\tCOORDQUERY\r\n\t}\r\n\r\n\t/**\r\n\t * The parent menu that this software gets access from.\r\n\t * When Software is available from root, \"\" is returned.\r\n\t * @return parent menu that this software gets access from\r\n\t */\r\n\tpublic String getParentMenu();\r\n\r\n\t/**\r\n\t * The parent menu that this software gets access from.\r\n\t * When Software is available from root, \"\" is set.\r\n\t *\r\n\t * @param name parent menu that this software gets access from\r\n\t */\r\n\tpublic void setParentMenu(String name);\r\n\r\n\t/**\r\n\t * Returns the internal name of this software.\r\n\t * @return the internal name of this software.\r\n\t */\r\n\tpublic String getInternalName();\r\n\r\n\t/**\r\n\t * The internal name of this software.\r\n\t *\r\n\t * @param name the internal name of this software.\r\n\t */\r\n\tpublic void setInternalName(String name);\r\n\r\n\t/**\r\n\t * Returns settings specific to this disk.\r\n\t *\r\n\t * @see Software#setSettings(String)\r\n\t *\r\n\t * @return settings\r\n\t */\r\n\tpublic String getSettings();\r\n\r\n\t/**\r\n\t * Sets settings specific to this disk.\r\n\t *\r\n\t * @see Software#getSettings()\r\n\t *\r\n\t * @param settings the new settings\r\n\t */\r\n\tpublic void setSettings(final String settings);\r\n\r\n\t/**\r\n\t * Returns whether the given computer-entry command\r\n\t * should be responded to by THIS software object\r\n\t * on an activation command.\r\n\t * @param word the computer-entry command entered\r\n\t * @return true if this software should respond.\r\n\t */\r\n\tpublic boolean isActivationString(String word);\r\n\r\n\t/**\r\n\t * Returns whether the given computer-entry command\r\n\t * should be responded to by THIS software object\r\n\t * on a deactivation command.\r\n\t * @param word the computer-entry command entered\r\n\t * @return true if this software should respond.\r\n\t */\r\n\tpublic boolean isDeActivationString(String word);\r\n\r\n\t/**\r\n\t * Returns whether the given computer-entry command\r\n\t * should be responded to by THIS software object\r\n\t * on a WRITE/ENTER command.\r\n\t * @param word the computer-entry command\r\n\t * @param isActive true if the software is already activated\r\n\t * @return true if this software can respond\r\n\t */\r\n\tpublic boolean isCommandString(String word, boolean isActive);\r\n\r\n\t/**\r\n\t * Returns the menu name of this software, so that it can\r\n\t * be identified on its parent screen.\r\n\t * @return the menu name of this software\r\n\t */\r\n\tpublic String getActivationMenu();\r\n\r\n\t/**\r\n\t * Adds a new message to the screen from this program, which\r\n\t * will be received by those monitoring the computer\r\n\t * @see Software#getScreenMessage()\r\n\t * @see Software#getCurrentScreenDisplay()\r\n\t * @param msg the new message for the screen\r\n\t */\r\n\tpublic void addScreenMessage(String msg);\r\n\r\n\t/**\r\n\t * Returns any new messages from this program when\r\n\t * it is activated and on the screen. Seen by those\r\n\t * monitoring the computer.\r\n\t * @see Software#addScreenMessage(String)\r\n\t * @see Software#getCurrentScreenDisplay()\r\n\t * @return the new screen messages\r\n\t */\r\n\tpublic String getScreenMessage();\r\n\r\n\t/**\r\n\t * Returns the full screen appearance of this program when\r\n\t * it is activated and on the screen. Only those intentially\r\n\t * looking at the screen again, or forced by the program, will\r\n\t * see this larger message.\r\n\t * @see Software#addScreenMessage(String)\r\n\t * @see Software#getScreenMessage()\r\n\t * @return the entire screen message\r\n\t */\r\n\tpublic String getCurrentScreenDisplay();\r\n\r\n\t/**\r\n\t * Software runs on computers, and computers run on power systems.\r\n\t * This method tells the software what the power system \"circuit\" key\r\n\t * is that the computer host is running on, allowing the software to\r\n\t * find other equipment on the same circuit and control it.\r\n\t * @param key the circuit key\r\n\t */\r\n\tpublic void setCircuitKey(String key);\r\n\r\n\t/**\r\n\t * An internal interface for various software procedure\r\n\t * classes, allowing software to be more \"plug and play\".\r\n\t * \r\n\t * @author BZ\r\n\t *\r\n\t */\r\n\tpublic static interface SoftwareProcedure\r\n\t{\r\n\t\tpublic boolean execute(final Software sw, final String uword, final MOB mob, final String unparsed, final List<String> parsed);\r\n\t}\r\n}", "public void registerSubsystem(Subsystem subsystem) {\n register((Object) subsystem);\n\n subsystems.put(subsystem.getName(), subsystem);\n }", "public interface ISystem extends INonFlowObject {\n\n}", "@Override\n public final EntitySubSystem getSubSystem(String subsystemName)\n {\n for (EntitySubSystem subSystem : subSystems)\n {\n if (subSystem.getSubSystemName().toLowerCase().equals(subsystemName.toLowerCase()))\n return subSystem;\n }\n\n return null;\n }", "public HangerSubsystem() {\n // WRITE CODE BETWEEN THESE LINES -------------------------------------------------------- //\n // TODO: configure and initialize motor (if necessary)\n\n // TODO: configure and initialize sensor (if necessary)\n\n // ^^-----------------------------------------------------------------------------------^^ //\n }", "public interface ComponentSystem {\n /**\n * AddListener's common function, according event type to add certain listener\n * \n * @param listener listener to be add\n */\n public void addListener(EventListener listener);\n\n /**\n * @return listener type\n */\n public ListenerType getListenerType();\n\n /**\n * Set the component name\n * \n * @param name name of component\n */\n public void setComponentName(ComponentName name);\n\n /**\n * @return component name\n */\n public ComponentName getComponentName();\n}", "private PowerSubsystem() {\n mPdp = new PowerDistributionPanel(0);\n addChild(\"PowerDistributionPanel\",mPdp);\n }", "public boolean isSubsystemWorking() {\n return isWorking;\n }", "public PIDSubsystem(PIDController controller) {\r\n this(controller, 0);\r\n }", "public UnitSystems GetCurrentUnitSystem()\n {\n return MethodsCommon.GetSystemFromUnit(Unit, false, true);\n }", "public AlmaStatus(AdvancedComponentClient _client,SubsystemStatus _SubsystemStatus) {\n\t\tsuper(_client);\n\t\tthis.SubsystemStatus = _SubsystemStatus;\n\t\t// TODO Auto-generated constructor stub\n\t}", "@Override\r\n\tpublic boolean OC_supportSub()\r\n\t{\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic List<IOCBox> OC_getSubs()\r\n\t{\n\t\treturn null;\r\n\t}", "@Test\n public void testSubsystem1_1() throws Exception {\n KernelServices servicesA = super.createKernelServicesBuilder(createAdditionalInitialization())\n .setSubsystemXml(readResource(\"keycloak-1.1.xml\")).build();\n Assert.assertTrue(\"Subsystem boot failed!\", servicesA.isSuccessfulBoot());\n ModelNode modelA = servicesA.readWholeModel();\n super.validateModel(modelA);\n }", "public interface Windows { \n\n\t/**\n\t * Alter this object properties\n\t * Facultative parameters ? false\n\t * @param null New object properties\n\t * @param serviceName The name of your Windows license\n\t*/\n\tvoid putServiceNameServiceInfos(net.zyuiop.ovhapi.api.objects.services.Service param0, java.lang.String serviceName) throws java.io.IOException;\n\n\t/**\n\t * Get this object properties\n\t * Facultative parameters ? false\n\t * @param serviceName The name of your Windows license\n\t*/\n\tnet.zyuiop.ovhapi.api.objects.license.windows.Windows getServiceName(java.lang.String serviceName) throws java.io.IOException;\n\n\t/**\n\t * Terminate your service\n\t * Facultative parameters ? false\n\t * @param serviceName The name of your Windows license\n\t*/\n\tjava.lang.String postServiceNameTerminate(java.lang.String serviceName) throws java.io.IOException;\n\n\t/**\n\t * release this Option\n\t * Facultative parameters ? false\n\t * @param serviceName The name of your Windows license\n\t * @param label This option designation\n\t*/\n\tnet.zyuiop.ovhapi.api.objects.license.Task deleteServiceNameOptionLabel(java.lang.String serviceName, java.lang.String label) throws java.io.IOException;\n\n\t/**\n\t * List available services\n\t * Facultative parameters ? false\n\t*/\n\tjava.lang.String[] getLicenseWindows() throws java.io.IOException;\n\n\t/**\n\t * Get the orderable Windows versions\n\t * Facultative parameters ? false\n\t * @param ip Your license Ip\n\t*/\n\tnet.zyuiop.ovhapi.api.objects.license.WindowsOrderConfiguration[] getOrderableVersions(java.lang.String ip) throws java.io.IOException;\n\n\t/**\n\t * Get this object properties\n\t * Facultative parameters ? false\n\t * @param serviceName The name of your Windows license\n\t*/\n\tnet.zyuiop.ovhapi.api.objects.services.Service getServiceNameServiceInfos(java.lang.String serviceName) throws java.io.IOException;\n\n\t/**\n\t * tasks linked to this license\n\t * Facultative parameters ? true\n\t * @param serviceName The name of your Windows license\n\t * @param status Filter the value of status property (=)\n\t * @param action Filter the value of action property (=)\n\t*/\n\tlong[] getServiceNameTasks(java.lang.String serviceName, java.lang.String status, java.lang.String action) throws java.io.IOException;\n\n\t/**\n\t * tasks linked to this license\n\t * Facultative parameters ? false\n\t * @param serviceName The name of your Windows license\n\t*/\n\tlong[] getServiceNameTasks(java.lang.String serviceName) throws java.io.IOException;\n\n\t/**\n\t * Get this object properties\n\t * Facultative parameters ? false\n\t * @param serviceName The name of your Windows license\n\t * @param taskId This Task id\n\t*/\n\tnet.zyuiop.ovhapi.api.objects.license.Task getServiceNameTasksTaskId(java.lang.String serviceName, long taskId) throws java.io.IOException;\n\n\t/**\n\t * options attached to this license\n\t * Facultative parameters ? false\n\t * @param serviceName The name of your Windows license\n\t*/\n\tjava.lang.String[] getServiceNameOption(java.lang.String serviceName) throws java.io.IOException;\n\n\t/**\n\t * Link your own sql server license to this Windows license\n\t * Facultative parameters ? false\n\t * @param licenseId Your license serial number\n\t * @param version Your license version\n\t * @param serviceName The name of your Windows license\n\t*/\n\tnet.zyuiop.ovhapi.api.objects.license.Task postServiceNameSqlServer(java.lang.String licenseId, java.lang.String version, java.lang.String serviceName) throws java.io.IOException;\n\n\t/**\n\t * Alter this object properties\n\t * Facultative parameters ? false\n\t * @param null New object properties\n\t * @param serviceName The name of your Windows license\n\t*/\n\tvoid putServiceName(net.zyuiop.ovhapi.api.objects.license.windows.Windows param0, java.lang.String serviceName) throws java.io.IOException;\n\n\t/**\n\t * Get this object properties\n\t * Facultative parameters ? false\n\t * @param serviceName The name of your Windows license\n\t * @param label This option designation\n\t*/\n\tnet.zyuiop.ovhapi.api.objects.license.Option getServiceNameOptionLabel(java.lang.String serviceName, java.lang.String label) throws java.io.IOException;\n\n}", "public int getSubsystemValue()\n throws IOException, EndOfStreamException\n {\n return peFile_.readUInt16(relpos(Offsets.SUBSYSTEM_VALUE.position));\n }", "@Override\n protected String getSubsystem() {\n return \"com.poesys.db.memcached_test\";\n }", "public abstract String getSystemName();", "@Override\n /**\n * Set the default command for a subsystem here\n */\n public void initDefaultCommand() \n {\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n }", "public abstract String getSystem( );", "public interface SystemItem {\n}", "public interface IFeatureService {\n\n\t/**\n\t * Deletes the feature with the given id.\n\t * \n\t * @param id\n\t * the id of the Feature to be deleted\n\t */\n\tvoid deleteFeature(Integer id);\n\n\t/**\n\t * Loads the feature with the given id.\n\t * \n\t * @param id id of the feature to be loaded\n\t * @return The loaded feature\n\t */\n\tFeature loadFeature(Integer id);\n\n\t/**\n\t * Notifies all children of the feature by setting the updatedParent variable\n\t * \n\t * @param feature Feature that has been updated\n\t * @author Robert Völkner\n\t */\n\tvoid notifyChildren(Feature feature);\n}", "public ClimbSubsystem(){\n\t\t\n\t\tclimbMotorA = new CANTalon(RobotMap.CLIMB_MOTOR_A_ID);\n\t\tclimbMotorB = new CANTalon(RobotMap.CLIMB_MOTOR_B_ID);\n\t\t\n\t\tlogger = new ThreadLogger( new LoggerClient(), \"climb.txt\");\n\t}", "public interface IMusicSystem extends ISystem, ITickable {\n\n public String getCurrent();\n public void setCurrent(String current);\n\n}", "public interface SysLogService extends CurdService<SysLog> {\n\n}", "public interface ComponentInterface {\n\t\n\t/** \n\t * Execute component once and calculate metric values\n\t * \n\t * @param inputData Input data set\n\t * @return List of Objects containing component outputs\n\t */\n\t public java.util.List<Object> execute(java.util.List<Object> inputData);\n\t \n\t /** \n\t * Calculate metrics\n\t * \n\t * @param outputValues Output values of component execution\n\t * @param truthValues Component-generated truth values\n\t * @return List of Objects containing computed values of metrics\n\t */\n\t public java.util.List<Object> calculateMetrics(java.util.List<Object> outputValues, java.util.List<Object> truthValues);\n\t \n\t /**\n\t * Generate an input data set\n\t * @param genericProperties Generic parameters for data set generation (e.g., number of data points)\n\t * @return List of Objects containing generated input values\n\t */\n\t public java.util.List<Object> generateDataSet(java.util.List<Object> genericProperties);\n\t \n\t /**\n\t * Generate truth values \n\t * \n\t * @return List of Objects containing generated truth values\n\t */\n\t public java.util.List<Object> generateTruthValues();\n\t \n\t /**\n\t * Generate values for control variables\n\t * \n\t * @return List of Objects containing generated control variable values\n\t */\n\t public java.util.List<Object> generateControlVars();\n\t \n\t /**\n\t * Set control variable values to use in subsequent executions\n\t * \n\t * @param controlValues Values for control variables\n\t */\n\t public void setControlVars(java.util.List<Object> controlValues);\n\n}", "public AS400 getSystem() {\r\n return system;\r\n }", "public static GraphNode createGraphNodeForSubsystem() {\n GraphNode nameNode = new GraphNode();\n\n for (int i = 0; i < 3; i++) {\n GraphNode childNode = new GraphNode();\n\n childNode.setPosition(AccuracyTestHelper.createPoint(0, 12 * i));\n childNode.setSize(AccuracyTestHelper.createDimension(100, 22));\n\n nameNode.addContained(childNode);\n }\n\n nameNode.setPosition(AccuracyTestHelper.createPoint(20, 20));\n nameNode.setSize(AccuracyTestHelper.createDimension(100, 100));\n\n GraphNode graphNode = new GraphNode();\n graphNode.addContained(nameNode);\n graphNode.addContained(new GraphNode());\n\n graphNode.setPosition(AccuracyTestHelper.createPoint(20, 20));\n graphNode.setSize(AccuracyTestHelper.createDimension(1000, 1000));\n\n // create a subsystem\n Subsystem subsystem = new SubsystemImpl();\n\n // set namespace\n Namespace namespace = new MockNamespaceImplAcucracy();\n subsystem.setNamespace(namespace);\n\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(subsystem);\n\n graphNode.setSemanticModel(semanticModel);\n\n return graphNode;\n }", "void importSubsystem() {\n\t\t//Update attributes of target subsystem//\r\n\t\t/////////////////////////////////////////\r\n\t\tblockElementInto.setAttribute(\"Name\", blockElementFrom.getAttribute(\"Name\"));\r\n\t\tblockElementInto.setAttribute(\"Descriptions\", blockElementFrom.getAttribute(\"Descriptions\"));\r\n\t}", "@SystemAPI\npublic interface ScheduleEvent extends IOperation {\n\t/**\n\t * \n\t * @return\tDe duur van de planbare actie (in Millis)\n\t */\n\tpublic TimeDuration getDuration();\n\t\n\t/**\n\t * \n\t * @return\tDe periode waarop de actie gescheduled is\n\t * \t\t\tDit wordt ingesteld door de Scheduler\n\t */\n\t@SystemAPI\n\tpublic TimePeriod getScheduledPeriod(); \n\t\n\t/**\n\t * Als de schedulable specifieke resources nodig heeft, bv. een bepaalde \n\t * dokter of verpleegster, dan komen deze in de onderstaande List.\n\t * @return\t\tDe lijst met specifieke resources die nodig zijn.\n\t */\n\tpublic List<ScheduleResource> neededSpecificResources();\n\t\n\t/**\n\t * \n\t * @return\tEen lijst met de nodige resources.\n\t */\n\tpublic List<ResourceType> neededResources();\n\t\n\t/**\n\t * Zet de periode wanneer de actie gescheduled is.\n\t * @param scheduledPeriod\tDe nieuwe geplande periode\n\t * @param usesResources\tDe resources die gebruikt worden bij het plannen\n\t * @param campus De campus die gebruikt wordt bij het plannen\n\t * @throws SchedulingException Als er niet gepland kan worden\n\t */\n\tpublic void schedule(TimePeriod scheduledPeriod, List<ScheduleResource> usesResources, Campus campus) throws SchedulingException;\n\t\t\n\t/**\n\t * Een methode om te controleren of de events behorende bij een warenhuis gepland kunnen worden.\n\t * @param warehouse\n\t * \t\t Het warenhuis waar gepland moet worden\n\t * @return true\n\t * \t\t Als er gepland kan worden\n\t * @return false\n\t * \t\t Als er niet gepland kan worden\n\t */\n\tpublic boolean canBeScheduled(Warehouse warehouse) ;\n\t\n\t/**\n\t * Een methode om een warehuis te updaten. Met de booleanse waarde\n\t * kan de actie ongedaan gemaakt worden.\n\t * \n\t * @param warehouse\n\t * \t\t Het warenhuis geupdate moet worden\n\t * @param inverse\n\t * \t\t De soort update\n\t */\n\tpublic void updateWarehouse(Warehouse warehouse, boolean inverse) ;\n\t\n\t/**\n\t * Een methode om de prioriteit op te vragen.\n\t * @return\n\t */\n\tpublic Priority getPriority() ;\t\n\t\n\t/**\n\t * Methode die de campus waarop deze actie wordt uitgevoerd opslaat, zodat\n\t * ze later kan gereproduceerd worden wanneer er geannuleerd werd.\n\t * @param \tcampus\n\t * \t\t\tDe CampusId van de campus die moet opgeslagen worden\n\t */\n\tpublic void setHandlingCampus(CampusId campus) ;\n\t\n\t/**\n\t * Methode die de opgeslagen campus terug opvraagt.\n\t * @return\tDe opgeslagen campus\n\t */\n\tpublic CampusId getHandlingCampus();\n\t\n\t/**\n\t * \n\t * @return event type\n\t */\n\t@SystemAPI\n\tpublic EventType getEventType();\n\t\n\t/**\n\t * @return start event\n\t */\n\tpublic Event getStart();\n\t\n\t/**\n\t * \n\t * @return stop event\n\t */\n\tpublic Event getStop();\n}", "public final void setSubSystem(SubSystem subSystem){\n this.peripheralSubSystem = subSystem;\n }", "public Systems() {\r\n\t\t__initializeSystems = new ArrayList<InitializeSystem>();\r\n\t\t__executeSystems = new ArrayList<ExecuteSystem>();\r\n\t\t__renderSystems = new ArrayList<RenderSystem>();\r\n\t\t__tearDownSystems = new ArrayList<TearDownSystem>();\r\n\t}", "public interface SysPluginService extends BaseService<Sys_plugin> {\n}", "public SystemInterface GET_SYSTEM_INTERFACE() throws SystemException {\r\n\t\treturn commandResponder.getSystemInterface();\r\n\t}", "public interface RegistryReplicationService extends RegistryService {\n\n GetServicesResponse getServices(GetServicesRequest request);\n\n}", "public void sensorSystem() {\n\t}", "public void addToComponent(String objective, OpSystem system);", "@Override\n public String getName() {\n return getSoftwareSystem().getName() + \" - System Context\";\n }", "public DriveSubsystem() {\n m_leftSpark1 = new CANSparkMax(DriveConstants.kLeftMotor1Port, MotorType.kBrushless);\n m_leftSpark2 = new CANSparkMax(DriveConstants.kLeftMotor2Port, MotorType.kBrushless);\n m_rightSpark1 = new CANSparkMax(DriveConstants.kRightMotor1Port, MotorType.kBrushless);\n m_rightSpark2 = new CANSparkMax(DriveConstants.kRightMotor2Port, MotorType.kBrushless);\n\n initSparkMax(m_leftSpark1);\n initSparkMax(m_leftSpark2);\n initSparkMax(m_rightSpark1);\n initSparkMax(m_rightSpark2);\n\n m_leftSpark2.follow(m_leftSpark1);\n m_rightSpark2.follow(m_rightSpark2);\n\n m_leftEncoder = m_leftSpark1.getEncoder();\n m_rightEncoder = m_rightSpark1.getEncoder();\n\n m_drive = new DifferentialDrive(m_leftSpark1, m_rightSpark1);\n }", "public ClimberSubsystem()\n {\n climbSolenoid.set(false);\n DiskManipulatorSubsystem.compressor.enabled();\n }", "public MParameterSystem() {\n\t\tsuper();\n\t}", "public interface CurrentOperations\n\textends org.omg.CORBA.CurrentOperations\n{\n\t/* constants */\n\t/* operations */\n\torg.omg.CORBA.Any get_slot(int id) throws org.omg.PortableInterceptor.InvalidSlot;\n\tvoid set_slot(int id, org.omg.CORBA.Any data) throws org.omg.PortableInterceptor.InvalidSlot;\n}", "public SubsystemDrive(){\n \t\n \t//Master Talons\n \tleft1 = new CANTalon(Constants.LEFT_MOTOR);\n \tright1 = new CANTalon(Constants.RIGHT_MOTOR);\n \t\n \t//Slave Talons\n \tleft2 = new CANTalon(Constants.OTHER_LEFT_MOTOR);\n \tright2 = new CANTalon(Constants.OTHER_RIGHT_MOTOR);\n \t\n \t//VOLTAGE\n \tvoltage(left1); \t\n \tvoltage(left2); \t\n \tvoltage(right1); \t\n \tvoltage(right2); \t\n\n \t//Train the Masters\n \tleft1.setFeedbackDevice(CANTalon.FeedbackDevice.CtreMagEncoder_Relative);\n \tright1.setFeedbackDevice(CANTalon.FeedbackDevice.CtreMagEncoder_Relative);\n \tleft1.setEncPosition(0);\n \tright1.setEncPosition(0);\n \tleft1.reverseSensor(false);\n \tright1.reverseSensor(false);\n \t\n \t//Train the Slaves\n \tleft2.changeControlMode(CANTalon.TalonControlMode.Follower);\n \tright2.changeControlMode(CANTalon.TalonControlMode.Follower);\n \tleft2.set(left1.getDeviceID());\n \tright2.set(right1.getDeviceID());\n \t\n \tpid = new TalonPID(new CANTalon[]{left1, right1}, \"MOTORS\");\n }", "public static UnitSystems GetUnitSystem(Units unit)\n {\n return MethodsCommon.GetSystemFromUnit(unit, false, true);\n }", "public ArmSubsystem(Constants constants) {\n\n //Assign variables\n m_constants = constants;\n armMotor = m_constants.armMotor;\n armPiston = m_constants.armPiston;\n }", "public SubsystemClient(String name) {\r\n this.name = name;\r\n messageStore = new SubsystemMessageStore();\r\n }", "public LSystemBuilderImpl() {\n\t\tthis.commands = new Dictionary();\n\t\tthis.productions = new Dictionary();\n\t\tunitLength = 0.1;\n\t\tunitLengthDegreeScaler = 1;\n\t\torigin = new Vector2D(0, 0);\n\t\tangle = 0;\n\t\taxiom = \"\";\n\t}", "public DriveSubsystem() {\n leftFrontMotor = new TalonSRX(RobotMap.leftFrontMotor);\n rightFrontMotor = new TalonSRX(RobotMap.rightFrontMotor);\n leftBackMotor = new TalonSRX(RobotMap.leftBackMotor);\n rightBackMotor = new TalonSRX(RobotMap.rightBackMotor);\n // rightMotor.setInverted(true); \n direction = 0.75;\n SmartDashboard.putString(\"Direction\", \"Shooter side\");\n }", "public void ventilationServices() {\n\t\tSystem.out.println(\"FH----overridden method from hospital management--parent class of fortis hospital\");\n\t}", "public interface COPSPdpOSDataProcess extends COPSDataProcess {\r\n\r\n /**\r\n * Gets the policies to be uninstalled\r\n * @param man The associated request state manager\r\n * @return A <tt>Vector</tt> holding the policies to be uninstalled\r\n */\r\n public List<COPSDecision> getRemovePolicy(COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Gets the policies to be installed\r\n * @param man The associated request state manager\r\n * @return A <tt>Vector</tt> holding the policies to be uninstalled\r\n */\r\n public List<COPSDecision> getInstallPolicy(COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Makes a decision from the supplied request data\r\n * @param man The associated request state manager\r\n * @param reqSIs Client specific data suppplied in the COPS request\r\n */\r\n public void setClientData(COPSPdpOSReqStateMan man, List<COPSClientSI> reqSIs);\r\n\r\n /**\r\n * Builds a failure report\r\n * @param man The associated request state manager\r\n * @param reportSIs Report data\r\n */\r\n public void failReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);\r\n\r\n /**\r\n * Builds a success report\r\n * @param man The associated request state manager\r\n * @param reportSIs Report data\r\n */\r\n public void successReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);\r\n\r\n /**\r\n * Builds an accounting report\r\n * @param man The associated request state manager\r\n * @param reportSIs Report data\r\n */\r\n public void acctReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);\r\n\r\n /**\r\n * Notifies that no accounting report has been received\r\n * @param man The associated request state manager\r\n */\r\n public void notifyNoAcctReport (COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Notifies a keep-alive timeout\r\n * @param man The associated request state manager\r\n */\r\n public void notifyNoKAliveReceived (COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Notifies that the connection has been closed\r\n * @param man The associated request state manager\r\n * @param error Reason\r\n */\r\n public void notifyClosedConnection (COPSPdpOSReqStateMan man, COPSError error);\r\n\r\n /**\r\n * Notifies that a request state has been deleted\r\n * @param man The associated request state manager\r\n */\r\n public void notifyDeleteRequestState (COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Notifies that a request state has been closed\r\n * @param man The associated request state manager\r\n */\r\n public void closeRequestState(COPSPdpOSReqStateMan man);\r\n\r\n}", "public interface ISystemUpdateHistoryService extends IBaseService<SystemUpdateHistory> {\n\n}", "public interface INestable {\n\n /**\n* Notifies this service that the component within which it exists has\n* become active. The service should modify its state as appropriate.\n*\n*/\n public void activate();\n\n /**\n* Notifies this service that the component within which it exists has\n* become inactive. The service should modify its state as appropriate.\n*/\n public void deactivate();\n}", "protected SystemCatalog getSystemCatalog() {\n return catalog;\n }", "public ShipSystem getSystem() {\n return system;\n }", "public interface BaseLayer{\r\n\t\r\n\t/**\r\n\t * Initialize the layer.\r\n\t */\r\n\tpublic void init();\r\n\t\r\n\t/**\r\n\t * Called during the periodic loops of the Robot.\r\n\t */\r\n\tpublic void periodicUpdate();\r\n\t\r\n\t/**\r\n\t * Get the name of the Layer. Generally used for autonomous command layers. \r\n\t * \r\n\t * @return The name of the Layer.\r\n\t */\r\n\tpublic String getName();\r\n\t\r\n}", "public void setUp() {\n subsystem = new SubsystemImpl();\n clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();\n action = new CutSubsystemAction(subsystem);\n }", "public interface System {\n \n /**\n * Stops the System (Also happens to be the only method that all Systems have that is the same)\n */\n public void stop();\n}", "public interface SysPermissionService {\n}", "@Mixins( OSGiEnabledService.OSGiEnabledServiceMixin.class )\n@Activators( OSGiEnabledService.Activator.class )\npublic interface OSGiEnabledService extends ServiceComposite\n{\n\n void registerServices()\n throws Exception;\n\n void unregisterServices()\n throws Exception;\n\n class Activator\n extends ActivatorAdapter<ServiceReference<OSGiEnabledService>>\n {\n\n @Override\n public void afterActivation( ServiceReference<OSGiEnabledService> activated )\n throws Exception\n {\n activated.get().registerServices();\n }\n\n @Override\n public void beforePassivation( ServiceReference<OSGiEnabledService> passivating )\n throws Exception\n {\n passivating.get().unregisterServices();\n }\n\n }\n\n\n public abstract class OSGiEnabledServiceMixin\n implements OSGiEnabledService\n {\n @Uses\n ServiceDescriptor descriptor;\n\n @Structure\n private Module module;\n\n private ServiceRegistration registration;\n\n @Override\n public void registerServices()\n throws Exception\n {\n BundleContext context = descriptor.metaInfo( BundleContext.class );\n if( context == null )\n {\n return;\n }\n for( ServiceReference ref : module.findServices( first( descriptor.types() ) ) )\n {\n if( ref.identity().equals( identity().get() ) )\n {\n Iterable<Type> classesSet = cast(descriptor.types());\n Dictionary properties = descriptor.metaInfo( Dictionary.class );\n String[] clazzes = fetchInterfacesImplemented( classesSet );\n registration = context.registerService( clazzes, ref.get(), properties );\n }\n }\n }\n\n private String[] fetchInterfacesImplemented( Iterable<Type> classesSet )\n {\n return toArray( String.class, map( toClassName(), typesOf( classesSet ) ) );\n }\n\n @Override\n public void unregisterServices()\n throws Exception\n {\n if( registration != null )\n {\n registration.unregister();\n registration = null;\n }\n }\n }\n}", "public interface ResourceInterface {\n\n /**\n * A process can arrive at a resource or finish using it.\n * These are the two methods to handle these occurances.\n */\n /**arrivingProcess handles the event of a process arriving to a resource for service\n * This method is handled differently depending on whether the resource is exclusive or not\n * @param theProcess process the process that has arrived at the resource for service\n * @param time int The global time at which the process has arrived to the resource\n */\n void arrivingProcess(process theProcess, int time);\n\n /**finishService handles the event of a process finishing using the resource.\n * This method is called in the scheduler to insert the returned process back into the ready queue.\n * This method is different for exclusive and inclusive resources.\n *\n * @return Process The process that has finishing using the resource\n */\n process finishService ();\n\n /**\n * additional methods for updating resource object\n */\n\n /**updateNextUnblockTime mutates NextUnblockTime to be equal to the given time\n *\n * @param t int the given time\n */\n void updateNextUnblockTime(int t);\n\n /**updateIdleTime increments the IdleTime by the given int\n *\n * @param T int the amount of time the resource was idle\n */\n void updateIdleTime(int T);\n\n /**updateActiveTime increment the ActiveTime by the given time\n *\n * @param T The amount of time the resource was active\n */\n void updateActiveTime(int T);\n\n /**\n * toString formats important information about resource into a string for debugging purposes\n */\n String toString();\n\n /**\n * getters for resource\n */\n String getType();\n int getNextUnblockTime();\n int getStartIdleTime();\n int getActiveTime();\n int getIdleTime();\n process getServingProcess();\n int getCount();\n int getMaxCount();\n int getNumOfBlocks();\n int getTotalBlockTime();\n int getStartWaitTime();\n int getWaitTime();\n}", "public String getSystemName();", "public interface BusDistributorService extends Services<BusDistributor,Long> {\r\n}", "public void robotInit() {\n \tboardSubsystem = new BoardSubsystem();\n }", "public SystematicAcension_by_LiftingTechnology() {\n\n\t}", "public String getSystem() {\r\n return this.system;\r\n }", "public interface Component {\n\n public void operation();\n}", "public interface OperationService {\n\n //在每次插座开断的时候插入状态的变化\n public int insertOperation(OperationPO operationPO);\n //根据时段查看所有的变换\n public List<OperationPO> selectOperation(TimeSpanBO timeSpanBO);\n}", "public interface PeripheralSoftwareDriverInterface extends DriverBaseDataEventListener {\r\n\r\n /**\r\n * Is set in the BaseDriver, you can overwrite it, but for debugging\r\n * purposes not handy\r\n */\r\n public final static String DriverBaseName = \"driver:port\";\r\n\r\n /**\r\n * Returns the driver DB id.\r\n * @return \r\n */\r\n public int getId();\r\n \r\n /**\r\n * Starts the driver and runs the thread\r\n */\r\n public void startDriver();\r\n\r\n /**\r\n * Stops the driver and the thread the driver is running in\r\n */\r\n public void stopDriver();\r\n\r\n /**\r\n * Returns the Hardware driver which belongs to the given running software\r\n * driver.\r\n *\r\n * @return\r\n */\r\n public Peripheral getHardwareDriverFromSoftwareDriver();\r\n\r\n \r\n /**\r\n * Returns the hardware driver.\r\n * @return \r\n */\r\n public PeripheralHardwareDriverInterface getHardwareDriver();\r\n \r\n /**\r\n * Returns the amount of active devices attached to this driver.\r\n *\r\n * @return\r\n */\r\n public int getRunningDevicesCount();\r\n\r\n /**\r\n * Returns a list of running devices whom belong to this driver.\r\n *\r\n * @return\r\n */\r\n public List<Device> getRunningDevices();\r\n\r\n /**\r\n * Send a batch of commands through the proxy. This method is preferred when\r\n * sending multiple commands at once with a build in delay. this function\r\n * should create a batch with a default name (anonymous)\r\n *\r\n * @param batchData Strings with commands\r\n * @see #runBatch()\r\n * @see #runBatch(java.lang.String)\r\n */\r\n public void addBatch(List<Map<String, String>> batchData);\r\n\r\n /**\r\n * Send a batch of commands through the proxy. This method is preferred when\r\n * sending multiple commands at once with a build in delay.\r\n *\r\n * @param batchData Strings with commands\r\n * @param batchName String with the name of the batch to use later on with\r\n * runBatch()\r\n * @see #runBatch()\r\n * @see #runBatch(java.lang.String)\r\n */\r\n public void addBatch(List<Map<String, String>> batchData, String batchName);\r\n\r\n /**\r\n * Runs the batch previously set with the anonymous addBatch\r\n */\r\n public void runBatch();\r\n\r\n /**\r\n * Runs the batch previously set with addBatch with a batchName\r\n *\r\n * @param batchName Name of the batch to run\r\n */\r\n public void runBatch(String batchName);\r\n\r\n /**\r\n * Sends the data to the hardware itself\r\n *\r\n * @param data The data to send\r\n * @param prefix When having multiple devices supported by the hardware a\r\n * prefix can distinct the device in your hardware\r\n * @return result of the send command\r\n * @throws java.io.IOException\r\n * @Obsolete Use writeBytes.\r\n */\r\n public boolean sendData(String data, String prefix) throws IOException;\r\n\r\n /**\r\n * Sends the data to the hardware itself\r\n *\r\n * @param data The data to send\r\n * @return the result of the command\r\n * @throws java.io.IOException\r\n * @Obsolete Use WriteBytes.\r\n */\r\n public boolean sendData(String data) throws IOException;\r\n\r\n /**\r\n * Retrieves the name of the class.\r\n *\r\n * @return the name of the class\r\n */\r\n public String getName();\r\n\r\n /**\r\n * For adding an hardware driver.\r\n *\r\n * @param l\r\n */\r\n public void setPeripheralEventListener(PeripheralHardwareDriverInterface l);\r\n\r\n /**\r\n * for removing an hardware driver.\r\n *\r\n * @param l\r\n */\r\n public void removePeripheralEventListener(PeripheralHardwareDriverInterface l);\r\n\r\n /**\r\n * Handles data received from the hardware driver to be used by overwriting\r\n * classes.\r\n *\r\n * @param oEvent\r\n */\r\n @Override\r\n public void driverBaseDataReceived(PeripheralHardwareDataEvent oEvent);\r\n\r\n /**\r\n * Driver proxy for hardware data.\r\n *\r\n * @param oEvent\r\n */\r\n public void driverBaseDataReceivedProxy(PeripheralHardwareDataEvent oEvent);\r\n\r\n /**\r\n * Returns the package name of the driver as used in the database.\r\n *\r\n * @return The package name of this class\r\n */\r\n public String getPackageName();\r\n\r\n /**\r\n * Adds a device to the listers for whom data can exist.\r\n *\r\n * @param device\r\n */\r\n public void addDeviceListener(DeviceDriverListener device);\r\n\r\n /**\r\n * Removes a device from the listeners list.\r\n *\r\n * @param device\r\n */\r\n public void removeDeviceListener(DeviceDriverListener device);\r\n\r\n /**\r\n * Handle the data coming from a device driver to dispatch to the hardware\r\n * driver. With this function you can do stuff with the data. For example if\r\n * needed change from string to byte array?\r\n *\r\n * @param device\r\n * @param group\r\n * @param set\r\n * @param deviceData\r\n * @return A string which represents a result, human readable please.\r\n * @throws java.io.IOException\r\n */\r\n public boolean handleDeviceData(Device device, String group, String set, String deviceData) throws IOException;\r\n\r\n /**\r\n * Handles data coming from a device as is in the request!\r\n * @param device\r\n * @param request\r\n * @return\r\n * @throws IOException \r\n */\r\n public boolean handleDeviceData(Device device, DeviceCommandRequest request) throws IOException;\r\n \r\n /**\r\n * Sets the driver DB id.\r\n * @param driverDBId \r\n */\r\n public void setId(int driverDBId);\r\n \r\n /**\r\n * Sets the named id\r\n * @param dbNameId\r\n */\r\n public void setNamedId(String dbNameId);\r\n \r\n /**\r\n * Gets the named id\r\n * @return \r\n */\r\n public String getNamedId();\r\n \r\n /**\r\n * Returns if the driver supports custom devices.\r\n * @return \r\n */\r\n public boolean hasCustom();\r\n \r\n /**\r\n * Set if a driver has custom devices.\r\n * @param hasCustom\r\n * @return \r\n */\r\n public void setHasCustom(boolean hasCustom);\r\n \r\n /**\r\n * Returns the software driver id.\r\n *\r\n * @param softwareId\r\n */\r\n public void setSoftwareDriverId(String softwareId);\r\n\r\n /**\r\n * Returns the version set in the driver.\r\n *\r\n * @param softwareIdVersion\r\n */\r\n public void setSoftwareDriverVersion(String softwareIdVersion);\r\n\r\n /**\r\n * Returns the software driver id.\r\n *\r\n * @return\r\n */\r\n public String getSoftwareDriverId();\r\n\r\n /**\r\n * Returns the version set in the driver.\r\n *\r\n * @return\r\n */\r\n public String getSoftwareDriverVersion();\r\n\r\n /**\r\n * Returns true if there is a web presentation present.\r\n *\r\n * @return\r\n */\r\n public boolean hasPresentation();\r\n\r\n /**\r\n * Sets a web presentation;\r\n *\r\n * @param pres\r\n */\r\n public void addWebPresentationGroup(WebPresentationGroup pres);\r\n\r\n /**\r\n * Returns the web presentation.\r\n *\r\n * @return\r\n */\r\n public List<WebPresentationGroup> getWebPresentationGroups();\r\n\r\n /**\r\n * Sets the friendlyname.\r\n * @param name \r\n */\r\n public void setFriendlyName(String name);\r\n \r\n /**\r\n * Returns the friendlyname.\r\n * @return \r\n */\r\n public String getFriendlyName();\r\n \r\n /**\r\n * Sets a link with the device service.\r\n * @param deviceServiceLink \r\n */\r\n public void setDeviceServiceLink(PeripheralDriverDeviceMutationInterface deviceServiceLink);\r\n \r\n /**\r\n * Removes a device service link.\r\n */\r\n public void removeDeviceServiceLink();\r\n \r\n /**\r\n * Indicator to let know a device is loaded.\r\n * @param device \r\n */\r\n public void deviceLoaded(Device device);\r\n \r\n}", "public interface SystemService {\n /**\n * Gets unique service identifier.\n *\n * @return unique String service identifier\n */\n public String getServiceID();\n\n /**\n * Starts service. Called when service is about to be\n * requested for the first time. Thus, services can be\n * initialized lazily, only when they are really needed.\n */\n public void start();\n\n /**\n * Shutdowns service.\n */\n public void stop();\n\n /**\n * Accepts connection. When client requests a service, first,\n * a connection between client and service is created, and then\n * it is passed to service via this method to accept it and\n * start doing its thing. Note: you shouldn't block in this\n * method.\n *\n * @param connection connection between client and service\n */\n public void acceptConnection(SystemServiceConnection connection);\n}", "System createSystem();", "public interface IAComponentContext\r\n {\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n public de.uka.ipd.sdq.simucomframework.variables.userdata.UserData getUserData();\r\n \t \r\n public void setUserData(de.uka.ipd.sdq.simucomframework.variables.userdata.UserData data);\r\n\n\r\n\r\n }", "public interface GFXComponent {\n\t// Registration methods\n\tpublic void registerGFXEngine(String path);\n\n\tpublic void deregisterGFXEngine();\n\n\t// Object that contains graphics information\n\tpublic void setGFXCell(GFXDataCell gfxCell);\n\n\tpublic GFXDataCell getGFXCell();\n\n\t// Through this method, make the object update its DataCell\n\tpublic void updateDataCell();\n\n\t// Drawing method\n\tpublic void draw();\n\n\t// Use this to determine object is to be displayed\n\tpublic boolean Drawable();\n\n}", "public interface ISysDeptService extends IBaseService<SysDept> {\n\n /**\n * 校验部门名称是否唯一\n *\n * @param dept 部门信息\n * @return 结果\n */\n String checkDeptNameUnique(SysDept dept);\n\n /**\n * 查询部门是否存在用户\n *\n * @param deptId 部门ID\n * @return 结果 true 存在 false 不存在\n */\n Boolean checkDeptExistUser(Long deptId);\n\n /**\n * 查询部门管理树\n *\n * @param dept 部门信息\n * @return 所有部门信息\n */\n List<Ztree> selectDeptTree(SysDept dept);\n\n /**\n * 根据角色ID查询菜单\n *\n * @param role 角色对象\n * @return 菜单列表\n */\n List<Ztree> roleDeptTreeData(SysRole role);\n}", "public interface IUHFService {\n\n public static final int REGION_CHINA_840_845 = 0;\n public static final int REGION_CHINA_920_925 = 1;\n public static final int REGION_CHINA_902_928 = 2;\n public static final int REGION_EURO_865_868 = 3;\n public static final int RESERVED_A = 0;\n public static final int EPC_A = 1;\n public static final int TID_A = 2;\n public static final int USER_A = 3;\n public static final int FAST_MODE = 0;\n public static final int SMART_MODE = 1;\n public static final int LOW_POWER_MODE = 2;\n public static final int USER_MODE = 3;\n public static final String SERIALPORT = \"/dev/ttyMT2\";\n public static final String POWERCTL = \"/sys/class/misc/mtgpio/pin\";\n\n\n //默认参数初始化模块\n public int OpenDev();\n\n //释放模块\n public void CloseDev();\n\n //开始盘点\n public void inventory_start();\n\n // Handler用于处理返回的盘点数据\n public void inventory_start(Handler hd);\n\n public void setListener(Listener listener);\n\n public interface Listener {\n void update(Tag_Data var1);\n }\n //新盘点方法,Listener回调\n public void newInventoryStart();\n\n public void newInventoryStop();\n\n\n //设置密码\n public int set_Password(int which, String cur_pass, String new_pass);\n //停止盘点\n public int inventory_stop();\n\n /**\n * 从标签 area 区的 addr 位置(以 word 计算)读取 count 个值(以 byte 计算)\n * passwd 是访问密码,如果区域没被锁就给 0 值。\n *\n * @param area\n * @param addr\n * @param count\n * @param passwd\n * @return\n */\n public byte[] read_area(int area, int addr, int count, String passwd);\n public String read_area(int area, String str_addr\n , String str_count, String str_passwd);\n\n\n //把 content 中的数据写到标签 area 区中 addr(以 word 计算)开始的位 置。\n public int write_area(int area, int addr, String passwd, byte[] content);\n public int write_area(int area, String addr, String pwd, String count, String content);\n\n\n //选中要进行操作的 epc 标签\n public int select_card(int bank,byte[] epc,boolean mFlag);\n public int select_card(int bank,String epc,boolean mFlag);\n\n\n //设置天线功率\n public int set_antenna_power(int power);\n\n //读取当前天线功率值\n public int get_antenna_power();\n\n //设置频率区域\n public int set_freq_region(int region);\n\n public int get_freq_region();\n\n //设置盘点的handler\n public void reg_handler(Handler hd);\n\n\n public INV_TIME get_inventory_time();\n public int set_inventory_time(int work_t, int rest_t);\n public int MakeSetValid();\n public int setlock(int type, int area, int passwd);\n public int get_inventory_mode();\n public int set_inventory_mode(int m);\n //拿到最近一次详细内部错误信息\n public String GetLastDetailError();\n\n public int SetInvMode(int invm, int addr, int length);\n public int GetInvMode(int type);\n}", "public interface UpdatablePhysicsComponent extends Component, Updatable {\n}", "public interface BaseSchedulers {\n\n Scheduler io();\n\n Scheduler computation();\n\n Scheduler ui();\n\n}", "@Override\n public abstract String getComponentType();", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "public System(String implClassName, Params param) {\n\t\tSimLogger.log(Level.INFO, \"New System Created.\");\n\t\tthis.param = param;\n\t\tthis.param.system = this;\n\t\ttry {\n\t\t\tClass implClass = Class.forName(implClassName);\n\t\t\timpl = (Implementation) implClass.newInstance();\n\t\t\t// Set the implementation's system so init() can set it in workload!!!\n\t\t\timpl.sys = this;\n\t\t\timpl.init(param.starter.build());\n\t\t\tSimLogger.log(Level.FINE, \"Implementation \" + implClassName + \" was created successfully.\");\n\n\t\t\ttry {\n\t\t\t\tfor(String s : param.measures) {\n\t\t\t\t\tSimLogger.log(Level.FINE, \"Adding measure \" + s + \" to system.\");\n\t\t\t\t\tClass measureClass = Class.forName(s);\n\t\t\t\t\tMeasure measure = (Measure) measureClass.newInstance();\n\t\t\t\t\tmeasures.add(measure);\n\t\t\t\t}\n\t\t\t\tCollections.sort(measures);\n\t\t\t} catch(ClassNotFoundException e) {\n\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot find measure class with name = \" + implClassName);\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} catch(InstantiationException e) {\n\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate measure class with name = \" + implClassName);\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} catch(IllegalAccessException e) {\n\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate measure class with name = \" + implClassName);\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\n\t\t\t//init actors\n\t\t\tHashMap<String, Integer> actorMachineInstances = param.starter.buildActorMachine();\n\t\t\tfor(String aType : actorMachineInstances.keySet()) {\n\t\t\t\tint numActors = actorMachineInstances.get(aType);\n\t\t\t\tSimLogger.log(Level.FINE, \"Creating \" + numActors + \" many of actor type \" + aType);\n\t\t\t\tfor(int i = 0; i < numActors; i++) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tClass actorClass = Class.forName(aType);\n\t\t\t\t\t\tActorMachine am = (ActorMachine) actorClass.newInstance();\n\t\t\t\t\t\tString actorName = am.getPrefix() + i;\n\t\t\t\t\t\tam.actor = actorName;\n\t\t\t\t\t\tam.actorType = aType;\n\t\t\t\t\t\tam.sys = this;\n\t\t\t\t\t\tactors.put(actorName, am);\n\t\t\t\t\t} catch(ClassNotFoundException e) {\n\t\t\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot find actor machine class with name = \" + implClassName);\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch(InstantiationException e) {\n\t\t\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate actor machine class with name = \" + implClassName);\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch(IllegalAccessException e) {\n\t\t\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate actor machine class with name = \" + implClassName);\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSimLogger.log(Level.FINE, \"Actors init was successful.\");\n\n\t\t} catch(ClassNotFoundException e) {\n\t\t\tSimLogger.log(Level.SEVERE, \"Cannot find implementation class with name = \" + implClassName);\n\t\t\te.printStackTrace();\n\t\t} catch(InstantiationException e) {\n\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate implementation class with name = \" + implClassName);\n\t\t\te.printStackTrace();\n\t\t} catch(IllegalAccessException e) {\n\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate implementation class with name = \" + implClassName);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public SysProtocol() {\n\t\t\tthis.log = new StringBuffer();\n\t\t}", "public Component getSelf(ExecutionCtrl exec);", "public MnjCutlyrcntrlOffstandardLImpl() {\n }" ]
[ "0.7482866", "0.744623", "0.67540514", "0.67340183", "0.6705883", "0.6572166", "0.6419622", "0.6385815", "0.626615", "0.621306", "0.6100177", "0.6081131", "0.60775924", "0.6058707", "0.59685", "0.5951337", "0.5873599", "0.5826585", "0.580975", "0.57918584", "0.5732322", "0.5722543", "0.5698024", "0.56858706", "0.56819373", "0.564715", "0.5630108", "0.5628678", "0.5599456", "0.55871964", "0.5542334", "0.54827183", "0.5465561", "0.5462403", "0.5460365", "0.54491913", "0.5446196", "0.5444032", "0.54255265", "0.5415349", "0.5390361", "0.538211", "0.53726846", "0.5337068", "0.5326335", "0.5307084", "0.5286954", "0.52848065", "0.5273067", "0.52712077", "0.52620673", "0.52469295", "0.5241498", "0.52361685", "0.5235178", "0.5233436", "0.52291733", "0.52290833", "0.52275616", "0.521442", "0.52068263", "0.5197747", "0.5193205", "0.51911604", "0.51870084", "0.51846325", "0.5176588", "0.5175419", "0.51502424", "0.51460373", "0.5144535", "0.51327264", "0.5114453", "0.50946254", "0.5092217", "0.50859934", "0.50847006", "0.50681674", "0.5055211", "0.5052307", "0.50505203", "0.5048356", "0.5047012", "0.50358623", "0.50353885", "0.5027947", "0.5023471", "0.50234663", "0.50211406", "0.50093114", "0.5008156", "0.500061", "0.4994591", "0.498869", "0.49858886", "0.4977511", "0.4972834", "0.49708867", "0.49705985", "0.49691457", "0.49689686" ]
0.0
-1
TODO Autogenerated method stub
@Override public Comparator<? super K> comparator() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Returns the orientation of the specified ordered triple of points. Courtesy
private static double orientation(Point2d p, Point2d q, Point2d r) { return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void orientation(double xOrientation, double yOrientation, double zOrientation);", "public void orientation(Double ...coords);", "public abstract double getOrientation();", "private static int orientation(Coord p, Coord r, Coord q) \n { \n // See https://www.geeksforgeeks.org/orientation-3-ordered-points/ \n // for details of below formula. \n int val = (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y); \n \n if (val == 0) return 0; // colinear \n \n return (val > 0)? 1: 2; // clock or counterclock wise \n }", "public static double orientation(Line2D line,Point2D point) {\n return AlgoPoint2D.cross((AlgoPoint2D.subtract(point,line.getP1())),\r\n AlgoPoint2D.subtract((line.getP2()),line.getP1()));\r\n \r\n }", "public double getOrientation()\r\n\t{\r\n\t\treturn Math.atan2(-end.getY()+start.getY(), end.getX()-start.getX());\r\n\t}", "private int orientation(Waypoint w1, Waypoint w3, Waypoint w2){\n\t\tdouble w1x = w1.getX();\n\t\tdouble w1y = w1.getY();\n\t\tdouble w2x = w2.getX();\n\t\tdouble w2y = w2.getY();\n\t\tdouble w3x = w3.getX();\n\t\tdouble w3y = w3.getY();\n\t\tdouble val = (w3y - w1y) * (w2x - w3x) - (w3x - w1x) * (w2y - w3y);\n\t\t\n\tif ( val == 0) //colinear\n\t\treturn 0;\n\t\n\treturn (val > 0) ? 1: 2; //clock or counterclock wise\n\t\n\t}", "int orientation(Coord pos) {\n\t\tint val = (to.y - from.y) * (pos.x - to.x) - (to.x - from.x) * (pos.y - to.y);\n\t\treturn (val > 0) ? 1 : ((val < 0) ? -1 : 0);\n\t}", "public int orientation(Location p, Location q, Location r) {\n\t\tdouble ret = (q.getY() - p.getY()) * (r.getX() - q.getX())\n\t\t\t\t- (q.getX() - p.getX()) * (r.getY() - q.getY());\n\t\tif (ret == 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (ret > 0) {\n\t\t\t// clockwise\n\t\t\treturn 1;\n\t\t} else {\n\t\t\t// counterclockwise\n\t\t\treturn 2;\n\t\t}\n\t}", "DMatrix3C getRotation();", "public IOrientation getOrientation();", "static int orientation(Point p, Point q, Point r)\n {\n int val = (q.getY() - p.getY()) * (r.getX() - q.getX())\n - (q.getX() - p.getX()) * (r.getY() - q.getY());\n\n if (val == 0)\n {\n return 0; // colinear\n }\n return (val > 0) ? 1 : 2; // clock or counterclock wise\n }", "AxisOrientation getAxisOrientation();", "public void invertOrientation() {\n\t\tPoint3D temp = getPoint(2);\n\t\tsetPoint(2, getPoint(1));\n\t\tsetPoint(1, temp);\n\n\t\tTriangleElt3D temp2 = getNeighbour(2);\n\t\tsetNeighbour(2, getNeighbour(1));\n\t\tsetNeighbour(1, temp2);\n\t\tif (this.getNetComponent() != null)\n\t\t\tthis.getNetComponent().setOriented(false);\n\t}", "public final Vector2D getOrientation() {\n return orientation;\n }", "static void determineOrientation(Triangulator triRef, int ind) {\n\tdouble area;\n\n\t// compute the polygon's signed area, i.e., its orientation.\n\tarea = polygonArea(triRef, ind);\n\n\t// adjust the orientation (i.e., make it CCW)\n\tif (area < 0.0) {\n\t triRef.swapLinks(ind);\n\t triRef.ccwLoop = false;\n\t}\n\n }", "org.stu.projector.Orientation getOrientations(int index);", "public int orientation(Point p, Point q, Point r) {\n\t\tdouble val = (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n\t\tif (val == 0) {\n\t\t\treturn 0; // collinear\n\t\t}\n\t\treturn (val > 0) ? 1 : 2; // clock or counterclock wise\n\t}", "private void defineVertexes(String orientation){\n if(\"down\".equals(orientation)){\n y2 = y1-height;\n y3 = y1-height;\n \n x2 = x1 - height/2;\n x3 = x1 + height/2;\n }else if(orientation.equals(\"up\")){\n y2 = y1+height;\n y3 = y1+height;\n x2 = x1 - height/2;\n x3 = x1 + height/2;\n }else if(orientation.equals(\"left\")){\n x2 = x1-height;\n y2 = y1+height/2;\n x3 = x1;\n y3 = y1+height;\n }else if(orientation.equals(\"right\")){\n x2 = x1+height;\n y2 = y1+height/2;\n x3 = x1;\n y3 = y1+height;\n }\n }", "public IPoint getThirdPoint()\n {\n\n Set<IPoint> vertices = this.getVertices();\n Object[] verticesArray = vertices.toArray();\n IPoint thirdPoint = (IPoint)verticesArray[2];\n\n return thirdPoint;\n }", "public Point3 getPoint(int pointNr);", "public float getOrientation(int angleorder) {\n float orient_angle;\n switch (angleorder) {\n case 1:\n orient_angle = Orientation.getOrientation(lastRobotLocation, AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES).firstAngle;\n break;\n case 2:\n orient_angle = Orientation.getOrientation(lastRobotLocation, AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES).secondAngle;\n break;\n default:\n orient_angle = Orientation.getOrientation(lastRobotLocation, AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES).thirdAngle;\n }\n return orient_angle;\n }", "public us.ihmc.euclid.geometry.Pose3D getPose()\n {\n return pose_;\n }", "public String orientation()\n {\n int height = cat.getWidth();\n int width = cat.getHeight();\n\n if (height >= width)\n {\n return \"landscape\";\n }\n else \n {\n return \"portrait\";\n\n }\n }", "public abstract Vector3 directionFrom(Point3 point);", "public int getOrientation()\n\t{\n\t\treturn orientation;\n\t}", "DQuaternionC getQuaternion ();", "java.util.List<org.stu.projector.Orientation> \n getOrientationsList();", "public double[] angles()\n {\n double[] res = new double[3];\n PdVector.angle(res, p1, p2, p3);\n return res;\n }", "public int getOrientation()\n {\n return m_orientation;\n }", "public String orientation() {\n\t\tif (orientation == null)\n\t\t\tarea();\n\t\treturn orientation;\n\t}", "public static Vector2 getCornerOrientation(int[][] area, Corner corner) {\r\n\t\tVector2 cornerLocation = corner.getLocation();\r\n\t\tif ((cornerLocation.x < 1) || (cornerLocation.x > (area.length) - 2)\r\n\t\t\t\t|| (cornerLocation.y < 1)\r\n\t\t\t\t|| (cornerLocation.y > (area[0].length) - 2)) {\r\n\t\t\treturn new Vector2(0, 0);\r\n\t\t}\r\n\t\tfloat[][] around = {\r\n\t\t\t\t{\r\n\t\t\t\t\t\tarea[(int) cornerLocation.x - 1][(int) cornerLocation.y - 1],\r\n\t\t\t\t\t\tarea[(int) cornerLocation.x][(int) cornerLocation.y - 1],\r\n\t\t\t\t\t\tarea[(int) cornerLocation.x + 1][(int) cornerLocation.y - 1] },\r\n\t\t\t\t{\r\n\t\t\t\t\t\tarea[(int) cornerLocation.x - 1][(int) cornerLocation.y],\r\n\t\t\t\t\t\tarea[(int) cornerLocation.x][(int) cornerLocation.y],\r\n\t\t\t\t\t\tarea[(int) cornerLocation.x + 1][(int) cornerLocation.y] },\r\n\t\t\t\t{\r\n\t\t\t\t\t\tarea[(int) cornerLocation.x - 1][(int) cornerLocation.y + 1],\r\n\t\t\t\t\t\tarea[(int) cornerLocation.x][(int) cornerLocation.y + 1],\r\n\t\t\t\t\t\tarea[(int) cornerLocation.x + 1][(int) cornerLocation.y + 1] } };\r\n\t\tVector2 orientation = new Vector2(0, 0);\r\n\t\tif (around[0][1] >= 1 && around[2][1] == 0) {\r\n\t\t\torientation.x = 1;\r\n\t\t} else {\r\n\t\t\tif (around[0][1] == 0 && around[2][1] >= 1) {\r\n\t\t\t\torientation.x = -1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (around[1][0] == 0 && around[1][2] >= 1) {\r\n\t\t\torientation.y = -1;\r\n\t\t} else {\r\n\t\t\tif (around[1][0] >= 1 && around[1][2] == 0) {\r\n\t\t\t\torientation.y = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn orientation;\r\n\t}", "public abstract Vector4fc rotateAbout(float angle, float x, float y, float z);", "public static double penteTriangle(double n[]){\r\n\t\tdouble pente;\r\n\t\tpente=0;\r\n\t\tdouble[] k;\r\n\t\tk = new double[3];\r\n\t\tk[0]=0;\r\n\t\tk[1]=0;\r\n\t\tk[2]=1;\r\n\t\t\r\n\t\tdouble nScalairek = produitScalaire(n,k);\r\n\t\tpente = Math.acos(nScalairek) ;\r\n\t\tpente = Math.toDegrees(pente);\r\n\t\treturn\tpente;\t\r\n\t}", "public int degree(Position vp) throws InvalidPositionException;", "public double getRotation();", "public int degreeOf(V vertex);", "public double\nangleInXYPlane()\n{\n\tBVector2d transPt = new BVector2d(\n\t\tthis.getP2().getX() - this.getP1().getX(),\n\t\tthis.getP2().getY() - this.getP1().getY());\n\t\n\t// debug(\"transPt: \" + transPt);\n\n\tdouble angle = MathDefines.RadToDeg * new Vector2d(1.0, 0.0).angle(transPt);\n\tif (transPt.getY() < 0.0)\n\t{\n\t\t// debug(\"ang0: \" + (360.0 - angle));\n\t\treturn(360.0 - angle);\n\t}\n\t// debug(\"ang1: \" + angle);\n\treturn(angle);\n}", "public int inTriangleNumber(Point pt) {\n\t\t\n\t\tint n = 3; // triangle = 3 sides\n\t\t\n\t\t// Make point arrays\n\t\tArrayList<Float> t1x = new ArrayList<Float>(3);\n\t\tArrayList<Float> t1y = new ArrayList<Float>(3);\n\t\tArrayList<Float> t2x = new ArrayList<Float>(3);\n\t\tArrayList<Float> t2y = new ArrayList<Float>(3);\n\t\tArrayList<Float> t3x = new ArrayList<Float>(3);\n\t\tArrayList<Float> t3y = new ArrayList<Float>(3);\n\n\t\tt1x.add(px[0]);\n\t\tt1x.add(px[2]);\n\t\tt1x.add(px[1]);\n\t\t\n\t\tt2x.add(px[2]);\n\t\tt2x.add(px[4]);\n\t\tt2x.add(px[3]);\n\n\t\tt3x.add(px[1]);\n\t\tt3x.add(px[3]);\n\t\tt3x.add(px[2]);\n\n\t\tt1y.add(py[0]);\n\t\tt1y.add(py[0]);\n\t\tt1y.add(py[1]);\n\t\t\n\t\tt2y.add(py[0]);\n\t\tt2y.add(py[0]);\n\t\tt2y.add(py[1]);\n\n\t\tt3y.add(py[1]);\n\t\tt3y.add(py[1]);\n\t\tt3y.add(py[2]);\n\n\t\tif (Shape.contains(n, t1x, t1y, pt)) { // left triangle\n\t\t\treturn 1;\n\t\t} else if (Shape.contains(n, t2x, t2y, pt)) { // right triangle\n\t\t\treturn 2;\n\t\t} else if (Shape.contains(n, t3x, t3y, pt)) { // bottom triangle\n\t\t\treturn 3;\n\t\t}\n\t\t\n\t\treturn 0;\n\t}", "public String getOrientation(){\n\n if(robot.getRotation()%360 == 0){\n return \"NORTH\";\n } else if(robot.getRotation()%360 == 90\n ||robot.getRotation()%360 == -270){\n return \"EAST\";\n } else if(robot.getRotation()%360 == 180\n ||robot.getRotation()%360 == -180){\n return \"SOUTH\";\n } else if(robot.getRotation()%360 == 270\n ||robot.getRotation()%360 == -90){\n return \"WEST\";\n } else\n\n errorMessage(\"Id:10T error\");\n return null;\n }", "public int getDegree(V vertex);", "public Point getP3(){\n return this.p3;\n }", "public TriangleElt3D(Point3D point1, Point3D point2, Point3D point3,\n\t\t\tScalarOperator sop) {\n\t\tthis(new Point3D[] { point1, point2, point3 }, sop);\n\t}", "public java.lang.Integer getOrientation () {\n\t\treturn orientation;\n\t}", "private void calculateAngle(){\n for (Point point : points) {\n double d = Math.abs(point.x)+Math.abs(point.z);\n double angle = 0;\n\n if (point.x >= 0 && point.z >= 0){\n angle = point.z/d;\n } else if (point.x < 0 && point.z >= 0){\n angle = 2 - point.z/d;\n } else if (point.x < 0 && point.z <0){\n angle = 2 + Math.abs(point.z)/d;\n } else if (point.x >=0 && point.z < 0){\n angle = 4 - Math.abs(point.z)/d;\n }\n point.setAngle(angle);\n }\n Collections.sort(points);\n }", "public Vec4 rotateZ(final double alpha) {\n expectDirection();\n final double sin = Math.sin(alpha);\n final double cos = Math.cos(alpha);\n return new Vec4(cos * x - sin * y, sin * x + cos * y, z, false);\n }", "public byte getType() {\n\t\treturn SimpleGeoObj.TRIANGLE_ELT_3D;\n\t}", "@Test\n public void testCondition4()\n {\n Double[] angles = {75.0, 75.0, 71.0};\n _renderable.orientation(angles);\n Double testVal[] = _renderable.orientation();\n assertEquals(\"x angle did not get set,\", angles[0], testVal[0], 2);\n assertEquals(\"y angle did not get set,\", angles[1], testVal[1], 2);\n assertEquals(\"z angle did not get set,\", angles[2], testVal[2], 2);\n }", "public int getOrientation(){ return mOrientation; }", "@Override\r\n\tpublic vec3 get3(String ponits) {\n\t\treturn null;\r\n\t}", "public Quaternion orientationAlongSegment(Point beg, Point end) {\n\n // Use Apache vectors and matrices to do the math.\n\n Vector3D b = new Vector3D(beg.getX(), beg.getY(), beg.getZ());\n Vector3D e = new Vector3D(end.getX(), end.getY(), end.getZ());\n\n Vector3D vfwd = e.subtract(b);\n\n double len = vfwd.getNorm();\n if (len > 0)\n vfwd = vfwd.normalize();\n else\n vfwd = new Vector3D(1.0, 0.0, 0.0);\n\n Vector3D vdown = new Vector3D(0.0, 0.0, 1.0);\n Vector3D vright = new Vector3D(0.0, 1.0, 0.0);\n\n // Check that the direction of motion is not along the Z axis. In this\n // case the approach of taking the cross product with the world Z will\n // fail and we need to choose a different axis.\n double epsilon = 1.0e-3;\n if (Math.abs(vdown.dotProduct(vfwd)) < 1.0 - epsilon) {\n vright = vdown.crossProduct(vfwd);\n vdown = vfwd.crossProduct(vright);\n if (vdown.getZ() < 0) {\n vright = vright.negate();\n vdown = vfwd.crossProduct(vright);\n }\n }\n else {\n vdown = vfwd.crossProduct(vright);\n vright = vdown.crossProduct(vfwd);\n if (vright.getY() < 0) {\n vdown = vdown.negate();\n vright = vdown.crossProduct(vfwd);\n }\n }\n\n // Make sure all vectors are normalized\n vfwd = vfwd.normalize();\n vright = vright.normalize();\n vdown = vdown.normalize();\n\n // Construct a rotation matrix\n double dcm[][] = new double[3][3];\n dcm[0][0] = vfwd.getX(); dcm[0][1] = vright.getX(); dcm[0][2] = vdown.getX();\n dcm[1][0] = vfwd.getY(); dcm[1][1] = vright.getY(); dcm[1][2] = vdown.getY();\n dcm[2][0] = vfwd.getZ(); dcm[2][1] = vright.getZ(); dcm[2][2] = vdown.getZ();\n Rotation R = new Rotation(dcm, 1e-8);\n\n //Print the rotation matrix\n //double d[][] = R.getMatrix();\n //for (int row = 0; row < 3; row++) {\n // logger.info(\"\\nMatrix is \" +\n //\t\tFloat.toString((float)d[row][0]) + \" \" +\n //\t\tFloat.toString((float)d[row][1]) + \" \" +\n //\t\tFloat.toString((float)d[row][2]));\n //}\n\n return new Quaternion(-(float)R.getQ1(), -(float)R.getQ2(),\n -(float)R.getQ3(), (float)R.getQ0());\n }", "EDataType getAngleDegrees();", "Vec3[] getInvRot()\n {\n Vec3[] pvRot = new Vec3[3];\n pvRot[0] = m.<Vec4>getColumn(0).getXYZ();\n pvRot[1] = m.<Vec4>getColumn(1).getXYZ();\n pvRot[2] = m.<Vec4>getColumn(2).getXYZ();\n return pvRot;\n }", "synchronized public VectorString3D asVectorString3D() {\n \t\t// local pointers, since they may be transformed\n \t\tint n_points = this.n_points;\n \t\tdouble[][] p = this.p;\n \t\tif (!this.at.isIdentity()) {\n \t\t\tfinal Object[] ob = getTransformedData();\n \t\t\tp = (double[][])ob[0];\n \t\t\tn_points = p[0].length;\n \t\t}\n \t\tdouble[] z_values = new double[n_points];\n \t\tfor (int i=0; i<n_points; i++) {\n \t\t\tz_values[i] = layer_set.getLayer(p_layer[i]).getZ();\n \t\t}\n \n \t\tfinal double[] px = p[0];\n \t\tfinal double[] py = p[1];\n \t\tfinal double[] pz = z_values;\n \t\tVectorString3D vs = null;\n \t\ttry {\n \t\t\tvs = new VectorString3D(px, py, pz, false);\n \t\t} catch (Exception e) { IJError.print(e); }\n \t\treturn vs;\n \t}", "public float getOrientacion() { return orientacion; }", "public static Point3DBasics newXZOnlyPoint3DBasics()\n {\n return new Point3DBasics()\n {\n private double x, z;\n\n @Override\n public double getX()\n {\n return x;\n }\n\n @Override\n public double getY()\n {\n return 0.0;\n }\n\n @Override\n public double getZ()\n {\n return z;\n }\n\n @Override\n public void setX(double x)\n {\n this.x = x;\n }\n\n @Override\n public void setY(double y)\n {\n }\n\n @Override\n public void setZ(double z)\n {\n this.z = z;\n }\n\n @Override\n public String toString()\n {\n return EuclidCoreIOTools.getTuple3DString(this);\n }\n };\n }", "public static Point PointRotate3D(final Point origin, final Point toRotate, final Vector rotationAxis, final float angle) { \n Vector axis = (rotationAxis.magnitude() == 1) ? rotationAxis : rotationAxis.normal();\n float dist = sqrt(sq(axis.y) + sq(axis.z)); \n Matrix T = new Matrix(new double[][]{\n new double[] {1, 0, 0, -origin.x},\n new double[] {0, 1, 0, -origin.y},\n new double[] {0, 0, 1, -origin.z},\n new double[] {0, 0, 0, 1},\n });\n Matrix TInv = T.inverse();\n\n float aZ = (axis.z == 0 && dist == 0) ? 0 : (axis.z / dist);\n float aY = (axis.y == 0 && dist == 0) ? 0 : (axis.y / dist);\n Matrix Rx = new Matrix(new double[][]{\n new double[] {1, 0, 0, 0},\n new double[] {0, aZ, -aY, 0},\n new double[] {0, aY, aZ, 0},\n new double[] {0, 0, 0, 1},\n });\n\n Matrix RxInv = new Matrix(new double[][]{\n new double[] {1, 0, 0, 0},\n new double[] {0, aZ, aY, 0},\n new double[] {0, -aY, aZ, 0},\n new double[] {0, 0, 0, 1},\n });\n\n Matrix Ry = new Matrix(new double[][]{\n new double[] {dist, 0, -axis.x, 0},\n new double[] {0, 1, 0, 0},\n new double[] {axis.x, 0, dist, 0},\n new double[] {0, 0, 0, 1},\n });\n\n Matrix RyInv = Ry.inverse();\n\n Matrix Rz = new Matrix(new double[][]{\n new double[] {cos(angle), -sin(angle), 0, 0},\n new double[] {sin(angle), cos(angle), 0, 0},\n new double[] {0, 0, 1, 0},\n new double[] {0, 0, 0, 1},\n });\n\n Matrix origSpace = new Matrix(new double[][] {\n new double[]{toRotate.x},\n new double[]{toRotate.y},\n new double[]{toRotate.z},\n new double[]{1}\n });\n Matrix rotated = TInv.times(RxInv).times(RyInv).times(Rz).times(Ry).times(Rx).times(T).times(origSpace);\n\n return new Point((float) rotated.get(0, 0), (float) rotated.get(1, 0), (float) rotated.get(2, 0));\n }", "public Triangle(\n IPoint firstPoint,\n IPoint secondPoint,\n IPoint thirdPoint,\n IPrimitive parent)\n {\n super(parent);\n this.addVertex(firstPoint);\n this.addVertex(secondPoint);\n this.addVertex(thirdPoint);\n\n }", "public Point3D getA() {\r\n return a;\r\n }", "@Override\r\n\tpublic int getOrder() {\r\n\t\treturn vertices.size();\r\n\t}", "public int getOrientation() {\n\t\treturn m_nOrientation;\n\t}", "double getRotation(Point2D target, boolean pursuit);", "public Triangle (int tipX, int tipY, int height, String orientation){\n super.points = new ArrayList();\n x1 = tipX;\n y1 = tipY;\n this.height = height;\n defineVertexes(orientation);\n definePoints();\n }", "@Generated\n @Selector(\"orientation\")\n @NInt\n public native long orientation();", "public double getAngleYZ() {\r\n\t\tdouble l = this.lenght();\r\n\t\tif (l==0)\r\n\t\t\treturn 0;\r\n\t\treturn Math.asin(this.x/l);\r\n\t}", "public Point centeroid ()\r\n {\r\n return new Point ((v1.getX()+v2.getX()+v3.getX())/3,(v1.getY()+v2.getY()+v3.getY())/3);\r\n }", "public float getOrientation() {\n return this.orientation + this.baseRotation;\n }", "public boolean isPointInTriangle(E3DVector3F point)\r\n\t{\r\n\t\tif(point == null)\r\n\t\t\treturn false;\r\n\t\t\r\n E3DVector3F vertexPosA = vertices[0].getVertexPos(),\r\n vertexPosB = vertices[1].getVertexPos(),\r\n vertexPosC = vertices[2].getVertexPos();\r\n\r\n E3DVector3F a, b, c;\r\n\t\ta = vertexPosA.subtract(point);\r\n\t\tb = vertexPosB.subtract(point);\r\n\t\tc = vertexPosC.subtract(point);\r\n\r\n //It intersects at one of the vertices\r\n if(a.equals(0.0, 0.0, 0.0) || b.equals(0.0,0.0,0.0) || c.equals(0.0, 0.0, 0.0))\r\n return true;\r\n \r\n\t\ta.normaliseEqual();\r\n\t\tb.normaliseEqual();\r\n\t\tc.normaliseEqual();\r\n\r\n double totalAngle = a.angleBetweenRads(b) + b.angleBetweenRads(c) + c.angleBetweenRads(a);\r\n\r\n if( totalAngle < E3DConstants.TWOPI + E3DConstants.DBL_PRECISION_ERROR && \r\n\t\t\ttotalAngle > E3DConstants.TWOPI - E3DConstants.DBL_PRECISION_ERROR)\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "private double getAngle()\n {\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n return angles.firstAngle;\n }", "public TriangleElt3D(Point3D[] points, ScalarOperator sop)\n\t\t\tthrows IllegalArgumentException {\n\t\tsuper(points, sop);\n\t\tthis.eltZero = null;\n\t\tthis.eltOne = null;\n\t\tthis.eltTwo = null;\n\t}", "public Vec3 toVec3()\n {\n return Vec3.createVectorHelper(this.x, this.y, this.z);\n }", "public double PlaneAngle() {\n return OCCwrapJavaJNI.Units_Dimensions_PlaneAngle(swigCPtr, this);\n }", "public Triangle (double x1,double y1,double x2, double y2,double x3,double y3)\r\n {\r\n v1 = new Point(x1,y1);\r\n v2 = new Point(x2,y2);\r\n v3 = new Point(x3,y3);\r\n }", "Point3D getLeftUpperBackCorner();", "Point3D (double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public Orientation getOrientation() {\n\t\treturn mOrientation;\n\t}", "public abstract Vector3D getPointForSurfaceCoordinates(double u, double v);", "public static int getExifOrientation(String filepath) {\n int degree = 0;\n ExifInterface exif = null;\n\n if(TextUtils.isEmpty(filepath) || !new File(filepath).exists()) {\n return 0;\n }\n\n try {\n exif = new ExifInterface(filepath);\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n if (exif != null) {\n int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, -1);\n if (orientation != -1)\n {\n switch(orientation)\n {\n case ExifInterface.ORIENTATION_ROTATE_90:\n degree = 90;\n break;\n case ExifInterface.ORIENTATION_ROTATE_180:\n degree = 180;\n break;\n case ExifInterface.ORIENTATION_ROTATE_270:\n degree = 270;\n break;\n }\n }\n }\n return degree;\n }", "@Override\n public void setOrientation(float x, float y, float z) {\n String degreeString = getString(R.string.motion_orientation_degree);\n /*orientationX.setText(String.format(degreeString, x));\n orientationY.setText(String.format(degreeString, y));\n orientationZ.setText(String.format(degreeString, z));\n*/\n if (gdxAdapter != null) {\n gdxAdapter.setOrientation(x, y, z);\n }\n }", "public static double getOrient(Position p1, Position p2){\n\t\tdouble lat1 = p1.getLat();\n\t\tdouble lon1 = p1.getLon();\n\t\tdouble lat2 = p2.getLat();\n\t\tdouble lon2 = p2.getLon();\n\t\t\n\t\tdouble dLat = Math.toRadians(lat2-lat1);\n\t\tdouble dLon = Math.toRadians(lon2-lon1);\n\t\tlat1 = Math.toRadians(lat1);\n\t\tlat2 = Math.toRadians(lat2);\n\n\t\t// following code is from http://www.movable-type.co.uk/scripts/latlong.html\n\t\tdouble y = Math.sin(dLon) * Math.cos(lat2);\n\t\tdouble x = Math.cos(lat1)*Math.sin(lat2) - Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);\n\t\tdouble orient = Math.toDegrees(Math.atan2(y, x));\n\t\t//converting orient from a scale of -180 .. + 180 to 0-359 degrees\n\t\tdouble orient360 = (orient + 360) % 360;\n\t\treturn orient360;\n\t}", "public boolean isPointInTriangle(E3DVector2F point)\r\n\t{\r\n\t\tif(point == null)\r\n\t\t\treturn false;\r\n\t\t\r\n E3DVector3F vertexPosA = vertices[0].getVertexPos(),\r\n vertexPosB = vertices[1].getVertexPos(),\r\n vertexPosC = vertices[2].getVertexPos();\r\n\r\n E3DVector3F a, b, c;\r\n\t\ta = vertexPosA.subtract(point);\r\n\t\tb = vertexPosB.subtract(point);\r\n\t\tc = vertexPosC.subtract(point);\r\n\r\n //It intersects at one of the vertices\r\n if(a.equals(0.0, 0.0, 0.0) || b.equals(0.0,0.0,0.0) || c.equals(0.0, 0.0, 0.0))\r\n return true;\r\n \r\n\t\ta.normaliseEqual();\r\n\t\tb.normaliseEqual();\r\n\t\tc.normaliseEqual();\r\n\r\n double totalAngle = a.angleBetweenRads(b) + b.angleBetweenRads(c) + c.angleBetweenRads(a);\r\n\r\n if( totalAngle < E3DConstants.TWOPI + E3DConstants.DBL_PRECISION_ERROR && \r\n\t\t\ttotalAngle > E3DConstants.TWOPI - E3DConstants.DBL_PRECISION_ERROR)\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "public static ArrayList<Triangle> Triangulation(ArrayList<Point> points){\n\t\t\n\t\t\n\t\t\n\t\tpoints.sort(new PointComperator());\n\t\tpoints.add(MainFrame.buutomLeft);\n\t\tStack<Point> CH= new Stack<Point>();\n\t\tArrayList<Triangle> T=new ArrayList<Triangle>();\n\t\tCH.push(MainFrame.buutomLeft);\n\t\tCH.push(points.get(0));\n\t\tCH.push(points.get(1));\n\t\t\n\t\tfor (int i = 0; i < points.size(); i++) {\n\t\t\tPoint curr=points.get(i);\n\t\t\tif(Orient(CH.get(CH.size()-2),CH.peek(), curr))\n\t\t\t{\n\t\t\t\tT.add(new Triangle(curr, CH.peek(), MainFrame.buutomLeft));\n\t\t\t\tCH.push(curr);\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tT.add(new Triangle(CH.peek(), curr, MainFrame.buutomLeft));\n\n\t\t\t\twhile(!Orient(CH.get(CH.size()-2),CH.peek(),curr)) {\n\t\t\t\t\tPoint temp = CH.pop();\n\t\t\t\t\tT.add(new Triangle(temp, CH.peek(), curr));\n\t\t\t\t}\n\t\t\t\tCH.push(curr);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn T;\n\t}", "double getZ() { return pos[2]; }", "public Point3D getD() {\r\n return d;\r\n }", "private E3DTexturedVertex getVertexA(){\r\n\t\treturn vertices[0];\r\n\t}", "public static int getExifOrientation( final String filepath ) {\n if ( null == filepath ) return 0;\n ExifInterface exif = null;\n try {\n exif = new ExifInterface( filepath );\n } catch ( IOException e ) {\n return 0;\n }\n return getExifOrientation( exif );\n }", "public E3DVector3F getVertexPosA(){\r\n return vertices[0].getVertexPos();\r\n }", "public int order()\n {\n return numVertices;\n }", "public int outDegree(Position vp) throws InvalidPositionException;", "public double getSide3() {\r\n\t\treturn side3;\r\n\t}", "public Orientation getOrientation(){return this.orientation;}", "public Orientation getOrientation() {\n return this.orientation;\n }", "public abstract Vector4fc rotate(IQuaternionf quat);", "public double getZ() {\n\t\treturn point[2];\n\t}", "public double getAngleXY() {\r\n\t\tdouble l = this.lenght();\r\n\t\tif (l==0)\r\n\t\t\treturn 0;\r\n\t\treturn Math.asin(this.z/l);\r\n\t}", "private void processOrientation(Quaternion raw) {\r\n\t\tfloat t = 1.0f - (raw.x * raw.x) - (raw.y * raw.y) - (raw.z * raw.z);\r\n\t\tif (t < 0.0f) raw.w = 0.0f;\r\n\t\telse raw.w = -(FastMath.sqrt(t));\r\n\t}", "public final double getPatternOrientation()\r\n\t{\r\n\t\treturn _orientation;\r\n\t}", "public void triangle(){\n Shape triangle = new Shape();\n triangle.addPoint(new Point(0,0));\n triangle.addPoint(new Point(6,0));\n triangle.addPoint(new Point(3,6));\n for (Point p : triangle.getPoints()){\n System.out.println(p);\n }\n double peri = getPerimeter(triangle);\n System.out.println(\"perimeter = \"+peri);\n }", "public double getAngleXZ() {\r\n\t\tdouble l = this.lenght();\r\n\t\tif (l==0)\r\n\t\t\treturn 0;\r\n\t\treturn Math.asin(this.y/l);\r\n\t}", "private Vector2[] getRotatedPoints() {\n Vector2[] points = new Vector2[4]; //Four points of the square\n points[0] = new Vector2(position.getX() - SIZE / 2, position.getY() - SIZE / 2); //TOP LEFT\n points[1] = new Vector2(position.getX() + SIZE / 2, position.getY() - SIZE / 2); //TOP RIGHT\n points[2] = new Vector2(position.getX() + SIZE / 2, position.getY() + SIZE / 2); //BOTTOM RIGHT\n points[3] = new Vector2(position.getX() - SIZE / 2, position.getY() + SIZE / 2); //BOTTOM LEFT\n for (int i = 0; i < points.length; i++) {\n points[i] = rotatePoint(points[i], position, angle); //Rotate the points based on the angle of the dice\n }\n return points;\n }" ]
[ "0.67613786", "0.63015014", "0.6017728", "0.59122163", "0.58396155", "0.5693086", "0.5681024", "0.5631897", "0.5499736", "0.5498025", "0.5470033", "0.5464641", "0.5463911", "0.5413806", "0.5373601", "0.53727037", "0.5301414", "0.5258035", "0.5257376", "0.5222679", "0.52120805", "0.5209634", "0.51536214", "0.51467055", "0.5099577", "0.508225", "0.50792444", "0.50640863", "0.503692", "0.50316817", "0.5030906", "0.5017951", "0.50154513", "0.49920857", "0.49872294", "0.4985772", "0.4983315", "0.4978464", "0.49784154", "0.49666014", "0.49491274", "0.49441296", "0.49397078", "0.49307868", "0.4922881", "0.49052346", "0.49050942", "0.48977444", "0.48957172", "0.48956606", "0.48838624", "0.48666847", "0.4866606", "0.4866284", "0.48659813", "0.48638442", "0.48604932", "0.48508853", "0.48477456", "0.48352718", "0.48302552", "0.4823991", "0.48227417", "0.4822614", "0.48200873", "0.48147705", "0.48045707", "0.48036674", "0.47993365", "0.47873244", "0.47842866", "0.47816452", "0.4765079", "0.4756352", "0.4736281", "0.47361222", "0.47333592", "0.4732395", "0.4720083", "0.47185227", "0.47146565", "0.4714148", "0.4706603", "0.47030103", "0.46997893", "0.46964753", "0.46951085", "0.46926472", "0.46912667", "0.46854508", "0.4678477", "0.4653341", "0.46497077", "0.4647952", "0.46471518", "0.46460602", "0.46384484", "0.4632128", "0.4630009", "0.4628557" ]
0.5572104
8
Returns the convex hull for the specified points. Courtesy
private static List<Point2d> createConvexHull(Point2d[] points) { List<Point2d> hull = new ArrayList<>(); // Find the leftmost point int leftmost = 0; for (int i = 1; i < points.length; i++) { if (points[i].x < points[leftmost].x) { leftmost = i; } } int p = leftmost; do { hull.add(points[p]); int q = p + 1; if (q >= points.length) q -= points.length; for (int i = 0; i < points.length; i++) { double o = orientation(points[p], points[i], points[q]); if (o < 0) { q = i; } } p = q; } while (p != leftmost); return hull; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<Point2D.Float> getConvexHull(List<Point2D.Float> points)\n\t\t\tthrows IllegalArgumentException {\n\n\t\tList<Point2D.Float> sorted = new ArrayList<Point2D.Float>(\n\t\t\t\tgetSortedPointSet(points));\n\n\t\tif (sorted.size() < 3) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"can only create a convex hull of 3 or more unique points\");\n\t\t}\n\n\t\tif (areAllCollinear(sorted)) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"cannot create a convex hull from collinear points\");\n\t\t}\n\n\t\tStack<Point2D.Float> stack = new Stack<Point2D.Float>();\n\t\tstack.push(sorted.get(0));\n\t\tstack.push(sorted.get(1));\n\n\t\tfor (int i = 2; i < sorted.size(); i++) {\n\n\t\t\tPoint2D.Float head = sorted.get(i);\n\t\t\tPoint2D.Float middle = stack.pop();\n\t\t\tPoint2D.Float tail = stack.peek();\n\n\t\t\tTurn turn = getTurn(tail, middle, head);\n\n\t\t\tswitch (turn) {\n\t\t\tcase COUNTER_CLOCKWISE:\n\t\t\t\tstack.push(middle);\n\t\t\t\tstack.push(head);\n\t\t\t\tbreak;\n\t\t\tcase CLOCKWISE:\n\t\t\t\ti--;\n\t\t\t\tbreak;\n\t\t\tcase COLLINEAR:\n\t\t\t\tstack.push(head);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// close the hull\n\t\tstack.push(sorted.get(0));\n\n\t\treturn new ArrayList<Point2D.Float>(stack);\n\t}", "public static AlgebraicVector[] buildHull(Set<AlgebraicVector> points) throws Failure {\n if (points.size() < 3) {\n fail(\"At least three input points are required for a 2d convex hull.\\n\\n\" + points.size() + \" specified.\");\n }\n AlgebraicVector normal = AlgebraicVectors.getNormal(points); \n if(normal.isOrigin()) {\n fail(\"Cannot generate a 2d convex hull from collinear points\");\n }\n if(!AlgebraicVectors.areOrthogonalTo(normal, points)) {\n fail(\"Cannot generate a 2d convex hull from non-coplanar points\");\n }\n\n // JSweet hates maps keyed by objects, so we'll construct this collection\n // separately, and let the xyTo3dMap use strings as keys.\n Collection<AlgebraicVector> keySet = new ArrayList<>();\n \n // Map each 3d point to a 2d projection and rotate it to the XY plane if necessary.\n // Since the 3d points are coplanar, it will be a 1:1 mapping\n // Later, we'll need to map 2d back to 3d so the 2d vector will be the key\n Map<String, AlgebraicVector> xyTo3dMap = map3dToXY( points, normal, keySet );\n \n // calculate the 2d convex hull\n Deque<AlgebraicVector> stack2d = getHull2d( keySet );\n\n // map the 2d convex hull back to the original 3d points\n AlgebraicVector[] vertices3d = new AlgebraicVector[stack2d.size()];\n \n int i = 0;\n for(AlgebraicVector point2d : stack2d) {\n AlgebraicVector point3d = xyTo3dMap.get( point2d.toString( AlgebraicField.VEF_FORMAT ) );\n // order vertices3d so the normal will point away from the origin \n // to make it consistent with the 3d convex hull algorithm\n vertices3d[i++] = point3d;\n }\n return vertices3d;\n }", "public ConvexHull(Point[] pts) throws IllegalArgumentException \n\t{\n\t\tif(pts.length == 0 || pts == null)\n\t\t{\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tpoints = new Point[pts.length];\n\t\tfor(int i = 0; i < pts.length; i++)\n\t\t{\n\t\t\tpoints[i] = pts[i];\n\t\t}\n\t\tquicksorter = new QuickSortPoints(points);\n\t\tremoveDuplicates();\n\t\tlowestPoint = pointsNoDuplicate[0];\n\t}", "public static List<Point> findConvexHull(List<Point> points) {\n Point basePoint = points.stream() // lowest point\n .min(Comparator.comparingDouble(Point::getY)).orElseThrow();\n\n List<Point> pointStorage = new ArrayList<>(points);\n pointStorage.remove(basePoint);\n\n pointStorage.sort((p1, p2) -> {\n double p1Atan = getPolarAngleBetween2Points(basePoint, p1);\n double p2Atan = getPolarAngleBetween2Points(basePoint, p2);\n return Double.compare(p1Atan, p2Atan);\n });\n\n List<Point> convexHullPoints = new ArrayList<>();\n convexHullPoints.add(basePoint);\n Map<Point, Double> pointToPolarAngle = new HashMap<>();\n pointToPolarAngle.put(basePoint, .0);\n\n for (Point point : pointStorage) {\n ListIterator<Point> listIterator = convexHullPoints.listIterator(convexHullPoints.size());\n while (listIterator.hasPrevious()) {\n Point previous = listIterator.previous();\n Double previousPolarAngle = pointToPolarAngle.get(previous);\n double curPointPolarAngle = getPolarAngleBetween2Points(previous, point);\n\n if (curPointPolarAngle < 0)\n curPointPolarAngle += Math.PI * 2;\n\n if (previousPolarAngle >= curPointPolarAngle) {\n listIterator.remove();\n pointToPolarAngle.remove(previous);\n } else {\n convexHullPoints.add(point);\n pointToPolarAngle.put(point, curPointPolarAngle);\n break;\n }\n }\n }\n\n return convexHullPoints;\n }", "private static int[][] findConvexHull(int[][] pointSet)\n {\n Stack<Integer> convexHullStack = new Stack<Integer>();\n if (pointSet[0].length > 3)\n {\n convexHullStack.push(0); convexHullStack.push(1); convexHullStack.push(2);\n for (int i = 3; i<= pointSet[0].length-1; i++)\n {\n Integer top = convexHullStack.pop();\n Integer nextToTop = convexHullStack.pop();\n while (((pointSet[0][top]-pointSet[0][nextToTop])*(pointSet[1][i]-pointSet[1][nextToTop]))-\n ((pointSet[0][i]-pointSet[0][nextToTop])*(pointSet[1][top]-pointSet[1][nextToTop])) <= 0)\n {\n top = nextToTop;\n nextToTop = convexHullStack.pop();\n }\n convexHullStack.push(nextToTop);\n convexHullStack.push(top);\n convexHullStack.push(i);\n }\n\n int[][] convexHull = new int[2][convexHullStack.size()];\n for (int i = convexHull[0].length-1; i>=0; i--)\n {\n int temp = convexHullStack.pop();\n convexHull[0][i] = pointSet[0][temp];\n convexHull[1][i] = pointSet[1][temp];\n }\n return convexHull;\n }\n else\n {\n return pointSet;\n }\n }", "public static List<Point2D.Float> getConvexHull(float[] xs, float[] ys)\n\t\t\tthrows IllegalArgumentException {\n\n\t\tif (xs.length != ys.length) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"xs and ys don't have the same size\");\n\t\t}\n\n\t\tList<Point2D.Float> points = new ArrayList<Point2D.Float>();\n\n\t\tfor (int i = 0; i < xs.length; i++) {\n\t\t\tpoints.add(new Point2D.Float(xs[i], ys[i]));\n\t\t}\n\n\t\treturn getConvexHull(points);\n\t}", "@Test\n\tpublic void testCalculateConvexHullFromWktPoints02() throws ParseException{\n\t\tList<String> pointWktList = new ArrayList<String>();\n\t\tpointWktList.add(\"POINT(123.0 1.0)\");\n\t\tpointWktList.add(\"POINT(103.0 -7.0)\");\n\t\tpointWktList.add(\"POINT(203.0 -22.0)\");\n\t\tpointWktList.add(\"POINT(303.0 440.0)\");\n\t\tpointWktList.add(\"POINT(101.0 -4.0)\");\n\t\tpointWktList.add(\"Some Nonsense\");\n\t\ttry{\n\t\t\tConvexHullUtil.calculateConvexHullFromWktPoints(pointWktList);\n\t\t\tfail();\n\t\t}catch(ParseException pex){\n\t\t\t// success\n\t\t}\n\t}", "@Test\n\tpublic void testCalculateConvexHullFromWktPoints01() throws ParseException{\n\t\tList<String> pointWktList = new ArrayList<String>();\n\t\tpointWktList.add(\"POINT(123.0 1.0)\");\n\t\tpointWktList.add(\"POINT(103.0 -7.0)\");\n\t\tpointWktList.add(\"POINT(203.0 -22.0)\");\n\t\tpointWktList.add(\"POINT(303.0 440.0)\");\n\t\tpointWktList.add(\"POINT(101.0 -4.0)\");\n\t\tString result = ConvexHullUtil.calculateConvexHullFromWktPoints(pointWktList);\n\t\tassertThat(result, is(\"POLYGON ((203 -22, 103 -7, 101 -4, 303 440, 203 -22))\"));\n\t}", "public BruteCollinearPoints(Point[] points) {\n if (points == null) {\n throw new java.lang.IllegalArgumentException();\n }\n for (Point p: points) {\n if (p == null) {\n throw new java.lang.IllegalArgumentException();\n }\n }\n\n Point[] copyPoints = points.clone();\n Arrays.sort(copyPoints); //now copyPoints sorted by y-coordinate\n for (int i = 1; i < copyPoints.length; i++) {\n if (copyPoints[i-1].compareTo(copyPoints[i]) == 0) {\n throw new java.lang.IllegalArgumentException();\n }\n }\n\n for (int p = 0; p < copyPoints.length - 3; p++) {\n for (int q = p + 1; q < copyPoints.length - 2; q++) {\n for (int r = q + 1; r < copyPoints.length - 1; r++) {\n for (int s = r + 1; s < copyPoints.length; s++) {\n if (isCollinear(copyPoints[p], copyPoints[q], copyPoints[r], copyPoints[s])) {\n segments.add(new LineSegment(copyPoints[p], copyPoints[s]));\n }\n }\n }\n }\n }\n }", "public Iterable<Point2D> hull() {\r\n Stack<Point2D> s = new Stack<Point2D>();\r\n for (Point2D p : hull) s.push(p);\r\n return s;\r\n }", "public BruteCollinearPoints(Point[] points) {\n // Throw an IllegalArgumentException if the argument to the constructor is null.\n if (points == null)\n throw new IllegalArgumentException(\"the argument to the constructor is null\");\n // Throw an IllegalArgumentException if any point in the array is null.\n for (Point point : points)\n if (point == null)\n throw new IllegalArgumentException(\"any point in the array is null\");\n\n Point[] pointsCopy = points.clone();\n Arrays.sort(pointsCopy);\n int n = pointsCopy.length;\n\n // Throw an IllegalArgumentException if array contains a repeated points.\n for (int i = 0; i < n - 1; i++)\n if (pointsCopy[i].compareTo(pointsCopy[i + 1]) == 0)\n throw new IllegalArgumentException(\"array contains a repeated points\");\n\n Point[] fourPoints = new Point[4];\n for (int ip = 0; ip < n - 3; ip++) {\n fourPoints[0] = pointsCopy[ip];\n for (int iq = ip + 1; iq < n - 2; iq++) {\n fourPoints[1] = pointsCopy[iq];\n for (int ir = iq + 1; ir < n - 1; ir++) {\n fourPoints[2] = pointsCopy[ir];\n for (int is = ir + 1; is < n; is++) {\n fourPoints[3] = pointsCopy[is];\n if (areCollinear(fourPoints)) {\n addSegment(fourPoints[0], fourPoints[3]);\n }\n }\n }\n }\n }\n }", "public static BoundingPolytope computePolytope(double[] points)\n\t{\n\t\tBoundingPolytope frustum = new BoundingPolytope();\n\t\t\n\t\tVector3d a1 = new Vector3d(points[0],points[1],points[2]);\n\t\tVector3d a2 = new Vector3d(points[4],points[5],points[6]);\n\t\tVector3d b1 = new Vector3d(points[8],points[9],points[10]);\n\t\tVector3d b2 = new Vector3d(points[12],points[13],points[14]);\n\t\tVector3d c1 = new Vector3d(points[16],points[17],points[18]);\n\t\tVector3d c2 = new Vector3d(points[20],points[21],points[22]);\n\t\tVector3d d1 = new Vector3d(points[24],points[25],points[26]);\n\t\tVector3d d2 = new Vector3d(points[28],points[29],points[30]);\n\t\t\n\t\t\n\t\tVector4d[] planes = new Vector4d[] {\n\t\tcomputePlane(a1,b1,a2),\n\t\tcomputePlane(d1,c1,d2),\n\t\tcomputePlane(b1,d1,b2),\n\t\tcomputePlane(c1,a1,c2),\n\t\tcomputePlane(c1,d1,a1),\n\t\tcomputePlane(d2,c2,b2),\n\t\t};\n\t\t\n\t\tfrustum.setPlanes(planes);\n\t\t\n\t\treturn frustum;\n\t}", "private boolean isConvex() {\r\n int N = hull.size();\r\n if (N <= 2) return true;\r\n\r\n Point2D[] points = new Point2D[N];\r\n int n = 0;\r\n for (Point2D p : hull()) {\r\n points[n++] = p;\r\n }\r\n\r\n for (int i = 0; i < N; i++) {\r\n if (ccw(points[i], points[(i+1) % N], points[(i+2) % N]) <= 0) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public FastCollinearPoints(Point[] points) {\n numberOfSegments = 0;\n segments = new ArrayList<>();\n\n // O(1)\n if (points == null) {\n throw new IllegalArgumentException(\"points cannot be null\");\n }\n\n int len = points.length;\n\n // O(n)\n for (Point p : points) {\n if (p == null)\n throw new IllegalArgumentException(\"any point cannot be null\");\n }\n\n // O(n^2log(n))\n\n // Sort the points by natural order first.\n sort(points);\n // Then for each point v, sort the points by their slopes to v.\n for (Point p : points) {\n Point[] copy = Arrays.copyOf(points, points.length);\n sort(copy, p.slopeOrder());\n\n // copy[0] should be the point itself.\n for (int i = 1; i < len - 3; ) {\n if (p.slopeTo(copy[i]) == p.slopeTo(copy[i + 3])) {\n double slope = p.slopeTo(copy[i]);\n int offset = 4;\n // How to store the points and their slopes to v together?\n while ((i + offset) < len && p.slopeTo(copy[i + offset]) == slope) {\n offset++;\n }\n\n // Make sure that the merge sort is stable in order to\n // easily pick the start and the end of the line segment.\n segments.add(new LineSegment(copy[i], copy[i + offset - 1]));\n i += offset;\n } else\n i++;\n }\n }\n }", "public BruteCollinearPoints(Point[] points) {\n if (points == null) throw new IllegalArgumentException();\n points = points.clone();\n validate(points);\n Arrays.sort(points);\n validateDuplicate(points);\n List<List<Double>> slopes = new ArrayList<>(points.length);\n for (int i = 0; i < points.length; i++) slopes.add(new LinkedList<>());\n lines = new LinkedList<>();\n for (int i = 0; i < points.length; i++) {\n for (int j = i+1; j < points.length; j++) {\n for (int m = j + 1; m < points.length; m++) {\n for (int n = points.length - 1; n > m; n--) {\n if (isCollinear(points[i], points[j], points[m], points[n])) {\n boolean exist = false;\n for (double slope : slopes.get(i)) {\n if (Double.compare(slope, points[i].slopeTo(points[n])) == 0) exist = true;\n }\n if (!exist) {\n lines.add(new LineSegment(points[i], points[n]));\n double s = points[i].slopeTo(points[n]);\n slopes.get(i).add(s);\n slopes.get(j).add(s);\n slopes.get(m).add(s);\n slopes.get(n).add(s);\n }\n }\n }\n }\n }\n }\n }", "public void convexHull() throws FileNotFoundException {\n ArrayList<QuickHull.Point> allPoints = getAllPoints();\n findUpperHull(allPoints.get(0), allPoints.get(allPoints.size()-1), allPoints);\n findUpperHull(allPoints.get(allPoints.size()-1), allPoints.get(0), allPoints);\n writeConvexHull();\n }", "@Test\n\tpublic void testToConvexHull01(){\n\t\tCoordinate [] coordinateArray = {\n\t\t\t\tnew Coordinate(1.0, 2.5),\n\t\t\t\tnew Coordinate(4.0, -2.5),\n\t\t\t\tnew Coordinate(7.0, -3.5),\n\t\t\t\tnew Coordinate(1.0, 0.5),\n\t\t\t\tnew Coordinate(4.0, 2.5),\n\t\t\t\tnew Coordinate(4.5, 3.0),\n\t\t\t\tnew Coordinate(5.0, 2.5),\n\t\t\t\tnew Coordinate(8.0, 8.5)\n\t\t};\n\t\tConvexHull objectUnderTest = new ConvexHull(coordinateArray, geometryFactory);\n\t\tGeometry result = objectUnderTest.getConvexHull();\n\t\tassertThat(result.toText(), is(\"POLYGON ((7 -3.5, 4 -2.5, 1 0.5, 1 2.5, 8 8.5, 7 -3.5))\"));\n\t}", "public FastCollinearPoints(final Point[] inPoints) {\n\n if (inPoints == null) {\n // an argument to the constructor is null\n throw new IllegalArgumentException();\n }\n\n // check for null points\n for (final Point inPoint : inPoints) {\n if (inPoint == null) {\n throw new IllegalArgumentException(\"null point\");\n }\n }\n\n final Point[] points = inPoints.clone();\n Arrays.sort(points); // sort the points in ascending order\n\n // check for repeated points\n if (points.length != Stream.of(points).distinct().count()) {\n throw new IllegalArgumentException(\"repeated point(s)\");\n }\n\n // find all sets of >= 4 collinear points by sorting relative slopes\n\n this.segments = (\n Stream.of(points)\n // for each collinear segment\n .map(\n // map each \"refPoint\" to a list of points (as an array)\n refPoint -> (\n // stream a copy of points\n Stream.of(points.clone())\n // sorted by (segment) slope, relative to \"refPoint\"\n .sorted(refPoint.slopeOrder())\n // group points by slope relative to \"refPoint\"\n .collect(\n Collectors.groupingBy(\n refPoint::slopeTo,\n Collectors.mapping(identity(), toList())\n )\n )\n .entrySet()\n // stream each grouped slope/points entry\n .stream()\n // filter out groups smaller than size 3\n .filter(e -> e.getValue().size() >= 3)\n // construct sorted point list for each group\n .map(\n e -> {\n final List<Point> v = e.getValue();\n final List<Point> l = new ArrayList<>(v.size() + 1);\n l.add(refPoint);\n l.addAll(v);\n l.sort(naturalOrder());\n return l;\n }\n )\n )\n )\n // concatenate all streams of grouped slope/points entries\n .flatMap(s -> s)\n // collect into a \"super-list\" of grouped slope/points entries\n .collect(Collectors.toList())\n // convert to a stream of grouped slope/points entries\n .stream()\n // remove duplicates\n .distinct()\n // map each into an instance of the target \"LineSegment\" type\n .map(lp -> new LineSegment(lp.get(0), lp.get(lp.size() - 1)))\n // return an array containing all streamed entries\n .toArray(LineSegment[]::new)\n );\n\n }", "protected abstract NativeSQLStatement createNativeConvexHullStatement(Geometry geom);", "@Test\n\tpublic void testToConvexHull02(){\n\t\tCoordinate c = new Coordinate(1.0, 2.5);\n\t\tCoordinate [] ca2 = { c };\n\t\tConvexHull objectUnderTest = new ConvexHull(ca2, geometryFactory);\n\t\tGeometry result = objectUnderTest.getConvexHull();\n\t\tassertThat(result.toText(), is(\"POINT (1 2.5)\"));\n\t}", "public BruteCollinearPoints(Point[] points){\n int count_temp = 0;\n int length = points.length;\n LineSegment[] Segment_temp = new LineSegment[50 * length];\n // sort the points array;\n Arrays.sort(points);\n // find collinear points using brute force method;\n for(int n = 0; n < length - 1; n++){\n if(points[n].slopeTo(points[n + 1]) == Double.NEGATIVE_INFINITY)\n throw new java.lang.IllegalArgumentException();\n }\n for(int i = 0; i < length - 3; i++){\n for(int j = i + 1; j < length - 2; j++) {\n for (int k = j + 1; k < length - 1; k++) {\n for (int l = k + 1; l < length; l++) {\n double slope_1 = points[i].slopeTo(points[j]);\n double slope_2 = points[i].slopeTo(points[k]);\n double slope_3 = points[i].slopeTo(points[l]);\n if (slope_1 == slope_2 && slope_2 == slope_3\n && points[i].compareTo(points[j]) < 1\n && points[j].compareTo(points[k]) < 1\n && points[k].compareTo(points[l]) < 1) {\n Segment_temp[count_temp] = new LineSegment(points[i], points[l]);\n count_temp++;\n }\n }\n }\n }\n }\n // resize the Segment array;\n Segment = new LineSegment[count_temp];\n for(int k = 0; k < count_temp; k++){\n Segment[k] = Segment_temp[k];\n }\n count = count_temp;\n }", "public void convexHull(int n) {\n // There must be at least 3 points\n if (n < 3) return;\n\n // Initialize Result\n Vector<Marker> hull = new Vector<>();\n\n // Find the leftmost point\n int l = 0;\n for (int i = 1; i < n; i++)\n if (markers.get(i).getPosition().longitude < markers.get(l).getPosition().longitude)\n l = i;\n\n // Start from leftmost point, keep moving\n // counterclockwise until reach the start point\n // again. This loop runs O(h) times where h is\n // number of points in result or output.\n int p = l, q;\n do {\n // Add current point to result\n hull.add(markers.get(p));\n\n // Search for a point 'q' such that\n // orientation(p, x, q) is counterclockwise\n // for all points 'x'. The idea is to keep\n // track of last visited most counterclock-\n // wise point in q. If any point 'i' is more\n // counterclock-wise than q, then update q.\n q = (p + 1) % n;\n\n for (int i = 0; i < n; i++) {\n // If i is more counterclockwise than\n // current q, then update q\n if (orientation(p, i, q)\n == 2)\n q = i;\n }\n\n // Now q is the most counterclockwise with\n // respect to p. Set p as q for next iteration,\n // so that q is added to result 'hull'\n p = q;\n\n } while (p != l); // While we don't come to first\n\n drawer = new ArrayList<>(hull);\n }", "public FastCollinearPoints_ov(Point[] points) {\n isLegal(points);\n Point[] pointsCopy = Arrays.copyOf(points, points.length);\n Arrays.sort(pointsCopy);\n lineSegments = new ArrayList<>();\n\n for (int i = 0; i < pointsCopy.length - 3; i++) {\n Point startPoint = pointsCopy[i];\n double[] preSlopes = new double[i];\n Point[] nextPoints = new Point[pointsCopy.length - i - 1];\n\n for (int j = 0; j < i; j++) {\n preSlopes[j] = startPoint.slopeTo(pointsCopy[j]);\n }\n\n for (int j = 0; j < pointsCopy.length - i - 1; j++) {\n nextPoints[j] = pointsCopy[i + j + 1];\n }\n //for binary search\n Arrays.sort(preSlopes);\n // sort after point by slope\n Arrays.sort(nextPoints, startPoint.slopeOrder());\n findLineSegments(preSlopes, startPoint, nextPoints);\n }\n }", "public FastCollinearPoints(Point[] points) {\r\n if(points == null) throw new java.lang.IllegalArgumentException();\r\n\r\n Point[] slopeOrderPoints = points.clone();\r\n int countOfSegments = 0;\r\n LineSegment[] temp_segments = new LineSegment[points.length*points.length];\r\n\r\n for (int i = 0; i < points.length; i++) {\r\n\r\n if(points[i] == null) throw new java.lang.IllegalArgumentException();\r\n\r\n Arrays.sort(slopeOrderPoints, points[i].slopeOrder());\r\n\r\n for (int j = 0; j < slopeOrderPoints.length-1; ++j) {\r\n\r\n Point[] temp_segment = new Point[points.length]; // initiate a temp segment contains all the points at most\r\n temp_segment[0] = points[i]; // one point of the temp segment must be points[i]\r\n int count = 1; // count records how many points the temp segment contains now\r\n\r\n if (points[i].slopeTo(slopeOrderPoints[j]) == points[i].slopeTo(slopeOrderPoints[j+1])) {\r\n while (j < slopeOrderPoints.length - 1) {\r\n temp_segment[count++] = slopeOrderPoints[j];\r\n if (points[i].slopeTo(slopeOrderPoints[j]) == points[i].slopeTo(slopeOrderPoints[j+1])) {\r\n ++j;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n if (j == slopeOrderPoints.length - 1) {\r\n temp_segment[count++] = slopeOrderPoints[j];\r\n }\r\n\r\n if (count >= 4) {\r\n Point[] segment = new Point[count];\r\n for (int k = 0; k < count; k++) {\r\n segment[k] = temp_segment[k];\r\n }\r\n Arrays.sort(segment);\r\n LineSegment line = new LineSegment(segment[0], segment[count - 1]);\r\n boolean isIn = false;\r\n for (int k = 0; k < countOfSegments; k++) {\r\n if (temp_segments[k].toString().compareTo(line.toString()) == 0) {\r\n isIn = true;\r\n break;\r\n }\r\n }\r\n if (!isIn) {\r\n temp_segments[countOfSegments++] = line;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n numberOfSegments = countOfSegments;\r\n segments = new LineSegment[countOfSegments];\r\n for (int i = 0; i < countOfSegments; i++) {\r\n segments[i] = temp_segments[i];\r\n }\r\n }", "public FastCollinearPoints(Point[] points) {\n checkFormNullInput(points);\n\n Point[] clonedInput = points.clone();\n // Sort points to facilitate search of duplicated point and duplicated segments\n Arrays.sort(clonedInput);\n\n ArrayList<LineSegment> arLSPoints = new ArrayList<>();\n\n Point previousI = null;\n for (int i = 0; i < clonedInput.length; i++) {\n Point pointP = clonedInput[i];\n\n // Look for duplicates\n if (previousI != null && pointP.compareTo(previousI) == 0)\n throw new IllegalArgumentException();\n previousI = pointP;\n\n // Copy array (point i excluded)\n Point[] arPointsToProcess = clonedInput.clone();\n\n Comparator<Point> comparatorWithP = pointP.slopeOrder();\n // Sort values by slopeOrder with Point p\n Arrays.sort(arPointsToProcess, comparatorWithP);\n\n // Create LinkedList of collinear points, inited with the first element\n LinkedList<Point> collinearPointsList = new LinkedList<>();\n collinearPointsList.add(arPointsToProcess[0]);\n // First slope between P and first element\n double previousSlope = pointP.slopeTo(arPointsToProcess[0]);\n\n // If collinearCount is not 1, we might be over the loop but with an ongoing collinear computation\n for (int j = 1; j < arPointsToProcess.length || collinearPointsList.size() > 1; j++) {\n // If subsequent elements have same slope with i, then they are part of a segment\n // And they are aded to the collinear LinkedList\n if (j < arPointsToProcess.length && Double.compare(previousSlope, pointP\n .slopeTo(arPointsToProcess[j])) == 0) {\n collinearPointsList.add(arPointsToProcess[j]);\n }\n else {\n // If we have 4 or more collinear connections and the head of the list is the smallest point,\n // then we are sure that this is not a subsegment and we can add the LineSegment\n if (collinearPointsList.size() >= 3\n && pointP.compareTo(collinearPointsList.peek()) < 0) {\n arLSPoints.add(new LineSegment(pointP, arPointsToProcess[j - 1]));\n }\n // Reset LinkedList for attempting other LineSegments\n collinearPointsList.clear();\n if (j < arPointsToProcess.length) {\n // If loop is not over, add point j as initial element\n collinearPointsList.add(arPointsToProcess[j]);\n }\n }\n\n if (j < arPointsToProcess.length)\n previousSlope = pointP.slopeTo(arPointsToProcess[j]);\n }\n }\n\n this.lineSegments = arLSPoints.toArray(new LineSegment[0]);\n }", "protected static Set<Point2D.Float> getSortedPointSet(\n\t\t\tList<Point2D.Float> points) {\n\n\t\tfinal Point2D.Float lowest = getLowestPoint(points);\n\n\t\tTreeSet<Point2D.Float> set = new TreeSet<Point2D.Float>(\n\t\t\t\tnew Comparator<Point2D.Float>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(Point2D.Float a, Point2D.Float b) {\n\n\t\t\t\t\t\tif (a == b || a.equals(b)) {\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// use longs to guard against int-underflow\n\t\t\t\t\t\tdouble thetaA = Math.atan2((long) a.y - lowest.y,\n\t\t\t\t\t\t\t\t(long) a.x - lowest.x);\n\t\t\t\t\t\tdouble thetaB = Math.atan2((long) b.y - lowest.y,\n\t\t\t\t\t\t\t\t(long) b.x - lowest.x);\n\n\t\t\t\t\t\tif (thetaA < thetaB) {\n\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t} else if (thetaA > thetaB) {\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// collinear with the 'lowest' point, let the point\n\t\t\t\t\t\t\t// closest to it come first\n\n\t\t\t\t\t\t\t// use longs to guard against int-over/underflow\n\t\t\t\t\t\t\tdouble distanceA = Math\n\t\t\t\t\t\t\t\t\t.sqrt((((long) lowest.x - a.x) * ((long) lowest.x - a.x))\n\t\t\t\t\t\t\t\t\t\t\t+ (((long) lowest.y - a.y) * ((long) lowest.y - a.y)));\n\t\t\t\t\t\t\tdouble distanceB = Math\n\t\t\t\t\t\t\t\t\t.sqrt((((long) lowest.x - b.x) * ((long) lowest.x - b.x))\n\t\t\t\t\t\t\t\t\t\t\t+ (((long) lowest.y - b.y) * ((long) lowest.y - b.y)));\n\n\t\t\t\t\t\t\tif (distanceA < distanceB) {\n\t\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn 1;\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\n\t\tset.addAll(points);\n\n\t\treturn set;\n\t}", "@Override\n public void drawPointCloud(PVector[] depthMap) {\n\n ArrayList<QuickHull3D> hulls = new ArrayList<QuickHull3D>();\n ArrayList<Point3d> points = new ArrayList<Point3d>();\n PVector oldVector = depthMap[0];\n QuickHull3D myHull = new QuickHull3D();\n\n for (int i = 1; i < depthMap.length; i++) {\n PVector myVector = depthMap[i];\n\n if (myVector.dist(oldVector) > 500) {\n if (points.size() > 10) {\n try {\n myHull.build(points.toArray(new Point3d[points.size()]));\n } catch(IllegalArgumentException e) {\n\n }\n hulls.add(myHull);\n myHull = new QuickHull3D();\n }\n points.clear();\n }\n\n if (myVector.z < 3000) {\n points.add(new Point3d(myVector.x, myVector.y, myVector.z));\n\n oldVector = myVector;\n }\n }\n\n// Point3d[] points = new Point3d[depthMap.length];\n// for (int i = 0; i < depthMap.length; i++) {\n// PVector vector = depthMap[i];\n// points[i] = new Point3d(vector.x, vector.y, vector.z);\n// }\n// hull.build(points);\n\n p5.fill(255, 50);\n p5.stroke(255, 70);\n\n for (QuickHull3D hull : hulls) {\n int[][] faceIndices = hull.getFaces();\n for (int i = 0; i < faceIndices.length; i++) {\n p5.beginShape();\n for (int k = 0; k < faceIndices[i].length; k++) {\n Point3d point = hull.getVertices()[faceIndices[i][k]];\n p5.vertex((float) point.x, (float) point.y, (float) point.z);\n }\n p5.endShape();\n }\n }\n\n// PApplet.println(hull.getNumFaces());\n }", "public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new FileReader(\"data.txt\"));\n\n // Read in all the points from the input file\n StringTokenizer st;\n while (in.ready()) {\n st = new StringTokenizer(in.readLine());\n\n int x = Integer.parseInt(trim(st.nextToken()));\n int y = Integer.parseInt(st.nextToken());\n\n points.add(new Point(x, y));\n }\n in.close();\n\n // Find Convex Hull\n finalPoints = convexHull(points, points.size());\n\n // Determine scaling of coordinates\n maxCoordinate = 0;\n for (Point p : finalPoints) {\n maxCoordinate = Math.max(p.x, maxCoordinate);\n maxCoordinate = Math.max(p.y, maxCoordinate);\n }\n\n // Display the Convex Hull in the Console\n System.out.println(\"Convex Hull Solution: \");\n for (Point p : finalPoints) {\n System.out.println(\"(\" + p.x + \", \" + p.y + \")\");\n }\n System.out.println(\"\\nSwitch to the Display Window to see your Convex Hull!\");\n\n // Graphically display the Convex Hull\n ConvexHullJM hull = new ConvexHullJM();\n\n JFrame frame = new JFrame(\"Convex Hull\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.add(hull);\n frame.setSize(800, 800);\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n }", "public BruteCollinearPoints(Point[] points) {\n if (null == points)\n throw new NullPointerException();\n improperArgumentCheck(points);\n this.points = points;\n this.segments = findSegments();\n }", "public void findUpperHull(Point p1, Point pn, ArrayList<Point> s){\n if(s.isEmpty()){\n if(convexHull.contains(p1) && convexHull.contains(pn))\n return;\n else if(convexHull.contains(p1) && !convexHull.contains(pn))\n convexHull.add(pn);\n else if(convexHull.contains(pn) && !convexHull.contains(p1))\n convexHull.add(p1);\n else{\n convexHull.add(p1);\n convexHull.add(pn);\n }\n }\n else{\n int maxindex = findMaxPt(s, p1, pn);\n ArrayList<Point> s1 = findS(s, p1, s.get(maxindex));\n ArrayList<Point> s2 = findS(s, s.get(maxindex), pn);\n findUpperHull(p1, s.get(maxindex), s1);\n findUpperHull(s.get(maxindex), pn, s2);\n }\n }", "public static vtkPoints createPoints(float[] points)\n\t{\n\t\tvtkPoints vtkPoints = new vtkPoints();\n\t\tvtkFloatArray d = new vtkFloatArray();\n\t\td.SetJavaArray(points);\n\t\td.SetNumberOfComponents(3);\n\t\tvtkPoints.SetData(d);\n\t\tdelete(d);\n\t\treturn vtkPoints;\n\t}", "public abstract void constructHull();", "public BruteCollinearPoints(Point[] points) {\n this.points = points;\n }", "public BruteCollinearPoints(Point[] points) {\n\t\tcheckArguments(points);\n\t\tcheckDuplicateArguments(points);\n\t\tN = points.length;\n\t\tmPoints = new Point[N];\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tmPoints[i] = points[i];\n\t\t}\n\t}", "public static vtkPoints createPoints(double[] points)\n\t{\n\t\tvtkPoints vtkPoints = new vtkPoints();\n\t\tvtkDoubleArray d = new vtkDoubleArray();\n\t\td.SetJavaArray(points);\n\t\td.SetNumberOfComponents(3);\n\t\tvtkPoints.SetData(d);\n\t\tdelete(d);\n\t\treturn vtkPoints;\n\t}", "public FastCollinearPoints(Point[] points) {\n if (points == null) throw new NullPointerException();\n this.points = new Point[points.length];\n for (int i = 0; i < points.length; i++) {\n if (points[i] == null) throw new NullPointerException();\n this.points[i] = points[i];\n }\n\n Arrays.sort(this.points);\n for (int i = 0; i < points.length - 1; i++) {\n if (this.points[i].compareTo(this.points[i+1]) == 0)\n throw new IllegalArgumentException();\n }\n lineSegments = new Point[points.length * points.length / 4][2];\n findAllLineSegments();\n }", "boolean checkPointInsidePolygon(Point[] points, PVector input) {\n\t\tint i, j;\n\t\tboolean c = false;\n\t\tfor (i = 0, j = points.length - 1; i < points.length; j = i++) {\n\t\t\tif (((points[i].y > input.y) != (points[j].y > input.y))\n\t\t\t\t\t&& (input.x < (points[j].x - points[i].x) * (input.y - points[i].y) / (points[j].y - points[i].y)\n\t\t\t\t\t\t\t+ points[i].x))\n\t\t\t\tc = !c;\n\t\t}\n\t\treturn c;\n\t}", "public QuickHull() {\n allPoints =new ArrayList<>();\n convexHull = new ArrayList<>();\n }", "public BruteCollinearPoints(Point[] points) {\n if (points == null) {\n throw new NullPointerException(\"points array was null\");\n }\n\n verifyPointsArray(points);\n this.points = points;\n }", "public ConvexHull(String inputFileName) throws FileNotFoundException, InputMismatchException\n\t{\n\t\tFile file = new File(inputFileName);\n\t Scanner in = new Scanner(file);\n\t int count = 0;\n\t while(in.hasNextInt())\n\t {\n\t \tin.nextInt();\n\t \tcount++; //count the number of numbers in the file\n\t }\n\t in.close();\n\t if(count % 2 == 1)\n\t\t{\n\t\t throw new InputMismatchException(); //odd number of integers\n\t\t}\n\t if(count < 2) //if the file does not contain any numbers or only 1 number\n\t {\n\t \tthrow new NoSuchElementException();\n\t }\n\t points = new Point[count / 2]; //count needs to be divided by two because each number is a x and y of the point\n\t Scanner in1 = new Scanner(file);\n\t int index = 0;\n\t\twhile(in1.hasNext()) //scan numbers and assign to point objects\n\t\t{\n\t\t\tint tempX = in1.nextInt();\n\t\t\tint tempY = in1.nextInt();\n\t\t\tpoints[index] = new Point(tempX, tempY);\t\t\n\t\t\tindex++;\n\t\t}\n\t\tin1.close();\n\t\tquicksorter = new QuickSortPoints(points);\n\t\tremoveDuplicates();\n\t\tlowestPoint = pointsNoDuplicate[0];\n\t}", "private void drawAllIntersections(Point[] points, DrawSurface d) {\n for (Point point : points) {\n if (point == null) {\n break;\n }\n int r = 3;\n d.setColor(Color.RED);\n d.fillCircle((int) point.getX(), (int) point.getY(), r);\n }\n }", "public FastCollinearPoints(Point[] input) {\n if (input == null) {\n throw new NullPointerException();\n }\n\n Point[] points = Arrays.copyOf(input, input.length);\n Arrays.sort(points);\n\n // check for duplicate points\n for (int i = 1; i < points.length; i++) {\n if (points[i - 1].slopeTo(points[i]) == Double.NEGATIVE_INFINITY) {\n throw new IllegalArgumentException();\n }\n }\n\n lineSegments = new ArrayList<LineSegment>();\n\n for (int i = 0; i < points.length; i++) {\n if (points[i] == null) {\n throw new NullPointerException();\n }\n Point origin = points[i];\n\n Point[] temp = Arrays.copyOf(points, points.length);\n\n Arrays.sort(temp, origin.slopeOrder());\n\n int counter = 1;\n Point min = origin;\n Point max = origin;\n\n double slope = 0;\n if (temp.length > 3) {\n slope = origin.slopeTo(temp[1]);\n }\n\n for (int q = 2; q < points.length; q++) {\n double slope2 = origin.slopeTo(temp[q]);\n if (slope == slope2) {\n counter++;\n max = temp[q];\n min = min.compareTo(temp[q]) > 0 ? temp[q] : min;\n min = min.compareTo(temp[q - 1]) > 0 ? temp[q - 1] : min;\n\n } else {\n if (counter >= 3 && min == origin) {\n lineSegments.add(new LineSegment(origin, max));\n }\n counter = 1;\n max = origin;\n min = origin;\n }\n slope = slope2;\n\n }\n\n if (counter >= 3 && min == origin) {\n lineSegments.add(new LineSegment(origin, max));\n }\n\n }\n }", "@Test\n\tpublic void testCalculateConvexHullFromWktGeometryList02() throws ParseException{\n\t\tList<String> wktPolyList = new ArrayList<String>();\n\t\twktPolyList.add(\"POLYGON((138.001 -40.0,139.0 -40.0,200.5 -20.0,138.001 -40.0))\");\n\t\twktPolyList.add(\"POLYGON((138.001 -40.0,136.0 -40.0,200.5 -24.0,138.001 -40.0))\");\n\t\twktPolyList.add(\"POLYGON((138.001 -40.0,132.0 -40.0,200.5 -27.0,138.001 -40.0))\");\n\t\twktPolyList.add(\"POINT(136.001 -30.0)\");\n\t\twktPolyList.add(\"BOOBAR\");\n\t\ttry{\n\t\t\tConvexHullUtil.calculateConvexHullFromWktGeometryList(wktPolyList, false);\n\t\t\tfail();\n\t\t}catch(ParseException pex){\n\t\t\t// success\n\t\t}\n\t}", "@Test\n\tpublic void testCalculateConvexHullFromWktGeometryList01() throws ParseException{\n\t\tList<String> wktPolyList = new ArrayList<String>();\n\t\twktPolyList.add(\"POLYGON((138.001 -40.0,139.0 -40.0,200.5 -20.0,138.001 -40.0))\");\n\t\twktPolyList.add(\"POLYGON((138.001 -40.0,136.0 -40.0,200.5 -24.0,138.001 -40.0))\");\n\t\twktPolyList.add(\"POLYGON((138.001 -40.0,132.0 -40.0,200.5 -27.0,138.001 -40.0))\");\n\t\twktPolyList.add(\"POINT(136.001 -30.0)\");\n\t\tString result = ConvexHullUtil.calculateConvexHullFromWktGeometryList(wktPolyList, false);\n\t\tassertThat(result, is(\"POLYGON ((132 -40, 136.001 -30, 200.5 -20, 200.5 -27, 138.001 -40, 139 -40, 132 -40))\"));\n\t}", "public void draw()\n\t{\t\t\n\t\tArrayList<Segment> seg = new ArrayList<Segment>();\n\t\tfor(int i = 0; i < hullVertices.length - 1; i++)\n\t\t{\n\t\t\tSegment s = new Segment(hullVertices[i], hullVertices[i+1]);\n\t\t\tseg.add(s);\n\t\t}\n\t\tSegment s1 = new Segment(hullVertices[hullVertices.length-1], hullVertices[0]);\n\t\tseg.add(s1);\n\t\t// Based on Section 4.1, generate the line segments to draw for display of the convex hull.\n\t\t// Assign their number to numSegs, and store them in segments[] in the order.\n\t\tSegment[] segments = new Segment[seg.size()];\n\t\tfor(int i = 0; i < seg.size(); i++)\n\t\t{\n\t\t\tsegments[i] = seg.get(i);\n\t\t}\n\t\t// The following statement creates a window to display the convex hull.\n\t\tPlot.myFrame(pointsNoDuplicate, segments, getClass().getName());\n\t}", "@SuppressWarnings(\"deprecation\")\n\t@Test\n\tpublic void testCalculateConvexHullFromWktGeometryList03() throws ParseException{\n\t\tList<String> pointWktList = new ArrayList<String>();\n\t\tpointWktList.add(\"POINT(123.0 1.0)\");\n\t\tString result = ConvexHullUtil.calculateConvexHullFromWktGeometryList(pointWktList, false);\n\t\tassertThat(result, is(\"POINT (123 1)\"));\n\t\tShape shape = JtsSpatialContext.GEO.readShape(result);\n\t\tassertNotNull(shape);\n\t}", "public Map<Integer, Geometry> getConvexHull(Geometry geom) throws SQLException {\n return retrieveExpected(createNativeConvexHullStatement(geom), GEOMETRY);\n }", "public static ArrayList<Triangle> Triangulation(ArrayList<Point> points){\n\t\t\n\t\t\n\t\t\n\t\tpoints.sort(new PointComperator());\n\t\tpoints.add(MainFrame.buutomLeft);\n\t\tStack<Point> CH= new Stack<Point>();\n\t\tArrayList<Triangle> T=new ArrayList<Triangle>();\n\t\tCH.push(MainFrame.buutomLeft);\n\t\tCH.push(points.get(0));\n\t\tCH.push(points.get(1));\n\t\t\n\t\tfor (int i = 0; i < points.size(); i++) {\n\t\t\tPoint curr=points.get(i);\n\t\t\tif(Orient(CH.get(CH.size()-2),CH.peek(), curr))\n\t\t\t{\n\t\t\t\tT.add(new Triangle(curr, CH.peek(), MainFrame.buutomLeft));\n\t\t\t\tCH.push(curr);\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tT.add(new Triangle(CH.peek(), curr, MainFrame.buutomLeft));\n\n\t\t\t\twhile(!Orient(CH.get(CH.size()-2),CH.peek(),curr)) {\n\t\t\t\t\tPoint temp = CH.pop();\n\t\t\t\t\tT.add(new Triangle(temp, CH.peek(), curr));\n\t\t\t\t}\n\t\t\t\tCH.push(curr);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn T;\n\t}", "private static Stack<Point> grahamScan(Set<Point> points){\n List<Point> sortedPoints = new ArrayList<>(sortedPointsSet(points));\n\n if(sortedPoints.size() < 3)\n throw new IllegalArgumentException(\"At least three unique points must be provided\");\n if(pointsAreCollinear(sortedPoints))\n throw new IllegalArgumentException(\"Points must not be collinear\");\n\n Stack<Point> stack = new Stack<>();\n stack.push(sortedPoints.get(0));\n stack.push(sortedPoints.get(1));\n stack.push(sortedPoints.get(2));\n\n for (int i = 3; i < sortedPoints.size(); i++) {\n Point top = stack.pop();\n Point nextToTop = stack.peek();\n Point pi = sortedPoints.get(i);\n\n AngleDirection direction = getAngleDirection(nextToTop, top, pi);\n\n switch (direction){\n case COUNTERCLOCKWISE: {\n stack.push(top);\n stack.push(pi);\n break;\n }\n case CLOCKWISE: {\n i--;\n break;\n }\n case COLLINEAR:{\n stack.push(pi);\n break;\n }\n }\n }\n return stack;\n }", "public Polygon getPoints() {\n\t\tPolygon points = new Polygon();\n\t\t// Each side of the diamond needs to be DIM pixels long, so there\n\t\t// is more maths this time, involving triangles and that Pythagoras\n\t\t// dude... \n\t\tint radius = this.size * (DIM / 2);\n\t\tint hypotenuse = (int)Math.hypot(radius, radius);\n\t\t// Four points where order is important - screwing up here does\n\t\t// not produce a shape of any sort...\n\t\tpoints.addPoint(this.x, this.y - hypotenuse); // top\n\t\tpoints.addPoint(this.x - hypotenuse, this.y); // left\n\t\tpoints.addPoint(this.x, this.y + hypotenuse); // bottom\t\t\n\t\tpoints.addPoint(this.x + hypotenuse, this.y); // right\n\t\treturn points;\n\t}", "@Test\n\tpublic void testConvexHullJTSApi(){\n\t\tCoordinate [] ca3 = {\n\t\t\t\tnew Coordinate(1.0, 2.5),\n\t\t\t\tnew Coordinate(2.0, 2.5)\n\t\t};\n\t\tConvexHull objectUnderTest = new ConvexHull(ca3, geometryFactory);\n\t\tGeometry result = objectUnderTest.getConvexHull();\n\t\tassertThat(result.toText(), is(\"LINESTRING (1 2.5, 2 2.5)\"));\n\t}", "public Collection <Point> getAllPoints(){\n Collection <Point> points = new ArrayList<>();\n for(int i = 0; i < width; i++){\n for(int j = 0; j < height; j++){\n points.add(new Point(i, j));\n }\n }\n return points;\n }", "public void addHole(List<? extends PointD> points) {\n if (GeoComputation.isClockwise(points)) {\n Collections.reverse(points);\n }\n _holeLines.add(points);\n }", "public GLGraphics drawPoints(Iterable<Vec2f> points) {\n\t\treturn render(GL.GL_POINTS, points);\n\t}", "protected static List<Marker> getSortedPointSet(List<Marker> points) {\n\n final Marker lowest = getLowestPoint(points);\n List<Marker> setMarker = new ArrayList<>();\n TreeSet<Marker> set = new TreeSet<Marker>(new Comparator<Marker>() {\n @Override\n public int compare(Marker a, Marker b) {\n\n if(a == b || a.equals(b)) {\n return 0;\n }\n\n // use longs to guard against int-underflow\n double thetaA = Math.atan2(a.getPosition().latitude - lowest.getPosition().latitude, a.getPosition().longitude - lowest.getPosition().longitude);\n double thetaB = Math.atan2(b.getPosition().latitude - lowest.getPosition().latitude, b.getPosition().longitude - lowest.getPosition().longitude);\n\n if(thetaA < thetaB) {\n return -1;\n }\n else if(thetaA > thetaB) {\n return 1;\n }\n else {\n // collinear with the 'lowest' point, let the point closest to it come first\n\n // use longs to guard against int-over/underflow\n double distanceA = Math.sqrt(((lowest.getPosition().longitude - a.getPosition().longitude) * (lowest.getPosition().longitude - a.getPosition().longitude)) +\n ((lowest.getPosition().latitude - a.getPosition().latitude) * ((long)lowest.getPosition().latitude - a.getPosition().latitude)));\n double distanceB = Math.sqrt(((lowest.getPosition().longitude - b.getPosition().longitude) * (lowest.getPosition().longitude - b.getPosition().longitude)) +\n (((long)lowest.getPosition().latitude - b.getPosition().latitude) * ((long)lowest.getPosition().latitude - b.getPosition().latitude)));\n\n if(distanceA < distanceB) {\n return -1;\n }\n else {\n return 1;\n }\n }\n }\n });\n\n set.addAll(points);\n for (Marker mk :\n set) {\n\n setMarker.add(mk);\n }\n return setMarker;\n }", "public int getHull() {\r\n return hull;\r\n }", "public List<Vector3D> getConvexCellsInsidePoints() {\n return convexCellsInsidePoints;\n }", "public static List<PVector> translateToOrigin(List<PVector> points) {\n PVector c = centroid(points);\n return translateToOrigin(points, c);\n }", "private void drawHullPolygon(HashMap<Integer, HashSet<Star>> hulls, IHullAlgorithms hullAlgo, PolygonProperties props, int depth, boolean drawGroupNames)\r\n\t{\r\n\t\tIterator<Entry<Integer, HashSet<Star>>> it = hulls.entrySet().iterator();\r\n\t\twhile(it.hasNext())\r\n\t\t{\r\n\t\t\tEntry<Integer, HashSet<Star>> entry = it.next();\r\n\t\t\tArrayList<Star> hull = hullAlgo.constructHull(entry.getValue());\r\n\t\t\tPolygon pory = drawPorygon(hull, props, depth);\r\n\t\t\tif(drawGroupNames)\r\n\t\t\t{\r\n\t\t\t\tif(pory == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tStar current = hull.get(0);\r\n\t\t\t\t\tlang.newText(getStarPosition(current.x, current.y), \"(\" + entry.getKey() + \")\", entry.getKey()+\"alone : groupID\", null, groupNamesProps);\r\n\t\t\t\t} else\r\n\t\t\t\t{\r\n\t\t\t\t\tlang.newText(new Offset(0, 0, pory.getName(), AnimalScript.DIRECTION_C), \"(\" + entry.getKey() + \")\", pory.getName()+\"groupID\", null, groupNamesProps);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void processPoints() {\n\t\t// We don't want multiple of the same normals, so we calculate them on the fly\n\t\tArrayList<Vector2f> normals = new ArrayList<Vector2f>();\n\t\tVector2f edge = new Vector2f();\n\n\t\tif (points.length < 3) {\n\t\t\tthrow new IllegalStateException(\"There must be more than two points in a polygon... Shame on you!\");\n\t\t}\n\t\t\n\t\t// Calculate the center\n\t\tcenter = new Vector2f();\n\t\tfor (Vector2f p : points) {\n\t\t\tcenter.add(p);\t\t\n\t\t}\n\t\tcenter.scale(1.0f / (float) points.length);\n\t\t\n\t\t// Subtract the center from each point so it's centerd\n\t\tfor (Vector2f p : points) {\n\t\t\tp.sub(center);\n\t\t}\n\t\t\n\t\t// Calculate the direction to loop through them\n\t\tVector2f edgeA = points[points.length - 1].clone().sub(points[0]);\n\t\tVector2f edgeB = points[1].clone().sub(points[0]);\n\t\t\n\t\tboolean rightHand = edgeA.x * edgeB.y - edgeB.x * edgeA.y < 0;\n\t\t\n\t\tfor (int i = 0; i < points.length; i++) {\n\t\t\tVector2f.sub(points[(i + 1) % points.length], points[i], edge);\n\t\t\t\n\t\t\t// Check if the current point is further away then the current\n\t\t\tfloat length = points[i].length();\n\t\t\tbroadPhaseLength = Math.max(length, broadPhaseLength);\n\t\t\t\n\t\t\t// Calculated of 90 degree rotation matrix\n\t\t\t\n\t\t\tVector2f normal;\n\t\t\tif (rightHand) {\n\t\t\t\tnormal = new Vector2f( edge.y,-edge.x);\n\t\t\t} else {\n\t\t\t\tnormal = new Vector2f(-edge.y, edge.x);\n\t\t\t}\n\t\t\tnormal.normalise();\n\t\t\tint j = 0;\n\t\t\tfor (; j < normals.size(); j++) {\n\t\t\t\tif (Math.abs(normals.get(j).dot(normal)) == 1.0f) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (j == normals.size()) {\n\t\t\t\tnormals.add(normal);\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.normals = new Vector2f[normals.size()];\n\t\tnormals.toArray(this.normals);\n\t}", "private double getArea(List<Point> points){\n double result = 0.0;\n int n = points.size();\n for (int i = 0; i < n; i++) {\n if (i == 0) {\n result += points.get(i).x * (points.get(n - 1).z - points.get(i + 1).z);\n } else if (i == (n - 1)) {\n result += points.get(i).x * (points.get(i - 1).z - points.get(0).z);\n } else {\n result += points.get(i).x * (points.get(i - 1).z - points.get(i + 1).z);\n }\n }\n return Math.abs(result) / 2.0;\n }", "protected static boolean areAllCollinear(List<Point2D.Float> points) {\n\n\t\tif (points.size() < 2) {\n\t\t\treturn true;\n\t\t}\n\n\t\tfinal Point2D.Float a = points.get(0);\n\t\tfinal Point2D.Float b = points.get(1);\n\n\t\tfor (int i = 2; i < points.size(); i++) {\n\n\t\t\tPoint2D.Float c = points.get(i);\n\n\t\t\tif (getTurn(a, b, c) != Turn.COLLINEAR) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public int minAreaRect(int[][] points) {\r\n\r\n\t\tif(points==null){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tMap<Integer, List<Integer>> map = new HashMap<Integer, List<Integer>>();\r\n\t\t\r\n\t\tint minArea = Integer.MAX_VALUE;\r\n\t\tfor(int[] point:points){\r\n\t\t\t\r\n\t\t\tif(!map.containsKey(point[0])){\r\n\t\t\t\tmap.put(point[0], (new ArrayList<Integer>()));\r\n\t\t\t}\r\n\t\t\tmap.get(point[0]).add(point[1]);\r\n\t\t}\r\n\t\t\r\n\t\tfor(int[] point1:points){\r\n\t\t\tfor(int[] point2:points){\r\n\t\t\t\t\r\n\t\t\t\t//check two points of diagonal\r\n\t\t\t\tif(point1[0]==point2[0]||point1[1]==point2[1]){\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t//find the parallel points\r\n\t\t\t\tif(map.get(point1[0]).contains(point2[1]) && map.get(point2[0]).contains(point1[1])){\r\n\t\t\t\t\tminArea = Math.min(minArea, Math.abs((point1[0]-point2[0])*(point1[1]-point2[1])));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn minArea==Integer.MAX_VALUE?0:minArea;\r\n\t}", "public void setPoints(List<GeoPoint> points){\n\t\tclearPath();\n\t\tint size = points.size();\n\t\tmOriginalPoints = new int[size][2];\n\t\tfor (int i=0; i<size; i++){\n\t\t\tGeoPoint p = points.get(i);\n\t\t\tmOriginalPoints[i][0] = p.getLatitudeE6();\n\t\t\tmOriginalPoints[i][1] = p.getLongitudeE6();\n\t\t\tif (!mGeodesic){\n\t\t\t\taddPoint(p);\n\t\t\t} else {\n\t\t\t\tif (i>0){\n\t\t\t\t\t//add potential intermediate points:\n\t\t\t\t\tGeoPoint prev = points.get(i-1);\n\t\t\t\t\tfinal int greatCircleLength = prev.distanceTo(p);\n\t\t\t\t\t//add one point for every 100kms of the great circle path\n\t\t\t\t\tfinal int numberOfPoints = greatCircleLength/100000;\n\t\t\t\t\taddGreatCircle(prev, p, numberOfPoints);\n\t\t\t\t}\n\t\t\t\taddPoint(p);\n\t\t\t}\n\t\t}\n\t}", "public Shape(Vertex2D... points) {\n\t\tthis.points = new Vector2f[points.length];\n\t\t\n\t\tfor (int i = 0; i < points.length; i++) {\n\t\t\tthis.points[i] = new Vector2f(points[i].getData(0));\n\t\t}\n\t\t\n\t\tprocessPoints();\n\t}", "@Override\n public int compare(QuickHull.Point p1, QuickHull.Point p2){\n if(p1.x== p2.x && p1.y==p2.y)\n return 0;\n //if x coordinate less or x coordinate equal, but\n //y coordinate is less (tie break)\n else if(p1.x<p2.x || p1.x==p2.x && p1.y<p2.y)\n return -1;\n else\n return 1;\n }", "private static int[][] removeCollinear(int[][] pointSet)\n {\n int numCollinear = 0;\n for (int i = 1; i<= pointSet[0].length-2; i++)\n {\n if (((pointSet[0][i]-pointSet[0][0])*(pointSet[1][i+1]-pointSet[1][0]))-\n ((pointSet[0][i+1]-pointSet[0][0])*(pointSet[1][i]-pointSet[1][0])) == 0)\n numCollinear++;\n }\n if (numCollinear == 0)\n return pointSet;\n\n int[][] pointSetTemp = new int[2][pointSet[0].length-numCollinear];\n pointSetTemp[0][0] = pointSet[0][0]; pointSetTemp[1][0] = pointSet[1][0];\n int j=1;\n for (int i = 1; i<= pointSet[0].length-2; i++)\n {\n if (((pointSet[0][i]-pointSet[0][0])*(pointSet[1][i+1]-pointSet[1][0]))-\n ((pointSet[0][i+1]-pointSet[0][0])*(pointSet[1][i]-pointSet[1][0])) == 0)\n {\n int d1 = Math.abs((pointSet[0][i]-pointSet[0][0])^2 + (pointSet[1][i]-pointSet[1][0])^2);\n int d2 = Math.abs((pointSet[0][i+1]-pointSet[0][0])^2 + (pointSet[1][i+1]-pointSet[1][0])^2);\n if (d1 > d2)\n {\n pointSetTemp[0][j] = pointSet[0][i]; pointSetTemp[1][j] = pointSet[1][i];\n i++; j++;\n }\n else\n {\n pointSetTemp[0][j] = pointSet[0][i+1]; pointSetTemp[1][j] = pointSet[1][i+1];\n i++; j++;\n }\n }\n else\n {\n pointSetTemp[0][j] = pointSet[0][i]; pointSetTemp[1][j] = pointSet[1][i];\n j++;\n }\n }\n if (j < pointSetTemp[0].length)\n {\n pointSetTemp[0][j] = pointSet[0][pointSet[0].length-1];\n pointSetTemp[1][j] = pointSet[1][pointSet[0].length-1];\n }\n return pointSetTemp;\n }", "public static ArrayList<Edge> kruskal(ArrayList<Point> points) {\n System.out.println(\"kruskal points size = \" + points.size());\n //Construct a list of all possible edges of the tree\n ArrayList<Edge> edges = Edge.createEdges(points);\n\n //Sort the list of edges in ascending order by their weight (the distance between the two ends).\n edges = sort(edges);\n\n //Initialize an empty \"solution\" list.\n ArrayList<Edge> kruskal = new ArrayList<>();\n Edge current;\n NameTag forest = new NameTag(points);\n //Traverse the list of edges in ascending order\n while (edges.size() != 0) {\n current = edges.remove(0);\n //If adding the current edge does not create a cycle in the solution,\n //add it to the solution.\n if (forest.tag(current.getP()) != forest.tag(current.getQ())) {\n kruskal.add(current);\n forest.reTag(forest.tag(current.getP()), forest.tag(current.getQ()));\n }\n }\n return kruskal;\n //Translate the \"solution\" list into a tree structure and return it\n //return Edge.edgesToTree(kruskal, kruskal.get(0).getP());\n }", "public Set<Point> getHitboxPoints() {\n Set<Point> hitboxPoints = new HashSet<>();\n\n for(Point p : relevantPoints)\n {\n int currX = (int)(p.x + xPos - (getWidth() / 2));\n int currY = (int)(p.y + yPos - (getHeight() / 2));\n\n hitboxPoints.add(new Point(currX, currY));\n }\n\n return hitboxPoints;\n }", "public void addPoints(List<Point2D> points);", "Collection<Point> getCoordinates(int... ids);", "private static List<Point> reorder(List<Point> points) {\n Point tl = points.get(0);\n for (int i = 1; i< 4; i++) {\n if ((tl.x + tl.y) > (points.get(i).x + points.get(i).y)) {\n tl = points.get(i);\n }\n }\n\n // find bottom right => max sum\n Point br = points.get(0);\n for (int i = 1; i< 4; i++) {\n if ((br.x + br.y) < (points.get(i).x + points.get(i).y)) {\n br = points.get(i);\n }\n }\n\n // find top right => max x - y\n Point tr = points.get(0);\n for (int i = 1; i< 4; i++) {\n if ((tr.x - tr.y) < (points.get(i).x - points.get(i).y)) {\n tr = points.get(i);\n }\n }\n\n // find bottom left => min x - y\n Point bl = points.get(0);\n for (int i = 1; i< 4; i++) {\n if ((bl.x - bl.y) > (points.get(i).x - points.get(i).y)) {\n bl = points.get(i);\n }\n }\n\n List<Point> reorderList = new ArrayList<>();\n reorderList.add(tl);\n reorderList.add(tr);\n reorderList.add(br);\n reorderList.add(bl);\n\n return reorderList;\n }", "public static int maxPoints(Point[] points) {\n\n if (points.length < 2) {\n return points.length;\n }\n Map<LineEquation, Set<Integer>> linesCounter = new HashMap<>();\n int maxNumber = 0;\n\n for (int firstIndex = 0; firstIndex < points.length; firstIndex++) {\n for (int secondIndex = firstIndex + 1; secondIndex < points.length; secondIndex++) {\n Point firstPoint = points[firstIndex];\n Point secondPoint = points[secondIndex];\n\n double slope = (firstPoint.y - secondPoint.y);\n if (slope != 0){\n int XDiff = firstPoint.x - secondPoint.x;\n slope = XDiff == 0 ? Double.MAX_VALUE : (double)slope/(double)XDiff;\n }\n double x = slope == Double.MAX_VALUE ? firstPoint.x : Double.MAX_VALUE;\n double yIntercept = slope == Double.MAX_VALUE ? Double.MAX_VALUE : firstPoint.y -(slope* firstPoint.x);\n\n Set<Integer> integers = linesCounter.computeIfAbsent(new LineEquation(slope, yIntercept, x), k -> new HashSet<>());\n integers.add(firstIndex);\n integers.add(secondIndex);\n\n\n maxNumber = Math.max( maxNumber, integers.size());\n }\n }\n\n return maxNumber;\n\n }", "List<GeodeticPoint> getVisibilityCircle(ICoordinate coordinate, int points) throws OrekitException;", "public GLineGroup(GPoint... points) {\n\t\tif (points == null) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t\tfor (GPoint point : points) {\n\t\t\tadd(point);\n\t\t}\n\t}", "public void addAll(Points points) {\n\t\tfor (int i = 0; i < points.size(); i++) {\n\t\t\tPoint temp = points.getPoint(i);\n\t\t\tif (!this.points.contains(temp))\n\t\t\t\tthis.points.add(temp);\n\t\t}\n\t}", "protected static Point2D.Float getLowestPoint(List<Point2D.Float> points) {\n\n\t\tPoint2D.Float lowest = points.get(0);\n\n\t\tfor (int i = 1; i < points.size(); i++) {\n\n\t\t\tPoint2D.Float temp = points.get(i);\n\n\t\t\tif (temp.y < lowest.y || (temp.y == lowest.y && temp.x < lowest.x)) {\n\t\t\t\tlowest = temp;\n\t\t\t}\n\t\t}\n\n\t\treturn lowest;\n\t}", "public Area(ArrayList<Point> polygonPoints) {\n this.polygonPoints = polygonPoints;\n }", "public static String buildPolygon(String controlPoints, String id, \n String name, String description, String lineColor, String fillColor, KmlOptions.AltitudeMode altitudeMode, \n SymbolModifiers attributes) {\n \n StringBuilder output = new StringBuilder(); \n String pointArrayStringList = \"\";\n \n try {\n \n // Get the points of the icons. For the polyarc we need only\n // one point, the pivot point, then the rest of the points for the \n // polygon. \n String[] latlons = controlPoints.split(\" \");\n if (latlons.length >= 2) {\n\n // Build the polyarc\n pointArrayStringList = XsltCoordinateWrapper.getPolygonKml(\n latlons, id, name, description, lineColor, fillColor, altitudeMode,\n attributes.X_ALTITUDE_DEPTH.get(0), \n attributes.X_ALTITUDE_DEPTH.get(1));\n } else {\n // throw illegal number of points exception\n throw new InvalidNumberOfPointsException();\n } \n } catch (Exception e) {\n pointArrayStringList = \"\"; \n }\n\n return pointArrayStringList;\n\n }", "public static native GPolyline create(JavaScriptObject points)/*-{\r\n\t\treturn new $wnd.GPolyline(points);\r\n\t}-*/;", "public static float countPolygonSurface(List<Point2D.Float> points) {\n\n\t\t// surface_part1 and surface_part2 are parts of the surface of polygon\n\t\tfloat surface = 0, surface_part1 = 0, surface_part2 = 0;\n\n\t\tint n = points.size();\n\t\tint j = 0;\n\n\t\t// area of irregular polygon formula\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tj = (i + 1) % n;\n\t\t\tsurface_part1 += points.get(i).x * points.get(j).y;\n\t\t\tsurface_part2 += points.get(i).y * points.get(j).x;\n\t\t}\n\t\tsurface = (surface_part1 - surface_part2) / 2;\n\n\t\t// absolute value from surface\n\t\tif (surface < 0) { surface = surface * -1;}\n\t\t\n\t\treturn surface;\n\t}", "public static void sortX(ArrayList<Point> points) {\n\t\tCollections.sort(points, new Comparator<Point>() {\n\t\t\tpublic int compare(Point p1, Point p2) {\n\t\t\t\tif (p1.getX() < p2.getX())\n\t\t\t\t\treturn -1;\n\t\t\t\tif (p1.getX() > p2.getX())\n\t\t\t\t\treturn 1;\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\t}", "public ArrayList<Point> nullPoint() {\n\t\tArrayList<Point> points = new ArrayList<Point>();\n\t\tfor (int r=0; r<rows(); r=r+1) {\n\t\t\tfor (int c=0; c<cols(); c=c+1) {\n\t\t\t\tPoint p = new Point(r,c);\n\t\t\t\tif(get(p)==null) {\n\t\t\t\t\tpoints.add(p);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn points;\n\t}", "public double pointCost (scala.collection.TraversableOnce<org.apache.spark.mllib.clustering.VectorWithNorm> centers, org.apache.spark.mllib.clustering.VectorWithNorm point) { throw new RuntimeException(); }", "public Shape(Vector2f... points) {\n\t\tthis.points = points;\n\t\tprocessPoints();\n\t}", "public LineStrip2D(List<Point2D> points) {\n this.points = new ArrayList<Point2D>(points);\n }", "private boolean checkConvexity()\r\n \t{\r\n\t\tswap(0, findLowest());\r\n\t\tArrays.sort(v, new Comparator() {\r\n\t\t\tpublic int compare(Object a, Object b)\r\n\t\t\t{\r\n\t\t\t\tint as = area_sign(v[0], (Pointd)a, (Pointd)b);\r\n\t\t\t\tif ( as > 0)\t\t/* left turn */\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\telse if (as < 0)\t/* right turn */\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\telse \t\t\t\t\t/* collinear */\r\n\t\t\t\t{\r\n\t\t\t\t\tdouble x = Math.abs(((Pointd)a).getx() - v[0].getx()) - Math.abs(((Pointd)b).getx() - v[0].getx());\r\n\t\t\t\t\tdouble y = Math.abs(((Pointd)a).gety() - v[0].gety()) - Math.abs(((Pointd)b).gety() - v[0].gety());\r\n\t\t\t\t\tif ( (x < 0) || (y < 0) )\r\n\t\t\t\t\t\treturn -1;\r\n\t\t\t\t\telse if ( (x > 0) || (y > 0) )\r\n\t\t\t\t\t\treturn 1;\r\n\t\t\t\t\telse\t\t// points are coincident\r\n\t\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n \t\tfor (int i=0; i < nv; i++)\r\n \t\t{\r\n \t\t\ti2 = next(i, nv);\r\n \t\t\ti3 = next(i2, nv);\r\n \t\t\tif ( !lefton(\tv[i], v[i2], v[i3]) )\r\n \t\t\t\treturn false;\r\n \t\t}\r\n \t\treturn true;\r\n\t}", "public void pointsCollected(List<Point> points);", "private static double[] makePolygon() {\n double[] polygon = new double[POINTS*2];\n \n for (int i = 0; i < POINTS; i++) {\n double a = i * Math.PI * 2.0 / POINTS;\n polygon[2*i] = Math.cos(a);\n polygon[2*i+1] = Math.sin(a);\n }\n \n return polygon;\n }", "private void createMiniTriangles(int[] xPoints, int[] yPoints, int[] color) {\n\t\tint[] xMidpoints = new int[NUM_TRIANGLE_SIDES];\n\t\tint[] yMidpoints = new int[NUM_TRIANGLE_SIDES];\n\n\t\tfor (int i = 0; i < NUM_TRIANGLE_SIDES; i++) {\n\t\t\txMidpoints[i] = avg(xPoints[i], xPoints[(i + 1) % NUM_TRIANGLE_SIDES]);\n\t\t\tyMidpoints[i] = avg(yPoints[i], yPoints[(i + 1) % NUM_TRIANGLE_SIDES]);\n\t\t}\n\n\t\t// midpoint i, midpoint i+1, point i\n\t\tfor (int i = 0; i < NUM_TRIANGLE_SIDES; i++) {\n\t\t\tint[] xMini = {xMidpoints[i], xMidpoints[(i + TRI_TYPE) % NUM_TRIANGLE_SIDES], xPoints[i]};\n\t\t\tint[] yMini = {yMidpoints[i], yMidpoints[(i + TRI_TYPE) % NUM_TRIANGLE_SIDES], yPoints[i]};\n\t\t\tint colorVal = (i + this.rotateOffset) % NUM_TRIANGLE_SIDES;\n\t\t\tthis.drawMiniTriangle(xMini, yMini, color[colorVal], colorVal);\n\t\t}\n\t\tif (IS_ROT_ON) {\n\t\t\tthis.rotateOffset += ROT_OFFSET_BY;\n\t\t}\n\t}", "private GeoPoint getClosestPoint(List<GeoPoint> points) {\r\n\t\tGeoPoint closestPoint = null;\r\n\t\tdouble distance = Double.MAX_VALUE;\r\n\r\n\t\tPoint3D P0 = _scene.get_camera().get_p0();\r\n\r\n\t\tfor (GeoPoint i : points) {\r\n\t\t\tdouble tempDistance = i.point.distance(P0);\r\n\t\t\tif (tempDistance < distance) {\r\n\t\t\t\tclosestPoint = i;\r\n\t\t\t\tdistance = tempDistance;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn closestPoint;\r\n\r\n\t}", "private void internalSetPoints(List<Point3D> points) {\n if (points.size() < MINIMUM_SIZE) {\n throw new IllegalArgumentException();\n }\n mPoints = points;\n }", "@Override\n public void updateConvexHull() {\n BuildingModel buildingModel;\n convexHull = new CompositeConvexHull();\n convexObject.setConvexPolygon(convexHull.getConvexPolygon());\n if (convexObject != null && convexObject.getConvexPolygon() != null && convexObject.getConvexPolygon().npoints != 0) {\n for (int i = 0; i < convexObject.getConvexPolygon().npoints; i++) {\n convexHull.addPoint(convexObject.getConvexPolygon().xpoints[i],\n convexObject.getConvexPolygon().ypoints[i]);\n }\n }\n\n for (StandardEntity entity : entities) {\n if (entity instanceof Building) {\n buildingModel = world.getBuildingModel(entity.getID());\n\n /*if (isDying && building.getEstimatedFieryness() > 0 && building.getEstimatedFieryness() < 3) {\n setDying(false);\n }*/\n\n if (isEdge && !world.getMapSideBuildings().contains(buildingModel.getID())) {\n setEdge(false);\n }\n\n //try {\n// if (membershipChecker.checkMembership(building)) {\n// convexHull.addPoint(building.getSelfBuilding().getX(),\n// building.getSelfBuilding().getY());\n for (int i = 0; i < buildingModel.getSelfBuilding().getApexList().length; i += 2) {\n convexHull.addPoint(buildingModel.getSelfBuilding().getApexList()[i], buildingModel.getSelfBuilding().getApexList()[i + 1]);\n }\n\n// }\n /*} catch (Exception e) {\n e.printStackTrace();\n }*/\n }\n }\n\n\n// sizeOfBuildings(); mostafas commented this\n //if (world.getTime() % 5 == 0) {\n List<BuildingModel> dangerBuildings = new ArrayList<BuildingModel>();\n double clusterEnergy = 0;\n for (StandardEntity entity : getEntities()) {\n BuildingModel burningBuilding = world.getBuildingModel(entity.getID());\n if (burningBuilding.getEstimatedFieryness() == 1) {\n dangerBuildings.add(burningBuilding);\n clusterEnergy += burningBuilding.getEnergy();\n }\n if (burningBuilding.getEstimatedFieryness() == 2) {\n dangerBuildings.add(burningBuilding);\n clusterEnergy += burningBuilding.getEnergy();\n }\n if (burningBuilding.getEstimatedFieryness() == 3 && burningBuilding.getEstimatedTemperature() > 150) {\n dangerBuildings.add(burningBuilding);\n }\n }\n\n setDying(dangerBuildings.isEmpty());\n setControllable(clusterEnergy);\n buildings = dangerBuildings;\n //}\n convexObject.setConvexPolygon(convexHull.getConvexPolygon());\n setBorderEntities();\n setCentre();\n// sizeOfBuildings();\n// setTotalDistance();\n\n setOuterDangerBuildings(); //XXX test\n setOuterBuildings();\n }", "public void setPoints(int points) {\n\t\tthis.points = points;\n\t}", "private Polygon drawPorygon(ArrayList<Star> hull, PolygonProperties props, int depth)\r\n\t{\r\n\t\tif(hull.size() < 2) return null;\t// don't draw anything for 1-star groups\r\n\t\t\r\n\t\t// draw polygon\r\n\t\tNode[] positions = new Node[hull.size()];\r\n\t\tfor(int i=0;i<hull.size();i++)\r\n\t\t{\r\n\t\t\tStar current = hull.get(i);\r\n\t\t\tpositions[i] = getStarPosition(current.x, current.y);\r\n\t\t}\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn lang.newPolygon(positions, \"hull\"+props.get(AnimationPropertiesKeys.COLOR_PROPERTY).toString(), null, props);\r\n\t\t} catch (NotEnoughNodesException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"positions didn't have enough nodes: \"+hull.size());\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "private Point findFront(Point[] points) {\n\t\t// Loop through the passed points.\n\t\tdouble[] dists = new double[3];\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t// Get outer-loop point.\n\t\t\tPoint a = points[i];\n\t\t\t\n\t\t\t// Loop through rest of points.\n\t\t\tfor (int k = 0; k < 3; k++) {\n\t\t\t\t// Continue if current outer.\n\t\t\t\tif (i == k) continue;\n\t\t\t\t\n\t\t\t\t// Get inner-loop point.\n\t\t\t\tPoint b = points[k];\n\t\t\t\t\n\t\t\t\t// Add distance between out and inner.\n\t\t\t\tdists[i] += Math.sqrt(\n\t\t\t\t\tMath.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Prepare index and largest holder.\n\t\tint index = 0;\n\t\tdouble largest = 0;\n\t\t\n\t\t// Loop through the found distances.\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t// Skip if dist is lower than largest.\n\t\t\tif (dists[i] < largest) continue;\n\t\t\t\n\t\t\t// Save the index and largest value.\n\t\t\tindex = i;\n\t\t\tlargest = dists[i];\n\t\t}\n\t\t\n\t\t// Return the largest point index.\n\t\treturn points[index];\n\t}", "public int maxPoints(Point[] points) {\n if (points.length == 1) return 1;\n int max = 0;\n for (int i = 0; i < points.length; i++) {\n Map<Double, Integer> counts = new HashMap<Double, Integer>();\n int result = 0;\n int same = 1;\n for (int j = i+1; j < points.length; j++) {\n int x = points[i].x - points[j].x;\n int y = points[i].y - points[j].y;\n\n if (x == 0 && y == 0) {\n same++;\n continue;\n }\n\n // 1.0 * 0 / -1 = -0.0, so need to convert it by + 0.0\n double slope = x == 0 ? Double.POSITIVE_INFINITY : 1.0 * y/x + 0.0;\n\n if (counts.containsKey(slope)) {\n counts.put(slope, counts.get(slope) + 1);\n } else {\n counts.put(slope, 1);\n }\n\n result = Math.max(result, counts.get(slope));\n }\n max = Math.max(result + same, max);\n }\n return max;\n }", "public void setPoints(int points)\n\t{\n\t\tthis.points = points;\n\t}", "Set<Point2D> getWallSet();", "public List<Point> generatePointList(){\r\n\t\t//Can move up to 3 squares horizontally or vertically, but cannot move diagonally.\r\n List<Point> pointList = new ArrayList<>();\r\n int pointCount = 0;\r\n int px = (int)getCoordinate().getX();\r\n int py = (int)getCoordinate().getY();\r\n\r\n for (int i=px-3;i<=px+3;i++){\r\n for(int j=py-3;j<=py+3;j++){\r\n if((i>=0) && (i<9) && (j>=0) && (j<9) && ((i!=px)||(j!=py))){\r\n if ((i==px)||(j==py)){\r\n pointList.add(pointCount, new Point(i,j));\r\n pointCount+=1;\r\n } \r\n }\r\n }\r\n }\r\n return pointList;\r\n }" ]
[ "0.7999104", "0.799702", "0.75788707", "0.7341816", "0.69155264", "0.6427287", "0.6242128", "0.6240691", "0.6211548", "0.61728173", "0.6145093", "0.60901046", "0.6072727", "0.6026848", "0.60071903", "0.6002544", "0.600172", "0.5934915", "0.5909108", "0.5893299", "0.58829963", "0.5845363", "0.5772606", "0.5765315", "0.5692539", "0.56677866", "0.5615472", "0.55553144", "0.5540227", "0.5530308", "0.55261165", "0.551571", "0.55134404", "0.54915196", "0.5488383", "0.5472254", "0.54579484", "0.545786", "0.5454486", "0.54128724", "0.52943176", "0.5291721", "0.5252814", "0.51941323", "0.51916975", "0.51831913", "0.5181311", "0.5166994", "0.5150545", "0.5123538", "0.5076322", "0.50655735", "0.50464463", "0.5028884", "0.49895972", "0.494987", "0.49445215", "0.49425894", "0.4932181", "0.48922485", "0.48819068", "0.48608464", "0.4860322", "0.48389018", "0.48324397", "0.4822278", "0.48044917", "0.47976243", "0.47867954", "0.47841677", "0.4747782", "0.4743137", "0.4737063", "0.47165525", "0.4695761", "0.46912894", "0.46868184", "0.46852985", "0.46659282", "0.46618325", "0.46545988", "0.46532297", "0.46465945", "0.46241772", "0.46233332", "0.46212837", "0.4596097", "0.45826858", "0.45822418", "0.4579978", "0.45725843", "0.4556953", "0.45502657", "0.45412448", "0.45397484", "0.45379266", "0.45351085", "0.45215496", "0.4502855", "0.450103" ]
0.8188523
0
Project the three centers to the xz plane, create the convex hull of the resulting 8 vertices and compute its area with the Shoelace formula.
private static double computeArea(Point3d[] centers3d) { assert centers3d.length == 3; Point2d[] centers = new Point2d[] { centers3d[0].projectOnY(), centers3d[1].projectOnY(), centers3d[2].projectOnY() }; Point2d[] vertices = new Point2d[] { centers[0].add(centers[1]).add(centers[2]), centers[0].add(centers[1]).sub(centers[2]), centers[0].sub(centers[1]).add(centers[2]), centers[0].sub(centers[1]).sub(centers[2]), centers[0].neg().add(centers[1]).add(centers[2]), centers[0].neg().add(centers[1]).sub(centers[2]), centers[0].neg().sub(centers[1]).add(centers[2]), centers[0].neg().sub(centers[1]).sub(centers[2]) }; List<Point2d> hull = createConvexHull(vertices); double area = 0; for (int i = 0; i < hull.size() - 1; i++) { area += hull.get(i).x * hull.get(i + 1).y; } area += hull.get(hull.size() - 1).x * hull.get(0).y; for (int i = 0; i < hull.size() - 1; i++) { area -= hull.get(i).y * hull.get(i + 1).x; } area -= hull.get(hull.size() - 1).y * hull.get(0).x; area *= 0.5; return area; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static AlgebraicVector[] buildHull(Set<AlgebraicVector> points) throws Failure {\n if (points.size() < 3) {\n fail(\"At least three input points are required for a 2d convex hull.\\n\\n\" + points.size() + \" specified.\");\n }\n AlgebraicVector normal = AlgebraicVectors.getNormal(points); \n if(normal.isOrigin()) {\n fail(\"Cannot generate a 2d convex hull from collinear points\");\n }\n if(!AlgebraicVectors.areOrthogonalTo(normal, points)) {\n fail(\"Cannot generate a 2d convex hull from non-coplanar points\");\n }\n\n // JSweet hates maps keyed by objects, so we'll construct this collection\n // separately, and let the xyTo3dMap use strings as keys.\n Collection<AlgebraicVector> keySet = new ArrayList<>();\n \n // Map each 3d point to a 2d projection and rotate it to the XY plane if necessary.\n // Since the 3d points are coplanar, it will be a 1:1 mapping\n // Later, we'll need to map 2d back to 3d so the 2d vector will be the key\n Map<String, AlgebraicVector> xyTo3dMap = map3dToXY( points, normal, keySet );\n \n // calculate the 2d convex hull\n Deque<AlgebraicVector> stack2d = getHull2d( keySet );\n\n // map the 2d convex hull back to the original 3d points\n AlgebraicVector[] vertices3d = new AlgebraicVector[stack2d.size()];\n \n int i = 0;\n for(AlgebraicVector point2d : stack2d) {\n AlgebraicVector point3d = xyTo3dMap.get( point2d.toString( AlgebraicField.VEF_FORMAT ) );\n // order vertices3d so the normal will point away from the origin \n // to make it consistent with the 3d convex hull algorithm\n vertices3d[i++] = point3d;\n }\n return vertices3d;\n }", "public void convexHull(int n) {\n // There must be at least 3 points\n if (n < 3) return;\n\n // Initialize Result\n Vector<Marker> hull = new Vector<>();\n\n // Find the leftmost point\n int l = 0;\n for (int i = 1; i < n; i++)\n if (markers.get(i).getPosition().longitude < markers.get(l).getPosition().longitude)\n l = i;\n\n // Start from leftmost point, keep moving\n // counterclockwise until reach the start point\n // again. This loop runs O(h) times where h is\n // number of points in result or output.\n int p = l, q;\n do {\n // Add current point to result\n hull.add(markers.get(p));\n\n // Search for a point 'q' such that\n // orientation(p, x, q) is counterclockwise\n // for all points 'x'. The idea is to keep\n // track of last visited most counterclock-\n // wise point in q. If any point 'i' is more\n // counterclock-wise than q, then update q.\n q = (p + 1) % n;\n\n for (int i = 0; i < n; i++) {\n // If i is more counterclockwise than\n // current q, then update q\n if (orientation(p, i, q)\n == 2)\n q = i;\n }\n\n // Now q is the most counterclockwise with\n // respect to p. Set p as q for next iteration,\n // so that q is added to result 'hull'\n p = q;\n\n } while (p != l); // While we don't come to first\n\n drawer = new ArrayList<>(hull);\n }", "@Override\n public void drawPointCloud(PVector[] depthMap) {\n\n ArrayList<QuickHull3D> hulls = new ArrayList<QuickHull3D>();\n ArrayList<Point3d> points = new ArrayList<Point3d>();\n PVector oldVector = depthMap[0];\n QuickHull3D myHull = new QuickHull3D();\n\n for (int i = 1; i < depthMap.length; i++) {\n PVector myVector = depthMap[i];\n\n if (myVector.dist(oldVector) > 500) {\n if (points.size() > 10) {\n try {\n myHull.build(points.toArray(new Point3d[points.size()]));\n } catch(IllegalArgumentException e) {\n\n }\n hulls.add(myHull);\n myHull = new QuickHull3D();\n }\n points.clear();\n }\n\n if (myVector.z < 3000) {\n points.add(new Point3d(myVector.x, myVector.y, myVector.z));\n\n oldVector = myVector;\n }\n }\n\n// Point3d[] points = new Point3d[depthMap.length];\n// for (int i = 0; i < depthMap.length; i++) {\n// PVector vector = depthMap[i];\n// points[i] = new Point3d(vector.x, vector.y, vector.z);\n// }\n// hull.build(points);\n\n p5.fill(255, 50);\n p5.stroke(255, 70);\n\n for (QuickHull3D hull : hulls) {\n int[][] faceIndices = hull.getFaces();\n for (int i = 0; i < faceIndices.length; i++) {\n p5.beginShape();\n for (int k = 0; k < faceIndices[i].length; k++) {\n Point3d point = hull.getVertices()[faceIndices[i][k]];\n p5.vertex((float) point.x, (float) point.y, (float) point.z);\n }\n p5.endShape();\n }\n }\n\n// PApplet.println(hull.getNumFaces());\n }", "@Test\n\tpublic void testToConvexHull01(){\n\t\tCoordinate [] coordinateArray = {\n\t\t\t\tnew Coordinate(1.0, 2.5),\n\t\t\t\tnew Coordinate(4.0, -2.5),\n\t\t\t\tnew Coordinate(7.0, -3.5),\n\t\t\t\tnew Coordinate(1.0, 0.5),\n\t\t\t\tnew Coordinate(4.0, 2.5),\n\t\t\t\tnew Coordinate(4.5, 3.0),\n\t\t\t\tnew Coordinate(5.0, 2.5),\n\t\t\t\tnew Coordinate(8.0, 8.5)\n\t\t};\n\t\tConvexHull objectUnderTest = new ConvexHull(coordinateArray, geometryFactory);\n\t\tGeometry result = objectUnderTest.getConvexHull();\n\t\tassertThat(result.toText(), is(\"POLYGON ((7 -3.5, 4 -2.5, 1 0.5, 1 2.5, 8 8.5, 7 -3.5))\"));\n\t}", "private static List<Point2d> createConvexHull(Point2d[] points) {\n List<Point2d> hull = new ArrayList<>();\n // Find the leftmost point\n int leftmost = 0;\n for (int i = 1; i < points.length; i++) {\n if (points[i].x < points[leftmost].x) {\n leftmost = i;\n }\n }\n int p = leftmost;\n do {\n hull.add(points[p]);\n int q = p + 1;\n if (q >= points.length) q -= points.length;\n for (int i = 0; i < points.length; i++) {\n double o = orientation(points[p], points[i], points[q]);\n if (o < 0) {\n q = i;\n }\n }\n p = q;\n } while (p != leftmost);\n return hull;\n }", "private double shoelaceFormula(int[] x, int[] y, int[] z) {\n return 0.5f * Math.abs(x[0] * y[1] + y[0] * z[1] + z[0] * x[1] - y[0] * x[1] - z[0] * y[1] - x[0] * z[1]);\n }", "public void makeCube (int subdivisions)\r\n {\r\n \tfloat horz[] = new float[subdivisions + 1];\r\n \tfloat vert[] = new float[subdivisions + 1];\r\n \t\r\n \t\r\n \t// Front face\r\n \tPoint p1 = new Point(-0.5f, -0.5f, 0.5f);\r\n \tPoint p2 = new Point(0.5f, -0.5f, 0.5f);\r\n \tPoint p3 = new Point(0.5f, 0.5f, 0.5f);\r\n \tPoint p4 = new Point(-0.5f, 0.5f, 0.5f);\r\n \t\r\n \tfloat h = p1.x;\r\n \tfloat v = p1.y;\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], vert[j], 0.5f);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], vert[j], 0.5f);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], vert[j + 1], 0.5f);\r\n \t\t\tPoint tempP4 = new Point(horz[k], vert[j + 1], 0.5f);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Back face\r\n \tp1.y = p1.z = -0.5f;\r\n \tp1.x = 0.5f;\r\n \tp2.x = p2.y = p2.z = -0.5f;\r\n \tp3.x = p3.z = -0.5f;\r\n \tp3.y = 0.5f;\r\n \tp4.x = p4.y = 0.5f;\r\n \tp4.z = -0.5f;\r\n \t\r\n \th = p1.x;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], vert[j], -0.5f);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], vert[j], -0.5f);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], vert[j + 1], -0.5f);\r\n \t\t\tPoint tempP4 = new Point(horz[k], vert[j + 1], -0.5f);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Left face\r\n \tp1.x = p1.y = p1.z = -0.5f;\r\n \tp2.x = p2.y = -0.5f;\r\n \tp2.z = 0.5f;\r\n \tp3.x = -0.5f;\r\n \tp3.y = p3.z = 0.5f;\r\n \tp4.y = 0.5f;\r\n \tp4.x = p4.z = -0.5f;\r\n \t\r\n \th = p1.z;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(-0.5f, vert[j], horz[k]);\r\n \t\t\tPoint tempP2 = new Point(-0.5f, vert[j], horz[k + 1]);\r\n \t\t\tPoint tempP3 = new Point(-0.5f, vert[j + 1], horz[k + 1]);\r\n \t\t\tPoint tempP4 = new Point(-0.5f, vert[j + 1], horz[k]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Right face\r\n \tp1.x = p1.z = 0.5f;\r\n \tp1.y = -0.5f;\r\n \tp2.y = p2.z = -0.5f;\r\n \tp2.x = 0.5f;\r\n \tp3.x = p3.y = 0.5f;\r\n \tp3.z = -0.5f;\r\n \tp4.x = p4.y = p4.z = 0.5f;\r\n \t\r\n \t\r\n \th = p1.z;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(0.5f, vert[j], horz[k]);\r\n \t\t\tPoint tempP2 = new Point(0.5f, vert[j], horz[k + 1]);\r\n \t\t\tPoint tempP3 = new Point(0.5f, vert[j + 1], horz[k + 1]);\r\n \t\t\tPoint tempP4 = new Point(0.5f, vert[j + 1], horz[k]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Top face\r\n \tp1.x = -0.5f;\r\n \tp1.y = p1.z = 0.5f;\r\n \tp2.x = p2.y = p2.z = 0.5f;\r\n \tp3.x = p3.y = 0.5f;\r\n \tp3.z = -0.5f;\r\n \tp4.x = p4.z = -0.5f;\r\n \tp4.y = 0.5f;\r\n \t\r\n \t\r\n \th = p1.x;\r\n \tv = p1.z;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], 0.5f, vert[j]);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], 0.5f, vert[j]);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], 0.5f, vert[j + 1]);\r\n \t\t\tPoint tempP4 = new Point(horz[k], 0.5f, vert[j + 1]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Bottom face\r\n \tp1.x = p1.y = p1.z = -0.5f;\r\n \tp2.y = p2.z = 0.5f;\r\n \tp2.x = 0.5f;\r\n \tp3.x = p3.z = 0.5f;\r\n \tp3.y = -0.5f;\r\n \tp4.x = p4.y = -0.5f;\r\n \tp4.z = 0.5f;\r\n \t\r\n \t\r\n \th = p1.x;\r\n \tv = p1.z;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], -0.5f, vert[j]);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], -0.5f, vert[j]);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], -0.5f, vert[j + 1]);\r\n \t\t\tPoint tempP4 = new Point(horz[k], -0.5f, vert[j + 1]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n }", "private void calcBoxVerts() {\n\t\tif (verts != null) {\n\t\t\tdouble minX = verts[0].getElement(0);\n\t\t\tdouble maxX = minX;\n\t\t\tdouble minY = verts[0].getElement(1);\n\t\t\tdouble maxY = minY;\n\t\t\tdouble minZ = verts[0].getElement(2);\n\t\t\tdouble maxZ = minZ;\n\t\t\tfor (int i = 1; i < verts.length; i++) {\n\t\t\t\tif (verts[i].getElement(0) < minX) {\n\t\t\t\t\tminX = verts[i].getElement(0);\n\t\t\t\t} else if (verts[i].getElement(0) > maxX) {\n\t\t\t\t\tmaxX = verts[i].getElement(0);\n\t\t\t\t}\n\t\t\t\tif (verts[i].getElement(1) < minY) {\n\t\t\t\t\tminY = verts[i].getElement(1);\n\t\t\t\t} else if (verts[i].getElement(1) > maxY) {\n\t\t\t\t\tmaxY = verts[i].getElement(1);\n\t\t\t\t}\n\t\t\t\tif (verts[i].getElement(2) < minZ) {\n\t\t\t\t\tminZ = verts[i].getElement(2);\n\t\t\t\t} else if (verts[i].getElement(2) > maxZ) {\n\t\t\t\t\tmaxZ = verts[i].getElement(2);\n\t\t\t\t}\n\t\t\t}\n\t\t\tVector[] boxVerts = new Vector[8];\n\t\t\tboxVerts[0] = new Vector(3);\n\t\t\tboxVerts[0].setElements(new double[] {minX, minY, minZ});\n\t\t\tboxVerts[1] = new Vector(3);\n\t\t\tboxVerts[1].setElements(new double[] {maxX, minY, minZ});\n\t\t\tboxVerts[2] = new Vector(3);\n\t\t\tboxVerts[2].setElements(new double[] {minX, minY, maxZ});\n\t\t\tboxVerts[3] = new Vector(3);\n\t\t\tboxVerts[3].setElements(new double[] {maxX, minY, maxZ});\n\t\t\tboxVerts[4] = new Vector(3);\n\t\t\tboxVerts[4].setElements(new double[] {minX, maxY, minZ});\n\t\t\tboxVerts[5] = new Vector(3);\n\t\t\tboxVerts[5].setElements(new double[] {maxX, maxY, minZ});\n\t\t\tboxVerts[6] = new Vector(3);\n\t\t\tboxVerts[6].setElements(new double[] {minX, maxY, maxZ});\n\t\t\tboxVerts[7] = new Vector(3);\n\t\t\tboxVerts[7].setElements(new double[] {maxX, maxY, maxZ});\n\t\t\tthis.boxVerts = boxVerts;\n\t\t} else {\n\t\t\tthis.boxVerts = null;\n\t\t}\n\t}", "@Test\n\tpublic void testToConvexHull02(){\n\t\tCoordinate c = new Coordinate(1.0, 2.5);\n\t\tCoordinate [] ca2 = { c };\n\t\tConvexHull objectUnderTest = new ConvexHull(ca2, geometryFactory);\n\t\tGeometry result = objectUnderTest.getConvexHull();\n\t\tassertThat(result.toText(), is(\"POINT (1 2.5)\"));\n\t}", "public HexagonAlgorithm(\tString anOutputPath, \n\t\t\t\t\t\t\t\tboolean willDoHausdorff, \n\t\t\t\t\t\t\t\tint vClusterOption, \n\t\t\t\t\t\t\t\tDouble aTesseraWidth,\n\t\t\t\t\t\t\t\tArrayList<Point> theInputVertices\t){\n\t\t\t\t\n\t\tthis.inputVertices = new ArrayList(0);\t// instantiate\n\t\t\n\t\t// Loop through the ArrayList of points passed from ThesisSoft and write \n\t\t// to local ArrayList inputVertices.\n\t\tfor(int i=0; i < theInputVertices.size(); i++){\n\t\t\tthis.inputVertices.add(theInputVertices.get(i));\n\t\t}\n\t\t\n\t\t\n\t\t// Calculating upper left and bottom right points for creation of bounding box as per Sasha's method. \t\t\t\t\n\t\t \n\t\t// instantiate these values to the first point in the inputVertices array - will get changed as necessary in following loop\n\t\tDouble xUpperLeft = this.inputVertices.get(0).getX();\n\t\tDouble yUpperLeft = this.inputVertices.get(0).getY();\n\t\tDouble xBottomRight = this.inputVertices.get(0).getX();\n\t\tDouble yBottomRight = this.inputVertices.get(0).getY();\n\t\t\n\t\t// loop through all the remaining points in inputVertices to find infinum and extremum values for x and y\n\t\tfor (int i=1; i < this.inputVertices.size(); i++){\n\t\t\t\n\t\t\txUpperLeft = Math.min(this.inputVertices.get(i).getX(), xUpperLeft);\n\t\t\tyUpperLeft = Math.max(this.inputVertices.get(i).getY(), yUpperLeft);\n\t\t\txBottomRight = Math.max(this.inputVertices.get(i).getX(), xBottomRight);\n\t\t\tyBottomRight = Math.min(this.inputVertices.get(i).getY(), yBottomRight);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t// create two new points for passing to code, which will use them to create \n\t\t// a bounding box and then the hexagonal grid.\n\t\tPoint upperLeft = new Point(xUpperLeft, yUpperLeft);\n\t\tPoint bottomRight = new Point(xBottomRight, yBottomRight);\n\t\n\t\t// Create an instance of HexGrid;\n\t\t// pass to its constructor the values in the line below:\n\t\t//ThesisSoft.receiveProgressMessage(\"Constructing hexagonal grid...\");\n\t\tHexGrid aHexGrid = new HexGrid(upperLeft, bottomRight, aTesseraWidth);\t\t// using aTesseraWidth, as passed to the class\n\t\t\n\t\t// Instantiate an array list of polygons, and call function as per below, \n\t\t// which will return an ArrayList\n\t\tArrayList<Polygon> hexagonArray\t\t= aHexGrid.getPolygonList();\n\t\t//Point[] centroidList\t\t\t\t= aHexGrid.getCentroidList();\n\t\t\t\t\n\t\t/*\n\t\t * :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n\t\t * Calculating point and hexagon intersections\n\t\t * \n\t\t * \n\t\t * Making each point check for intersection with each polygon\n\t\t * (converted hexagons) by two nested for loops. \n\t\t * A currentHexagon loop variable is used; checking ahead to see if \n\t\t * next point is in the same hexagon. While currentHexagon is \n\t\t * the same, write each point to same SpatialMean instance. When \n\t\t * it is not, move to a new SpatialMean instance.\n\t\t * \n\t\t * \n\t\t */\n\t\t\n\t\t\n\t\t/// declare currentHexagon variable, leave blank to start\n\t\tPolygon currentHexagon = null;\n\t\t\n\t\t\n\t\t// declare variable for currentSpatial Mean, leave blank to start\n\t\t// The following code calls for various kinds of collapses, depending on vClusterOption; \n\t\t// this allows for different possible collapse methods.\n\t\t\n\t\t\n\t\t// instantiate a currentCollapse, and an ArrayList<CollapseMethod>\n\t\tCollapseMethod currentCollapse = null;\n\t\tArrayList<CollapseMethod> arrayOfCollapses = new ArrayList<CollapseMethod>(0);\n\t\t\n\t\t// Tested knocking out these here. Introduction later in loop works sufficiently alone.\n//\t\tif(vClusterOption == 0){\n//\t\t\tcurrentCollapse = new SpatialMean();\n//\t\t}\n//\t\tif(vClusterOption == 1){\n//\t\t\tcurrentCollapse = new VertexNearestMean();\n//\t\t}\n//\t\tif(vClusterOption == 2){\n//\t\t\tcurrentCollapse = new MidpointFirstAndLast();\n//\t\t}\n\t\t\n\t\t\n\t\tfor (int i=0; i<this.inputVertices.size(); i++){\n\t\t\t\n\t\t\tfor(int j=0; j < hexagonArray.size(); j++){\n\t\t\t\t\n\t\t\t\tPolygon processingHexagon = hexagonArray.get(j);\n\t\t\t\t\n\t\t\t\tboolean intersection = processingHexagon.isWithinPolygon(this.inputVertices.get(i));\n\t\t\t\t\n//\t\t\t\t// ::::\n//\t\t\t\tif ((i % 1000) == 0) {\n//\t\t\t\t\tThesisSoft.receiveProgressMessage(\"Hx: Processing vertex \" + i);\n//\t\t\t\t}\n//\t\t\t\t// ::::\n\t\t\t\t\n\t\t\t\tif (intersection){\n\t\t\t\t\t\t\n\t\t\t\t\t// check to see if currentHexagon is the same as last one\n\t\t\t\t\tif(processingHexagon == currentHexagon){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if so, add this point to previous collapse\n\t\t\t\t\t\tcurrentCollapse.addPoint(this.inputVertices.get(i));\n\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if not, define currentHexagon as processingHexagon, \n\t\t\t\t\t\t// create a new CollapseMethod, add a point to it, \n\t\t\t\t\t\t// store it to arrayOfCollapses, \n\t\t\t\t\t\t// and set this collapse as the currentCollapse.\n\t\t\t\t\t\t// First, some code to define which type of collapse to use:\n\t\t\t\t\t\tif(vClusterOption == 0){\n\t\t\t\t\t\t\tcurrentCollapse = new SpatialMean();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(vClusterOption == 1){\n\t\t\t\t\t\t\tcurrentCollapse = new VertexNearestMean();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(vClusterOption == 2){\n\t\t\t\t\t\t\tcurrentCollapse = new MidpointFirstAndLast();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(vClusterOption == 3){\n\t\t\t\t\t\t\tcurrentCollapse = new FirstVertex();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(vClusterOption == 4){\n\t\t\t\t\t\t\tcurrentCollapse = new LastVertex();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(vClusterOption == 5){\n\t\t\t\t\t\t\tcurrentCollapse = new VertexFurthestCentroid(processingHexagon);\n\t\t\t\t\t\t}\n\n//\t\t\t\t\t\t// First, add this point to currentCollapse (i.e., the previous, old one)\n//\t\t\t\t\t\tcurrentCollapse.addPoint(this.inputVertices.get(i));\n//\t\t\t\t\t\t// Then, make a new one, passing constructor the point before current one\n//\t\t\t\t\t\tcurrentCollapse = new LiOpenshawMidpoint(processingHexagon, this.inputVertices.get(i-1));\n//\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tcurrentCollapse.addPoint(this.inputVertices.get(i));\n\t\t\t\t\t\t\n\t\t\t\t\t\tarrayOfCollapses.add(currentCollapse);\n\t\t\t\t\t\t\n\t\t\t\t\t\tcurrentHexagon = processingHexagon;\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t// Instantiate an array of output vertices.\n\t\t// Calculate collapses for each pass of the line in\n\t\t// each tessera, and write each resulting Point array of outputVertices.\n\t\tArrayList<Point> outputVertices = new ArrayList(0);\n\t\t\n\t\t\n\t\t// Add first input Point as first output Point\n\t\toutputVertices.add(inputVertices.get(0));\n\t\t// loop through collapsed points and add each of them\n\t\tfor(int i=0; i<arrayOfCollapses.size(); i++){\n\t\t\toutputVertices.add(arrayOfCollapses.get(i).collapse());\n\t\t}\n\t\t// Add last input Point as last output Point\n\t\toutputVertices.add(inputVertices.get(inputVertices.size()-1));\n\t\t\n\t\t/*\n\t\t * By this point, output vertices exist as the ArrayList outputVertices.\n\t\t * Can write ThesisSoft class to recieve this ArrayList and pass it to new \"Resequence\" class,\n\t\t * or can send to Resequence from here in HexagonAlgorithm, the way the H dist is calculated now. Latter involves\n\t\t * sending HexagonAlgorithm another argument on instantiation, regarding whether or not to perform \n\t\t * a Resequence.\n\t\t * \n\t\t */\n\t\t\n\t\t// publish output to a csv file\n\t\tFileWriter outFile = null;\n\t\tPrintWriter out = null;\n\t\t\n\t\ttry {\n\t\t\toutFile = new FileWriter(anOutputPath);\t\t// updated to take the file path passed to the class\n\t\t\tout = new PrintWriter(outFile);\n\t\t} catch (IOException e) {\t\n\t\t\tThesisSoft.receiveMessage(\"Couldn't create/open the output file at that path.\\n\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// writing to output file\n\t\t//ThesisSoft.receiveMessage(\"Writing to output file...\");\n\t\t// csv header first\n\t\tout.println(\"Index,X,Y\");\n\t\t\n\t\tfor(int i=0; i<outputVertices.size(); i++){\n//\t\t\t// ::::\n//\t\t\tif ((i % 1000) == 0) {\n//\t\t\t\tThesisSoft.receiveProgressMessage(\"Hx: Writing vertex \" + i);\n//\t\t\t}\n//\t\t\t// ::::\n\t\t\tout.format(\"%d,%.6f,%.6f\\r\\n\", i, outputVertices.get(i).getX(), outputVertices.get(i).getY());\n\t\t}\n\t\t\n\t\t\n\t\tout.flush();\n\t\tout.close();\n\t\t\n\t\t//ThesisSoft.receiveMessage(\" Done!\\n\");\n\t\t\n\t\t// Output to GUI #'s of input and output vertices, and what % reduction\n\t\t// they represent.\n\t\tdouble percentOfInput = ((outputVertices.size()) * 100.0) / inputVertices.size();\t\t\n\t\tdouble percentDecrease = 100.0 - percentOfInput;\n\t\tThesisSoft.receiveMessage(\"\\nInput vertices: \" + inputVertices.size() + \"\\n\");\n\t\tThesisSoft.receiveMessage(\"Output vertices: \" + (outputVertices.size()) + \"\\n\");\n\t\tThesisSoft.receiveMessage(\" Output vertices are \" + roundThreeDecimals(percentOfInput) + \"% of input.\\n\");\n\t\tThesisSoft.receiveMessage(\" (\" + roundThreeDecimals(percentDecrease) + \"% decrease)\\n\");\n\t\t\n\n\t\t\n\t\tif(willDoHausdorff){\n\t\t\t// Instantiate a HausdorffCalculator; it will report to ThesisSoft on its own.\n\t\t\tHausdorffCalculator aHausdorffCalculator = new HausdorffCalculator(inputVertices, outputVertices);\n\t\t\t\n\t\t}else{\n\t\t\tThesisSoft.receiveMessage(\"\\nNo Hausdorff calculation.\\n\\n\");\n\t\t}\n\t\t\n\t\t\n\t}", "protected void calculateMinMaxCenterPoint() {\n\t\tfinal ImagePlus imp = c.getImage();\n\t\tfinal int w = imp.getWidth(), h = imp.getHeight();\n\t\tfinal int d = imp.getStackSize();\n\t\tfinal Calibration cal = imp.getCalibration();\n\t\tmin = new Point3d();\n\t\tmax = new Point3d();\n\t\tcenter = new Point3d();\n\t\tmin.x = w * (float) cal.pixelHeight;\n\t\tmin.y = h * (float) cal.pixelHeight;\n\t\tmin.z = d * (float) cal.pixelDepth;\n\t\tmax.x = 0;\n\t\tmax.y = 0;\n\t\tmax.z = 0;\n\n\t\tfloat vol = 0;\n\t\tfor (int zi = 0; zi < d; zi++) {\n\t\t\tfinal float z = zi * (float) cal.pixelDepth;\n\t\t\tfinal ImageProcessor ip = imp.getStack().getProcessor(zi + 1);\n\n\t\t\tfinal int wh = w * h;\n\t\t\tfor (int i = 0; i < wh; i++) {\n\t\t\t\tfinal float v = ip.getf(i);\n\t\t\t\tif (v == 0) continue;\n\t\t\t\tvol += v;\n\t\t\t\tfinal float x = (i % w) * (float) cal.pixelWidth;\n\t\t\t\tfinal float y = (i / w) * (float) cal.pixelHeight;\n\t\t\t\tif (x < min.x) min.x = x;\n\t\t\t\tif (y < min.y) min.y = y;\n\t\t\t\tif (z < min.z) min.z = z;\n\t\t\t\tif (x > max.x) max.x = x;\n\t\t\t\tif (y > max.y) max.y = y;\n\t\t\t\tif (z > max.z) max.z = z;\n\t\t\t\tcenter.x += v * x;\n\t\t\t\tcenter.y += v * y;\n\t\t\t\tcenter.z += v * z;\n\t\t\t}\n\t\t}\n\t\tcenter.x /= vol;\n\t\tcenter.y /= vol;\n\t\tcenter.z /= vol;\n\n\t\tvolume = (float) (vol * cal.pixelWidth * cal.pixelHeight * cal.pixelDepth);\n\n\t}", "public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new FileReader(\"data.txt\"));\n\n // Read in all the points from the input file\n StringTokenizer st;\n while (in.ready()) {\n st = new StringTokenizer(in.readLine());\n\n int x = Integer.parseInt(trim(st.nextToken()));\n int y = Integer.parseInt(st.nextToken());\n\n points.add(new Point(x, y));\n }\n in.close();\n\n // Find Convex Hull\n finalPoints = convexHull(points, points.size());\n\n // Determine scaling of coordinates\n maxCoordinate = 0;\n for (Point p : finalPoints) {\n maxCoordinate = Math.max(p.x, maxCoordinate);\n maxCoordinate = Math.max(p.y, maxCoordinate);\n }\n\n // Display the Convex Hull in the Console\n System.out.println(\"Convex Hull Solution: \");\n for (Point p : finalPoints) {\n System.out.println(\"(\" + p.x + \", \" + p.y + \")\");\n }\n System.out.println(\"\\nSwitch to the Display Window to see your Convex Hull!\");\n\n // Graphically display the Convex Hull\n ConvexHullJM hull = new ConvexHullJM();\n\n JFrame frame = new JFrame(\"Convex Hull\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.add(hull);\n frame.setSize(800, 800);\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n }", "public abstract void constructHull();", "public void convexHull() throws FileNotFoundException {\n ArrayList<QuickHull.Point> allPoints = getAllPoints();\n findUpperHull(allPoints.get(0), allPoints.get(allPoints.size()-1), allPoints);\n findUpperHull(allPoints.get(allPoints.size()-1), allPoints.get(0), allPoints);\n writeConvexHull();\n }", "protected void skybox() {\n Triple pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, col1, col2, col3, col4;\n\n pos1 = new Triple(0, 0, 0);\n pos2 = new Triple(100, 0, 0);\n pos3 = new Triple(100, 0, 100);\n pos4 = new Triple(0, 0, 100);\n pos5 = new Triple(0, 100, 0);\n pos6 = new Triple(100, 100, 0);\n pos7 = new Triple(100, 100, 100);\n pos8 = new Triple(0, 100, 100);\n\n // Front Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos2, .25, 0),\n new Vertex(pos3, .25, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos3, .25, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 21 ) );\n\n // Left Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 1, 0),\n new Vertex(pos5, .75, 0),\n new Vertex(pos8, .75, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos8, .75, 1),\n new Vertex(pos4, 1, 1),\n new Vertex(pos1, 1, 0),\n 21 ) );\n\n // Right Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos2, .25, 0),\n new Vertex(pos6, .5, 0),\n new Vertex(pos7, .5, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, .5, 1),\n new Vertex(pos3, .25, 1),\n new Vertex(pos2, .25, 0),\n 21 ) );\n\n // Back Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos5, .75, 0),\n new Vertex(pos6, .5, 0),\n new Vertex(pos7, .5, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, .5, 1),\n new Vertex(pos8, .75, 1),\n new Vertex(pos5, .75, 0),\n 21 ) );\n\n // Top Triangles\n// frozenSoups.addTri( new Triangle(new Vertex(pos4, 0, 0),\n// new Vertex(pos3, 0, 1),\n// new Vertex(pos7, 1, 1),\n// 20 ) );\n\n// frozenSoups.addTri( new Triangle(new Vertex(pos7, 0, 0),\n// new Vertex(pos8, 1, 0),\n// new Vertex(pos4, 1, 1),\n// 20 ) );\n }", "public ConvexHull(Point[] pts) throws IllegalArgumentException \n\t{\n\t\tif(pts.length == 0 || pts == null)\n\t\t{\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tpoints = new Point[pts.length];\n\t\tfor(int i = 0; i < pts.length; i++)\n\t\t{\n\t\t\tpoints[i] = pts[i];\n\t\t}\n\t\tquicksorter = new QuickSortPoints(points);\n\t\tremoveDuplicates();\n\t\tlowestPoint = pointsNoDuplicate[0];\n\t}", "public abstract Vector computeCenter();", "public Point3D normalize() {\n\t\treturn this.divide(Math.sqrt(x*x + y*y + z*z));\n\t}", "public Vect3d getCenter (){\r\n Vect3d v = new Vect3d();\r\n v.x = (min.x + max.x) / 2;\r\n v.y = (min.y + max.y) / 2;\r\n v.z = (min.z + max.z) / 2;\r\n return v;\r\n }", "@Test\n\tpublic void testCalculateConvexHullFromWktPoints02() throws ParseException{\n\t\tList<String> pointWktList = new ArrayList<String>();\n\t\tpointWktList.add(\"POINT(123.0 1.0)\");\n\t\tpointWktList.add(\"POINT(103.0 -7.0)\");\n\t\tpointWktList.add(\"POINT(203.0 -22.0)\");\n\t\tpointWktList.add(\"POINT(303.0 440.0)\");\n\t\tpointWktList.add(\"POINT(101.0 -4.0)\");\n\t\tpointWktList.add(\"Some Nonsense\");\n\t\ttry{\n\t\t\tConvexHullUtil.calculateConvexHullFromWktPoints(pointWktList);\n\t\t\tfail();\n\t\t}catch(ParseException pex){\n\t\t\t// success\n\t\t}\n\t}", "public Vec2 getCenter()\n {\n int numTriangles = numPoints - 2;\n\n // Calculate the average midpoint of each composite triangle\n Vec2 averageMidpoint = new Vec2(0, 0);\n float area = 0;\n for (int i=0; i<numTriangles; i++)\n {\n Triangle t = new Triangle(points[0], points[i+1], points[i+2]);\n Vec2 triangleMidpoint = t.getCenter();\n float triangleArea = t.getArea();\n\n averageMidpoint.addX(triangleMidpoint.getX() * triangleArea);\n averageMidpoint.addY(triangleMidpoint.getY() * triangleArea);\n\n area += triangleArea;\n\n// Color color;\n// if (i==0) color = Color.GREEN;\n// else color = Color.ORANGE;\n// SumoGame.ADD_DEBUG_DOT(points[0].getX(), points[0].getY(), 5, color);\n// SumoGame.ADD_DEBUG_DOT(points[i+1].getX(), points[i+1].getY(), 5, color);\n// SumoGame.ADD_DEBUG_DOT(points[i+2].getX(), points[i+2].getY(), 5, color);\n// SumoGame.ADD_DEBUG_DOT(triangleMidpoint.getX(), triangleMidpoint.getY(), triangleArea/2000, color);\n }\n\n averageMidpoint.div(area);\n\n// SumoGame.ADD_DEBUG_DOT(averageMidpoint.getX(), averageMidpoint.getY(), 20, Color.RED);\n\n return averageMidpoint;\n }", "private void createCube(float x, float y, float z){\r\n\t\tboolean[] sides = checkCubeSides((int)x,(int)y,(int)z);\r\n\t\tfloat[] color = BlockType.color(blocks[(int)x][(int)y][(int)z]);\r\n\t\t\r\n//\t\t gl.glNormal3f(0.0f, 1.0f, 0.0f);\r\n\t\tif(sides[0]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\t \r\n//\t // Bottom-face\r\n//\t gl.glNormal3f(0.0f, -1.0f, 0.0f);\r\n\t\t\r\n\t\tif(sides[1]){\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n//\t // Back-face\r\n//\t gl.glNormal3f(0.0f, 0.0f, -1.0f);\r\n\t\tif(sides[2]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n//\t // Front-face\r\n//\t gl.glNormal3f(0.0f, 0.0f, 1.0f);\r\n\t\tif(sides[3]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t \r\n//\t // Left-face\r\n//\t gl.glNormal3f(-1.0f, 0.0f, 0.0f);\r\n\t\tif(sides[4]){\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t // Right-face\r\n//\t gl.glNormal3f(1.0f, 0.0f, 0.0f);\r\n\t\tif(sides[5]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Point centeroid ()\r\n {\r\n return new Point ((v1.getX()+v2.getX()+v3.getX())/3,(v1.getY()+v2.getY()+v3.getY())/3);\r\n }", "public static void main(String[] args) {\n\t\tint x1=1, y1=1, z1=1;\n\t\tint x2=8, y2=-7, z2=1;\n\t\t//Points describing the plane\n\t\tint x3=3, y3=9, z3=0;\n\t\tint x4=-1, y4=3, z4=0;\n\t\tint x5=4, y5=5, z5=0;\n\t\t//No intersection with this co-ords\n\t\tintersect(x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4,x5,y5,z5);\n\t}", "public Point3d get3DCenter() {\n double xOfCenter = 0;\n double yOfCenter = 0;\n double zOfCenter = 0;\n for (IAtom atom : atoms) {\n xOfCenter += atom.getPoint3d().x;\n yOfCenter += atom.getPoint3d().y;\n zOfCenter += atom.getPoint3d().z;\n }\n\n return new Point3d(xOfCenter / getAtomCount(),\n yOfCenter / getAtomCount(),\n zOfCenter / getAtomCount());\n }", "Obj(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3){\t// CAMBIAR LAS COORDENADAS X,Y,Z CON 0,1 PARA CONSTRUIR PRISMA, CILINDRO, PIRAMIDE, CONO Y ESFERA.\n w\t= new Point3D[4];\n\tvScr\t= new Point2D[4];\n \n w[0]\t= new Point3D(0, 0, 0); // desde la base\n\tw[1]\t= new Point3D(x1, y1, z1);\n\tw[2]\t= new Point3D(x2, y2, z2);\n\tw[3]\t= new Point3D(x3, y3, z3);\n \n\tobjSize = (float) Math.sqrt(12F); \n rho\t= 5 * objSize;\n }", "public static List<Point2D.Float> getConvexHull(List<Point2D.Float> points)\n\t\t\tthrows IllegalArgumentException {\n\n\t\tList<Point2D.Float> sorted = new ArrayList<Point2D.Float>(\n\t\t\t\tgetSortedPointSet(points));\n\n\t\tif (sorted.size() < 3) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"can only create a convex hull of 3 or more unique points\");\n\t\t}\n\n\t\tif (areAllCollinear(sorted)) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"cannot create a convex hull from collinear points\");\n\t\t}\n\n\t\tStack<Point2D.Float> stack = new Stack<Point2D.Float>();\n\t\tstack.push(sorted.get(0));\n\t\tstack.push(sorted.get(1));\n\n\t\tfor (int i = 2; i < sorted.size(); i++) {\n\n\t\t\tPoint2D.Float head = sorted.get(i);\n\t\t\tPoint2D.Float middle = stack.pop();\n\t\t\tPoint2D.Float tail = stack.peek();\n\n\t\t\tTurn turn = getTurn(tail, middle, head);\n\n\t\t\tswitch (turn) {\n\t\t\tcase COUNTER_CLOCKWISE:\n\t\t\t\tstack.push(middle);\n\t\t\t\tstack.push(head);\n\t\t\t\tbreak;\n\t\t\tcase CLOCKWISE:\n\t\t\t\ti--;\n\t\t\t\tbreak;\n\t\t\tcase COLLINEAR:\n\t\t\t\tstack.push(head);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// close the hull\n\t\tstack.push(sorted.get(0));\n\n\t\treturn new ArrayList<Point2D.Float>(stack);\n\t}", "private static int[][] findConvexHull(int[][] pointSet)\n {\n Stack<Integer> convexHullStack = new Stack<Integer>();\n if (pointSet[0].length > 3)\n {\n convexHullStack.push(0); convexHullStack.push(1); convexHullStack.push(2);\n for (int i = 3; i<= pointSet[0].length-1; i++)\n {\n Integer top = convexHullStack.pop();\n Integer nextToTop = convexHullStack.pop();\n while (((pointSet[0][top]-pointSet[0][nextToTop])*(pointSet[1][i]-pointSet[1][nextToTop]))-\n ((pointSet[0][i]-pointSet[0][nextToTop])*(pointSet[1][top]-pointSet[1][nextToTop])) <= 0)\n {\n top = nextToTop;\n nextToTop = convexHullStack.pop();\n }\n convexHullStack.push(nextToTop);\n convexHullStack.push(top);\n convexHullStack.push(i);\n }\n\n int[][] convexHull = new int[2][convexHullStack.size()];\n for (int i = convexHull[0].length-1; i>=0; i--)\n {\n int temp = convexHullStack.pop();\n convexHull[0][i] = pointSet[0][temp];\n convexHull[1][i] = pointSet[1][temp];\n }\n return convexHull;\n }\n else\n {\n return pointSet;\n }\n }", "private void add3(int[] x3, int[] z3, int[] x2, int[] z2, int[] x1, int[] z1, int[] x, int[] z) {\r\n\t\tint[] t = fieldTX;\r\n\t\tint[] u = fieldTZ;\r\n\t\tint[] v = fieldUX;\r\n\t\tint[] w = fieldUZ;\r\n\t\tSubtractBigNbrModN(x2, z2, v, TestNbr, NumberLength); // v = x2-z2\r\n\t\tAddBigNbrModN(x1, z1, w, TestNbr, NumberLength); // w = x1+z1\r\n\t\tMontgomeryMult(v, w, u); // u = (x2-z2)*(x1+z1)\r\n\t\tAddBigNbrModN(x2, z2, w, TestNbr, NumberLength); // w = x2+z2\r\n\t\tSubtractBigNbrModN(x1, z1, t, TestNbr, NumberLength); // t = x1-z1\r\n\t\tMontgomeryMult(t, w, v); // v = (x2+z2)*(x1-z1)\r\n\t\tAddBigNbrModN(u, v, t, TestNbr, NumberLength); // t = 2*(x1*x2-z1*z2)\r\n\t\tMontgomeryMult(t, t, w); // w = 4*(x1*x2-z1*z2)^2\r\n\t\tSubtractBigNbrModN(u, v, t, TestNbr, NumberLength); // t =\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 2*(x2*z1-x1*z2)\r\n\t\tMontgomeryMult(t, t, v); // v = 4*(x2*z1-x1*z2)^2\r\n\t\tif (BigNbrAreEqual(x, x3)) {\r\n\t\t\tSystem.arraycopy(x, 0, u, 0, NumberLength);\r\n\t\t\tSystem.arraycopy(w, 0, t, 0, NumberLength);\r\n\t\t\tMontgomeryMult(z, t, w);\r\n\t\t\tMontgomeryMult(v, u, z3);\r\n\t\t\tSystem.arraycopy(w, 0, x3, 0, NumberLength);\r\n\t\t} else {\r\n\t\t\tMontgomeryMult(w, z, x3); // x3 = 4*z*(x1*x2-z1*z2)^2\r\n\t\t\tMontgomeryMult(x, v, z3); // z3 = 4*x*(x2*z1-x1*z2)^2\r\n\t\t}\r\n\t}", "public void makeSphere (float radius, int slices, int stacks)\r\n {\r\n \t\r\n \tPoint lower[][] = new Point[stacks + 1][slices + 1];\r\n \tfloat rad[] = new float[stacks + 1];\r\n \tfloat vert = -0.5f;\r\n \t\r\n \t// Calculate radius for each stack\r\n \tfor(int i = 0; i <= stacks; i ++)\r\n \t{\r\n \t\trad[i] = (float)Math.sqrt((0.5f * 0.5f) - (( 0.5f - ( ( 1.0f/(float)stacks) * i ) ) * ( 0.5f - ( ( 1.0f/(float)stacks) * i ) ) ));\r\n\t\t}\r\n \t\r\n \tvert = -0.5f;\r\n \t\r\n \t// Calculate the vertices for each stack\r\n \tfor(int i = 0; i <= stacks; i ++ )\r\n \t{\r\n \t\tfor(int j = 0; j <= slices; j ++)\r\n \t\t{\r\n \t\t\tlower[i][j] = new Point();\r\n \t\t\tlower[i][j].x = rad[i] * (float)Math.cos(Math.toRadians ( (360.0f / (float)slices) * j ) );\r\n \t\t\tlower[i][j].z = rad[i] * (float)Math.sin(Math.toRadians ( (360.0f / (float)slices) * j ) );\r\n \t\t\tlower[i][j].y = vert;\r\n \t\t}\r\n \t\t// Update the y coordinate for the next stack\r\n \t\tvert += (1.0f / (float)stacks);\r\n \t}\r\n \t\r\n \t\r\n \t// Print all the triangles using the vertices\r\n \tfor(int i = 0 ; i < stacks; i++)\r\n \t\tfor(int j = 0 ; j < slices; j++)\r\n \t\t{\r\n \t\t\tthis.addTriangle(lower[i][j].x, lower[i][j].y, lower[i][j].z, lower[i][j+1].x, lower[i][j+1].y, lower[i][j+1].z, lower[i+1][j+1].x, lower[i+1][j+1].y, lower[i+1][j+1].z);\r\n \t\t\tthis.addTriangle(lower[i][j].x, lower[i][j].y, lower[i][j].z, lower[i+1][j+1].x, lower[i+1][j+1].y, lower[i+1][j+1].z, lower[i+1][j].x, lower[i+1][j].y, lower[i+1][j].z);\r\n \t\t}\r\n }", "@Test\n\tpublic void testCalculateConvexHullFromWktPoints01() throws ParseException{\n\t\tList<String> pointWktList = new ArrayList<String>();\n\t\tpointWktList.add(\"POINT(123.0 1.0)\");\n\t\tpointWktList.add(\"POINT(103.0 -7.0)\");\n\t\tpointWktList.add(\"POINT(203.0 -22.0)\");\n\t\tpointWktList.add(\"POINT(303.0 440.0)\");\n\t\tpointWktList.add(\"POINT(101.0 -4.0)\");\n\t\tString result = ConvexHullUtil.calculateConvexHullFromWktPoints(pointWktList);\n\t\tassertThat(result, is(\"POLYGON ((203 -22, 103 -7, 101 -4, 303 440, 203 -22))\"));\n\t}", "public QuickHull() {\n allPoints =new ArrayList<>();\n convexHull = new ArrayList<>();\n }", "public void calculateCentroids(float x, float y) {\n\t\t\tpCX = pCY = qCX = qCY = 0;\n\t\t\tfloat total = 0;\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tfloat w = w(x, y, pX[i], pY[i]);\n\t\t\t\ttotal += w;\n\t\t\t\tpCX += w * pX[i];\n\t\t\t\tpCY += w * pY[i];\n\t\t\t\tqCX += w * qX[i];\n\t\t\t\tqCY += w * qY[i];\n\t\t\t}\n\t\t\tpCX /= total;\n\t\t\tpCY /= total;\n\t\t\tqCX /= total;\n\t\t\tqCY /= total;\n\t\t}", "protected abstract NativeSQLStatement createNativeConvexHullStatement(Geometry geom);", "public Coord3d getCenter() {\n return new Coord3d((xmin + xmax) / 2, (ymin + ymax) / 2, (zmin + zmax) / 2);\n }", "public void homogenize() {\n\t\tif (DoubleComparison.eq(w, 0)){\n\t\t\tthrow new RuntimeException(\"Can't homogenize points at infinity (last component zero)\");\n\t\t}\n\n\t\tthis.x = x / w;\n\t\tthis.y = y / w;\n\t\tthis.z = z / w;\n\t\tthis.w = 1;\n\t}", "public Matrix determineProjectionMatrix(ArrayList<double[]> corners, ArrayList<double[]> pointList2D, ArrayList<double[]> pointList3D) {\n\t\tMatrix projectionMatrix = new Matrix();\n\t\tArrayList<double[]> yzPlane2DPoints = new ArrayList<double[]>();\n\t\tArrayList<double[]> yzPlane3DPoints = new ArrayList<double[]>();\n\t\tArrayList<double[]> xzPlane2DPoints = new ArrayList<double[]>();\n\t\tArrayList<double[]> xzPlane3DPoints = new ArrayList<double[]>();\n\t\tfor (int i=0;i<pointList3D.size();i++) {\n\t\t\tif (pointList3D.get(i)[1] == 0) {\n\t\t\t\txzPlane2DPoints.add(pointList2D.get(i));\n\t\t\t\txzPlane3DPoints.add(pointList3D.get(i));\n\t\t\t} else if (pointList3D.get(i)[0] == 0) {\n\t\t\t\tyzPlane2DPoints.add(pointList2D.get(i));\n\t\t\t\tyzPlane3DPoints.add(pointList3D.get(i));\n\t\t\t}\n\t\t}\n\t\tArrayList<double[]> final2D = new ArrayList<double[]>();\n\t\tArrayList<double[]> final3D = new ArrayList<double[]>();\n\t\tif ((xzPlane2DPoints.size() >= 4 && yzPlane2DPoints.size() >= 4)) {\n\t\t\tdouble gridSize = 0.5;\n\t\t\tdouble max_u, max_v;\n\t\t\tint[] gridCount = new int[3];\n\t\t\tif (yzPlane2DPoints.size() >= 4) {\n\t\t\t\tMatrix P_YZ = performPlanarCalibration(yzPlane2DPoints, yzPlane3DPoints, 0);\n\t\t\t\tmax_u = 0;\n\t\t\t\tmax_v = 0;\n\t\t\t\tfor (int i = 0; i < yzPlane3DPoints.size(); i++) {\n\t\t\t\t\tmax_u = Math.max(yzPlane3DPoints.get(i)[1], max_u);\n\t\t\t\t\tmax_v = Math.max(yzPlane3DPoints.get(i)[2], max_v);\n\t\t\t\t}\n\t\t\t\tgridCount[0] = 1;\n\t\t\t\tgridCount[1] = (int) Math.floor(max_u / gridSize + 1.5);\n\t\t\t\tgridCount[2] = (int) Math.floor(max_v / gridSize + 1.5);\n\t\t\t\tobtainRefiningPoints(corners, P_YZ, gridSize, gridCount, final2D, final3D);\n\t\t\t}\n\t\t\tif (xzPlane2DPoints.size() >= 4) {\n\t\t\t\tMatrix P_XZ = performPlanarCalibration(xzPlane2DPoints, xzPlane3DPoints, 1);\n\t\t\t\tmax_u = 0;\n\t\t\t\tmax_v = 0;\n\t\t\t\tfor (int i = 0; i < (int) xzPlane3DPoints.size(); i++) {\n\t\t\t\t\tmax_u = Math.max(xzPlane3DPoints.get(i)[0], max_u);\n\t\t\t\t\tmax_v = Math.max(xzPlane3DPoints.get(i)[2], max_v);\n\t\t\t\t}\n\t\t\t\tgridCount[0] = (int) Math.floor(max_u / gridSize + 1.5);\n\t\t\t\tgridCount[1] = 1;\n\t\t\t\tgridCount[2] = (int) Math.floor(max_v / gridSize + 1.5);\n\t\t\t\tobtainRefiningPoints(corners, P_XZ, gridSize, gridCount, final2D, final3D);\n\t\t\t}\n\t\t}\n\t\tcorners.clear();\n\t\tcorners.addAll(final2D);\n\t\tpointList2D.clear();\n\t\tpointList2D.addAll(final2D);\n\t\tpointList3D.clear();\n\t\tpointList3D.addAll(final3D);\n\t\treturn performCalibration(final2D, final3D);\n\t}", "public void encapsulate(int x, int y, int z) {\n minX = Math.min(minX, x);\n minY = Math.min(minY, y);\n minZ = Math.min(minZ, z);\n maxX = Math.max(x, maxX);\n maxY = Math.max(y, maxY);\n maxZ = Math.max(z, maxZ);\n }", "public void makeCone (float radius, int radialDivisions, int heightDivisions)\r\n {\r\n \tPoint lower[][] = new Point[heightDivisions + 1][radialDivisions + 1];\r\n \t\r\n \tfloat rad[] = new float[heightDivisions + 1];\r\n \tfloat vert = -0.5f;\r\n \t\r\n \t// Calculate radius for every subdivision along the height\r\n \tfor(int i = 0; i < heightDivisions; i ++)\r\n \t{\r\n \t\trad[i] = radius * ( 1.0f - ( 1f /(float)heightDivisions) * i );\r\n \t}\r\n \t\r\n \t// Calculate curved surface vertices for every subdivision along the height\r\n \tfor(int i = 0; i <= heightDivisions; i ++ )\r\n \t{\r\n \t\tfor(int j = 0; j <= radialDivisions; j ++)\r\n \t\t{\r\n \t\t\tlower[i][j] = new Point();\r\n \t\t\tlower[i][j].x = rad[i] * (float)Math.cos(Math.toRadians ( (360.0f / (float)radialDivisions) * j ) );\r\n \t\t\tlower[i][j].z = rad[i] * (float)Math.sin(Math.toRadians ( (360.0f / (float)radialDivisions) * j ) );\r\n \t\t\tlower[i][j].y = vert;\r\n \t\t}\r\n \t\t// Update the y coordinate for next iteration\r\n \t\tvert += (1f / (float)heightDivisions);\r\n \t}\r\n \t\r\n \tvert = -0.5f;\r\n \t\r\n \t// Print the bottom circular surface\r\n \tfor(int i = 0; i <= radialDivisions - 1; i ++)\r\n \t{\r\n \t\tthis.addTriangle(lower[0][i].x, vert, lower[0][i].z, 0f, vert, 0f, lower[0][i+1].x, vert, lower[0][i+1].z );\r\n \t}\r\n \t\r\n \t// Print the curved surface\r\n \tfor(int i = 0 ; i < heightDivisions; i++)\r\n \t\tfor(int j = 0 ; j < radialDivisions; j++)\r\n \t\t{\r\n \t\t\tthis.addTriangle(lower[i][j].x, lower[i][j].y, lower[i][j].z, lower[i][j+1].x, lower[i][j+1].y, lower[i][j+1].z, lower[i+1][j+1].x, lower[i+1][j+1].y, lower[i+1][j+1].z);\r\n \t\t\tthis.addTriangle(lower[i][j].x, lower[i][j].y, lower[i][j].z, lower[i+1][j+1].x, lower[i+1][j+1].y, lower[i+1][j+1].z, lower[i+1][j].x, lower[i+1][j].y, lower[i+1][j].z);\r\n \t\t\t\r\n \t\t}\r\n }", "protected abstract BaseVector3d createBaseVector3d(double x, double y, double z);", "public Point transform(double x, double y, double z) {\n\t\t\n\t\n\t\tdouble uIso = (x * xToU) + (y * yToU) + (z * zToU);\n\t\tdouble vIso = (x * xToV) + (y * yToV) + (z * zToV);\n\t\t\n\t\tint uDraw = xOffset + (int)(scale * uIso);\n\t\tint vDraw = yOffset + (int)(scale * vIso);\n\t\t\n\t\treturn new Point(uDraw, vDraw);\n\t}", "public void computeBoundingBox() {\n\taveragePosition = new Point3(center);\n tMat.rightMultiply(averagePosition);\n \n minBound = new Point3(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);\n maxBound = new Point3(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);\n // Initialize\n Point3[] v = new Point3[8];\n for (int i = 0; i < 8; i++)\n \tv[i] = new Point3(center);\n // Vertices of the box\n v[0].add(new Vector3(-radius, -radius, -height/2.0));\n v[1].add(new Vector3(-radius, radius, -height/2.0));\n v[2].add(new Vector3(radius, -radius, -height/2.0));\n v[3].add(new Vector3(radius, radius, -height/2.0));\n v[4].add(new Vector3(-radius, -radius, height/2.0));\n v[5].add(new Vector3(-radius, radius, height/2.0));\n v[6].add(new Vector3(radius, -radius, height/2.0));\n v[7].add(new Vector3(radius, radius, height/2.0));\n // Update minBound and maxBound\n for (int i = 0; i < 8; i++)\n {\n \ttMat.rightMultiply(v[i]);\n \tif (v[i].x < minBound.x)\n \t\tminBound.x = v[i].x;\n \tif (v[i].x > maxBound.x)\n \t\tmaxBound.x = v[i].x;\n \tif (v[i].y < minBound.y)\n \t\tminBound.y = v[i].y;\n \tif (v[i].y > maxBound.y)\n \t\tmaxBound.y = v[i].y;\n \tif (v[i].z < minBound.z)\n \t\tminBound.z = v[i].z;\n \tif (v[i].z > maxBound.z)\n \t\tmaxBound.z = v[i].z;\n }\n \n }", "public BoundingBox3d(float xmin, float xmax, float ymin, float ymax, float zmin, float zmax) {\n this.xmin = xmin;\n this.xmax = xmax;\n this.ymin = ymin;\n this.ymax = ymax;\n this.zmin = zmin;\n this.zmax = zmax;\n }", "@Override\n public void updateConvexHull() {\n BuildingModel buildingModel;\n convexHull = new CompositeConvexHull();\n convexObject.setConvexPolygon(convexHull.getConvexPolygon());\n if (convexObject != null && convexObject.getConvexPolygon() != null && convexObject.getConvexPolygon().npoints != 0) {\n for (int i = 0; i < convexObject.getConvexPolygon().npoints; i++) {\n convexHull.addPoint(convexObject.getConvexPolygon().xpoints[i],\n convexObject.getConvexPolygon().ypoints[i]);\n }\n }\n\n for (StandardEntity entity : entities) {\n if (entity instanceof Building) {\n buildingModel = world.getBuildingModel(entity.getID());\n\n /*if (isDying && building.getEstimatedFieryness() > 0 && building.getEstimatedFieryness() < 3) {\n setDying(false);\n }*/\n\n if (isEdge && !world.getMapSideBuildings().contains(buildingModel.getID())) {\n setEdge(false);\n }\n\n //try {\n// if (membershipChecker.checkMembership(building)) {\n// convexHull.addPoint(building.getSelfBuilding().getX(),\n// building.getSelfBuilding().getY());\n for (int i = 0; i < buildingModel.getSelfBuilding().getApexList().length; i += 2) {\n convexHull.addPoint(buildingModel.getSelfBuilding().getApexList()[i], buildingModel.getSelfBuilding().getApexList()[i + 1]);\n }\n\n// }\n /*} catch (Exception e) {\n e.printStackTrace();\n }*/\n }\n }\n\n\n// sizeOfBuildings(); mostafas commented this\n //if (world.getTime() % 5 == 0) {\n List<BuildingModel> dangerBuildings = new ArrayList<BuildingModel>();\n double clusterEnergy = 0;\n for (StandardEntity entity : getEntities()) {\n BuildingModel burningBuilding = world.getBuildingModel(entity.getID());\n if (burningBuilding.getEstimatedFieryness() == 1) {\n dangerBuildings.add(burningBuilding);\n clusterEnergy += burningBuilding.getEnergy();\n }\n if (burningBuilding.getEstimatedFieryness() == 2) {\n dangerBuildings.add(burningBuilding);\n clusterEnergy += burningBuilding.getEnergy();\n }\n if (burningBuilding.getEstimatedFieryness() == 3 && burningBuilding.getEstimatedTemperature() > 150) {\n dangerBuildings.add(burningBuilding);\n }\n }\n\n setDying(dangerBuildings.isEmpty());\n setControllable(clusterEnergy);\n buildings = dangerBuildings;\n //}\n convexObject.setConvexPolygon(convexHull.getConvexPolygon());\n setBorderEntities();\n setCentre();\n// sizeOfBuildings();\n// setTotalDistance();\n\n setOuterDangerBuildings(); //XXX test\n setOuterBuildings();\n }", "public void buildVerticies(){\n\t\tfor(Entry<HexLocation, TerrainHex> entry : hexes.entrySet()){\n\t\t\t\n\t\t\tVertexLocation vertLoc1 = new VertexLocation(entry.getKey(), VertexDirection.NorthWest);\n\t\t\tVertex v1 = new Vertex(vertLoc1);\n\t\t\tverticies.put(vertLoc1, v1);\n\t\t\t\n\t\t\tVertexLocation vertLoc2 = new VertexLocation(entry.getKey(), VertexDirection.NorthEast);\n\t\t\tVertex v2 = new Vertex(vertLoc2);\n\t\t\tverticies.put(vertLoc2, v2);\n\t\t\t\n\t\t\tVertexLocation vertLoc3 = new VertexLocation(entry.getKey(), VertexDirection.East);\n\t\t\tVertex v3 = new Vertex(vertLoc3);\n\t\t\tverticies.put(vertLoc3, v3);\n\t\t\t\n\t\t\tVertexLocation vertLoc4 = new VertexLocation(entry.getKey(), VertexDirection.SouthEast);\n\t\t\tVertex v4 = new Vertex(vertLoc4);\n\t\t\tverticies.put(vertLoc4, v4);\n\t\t\t\n\t\t\tVertexLocation vertLoc5 = new VertexLocation(entry.getKey(), VertexDirection.SouthWest);\n\t\t\tVertex v5 = new Vertex(vertLoc5);\n\t\t\tverticies.put(vertLoc5, v5);\n\t\t\t\n\t\t\tVertexLocation vertLoc6 = new VertexLocation(entry.getKey(), VertexDirection.West);\n\t\t\tVertex v6 = new Vertex(vertLoc6);\n\t\t\tverticies.put(vertLoc6, v6);\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "private void setVertices(){\n \tdouble[] xs = new double[numOfSides];\n \tdouble[] ys = new double[numOfSides];\n \tif (numOfSides%2==1){\n \t\tfor (int i=0; i<numOfSides; i++){\n \t\t\txs[i]=radius*Math.cos(2*i*Math.PI/numOfSides);\n \t\t\tys[i]=radius*Math.sin(2*i*Math.PI/numOfSides);\n \t\t\t}\n \t}\n \telse{\n \t\tdouble start=Math.PI/numOfSides;\n \t\tfor (int i=0; i<numOfSides; i++){\n \t\t\txs[i]=radius*Math.cos(start+2*i*(Math.PI)/numOfSides);\n \t\t\tys[i]=radius*Math.sin(start+2*i*(Math.PI)/numOfSides);\n \t\t\t}\n \t}\n \tsetXLocal(xs);\n \tsetYLocal(ys);\n }", "@Test\n\tpublic void testConvexHullJTSApi(){\n\t\tCoordinate [] ca3 = {\n\t\t\t\tnew Coordinate(1.0, 2.5),\n\t\t\t\tnew Coordinate(2.0, 2.5)\n\t\t};\n\t\tConvexHull objectUnderTest = new ConvexHull(ca3, geometryFactory);\n\t\tGeometry result = objectUnderTest.getConvexHull();\n\t\tassertThat(result.toText(), is(\"LINESTRING (1 2.5, 2 2.5)\"));\n\t}", "public static List<Point> findConvexHull(List<Point> points) {\n Point basePoint = points.stream() // lowest point\n .min(Comparator.comparingDouble(Point::getY)).orElseThrow();\n\n List<Point> pointStorage = new ArrayList<>(points);\n pointStorage.remove(basePoint);\n\n pointStorage.sort((p1, p2) -> {\n double p1Atan = getPolarAngleBetween2Points(basePoint, p1);\n double p2Atan = getPolarAngleBetween2Points(basePoint, p2);\n return Double.compare(p1Atan, p2Atan);\n });\n\n List<Point> convexHullPoints = new ArrayList<>();\n convexHullPoints.add(basePoint);\n Map<Point, Double> pointToPolarAngle = new HashMap<>();\n pointToPolarAngle.put(basePoint, .0);\n\n for (Point point : pointStorage) {\n ListIterator<Point> listIterator = convexHullPoints.listIterator(convexHullPoints.size());\n while (listIterator.hasPrevious()) {\n Point previous = listIterator.previous();\n Double previousPolarAngle = pointToPolarAngle.get(previous);\n double curPointPolarAngle = getPolarAngleBetween2Points(previous, point);\n\n if (curPointPolarAngle < 0)\n curPointPolarAngle += Math.PI * 2;\n\n if (previousPolarAngle >= curPointPolarAngle) {\n listIterator.remove();\n pointToPolarAngle.remove(previous);\n } else {\n convexHullPoints.add(point);\n pointToPolarAngle.put(point, curPointPolarAngle);\n break;\n }\n }\n }\n\n return convexHullPoints;\n }", "public static void main(String[] args){\n Mesh3D box = Mesh3D.box(10, 20, 60);\n \n Line3D lineX = box.getLineX();\n Line3D lineY = box.getLineY();\n Line3D lineZ = box.getLineZ();\n lineX.show();\n lineY.show();\n lineZ.show();\n box.translateXYZ(100, 0.0, 0.0); \n box.show();\n Line3D line = new Line3D(); \n List<Point3D> intersects = new ArrayList<Point3D>();\n \n for(int p = 0; p < 100; p++){\n double r = 600;\n double theta = Math.toRadians(90.0);//Math.toRadians(Math.random()*180.0);\n double phi = Math.toRadians(Math.random()*360.0-180.0);\n line.set(0.0,0.0,0.0, \n Math.sin(theta)*Math.cos(phi)*r,\n Math.sin(theta)*Math.sin(phi)*r,\n Math.cos(theta)*r\n );\n intersects.clear();\n box.intersectionRay(line, intersects);\n System.out.println(\"theta/phi = \" + Math.toDegrees(theta) + \" \"\n + Math.toDegrees(phi) + \" intersects = \" + intersects.size());\n \n }\n }", "private double getArea(List<Point> points){\n double result = 0.0;\n int n = points.size();\n for (int i = 0; i < n; i++) {\n if (i == 0) {\n result += points.get(i).x * (points.get(n - 1).z - points.get(i + 1).z);\n } else if (i == (n - 1)) {\n result += points.get(i).x * (points.get(i - 1).z - points.get(0).z);\n } else {\n result += points.get(i).x * (points.get(i - 1).z - points.get(i + 1).z);\n }\n }\n return Math.abs(result) / 2.0;\n }", "public void solucioInicial2() {\n int grupsRecollits = 0;\n for (int i=0; i<numCentres*helisPerCentre; ++i) {\n Helicopter hel = new Helicopter();\n helicopters.add(hel);\n }\n int indexHelic = 0;\n int indexGrup = 0;\n int places = 15;\n while (indexGrup < numGrups) {\n int trajecte[] = {-1,-1,-1};\n for (int i=0; i < 3 && indexGrup<numGrups; ++i) {\n Grupo grup = grups.get( indexGrup );\n if (places - grup.getNPersonas() >= 0) {\n places -= grup.getNPersonas();\n trajecte[i] = indexGrup;\n indexGrup++;\n\n }\n else i = 3;\n }\n Helicopter helicopter = helicopters.get( indexHelic );\n helicopter.addTrajecte( trajecte, indexHelic/helisPerCentre );\n places = 15;\n indexHelic++;\n if (indexHelic == numCentres*helisPerCentre) indexHelic = 0;\n }\n }", "public Polygon getPolygon(double eyeDistance){\n //define the front two verticies of the currentTrack\n Point3D track_vertex0 = currentTrack.getVertex(0);\n Point3D track_vertex1 = currentTrack.getVertex(1);\n //use center point to define the center of the sphape\n int cubeSize = 3;\n\n Point3D front_up_left = new Point3D (centerPoint.x-cubeSize, centerPoint.y-cubeSize, centerPoint.z-cubeSize);\n Point3D front_down_left = new Point3D (centerPoint.x-cubeSize, centerPoint.y+cubeSize, centerPoint.z-cubeSize);\n Point3D front_down_right = new Point3D (centerPoint.x+cubeSize, centerPoint.y+cubeSize, centerPoint.z-cubeSize);\n Point3D front_up_right = new Point3D (centerPoint.x+cubeSize, centerPoint.y-cubeSize, centerPoint.z-cubeSize);\n\n Point3D back_up_left = new Point3D (front_up_left.x, front_up_left.y, centerPoint.z+cubeSize);\n Point3D back_down_left = new Point3D (front_down_left.x, front_down_left.y, centerPoint.z+cubeSize);\n Point3D back_down_right = new Point3D (front_down_right.x, front_down_right.y, centerPoint.z+cubeSize);\n Point3D back_up_right = new Point3D (front_up_right.x, front_up_right.y, centerPoint.z+cubeSize);\n\n //aranges verticies in the order they will be drawn\n Point3D[] cube_verticies = {front_up_left, front_down_left, front_down_right, front_up_right,\n front_up_left, back_up_left, back_up_right, front_up_right,\n front_down_right, back_down_right, back_up_right, back_down_right,\n back_down_left, back_up_left, back_down_left, front_down_left};\n\n int[] x_points = new int[16];\n int[] y_points = new int[16];\n //convert 3D points to 2D points\n for(int i=0;i<16;i++){\n if(cube_verticies[i].z <= 200){ //same fix as for the track positioning\n x_points[i] = (int) -cube_verticies[i].projectPoint3D(eyeDistance).getX();\n y_points[i] = (int) cube_verticies[i].projectPoint3D(eyeDistance).getY();\n }\n else{\n x_points[i] = (int) cube_verticies[i].projectPoint3D(eyeDistance).getX();\n y_points[i] = (int) cube_verticies[i].projectPoint3D(eyeDistance).getY();\n }\n }\n Polygon polygon = new Polygon(x_points, y_points, 16);\n return polygon;\n }", "public Point evaluate(double x, double y, double z) {\n\t\t// x=(-(yn(y-y0)+zn(z-z0))+xn*x0)/xn\n\t\tif (x != x) {\n\t\t\tx = (-(normal.y * (y - origin.y) + normal.z * (z - origin.z)) + normal.x\n\t\t\t\t\t* origin.x)\n\t\t\t\t\t/ normal.x;\n\t\t\treturn new Point(x, y, z);\n\t\t} else if (y != y) {\n\t\t\ty = (-(normal.x * (x - origin.x) + normal.z * (z - origin.z)) + normal.y\n\t\t\t\t\t* origin.y)\n\t\t\t\t\t/ normal.y;\n\t\t\treturn new Point(x, y, z);\n\t\t} else if (z != z) {\n\t\t\tz = (-(normal.y * (y - origin.y) + normal.x * (x - origin.x)) + normal.z\n\t\t\t\t\t* origin.z)\n\t\t\t\t\t/ normal.z;\n\t\t\treturn new Point(x, y, z);\n\t\t}\n\t\treturn null;\n\t}", "public abstract Vector4fc div(float x, float y, float z, float w);", "public void PerspektivischeProjektion(){\n /**\n * Abrufen der Koordinaten aus den einzelnen\n * Point Objekten des Objekts Tetraeder.\n */\n double[] A = t1.getTetraeder()[0].getPoint();\n double[] B = t1.getTetraeder()[1].getPoint();\n double[] C = t1.getTetraeder()[2].getPoint();\n double[] D = t1.getTetraeder()[3].getPoint();\n\n /*\n * Aufrufen der Methode sortieren\n */\n double[][] sP = cls_berechnen.sortieren(A, B, C, D);\n\n A = sP[0];\n B = sP[1];\n C = sP[2];\n D = sP[3];\n\n /*Wenn alle z Koordinaten gleich sind, ist es kein Tetraeder. */\n if (A[2] == D[2]) {\n System.out.println(\"kein Tetraeder\");\n return;\n }\n\n //Entfernung vom 'Center of projection' zur 'Projectoin plane'\n double d=5;\n\n /*\n * Transformiert x|y|z Koordinaten in x|y Koordinaten\n * mithilfer der perspektivischen Projektion\n */\n\n A[0]=A[0]/((A[2]+d)/d);\n A[1]=A[1]/((A[2]+d)/d);\n B[0]=B[0]/((B[2]+d)/d);\n B[1]=B[1]/((B[2]+d)/d);\n C[0]=C[0]/((C[2]+d)/d);\n C[1]=C[1]/((C[2]+d)/d);\n D[0]=D[0]/((D[2]+d)/d);\n D[1]=D[1]/((D[2]+d)/d);\n\n\n double ax, ay, bx, by, cx, cy, dx, dy;\n ax=A[0];\n ay=A[1];\n bx=B[0];\n by=B[1];\n cx=C[0];\n cy=C[1];\n dx=D[0];\n dy=D[1];\n\n tetraederzeichnen(ax, ay, bx, by, cx, cy, dx, dy);\n }", "public static float[] createCube (float x, float y, float z) {\r\n int offset = CUBE_LENGTH/2;\r\n return new float[] {\r\n x + offset, y + offset, z,\r\n x - offset, y + offset, z,\r\n x - offset, y + offset, z - CUBE_LENGTH,\r\n x + offset, y + offset, z - CUBE_LENGTH,\r\n x + offset, y - offset, z - CUBE_LENGTH,\r\n x - offset, y - offset, z - CUBE_LENGTH,\r\n x - offset, y - offset, z,\r\n x + offset, y - offset, z,\r\n x + offset, y + offset, z - CUBE_LENGTH,\r\n x - offset, y + offset, z - CUBE_LENGTH,\r\n x - offset, y - offset, z - CUBE_LENGTH,\r\n x + offset, y - offset, z - CUBE_LENGTH,\r\n x + offset, y - offset, z,\r\n x - offset, y - offset, z,\r\n x - offset, y + offset, z,\r\n x + offset, y + offset, z,\r\n x - offset, y + offset, z - CUBE_LENGTH,\r\n x - offset, y + offset, z,\r\n x - offset, y - offset, z,\r\n x - offset, y - offset, z - CUBE_LENGTH,\r\n x + offset, y + offset, z,\r\n x + offset, y + offset, z - CUBE_LENGTH,\r\n x + offset, y - offset, z - CUBE_LENGTH,\r\n x + offset, y - offset, z\r\n };\r\n }", "public Vec3(float x, float y, float z){\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\t\ttrunc();\n\t}", "public void clearCentroidVectors();", "@Test\n\tpublic void testCuatroEnRayaHorizontal() {\n\t\t\n\t\tint []posX = new int[4];\n\t\tint []posY = new int[4];\n\t\tfor (int x = 1; x <= 7 - 3; ++x) {\n\t\t\tfor (int y = 1; y <= 6; ++y) {\n\t\t\t\tfor (int l = 0; l < 4; ++l) {\n\t\t\t\t\tposX[l] = x + l;\n\t\t\t\t\tposY[l] = y;\n\t\t\t\t}\n\t\t\t\tpruebaCuatroEnRaya(posX, posY);\n\t\t\t}\n\t\t}\n\t}", "public void scatter(ArrayList<Wall> listOfWalls, ArrayList<Point> intersections) {\n final int MAXTILE = 160;\r\n double minDistance = 5000000000.0; //no distance is greater than this 4head\r\n double upDistance = 500000000.0;\r\n double downDistance = 5000000.0;\r\n double leftDistance = 50000000.0;\r\n double rightDistance = 5000000.0;\r\n boolean isIntersection = checkIntersection(intersections);\r\n boolean isRightCollision = checkWallCollision(listOfWalls, 2);\r\n boolean isLeftCollision = checkWallCollision(listOfWalls, 3);\r\n boolean isUpCollision = checkWallCollision(listOfWalls,0);\r\n boolean isDownCollision = checkWallCollision(listOfWalls, 1);\r\n\r\n if(isIntersection) {\r\n if(!isRightCollision && this.direction != 3) {\r\n rightDistance = Math.pow((xPos + 20) - SCATTERX,2) + Math.pow(yPos - SCATTERY,2);\r\n }\r\n if(!isLeftCollision && this.direction !=2) {\r\n leftDistance = Math.pow((xPos - 20) - SCATTERX,2) + Math.pow(yPos - SCATTERY,2);\r\n }\r\n if(!isUpCollision && this.direction != 1) {\r\n upDistance = Math.pow((xPos) - SCATTERX,2) + Math.pow((yPos-20) - SCATTERY,2);\r\n }\r\n if(!isDownCollision && this.direction != 0) {\r\n downDistance = Math.pow((xPos) - SCATTERX,2) + Math.pow((yPos+20) - SCATTERY,2);\r\n }\r\n if(upDistance <= downDistance && upDistance <= leftDistance && upDistance <= rightDistance) {\r\n this.direction = 0;\r\n }\r\n else if(downDistance <= upDistance && downDistance <= leftDistance && downDistance <= rightDistance) {\r\n this.direction = 1;\r\n }\r\n\r\n else if(rightDistance <= leftDistance && rightDistance <= downDistance && rightDistance <= upDistance) {\r\n this.direction = 2;\r\n }\r\n\r\n else if(leftDistance <= rightDistance && leftDistance <= upDistance && leftDistance <= downDistance) {\r\n this.direction = 3;\r\n }\r\n\r\n\r\n }\r\n\r\n if(this.direction == 0) {\r\n yPos = yPos - 5;\r\n }\r\n if(this.direction ==1) {\r\n yPos = yPos + 5;\r\n }\r\n if(this.direction ==2) {\r\n xPos = xPos + 5;\r\n }\r\n if(this.direction == 3) {\r\n xPos = xPos -5;\r\n }\r\n\r\n }", "private void createCentipede() {\n\t\tcentipede = new ArrayList<>();\n\t\tfor(int i = 0; i < centipedeSize; i ++) {\n\t\t\tcentipede.add(new Segment(304 + 16 * i, 0));\n\t\t}\n\t}", "public void calculate() {\n\t\t\n\t\tHashMap<Integer, Vertex> vertices = triangulation.getVertices();\n\t\tHashMap<Integer, Face> faces = triangulation.getFaces();\n\n\t\tHashMap<Integer, Integer> chords = new HashMap<Integer, Integer>();\n\t\tList<Vertex> onOuterCircle = new LinkedList<Vertex>();\n\t\tList<Edge> outerCircle = new LinkedList<Edge>();\n\n\t\tfor (Vertex v : vertices.values()) {\n\t\t\tchords.put(v.getId(), 0);\n\t\t\tchildren.put(v.getId(), new LinkedList<Integer>());\n\t\t}\n\n\t\t// determine outer face (randomly, use the first face)\n\t\tFace outerFace = null;\n\t\tfor (Face f : faces.values()) {\n\t\t\touterFace = f;\n\t\t\tbreak;\n\t\t}\n\t\tif (outerFace == null) {\n\t\t\t// there are no faces at all in the embedding\n\t\t\treturn;\n\t\t}\n\n\t\tEdge e = outerFace.getIncidentEdge();\n\t\tvertexOrder[1] = e.getSource();\n\t\tvertexOrder[0] = e.getTarget();\n\t\tonOuterCircle.add(e.getTarget());\n\t\tonOuterCircle.add(e.getNext().getTarget());\n\t\tonOuterCircle.add(e.getSource());\n\t\touterCircle.add(e.getNext().getNext().getTwin());\n\t\touterCircle.add(e.getNext().getTwin());\n\t\t\n\t\t//System.out.println(\"outerCircle 0 \" + outerCircle.get(0).getId() + \" - source: \" + outerCircle.get(0).getSource().getId() + \" - target: \" + outerCircle.get(0).getTarget().getId());\n\t\t//System.out.println(\"outerCircle 1 \" + outerCircle.get(1).getId() + \" - source: \" + outerCircle.get(1).getSource().getId() + \" - target: \" + outerCircle.get(1).getTarget().getId());\n\t\t\n\n\t\tfor (int k=vertexOrder.length-1; k>1; k--) {\n\t\t\t//System.out.println(\"k: \" + k + \" - outerCircle size: \" + outerCircle.size());\n\t\t\t// chose v != v_0,v_1 such that v on outer face, not considered yet and chords(v)=0\n\t\t\tVertex nextVertex = null;\n\t\t\tint nextVertexId = -1;\n\t\t\tfor (int i=0; i<onOuterCircle.size(); i++) {\n\t\t\t\tnextVertex = onOuterCircle.get(i);\n\t\t\t\tnextVertexId = nextVertex.getId();\n\t\t\t\tif (nextVertexId != vertexOrder[0].getId() && nextVertexId != vertexOrder[1].getId()\n\t\t\t\t\t\t&& chords.get(nextVertexId) == 0) {\n\t\t\t\t\t// remove from list\n\t\t\t\t\tonOuterCircle.remove(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(\"nextVertexId: \" + nextVertexId);\n\n\t\t\t// found the next vertex; add it to the considered vertices\n\t\t\tvertexOrder[k] = nextVertex;\n\t\t\t\n\t\t\t// determine children\n\t\t\tList<Integer> childrenNextVertex = children.get(nextVertexId);\n\t\t\t\n\t\t\t// update edges of outer circle\n\t\t\tint index = 0;\n\t\t\t\n\t\t\twhile (outerCircle.get(index).getTarget().getId() != nextVertexId) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\tEdge outofNextVertex = outerCircle.remove(index+1);\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"outOfNextVertex \" + outofNextVertex.getId() + \" - source: \" + outofNextVertex.getSource().getId() + \" - target: \" + outofNextVertex.getTarget().getId());\n\t\t\tEdge intoNextVertex = outerCircle.remove(index);\n\t\t\t//System.out.println(\"intoNextVertex \" + intoNextVertex.getId() + \" - source: \" + intoNextVertex.getSource().getId() + \" - target: \" + intoNextVertex.getTarget().getId());\n\t\t\tEdge current = intoNextVertex.getNext();\n\t\t\t//System.out.println(\"current \" + current.getId() + \" - source: \" + current.getSource().getId() + \" - target: \" + current.getTarget().getId());\n\t\t\t\n\t\t\tint endIndex = index;\n\t\t\t\n\t\t\twhile (current.getId() != outofNextVertex.getId()) {\n\t\t\t\tEdge onCircle = current.getNext().getTwin();\n\t\t\t\touterCircle.add(endIndex, onCircle);\n\t\t\t\t\n\t\t\t\tchildrenNextVertex.add(0, onCircle.getSource().getId());\n\t\t\t\t\n\t\t\t\tendIndex++;\n\t\t\t\tcurrent = current.getTwin().getNext();\n\t\t\t\tonOuterCircle.add(onCircle.getTarget());\n\t\t\t}\n\t\t\t\n\t\t\tEdge lastEdge = outofNextVertex.getNext().getTwin();\n\t\t\touterCircle.add(endIndex, lastEdge);\n\t\t\t\n\t\t\tchildrenNextVertex.add(0, lastEdge.getSource().getId());\n\t\t\tchildrenNextVertex.add(0, lastEdge.getTarget().getId());\n\n\t\t\t// update chords\n\t\t\tfor (Vertex v : onOuterCircle) {\n\t\t\t\tEdge incidentEdge = v.getOutEdge();\n\t\t\t\tint firstEdgeId = incidentEdge.getId();\n\t\t\t\tint chordCounter = -2; // the 2 neighbours are on the outer circle, but no chords\n\t\t\t\tdo {\n\t\t\t\t\tif (onOuterCircle.contains(incidentEdge.getTarget())) {\n\t\t\t\t\t\tchordCounter++;\n\t\t\t\t\t}\n\t\t\t\t\tincidentEdge = incidentEdge.getTwin().getNext();\n\t\t\t\t} while (incidentEdge.getId() != firstEdgeId);\n\t\t\t\tchords.put(v.getId(), chordCounter);\n\t\t\t}\n\t\t}\n\t}", "private boolean isConvex() {\r\n int N = hull.size();\r\n if (N <= 2) return true;\r\n\r\n Point2D[] points = new Point2D[N];\r\n int n = 0;\r\n for (Point2D p : hull()) {\r\n points[n++] = p;\r\n }\r\n\r\n for (int i = 0; i < N; i++) {\r\n if (ccw(points[i], points[(i+1) % N], points[(i+2) % N]) <= 0) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "@Test\n\tpublic void testCalculateConvexHullFromWktGeometryList02() throws ParseException{\n\t\tList<String> wktPolyList = new ArrayList<String>();\n\t\twktPolyList.add(\"POLYGON((138.001 -40.0,139.0 -40.0,200.5 -20.0,138.001 -40.0))\");\n\t\twktPolyList.add(\"POLYGON((138.001 -40.0,136.0 -40.0,200.5 -24.0,138.001 -40.0))\");\n\t\twktPolyList.add(\"POLYGON((138.001 -40.0,132.0 -40.0,200.5 -27.0,138.001 -40.0))\");\n\t\twktPolyList.add(\"POINT(136.001 -30.0)\");\n\t\twktPolyList.add(\"BOOBAR\");\n\t\ttry{\n\t\t\tConvexHullUtil.calculateConvexHullFromWktGeometryList(wktPolyList, false);\n\t\t\tfail();\n\t\t}catch(ParseException pex){\n\t\t\t// success\n\t\t}\n\t}", "public void ComputeBounds( Vec3 min, Vec3 max )\r\n\t{\r\n\t\tfor ( int iTempCount = 1; iTempCount <= 3; iTempCount++ )\r\n\t\t{\r\n\t\t\tVec3 tempPoint = m_vertices[iTempCount];\r\n\t\t\t\r\n\t\t\tif ( tempPoint.xCoord < min.xCoord )\r\n\t\t\t{\r\n\t\t\t\tmin.xCoord = tempPoint.xCoord;\r\n\t\t\t}\r\n\t\t\telse if ( tempPoint.xCoord > max.xCoord )\r\n\t\t\t{\r\n\t\t\t\tmax.xCoord = tempPoint.xCoord;\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tif ( tempPoint.yCoord < min.yCoord )\r\n\t\t\t{\r\n\t\t\t\tmin.yCoord = tempPoint.yCoord;\r\n\t\t\t}\r\n\t\t\telse if ( tempPoint.yCoord > max.yCoord )\r\n\t\t\t{\r\n\t\t\t\tmax.yCoord = tempPoint.yCoord;\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tif ( tempPoint.zCoord < min.zCoord )\r\n\t\t\t{\r\n\t\t\t\tmin.zCoord = tempPoint.zCoord;\r\n\t\t\t}\r\n\t\t\telse if ( tempPoint.zCoord > max.zCoord )\r\n\t\t\t{\r\n\t\t\t\tmax.zCoord = tempPoint.zCoord;\r\n\t\t\t}\t\t\t\r\n\t\t}\t\t\r\n\t}", "public MPolygon computeVertex_xyz(FOV f) {\r\n\r\n\t\tMPolygon mpolygon = new MPolygon();\r\n\r\n\t\tdouble radian1 = MPolygon.toRadian(450 - (f.getDirection() - f.gethAngle() / 2));\r\n\t\tdouble radian2 = MPolygon.toRadian(450 - (f.getDirection() - f.gethAngle() / 4));\r\n\t\tdouble radian3 = MPolygon.toRadian(450 - (f.getDirection() + f.gethAngle() / 4));\r\n\t\tdouble radian4 = MPolygon.toRadian(450 - (f.getDirection() + f.gethAngle() / 2));\r\n\t\tdouble radianD = MPolygon.toRadian(450 - f.getDirection());\r\n\r\n\t\tMPoint p1 = new MPoint();\r\n\t\tp1.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radian1 * Math.PI / 180));\r\n\t\tp1.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radian1 * Math.PI / 180));\r\n\r\n\t\tMPoint p2 = new MPoint();\r\n\t\tp2.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radian2 * Math.PI / 180));\r\n\t\tp2.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radian2 * Math.PI / 180));\r\n\r\n\t\tMPoint p3 = new MPoint();\r\n\t\tp3.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radian3 * Math.PI / 180));\r\n\t\tp3.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radian3 * Math.PI / 180));\r\n\r\n\t\tMPoint p4 = new MPoint();\r\n\t\tp4.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radian4 * Math.PI / 180));\r\n\t\tp4.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radian4 * Math.PI / 180));\r\n\r\n\t\tMPoint D = new MPoint();\r\n\t\tD.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radianD * Math.PI / 180));\r\n\t\tD.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radianD * Math.PI / 180));\r\n\r\n\t\tMPoint location = new MPoint();\r\n\t\tlocation.x = f.getLatitude();\r\n\t\tlocation.y = f.getLongitude();\r\n\t\tmpolygon.setP1(p1);\r\n\t\tmpolygon.setP2(p2);\r\n\t\tmpolygon.setP3(p2);\r\n\t\tmpolygon.setP4(p4);\r\n\t\tmpolygon.setD(D);\r\n\t\tmpolygon.setLocation(location);\r\n\r\n\t\treturn mpolygon;\r\n\r\n\t}", "public Point3(double x_, double y_, double z_) {\n x = x_; y = y_; z = z_;\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Unesite koordinatu prve tacke x1: \");\r\n\t\tdouble x1=provjera();\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite koordinatu prve tacke y1: \");\r\n\t\tdouble y1=provjera();\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite koordinatu druge tacke x2: \");\r\n\t\tdouble x2=provjera();\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite koordinatu druge tacke y2: \");\r\n\t\tdouble y2=provjera();\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite koordinatu trece tacke x3: \");\r\n\t\tdouble x3=provjera();\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite koordinatu trece tacke y3: \");\r\n\t\tdouble y3=provjera();\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite koordinatu cetvrte tacke x4: \");\r\n\t\tdouble x4=provjera();\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite koordinatu cetvrte tacke x4: \");\r\n\t\tdouble y4=provjera();\r\n\t\t\r\n\t\t//kreiranje objekata\r\n\t\tLinearEquation linear= LinearEquation.getIntersectingPoint(x1, y1, x2, y2, x3, y3, x4, y4);\r\n\t\t\r\n\t\t//ispis rezultata\r\n\t\tif(linear.isSolvable()){\r\n\t\t\tSystem.out.print(\"Presjek dvije prave je u tacki sa koordinatama x=\" + linear.getX()+ \" i y=\" + linear.getY());\r\n\t\t}else{\r\n\t\t\tSystem.out.print(\"Prave su paralelne!!!\");\r\n\t\t}\r\n\t\t\r\n\t\tunos.close();\r\n\t}", "public void setVertices(float x0, float y0, float z0,\n float x1, float y1, float z1,\n float x2, float y2, float z2) {\n x_array[0] = x0;\n x_array[1] = x1;\n x_array[2] = x2;\n \n y_array[0] = y0;\n y_array[1] = y1;\n y_array[2] = y2;\n \n z_array[0] = z0;\n z_array[1] = z1;\n z_array[2] = z2;\n }", "private void setGeometryData() {\n // allocate vertices\n final int factorK = (innerRadius == 0 ? 1 : 2);\n final int verts = factorK * ((zSamples - 2) * (radialSamples) + 2); // rs + 1\n setVertexCoordsSize (verts);\n setNormalCoordsSize (verts);\n\n // generate geometry\n final double fInvRS = 1.0 / (radialSamples);\n final double fZFactor = 1.0 / (zSamples - 1); // 2.0 / (zSamples - 1);\n\n // Generate points on the unit circle to be used in computing the mesh\n // points on a sphere slice.\n final double[] afSin = new double[(radialSamples + 1)];\n final double[] afCos = new double[(radialSamples + 1)];\n for ( int iR = 0; iR < radialSamples; iR++ ) {\n final double fAngle = phi0 + dPhi * fInvRS * iR;\n afCos[iR] = Math.cos (fAngle);\n afSin[iR] = Math.sin (fAngle);\n }\n // afSin[radialSamples] = afSin[0];\n // afCos[radialSamples] = afCos[0];\n\n double radDiff = Math.abs (outerRadius - innerRadius);\n\n for ( int icnt = 0; icnt < 2; icnt++ ) {\n radius = (icnt == 0 ? innerRadius : outerRadius);\n if ( radius == 0.0 ) {\n continue;\n }\n double zNP = centerZ; // 0.0;\n double zSP = centerZ; // 0.0;\n\n // generate the sphere itself\n int i = 0;\n Vector3D tempVa;\n Vector3D kSliceCenter;\n\n for ( int iZ = 1; iZ < (zSamples - 1); iZ++ ) { // -1\n //final double fAFraction = 0.5 * Math.PI * (-1.0f + fZFactor * iZ); // in (-pi/2, pi/2)\n final double fAFraction = theta1 - iZ * fZFactor * dTheta;\n final double fZFraction = Math.sin (fAFraction); // in (-1,1)\n final double fZ = radius * fZFraction;\n\n // compute center of slice\n kSliceCenter = new Vector3D (\n center.getX (),\n center.getY (),\n center.getZ () + fZ\n );\n\n // compute radius of slice\n final double fSliceRadius = Math.sqrt (\n Math.abs (\n radius * radius - fZ * fZ\n )\n );\n\n // compute slice vertices with duplication at end point\n Vector3D kNormal;\n final int iSave = i;\n for ( int iR = 0; iR < radialSamples; iR++ ) {\n final double fRadialFraction = iR * fInvRS; // in [0,1)\n final Vector3D kRadial = new Vector3D (\n afCos[iR],\n afSin[iR],\n 0\n );\n tempVa = new Vector3D (\n fSliceRadius * kRadial.getX (),\n fSliceRadius * kRadial.getY (),\n fSliceRadius * kRadial.getZ ()\n );\n\n zNP = Math.\n max (kSliceCenter.getZ (), zNP);\n zSP = Math.\n min (kSliceCenter.getZ (), zSP);\n\n putVertex (\n (kSliceCenter.getX () + tempVa.getX ()),\n (kSliceCenter.getY () + tempVa.getY ()),\n (kSliceCenter.getZ () + tempVa.getZ ())\n );\n tempVa = getVertexCoord (i);\n\n kNormal = new Vector3D (\n tempVa.getX () - center.getX (),\n tempVa.getY () - center.getY (),\n tempVa.getZ () - center.getZ ()\n );\n double mag = Math.sqrt (\n Math.pow (kNormal.getX (), 2) +\n Math.pow (kNormal.getY (), 2) +\n Math.pow (kNormal.getZ (), 2)\n );\n kNormal = new Vector3D (\n kNormal.getX () / mag,\n kNormal.getY () / mag,\n kNormal.getZ () / mag\n );\n if ( !viewInside ) {\n putNormal (\n kNormal.getX (),\n kNormal.getY (),\n kNormal.getZ ()\n );\n } else {\n putNormal (\n -kNormal.getX (),\n -kNormal.getY (),\n -kNormal.getZ ()\n );\n }\n i++;\n }\n\n// setVertexCoord(i, getVertexCoord(iSave));\n// setNormalCoord(i, getNormalCoord(iSave));\n putVertex (getVertexCoord (iSave));\n putNormal (getNormalCoord (iSave));\n i++;\n }\n\n // south pole\n if ( theta0 == -0.5 * Math.PI ) {\n putVertex (new Vector3D (\n center.getX (),\n center.getY (),\n (center.getZ () - radius)\n ));\n setVertexCount (i + 1);\n if ( !viewInside ) {\n putNormal (new Vector3D (0, 0, -1));\n } else {\n putNormal (new Vector3D (0, 0, 1));\n }\n setNormalCount (i + 1);\n i++;\n }\n\n // north pole\n if ( theta1 == 0.5 * Math.PI ) {\n putVertex (new Vector3D (\n center.getX (),\n center.getY (),\n center.getZ () + radius\n ));\n setVertexCount (i + 1);\n if ( !viewInside ) {\n putNormal (new Vector3D (0, 0, 1));\n } else {\n putNormal (new Vector3D (0, 0, -1));\n }\n setNormalCount (i + 1);\n i++;\n }\n }\n\n }", "public static void test1() {\n int n1 = 100, n2 = 100, n3 = 100;\n float v = 1.0f, d = 20.0f;\n float[][][] paint = new float[n3][n2][n1];\n /*\n for (int i3=0; i3<n3; ++i3) {\n for (int i2=0; i2<n2; ++i2) {\n for (int i1=0; i1<n1; ++i1) {\n if (i3<n3/2) cae.paint[i3][i2][i1] = 1.0f;\n }\n }\n }\n */\n Painting3Group p3g = new Painting3Group(paint);\n SphereBrush pb = new SphereBrush();\n Painting3 p3 = p3g.getPainting3();\n// p3.paintAt(50,60,50,v,d,pb);\n// p3.paintAt(50,50,50,v,d,pb);\n// p3.paintAt(50,50,50,v,d,pb);\n p3.paintAt(50,50,50,v,d,pb);\n Contour c = p3.getContour(v);\n\n SimpleFrame sf = new SimpleFrame();\n sf.setTitle(\"Formation\");\n World world = sf.getWorld();\n TriangleGroup tg = new TriangleGroup(c.i,c.x);\n world.addChild(tg);\n sf.setSize(1250,900);\n }", "private static void addTriangle(Hull3f sphere, Point3f p1, Point3f p2,\n Point3f p3, float resolution) {\n if ((p1.distance(p2) < resolution) || (p2.distance(p3) < resolution) || (p3.distance(p1) < resolution)) {\n Triangle3f t;\n t = new Triangle3f(p1, p2, p3);\n sphere.getTriangles().add(t);\n } else {\n Point3f p12;\n p12 = new Point3f(p1);\n p12.add(p2);\n Point3fLogic.normalize(p12);\n Point3f p23;\n p23 = new Point3f(p2);\n p23.add(p3);\n Point3fLogic.normalize(p23);\n Point3f p31;\n p31 = new Point3f(p3);\n p31.add(p1);\n Point3fLogic.normalize(p31);\n addTriangle(sphere, p1, p12, p31, resolution);\n addTriangle(sphere, p2, p23, p12, resolution);\n addTriangle(sphere, p3, p31, p23, resolution);\n addTriangle(sphere, p12, p23, p31, resolution);\n }\n }", "protected void boxOfMortys() {\n Triple pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, col1, col2, col3, col4;\n\n pos1 = new Triple(-10, -10, 0);\n pos2 = new Triple(110, -10, 0);\n pos3 = new Triple(110, -10, 120);\n pos4 = new Triple(-10, -10, 120);\n pos5 = new Triple(-10, 110, 0);\n pos6 = new Triple(110, 110, 0);\n pos7 = new Triple(110, 110, 120);\n pos8 = new Triple(-10, 110, 120);\n\n // Front Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos2, 1, 0),\n new Vertex(pos3, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos3, 1, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 22 ) );\n\n // Left Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos5, 1, 0),\n new Vertex(pos8, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos8, 1, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 22 ) );\n\n // Right Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos2, 0, 0),\n new Vertex(pos6, 1, 0),\n new Vertex(pos7, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1),\n new Vertex(pos3, 0, 1),\n new Vertex(pos2, 0, 0),\n 22 ) );\n\n // Back Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos5, 0, 0),\n new Vertex(pos6, 1, 0),\n new Vertex(pos7, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1),\n new Vertex(pos8, 0, 1),\n new Vertex(pos5, 0, 0),\n 22 ) );\n\n // Top Triangles\n// frozenSoups.addTri( new Triangle(new Vertex(pos4, 0, 0),\n// new Vertex(pos3, 0, 1),\n// new Vertex(pos7, 1, 1),\n// 20 ) );\n\n// frozenSoups.addTri( new Triangle(new Vertex(pos7, 0, 0),\n// new Vertex(pos8, 1, 0),\n// new Vertex(pos4, 1, 1),\n// 20 ) );\n }", "private void generateCube() {\n\t\tverts = new Vector[] {new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3)};\n\t\tverts[0].setElement(0, -1);\n\t\tverts[0].setElement(1, -1);\n\t\tverts[0].setElement(2, -1);\n\t\t\n\t\tverts[1].setElement(0, 1);\n\t\tverts[1].setElement(1, -1);\n\t\tverts[1].setElement(2, -1);\n\t\t\n\t\tverts[2].setElement(0, -1);\n\t\tverts[2].setElement(1, -1);\n\t\tverts[2].setElement(2, 1);\n\t\t\n\t\tverts[3].setElement(0, 1);\n\t\tverts[3].setElement(1, -1);\n\t\tverts[3].setElement(2, 1);\n\t\t\n\t\tverts[4].setElement(0, -1);\n\t\tverts[4].setElement(1, 1);\n\t\tverts[4].setElement(2, -1);\n\t\t\n\t\tverts[5].setElement(0, 1);\n\t\tverts[5].setElement(1, 1);\n\t\tverts[5].setElement(2, -1);\n\t\t\n\t\tverts[6].setElement(0, -1);\n\t\tverts[6].setElement(1, 1);\n\t\tverts[6].setElement(2, 1);\n\t\t\n\t\tverts[7].setElement(0, 1);\n\t\tverts[7].setElement(1, 1);\n\t\tverts[7].setElement(2, 1);\n\t\t\n\t\tfaces = new int[][] {{0, 3, 2}, {0, 1, 3}, {0, 4, 5}, {0, 5, 1}, {0, 2, 6}, {0, 6, 4}, {2, 7, 6}, {2, 3, 7}, {3, 1, 5}, {3, 5, 7}, {4, 7, 5}, {4, 6, 7}}; // List the vertices of each face by index in verts. Vertices must be listed in clockwise order from outside of the shape so that the faces pointing away from the camera can be culled or shaded differently\n\t}", "public void recenter()\n {\n PointF center = centroid();\n\n for (PointF point : points)\n {\n point.x -= center.x;\n point.y -= center.y;\n }\n }", "private PointList center(PointList T, double radius){\n\t\t\n\t\tPointList centers = new PointList(Color.PINK);\n\t\tPoint[] extrema = new Point[4];\n\t\tPoint currentCenter;\n\t\t\n\t\tdouble xLength;\n\t\tdouble yLength;\n\t\tdouble xStart;\n\t\tdouble xEnd;\n\t\tdouble yStart;\n\t\tdouble yEnd;\n\t\t\n\t\textrema = T.getExtremePoints();\n\t\t\n\t\tif (extrema[0] == null) return centers; // centers is empty\n\t\t\n\t\tif (radius < T.delta()) return centers; // centers is empty\n\t\t\n\t\t// find X coordinates\n\t\tcurrentCenter = new Point(extrema[0].posX + radius, extrema[0].posY);\n\t\tif (currentCenter.posX + radius == extrema[1].posX) {\n\t\t\t// current x position is only possible x position\n\t\t\txStart = currentCenter.posX;\n\t\t\txEnd = xStart;\n\t\t\t\n\t\t} else {\n\t\t\t// we can move in x direction\n\t\t\txLength = Math.abs(currentCenter.posX + radius - extrema[1].posX);\n\t\t\txStart = currentCenter.posX - xLength;\n\t\t\txEnd = currentCenter.posX;\n\t\t}\n\n\t\t// find Y coordinates\n\t\tcurrentCenter = new Point(extrema[2].posX, extrema[2].posY + radius);\n\t\tif (currentCenter.posY + radius == extrema[3].posY) {\n\t\t\t// current y position is only possible y position\n\t\t\tyStart = currentCenter.posY;\n\t\t\tyEnd = yStart;\n\t\t} else {\n\t\t\t// we can move in y direction\n\t\t\tyLength = Math.abs(currentCenter.posY + radius - extrema[3].posY);\n\t\t\tyStart = currentCenter.posY - yLength;\n\t\t\tyEnd = currentCenter.posY;\n\t\t}\n\t\t\n\t\tcenters.addPoint(new Point(xStart, yStart));\n\t\tif (!centers.contains(new Point(xStart, yEnd))){\n\t\t\tcenters.addPoint(new Point(xStart, yEnd));\n\t\t}\n\t\tif (!centers.contains(new Point(xEnd, yStart))){\n\t\t\tcenters.addPoint(new Point(xEnd, yStart));\n\t\t}\n\t\tif (!centers.contains(new Point(xEnd, yEnd))){\n\t\t\tcenters.addPoint(new Point(xEnd, yEnd));\n\t\t}\n\t\t\n\t\treturn centers;\n\t\n\t}", "public static void main(String args[])\r\n\t{\n\t\tThreeDGeometry obj=new ThreeDGeometry();\r\n\t\t obj.calculateSquireArea(2);\r\n\t\t obj.calculateRectangleArea(20, 30);\r\n\t\t obj.calculateCubeArea(2);\r\n\t\t\t\t\t obj.calculateCuboid(2,3,4);\r\n\t\t\r\n\t}", "public Point3D(double x,double y,double z)\n {\n _x=x;\n _y=y;\n _z=z;\n }", "static void createCubes(double width, double height) {\n \t\r\n \tmaxY=f(startingBound);\r\n \tmaxX=startingBound;\r\n \t\r\n \t//need a function to find the max\r\n \tfor(double i=startingBound; i<=endingBound; i=i+dx) {\r\n \t\tif(f(i)>maxY)\r\n \t\t\tmaxY=f(i);\r\n \t\t\r\n \t\tif(i>maxX)\r\n \t\t\tmaxX=i;\r\n \t}\r\n \tdouble size=height/2-100;\r\n \tSystem.out.println(size);\r\n \tscaleY=maxY/(size);\r\n \tscaleX=(width-100)/maxX;\r\n \t\r\n \tfor(double x=startingBound; x<=endingBound; x=x+dx) {\r\n \t\t//System.out.println(x+\", \"+f(x));\r\n \t\tcubes.add(new Cube(x*scaleX, -f(x)/scaleY, 0, f(x)/scaleY, dx*scaleX));\r\n \t\t//cubes.add(new Cube(x, 100, 0, 100, 100));\r\n \t}\r\n \t\r\n \t\r\n }", "private void obtainRefiningPoints(ArrayList<double[]> points2d_in, Matrix P, double gridSize_in, int gridCount_in[], ArrayList<double[]> points2d_out, ArrayList<double[]> points3d_out) {\n\t\tdouble fuzziness = 25;\n\t\tfor (int x = (gridCount_in[0] > 1 ? 1 : 0); x < gridCount_in[0]; x += 2) {\n\t\t\tfor (int y = (gridCount_in[1] > 1 ? 1 : 0); y < gridCount_in[1]; y += 2) {\n\t\t\t\tfor (int z = 1; z < gridCount_in[2]; z += 2) {\n\t\t\t\t\tMatrix x3D = new Matrix(4, 1);\n\t\t\t\t\tx3D.set(0, 0, x * gridSize_in);\n\t\t\t\t\tx3D.set(1, 0, y * gridSize_in);\n\t\t\t\t\tx3D.set(2, 0, z * gridSize_in);\n\t\t\t\t\tx3D.set(3, 0, 1.0);\n\t\t\t\t\tMatrix x2D = P.mul(x3D);\n\t\t\t\t\tx2D = x2D.div(x2D.get(2));\n\t\t\t\t\tdouble minDistance = 100000;\n\t\t\t\t\tint minDistanceIndex = 0;\n\t\t\t\t\tfor (int j=0;j<points2d_in.size();j++) {\n\t\t\t\t\t\tdouble distance = Math.pow(x2D.get(0) - points2d_in.get(j)[0], 2) + Math.pow(x2D.get(1) - points2d_in.get(j)[1], 2);\n\t\t\t\t\t\tif (distance < minDistance) {\n\t\t\t\t\t\t\tminDistance = distance;\n\t\t\t\t\t\t\tminDistanceIndex = j;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (minDistance < fuzziness) {\n\t\t\t\t\t\tpoints2d_out.add(points2d_in.get(minDistanceIndex));\n\t\t\t\t\t\tpoints3d_out.add(new Matrix(x3D).data);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static Vect3 makeXYZ(double x, String ux, double y, String uy, double z, String uz) {\n\t\treturn new Vect3(Units.from(ux,x),Units.from(uy,y),Units.from(uz,z));\n\t}", "public static BoundingBox calculateBoundingBox(Vector3D[] paramArrayOfVector3D)\r\n/* 13: */ {\r\n/* 14: 9 */ Vector3D localVector3D1 = new Vector3D();\r\n/* 15: 10 */ for (int i = 0; i < paramArrayOfVector3D.length; i++)\r\n/* 16: */ {\r\n/* 17: 12 */ localVector3D1.x += paramArrayOfVector3D[i].x;\r\n/* 18: 13 */ localVector3D1.y += paramArrayOfVector3D[i].y;\r\n/* 19: 14 */ localVector3D1.z += paramArrayOfVector3D[i].z;\r\n/* 20: */ }\r\n/* 21: 16 */ localVector3D1.x /= paramArrayOfVector3D.length;\r\n/* 22: 17 */ localVector3D1.y /= paramArrayOfVector3D.length;\r\n/* 23: 18 */ localVector3D1.z /= paramArrayOfVector3D.length;\r\n/* 24: 19 */ float[][] arrayOfFloat = new float[3][3];\r\n/* 25: 20 */ for (int j = 0; j < paramArrayOfVector3D.length; j++)\r\n/* 26: */ {\r\n/* 27: 22 */ float f1 = paramArrayOfVector3D[j].x - localVector3D1.x;\r\n/* 28: 23 */ float f2 = paramArrayOfVector3D[j].y - localVector3D1.y;\r\n/* 29: 24 */ float f3 = paramArrayOfVector3D[j].z - localVector3D1.z;\r\n/* 30: 25 */ arrayOfFloat[0][0] += f1 * f1;\r\n/* 31: 26 */ arrayOfFloat[1][1] += f2 * f2;\r\n/* 32: 27 */ arrayOfFloat[2][2] += f3 * f3;\r\n/* 33: 28 */ arrayOfFloat[0][1] += f1 * f2;\r\n/* 34: 29 */ arrayOfFloat[0][2] += f1 * f3;\r\n/* 35: 30 */ arrayOfFloat[1][2] += f2 * f3;\r\n/* 36: */ }\r\n/* 37: 32 */ arrayOfFloat[1][2] /= paramArrayOfVector3D.length;\r\n/* 38: 33 */ arrayOfFloat[2][1] = arrayOfFloat[1][2];\r\n/* 39: 34 */ arrayOfFloat[0][2] /= paramArrayOfVector3D.length;\r\n/* 40: 35 */ arrayOfFloat[2][0] = arrayOfFloat[0][2];\r\n/* 41: 36 */ arrayOfFloat[0][1] /= paramArrayOfVector3D.length;\r\n/* 42: 37 */ arrayOfFloat[1][0] = arrayOfFloat[0][1];\r\n/* 43: 38 */ arrayOfFloat[1][1] /= paramArrayOfVector3D.length;\r\n/* 44: 39 */ arrayOfFloat[2][2] /= paramArrayOfVector3D.length;\r\n/* 45: 40 */ arrayOfFloat[0][0] /= paramArrayOfVector3D.length;\r\n/* 46: 41 */ System.out.println(arrayOfFloat[0][0] + \"\\t\" + arrayOfFloat[0][1] + \"\\t\" + arrayOfFloat[0][2] + \"\\t\");\r\n/* 47: 42 */ System.out.println(arrayOfFloat[1][0] + \"\\t\" + arrayOfFloat[1][1] + \"\\t\" + arrayOfFloat[1][2] + \"\\t\");\r\n/* 48: 43 */ System.out.println(arrayOfFloat[2][0] + \"\\t\" + arrayOfFloat[2][1] + \"\\t\" + arrayOfFloat[2][2] + \"\\t\");\r\n/* 49: 44 */ double[][] arrayOfDouble1 = new double[3][3];\r\n/* 50: 45 */ for (int k = 0; k < 3; k++) {\r\n/* 51: 47 */ for (int m = 0; m < 3; m++) {\r\n/* 52: 49 */ arrayOfDouble1[k][m] = arrayOfFloat[k][m];\r\n/* 53: */ }\r\n/* 54: */ }\r\n/* 55: 52 */ Matrix localMatrix1 = new Matrix(arrayOfDouble1);\r\n/* 56: 53 */ EigenvalueDecomposition localEigenvalueDecomposition = localMatrix1.eig();\r\n/* 57: 54 */ Matrix localMatrix2 = localEigenvalueDecomposition.getV();\r\n/* 58: 55 */ double[][] arrayOfDouble2 = localMatrix2.getArray();\r\n/* 59: 56 */ Vector3D localVector3D2 = new Vector3D((float)arrayOfDouble2[0][0], (float)arrayOfDouble2[1][0], (float)arrayOfDouble2[2][0]);\r\n/* 60: 57 */ Vector3D localVector3D3 = new Vector3D(-(float)arrayOfDouble2[0][1], -(float)arrayOfDouble2[1][1], -(float)arrayOfDouble2[2][1]);\r\n/* 61: 58 */ Vector3D localVector3D4 = new Vector3D(-(float)arrayOfDouble2[0][2], -(float)arrayOfDouble2[1][2], -(float)arrayOfDouble2[2][2]);\r\n/* 62: 59 */ System.out.println(\"r=\" + localVector3D4);\r\n/* 63: 60 */ System.out.println(\"s=\" + localVector3D3);\r\n/* 64: 61 */ System.out.println(\"t=\" + localVector3D2);\r\n/* 65: 62 */ float f4 = 0.0F;\r\n/* 66: 63 */ float f5 = 0.0F;\r\n/* 67: 64 */ float f6 = 0.0F;\r\n/* 68: 65 */ float f7 = 0.0F;\r\n/* 69: 66 */ float f8 = 0.0F;\r\n/* 70: 67 */ float f9 = 0.0F;\r\n/* 71: 68 */ for (int n = 0; n < paramArrayOfVector3D.length; n++)\r\n/* 72: */ {\r\n/* 73: 70 */ float f10 = paramArrayOfVector3D[n].dotProduct(localVector3D4);\r\n/* 74: 71 */ float f11 = paramArrayOfVector3D[n].dotProduct(localVector3D4);\r\n/* 75: 72 */ float f12 = paramArrayOfVector3D[n].dotProduct(localVector3D4);\r\n/* 76: 73 */ f4 = Math.min(f4, f10);\r\n/* 77: 74 */ f5 = Math.min(f5, f11);\r\n/* 78: 75 */ f6 = Math.min(f6, f12);\r\n/* 79: 76 */ f7 = Math.max(f7, f10);\r\n/* 80: 77 */ f8 = Math.max(f8, f11);\r\n/* 81: 78 */ f9 = Math.max(f9, f12);\r\n/* 82: */ }\r\n/* 83: 80 */ float[] arrayOfFloat1 = { localVector3D4.x, localVector3D4.y, localVector3D4.z, -f4 };\r\n/* 84: 81 */ float[] arrayOfFloat2 = { -localVector3D4.x, -localVector3D4.y, -localVector3D4.z, f7 };\r\n/* 85: 82 */ float[] arrayOfFloat3 = { localVector3D2.x, localVector3D2.y, localVector3D2.z, -f6 };\r\n/* 86: 83 */ float[] arrayOfFloat4 = { -localVector3D2.x, -localVector3D2.y, -localVector3D2.z, f9 };\r\n/* 87: 84 */ float[] arrayOfFloat5 = { localVector3D3.x, localVector3D3.y, localVector3D3.z, -f5 };\r\n/* 88: 85 */ float[] arrayOfFloat6 = { -localVector3D3.x, -localVector3D3.y, -localVector3D3.z, f8 };\r\n/* 89: 86 */ return new BoundingBox(arrayOfFloat1, arrayOfFloat2, arrayOfFloat3, arrayOfFloat4, arrayOfFloat5, arrayOfFloat6);\r\n/* 90: */ }", "public void buildHexes(){\n\t\t// Normal hexes\n\t\tHexLocation loc1 = new HexLocation(0, -2);\n\t\tTerrainHex hex1 = new TerrainHex(loc1, HexType.WOOD, 11);\n\t\thexes.put(loc1, hex1);\n\n\t\tHexLocation loc2 = new HexLocation(1, -2);\n\t\tTerrainHex hex2 = new TerrainHex(loc2, HexType.SHEEP, 12);\n\t\thexes.put(loc2, hex2);\n\t\t\n\t\tHexLocation loc3 = new HexLocation(2, -2);\n\t\tTerrainHex hex3 = new TerrainHex(loc3, HexType.WHEAT, 9);\n\t\thexes.put(loc3, hex3);\n\t\t\n\t\tHexLocation loc4 = new HexLocation(-1, -1);\n\t\tTerrainHex hex4 = new TerrainHex(loc4, HexType.BRICK, 4);\n\t\thexes.put(loc4, hex4);\n\t\t\n\t\tHexLocation loc5 = new HexLocation(0, -1);\n\t\tTerrainHex hex5 = new TerrainHex(loc5, HexType.ORE, 6);\n\t\thexes.put(loc5, hex5);\n\t\t\n\t\tHexLocation loc6 = new HexLocation(1, -1);\n\t\tTerrainHex hex6 = new TerrainHex(loc6, HexType.BRICK, 5);\n\t\thexes.put(loc6, hex6);\n\t\t\n\t\tHexLocation loc7 = new HexLocation(2, -1);\n\t\tTerrainHex hex7 = new TerrainHex(loc7,HexType.SHEEP, 10);\n\t\thexes.put(loc7, hex7);\n\t\t\n\t\tHexLocation loc8 = new HexLocation(-2, 0);\n\t\tTerrainHex hex8 = new TerrainHex(loc8, HexType.DESERT, 0);\n\t\thexes.put(loc8, hex8);\n\t\t\n\t\tHexLocation loc9 = new HexLocation(-1, 0);\n\t\tTerrainHex hex9 = new TerrainHex(loc9, HexType.WOOD, 3);\n\t\thexes.put(loc9, hex9);\n\t\t\n\t\tHexLocation loc10 = new HexLocation(0, 0);\n\t\tTerrainHex hex10 = new TerrainHex(loc10, HexType.WHEAT, 11);\n\t\thexes.put(loc10, hex10);\n\t\t\n\t\tHexLocation loc11 = new HexLocation(1, 0);\n\t\tTerrainHex hex11 = new TerrainHex(loc11, HexType.WOOD, 4);\n\t\thexes.put(loc11, hex11);\n\t\t\n\t\tHexLocation loc12 = new HexLocation(2, 0);\n\t\tTerrainHex hex12 = new TerrainHex(loc12, HexType.WHEAT, 8);\n\t\thexes.put(loc12, hex12);\n\t\t\n\t\tHexLocation loc13 = new HexLocation(-2, 1);\n\t\tTerrainHex hex13 = new TerrainHex(loc13, HexType.BRICK, 8);\n\t\thexes.put(loc13, hex13);\n\t\t\n\t\tHexLocation loc14 = new HexLocation(-1, 1);\n\t\tTerrainHex hex14 = new TerrainHex(loc14, HexType.SHEEP, 10);\n\t\thexes.put(loc14, hex14);\n\t\t\n\t\tHexLocation loc15 = new HexLocation(0, 1);\n\t\tTerrainHex hex15 = new TerrainHex(loc15, HexType.SHEEP, 9);\n\t\thexes.put(loc15, hex15);\n\t\t\n\t\tHexLocation loc16 = new HexLocation(1, 1);\n\t\tTerrainHex hex16 = new TerrainHex(loc16, HexType.ORE, 3);\n\t\thexes.put(loc16, hex16);\n\t\t\n\t\tHexLocation loc17 = new HexLocation(-2, 2);\n\t\tTerrainHex hex17 = new TerrainHex(loc17, HexType.ORE, 5);\n\t\thexes.put(loc17, hex17);\n\t\t\n\t\tHexLocation loc18 = new HexLocation(-1, 2);\n\t\tTerrainHex hex18 = new TerrainHex(loc18, HexType.WHEAT, 2);\n\t\thexes.put(loc18, hex18);\n\t\t\n\t\tHexLocation loc19 = new HexLocation(0, 2);\n\t\tTerrainHex hex19 = new TerrainHex(loc19, HexType.WOOD, 6);\n\t\thexes.put(loc19, hex19);\n\n\n\t\t\n\t}", "public void fitContentInBounds(boolean z, boolean z2, boolean z3, boolean z4) {\n float f;\n if (this.state != null) {\n float cropWidth = this.areaView.getCropWidth();\n float cropHeight = this.areaView.getCropHeight();\n float access$2200 = this.state.getOrientedWidth();\n float access$2300 = this.state.getOrientedHeight();\n float access$2500 = this.state.getRotation();\n float radians = (float) Math.toRadians((double) access$2500);\n RectF calculateBoundingBox = calculateBoundingBox(cropWidth, cropHeight, access$2500);\n RectF rectF = new RectF(0.0f, 0.0f, access$2200, access$2300);\n float access$2100 = this.state.getScale();\n this.tempRect.setRect(rectF);\n Matrix access$2600 = this.state.getMatrix();\n access$2600.preTranslate(((cropWidth - access$2200) / 2.0f) / access$2100, ((cropHeight - access$2300) / 2.0f) / access$2100);\n this.tempMatrix.reset();\n this.tempMatrix.setTranslate(rectF.centerX(), rectF.centerY());\n Matrix matrix = this.tempMatrix;\n matrix.setConcat(matrix, access$2600);\n this.tempMatrix.preTranslate(-rectF.centerX(), -rectF.centerY());\n this.tempRect.applyMatrix(this.tempMatrix);\n this.tempMatrix.reset();\n this.tempMatrix.preRotate(-access$2500, access$2200 / 2.0f, access$2300 / 2.0f);\n this.tempRect.applyMatrix(this.tempMatrix);\n this.tempRect.getRect(rectF);\n PointF pointF = new PointF(this.state.getX(), this.state.getY());\n if (!rectF.contains(calculateBoundingBox)) {\n f = (!z || (calculateBoundingBox.width() <= rectF.width() && calculateBoundingBox.height() <= rectF.height())) ? access$2100 : fitScale(rectF, access$2100, calculateBoundingBox.width() / scaleWidthToMaxSize(calculateBoundingBox, rectF));\n fitTranslation(rectF, calculateBoundingBox, pointF, radians);\n } else if (!z2 || this.rotationStartScale <= 0.0f) {\n f = access$2100;\n } else {\n float width = calculateBoundingBox.width() / scaleWidthToMaxSize(calculateBoundingBox, rectF);\n if (this.state.getScale() * width < this.rotationStartScale) {\n width = 1.0f;\n }\n f = fitScale(rectF, access$2100, width);\n fitTranslation(rectF, calculateBoundingBox, pointF, radians);\n }\n float access$2700 = pointF.x - this.state.getX();\n float access$2800 = pointF.y - this.state.getY();\n if (z3) {\n float f2 = f / access$2100;\n if (Math.abs(f2 - 1.0f) >= 1.0E-5f || Math.abs(access$2700) >= 1.0E-5f || Math.abs(access$2800) >= 1.0E-5f) {\n this.animating = true;\n ValueAnimator ofFloat = ValueAnimator.ofFloat(new float[]{0.0f, 1.0f});\n ofFloat.addUpdateListener(new CropView$$ExternalSyntheticLambda0(this, access$2700, new float[]{1.0f, 0.0f, 0.0f}, access$2800, f2));\n final boolean z5 = z4;\n final boolean z6 = z;\n final boolean z7 = z2;\n final boolean z8 = z3;\n ofFloat.addListener(new AnimatorListenerAdapter() {\n public void onAnimationEnd(Animator animator) {\n boolean unused = CropView.this.animating = false;\n if (!z5) {\n CropView.this.fitContentInBounds(z6, z7, z8, true);\n }\n }\n });\n ofFloat.setInterpolator(this.areaView.getInterpolator());\n ofFloat.setDuration(z4 ? 100 : 200);\n ofFloat.start();\n return;\n }\n return;\n }\n this.state.translate(access$2700, access$2800);\n this.state.scale(f / access$2100, 0.0f, 0.0f);\n updateMatrix();\n }\n }", "private static LatLng getCenterOfPolygon(List<LatLng> latLngList) {\n double[] centroid = {0.0, 0.0};\n for (int i = 0; i < latLngList.size(); i++) {\n centroid[0] += latLngList.get(i).latitude;\n centroid[1] += latLngList.get(i).longitude;\n }\n int totalPoints = latLngList.size();\n return new LatLng(centroid[0] / totalPoints, centroid[1] / totalPoints);\n }", "static double DistancePointPlane(double x, double y, double z, double a, double b, double c, double d) {\r\n\t\treturn Math.abs(a * x + b * y + c * z - d) / Math.sqrt(a * a + b * b + c * c);\r\n\t}", "private ArrayList<Vertex> getProjectedVertices4(){\n\t\t\n\t\tArrayList<Vertex> projectedVertices = new ArrayList<>(); // To store the projection of each vertex\n\t\t\n\t\t// Transform each vertex from world coordinates to eye coordinates\n\t\tfor(Vertex v : vertices){\n\t\t\tprojectedVertices.add(v.transform4());\n\t\t}\n\t\t\n\t\tfor(Vertex v : projectedVertices){\n\n\t\t\t// Get perspective projection onto 3D region\n\t\t\tVertex projection = v.perspectiveProjection4();\n\t\t\tv.setX(projection.getX());\n\t\t\tv.setY(projection.getY());\n\t\t\tv.setZ(projection.getZ());\n\t\t\t\n\t\t\t// Map to viewbox\n\t\t\tprojection = v.mapToViewbox();\n\t\t\tv.setX(projection.getX());\n\t\t\tv.setY(projection.getY());\n\t\t\tv.setZ(projection.getZ());\n\t\t}\n\t\t\n\t\treturn projectedVertices;\n\t}", "public void runAlgorithm(PointList customers, int highwayLength, int velocity) {\n\t\t\n\t\tif (!customers.isEmpty()){\n\t\t\tthis._highwayLength = highwayLength;\n\t\t\tthis._velocity = velocity;\n\t\t\t_maxDist = customers.maxDist();\n\t\t\t\n\t\t\t// for drawing purposes only\n\t\t\tfacilityPoints = new ArrayList<Point>();\n\t\t\tturnpikePoints = new ArrayList<Point>();\n\t\t\tpartitionRadius = new ArrayList<Double>();\n\t\t\t\n\t\t\tset_withTurnpike = new ArrayList<PointList>();\n\t\t\tset_withoutTurnpike = new ArrayList<PointList>();\n\t\t\textremePoints1 = new ArrayList<Point[]>();\n\t\t\textremePoints2 = new ArrayList<Point[]>();\n\t\t\tlist_centersWithoutTurnpike = new ArrayList<PointList>();\n\t\t\tlist_centersWithTurnpike = new ArrayList<PointList>();\n\t\t\t\n\t\t\tgetPartition(customers);\n\t\t\t\n\t\t\tmaxDist1 = new ArrayList<Point>();\n\t\t\tmaxDist2 = new ArrayList<Point>();\n\t\t\tminDist1 = new ArrayList<Point>();\n\t\t\tminDist2 = new ArrayList<Point>();\n\t\t\t\n\t\t\t// compute extreme points\n\t\t\tfor (PointList p : set_withTurnpike){\n\t\t\t\textremePoints1.add(p.getExtremePoints());\n\t\t\t}\n\t\t\tfor (PointList p : set_withoutTurnpike){\n\t\t\t\textremePoints2.add(p.getExtremePoints());\n\t\t\t}\n\t\t\t\n\t\t\t// solve basic problem for all partitions {W,H}\n\t\t\tfor (int i = 0; i < set_withTurnpike.size(); i++){\n\n\t\t\t\t_eps1 = Math.max(0, set_withTurnpike.get(i).delta() + highwayLength/velocity - set_withoutTurnpike.get(i).delta());\n\t\t\t\t_eps2 = Math.max(0, set_withoutTurnpike.get(i).delta() - set_withTurnpike.get(i).delta() - highwayLength/velocity);\n\n\t\t\t\tsolveBP(set_withTurnpike.get(i), set_withoutTurnpike.get(i)); \n\t\t\t\tfacilityPoints.add(_currentFacility);\n\t\t\t\tturnpikePoints.add(_currentTurnpikeStart);\n\t\t\t\tpartitionRadius.add(_currentRadius);\n\t\t\t\t\n\t\t\t\t// for drawing purposes\n\t\t\t\t// fixed length\n\t\t\t\tlist_centersWithoutTurnpike.add(center(set_withTurnpike.get(i), set_withTurnpike.get(i).delta() + _eps2 + _x));\n\t\t\t\tlist_centersWithTurnpike.add(center(set_withoutTurnpike.get(i), set_withoutTurnpike.get(i).delta() + _eps1 + _x));\n\t\t\t\t\n\t\t\t\tif (list_centersWithoutTurnpike.get(i).objectContains\n\t\t\t\t\t\t(list_centersWithoutTurnpike.get(i).objectMinDistPoints(list_centersWithTurnpike.get(i))[0])\n\t\t\t\t\t\t|| list_centersWithTurnpike.get(i).objectContains\n\t\t\t\t\t\t(list_centersWithoutTurnpike.get(i).objectMinDistPoints(list_centersWithTurnpike.get(i))[1])){\n\t\t\t\t\tminDist1.add(list_centersWithoutTurnpike.get(i).objectMinDistPoints(list_centersWithTurnpike.get(i))[0]); \n\t\t\t\t\tminDist2.add(list_centersWithoutTurnpike.get(i).objectMinDistPoints(list_centersWithTurnpike.get(i))[1]);\n\t\t\t\t} else {\n\t\t\t\t\tminDist1.add(list_centersWithoutTurnpike.get(i).objectMinDistPoints(list_centersWithTurnpike.get(i))[1]); \n\t\t\t\t\tminDist2.add(list_centersWithoutTurnpike.get(i).objectMinDistPoints(list_centersWithTurnpike.get(i))[0]);\n\t\t\t\t}\n\t\t\t\tmaxDist1.add(list_centersWithoutTurnpike.get(i).objectMaxDistPoints(list_centersWithTurnpike.get(i))[0]); \n\t\t\t\tmaxDist2.add(list_centersWithoutTurnpike.get(i).objectMaxDistPoints(list_centersWithTurnpike.get(i))[1]);\n\t\t\t}\t\n\t\t\t\n\t\t\tif(customers.getSize() > 1){\n\t\t\t\t// find optimal solution\n\t\t\t\tsolutionIndex = getMinRadiusIndex(); \n\t\t\t\tsolution_facility = facilityPoints.get(solutionIndex);\n\t\t\t\tsolution_turnpikeStart = turnpikePoints.get(solutionIndex);\n//\t\t\t\tsolution_radius = partitionRadius.get(solutionIndex);\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public void setCentroids(int n, double lower, double upper);", "public static Vect3 mkXYZ(double x, double y, double z) {\n\t\treturn new Vect3(x,y,z);\n\t}", "public Vector3(double x, double y,double z){\n \n double pytago;\n \n this.x = x;\n this.y = y;\n this.z = z;\n \n pytago = (x*x) + (y*y) + (z*z);\n \n magnitude = Math.sqrt(pytago);\n }", "public void updateFlags(int fromx, int tox, int fromy, int toy, int fromz, int toz)\n {\n VoxelOctree voxels = obj.getVoxels();\n if (width != voxels.getWidth()-1)\n {\n initialize();\n return;\n }\n findBounds();\n byte cornerValues[] = new byte[8];\n if (fromx < 0)\n fromx = 0;\n if (fromy < 0)\n fromy = 0;\n if (fromz < 0)\n fromz = 0;\n if (tox >= width)\n tox = width-1;\n if (toy >= width)\n toy = width-1;\n if (toz >= width)\n toz = width-1;\n int ysize = toy-fromy+3;\n int zsize = toz-fromz+3;\n\n // Look up the values for the x==fromx plane.\n\n byte values[][] = new byte[2][ysize*zsize];\n for (int j = 0; j < ysize; j++)\n for (int k = 0; k < zsize; k++)\n values[0][j*zsize+k] = voxels.getValue(fromx, j+fromy, k+fromz);\n for (int i = fromx; i <= tox; i++)\n {\n // Look up the values for the next plane.\n\n for (int j = 0; j < ysize; j++)\n for (int k = 0; k < zsize; k++)\n values[1][j*zsize+k] = voxels.getValue(i+1, j+fromy, k+fromz);\n for (int j = fromy; j <= toy; j++)\n {\n for (int k = fromz; k <= toz; k++)\n {\n int numBelow = 0;\n int numZero = 0;\n for (int corner = 0; corner < 8; corner++)\n {\n // Record the values at the four corners of this cell, and see how many are outside.\n\n cornerValues[corner] = values[vertexOffset[corner][0]][(j-fromy+vertexOffset[corner][1])*zsize+k-fromz+vertexOffset[corner][2]];\n if (cornerValues[corner] < 0)\n numBelow++;\n else if (cornerValues[corner] == 0)\n numZero++;\n }\n int index = i*width*width+j*width+k;\n if ((numBelow != 0 && numBelow != 8) || numZero > 0)\n flags[index/32] |= 1<<(index%32);\n else\n flags[index/32] &= 0xFFFFFFFF-(1<<(index%32));\n }\n }\n\n // Swap the value arrays so the values for x==i+1 will be in values[0].\n\n byte temp[] = values[0];\n values[0] = values[1];\n values[1] = temp;\n }\n }", "@Test\n\tpublic void testCalculateConvexHullFromWktGeometryList01() throws ParseException{\n\t\tList<String> wktPolyList = new ArrayList<String>();\n\t\twktPolyList.add(\"POLYGON((138.001 -40.0,139.0 -40.0,200.5 -20.0,138.001 -40.0))\");\n\t\twktPolyList.add(\"POLYGON((138.001 -40.0,136.0 -40.0,200.5 -24.0,138.001 -40.0))\");\n\t\twktPolyList.add(\"POLYGON((138.001 -40.0,132.0 -40.0,200.5 -27.0,138.001 -40.0))\");\n\t\twktPolyList.add(\"POINT(136.001 -30.0)\");\n\t\tString result = ConvexHullUtil.calculateConvexHullFromWktGeometryList(wktPolyList, false);\n\t\tassertThat(result, is(\"POLYGON ((132 -40, 136.001 -30, 200.5 -20, 200.5 -27, 138.001 -40, 139 -40, 132 -40))\"));\n\t}", "Point3D (double x, double y, double z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "public Point3F(float x, float y, float z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }", "private static void setEllipsoid(final Cell3D[] aCells, final ImageStack aInputStack, final int[] aLables, final double[] aResol)\r\n\t{\r\n\t\tfinal double[][] ellipsoids = GeometricMeasures3D.inertiaEllipsoid(aInputStack, aLables, aResol);\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.ELLIPSOID_CENTER_X, ellipsoids[i][0]);\r\n\t\t\taCells[i].getNucleus().getMeasurements().setMeasurement(SegmentMeasurements.ELLIPSOID_CENTER_Y, ellipsoids[i][1]);\r\n\t\t\taCells[i].getNucleus().getMeasurements().setMeasurement(SegmentMeasurements.ELLIPSOID_CENTER_Z, ellipsoids[i][2]);\r\n\t\t\taCells[i].getNucleus().getMeasurements().setMeasurement(SegmentMeasurements.ELLIPSOID_RADIUS_1, ellipsoids[i][3]);\r\n\t\t\taCells[i].getNucleus().getMeasurements().setMeasurement(SegmentMeasurements.ELLIPSOID_RADIUS_2, ellipsoids[i][4]);\r\n\t\t\taCells[i].getNucleus().getMeasurements().setMeasurement(SegmentMeasurements.ELLIPSOID_RADIUS_3, ellipsoids[i][5]);\r\n\t\t\taCells[i].getNucleus().getMeasurements().setMeasurement(SegmentMeasurements.ELLIPSOID_RADIUS_AZIMUT, ellipsoids[i][6]);\r\n\t\t\taCells[i].getNucleus().getMeasurements().setMeasurement(SegmentMeasurements.ELLIPSOID_RADIUS_ELEVATION, ellipsoids[i][7]);\r\n\t\t\taCells[i].getNucleus().getMeasurements().setMeasurement(SegmentMeasurements.ELLIPSOID_RADIUS_ROLL, ellipsoids[i][8]);\r\n\t\t}\r\n\t}", "private static Collection<Point> relocate(Collection<Point> centers,\n\t\t\tCollection<Point> points) {\n\t\tCollection<Point> result = new HashSet<Point>();\n\t\tfor(Point c : centers){\n\t\t\tint sumX = 0;\n\t\t\tint sumY = 0;\n\t\t\tint count = 0;\n\t\t\tfor(Point p : points){\n\t\t\t\tif(p.getColor() == c.getColor()){\n\t\t\t\t\tsumX += p.getX();\n\t\t\t\t\tsumY += p.getY();\n\t\t\t\t\tcount ++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tPoint newCenter = new Point(0,0);\n\t\t\tif(count == 0){\n\t\t\t\tnewCenter.setX(c.getX());\n\t\t\t\tnewCenter.setY(c.getY());\n\t\t\t} else {\n\t\t\t\tnewCenter.setY((int)Math.round(sumY * 1.0 / count));\n\t\t\t\tnewCenter.setX((int)Math.round(sumX * 1.0 / count));\n\t\t\t}\n\t\t\t\n\t\t\tnewCenter.setColor(c.getColor());\n\t\t\tresult.add(newCenter);\n\t\t}\t\n\t\treturn result;\n\t}", "public static void main(String[] args) throws FileNotFoundException\n {\n File file = new File(System.getProperty(\"user.home\") + \"/Desktop\", \"lion.off\");\n Scanner s = new Scanner(file);\n s.nextLine(); // Skip first line of context\n\n // Create result file(mesh2C.off)\n try { fileManager.CreateResultFile(); }\n catch(IOException exc) { System.out.println(\"Error: \" + exc.getMessage()); }\n \n // Initializing PrintWriter instance for writing data to result file\n PrintWriter pw = new PrintWriter(System.getProperty(\"user.home\") + \"/Desktop/mesh2C.off\");\n pw.println(\"OFF\"); // Write first line to mesh2C.off\n\n // Get number of vertices which lion.off has\n String str_num_of_vertices = s.next();\n String str_num_of_faces = s.next();\n int num_of_vertices = Integer.parseInt(str_num_of_vertices);\n int num_of_faces = Integer.parseInt(str_num_of_faces);\n pw.println(Integer.toString(num_of_vertices + 8) + \" \" + Integer.toString(num_of_faces + 6) + s.nextLine());\n\n // Extract max and min value of each axis(X, Y, Z) separately\n double minX = 0, maxX = 0;\n double minY = 0, maxY = 0;\n double minZ = 0, maxZ = 0;\n\n for(int i = 0; i < num_of_vertices; i++)\n {\n double x = Double.parseDouble(s.next());\n if(x < minX) { minX = x; }\n if(x > maxX) { maxX = x; }\n double y = Double.parseDouble(s.next());\n if(y < minY) { minY = y; }\n if(y > maxY) { maxY = y; }\n double z = Double.parseDouble(s.next());\n if(z < minZ) { minZ = z; }\n if(z > maxZ) { maxZ = z; }\n\n String tmp = Double.toString(x) + \" \" + Double.toString(y) + \" \" + Double.toString(z);\n pw.println(tmp); \n }\n\n // Calculate and create String arrays for Vertices and faces\n String vStr[] = new String[8];\n String fStr[] = new String[6];\n\n vStr[0] = Double.toString(minX) + \" \" + Double.toString(maxY) + \" \" + Double.toString(maxZ);\n vStr[1] = Double.toString(minX) + \" \" + Double.toString(minY) + \" \" + Double.toString(maxZ);\n vStr[2] = Double.toString(maxX) + \" \" + Double.toString(minY) + \" \" + Double.toString(maxZ);\n vStr[3] = Double.toString(maxX) + \" \" + Double.toString(maxY) + \" \" + Double.toString(maxZ);\n vStr[4] = Double.toString(minX) + \" \" + Double.toString(maxY) + \" \" + Double.toString(minZ);\n vStr[5] = Double.toString(minX) + \" \" + Double.toString(minY) + \" \" + Double.toString(minZ);\n vStr[6] = Double.toString(maxX) + \" \" + Double.toString(minY) + \" \" + Double.toString(minZ);\n vStr[7] = Double.toString(maxX) + \" \" + Double.toString(maxY) + \" \" + Double.toString(minZ);\n\n for(int i = 0; i < 8; i++) { pw.println(vStr[i]); }\n \n // Calculate face list and write into result file\n String id_quad_1 = Integer.toString(num_of_vertices);\n String id_quad_2 = Integer.toString(num_of_vertices + 1);\n String id_quad_3 = Integer.toString(num_of_vertices + 2);\n String id_quad_4 = Integer.toString(num_of_vertices + 3);\n String id_quad_5 = Integer.toString(num_of_vertices + 4);\n String id_quad_6 = Integer.toString(num_of_vertices + 5);\n String id_quad_7 = Integer.toString(num_of_vertices + 6);\n String id_quad_8 = Integer.toString(num_of_vertices + 7);\n\n fStr[0] = \"4 \" + id_quad_1 + \" \" + id_quad_4 + \" \" + id_quad_3 + \" \" + id_quad_2;\n fStr[1] = \"4 \" + id_quad_5 + \" \" + id_quad_6 + \" \" + id_quad_7 + \" \" + id_quad_8;\n fStr[2] = \"4 \" + id_quad_1 + \" \" + id_quad_5 + \" \" + id_quad_8 + \" \" + id_quad_4;\n fStr[3] = \"4 \" + id_quad_3 + \" \" + id_quad_7 + \" \" + id_quad_6 + \" \" + id_quad_2;\n fStr[4] = \"4 \" + id_quad_2 + \" \" + id_quad_6 + \" \" + id_quad_5 + \" \" + id_quad_1;\n fStr[5] = \"4 \" + id_quad_4 + \" \" + id_quad_8 + \" \" + id_quad_7 + \" \" + id_quad_3;\n\n // Copy face data from original lion.off file to result file\n s.nextLine();\n for(int i = 0; i < num_of_faces; i++) { pw.println(s.nextLine()); }\n \n // Add new face data at the bottom of result file\n for(int i = 0; i < 6; i++) { pw.println(fStr[i]); }\n\n // Terminate filestream\n s.close();\n pw.close();\n }", "public static BoundingPolytope computePolytope(double[] points)\n\t{\n\t\tBoundingPolytope frustum = new BoundingPolytope();\n\t\t\n\t\tVector3d a1 = new Vector3d(points[0],points[1],points[2]);\n\t\tVector3d a2 = new Vector3d(points[4],points[5],points[6]);\n\t\tVector3d b1 = new Vector3d(points[8],points[9],points[10]);\n\t\tVector3d b2 = new Vector3d(points[12],points[13],points[14]);\n\t\tVector3d c1 = new Vector3d(points[16],points[17],points[18]);\n\t\tVector3d c2 = new Vector3d(points[20],points[21],points[22]);\n\t\tVector3d d1 = new Vector3d(points[24],points[25],points[26]);\n\t\tVector3d d2 = new Vector3d(points[28],points[29],points[30]);\n\t\t\n\t\t\n\t\tVector4d[] planes = new Vector4d[] {\n\t\tcomputePlane(a1,b1,a2),\n\t\tcomputePlane(d1,c1,d2),\n\t\tcomputePlane(b1,d1,b2),\n\t\tcomputePlane(c1,a1,c2),\n\t\tcomputePlane(c1,d1,a1),\n\t\tcomputePlane(d2,c2,b2),\n\t\t};\n\t\t\n\t\tfrustum.setPlanes(planes);\n\t\t\n\t\treturn frustum;\n\t}", "public void makeSatellite(float radius, int radialDivisions,\n\t\t\tint heightDivisions) {\n\t\tif (radialDivisions < 3)\n\t\t\tradialDivisions = 3;\n\n\t\tif (heightDivisions < 1)\n\t\t\theightDivisions = 1;\n\n\t\tif (heightDivisions > 65)\n\t\t\theightDivisions = 65;\n\n\t\tif (radialDivisions > 65)\n\t\t\tradialDivisions = 65;\n\t//\tSystem.out.println(radialDivisions + \" \" + heightDivisions);\n\n\t\tfloat theta = (float) (2 * Math.PI / radialDivisions);\n\t\tfloat refy = 0.5f;\n\t\tfloat nxty = 1f / heightDivisions;\n\n\t\t// coordinates for the triangle formation\n\t\tfloat x1 = 0;\n\t\tfloat y1 = 0;\n\t\tfloat z1 = 0;\n\t\tfloat x2 = 0;\n\t\tfloat y2 = 0;\n\t\tfloat z2 = 0;\n\t\tfloat x3 = 0;\n\t\tfloat y3 = 0;\n\t\tfloat z3 = 0;\n\t\tfor (int rD = 0; rD < radialDivisions; rD++) {\n\t\t\t//defining coordinates of first point\n\t\t\tx1 = 0f;\n\t\t\ty1 = refy;\n\t\t\tz1 = 0f;\n\t\t\t//defining coordinates of second point\n\t\t\tx2 = (float) (radius * Math.cos(theta * rD));\n\t\t\ty2 = y1;\n\t\t\tz2 = -(float) (radius * Math.sin(theta * rD));\n\t\t\t//defining coordinates of third point\n\t\t\tx3 = (float) (radius * Math.cos(theta * (rD + 1)));\n\t\t\ty3 = y1;\n\t\t\tz3 = -(float) (radius * Math.sin(theta * (rD + 1)));\n\n\t\t\t// tesselation for bottom circle\n\t\t\taddTriangle(x1, y1, z1, 0.0f, 0.0f, x2, y2, z2, 0.0f, 0.0f, x3, y3, z3, 0.0f, 0.0f);\n\n\t\t\ty1 = -y1;\n\n\t\t\tx2 = (float) (radius * Math.cos(theta * (rD + 1)));\n\t\t\ty2 = y1;\n\t\t\tz2 = -(float) (radius * Math.sin(theta * (rD + 1)));\n\n\t\t\tx3 = (float) (radius * Math.cos(theta * (rD)));\n\t\t\ty3 = y1;\n\t\t\tz3 = -(float) (radius * Math.sin(theta * (rD)));\n\n\t\t\t// tesselation for top circle\n\t\t\taddTriangle(x1, y1, z1, 0.0f, 0.0f, x2, y2, z2, 0.0f, 0.0f, x3, y3, z3, 0.0f, 0.0f);\n\n\t\t\ttesselationForCylinder(radius, heightDivisions, theta, refy, nxty,\n\t\t\t\t\trD);\n\t\t}\n\t\t\n\t}" ]
[ "0.630383", "0.5971842", "0.580069", "0.5650278", "0.5597909", "0.55904746", "0.55815196", "0.55289495", "0.5432824", "0.5385637", "0.53590703", "0.5329171", "0.53197193", "0.53052104", "0.5288904", "0.5171441", "0.5144451", "0.5127124", "0.51098853", "0.5101343", "0.509302", "0.5079208", "0.507405", "0.5070054", "0.5068549", "0.5060971", "0.50431293", "0.50373447", "0.50180566", "0.5015609", "0.5012866", "0.50101185", "0.49863812", "0.4983704", "0.4983223", "0.4975874", "0.49717742", "0.49412456", "0.492749", "0.49092138", "0.4893706", "0.48912215", "0.48869127", "0.48263943", "0.4825847", "0.48202068", "0.48144144", "0.4812895", "0.48105806", "0.47877276", "0.478234", "0.47818968", "0.47757864", "0.47625256", "0.47588137", "0.47495627", "0.47478038", "0.47421968", "0.47408634", "0.4729839", "0.47128692", "0.4712028", "0.47075593", "0.47023636", "0.4700097", "0.46864468", "0.4682397", "0.46793985", "0.46792465", "0.46742332", "0.46617076", "0.46588367", "0.46511418", "0.46493378", "0.4647642", "0.46425453", "0.46392107", "0.4635933", "0.4630604", "0.46295658", "0.4629126", "0.46281615", "0.46253687", "0.462105", "0.4619115", "0.46178737", "0.46150598", "0.4614769", "0.4613859", "0.46134534", "0.46128502", "0.460444", "0.46036583", "0.46032318", "0.4598261", "0.4596014", "0.45844465", "0.45800593", "0.45777017", "0.45775488" ]
0.55289876
7
Binary search for a rotation angle along the specified axis to match the target area. 3D rotation formulas courtesy of
private static boolean searchRotationAngle(Point3d[] centers, int axis, double maxAngle, double targetArea) { Point3d[] origCenters = new Point3d[3]; for (int i = 0; i < centers.length; i++) origCenters[i] = new Point3d(centers[i].x, centers[i].y, centers[i].z); double from = 0; double to = maxAngle; while (true) { double mid = (from + to) / 2; switch (axis) { case 0: for (int i = 0; i < centers.length; i++) { centers[i] = new Point3d( origCenters[i].x, origCenters[i].y * Math.cos(mid) - origCenters[i].z * Math.sin(mid), origCenters[i].y * Math.sin(mid) + origCenters[i].z * Math.cos(mid)); } break; case 1: for (int i = 0; i < centers.length; i++) { centers[i] = new Point3d( origCenters[i].x * Math.cos(mid) - origCenters[i].z * Math.sin(mid), origCenters[i].y, origCenters[i].x * Math.sin(mid) + origCenters[i].z * Math.cos(mid)); } break; case 2: for (int i = 0; i < centers.length; i++) { centers[i] = new Point3d( origCenters[i].x * Math.cos(mid) - origCenters[i].y * Math.sin(mid), origCenters[i].x * Math.sin(mid) + origCenters[i].y * Math.cos(mid), origCenters[i].z); } break; default: throw new IllegalStateException(); } double currentArea = computeArea(centers); if (Math.abs(currentArea - targetArea) < 1E-6) { System.err.println("Angle (degrees): " + (mid * 180.0 / Math.PI) + " on axis " + axis + " computer area: " + currentArea + " from " + from + " to " + to); return true; } else if (currentArea < targetArea) { if (from >= to - 1E-7) return false; from = mid; } else { to = mid; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private float findRotation()\r\n\t{\r\n\t\t//conditionals for all quadrants and axis\r\n\t\tif(tarX > 0 && tarY > 0)\r\n\t\t{\r\n\t\t\trotation = (float) Math.atan((tarY/tarX));\r\n\t\t\trotation = (float) ((rotation*180)/Math.PI);\r\n\t\t}\r\n\t\telse if(tarX < 0 && tarY > 0)\r\n\t\t{\r\n\t\t\trotation = (float) Math.atan((tarY/tarX));\r\n\t\t\trotation = (float) ((rotation*180)/Math.PI);\r\n\t\t\trotation = 180 - Math.abs(rotation);\r\n\t\t}\r\n\t\telse if(tarX < 0 && tarY < 0)\r\n\t\t{\r\n\t\t\trotation = (float) Math.atan((tarY/tarX));\r\n\t\t\trotation = (float) ((rotation*180)/Math.PI);\r\n\t\t\trotation = 180 + Math.abs(rotation);\r\n\t\t}\r\n\t\telse if(tarX > 0 && tarY < 0)\r\n\t\t{\r\n\t\t\trotation = (float) Math.atan((tarY/tarX));\r\n\t\t\trotation = (float) ((rotation*180)/Math.PI);\r\n\t\t\trotation = 90 - Math.abs(rotation);\r\n\t\t\trotation = 270 + rotation;\r\n\t\t}\r\n\t\telse if(tarX > 0 && tarY == 0)\r\n\t\t\trotation = 0;\r\n\t\telse if(tarX == 0 && tarY > 0)\r\n\t\t\trotation = 90;\r\n\t\telse if(tarX < 0 && tarY == 0)\r\n\t\t\trotation = 180;\r\n\t\telse if(tarX == 0 && tarY < 0)\r\n\t\t\trotation = 270;\r\n\t\t\r\n\t\treturn (rotation - 90);\r\n\t}", "public int searchRot(int[] nums, int targ) {\n //Find pivot\n int lo = 0;\n int hi = nums.length - 1;\n while (lo < hi) {\n int mid = (lo + hi) / 2;\n if (nums[mid] > nums[hi]) {\n lo = mid + 1;\n } else {\n hi = mid;\n }\n }\n\n int piv = lo;\n lo = 0;\n hi = nums.length - 1;\n while (lo < hi) {\n int mid = (lo + hi) / 2;\n int realMid = (mid + piv) % nums.length;\n if (nums[realMid] == targ) {\n return realMid;\n } else if (nums[realMid] > targ) {\n hi = mid - 1;\n } else {\n lo = mid + 1;\n }\n }\n\n return -1;\n}", "public static native double OpenMM_AmoebaInPlaneAngleForce_getAmoebaGlobalInPlaneAnglePentic(PointerByReference target);", "public static native int OpenMM_AmoebaInPlaneAngleForce_getNumAngles(PointerByReference target);", "public abstract int getIndexForAngle(float paramFloat);", "public static native double OpenMM_AmoebaInPlaneAngleForce_getAmoebaGlobalInPlaneAngleSextic(PointerByReference target);", "public static Point PointRotate3D(final Point origin, final Point toRotate, final Vector rotationAxis, final float angle) { \n Vector axis = (rotationAxis.magnitude() == 1) ? rotationAxis : rotationAxis.normal();\n float dist = sqrt(sq(axis.y) + sq(axis.z)); \n Matrix T = new Matrix(new double[][]{\n new double[] {1, 0, 0, -origin.x},\n new double[] {0, 1, 0, -origin.y},\n new double[] {0, 0, 1, -origin.z},\n new double[] {0, 0, 0, 1},\n });\n Matrix TInv = T.inverse();\n\n float aZ = (axis.z == 0 && dist == 0) ? 0 : (axis.z / dist);\n float aY = (axis.y == 0 && dist == 0) ? 0 : (axis.y / dist);\n Matrix Rx = new Matrix(new double[][]{\n new double[] {1, 0, 0, 0},\n new double[] {0, aZ, -aY, 0},\n new double[] {0, aY, aZ, 0},\n new double[] {0, 0, 0, 1},\n });\n\n Matrix RxInv = new Matrix(new double[][]{\n new double[] {1, 0, 0, 0},\n new double[] {0, aZ, aY, 0},\n new double[] {0, -aY, aZ, 0},\n new double[] {0, 0, 0, 1},\n });\n\n Matrix Ry = new Matrix(new double[][]{\n new double[] {dist, 0, -axis.x, 0},\n new double[] {0, 1, 0, 0},\n new double[] {axis.x, 0, dist, 0},\n new double[] {0, 0, 0, 1},\n });\n\n Matrix RyInv = Ry.inverse();\n\n Matrix Rz = new Matrix(new double[][]{\n new double[] {cos(angle), -sin(angle), 0, 0},\n new double[] {sin(angle), cos(angle), 0, 0},\n new double[] {0, 0, 1, 0},\n new double[] {0, 0, 0, 1},\n });\n\n Matrix origSpace = new Matrix(new double[][] {\n new double[]{toRotate.x},\n new double[]{toRotate.y},\n new double[]{toRotate.z},\n new double[]{1}\n });\n Matrix rotated = TInv.times(RxInv).times(RyInv).times(Rz).times(Ry).times(Rx).times(T).times(origSpace);\n\n return new Point((float) rotated.get(0, 0), (float) rotated.get(1, 0), (float) rotated.get(2, 0));\n }", "public static native double OpenMM_AmoebaInPlaneAngleForce_getAmoebaGlobalInPlaneAngleQuartic(PointerByReference target);", "double getRotation(Point2D target, boolean pursuit);", "double adjust_angle_rotation(double angle) {\n double temp;\n temp=angle;\n if(temp>90) {\n temp=180-temp;\n }\n return temp;\n }", "public double\nangleInXYPlane()\n{\n\tBVector2d transPt = new BVector2d(\n\t\tthis.getP2().getX() - this.getP1().getX(),\n\t\tthis.getP2().getY() - this.getP1().getY());\n\t\n\t// debug(\"transPt: \" + transPt);\n\n\tdouble angle = MathDefines.RadToDeg * new Vector2d(1.0, 0.0).angle(transPt);\n\tif (transPt.getY() < 0.0)\n\t{\n\t\t// debug(\"ang0: \" + (360.0 - angle));\n\t\treturn(360.0 - angle);\n\t}\n\t// debug(\"ang1: \" + angle);\n\treturn(angle);\n}", "public static native int OpenMM_AmoebaAngleForce_getNumAngles(PointerByReference target);", "public static native double OpenMM_AmoebaInPlaneAngleForce_getAmoebaGlobalInPlaneAngleCubic(PointerByReference target);", "public static native void OpenMM_AmoebaInPlaneAngleForce_getAngleParameters(PointerByReference target, int index, IntByReference particle1, IntByReference particle2, IntByReference particle3, IntByReference particle4, DoubleByReference length, DoubleByReference quadraticK);", "boolean evolveCurrentAngle() {\n float checkSum = 0;\n for (int i = 0; i < 2; i++) {\n float delta = target_angle[i] - angle[i];\n float sign = 1;\n if (Math.abs(delta) > Math.PI) {\n // go the other way\n boolean isPos = delta > 0;\n sign = -1;\n delta = (float) (2 * Math.PI - Math.abs(delta));\n if (!isPos) delta = -delta;\n }\n angle[i] += sign * 0.1f * delta;\n if (angle[i] > Math.PI) angle[i] = (float) -(2 * Math.PI - angle[i]);\n if (angle[i] < -Math.PI) angle[i] = (float) (2 * Math.PI - angle[i]);\n checkSum += Math.abs(delta);\n }\n\n float delta = target_angle[2] - angle[2];\n float sign = 1;\n if (Math.abs(delta) > Math.PI / 2) {\n // go the other way\n boolean isPos = delta > 0;\n sign = -1;\n delta = (float) (Math.PI - Math.abs(delta));\n if (!isPos) delta = -delta;\n }\n angle[2] += sign * 0.1f * delta;\n if (angle[2] > Math.PI / 2) angle[2] = (float) -(Math.PI - angle[2]);\n if (angle[2] < -Math.PI / 2) angle[2] = (float) (Math.PI - angle[2]);\n checkSum += Math.abs(delta);\n\n if (checkSum < 0.0001) {\n for (int i = 0; i < target_angle.length; i++) {\n angle[i] = target_angle[i];\n }\n return false;\n }\n return true;\n }", "public static native void OpenMM_AmoebaInPlaneAngleForce_getAngleParameters(PointerByReference target, int index, IntBuffer particle1, IntBuffer particle2, IntBuffer particle3, IntBuffer particle4, DoubleBuffer length, DoubleBuffer quadraticK);", "public static native double OpenMM_AmoebaAngleForce_getAmoebaGlobalAnglePentic(PointerByReference target);", "public static native int OpenMM_AmoebaInPlaneAngleForce_addAngle(PointerByReference target, int particle1, int particle2, int particle3, int particle4, double length, double quadraticK);", "public static native long GetRotation(long lpjFbxDualQuaternion);", "private Point extractVectorFromAngle(int arg) {\n double theta = Math.toRadians( 2* (double)arg );\n double dx = Cell.move_dist * Math.cos(theta);\n double dy = Cell.move_dist * Math.sin(theta);\n return new Point(dx, dy);\n }", "public static native double OpenMM_AmoebaAngleForce_getAmoebaGlobalAngleQuartic(PointerByReference target);", "DMatrix3C getOffsetRotation();", "@Override\r\n public double getRotation(double x, double y) {\n if (alignment == Alignment.horizontal || alignment == Alignment.vertical) {\r\n return 0;\r\n }\r\n\r\n // Map to circular alignment\r\n else {\r\n // Bottom line segment\r\n if (x < spaceLength) {\r\n return 0;\r\n }\r\n\r\n // Right half circle\r\n else if (x < spaceLength + spaceCircumference) {\r\n // Length of the arc (from the beginning of the half circle too x)\r\n double arcLength = x - spaceLength;\r\n\r\n // Ratio of the arc length compared to the circumference\r\n double ratio = arcLength / spaceCircumference;\r\n\r\n // Length of the arc in world coordinates\r\n double arcWorldLength = ratio * worldCircumference;\r\n\r\n // Angle of the arc in degrees\r\n return (arcWorldLength * 360) / (2 * Math.PI * radius);\r\n }\r\n\r\n // Top line segment\r\n else if (x < 2 * spaceLength + spaceCircumference) {\r\n return 180;\r\n }\r\n\r\n // Left half circle\r\n else {\r\n // Length of the arc (from the beginning of the half circle too x)\r\n double arcLength = x - (2 * spaceLength - spaceCircumference);\r\n\r\n // Ratio of the arc length compared to the circumference\r\n double ratio = arcLength / spaceCircumference;\r\n\r\n // Length of the arc in world coordinates\r\n double arcWorldLength = ratio * worldCircumference;\r\n\r\n // Angle of the arc in degrees\r\n return (arcWorldLength * 360) / (2 * Math.PI * radius) + 180;\r\n }\r\n }\r\n }", "public static native void OpenMM_AmoebaInPlaneAngleForce_setAmoebaGlobalInPlaneAnglePentic(PointerByReference target, double penticK);", "public void testXAxisRotation() {\n u = 1;\n theta = pi;\n double[] point = new double[] {1, 1, 0};\n RotationMatrix rM = new RotationMatrix(a, b, c, u, v, w, theta);\n double[] result = rM.timesXYZ(point);\n double[] expect = new double[] {1, -1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(expect[i], result[i], TOLERANCE);\n }\n\n theta = -pi;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, -1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/2;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, 0, 1, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = -pi/2;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, 0, -1, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, Math.sqrt(2)/2, Math.sqrt(2)/2, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = -3*pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, -Math.sqrt(2)/2, -Math.sqrt(2)/2, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n u = -1;\n theta = 3*pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {1, -Math.sqrt(2)/2, -Math.sqrt(2)/2, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n }", "public void testYAxisRotation() {\n v = 1;\n theta = 2*pi;\n double[] point = new double[] {1, 1, 0};\n RotationMatrix rM = new RotationMatrix(a, b, c, u, v, w, theta);\n double[] result = rM.timesXYZ(point);\n double[] expect = new double[] {1, 1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(expect[i], result[i], TOLERANCE);\n }\n\n theta = 12*pi;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n //rM.logMatrix();\n result = rM.timesXYZ(point);\n expect = new double[] {1, 1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n //rM.logMatrix();\n result = rM.timesXYZ(point);\n expect = new double[] {-1, 1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/2;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {0, 1, -1, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {Math.sqrt(2)/2, 1, -Math.sqrt(2)/2, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n }", "private static int orientation(Coord p, Coord r, Coord q) \n { \n // See https://www.geeksforgeeks.org/orientation-3-ordered-points/ \n // for details of below formula. \n int val = (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y); \n \n if (val == 0) return 0; // colinear \n \n return (val > 0)? 1: 2; // clock or counterclock wise \n }", "boolean needToAim(double angle);", "private static Point3d[] solve(double targetArea) {\n // First rotate along the z axis, from 0 degrees to 45 degrees for areas from 1 to sqrt(2)\n Point3d[] centers = new Point3d[] {\n new Point3d(0.5, 0, 0),\n new Point3d(0, 0.5, 0),\n new Point3d(0, 0, 0.5)\n };\n if (searchRotationAngle(centers, 2, Math.PI / 4, targetArea)) return centers;\n // For areas greater than sqrt(2), keep the cube rotated by 45 degrees along\n // the z axis and rotate from 0 degrees to ~35.26 degrees along the x axis.\n // The latter angle is the one required to align vertically the top\n // and bottom opposite vertices.\n if (searchRotationAngle(centers, 0, Math.PI / 2 - Math.atan(Math.sqrt(2)), targetArea)) return centers;\n throw new IllegalStateException(\"Unable to find a rotation for target area \" + targetArea);\n }", "protected double findAngleToEnemy(Movable enemy){\n\t\tdouble enemyX = enemy.getX() - x;\n\t\tdouble enemyY = enemy.getY() - y;\n\t\treturn Math.atan2(enemyX, enemyY);\n\t}", "private float calculateAngle() {\r\n\r\n\t\tdouble angleTemp = Math.atan2(Target.getY() - y, Target.getX() - x);\r\n\t\t// I needed to use wikipedia to get this i\r\n\t\t// did not learn this in math and needed\r\n\t\t// to use a couplle youtube tutorials to\r\n\t\t// find out how to do the math in java\r\n\t\t// aswell thank fully one had the exact\r\n\t\t// way of doing this\r\n\t\treturn (float) Math.toDegrees(angleTemp) + 90;\r\n\t}", "public static native void OpenMM_AmoebaAngleForce_getAngleParameters(PointerByReference target, int index, IntBuffer particle1, IntBuffer particle2, IntBuffer particle3, DoubleBuffer length, DoubleBuffer quadraticK);", "int countRotation(int a[]) {\n\t\tint low = 0;\n\t\tint high = a.length - 1;\n\t\tint N = high;\n\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) / 2;\n\t\t\t// array has not been rotated at all\n\t\t\tif (a[low] <= a[high]) {\n\t\t\t\treturn low;\n\t\t\t}\n\t\t\tint next = (mid + 1) % N;\n\t\t\tint prev = (mid + N - 1) % N;\n\t\t\t// We get the pivot point so return index\n\t\t\tif (a[prev] > a[mid] && a[mid] < a[next]) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\t// Ignore the search space which is sorted because pivot point will\n\t\t\t// not lie there\n\t\t\tif (a[low] < a[mid]) {\n\t\t\t\tlow = mid + 1;\n\t\t\t} else /* if (a[mid + 1] < a[high]) */ {\n\t\t\t\thigh = mid - 1;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public static native double OpenMM_AmoebaAngleForce_getAmoebaGlobalAngleSextic(PointerByReference target);", "public static native void OpenMM_AmoebaAngleForce_getAngleParameters(PointerByReference target, int index, IntByReference particle1, IntByReference particle2, IntByReference particle3, DoubleByReference length, DoubleByReference quadraticK);", "Point rotate (double angle, Point result);", "public abstract Vector4fc rotateAbout(float angle, float x, float y, float z);", "public void calculateAngleAndRotate(){\n\t\tdouble cumarea = 0;\n\t\tdouble sina = 0;\n\t\tdouble cosa = 0;\n\t\tdouble area, angle;\n\t\tfor (int n = 0; n < rt.size();n++) {\n\t\t\tarea = rt.getValueAsDouble(rt.getColumnIndex(\"Area\"),n);\n\t\t\tangle = 2*rt.getValueAsDouble(rt.getColumnIndex(\"Angle\"),n);\n\t\t\tsina = sina + area*Math.sin(angle*Math.PI/180);\n\t\t\tcosa = cosa + area*Math.cos(angle*Math.PI/180);\n\t\t\tcumarea = cumarea+area;\n\t\t}\n\t\taverageangle = Math.abs(0.5*(180/Math.PI)*Math.atan2(sina/cumarea,cosa/cumarea)); // this is the area weighted average angle\n\t\t// rotate the data \n\t\tIJ.run(ActiveImage,\"Select All\",\"\");\n\t\tActiveImageConverter.convertToGray32();\n\t\tIJ.run(ActiveImage,\"Macro...\", \"code=[v= x*sin(PI/180*\"+averageangle+\")+y*cos(PI/180*\"+averageangle+\")]\");\n\t\treturn;\n\t}", "protected static double[] rotateVector(double x, double y, double angle) {\r\n\t\tdouble cosA = Math.cos(angle * (3.14159 / 180.0));\r\n\t\tdouble sinA = Math.sin(angle * (3.14159 / 180.0));\r\n\t\tdouble[] out = new double[2];\r\n\t\tout[0] = x * cosA - y * sinA;\r\n\t\tout[1] = x * sinA + y * cosA;\r\n\t\treturn out;\r\n\t}", "public static int binSearchRotatedIter(int src[], int lo, int hi, int target){\n\n while(lo<=hi){\n int mid = lo + (hi-lo)/2;\n if(src[mid]==target) return mid;\n //if bottom half is sorted\n if(src[lo]<=src[mid]){\n \n if(src[lo]<=target && target<src[mid]){\n hi=mid-1;\n }else{\n lo=mid+1;\n }\n }\n //if upper half is sorted\n else{\n if(src[mid]<target && target<=src[hi]){\n lo=mid+1;\n }else{\n hi=mid-1;\n }\n }\n }\n return -1;\n}", "private boolean checkAngle() {\n\t\tint bornes = FILTER_BORNES;\n\t\treturn checkAngleBornes(angle, 0d, bornes) || checkAngleBornes(angle, 90d, bornes) || checkAngleBornes(angle, 180d, bornes);\n\t}", "double getAngle();", "double getAngle();", "public void updateAngle() {\n\t\tfloat ak = 0;\n\t\tfloat gk = 0;\n\t\tak = (float) (pathBoardRectangles.get(curTargetPathCellIndex).getCenterX() - x);\n\t\tgk = (float) (pathBoardRectangles.get(curTargetPathCellIndex).getCenterY() - y);\n\t\tangleDesired = (float) Math.toDegrees(Math.atan2(ak*-1, gk));\n\t\t// if the angle and the angleDesired are opposites the Vector point into the opposite direction\n\t\t// this means the angle will be the angle of the longer vector which is always angle\n\t\t// so if that happens the angleDesired is offset so this won't happen\n\t\tangle = Commons.calculateAngleAfterRotation(angle, angleDesired, rotationDelay);\n\t}", "public double findRotation(Point a, Point b) {\n\t\t// Find rotation in radians using acttan2.\n\t\tdouble rad = Math.atan2(a.y - b.y, a.x - b.x);\n\n\t\t// Remove negative rotation.\n\t\tif (rad < 0) {\n\t\t\trad += 2 * Math.PI;\n\t\t}\n\t\t\n\t\t// Convert the rotation to degrees.\n\t\treturn rad * (180 / Math.PI);\n\t}", "@Test\n public void testFind_East_cross_boundary() {\n\n double lat1 = 0.0;\n double lon1 = 170.0;\n double lat2 = 0.0;\n double lon2 = -170.0;\n double expResult = Math.toRadians(90);\n double result = Azimuth.find(lat1, lon1, lat2, lon2);\n assertEquals(expResult, result, 0.0);\n }", "public static native void OpenMM_AmoebaInPlaneAngleForce_setAngleParameters(PointerByReference target, int index, int particle1, int particle2, int particle3, int particle4, double length, double quadraticK);", "public static native double OpenMM_AmoebaAngleForce_getAmoebaGlobalAngleCubic(PointerByReference target);", "Point rotate (double angle);", "public static native int OpenMM_AmoebaAngleForce_addAngle(PointerByReference target, int particle1, int particle2, int particle3, double length, double quadraticK);", "@Test\n public void testFind_South() {\n\n double lat1 = 0.0;\n double lon1 = 0.0;\n double lat2 = -10.0;\n double lon2 = 0.0;\n double expResult = Math.toRadians(180);\n double result = Azimuth.find(lat1, lon1, lat2, lon2);\n assertEquals(expResult, result, 0.0);\n }", "public void testZAxisRotation() {\n w = 1;\n theta = 2*pi;\n double[] point = new double[] {1, 1, 0};\n RotationMatrix rM = new RotationMatrix(a, b, c, u, v, w, theta);\n double[] result = rM.timesXYZ(point);\n double[] expect = new double[] {1, 1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(expect[i], result[i], TOLERANCE);\n }\n\n theta = pi;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n //rM.logMatrix();\n result = rM.timesXYZ(point);\n expect = new double[] {-1, -1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/2;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n //rM.logMatrix();\n result = rM.timesXYZ(point);\n expect = new double[] {-1, 1, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {0, Math.sqrt(2), 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = 3*pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {-Math.sqrt(2), 0, 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n\n theta = -3*pi/4;\n rM = new RotationMatrix(a, b, c, u, v, w, theta);\n result = rM.timesXYZ(point);\n expect = new double[] {0, -Math.sqrt(2), 0, 1};\n for(int i=0; i<result.length; i++) {\n assertEquals(\"coord: \"+i, expect[i], result[i], TOLERANCE);\n }\n }", "public double getAngle2() {\n\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return (globalAngle);\n\n }", "public void rotate2D(Point3D center, double angle) {\n _x = _x - center.x();\n _y = _y - center.y();\n double a = Math.atan2(_y,_x);\n //\tSystem.out.println(\"Angle: \"+a);\n double radius = Math.sqrt((_x*_x) + (_y*_y));\n _x = (center.x() + radius * Math.cos(a+angle));\n _y = (center.y() + radius * Math.sin(a+angle));\n }", "public int getGimbalPole(float[] quat) {\n float x = quat[0];\n float y = quat[1];\n float z = quat[2];\n float w = quat[3];\n final float t = y * x + z * w;\n return t > 0.499f ? 1 : (t < -0.499f ? -1 : 0);\n }", "public float getAngleForPoint(float x, float y) {\n /* 262 */\n MPPointF c = getCenterOffsets();\n /* */\n /* 264 */\n double tx = (x - c.x), ty = (y - c.y);\n /* 265 */\n double length = Math.sqrt(tx * tx + ty * ty);\n /* 266 */\n double r = Math.acos(ty / length);\n /* */\n /* 268 */\n float angle = (float) Math.toDegrees(r);\n /* */\n /* 270 */\n if (x > c.x) {\n /* 271 */\n angle = 360.0F - angle;\n /* */\n }\n /* */\n /* 274 */\n angle += 90.0F;\n /* */\n /* */\n /* 277 */\n if (angle > 360.0F) {\n /* 278 */\n angle -= 360.0F;\n /* */\n }\n /* 280 */\n MPPointF.recycleInstance(c);\n /* */\n /* 282 */\n return angle;\n /* */\n }", "public double getAngle(float x, float y )\n {\n double dx = x - centerX;\n // Minus to correct for coord re-mapping\n double dy = -(y - centerY);\n\n double inRads = Math.atan2(dy,dx);\n\n // We need to map to coord system when 0 degree is at 3 O'clock, 270 at 12 O'clock\n if (inRads < 0)\n inRads = Math.abs(inRads);\n else\n inRads = 2*Math.PI - inRads;\n\n return Math.toDegrees(inRads);\n }", "public float calculateCelestialAngle(long par1, float par3)\n {\n return 0.5F;\n }", "public AccOrientation calculateAngle(SensorEvent event) {\t\t\n\t final int _DATA_X = 0;\n\t final int _DATA_Y = 1;\n\t final int _DATA_Z = 2;\n\t // Angle around x-axis thats considered almost perfect vertical to hold\n\t // the device\n\t final int PIVOT = 20;\n\t // Angle around x-asis that's considered almost too vertical. Beyond\n\t // this angle will not result in any orientation changes. f phone faces uses,\n\t // the device is leaning backward.\n\t final int PIVOT_UPPER = 65;\n\t // Angle about x-axis that's considered negative vertical. Beyond this\n\t // angle will not result in any orientation changes. If phone faces uses,\n\t // the device is leaning forward.\n\t final int PIVOT_LOWER = -10;\n\t // Upper threshold limit for switching from portrait to landscape\n\t final int PL_UPPER = 295;\n\t // Lower threshold limit for switching from landscape to portrait\n\t final int LP_LOWER = 320;\n\t // Lower threshold limt for switching from portrait to landscape\n\t final int PL_LOWER = 270;\n\t // Upper threshold limit for switching from landscape to portrait\n\t final int LP_UPPER = 359;\n\t // Minimum angle which is considered landscape\n\t final int LANDSCAPE_LOWER = 235;\n\t // Minimum angle which is considered portrait\n\t final int PORTRAIT_LOWER = 60;\n\t \n\t // Internal value used for calculating linear variant\n\t final float PL_LF_UPPER =\n\t ((float)(PL_UPPER-PL_LOWER))/((float)(PIVOT_UPPER-PIVOT));\n\t final float PL_LF_LOWER =\n\t ((float)(PL_UPPER-PL_LOWER))/((float)(PIVOT-PIVOT_LOWER));\n\t // Internal value used for calculating linear variant\n\t final float LP_LF_UPPER =\n\t ((float)(LP_UPPER - LP_LOWER))/((float)(PIVOT_UPPER-PIVOT));\n\t final float LP_LF_LOWER =\n\t ((float)(LP_UPPER - LP_LOWER))/((float)(PIVOT-PIVOT_LOWER));\n\t \n\t int mSensorRotation = -1; \n\t \n\t\t\tfinal boolean VERBOSE = true;\n float[] values = event.values;\n float X = values[_DATA_X];\n float Y = values[_DATA_Y];\n float Z = values[_DATA_Z];\n float OneEightyOverPi = 57.29577957855f;\n float gravity = (float) Math.sqrt(X*X+Y*Y+Z*Z);\n float zyangle = (float)Math.asin(Z/gravity)*OneEightyOverPi;\n int rotation = -1;\n float angle = (float)Math.atan2(Y, -X) * OneEightyOverPi;\n int orientation = 90 - (int)Math.round(angle);\n AccOrientation result = new AccOrientation();\n \n while (orientation >= 360) {\n orientation -= 360;\n } \n while (orientation < 0) {\n orientation += 360;\n }\n result.orientation = orientation;\n result.angle = zyangle; \n result.threshold = 0;\n if ((zyangle <= PIVOT_UPPER) && (zyangle >= PIVOT_LOWER)) {\n // Check orientation only if the phone is flat enough\n // Don't trust the angle if the magnitude is small compared to the y value\n \t/*\n float angle = (float)Math.atan2(Y, -X) * OneEightyOverPi;\n int orientation = 90 - (int)Math.round(angle);\n normalize to 0 - 359 range\n while (orientation >= 360) {\n orientation -= 360;\n } \n while (orientation < 0) {\n orientation += 360;\n }\n mOrientation.setText(String.format(\"Orientation: %d\", orientation));\n */ \n // Orientation values between LANDSCAPE_LOWER and PL_LOWER\n // are considered landscape.\n // Ignore orientation values between 0 and LANDSCAPE_LOWER\n // For orientation values between LP_UPPER and PL_LOWER,\n // the threshold gets set linearly around PIVOT.\n if ((orientation >= PL_LOWER) && (orientation <= LP_UPPER)) {\n float threshold;\n float delta = zyangle - PIVOT;\n if (mSensorRotation == ROTATION_090) {\n if (delta < 0) {\n // Delta is negative\n threshold = LP_LOWER - (LP_LF_LOWER * delta);\n } else {\n threshold = LP_LOWER + (LP_LF_UPPER * delta);\n }\n rotation = (orientation >= threshold) ? ROTATION_000 : ROTATION_090;\n if (mShowLog) \n \tLog.v(TAG, String.format(\"CASE1. %2.4f %d %2.4f %d\", delta, orientation, threshold, rotation));\n } else {\n if (delta < 0) {\n // Delta is negative\n threshold = PL_UPPER+(PL_LF_LOWER * delta);\n } else {\n threshold = PL_UPPER-(PL_LF_UPPER * delta);\n }\n rotation = (orientation <= threshold) ? ROTATION_090: ROTATION_000;\n if (mShowLog)\n \tLog.v(TAG, String.format(\"CASE2. %2.4f %d %2.4f %d\", delta, orientation, threshold, rotation));\n }\n result.threshold = threshold;\n } else if ((orientation >= LANDSCAPE_LOWER) && (orientation < LP_LOWER)) {\n rotation = ROTATION_090;\n if (mShowLog)\n \tLog.v(TAG, String.format(\"CASE3. 90 (%d)\", orientation));\n } else if ((orientation >= PL_UPPER) || (orientation <= PORTRAIT_LOWER)) {\n rotation = ROTATION_000;\n if (mShowLog)\n \tLog.v(TAG, String.format(\"CASE4. 00 (%d)\", orientation)); \n } else {\n \tif (mShowLog)\n \t\tLog.v(TAG, \"CASE5. \"+orientation);\n }\n if ((rotation != -1) && (rotation != mSensorRotation)) {\n mSensorRotation = rotation;\n if (mSensorRotation == ROTATION_000) {\n \t\t//setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n \tif (mShowLog)\n \t\tLog.w(TAG, \"Rotation: 00\");\n }\n else if (mSensorRotation == ROTATION_090) \n {\n \t\t//setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);\n \tif (mShowLog)\n \t\tLog.w(TAG, \"Rotation: 90\");\n } \n }\n result.rotation = rotation;\n } else {\n \t//Log.v(TAG, String.format(\"Invalid Z-Angle: %2.4f (%d %d)\", zyangle, PIVOT_LOWER, PIVOT_UPPER));\n }\t\n return result;\n\t\t}", "@Override\r\n\tpublic void rotateAboutAxis(final double angle, final WB_Point3d p1,\r\n\t\t\tfinal WB_Point3d p2) {\r\n\r\n\t\tfinal WB_Transform raa = new WB_Transform();\r\n\t\traa.addRotateAboutAxis(angle, p1, p2.subToVector(p1));\r\n\r\n\t\traa.applySelf(this);\r\n\r\n\t}", "public double betweenAngle(Coordinates a, Coordinates b, Coordinates origin);", "DMatrix3C getRotation();", "public static int findRotationPoint(String[] words, int beginIndex, int endIndex){\n\t\tif (endIndex - beginIndex == 1){\n\t\t\t// xmin, apple\n\t\t\treturn (words[beginIndex].compareTo(words[endIndex]) > 0) ? beginIndex : -1;\n\t\t}\n\t\tif (endIndex - beginIndex == 2){\n\t\t\tint index = findRotationPoint(words, beginIndex, beginIndex + 1);\n\t\t\tif (index == -1){\n\t\t\t\tindex = findRotationPoint(words, beginIndex + 1, endIndex);\n\t\t\t}\n\t\t\treturn index;\n\t\t}\n\t\t// 3, 4, 5, 6\n\t\tint space = endIndex - beginIndex + 1;\n\t\tspace = space / 3; // 1\n\t\tint mid1 = beginIndex + space; // 1\n\t\tint mid2 = mid1 + space; // 2\n\n\t\tint index;\n\t\t// Found the right section\n\t\tif (words[mid1].compareTo(words[mid2]) > 0){\n\t\t\tindex = findRotationPoint(words, mid1, mid2);\n\t\t}\n\t\telse if (words[beginIndex].compareTo(words[mid1]) > 0){\n\t\t\tindex = findRotationPoint(words, beginIndex, mid1);\n\t\t}\n\t\telse {\n\t\t\t// (words[mid2].compareTo(words[endIndex]) > 0)\n\t\t\tindex = findRotationPoint(words, mid2, endIndex);\n\t\t}\n\t\treturn index;\n\t}", "private float interpolateRotation(float par1, float par2, float par3)\n {\n float f3;\n\n for (f3 = par2 - par1; f3 < -180.0F; f3 += 360.0F)\n {\n ;\n }\n\n while (f3 >= 180.0F)\n {\n f3 -= 360.0F;\n }\n\n return par1 + par3 * f3;\n }", "float calcRotate(float rotateDeg, float anglePerIn)\n {\n return rotateDeg / anglePerIn;\n }", "private double getAngle() {\n // We experimentally determined the Z axis is the axis we want to use for\n // heading angle. We have to process the angle because the imu works in\n // euler angles so the Z axis is returned as 0 to +180 or 0 to -180\n // rolling back to -179 or +179 when rotation passes 180 degrees. We\n // detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC,\n AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }", "public static Vector3f rotate(Vector3f v, Vector3f axis, float angle) {\n\t\tfloat ux = axis.x * v.x;\n\t\tfloat uy = axis.x * v.y;\n\t\tfloat uz = axis.x * v.z;\n\t\tfloat vx = axis.y * v.x;\n\t\tfloat vy = axis.y * v.y;\n\t\tfloat vz = axis.y * v.z;\n\t\tfloat wx = axis.z * v.x;\n\t\tfloat wy = axis.z * v.y;\n\t\tfloat wz = axis.z * v.z;\n\t\tfloat sa = (float) Math.sin(angle);\n\t\tfloat ca = (float) Math.cos(angle);\n\t\tfloat x = axis.x\n\t\t\t\t* (ux + vy + wz)\n\t\t\t\t+ (v.x * (axis.y * axis.y + axis.z * axis.z) - axis.x\n\t\t\t\t\t\t* (vy + wz)) * ca + (-wy + vz) * sa;\n\t\tfloat y = axis.y\n\t\t\t\t* (ux + vy + wz)\n\t\t\t\t+ (v.y * (axis.x * axis.x + axis.z * axis.z) - axis.y\n\t\t\t\t\t\t* (ux + wz)) * ca + (wx - uz) * sa;\n\t\tfloat z = axis.z\n\t\t\t\t* (ux + vy + wz)\n\t\t\t\t+ (v.z * (axis.x * axis.x + axis.y * axis.y) - axis.z\n\t\t\t\t\t\t* (ux + vy)) * ca + (-vx + uy) * sa;\n\n\t\treturn new Vector3f(x, y, z);\n\t}", "@Test\n public void testFind_West_cross_boundary() {\n\n double lat1 = 0.0;\n double lon1 = -170.0;\n double lat2 = 0.0;\n double lon2 = 170.0;\n double expResult = Math.toRadians(270);\n double result = Azimuth.find(lat1, lon1, lat2, lon2);\n assertEquals(expResult, result, 0.0);\n }", "private double getPolarAngle(double refX, double refY, double px, double py) {\n\t\tdouble tethaRadian = -1;\n\t\tif ((px - refX) > 0 && (refY - py) >= 0) {\n\t\t\ttethaRadian = Math.atan((refY - py) / (px - refX));\n\t\t} else if ((px - refX) > 0 && (refY - py) < 0) {\n\t\t\ttethaRadian = Math.atan((refY - py) / (px - refX)) + 2 * Math.PI;\n\t\t} else if ((px - refX) < 0) {\n\t\t\ttethaRadian = Math.atan((refY - py) / (px - refX)) + Math.PI;\n\t\t} else if ((px - refX) == 0 && (refY - py) > 0) {\n\t\t\ttethaRadian = Math.PI / 2;\n\t\t} else if ((px - refX) == 0 && (refY - py) < 0) {\n\t\t\ttethaRadian = 3 * Math.PI / 2;\n\t\t}\n\t\treturn tethaRadian;\n\t}", "int getAxisIndex(final CalibratedAxis axis);", "protected boolean rotate(){\n\t\tif(this.target == null)\n\t\t\treturn false;\n\t\tif(this.target.equals(this.modelPos))\n\t\t\treturn false;\n\t\tfloat tx = modelPos.x - target.x;\n\t\tfloat ty = modelPos.y - target.y;\n\t\tfloat angle = (float) Math.toDegrees(Math.atan(Math.abs(ty / tx)));\n\t\tangle = 180 + Math.signum(tx) * 90 + Math.signum(tx) * Math.signum(ty)\n\t\t\t\t* angle;\n\t\tangle = (float) Math.round(angle * 10) / 10;\n\t\tif(this.modelAngle.z == angle)\n\t\t\treturn false;\n\t\tfloat tmp = this.modelAngle.z - angle;\n\t\tif(Math.abs(tmp) < rotDelta){\n\t\t\tthis.modelAngle.z = angle;\n\t\t\treturn false;\n\t\t}else\n\t\t\tthis.modelAngle.z += (Math.abs(tmp) > 180 ? 1.0f : -1.0f)\n\t\t\t\t\t* Math.signum(tmp) * rotDelta;\n\t\tif(this.modelAngle.z > 360.0f)\n\t\t\tthis.modelAngle.z %= 360.0f;\n\t\telse if(this.modelAngle.z < 0.0f)\n\t\t\tthis.modelAngle.z = 360.0f - this.modelAngle.z;\n\t\treturn true;\n\t}", "void getAngles(double[] values);", "private double getAngle() {\n double normal= Math.sqrt(((getgAxis(ADXL345_I2C.Axes.kX))*(getgAxis(ADXL345_I2C.Axes.kX)))+((getgAxis(ADXL345_I2C.Axes.kY))*(getgAxis(ADXL345_I2C.Axes.kY))));\n\n return MathUtils.atan(normal / getgAxis(ADXL345_I2C.Axes.kZ));\n }", "public double getAngle();", "public static int findAngle(float x0, float y0, float x1, float y1){\n\t\t\n\t\treturn (int)(Math.atan2(-(x1 - x0), -(y1 - y0))/Math.PI * 180) + 180;\n\t}", "public double PlaneAngle() {\n return OCCwrapJavaJNI.Units_Dimensions_PlaneAngle(swigCPtr, this);\n }", "static int orientation(Point p, Point q, Point r)\n {\n int val = (q.getY() - p.getY()) * (r.getX() - q.getX())\n - (q.getX() - p.getX()) * (r.getY() - q.getY());\n\n if (val == 0)\n {\n return 0; // colinear\n }\n return (val > 0) ? 1 : 2; // clock or counterclock wise\n }", "public int getRotationIndex() {\n int start = 0;\n int end = this.words.length - 1;\n\n // 2 or less items in this array\n if (words.length == 0) { return -1; }\n else if (words.length == 1) { return 0; }\n else if (words.length == 2) { return pick2(); }\n\n // Left side\n while(start <= end) {\n int mid = (start + end) / 2;\n\n // Get the word to the left\n String left;\n if (mid - 1 >= 0) {\n left = this.words[mid - 1];\n } else {\n // Not on this side\n break;\n }\n\n // If the word to the left is alphabetically later, this is the rotation point\n if (left.compareTo(this.words[mid]) > 0) {\n return mid;\n }\n\n // Go left\n end = mid - 1;\n }\n\n // Right side\n start = 0;\n end = this.words.length - 1;\n\n while(start <= end) {\n int mid = (start + end) / 2;\n\n // Get the word to the right\n String right;\n if (mid - 1 >= 0) {\n right = this.words[mid - 1];\n } else {\n return -1;\n }\n\n // If the word to the left is alphabetically later, this is the rotation point\n if (right.compareTo(this.words[mid]) > 0) {\n return mid;\n }\n\n // Go right\n start = mid + 1;\n }\n\n return -1;\n }", "public float[] eulerAnglesRadToQuat(float yaw, float pitch, float roll) {\n final float hr = roll * 0.5f;\n final float shr = (float) Math.sin(hr);\n final float chr = (float) Math.cos(hr);\n final float hp = pitch * 0.5f;\n final float shp = (float) Math.sin(hp);\n final float chp = (float) Math.cos(hp);\n final float hy = yaw * 0.5f;\n final float shy = (float) Math.sin(hy);\n final float chy = (float) Math.cos(hy);\n final float chy_shp = chy * shp;\n final float shy_chp = shy * chp;\n final float chy_chp = chy * chp;\n final float shy_shp = shy * shp;\n\n float x = (chy_shp * chr) + (shy_chp * shr); // cos(yaw/2) * sin(pitch/2) * cos(roll/2) + sin(yaw/2) * cos(pitch/2) * sin(roll/2)\n float y = (shy_chp * chr) - (chy_shp * shr); // sin(yaw/2) * cos(pitch/2) * cos(roll/2) - cos(yaw/2) * sin(pitch/2) * sin(roll/2)\n float z = (chy_chp * shr) - (shy_shp * chr); // cos(yaw/2) * cos(pitch/2) * sin(roll/2) - sin(yaw/2) * sin(pitch/2) * cos(roll/2)\n float w = (chy_chp * chr) + (shy_shp * shr); // cos(yaw/2) * cos(pitch/2) * cos(roll/2) + sin(yaw/2) * sin(pitch/2) * sin(roll/2)\n\n float[] new_quat = {x, y, z, w};\n return new_quat;\n }", "private double getAngle()\n {\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }", "public int angleOX() {\n if (B.getY() == A.getY()) {\r\n return 0;\r\n } else if (A.getX() == B.getX()) {\r\n return 90;\r\n }\r\n else {\r\n float fi = ((float) (B.getY() - A.getY()) / (B.getX() - A.getX()));\r\n if (fi<0){\r\n return (int)(fi*(-1));\r\n }\r\n else return (int)(fi);\r\n }\r\n }", "double getAngle(int id);", "public double getAngle(int[][] tab) {\n\t\tdouble[] res= new double[4];int resi=0;\n\t\tint cmpt=0;\n\t\tint angle=0;\n\t\tfor (int i=0;i<tab.length;i++) {\n\t\t\tif (!(tab[i][0]==0) || !(tab[i][1]==0))\n\t\t\t\tcmpt++;\n\t\t}\n\t\t\n\t\tif (cmpt<=1) {\n\t\t\t return 0; //RIP CODE\n\t\t}\n\t\t\n\t\tfor (int i=1;i<tab.length && (!(tab[i][0]==0) || !(tab[i][1]==0));i++) {\n\t\t\tfor(int c=1;i<tab.length && (tab[c][0]!=0 || tab[c][1]!=0);i++)\n\t\t\t{\n\t\t\t\tint diffx=tab[i-1][0]-tab[i][0];\n\t\t\t\tint diffy=tab[i-1][1]-tab[i][1];\n\t\t\t\t\n\t\t\t\tdouble yb=tab[i][1];\n\t\t\t\tdouble xb=tab[i][0];\n\t\t\t\tdouble ya=tab[i-1][1];\n\t\t\t\tdouble xa=tab[i-1][0];\n\t\t\t\t\n\t\t\t\tdouble pointy,pointx;\n\t\t\t\tpointy=yb; \t\t\t\t\t\t\t//pointy/x = coord du 3e point de triangle rectangle\n\t\t\t\tpointx=xa;\t\t\t\t\n\t\t\t\t\n\t\t\t\tdouble dhypo=Math.sqrt(Math.pow(xb-xa,2)+Math.pow(yb-ya,2));\t//(yb-ya)/(xb-xa)\n\t\t\t\tdouble dadj=Math.sqrt(Math.pow(xb-pointx, 2)+Math.pow(yb-pointy, 2));\t//adjacent / rapport a xb,yb\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (dhypo<img.getWidth() && dhypo!=0) {\t\t//deux points selectionnees sont des diagonales\n\t\t\t\t\tdouble retour=Math.acos(dadj/dhypo)*(180/Math.PI);\n\t\t\t\t\tif (retour>90/2)\n\t\t\t\t\t\tretour=180-90-retour;\n\t\t\t\t\t\n\t\t\t\t\tif((xa<xb && ya<yb )||( xb<xa && yb<ya))\t\t\t\t//point de droite plus haut que celui de gauche\n\t\t\t\t\t\treturn -retour;\n\t\t\t\t\telse\n\t\t\t\t\t\treturn retour;\n\t\t\t\t}\n\t\t\t\t/*else {\t\t\t//deux points sont en diagonnale\n\t\t\t\t\tdouble retour=Math.acos(dadj/dhypo)*(180/Math.PI);\t\t// ne marche pas \n\t\t\t\t\treturn (Math.abs(45-retour)/2);\n\t\t\t\t\t\n\t\t\t\t}*/\n\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\t\t\n\t\treturn 0;\n\t}", "private double getAngle(){\n //Get a new angle measurement\n angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n //Get the difference between current angle measurement and last angle measurement\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n //Process the angle to keep it within (-180,180)\n //(Once angle passes +180, it will rollback to -179, and vice versa)\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n //Add the change in angle since last measurement (deltaAngle)\n //to the change in angle since last reset (globalAngle)\n globalAngle += deltaAngle;\n //Set last angle measurement to current angle measurement\n lastAngles = angles;\n\n return globalAngle;\n }", "public float calculateCelestialAngle(long par1, float par3) {\n\t\treturn 0.0F;\n\t}", "AngleResource inclination();", "public void function_yaw(int x, int y,int gyro){\n\n\n }", "void copyOffsetRotation (DMatrix3 R);", "@Override\n\tpublic float calculateCelestialAngle(long par1, float par3) {\n\t\treturn 2.0F;\n\t}", "public void rotate(float angle);", "public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6)\n {\n float f = par3 * (float)Math.PI * -0.1F;\n\n for (int i = 0; i < 4; i++)\n {\n field_78106_a[i].rotationPointY = -2F + MathHelper.cos(((float)(i * 2) + par3) * 0.25F);\n field_78106_a[i].rotationPointX = MathHelper.cos(f) * 9F;\n field_78106_a[i].rotationPointZ = MathHelper.sin(f) * 9F;\n f += ((float)Math.PI / 2F);\n }\n\n f = ((float)Math.PI / 4F) + par3 * (float)Math.PI * 0.03F;\n\n for (int j = 4; j < 8; j++)\n {\n field_78106_a[j].rotationPointY = 2.0F + MathHelper.cos(((float)(j * 2) + par3) * 0.25F);\n field_78106_a[j].rotationPointX = MathHelper.cos(f) * 7F;\n field_78106_a[j].rotationPointZ = MathHelper.sin(f) * 7F;\n f += ((float)Math.PI / 2F);\n }\n\n f = 0.4712389F + par3 * (float)Math.PI * -0.05F;\n\n for (int k = 8; k < 12; k++)\n {\n field_78106_a[k].rotationPointY = 11F + MathHelper.cos(((float)k * 1.5F + par3) * 0.5F);\n field_78106_a[k].rotationPointX = MathHelper.cos(f) * 5F;\n field_78106_a[k].rotationPointZ = MathHelper.sin(f) * 5F;\n f += ((float)Math.PI / 2F);\n }\n\n field_78105_b.rotateAngleY = par4 / (180F / (float)Math.PI);\n field_78105_b.rotateAngleX = par5 / (180F / (float)Math.PI);\n }", "public void rotate() {\n // amoeba rotate\n // Here i will use my rotation_x and rotation_y\n }", "public abstract Vector4fc rotateY(float angle);", "public interface AxisAngleBasics extends AxisAngleReadOnly, Orientation3DBasics, Clearable\n{\n /**\n * Gets the reference to the axis part of this axis-angle.\n *\n * @return the reference to the axis vector.\n */\n @Override\n UnitVector3DBasics getAxis();\n\n /**\n * Sets a new angle to this axis-angle.\n *\n * @param angle the new angle.\n */\n void setAngle(double angle);\n\n /**\n * Sets a new x-component for the axis of this axis-angle.\n *\n * @param x the new axis x-component.\n */\n default void setX(double x)\n {\n getAxis().setX(x);\n }\n\n /**\n * Sets a new y-component for the axis of this axis-angle.\n *\n * @param y the new axis y-component.\n */\n default void setY(double y)\n {\n getAxis().setY(y);\n }\n\n /**\n * Sets a new z-component for the axis of this axis-angle.\n *\n * @param z the new axis z-component.\n */\n default void setZ(double z)\n {\n getAxis().setZ(z);\n }\n\n /**\n * Sets the components of this axis-angle to represent a \"zero\" rotation. After calling the axis is\n * equal to {@link Axis3D#X} and the angle to 0.\n */\n @Override\n default void setToZero()\n {\n getAxis().set(Axis3D.X);\n setAngle(0.0);\n }\n\n /**\n * Sets the components of this axis-angle to {@link Double#NaN}.\n */\n @Override\n default void setToNaN()\n {\n getAxis().setToNaN();\n setAngle(Double.NaN);\n }\n\n /**\n * Tests if this axis-angle contains a {@link Double#NaN}.\n *\n * @return {@code true} if this axis-angle contains a {@link Double#NaN}, {@code false} otherwise.\n */\n @Override\n default boolean containsNaN()\n {\n return AxisAngleReadOnly.super.containsNaN();\n }\n\n /**\n * Sets each component of this axis-angle to its absolute value.\n */\n default void absolute()\n {\n getAxis().absolute();\n setAngle(Math.abs(getAngle()));\n }\n\n /**\n * Negates each component of this axis-angle.\n */\n default void negate()\n {\n getAxis().negate();\n setAngle(-getAngle());\n }\n\n /** {@inheritDoc} */\n @Override\n default void invert()\n {\n setAngle(-getAngle());\n }\n\n /**\n * Normalizes the axis of this axis-angle such that its norm is equal to 1 after calling this method\n * and its direction remains unchanged.\n * <p>\n * Edge cases:\n * <ul>\n * <li>if this axis-angle contains {@link Double#NaN}, this method is ineffective.\n * </ul>\n * </p>\n */\n @Override\n default void normalize()\n {\n getAxis().normalize();\n }\n\n /**\n * Multiplies the angle of this axis-angle by the given {@code scale}.\n *\n * @param scale the scaling factor to apply to the angle of this axis-angle.\n */\n default void scaleAngle(double scale)\n {\n setAngle(scale * getAngle());\n }\n\n /**\n * Sets this axis-angle to represent a new rotation of axis ({@code x}, {@code y}, {@code z}) and\n * angle of {@code angle}.\n *\n * @param x x-component of the new axis.\n * @param y y-component of the new axis.\n * @param z z-component of the new axis.\n * @param angle the new angle.\n */\n default void set(double x, double y, double z, double angle)\n {\n getAxis().set(x, y, z);\n setAngle(angle);\n }\n\n /** {@inheritDoc} */\n @Override\n default void set(Orientation3DReadOnly orientation3DReadOnly)\n {\n if (orientation3DReadOnly instanceof AxisAngleReadOnly)\n set((AxisAngleReadOnly) orientation3DReadOnly);\n else\n orientation3DReadOnly.get(this);\n }\n\n /**\n * Sets the axis and the angle of this axis-angle.\n *\n * @param axis the new axis. Not modified.\n * @param angle the new angle.\n */\n default void set(Vector3DReadOnly axis, double angle)\n {\n getAxis().set(axis);\n setAngle(angle);\n }\n\n /**\n * Sets this axis-angle to the same value as the given axis-angle {@code other}.\n *\n * @param other the other axis-angle. Not modified.\n */\n default void set(AxisAngleReadOnly other)\n {\n getAxis().set(other.getAxis());\n setAngle(other.getAngle());\n }\n\n /**\n * Sets this axis-angle to {@code other} and then calls {@link #negate()}.\n *\n * @param other the other axis-angle to copy the values from. Not modified.\n */\n default void setAndNegate(AxisAngleReadOnly other)\n {\n set(other);\n negate();\n }\n\n /**\n * Copies the values in the given array into this axis-angle as follows:\n * <ul>\n * <li>{@code this.setX(axisAngleArray[0]);}\n * <li>{@code this.setY(axisAngleArray[1]);}\n * <li>{@code this.setZ(axisAngleArray[2]);}\n * <li>{@code this.setAngle(axisAngleArray[3]);}\n * </ul>\n *\n * @param axisAngleArray the array containing the new values for this axis-angle. Not modified.\n */\n default void set(double[] axisAngleArray)\n {\n set(0, axisAngleArray);\n }\n\n /**\n * Copies the values in the given array into this axis-angle as follows:\n * <ul>\n * <li>{@code this.setX(axisAngleArray[startIndex + 0]);}\n * <li>{@code this.setY(axisAngleArray[startIndex + 1]);}\n * <li>{@code this.setZ(axisAngleArray[startIndex + 2]);}\n * <li>{@code this.setAngle(axisAngleArray[startIndex + 3]);}\n * </ul>\n *\n * @param startIndex the first index to start reading from in the array.\n * @param axisAngleArray the array containing the new values for this axis-angle. Not modified.\n */\n default void set(int startIndex, double[] axisAngleArray)\n {\n setX(axisAngleArray[startIndex++]);\n setY(axisAngleArray[startIndex++]);\n setZ(axisAngleArray[startIndex++]);\n setAngle(axisAngleArray[startIndex]);\n }\n\n /**\n * Copies the values in the given array into this axis-angle as follows:\n * <ul>\n * <li>{@code this.setX(axisAngleArray[0]);}\n * <li>{@code this.setY(axisAngleArray[1]);}\n * <li>{@code this.setZ(axisAngleArray[2]);}\n * <li>{@code this.setAngle(axisAngleArray[3]);}\n * </ul>\n *\n * @param axisAngleArray the array containing the new values for this axis-angle. Not modified.\n */\n default void set(float[] axisAngleArray)\n {\n set(0, axisAngleArray);\n }\n\n /**\n * Copies the values in the given array into this axis-angle as follows:\n * <ul>\n * <li>{@code this.setX(axisAngleArray[startIndex + 0]);}\n * <li>{@code this.setY(axisAngleArray[startIndex + 1]);}\n * <li>{@code this.setZ(axisAngleArray[startIndex + 2]);}\n * <li>{@code this.setAngle(axisAngleArray[startIndex + 3]);}\n * </ul>\n *\n * @param startIndex the first index to start reading from in the array.\n * @param axisAngleArray the array containing the new values for this axis-angle. Not modified.\n */\n default void set(int startIndex, float[] axisAngleArray)\n {\n setX(axisAngleArray[startIndex++]);\n setY(axisAngleArray[startIndex++]);\n setZ(axisAngleArray[startIndex++]);\n setAngle(axisAngleArray[startIndex]);\n }\n\n /** {@inheritDoc} */\n @Override\n default void setAxisAngle(double x, double y, double z, double angle)\n {\n set(x, y, z, angle);\n }\n\n /** {@inheritDoc} */\n @Override\n default void setQuaternion(double x, double y, double z, double s)\n {\n AxisAngleConversion.convertQuaternionToAxisAngle(x, y, z, s, this);\n }\n\n /** {@inheritDoc} */\n @Override\n default void setRotationVector(double x, double y, double z)\n {\n AxisAngleConversion.convertRotationVectorToAxisAngle(x, y, z, this);\n }\n\n /** {@inheritDoc} */\n @Override\n default void setYawPitchRoll(double yaw, double pitch, double roll)\n {\n AxisAngleConversion.convertYawPitchRollToAxisAngle(yaw, pitch, roll, this);\n }\n\n /** {@inheritDoc} */\n @Override\n default void setRotationMatrix(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22)\n {\n AxisAngleConversion.convertMatrixToAxisAngle(m00, m01, m02, m10, m11, m12, m20, m21, m22, this);\n }\n\n @Override\n default void setToYawOrientation(double yaw)\n {\n getAxis().set(Axis3D.Z);\n setAngle(yaw);\n }\n\n @Override\n default void setToPitchOrientation(double pitch)\n {\n getAxis().set(Axis3D.Y);\n setAngle(pitch);\n }\n\n @Override\n default void setToRollOrientation(double roll)\n {\n getAxis().set(Axis3D.X);\n setAngle(roll);\n }\n\n /**\n * Selects a component of this axis-angle based on {@code index} and sets it to {@code value}.\n * <p>\n * For {@code index} values of 0, 1, and 2, the corresponding components are x, y, and z,\n * respectively, while 3 corresponds to the angle.\n * </p>\n *\n * @param index the index of the component to set.\n * @param value the new value of the selected component.\n * @throws IndexOutOfBoundsException if {@code index} &notin; [0, 3].\n */\n default void setElement(int index, double value)\n {\n switch (index)\n {\n case 0:\n setX(value);\n break;\n case 1:\n setY(value);\n break;\n case 2:\n setZ(value);\n break;\n case 3:\n setAngle(value);\n break;\n default:\n throw new IndexOutOfBoundsException(Integer.toString(index));\n }\n }\n\n /**\n * Multiplies this axis-angle by {@code other}.\n * <p>\n * this = this * other\n * </p>\n *\n * @param other the other axis-angle to multiply this. Not modified.\n */\n default void multiply(AxisAngleReadOnly other)\n {\n AxisAngleTools.multiply(this, other, this);\n }\n\n /** {@inheritDoc} */\n @Override\n default void append(Orientation3DReadOnly other)\n {\n AxisAngleTools.multiply(this, false, other, false, this);\n }\n\n /**\n * Sets this axis-angle to the multiplication of {@code aa1} and {@code aa2}.\n * <p>\n * this = aa1 * aa2\n * </p>\n *\n * @param aa1 the first axis-angle in the multiplication. Not modified.\n * @param aa2 the second axis-angle in the multiplication. Not modified.\n */\n default void multiply(AxisAngleReadOnly aa1, AxisAngleReadOnly aa2)\n {\n AxisAngleTools.multiply(aa1, aa2, this);\n }\n\n /**\n * Multiplies this axis-angle by the inverse of {@code other}.\n * <p>\n * this = this * other<sup>-1</sup>\n * </p>\n *\n * @param other the other axis-angle to multiply this. Not modified.\n */\n default void multiplyInvertOther(AxisAngleReadOnly other)\n {\n AxisAngleTools.multiplyInvertRight(this, other, this);\n }\n\n /** {@inheritDoc} */\n @Override\n default void appendInvertOther(Orientation3DReadOnly orientation)\n {\n AxisAngleTools.multiply(this, false, orientation, true, this);\n }\n\n /**\n * Sets this axis-angle to the multiplication of the inverse of {@code this} and {@code other}.\n * <p>\n * this = this<sup>-1</sup> * other\n * </p>\n *\n * @param other the other axis-angle to multiply this. Not modified.\n */\n default void multiplyInvertThis(AxisAngleReadOnly other)\n {\n AxisAngleTools.multiplyInvertLeft(this, other, this);\n }\n\n /**\n * Sets this axis-angle to the multiplication of the inverse of {@code this} and the inverse of\n * {@code other}.\n * <p>\n * this = this<sup>-1</sup> * other<sup>-1</sup>\n * </p>\n *\n * @param other the other axis-angle to multiply this. Not modified.\n */\n default void multiplyInvertBoth(AxisAngleReadOnly other)\n {\n AxisAngleTools.multiplyInvertBoth(this, other, this);\n }\n\n /**\n * Appends a rotation about the z-axis to this axis-angle.\n *\n * <pre>\n * / ux = 0 \\\n * this = this * | uy = 0 |\n * | uz = 1 |\n * \\ angle = yaw /\n * </pre>\n *\n * @param yaw the angle to rotate about the z-axis.\n */\n @Override\n default void appendYawRotation(double yaw)\n {\n AxisAngleTools.appendYawRotation(this, yaw, this);\n }\n\n /**\n * Appends a rotation about the y-axis to this axis-angle.\n *\n * <pre>\n * / ux = 0 \\\n * this = this * | uy = 1 |\n * | uz = 0 |\n * \\ angle = pitch /\n * </pre>\n *\n * @param pitch the angle to rotate about the y-axis.\n */\n @Override\n default void appendPitchRotation(double pitch)\n {\n AxisAngleTools.appendPitchRotation(this, pitch, this);\n }\n\n /**\n * Appends a rotation about the x-axis to this axis-angle.\n *\n * <pre>\n * / ux = 1 \\\n * this = this * | uy = 0 |\n * | uz = 0 |\n * \\ angle = roll /\n * </pre>\n *\n * @param roll the angle to rotate about the x-axis.\n */\n @Override\n default void appendRollRotation(double roll)\n {\n AxisAngleTools.appendRollRotation(this, roll, this);\n }\n\n /**\n * Pre-multiplies this axis-angle by {@code other}.\n * <p>\n * this = other * other\n * </p>\n *\n * @param other the other axis-angle to multiply this. Not modified.\n */\n default void preMultiply(AxisAngleReadOnly other)\n {\n AxisAngleTools.multiply(other, this, this);\n }\n\n /** {@inheritDoc} */\n @Override\n default void prepend(Orientation3DReadOnly orientation)\n {\n AxisAngleTools.multiply(orientation, false, this, false, this);\n }\n\n /**\n * Sets this axis-angle to the multiplication of the inverse of {@code other} and {@code this}.\n * <p>\n * this = other<sup>-1</sup> * this\n * </p>\n *\n * @param other the other axis-angle to multiply this. Not modified.\n */\n default void preMultiplyInvertOther(AxisAngleReadOnly other)\n {\n AxisAngleTools.multiplyInvertLeft(other, this, this);\n }\n\n /** {@inheritDoc} */\n @Override\n default void prependInvertOther(Orientation3DReadOnly orientation)\n {\n AxisAngleTools.multiply(orientation, true, this, false, this);\n }\n\n /**\n * Sets this axis-angle to the multiplication of {@code other} and the inverse of {@code this}.\n * <p>\n * this = other * this<sup>-1</sup>\n * </p>\n *\n * @param other the other axis-angle to multiply this. Not modified.\n */\n default void preMultiplyInvertThis(AxisAngleReadOnly other)\n {\n AxisAngleTools.multiplyInvertRight(other, this, this);\n }\n\n /**\n * Sets this axis-angle to the multiplication of the inverse of {@code other} and the inverse of\n * {@code this}.\n * <p>\n * this = other<sup>-1</sup> * this<sup>-1</sup>\n * </p>\n *\n * @param other the other axis-angle to multiply this. Not modified.\n */\n default void preMultiplyInvertBoth(AxisAngleReadOnly other)\n {\n AxisAngleTools.multiplyInvertBoth(other, this, this);\n }\n\n /**\n * Prepends a rotation about the z-axis to this axis-angle.\n *\n * <pre>\n * / ux = 0 \\\n * this = | uy = 0 | * this\n * | uz = 1 |\n * \\ angle = yaw /\n * </pre>\n *\n * @param yaw the angle to rotate about the z-axis.\n */\n @Override\n default void prependYawRotation(double yaw)\n {\n AxisAngleTools.prependYawRotation(yaw, this, this);\n }\n\n /**\n * Prepends a rotation about the y-axis to this axis-angle.\n *\n * <pre>\n * / ux = 0 \\\n * this = | uy = 1 | * this\n * | uz = 0 |\n * \\ angle = pitch /\n * </pre>\n *\n * @param pitch the angle to rotate about the y-axis.\n */\n @Override\n default void prependPitchRotation(double pitch)\n {\n AxisAngleTools.prependPitchRotation(pitch, this, this);\n }\n\n /**\n * Prepends a rotation about the x-axis to this axis-angle.\n *\n * <pre>\n * / ux = 1 \\\n * this = | uy = 0 | * this\n * | uz = 0 |\n * \\ angle = roll /\n * </pre>\n *\n * @param roll the angle to rotate about the x-axis.\n */\n @Override\n default void prependRollRotation(double roll)\n {\n AxisAngleTools.prependRollRotation(roll, this, this);\n }\n}", "public static final double arctan2(double y, double x)\n {\n double coeff_1 = Math.PI/4;\n double coeff_2 = 3*coeff_1;\n double abs_y = Math.abs(y)+1e-10; // kludge to prevent 0/0 condition\n\n double angle;\n\n if (x >= 0) {\n double r = (x - abs_y) / (x + abs_y);\n angle = coeff_1 - coeff_1 * r;\n } else {\n double r = (x + abs_y) / (abs_y - x);\n angle = coeff_2 - coeff_1 * r;\n }\n\n if (y < 0)\n return -angle; // negate if in quad III or IV\n else\n return angle;\n }", "public static double rotation()\r\n\t{\r\n\t\treturn -(mxp.getAngle()/45);\r\n\t}", "@Override\r\n\tpublic void rotateAboutAxis(final double angle, final double p1x,\r\n\t\t\tfinal double p1y, final double p1z, final double p2x,\r\n\t\t\tfinal double p2y, final double p2z) {\r\n\r\n\t\tfinal WB_Transform raa = new WB_Transform();\r\n\t\traa.addRotateAboutAxis(angle, new WB_Point3d(p1x, p1y, p1z),\r\n\t\t\t\tnew WB_Normal3d(p2x - p1x, p2y - p1y, p2z - p1z));\r\n\t\traa.applySelf(this);\r\n\t}", "public void rotate(vec3 axis, float angle){\n mat4 m = math3d.axisRotation(axis, angle);\n worldMatrix = worldMatrix.mul(m);\n }", "double getCalibratedLevelAngle();", "public void rotate(double angle) {\t\t\n\t\t// precompute values\n\t\tVector t = new Vector(this.a14, this.a24, this.a34);\n\t\tif (t.length() > 0) t = t.norm();\n\t\t\n\t\tdouble x = t.x();\n\t\tdouble y = t.y();\n\t\tdouble z = t.z();\n\t\t\n\t\tdouble s = Math.sin(angle);\n\t\tdouble c = Math.cos(angle);\n\t\tdouble d = 1 - c;\n\t\t\n\t\t// precompute to avoid double computations\n\t\tdouble dxy = d*x*y;\n\t\tdouble dxz = d*x*z;\n\t\tdouble dyz = d*y*z;\n\t\tdouble xs = x*s;\n\t\tdouble ys = y*s;\n\t\tdouble zs = z*s;\n\t\t\n\t\t// update matrix\n\t\ta11 = d*x*x+c; a12 = dxy-zs; a13 = dxz+ys;\n\t\ta21 = dxy+zs; a22 = d*y*y+c; a23 = dyz-xs;\n\t\ta31 = dxz-ys; a32 = dyz+xs; a33 = d*z*z+c;\n\t}" ]
[ "0.633635", "0.6255099", "0.61803806", "0.5948444", "0.5926327", "0.58845276", "0.5874991", "0.58599925", "0.56805915", "0.56209683", "0.5607218", "0.55947536", "0.5588407", "0.55751944", "0.55344343", "0.5529965", "0.5480663", "0.543501", "0.5430669", "0.53412485", "0.5319237", "0.53175265", "0.52838916", "0.5265191", "0.5230029", "0.5224115", "0.5218047", "0.521712", "0.5204103", "0.51896566", "0.5188978", "0.5169182", "0.5157246", "0.5157246", "0.5155873", "0.51378036", "0.5123166", "0.51218945", "0.51088816", "0.51065195", "0.50956595", "0.5093298", "0.5093298", "0.5068266", "0.5052237", "0.5047569", "0.50361526", "0.50266606", "0.5017099", "0.500643", "0.4964061", "0.4962325", "0.4962259", "0.49574783", "0.49499822", "0.49414662", "0.49388516", "0.4937972", "0.4935129", "0.49337193", "0.4928365", "0.49238166", "0.49212933", "0.49199125", "0.4917161", "0.49171382", "0.4908856", "0.49081162", "0.49077052", "0.4907317", "0.4903002", "0.48989785", "0.4893177", "0.48921055", "0.48842075", "0.48815486", "0.48809636", "0.4874187", "0.48701504", "0.48649505", "0.4858769", "0.48561662", "0.4846075", "0.48416162", "0.48385093", "0.48384172", "0.48364443", "0.48346716", "0.48342606", "0.4832277", "0.48226792", "0.4820248", "0.48149085", "0.4811911", "0.48079094", "0.4803884", "0.4803657", "0.48024595", "0.4797975", "0.4780824" ]
0.6905054
0
Binary search for a rotation angle that matches the target area.
private static Point3d[] solve(double targetArea) { // First rotate along the z axis, from 0 degrees to 45 degrees for areas from 1 to sqrt(2) Point3d[] centers = new Point3d[] { new Point3d(0.5, 0, 0), new Point3d(0, 0.5, 0), new Point3d(0, 0, 0.5) }; if (searchRotationAngle(centers, 2, Math.PI / 4, targetArea)) return centers; // For areas greater than sqrt(2), keep the cube rotated by 45 degrees along // the z axis and rotate from 0 degrees to ~35.26 degrees along the x axis. // The latter angle is the one required to align vertically the top // and bottom opposite vertices. if (searchRotationAngle(centers, 0, Math.PI / 2 - Math.atan(Math.sqrt(2)), targetArea)) return centers; throw new IllegalStateException("Unable to find a rotation for target area " + targetArea); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean searchRotationAngle(Point3d[] centers, int axis, double maxAngle, double targetArea) {\n Point3d[] origCenters = new Point3d[3];\n for (int i = 0; i < centers.length; i++) origCenters[i] = new Point3d(centers[i].x, centers[i].y, centers[i].z);\n double from = 0;\n double to = maxAngle;\n while (true) {\n double mid = (from + to) / 2;\n switch (axis) {\n case 0:\n for (int i = 0; i < centers.length; i++) {\n centers[i] = new Point3d(\n origCenters[i].x,\n origCenters[i].y * Math.cos(mid) - origCenters[i].z * Math.sin(mid),\n origCenters[i].y * Math.sin(mid) + origCenters[i].z * Math.cos(mid));\n }\n break;\n case 1:\n for (int i = 0; i < centers.length; i++) {\n centers[i] = new Point3d(\n origCenters[i].x * Math.cos(mid) - origCenters[i].z * Math.sin(mid),\n origCenters[i].y,\n origCenters[i].x * Math.sin(mid) + origCenters[i].z * Math.cos(mid));\n }\n break;\n case 2:\n for (int i = 0; i < centers.length; i++) {\n centers[i] = new Point3d(\n origCenters[i].x * Math.cos(mid) - origCenters[i].y * Math.sin(mid),\n origCenters[i].x * Math.sin(mid) + origCenters[i].y * Math.cos(mid),\n origCenters[i].z);\n }\n break;\n default:\n throw new IllegalStateException();\n }\n double currentArea = computeArea(centers);\n if (Math.abs(currentArea - targetArea) < 1E-6) {\n System.err.println(\"Angle (degrees): \" + (mid * 180.0 / Math.PI) + \" on axis \" + axis + \" computer area: \" + currentArea + \" from \" + from + \" to \" + to);\n return true;\n } else if (currentArea < targetArea) {\n if (from >= to - 1E-7) return false;\n from = mid;\n } else {\n to = mid;\n }\n }\n }", "public static int binSearchRotatedIter(int src[], int lo, int hi, int target){\n\n while(lo<=hi){\n int mid = lo + (hi-lo)/2;\n if(src[mid]==target) return mid;\n //if bottom half is sorted\n if(src[lo]<=src[mid]){\n \n if(src[lo]<=target && target<src[mid]){\n hi=mid-1;\n }else{\n lo=mid+1;\n }\n }\n //if upper half is sorted\n else{\n if(src[mid]<target && target<=src[hi]){\n lo=mid+1;\n }else{\n hi=mid-1;\n }\n }\n }\n return -1;\n}", "public int searchRot(int[] nums, int targ) {\n //Find pivot\n int lo = 0;\n int hi = nums.length - 1;\n while (lo < hi) {\n int mid = (lo + hi) / 2;\n if (nums[mid] > nums[hi]) {\n lo = mid + 1;\n } else {\n hi = mid;\n }\n }\n\n int piv = lo;\n lo = 0;\n hi = nums.length - 1;\n while (lo < hi) {\n int mid = (lo + hi) / 2;\n int realMid = (mid + piv) % nums.length;\n if (nums[realMid] == targ) {\n return realMid;\n } else if (nums[realMid] > targ) {\n hi = mid - 1;\n } else {\n lo = mid + 1;\n }\n }\n\n return -1;\n}", "public static native double OpenMM_AmoebaInPlaneAngleForce_getAmoebaGlobalInPlaneAnglePentic(PointerByReference target);", "public abstract int getIndexForAngle(float paramFloat);", "public static native int OpenMM_AmoebaInPlaneAngleForce_getNumAngles(PointerByReference target);", "public static native double OpenMM_AmoebaInPlaneAngleForce_getAmoebaGlobalInPlaneAngleSextic(PointerByReference target);", "public static native int OpenMM_AmoebaAngleForce_getNumAngles(PointerByReference target);", "public static native double OpenMM_AmoebaAngleForce_getAmoebaGlobalAnglePentic(PointerByReference target);", "public int binarySearchRotated(int [] nums) {\n\t\tint n = nums.length;\n\t\tint low = 0;\n\t\tint high = n -1;\n\t\twhile(low <= high) {\n\t\t\tif(nums[low] <= nums[high]) return low;\n\t\t\tint mid = (low + high) >> 1;\n\t\t\tint next = (mid + 1) % n;\n\t\t\tint prev = (mid - 1) % n;\n\t\t\tif(nums[mid] <= nums[next] && nums[mid] <= nums[prev]) return mid;\n\t\t\telse if(nums[mid] <= nums[high]) high = mid-1;\n\t\t\telse if(nums[mid] >= nums[low]) low = mid+1;\n\t\t}\n\t\t\n\t\treturn -1;\n\t\t\n\t}", "protected double findAngleToEnemy(Movable enemy){\n\t\tdouble enemyX = enemy.getX() - x;\n\t\tdouble enemyY = enemy.getY() - y;\n\t\treturn Math.atan2(enemyX, enemyY);\n\t}", "boolean evolveCurrentAngle() {\n float checkSum = 0;\n for (int i = 0; i < 2; i++) {\n float delta = target_angle[i] - angle[i];\n float sign = 1;\n if (Math.abs(delta) > Math.PI) {\n // go the other way\n boolean isPos = delta > 0;\n sign = -1;\n delta = (float) (2 * Math.PI - Math.abs(delta));\n if (!isPos) delta = -delta;\n }\n angle[i] += sign * 0.1f * delta;\n if (angle[i] > Math.PI) angle[i] = (float) -(2 * Math.PI - angle[i]);\n if (angle[i] < -Math.PI) angle[i] = (float) (2 * Math.PI - angle[i]);\n checkSum += Math.abs(delta);\n }\n\n float delta = target_angle[2] - angle[2];\n float sign = 1;\n if (Math.abs(delta) > Math.PI / 2) {\n // go the other way\n boolean isPos = delta > 0;\n sign = -1;\n delta = (float) (Math.PI - Math.abs(delta));\n if (!isPos) delta = -delta;\n }\n angle[2] += sign * 0.1f * delta;\n if (angle[2] > Math.PI / 2) angle[2] = (float) -(Math.PI - angle[2]);\n if (angle[2] < -Math.PI / 2) angle[2] = (float) (Math.PI - angle[2]);\n checkSum += Math.abs(delta);\n\n if (checkSum < 0.0001) {\n for (int i = 0; i < target_angle.length; i++) {\n angle[i] = target_angle[i];\n }\n return false;\n }\n return true;\n }", "public static native double OpenMM_AmoebaAngleForce_getAmoebaGlobalAngleSextic(PointerByReference target);", "public int search(int[] A, int target) {\n // write your code here\n if (A == null || A.length == 0) return -1;\n int start = 0, end = A.length - 1;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (A[mid] == target) return mid;\n if (A[mid] < A[start]) {\n if (target <= A[end] && target > A[mid]){\n start = mid;\n }\n else {\n end = mid;\n }\n }\n else {\n if (target >= A[start] && target < A[mid]) {\n end = mid;\n }\n else {\n start = mid;\n }\n }\n }\n if (A[start] == target) return start;\n if (A[end] == target) return end;\n return -1;\n }", "public static double bestDirTurn(double startAngle, double targetAngle) {\n double delta = (targetAngle - startAngle + 540) % 360 - 180;\n return delta;\n }", "public static native double OpenMM_AmoebaInPlaneAngleForce_getAmoebaGlobalInPlaneAngleCubic(PointerByReference target);", "boolean needToAim(double angle);", "public int binarySearch(Long[] keys,Long target){\n\t\tif(keys ==null || keys.length ==0){\n\t\t\treturn -1;\n\t\t}\n\t\tint l = 0;\n\t\tint r = keys.length-1;\n\t\twhile(l<r){\n\t\t\tint mid = l + (r-l)/2;\n\t\t\tif(keys[mid] == target)\n\t\t\t\treturn mid;\n\t\t\tif(keys[mid]<target)\n\t\t\t\tl = mid+1;\n\t\t\telse\n\t\t\t\tr = mid-1;\n\t\t}\n\t\treturn l;\n\t\t\n\t}", "public int search(int[] A, int target) {\n\n int start = 0;\n int end = A.length - 1;\n int mid;\n\n while (start + 1 < end) {\n mid = start + (end - start) / 2;\n if (A[mid] == target) {\n return mid;\n }\n if (A[start] < A[mid]) {\n // situation 1, red line\n if (A[start] <= target && target <= A[mid]) {\n end = mid;\n } else {\n start = mid;\n }\n } else {\n // situation 2, green line\n if (A[mid] <= target && target <= A[end]) {\n start = mid;\n } else {\n end = mid;\n }\n }\n } // while\n\n if (A[start] == target) {\n return start;\n }\n if (A[end] == target) {\n return end;\n }\n return -1;\n }", "@Override\r\n\t\r\n\t\r\n\t\r\n\tpublic int[] locate(int target) {\r\n\t\tint low = 0; \r\n\t\tint high = length()- 1;\r\n\t\t\r\n\t\twhile ( low <= high) {\r\n\t\t\tint mid = ((low + high)/2);\r\n\t\t\tint value = inspect(mid,0);\r\n\t\t\t\t\t\r\n\t\t\tif ( value == target) {\r\n\t\t\t\treturn new int[] {mid,0};\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\telse if (value < target) {\r\n\t\t\t\tlow = mid +1;\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\thigh = mid -1;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\treturn binarySearch(high, target);\r\n\t}", "@Test\n public void testFind_South() {\n\n double lat1 = 0.0;\n double lon1 = 0.0;\n double lat2 = -10.0;\n double lon2 = 0.0;\n double expResult = Math.toRadians(180);\n double result = Azimuth.find(lat1, lon1, lat2, lon2);\n assertEquals(expResult, result, 0.0);\n }", "public static native double OpenMM_AmoebaInPlaneAngleForce_getAmoebaGlobalInPlaneAngleQuartic(PointerByReference target);", "public int search(int[] nums, int target) {\n int left = 0;\n int right = nums.length - 1;\n while (left < right) {\n int mid = (left + right) / 2;\n if (nums[mid] > nums[right]) {\n left = mid + 1;\n } else {\n right = mid;\n }\n }\n int pivot = left;\n left = 0;\n right = nums.length - 1;\n while (left <= right) {\n int mid = (left + right) / 2;\n int realmid = (mid + pivot) % nums.length;\n if (nums[realmid] == target) {\n return realmid;\n } else if (nums[realmid] < target) {\n left = mid + 1;\n } else {\n right = mid - 1;\n }\n }\n return -1;\n }", "public double findRotation(Point a, Point b) {\n\t\t// Find rotation in radians using acttan2.\n\t\tdouble rad = Math.atan2(a.y - b.y, a.x - b.x);\n\n\t\t// Remove negative rotation.\n\t\tif (rad < 0) {\n\t\t\trad += 2 * Math.PI;\n\t\t}\n\t\t\n\t\t// Convert the rotation to degrees.\n\t\treturn rad * (180 / Math.PI);\n\t}", "public static double getAngle(ArrayList<MatOfPoint> filterContoursOutput)\n\t{\n\t\tdouble constant = WIDTH_BETWEEN_TARGET / lengthBetweenContours;\n\t\tdouble angleToGoal = 0;\n\t\t\t//Looking for the 2 blocks to actually start trig\n\t\tif(!filterContoursOutput.isEmpty() && filterContoursOutput.size() >= 2)\n\t\t{\n\n\t\t\tif(centerX.length == 2)\n\t\t\t{\n\t\t\t\t// this calculates the distance from the center of goal to center of webcam \n\t\t\t\tdouble distanceFromCenterPixels = ((centerX[0] + centerX[1]) / 2) - (CAMERA_WIDTH / 2);\n\t\t\t\t// Converts pixels to inches using the constant from above.\n\t\t\t\tdouble distanceFromCenterInch = distanceFromCenterPixels * constant;\n\t\t\t\t// math brought to you buy Chris and Jones\n\t\t\t\tangleToGoal = Math.atan(distanceFromCenterInch / distanceFromTarget(filterContoursOutput));\n\t\t\t\tangleToGoal = Math.toDegrees(angleToGoal);\n\t\t\t\t// prints angle\n\t\t\t\t//System.out.println(\"Angle: \" + angleToGoal);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn angleToGoal;\n\t}", "public static int searchInMountainArray(int[] arr, int target){\n int indexOfPeak = peakIndexInMountainArray(arr);\n\n int firstIndex = BinarySearch(arr, target, 0, indexOfPeak);\n if(firstIndex != -1){\n return firstIndex;\n }\n //try to search in second half.\n return BinarySearch(arr, target, indexOfPeak, arr.length-1);\n }", "private static int binary_Search(int[] arr, int target) {\n\n\t\tint low = 0;\n\t\tint high = arr.length - 1;\n\n\t\twhile (low <= high) {\n\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tSystem.out.println(\"low = \" + low + \" mid = \" + mid + \" high =\" + high);\n\t\t\tif (arr[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\tif (arr[mid] < target) {\n\t\t\t\tlow = mid + 1;\n\n\t\t\t} else {\n\t\t\t\thigh = mid - 1;\n\t\t\t}\n\n\t\t\t// System.out.println(\"low = \" + low + \" high =\" + high);\n\t\t}\n\t\treturn -1;\n\t}", "private float calculateAngle() {\r\n\r\n\t\tdouble angleTemp = Math.atan2(Target.getY() - y, Target.getX() - x);\r\n\t\t// I needed to use wikipedia to get this i\r\n\t\t// did not learn this in math and needed\r\n\t\t// to use a couplle youtube tutorials to\r\n\t\t// find out how to do the math in java\r\n\t\t// aswell thank fully one had the exact\r\n\t\t// way of doing this\r\n\t\treturn (float) Math.toDegrees(angleTemp) + 90;\r\n\t}", "public static int binarySearch(int[] num, int target) {\n\t\tint left = 0;\n\t\tint right = num.length - 1;\n\t\twhile (left <= right) {\n\t\t\tint middle = (left+right)/2;\n\t\t\tif (num[middle] == target) {\n\t\t\t\treturn middle;\n\t\t\t} else if (num[middle] < target) {\n\t\t\t\tleft = middle + 1;\n\t\t\t} else {\n\t\t\t\tright = middle - 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn -1;\n\t}", "private double angleForRegion(int region) {\n // start from angle 0, divide to the amount of regions with differences of 'angle_difference'\n EqualSegmentDivision angleDivision = EqualSegmentDivision\n .fromCenterSpacingAndAmount(0, ANGLE_DIFFERENCE, REGIONS);\n\n return angleDivision.middlePosition(region);\n }", "public int binarySearchIterative(int[] array,int target) {\n var left = 0;\n var right = array.length -1;\n while (left <= right) {\n int middle = (left + right) / 2;\n if (array[middle] == target)\n return middle;\n if (array[middle] < target)\n left = middle + 1;\n else\n right = middle - 1;\n }\n return -1;\n }", "public static int binarySearch(int[] ary, int target, int start, int end){\r\n\t\t//get the middle index\r\n\t\tint middle = (end-start)/2 + start;\r\n\t\tint result = 0;\r\n\t\t\r\n\t\t//Some end cases (error, out of scope, etc)\r\n\t\tif(end-start<0||target<ary[0]||target>ary[ary.length-1])\r\n\t\t\t\r\n\t\t\t//If element is not in the array display \r\n\t\t\treturn -1;\r\n\r\n\r\n\t\t//Recursive case 1: If target is less than, the next search occurs within start and middle-1\r\n\r\n\t\tif (target < ary[middle]) {\r\n\t\t\tresult = binarySearch(ary, target, start, middle-1 );\r\n\t\t}\r\n\t\t\r\n\t\t//Recursive case 2: If target is greater than, the next search occurs within middle+1 and end \r\n\t\telse if(target > ary[middle]) {\r\n\t\t\tresult = binarySearch(ary, target, middle+1, end);\r\n\t\t\r\n\t\t//End cases: If target is equal, done.\r\n\t\t}\r\n\t\telse if (target == ary[middle]) {\r\n\t\t\tresult = middle;\r\n\t\t}\r\n\r\n\t\t//Return results\r\n\t\treturn result;\r\n\t}", "public int search(int[] A, int target) {\n\n\t\tint s = 0;\n\t\tint e = A.length - 1;\n\n\t\twhile (s <= e) {\n\t\t\tint m = (s + e) / 2;\n\n\t\t\tif (target == A[m])\n\t\t\t\treturn m;\n\t\t\telse if (A[s] <= A[m]) {\n\t\t\t\tif (A[s] <= target && target < A[m])\n\t\t\t\t\te = m;\n\t\t\t\telse\n\t\t\t\t\ts = m + 1;\n\t\t\t} else {\n\t\t\t\tif (A[m] < target && target <= A[e])\n\t\t\t\t\ts = m + 1;\n\t\t\t\telse\n\t\t\t\t\te = m;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "public void calculateAngleAndRotate(){\n\t\tdouble cumarea = 0;\n\t\tdouble sina = 0;\n\t\tdouble cosa = 0;\n\t\tdouble area, angle;\n\t\tfor (int n = 0; n < rt.size();n++) {\n\t\t\tarea = rt.getValueAsDouble(rt.getColumnIndex(\"Area\"),n);\n\t\t\tangle = 2*rt.getValueAsDouble(rt.getColumnIndex(\"Angle\"),n);\n\t\t\tsina = sina + area*Math.sin(angle*Math.PI/180);\n\t\t\tcosa = cosa + area*Math.cos(angle*Math.PI/180);\n\t\t\tcumarea = cumarea+area;\n\t\t}\n\t\taverageangle = Math.abs(0.5*(180/Math.PI)*Math.atan2(sina/cumarea,cosa/cumarea)); // this is the area weighted average angle\n\t\t// rotate the data \n\t\tIJ.run(ActiveImage,\"Select All\",\"\");\n\t\tActiveImageConverter.convertToGray32();\n\t\tIJ.run(ActiveImage,\"Macro...\", \"code=[v= x*sin(PI/180*\"+averageangle+\")+y*cos(PI/180*\"+averageangle+\")]\");\n\t\treturn;\n\t}", "double adjust_angle_rotation(double angle) {\n double temp;\n temp=angle;\n if(temp>90) {\n temp=180-temp;\n }\n return temp;\n }", "private int binarySearch(int[] array, int left, int right, int target) {\n\t\tif (left > right) {\n\t\t\treturn -1;\n\t\t}\n\t\twhile (left <= right) {\n\t\t\tint mid = left + (right - left) / 2;\n\t\t\tif (array[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t} else if (array[mid] < target) {\n\t\t\t\tleft = mid + 1;\n\t\t\t} else {\n\t\t\t\tright = mid - 1;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public static native double OpenMM_AmoebaAngleForce_getAmoebaGlobalAngleCubic(PointerByReference target);", "@Override\n\tpublic int[] locate(int target) {\n\t\tint n = this.length(); //number of rows\n\t\tint min = 0;\n\t\tint max = n-1;\n\t\tint mid = 0;\n\t\tint mid_element = 0;\n\t\twhile(min <= max){\n\t\t\tmid = (min + max)/2;\n\t\t\tmid_element = inspect(mid,mid);\n\t\t\tif(mid_element == target){\n\t\t\t\treturn new int[]{mid, mid};\n\t\t\t}\n\t\t\telse if(mid_element < target){\n\t\t\t\tmin = mid + 1;\n\t\t\t}\n\t\t\telse if(mid_element > target){\n\t\t\t\tmax = mid - 1;\n\t\t\t}\n\t\t}\n\t\tif(target < mid_element){\n\t\t\tif(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r,max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c <= mid; c++){\n\t\t\t\t\tif(inspect(mid, c) == target){\n\t\t\t\t\t\treturn new int[]{mid,c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(target > inspect(0, n-1)){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse if(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r, max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c < min; c++){\n\t\t\t\t\tif(inspect(min, c) == target){\n\t\t\t\t\t\treturn new int[]{min, c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Test\n public void testFind_West_cross_boundary() {\n\n double lat1 = 0.0;\n double lon1 = -170.0;\n double lat2 = 0.0;\n double lon2 = 170.0;\n double expResult = Math.toRadians(270);\n double result = Azimuth.find(lat1, lon1, lat2, lon2);\n assertEquals(expResult, result, 0.0);\n }", "public double betweenAngle(Coordinates a, Coordinates b, Coordinates origin);", "public int angleOX() {\n if (B.getY() == A.getY()) {\r\n return 0;\r\n } else if (A.getX() == B.getX()) {\r\n return 90;\r\n }\r\n else {\r\n float fi = ((float) (B.getY() - A.getY()) / (B.getX() - A.getX()));\r\n if (fi<0){\r\n return (int)(fi*(-1));\r\n }\r\n else return (int)(fi);\r\n }\r\n }", "@Test\n public void testFind_East_cross_boundary() {\n\n double lat1 = 0.0;\n double lon1 = 170.0;\n double lat2 = 0.0;\n double lon2 = -170.0;\n double expResult = Math.toRadians(90);\n double result = Azimuth.find(lat1, lon1, lat2, lon2);\n assertEquals(expResult, result, 0.0);\n }", "int countRotation(int a[]) {\n\t\tint low = 0;\n\t\tint high = a.length - 1;\n\t\tint N = high;\n\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) / 2;\n\t\t\t// array has not been rotated at all\n\t\t\tif (a[low] <= a[high]) {\n\t\t\t\treturn low;\n\t\t\t}\n\t\t\tint next = (mid + 1) % N;\n\t\t\tint prev = (mid + N - 1) % N;\n\t\t\t// We get the pivot point so return index\n\t\t\tif (a[prev] > a[mid] && a[mid] < a[next]) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\t// Ignore the search space which is sorted because pivot point will\n\t\t\t// not lie there\n\t\t\tif (a[low] < a[mid]) {\n\t\t\t\tlow = mid + 1;\n\t\t\t} else /* if (a[mid + 1] < a[high]) */ {\n\t\t\t\thigh = mid - 1;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public int calculatePWMfromAngle(double angle) {\n return (int) restrict((angle + 1.04)/.00180, min, max);\n }", "public int find(int[] nums, int target, int start, int end){\n int middle = (start + end) / 2;\n\n while (start <= end){\n middle = (start + end) >> 1;\n if(nums[middle] == target){\n return middle;\n }\n else if(nums[middle] > target){\n end = middle - 1;\n }\n else {\n start = middle + 1;\n }\n }\n return -1;\n }", "public static int search(int[] nums, int target) {\n int low=0;\n int high=nums.length-1;\n int middle=(high+low)>>1;\n\n for(int i=0;i<nums.length;i++){\n int num = nums[middle];\n if(target>num){\n low=middle+1;\n middle=(high+low)>>1;\n }else if(target<num){\n high=middle-1;\n middle=(high+low)>>1;\n } else{\n return middle;\n }\n\n }\n\n return -1;\n }", "private float findRotation()\r\n\t{\r\n\t\t//conditionals for all quadrants and axis\r\n\t\tif(tarX > 0 && tarY > 0)\r\n\t\t{\r\n\t\t\trotation = (float) Math.atan((tarY/tarX));\r\n\t\t\trotation = (float) ((rotation*180)/Math.PI);\r\n\t\t}\r\n\t\telse if(tarX < 0 && tarY > 0)\r\n\t\t{\r\n\t\t\trotation = (float) Math.atan((tarY/tarX));\r\n\t\t\trotation = (float) ((rotation*180)/Math.PI);\r\n\t\t\trotation = 180 - Math.abs(rotation);\r\n\t\t}\r\n\t\telse if(tarX < 0 && tarY < 0)\r\n\t\t{\r\n\t\t\trotation = (float) Math.atan((tarY/tarX));\r\n\t\t\trotation = (float) ((rotation*180)/Math.PI);\r\n\t\t\trotation = 180 + Math.abs(rotation);\r\n\t\t}\r\n\t\telse if(tarX > 0 && tarY < 0)\r\n\t\t{\r\n\t\t\trotation = (float) Math.atan((tarY/tarX));\r\n\t\t\trotation = (float) ((rotation*180)/Math.PI);\r\n\t\t\trotation = 90 - Math.abs(rotation);\r\n\t\t\trotation = 270 + rotation;\r\n\t\t}\r\n\t\telse if(tarX > 0 && tarY == 0)\r\n\t\t\trotation = 0;\r\n\t\telse if(tarX == 0 && tarY > 0)\r\n\t\t\trotation = 90;\r\n\t\telse if(tarX < 0 && tarY == 0)\r\n\t\t\trotation = 180;\r\n\t\telse if(tarX == 0 && tarY < 0)\r\n\t\t\trotation = 270;\r\n\t\t\r\n\t\treturn (rotation - 90);\r\n\t}", "public int[] searchRange(int[] A, int target) {\n int left = 0 ;\n int right = A.length - 1;\n int mid;\n int[] lr = new int[2];\n while(left <= right){\n \tmid = (left + right) /2 ;\n \tif(A[mid] == target){\n \t\tlr[0] = searchLeft(A,left,mid,target);\n \t\tlr[1] = searchRight(A,mid,right,target);\n \t\treturn lr;\n \t}\n \telse if (A[mid] < target){\n \t\tleft = mid + 1;\n \t}\n \telse{\n \t\tright = mid - 1;\n \t}\n }\n lr[0] = -1;\n lr[1] = -1;\n return lr;\n }", "public double getRobotNeedToTurnAngle(double destination_X, double destination_Y) {\n double destination_from_y_axis_angle = Math.toDegrees( Math.atan2(destination_X-getX(), destination_Y-getY()));\n return destination_from_y_axis_angle + getOrientation(3);\n }", "public static native double OpenMM_AmoebaAngleForce_getAmoebaGlobalAngleQuartic(PointerByReference target);", "Point rotate (double angle, Point result);", "public static double getRotationAngleInDegrees(Location centerLocation, Location targetLocation) {\n double longitudeDelta = Math.toRadians(targetLocation.longitude - centerLocation.longitude);\n double centerLocationLatitude = Math.toRadians(centerLocation.latitude);\n double targetLocationLatitude = Math.toRadians(targetLocation.latitude);\n\n double x = (Math.cos(centerLocationLatitude) * Math.sin(targetLocationLatitude))\n - (Math.sin(centerLocationLatitude) * Math.cos(targetLocationLatitude) * Math.cos(longitudeDelta));\n double y = Math.sin(longitudeDelta) * Math.cos(targetLocationLatitude);\n\n double angle = Math.toDegrees(Math.atan2(y, x));\n\n // convert the interval (-180, 180] to [0, 360)\n if (angle < 0) {\n angle += 360;\n }\n\n return angle; // note that the angle can be '-0.0'\n }", "private int searchR(Searching[] array, int start, int half, int end, int value) {\n if (value > array[end].getValue() || value < array[start].getValue()) {\n return -1;\n }\n int a = end - start;\n int b = array[end].getValue() - array[start].getValue();\n int c = value - array[start].getValue();\n int d = (c * a) / b;\n int slide = d + start;\n if (slide > end || slide < start) {\n return -1;\n }\n if (array[slide].getValue() == value) {\n return slide;\n }\n if (value < array[slide].getValue()) {\n end = slide;\n return searchR(array, start, half, end, value);\n } else {\n start = slide;\n return searchR(array, start, half, end, value);\n }\n }", "public static int binarySearch(int[] arr, int target){\n\t\tint start = 0;\n\t\tint end = arr.length - 1;\n\n\t\twhile (start <= end){\n\t\t\tint mid = (end + start) / 2;\n\t\t\tif(arr[mid] == target){\n\t\t\t\treturn mid;\n\t\t\t} else if(target < arr[mid]){\n\t\t\t\tend = mid - 1;\n\t\t\t} else if(target > arr[mid]){\n\t\t\t\tstart = mid + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "double getRotation(Point2D target, boolean pursuit);", "double getAngle(int id);", "double getAngle();", "double getAngle();", "public static native void OpenMM_AmoebaInPlaneAngleForce_setAmoebaGlobalInPlaneAnglePentic(PointerByReference target, double penticK);", "private boolean checkAngle() {\n\t\tint bornes = FILTER_BORNES;\n\t\treturn checkAngleBornes(angle, 0d, bornes) || checkAngleBornes(angle, 90d, bornes) || checkAngleBornes(angle, 180d, bornes);\n\t}", "AngleResource inclination();", "private Integer alignWithZone(Point point) {\n Zone zone = Zone.Find(target);\n if (null == zone) {\n return 0;\n }\n Double oppositeLength = point.y() - zone.drawY();\n Double adjacentLength = point.x() - zone.drawX();\n Double angle = Math.atan2(oppositeLength, adjacentLength);\n angle = Math.toDegrees(angle);\n\n return angle.intValue() + 90;\n }", "public final boolean insideRadarRange(Target target)\n{\n\tif (_rules.getRadarRange() == 0)\n\t\treturn false;\n\n\tboolean inside = false;\n\tdouble newrange = _rules.getRadarRange() * (1 / 60.0) * (Math.PI / 180);\n\tfor (double lon = target.getLongitude() - 2*Math.PI; lon <= target.getLongitude() + 2*Math.PI; lon += 2*Math.PI)\n\t{\n\t\tdouble dLon = lon - _base.getLongitude();\n\t\tdouble dLat = target.getLatitude() - _base.getLatitude();\n\t\tinside = inside || (dLon * dLon + dLat * dLat <= newrange * newrange);\n\t}\n return inside;\n}", "private Point extractVectorFromAngle(int arg) {\n double theta = Math.toRadians( 2* (double)arg );\n double dx = Cell.move_dist * Math.cos(theta);\n double dy = Cell.move_dist * Math.sin(theta);\n return new Point(dx, dy);\n }", "public void goToAngle(){\n currentAngle = getAverageVoltage2(); \r\n if (Math.abs(elevationTarget - currentAngle) <= .1){//TODO: check angle\r\n off();\r\n // System.out.println(\"off\");\r\n } else if (elevationTarget > currentAngle && elevationTarget < maxLimit){\r\n raise();\r\n //System.out.println(\"raise\");\r\n } else if (elevationTarget < currentAngle && elevationTarget > minLimit){\r\n //System.out.println(\"lower\");\r\n } \r\n \r\n }", "private int binarySearchRecursive(int[] array,int target,int left,int right) {\n if (left > right)\n return -1;\n\n int middle = (left + right) / 2;\n\n if (array[middle] == target)\n return middle;\n\n if (array[middle] < target)\n return binarySearchRecursive(array,target,middle+1,right);\n\n return binarySearchRecursive(array, target,left,middle-1);\n }", "public int binarySearch(int[] nums, int target) {\n // write your code here\n if (nums == null || nums.length == 0) return -1;\n int start = 0, end = nums.length - 1;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] == target) {\n end = mid;\n }\n else if (nums[mid] < target) {\n start = mid;\n }\n else {\n end = mid;\n }\n }\n if (nums[start] == target) return start;\n if (nums[end] == target) return end;\n return -1;\n }", "double getCalibratedLevelAngle();", "static int binarySearch(int arr[], int start, int end, int target ){\n if(start>end){\n return -1;\n }\n int mid = start+(end-start)/2;\n \n if(arr[mid] == target && (mid==0 || arr[mid-1]!=target)){\n return mid;\n }\n if(arr[mid] == target){\n return mid;\n }\n if(arr[mid]>=target && arr[mid]>arr[start]){\n return binarySearch(arr,start,mid-1,target);\n }\n // else if(arr[mid]<arr[start] && arr[mid]<target){\n // return binarySearch(arr,mid+1,end,target);\n // }\n return binarySearch(arr,mid+1,end,target);\n }", "public int indexOf(E target) {\n\t\tint first = 0;\n\t\tint last = data.size() - 1;\n\n\t\twhile (first <= last) {\n\t\t\tint mid = (first + last) / 2;\n\t\t\tif (cmp.compare(target, data.get(mid)) == 0) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\telse if (cmp.compare(target, data.get(mid)) < 0) {\n\t\t\t\tlast = mid - 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfirst = mid + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "private static int binarySearchMine(int[] data, int target, int low, int high) {\n while (low <= high) {\n int median = (low + high) / 2;\n int current = data[median];\n if (current == target) {\n return median;\n } else if (target < current) {\n return binarySearchMine(data, target, low, median - 1);\n } else {\n return binarySearchMine(data, target, median + 1, high);\n }\n }\n return -1;\n }", "public int search(int[] nums, int target) {\n if (null == nums || nums.length == 0) {\n return -1;\n }\n int start = 0;\n int end = nums.length - 1;\n while (start <= end) {\n int mid = (start + end) / 2;\n if (nums[mid] == target)\n return mid;\n if (nums[start] <= nums[mid]) {\n if (target < nums[mid] && target >= nums[start])\n end = mid - 1;\n else\n start = mid + 1;\n }\n if (nums[mid] <= nums[end]) {\n if (target > nums[mid] && target <= nums[end])\n start = mid + 1;\n else\n end = mid - 1;\n }\n }\n return -1;\n }", "public static int search(int[] nums, int target) {\n\n int length = nums.length;\n int i = 0;\n int j = length - 1;\n if (length == 0) return -1;\n\n while (true) {\n int index = (i + j) / 2;\n\n int value = nums[index];\n if (value == target) return index;\n\n //Using the invariant that either i - mid OR mid-j has\n //to be sorted at any point of the computation\n if (nums[j] >= value) {\n if (target > value && target <= nums[j]) i = index;\n else if (target > value && target > nums[j]) j = index;\n else j = index;\n }\n else {\n if (target < value && target >= nums[i]) j = index;\n else if (target < value && target < nums[i]) i = index;\n else i = index;\n }\n\n if (i + 1 == j) {\n if (nums[i] == target) return i;\n if (nums[j] == target) return j;\n return -1;\n }\n\n if (i == j || i >= length || j >= length) return -1;\n }\n\n }", "public static int binarySearch(int[] numbers, int target) {\n int min = 0;\n int max = numbers.length - 1;\n \n while (min <= max) {\n int mid = (max + min) / 2;\n if (numbers[mid] == target) {\n return mid; // found it!\n } else if (numbers[mid] < target) {\n min = mid + 1; // too small\n } else { // numbers[mid] > target\n max = mid - 1; // too large\n }\n }\n \n return -1; // not found\n }", "public static native int OpenMM_AmoebaInPlaneAngleForce_addAngle(PointerByReference target, int particle1, int particle2, int particle3, int particle4, double length, double quadraticK);", "private double getGyroError(double targetAngle) {\n double error = targetAngle - imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.XZY, AngleUnit.DEGREES).thirdAngle;\n\n // keep the error on a range of -179 to 180\n while(opModeIsActive() && error > 180) error -= 360;\n while(opModeIsActive() && error <= -180) error += 360;\n\n return error;\n }", "public double findAngleOfAttack() {\n\t\tdouble dy = this.trailingPt.y - this.leadingPt.y; // trailingPt goes first since positive numbers are down\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// y-axis in Canvas\n\t\tdouble dx = this.leadingPt.x - this.trailingPt.x;\n\t\treturn Math.atan2(dy, dx);\n\t}", "private static int binarySearch(int[] arr, int low, int high, int target) {\n\n\t\tif (low <= high) {\n\n\t\t\tint mid = low + (high - low) / 2;\n\n\t\t\tif (arr[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t}\n\n\t\t\tif (arr[mid] < target) {\n\t\t\t\treturn binarySearch(arr, mid + 1, high, target);\n\t\t\t} else {\n\t\t\t\treturn binarySearch(arr, low, mid - 1, target);\n\t\t\t}\n\n\t\t}\n\n\t\treturn -1;\n\t}", "private int binarySearch(int[] array, int min, int max, int target){\r\n\r\n //because there is often not an answer that is equal to our target,\r\n //this algorithm is deisgned to find the element that it would go after in the array\r\n //because sometimes that is smaller than anything in the list it could bisect at a value that is not ideal.\r\n //however the final check handles 4 possible answers so this is not really an issue.\r\n if(target >= array[max]) return max;\r\n else if(target < array[min]) return min;\r\n if(min + 1 == max) return min;\r\n\r\n int midPoint = (min + max) / 2;\r\n\r\n if(target > array[midPoint]){\r\n return binarySearch(array, midPoint, max, target);\r\n }else return binarySearch(array, min, midPoint, target);\r\n }", "int findElement(int a[], int x) {\n\t\tint low = 0;\n\t\tint high = a.length - 1;\n\t\twhile (low <= high) {\n\t\t\tint mid = (low + high) / 2;\n\t\t\t//If we found the element simply return the index\n\t\t\tif (a[mid] == x) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\t// Check for the sorted half\n\t\t\telse if (a[mid] < a[high]) {\n\t\t\t\tif (x > a[mid] && x <= a[high]) {\n\t\t\t\t\tlow = mid + 1;\n\t\t\t\t} else {\n\t\t\t\t\thigh = mid - 1;\n\t\t\t\t}\n\t\t\t} else if (a[low] < a[mid]) {\n\t\t\t\tif (x >= a[low] && x < a[mid]) {\n\t\t\t\t\thigh = mid - 1;\n\t\t\t\t} else {\n\t\t\t\t\tlow = mid + 1;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public static int binarySearch(String[] strings,\n String target) {\n int min = 0;\n int max = strings.length - 1;\n \n while (min <= max) {\n int mid = (max + min) / 2;\n int compare = strings[mid].compareTo(target);\n if (compare == 0) {\n return mid; // found it!\n } else if (compare < 0) {\n min = mid + 1; // too small\n } else { // compare > 0\n max = mid - 1; // too large\n }\n }\n \n return -1; // not found\n }", "public static int findAngle(float x0, float y0, float x1, float y1){\n\t\t\n\t\treturn (int)(Math.atan2(-(x1 - x0), -(y1 - y0))/Math.PI * 180) + 180;\n\t}", "public static double angleApproach(double current, double wanted, double divide){\n\t\t//if (dirY(1, current - wanted) > 0)\n\t\t\treturn approach(current, wanted, divide);\n\t\t/*else\n\t\t\treturn approach(current, wanted - 360, divide);*/\n\t}", "public double getStartAngle();", "public static int binarySearch2(int[] numbers, int target) {\n int min = 0;\n int max = numbers.length - 1;\n \n int mid = -1;\n while (min <= max) {\n mid = (max + min) / 2;\n if (numbers[mid] == target) {\n return mid; // found it!\n } else if (numbers[mid] < target) {\n min = mid + 1; // too small\n } else { // numbers[mid] > target\n max = mid - 1; // too large\n }\n mid = (max + min) / 2;\n }\n \n return -min - 1; // not found\n }", "public abstract IAttackable getEnemyInSearchArea(ShortPoint2D centerPos, IAttackable movable, short minSearchRadius, short maxSearchRadius,\n\t\t\t\t\t\t\t\t\t\t\t\t\t boolean includeTowers);", "public boolean search(int[] nums, int target) {\n if (nums == null || nums.length == 0) return false;\n int l = 0;\n int r = nums.length - 1;\n int m;\n while (l <= r) {\n m = (l + r) / 2; \n if (nums[m] == target) return true;\n int low, high;\n if (nums[m] >=nums[l]) {\n if(nums[m] == nums[l]){\n l++;\n }\n else{\n if (nums[l] <= target && target < nums[m]) {\n r = m - 1;\n }\n else {\n l = m + 1;\n }\n }\n }\n else {\n if (nums[m] == nums[r]){\n r--;\n } \n else{\n if (nums[m] < target && target <= nums[r]) {\n l = m + 1;\n }\n else {\n r = m - 1;\n }\n }\n }\n }\n return false;\n }", "@Test\n public void testFind_North() {\n\n double lat1 = 0.0;\n double lon1 = 0.0;\n double lat2 = 10.0;\n double lon2 = 0.0;\n double expResult = Math.toRadians(0);\n double result = Azimuth.find(lat1, lon1, lat2, lon2);\n assertEquals(expResult, result, 0.0);\n }", "public int searchBigSortedArray(ArrayReader reader, int target) {\n int start = 0, end = start + 2;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (reader.get(mid) < target) {\n start = mid;\n end *= 2;\n }\n else {\n end = mid;\n }\n }\n if (reader.get(start) == target) return start;\n if (reader.get(end) == target) return end;\n return -1;\n }", "public double angleTo(Ball ball) {\n \treturn angleTo(ball.getPosition());\n }", "public double findAngle() {\n return 0d;\n }", "public static int findRotationPoint(String[] words, int beginIndex, int endIndex){\n\t\tif (endIndex - beginIndex == 1){\n\t\t\t// xmin, apple\n\t\t\treturn (words[beginIndex].compareTo(words[endIndex]) > 0) ? beginIndex : -1;\n\t\t}\n\t\tif (endIndex - beginIndex == 2){\n\t\t\tint index = findRotationPoint(words, beginIndex, beginIndex + 1);\n\t\t\tif (index == -1){\n\t\t\t\tindex = findRotationPoint(words, beginIndex + 1, endIndex);\n\t\t\t}\n\t\t\treturn index;\n\t\t}\n\t\t// 3, 4, 5, 6\n\t\tint space = endIndex - beginIndex + 1;\n\t\tspace = space / 3; // 1\n\t\tint mid1 = beginIndex + space; // 1\n\t\tint mid2 = mid1 + space; // 2\n\n\t\tint index;\n\t\t// Found the right section\n\t\tif (words[mid1].compareTo(words[mid2]) > 0){\n\t\t\tindex = findRotationPoint(words, mid1, mid2);\n\t\t}\n\t\telse if (words[beginIndex].compareTo(words[mid1]) > 0){\n\t\t\tindex = findRotationPoint(words, beginIndex, mid1);\n\t\t}\n\t\telse {\n\t\t\t// (words[mid2].compareTo(words[endIndex]) > 0)\n\t\t\tindex = findRotationPoint(words, mid2, endIndex);\n\t\t}\n\t\treturn index;\n\t}", "static int BinarySearch(int[] arr, int target, int start, int end) {\n boolean isAsc = arr[start] < arr[end];\n\n while(start <= end) {\n // find the middle element\n// int mid = (start + end) / 2; // might be possible that (start + end) exceeds the range of int in java\n int mid = start + (end - start) / 2;\n\n if (arr[mid] == target) {\n return mid;\n }\n\n if (isAsc) {\n if (target < arr[mid]) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n } else {\n if (target > arr[mid]) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n }\n }\n return -1;\n }", "@Test\n public void testFind_West() {\n\n double lat1 = 0.0;\n double lon1 = 0.0;\n double lat2 = 0.0;\n double lon2 = -10.0;\n double expResult = Math.toRadians(270);\n double result = Azimuth.find(lat1, lon1, lat2, lon2);\n assertEquals(expResult, result, 0.0);\n }", "public double getAngle();", "public static native void OpenMM_AmoebaInPlaneAngleForce_getAngleParameters(PointerByReference target, int index, IntByReference particle1, IntByReference particle2, IntByReference particle3, IntByReference particle4, DoubleByReference length, DoubleByReference quadraticK);", "public double getTargetAngle(){\n return lastKnownAngle;\n }", "private int findXInCircularSortedArray(int[] array, int x, int size){\n\t\tint start = 0;\n\t\tint end = size-1;\n\t\twhile(start <= end){\n\t\t\tint mid = (start + end)/2;\n\t\t\tif(array[mid] == x){\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\tif(array[mid] <= array[end]){\n\t\t\t\tif(x > array[mid] && x<= array[end])\n\t\t\t\t\tstart = mid+1;\n\t\t\t\telse\n\t\t\t\t\tend = mid -1;\n\t\t\t}else if (array[mid] >= array[start]){\n\t\t\t\tif(x >= array[start] && x < array[mid]){\n\t\t\t\t\tend = mid-1;\n\t\t\t\t}else\n\t\t\t\t\tstart = mid+1;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public static double getAngle(double startAngle, double endAngle) {\n startAngle = normaliseAngle(startAngle);\n endAngle = normaliseAngle(endAngle);\n return Math.abs(Math.min(getAngle(startAngle, endAngle, true), getAngle(startAngle, endAngle, false)));\n }", "@Test\n public void testBinarySearch() {\n System.out.println(\"binarySearch\");\n int[] index = {10, 11, 12, 13, 14};\n int key = 12;\n int begin = 0;\n int end = 5;\n int expResult = 2;\n int result = Utils.binarySearch(index, key, begin, end);\n assertEquals(expResult, result);\n }" ]
[ "0.6185388", "0.61131847", "0.60918283", "0.5905936", "0.58982897", "0.5739034", "0.5704122", "0.56761205", "0.5625069", "0.55626166", "0.5464072", "0.538875", "0.53876275", "0.53764343", "0.53667635", "0.5266698", "0.5250641", "0.5241136", "0.5233075", "0.52249634", "0.5196076", "0.5195393", "0.5190748", "0.5182866", "0.5172627", "0.51662713", "0.5165808", "0.51204187", "0.5104492", "0.50894713", "0.5082562", "0.50801617", "0.5065638", "0.5058901", "0.50553423", "0.5046451", "0.50034106", "0.499731", "0.49949542", "0.4988483", "0.49819058", "0.49717575", "0.49706337", "0.49551648", "0.49464628", "0.49464253", "0.49463058", "0.49449793", "0.49430948", "0.49424624", "0.4935975", "0.49127525", "0.4912391", "0.49116135", "0.4908489", "0.49036378", "0.4903205", "0.4903205", "0.4890307", "0.48876208", "0.48409846", "0.48395833", "0.48383287", "0.48258284", "0.482262", "0.4807573", "0.47963792", "0.47957432", "0.47955018", "0.4790756", "0.47863653", "0.47832382", "0.47676015", "0.47640893", "0.4761915", "0.47598308", "0.4758305", "0.47390237", "0.47328678", "0.47317138", "0.4725528", "0.4719508", "0.47187018", "0.47139594", "0.4712151", "0.4711122", "0.47110212", "0.47104433", "0.47090185", "0.4708732", "0.4708463", "0.4707994", "0.47043067", "0.47034764", "0.46992183", "0.4690384", "0.46882167", "0.46836558", "0.46826395", "0.4682268" ]
0.523533
18
Checks object string for Anagrams. Just simply sorts the strings and see if they line up equally. Object string cannot be the same exact word in the list.
public List<String> match(List<String> someList) { char[] objectWord = this.aWord.toCharArray(); Arrays.sort(objectWord); List<String> answer = new ArrayList<>(); HashMap<String, Integer> mapForEachWord = new HashMap<>(); for (int i = 0; i < someList.size(); i++) { String wordFromList = someList.get(i).toLowerCase(); //mapForEachWord = processWord(wordFromList); char[] listWordArray = wordFromList.toCharArray(); Arrays.sort(listWordArray); if (Arrays.equals(listWordArray, objectWord) && !this.aWord.equals(wordFromList)) { answer.add(someList.get(i)); } } return answer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isAnagrams(String s1, String s2) {\n char[] ss1 = s1.toCharArray();\n \n char[] ss2 = s2.toCharArray();\n \n Arrays.sort(ss1);\n Arrays.sort(ss2);\n return ss1.equals(ss2);\n\n }", "public boolean checkForAnagrams(String inp) {\n return (new StringBuffer(inp).reverse().toString().equals(inp));\n }", "private static boolean isAnagram(String str, String anagram) {\n\n\t\tchar[] string = str.toCharArray();\n\t\tchar[] anag = anagram.toCharArray();\n\n\t\tArrays.sort(string);\n\t\tArrays.sort(anag);\n\n\t\treturn Arrays.equals(string, anag);\n\n\t}", "public static void main(String[] args) {\n\t\tString str=\"army\";\n\t\tString str1=\"mary\";\n\t\tchar arr[]=str.toLowerCase().toCharArray();\n\t\tchar arr1[]=str1.toLowerCase().toCharArray();\n\t\tArrays.sort(arr);\n\t\tArrays.sort(arr1);\n\t\tif(Arrays.equals(arr, arr1))\n\t\t{\n\t\t\tSystem.out.println(\"given strings are anagrams\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"given strings are not anagram\");\n\t\t}\n\t\t\n\n\t}", "boolean isAnagram(String str1, String str2){\n\t\tString s1 = str1.replaceAll(\"\\\\s\",\"\");\n\t\tString s2 = str2.replaceAll(\"\\\\s\",\"\");\n\t\t\n\t\t//\n\t\tboolean check = true;\n\t\tif(s1.length()!=s2.length())\n\t\t{\n\t\t\tcheck = false;\n\t\t}\n\t\telse{\n\t\t\ts1=sortArray(s1);\n\t\t\ts2=sortArray(s2);\n\t\t\tcheck = s1.equalsIgnoreCase(s2);\n\t\t}\n\treturn check;\n\t}", "static boolean areAnagram(String sa, String sb) {\n\n // **** populate character arrays ****\n char[] aa = sa.toCharArray();\n char[] ab = sb.toCharArray();\n\n // **** sort character arrays ****\n Arrays.sort(aa);\n Arrays.sort(ab);\n\n // **** traverse arrays checking for mismatches ****\n for (int i = 0; i < aa.length; i++) {\n if (aa[i] != ab[i]) {\n return false;\n }\n }\n\n // **** strings are anagrams ****\n return true;\n }", "public boolean checkAnagram(char[] str1, char[] str2)\n {\n// Finding lengths of strings\n int len1 = str1.length;\n int len2 = str2.length;\n// If lengths do not match then they cannot be anagrams\n if (len1 != len2)\n return false;\n// Sort both strings\n Arrays.sort(str1);\n Arrays.sort(str2);\n// Comparing the strings which are sorted earlier\n for (int i = 0; i < len1; i++)\n if (str1[i] != str2[i])\n return false;\n return true;\n }", "public boolean isAnagrams(String inputA, String inputB) {\n String one = inputA.toLowerCase();\n String two = inputB.toLowerCase();\n return sameLength(one, two) && sameLetters(one, two) && sameLetterCounts(one, two);\n }", "public static boolean areAnagrams(String firstWord, String secondWord) {\n\t\tif (firstWord.length() != secondWord.length()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tStringBuilder firstSequence = new StringBuilder(firstWord.toLowerCase());\n\t\tStringBuilder secondSequence = new StringBuilder(secondWord.toLowerCase());\n\t\t\n\t\tSort.quickSort(firstSequence);\n\t\tSort.quickSort(secondSequence);\n\t\n\t\tfor (int i = 0; i < firstSequence.length(); i++) {\n\t\t\tif (firstSequence.charAt(i) != secondSequence.charAt(i)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "static boolean areAnagram(char[] str1, char[] str2)\n\t{\n\t\t// Get lengths of both strings\n\t\tint n1 = str1.length;\n\t\tint n2 = str2.length;\n\n\t\t// If length of both strings is not same,\n\t\t// then they cannot be anagram\n\t\tif (n1 != n2)\n\t\t\treturn false;\n\n\t\t// Sort both strings\n\t\tArrays.sort(str1);\n\t\tArrays.sort(str2);\n\n\t\t// Compare sorted strings\n\t\tfor (int i = 0; i < n1; i++)\n\t\t\tif (str1[i] != str2[i])\n\t\t\t\treturn false;\n\n\t\treturn true;\n\t}", "public boolean checkAnagram(String s1, String s2) {\n if (s1.length() != s2.length()) {\n return false;\n }\n char[] stringArr1 = s1.toCharArray();\n char[] stringArr2 = s2.toCharArray();\n Arrays.sort(stringArr1);\n Arrays.sort(stringArr2);\n\n for (int i = 0; i < stringArr1.length; i++) {\n if (stringArr1[i] != stringArr1[i]) {\n return false;\n }\n }\n return true;\n }", "public static boolean isAnagramFuncApproach(String str1, String str2) {\n List<String> list1 = str1.chars()\n .sorted()\n .mapToObj(c -> Character.valueOf((char) c))\n .map(object -> Objects.toString(object, null))\n .collect(Collectors.toList());\n\n List<String> list2 = str2.chars()\n .sorted()\n .mapToObj(c -> Character.valueOf((char) c))\n .map(object -> Objects.toString(object, null))\n .collect(Collectors.toList());\n\n return list1.equals(list2);\n }", "public static boolean anagram() {\n\t\tboolean isAnagram = false;\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tSystem.out.println(\"enter first string\");\n\t\tString string1 = scanner.nextLine();\n\t\tSystem.out.println(\"enter second string\");\n\t\tString string2 = scanner.nextLine();\n\t\tString space1 = string1.replaceAll(\" \",\"\");\n\t\tString space2 = string2.replaceAll(\" \",\"\");\n\t\tString lower1 = string1.toLowerCase();\n\t\tString lower2 = string2.toLowerCase();\n\t\tchar[] array1 = space1.toCharArray();\n\t\tchar[] array2 = space2.toCharArray();\n\t\t\n\t\t\n\t\tif (array1.length == array2.length) \n\t\t{\n\t\t\tfor (int i = 0; i < array1.length; i++) {\n\t\t\t\tfor (int j = i+1; j < array1.length; j++) {\n\t\t\t\t\tif (array1[i] > array1[j]) {\n\t\t\t\t\t\tchar temp = array1[i];\n\t\t\t\t\t\tarray1[i] = array1[j];\n\t\t\t\t\t\tarray1[j] = temp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (int i = 0; i < array1.length; i++) {\n\t\t\t\tfor (int j = i+1; j < array1.length; j++) {\n\t\t\t\t\tif (array2[i] > array2[j]) {\n\t\t\t\t\t\tchar temp = array2[i];\n\t\t\t\t\t\tarray2[i] = array2[j];\n\t\t\t\t\t\tarray2[j] = temp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (int i = 0; i < array1.length; i++) {\n\t\t\t\tfor (int j = i; j <=i; j++) {\n\t\t\t\t\tif (array1[i] == array2[j]) {\n\t\t\t\t\t\tcount++;\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\tif (count == array1.length) {\n\t\t\t\tisAnagram=true;\n\n\t\t\t} \n\t\t\telse {\n\t\t\t\tisAnagram = false;\n\n\t\t\t}\n\t\t} \n\t\telse \n\t\t{\n\t\t\tisAnagram = false;\n\t\t}\n\t\treturn isAnagram;\n\t}", "public static boolean isAnagramImperApproach(char[] str1, char[] str2) {\n int n1 = str1.length;\n int n2 = str2.length;\n\n if (n1 != n2) return false;\n\n Arrays.sort(str1);\n Arrays.sort(str2);\n\n for (int i = 0; i < n1; i++) {\n if (str1[i] != str2[i]) {\n return false;\n }\n }\n return true;\n }", "public static boolean isAnagram(String str1, String str2) {\n\t\tif(str1.length() != str2.length())\n\t\t\treturn false;\n\t\t/* count chars for each string */ \n\t\tint[] charSet1 = countChar(str1);\n\t\tint[] charSet2 = countChar(str2);\n\t\t/* compare two char set to see if anagram */\n\t\tfor(int i = 0; i < charSet1.length; i++) {\n\t\t\tif(charSet1[i] != charSet2[i])\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString s1=sc.nextLine();\r\nString s2=sc.nextLine();\r\ns1=s1.replaceAll(\"\\\\s\",\"\");\r\ns2=s2.replaceAll(\"\\\\s\",\"\");\r\ns1=s1.toLowerCase();\r\ns2=s2.toLowerCase();\r\nchar str1[]=s1.toCharArray();\r\nchar str2[]=s2.toCharArray();\r\nArrays.sort(str1);\r\nArrays.sort(str2);\r\nboolean k=true;\r\nif(s1.length()!=s2.length())\r\n\tk=false;\r\nelse\r\n{\r\nk=Arrays.equals(str1,str2);\t\r\n}\r\nif(k==false)\r\n\tSystem.out.print(\"not annagram\");\r\nelse\r\n\tSystem.out.print(\"annagram\");\r\n\t}", "public static boolean isAnagram(String str, String str1) {\n\t\tif (str.length() != str1.length()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tchar[] strChArr = str.toCharArray();\n\t\tchar[] str1ChArr = str1.toCharArray();\n\t\t\n//\t\tSystem.out.println(Arrays.toString(strChArr));\n//\t\tSystem.out.println(Arrays.toString(str1ChArr));\n\t\t\n\t\tArrays.sort(strChArr);\n\t\tArrays.sort(str1ChArr);\n\t\t\n//\t\tSystem.out.println(Arrays.toString(strChArr));\n//\t\tSystem.out.println(Arrays.toString(str1ChArr));\n\t\t\n\n//\t\tfor (int i = 0; i < strChArr.length; i++) {\n//\t\t\tif(strChArr[i] != str1ChArr[i]) {\n//\t\t\t\treturn false;\n//\t\t\t}\n//\t\t}\n\t\t\n//\t\treturn true;\n\t\t\n\t\treturn Arrays.equals(strChArr, str1ChArr);\n\t}", "public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n String s1,s2;\n s1=sc.nextLine();\n s2=sc.nextLine();\n s1=s1.toLowerCase();\n s2=s2.toLowerCase();\n if(s1.length()!=s2.length()) \n System.out.println(\"Not an anagram\");\n char[] c1=s1.toCharArray();\n char[] c2=s2.toCharArray();\n Arrays.sort(c1);\n Arrays.sort(c2);\n \tif(Arrays.equals(c1, c2))\n System.out.println(\"anagram\");\n \telse\n System.out.println(\"Not an anagram\");\n }", "public static boolean isAnagram2(String word, String anagram) {\r\n\t\tchar[] charFromWord = word.toCharArray();\r\n\t\tchar[] charFromAnagram = anagram.toCharArray();\r\n\t\tArrays.sort(charFromWord);\r\n\t\tArrays.sort(charFromAnagram);\r\n\t\t\r\n\t\treturn Arrays.equals(charFromWord, charFromAnagram);\r\n\t}", "public static void main(String[] args) {\n String str1 = \"listen\";\n String str2 = \"silent\";\n for (int i = 0; i < str1.length(); i++) {\n str2 = str2.replaceFirst(\"\" + str1.charAt(i), \"\");\n }\n System.out.println(str2.isEmpty() ? \"Anagram\" : \"NOT Anagram\");\n\n/*\n //Approach Two:\n String str1 = \"listen\";\n String str2 = \"silent\";\n String str11 = \"\";\n String str22 = \"\";\n char[] ch1 = str1.toCharArray();\n char[] ch2 = str2.toCharArray();\n Arrays.sort(ch1);\n Arrays.sort(ch2);\n for (char each:ch1) {\n str11+=each;\n }\n for (char each:ch2) {\n str22+=each;\n }\n System.out.println(str11.equalsTo(str22)? \"Anagram\" : \"NOT Anagram\");\n\n */\n/*\n\n //Approach Three:\n public static boolean Same(String str12, String str2) {\n str1 = new TreeSet<String>(Arrays.asList( str1.split(\"\") ) ).toString( );\n str2 = new TreeSet<String>(Arrays.asList( str2.split(\"\") ) ).toString( );\n return str1.equals(str2); }\n*/\n }", "public static boolean isAnagram(String strOne, String strTwo) throws IllegalArgumentException {\n if (strOne == null || strTwo == null)\n throw new IllegalArgumentException(\"One or both strings is null\");\n\n /**\n * Replace spaces and lower case the strings, note that we could\n * do this check while building up the map, but this is somewhat simpler\n * to understand/read, and it also allows us to not have to check to index\n * out of bounds issues when iterating through characters\n */\n String strOneCopy = strOne.replaceAll(\"\\\\s\", \"\").toLowerCase();\n String strTwoCopy = strTwo.replaceAll(\"\\\\s\", \"\").toLowerCase();\n\n if (strOne.isEmpty() || strTwo.isEmpty())\n return false;\n\n int strOneLen = strOneCopy.length();\n int strTwoLen = strTwoCopy.length();\n\n // If the strings aren't the same length they cannot be anagrams\n if (strOneLen != strTwoLen)\n return false;\n\n HashMap<Character, Integer> charCount = new HashMap<Character, Integer>();\n\n\n /**\n * Build a map of the counts of each character.\n *\n * The count will be positive if a character appears in first string one or more\n * times more than it appears in the second string\n *\n * The count will be negative if a character appears in second string one or more\n * times more than it appears in the first string\n */\n for (int i = 0; i < strOneLen; i++) {\n\n /**\n * Get the character from string one, we're not worried about out of bound index issues here\n * as we've already checked that the strings are the same length so there should\n * be characters at every index here for both strings\n */\n char charValKey = strOneCopy.charAt(i);\n\n int charKeyCount = 0;\n\n // Check if we've already seen this character and get the existing count if so\n if (charCount.containsKey(charValKey))\n charKeyCount = charCount.get(charValKey);\n\n // Increment the count\n charCount.put(charValKey, ++charKeyCount);\n\n\n /**\n * Get the character from string two, we're not worried about out of bound index issues here\n * as we've already checked that the strings are the same length so there should\n * be characters at every index here for both strings\n */\n charValKey = strTwoCopy.charAt(i);\n charKeyCount = 0;\n\n // Check if we've already seen this character and get the existing count if so\n if (charCount.containsKey(charValKey))\n charKeyCount = charCount.get(charValKey);\n\n // Decrement the count\n charCount.put(charValKey, --charKeyCount);\n\n }\n\n\n for (int value : charCount.values()) {\n if (value != 0)\n return false;\n }\n\n return true;\n }", "public static boolean isAnagram(char[]s1, char[]s2)\r\n{\n\t if(s1.length!=s2.length)\r\n\t\t return false; \r\n\t \r\n\t //sort both strings using Arrays sort method\r\n\t Arrays.sort(s1); \r\n\t Arrays.sort(s2);\r\n\t \r\n\t for(int i=0; i<s1.length;i++)\r\n\t if(s1[i]!=s2[i])\r\n\t\t return false; \r\n\t\r\n\treturn true; \r\n\t \r\n}", "public static boolean areAnagramsSlow(String a, String b) {\n\t\tif (a.length() != b.length()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tboolean areAnagrams = false;\n\t\t\n\t\tStringBuilder secondWord = new StringBuilder(b.toLowerCase());\n\n\t\tfor(int i = 0; i < a.length(); i++) {\n\t\t\tchar firstChar = a.charAt(i);\n\n\t\t\tfor(int j = 0; j < secondWord.length(); j++) {\n\t\t\t\tchar secondChar = secondWord.charAt(j);\n\t\t\t\tif (firstChar == secondChar) {\n\t\t\t\t\tsecondWord.deleteCharAt(j);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (secondWord.length() == 0) {\n\t\t\tareAnagrams = true;\n\t\t}\n\t\t\n\t\treturn areAnagrams;\n\t}", "boolean isUniqueUsingSorting(String str) {\n\t\tchar[] array = str.toCharArray();\n\t\t// Sorting the char array take NlogN time\n\t\tArrays.sort(array);\n\t\tfor (int i = 0; i < array.length - 1; i++) {\n\t\t\t// If adjacent characters are equal, return false\n\t\t\tif (array[i] == array[i + 1]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean isAnagram(String s, String t) {\n if (s.length() != t.length()) {\n return false;\n }\n char[] sChars = s.toCharArray();\n Arrays.sort(sChars);\n char[] tChars = t.toCharArray();\n Arrays.sort(tChars);\n\n return new String(sChars).equals(new String(tChars));\n }", "static void isAnagram(String s1, String s2) {\n\n String copyOfs1 = s1.replaceAll(\"s\", \"\");\n\n String copyOfs2 = s2.replaceAll(\"s\", \"\");\n\n //Initially setting status as true\n\n boolean status = true;\n\n if (copyOfs1.length() != copyOfs2.length()) {\n //Setting status as false if copyOfs1 and copyOfs2 doesn't have same length\n\n status = false;\n } else {\n //Changing the case of characters of both copyOfs1 and copyOfs2 and converting them to char array\n\n char[] s1Array = copyOfs1.toLowerCase().toCharArray();\n\n char[] s2Array = copyOfs2.toLowerCase().toCharArray();\n\n //Sorting both s1Array and s2Array\n\n Arrays.sort(s1Array);\n\n Arrays.sort(s2Array);\n\n //Checking whether s1Array and s2Array are equal\n\n status = Arrays.equals(s1Array, s2Array);\n }\n\n //Output\n\n if (status) {\n System.out.println(s1 + \" and \" + s2 + \" are anagrams\");\n } else {\n System.out.println(s1 + \" and \" + s2 + \" are not anagrams\");\n }\n }", "public boolean isAnagram(String s, String t) {\n if(s.length() != t.length()) return false;\n char[] chs = s.toCharArray();\n char[] cht = t.toCharArray();\n Arrays.sort(chs);\n Arrays.sort(cht);\n String ss = String.valueOf(chs);\n String tt = String.valueOf(cht);\n return ss.equals(tt);\n }", "@Override\n\tpublic boolean checkAnagram(String firstString, String secondString) {\n\t\tchar[] characters = firstString.toCharArray();\n\t\tStringBuilder sbSecond = new StringBuilder(secondString);\n\n\t\tfor(char ch : characters){\n\t\t\tint index = sbSecond.indexOf(\"\" + ch);\n\t\t\tif(index != -1){\n\t\t\t\tsbSecond.deleteCharAt(index);\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "static int sherlockAndAnagrams(String s) {\n\n // **** initialize count of anagrams ****\n int count = 0;\n\n // **** loop once per grouping of characters [1 : s.length() - 1] ****\n for (int g = 1; g < s.length(); g++) {\n\n // **** generate the base sub string ****\n for (int i = 0; i < s.length() - g; i++) {\n\n // **** starting string ****\n String bs = s.substring(i, i + g);\n\n // **** generate sub strings ****\n for (int j = i + 1; j <= s.length() - g; j++) {\n\n // **** generate current sub string ****\n String cs = s.substring(j, j + g);\n\n // **** check if anagram ****\n if (areAnagram(bs, cs)) {\n count++;\n }\n }\n }\n }\n\n // **** count of anagrams ****\n return count;\n }", "public ArrayList<String> anagrams(String[] strs) {\n HashMap<String, ArrayList<String>> rec=new HashMap<String,ArrayList<String>>();\n ArrayList<String> ans=new ArrayList<String>();\n if(strs.length==0)return ans;\n for(int i=0;i<strs.length;i++){\n char[] key=strs[i].toCharArray();\n Arrays.sort(key);\n String newkey=new String(key);\n if(rec.containsKey(newkey)){\n rec.get(newkey).add(strs[i]);\n }\n else{\n ArrayList<String> ad=new ArrayList<String>();\n ad.add(strs[i]);\n rec.put(newkey,ad);\n }\n }\n for(ArrayList<String> value:rec.values()){\n if(value.size()>1)ans.addAll(value);\n }\n return ans;\n }", "public void checkAnagram(String s, String s1) {\r\n\t\tint count=0;\r\n\t\tif(s.length()==s1.length()){\r\n\t\t\tfor(int i=0;i<s.length();i++){\r\n\t\t\t\tfor(int j=0;j<s1.length();j++){\r\n\t\t\t\t\tif(s.charAt(i)==s1.charAt(j)){\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(count==s.length()){\r\n\t\t\tSystem.out.println(\"anagram\");\r\n\t\t}else\r\n\t\t\tSystem.out.println(\"not anagram\");\r\n\t}", "public static boolean findStringAnagram(char[] str1Arr, char[] str2Arr) {\r\n\t\tif (str1Arr.length != str2Arr.length) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tArrays.sort(str1Arr);\r\n\t\t\tArrays.sort(str2Arr);\r\n\t\t\tfor (int i = 0; i < str1Arr.length; i++) {\r\n\t\t\t\tif (str1Arr[i] != str2Arr[i]) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t}", "public static boolean isAnagram (String word1, String word2){\n boolean check = false;\n String one = \"\";\n String two = \"\";\n int counter =0;\n int counter1 =0;\n for(int i=0; i<word1.length(); i++){\n counter=0;\n for(int k=0; k<word2.length(); k++){\n if(word1.charAt(i) == word2.charAt(k) ){\n counter++;\n }\n }\n if(counter ==1){\n counter1++;\n }\n }\n if (counter1 == word1.length() && counter1 == word2.length() ){\n check = true;\n }\n return check;\n }", "public static int isAnagram(String st,String st1) {\n\t\tint k=0;\n\t\tString str=remove(st);\n\t\tString str1=remove(st1);\n\t\t/*if(str.length()!=str1.length()){\n\t\t\tk=1;\n\t\t\treturn k;\n\t\t}*/\n\t\tchar[] c=toLowercase(str);\n\t\tchar[] c1=toLowercase(str1);\n\t\tchar[] stt=sort(c);\n\t\tchar[] stt1=sort(c1);\n\t\t/*for(int i=0;i<stt.length;i++)\n\t\t\tSystem.out.print(stt[i]);\n\t\tSystem.out.println();\n\t\tfor(int i=0;i<stt1.length;i++)\n\t\t\tSystem.out.print(stt1[i]);\n\t\tSystem.out.println();*/\n\t\tfor(int i=0;i<stt1.length;i++){\n\t\tif(stt[i]==stt1[i])\n\t\t\tk=1;\n\t\t}\n\t\treturn k;\n\t}", "private static boolean isAnagram(String a, String b) {\n\t\tint[] charsA = new int[26];\n\t\tint[] charsB = new int[26];\n\t\t\n\t\tfor(int i = 0 ; i < a.length(); i++)\n\t\t\tcharsA[a.charAt(i) - 'a']++;\n\t\tfor(int i = 0 ; i < b.length(); i++)\n\t\t\tcharsB[b.charAt(i) - 'a']++;\n\t\t\n\t\tfor(int i = 0 ; i < 26 ; i++) \n\t\t\tif(charsA[i] != charsB[i])\n\t\t\t\treturn false;\n\t\treturn true;\n\t}", "int main() \n{\n string s1,s2;\n cin>>s1>>s2;\n int freq[128]={0},i;\n for(i=0;i<s1.length();i++)\n freq[s1[i]]++;\n for(i=0;i<s2.length();i++)\n freq[s2[i]]--;\n for(i=0;i<128;i++)\n {\n if(freq[i]!=0)\n {\n cout<<\"Not anagrams\";\n return 0;\n }\n }\n cout<<\"Anagram\";\n}", "public boolean isAnagram(String s, String t) {\n if (s.length() != t.length()) return false; // O(1)\n int[] charFrequency = new int[26]; // O(1)\n\n for (char c : s.toCharArray()) { // O(N)\n int index = c - 'a'; // O(1)\n charFrequency[index]++; // O(1)\n }\n\n for (char c : t.toCharArray()) { // O(N)\n int index = c - 'a'; // O(1)\n if (charFrequency[index] == 0) return false; // O(1)\n charFrequency[index]--; // O(1)\n }\n\n for (int i : charFrequency) { // O(26) -> O(1)\n if (i > 0) return false; // O(1)\n }\n\n return true; // O(1)\n }", "public static List<String> getAnagrams(List<String> strings)\n {\n /*Each character 'a'-'z' can be mapped to the nth prime number, where n is the index of\n the character in the alphabet. E.g. 'a': prime(0)=2, 'b': prime(1)=3, 'c': prime(2)=5, etc.\n Compute the product of the prime number mappings of the characters in s. Anagrams will have\n the same character product. Thus we can use the product as a key to a set of anagrams.*/\n\n Map<Long, Set<String>> map = new HashMap<Long, Set<String>>();\n\n for (String s : strings)\n {\n long prod = 1;\n for (char c : s.toCharArray())\n {\n prod *= (long) getCharToPrimeMap().get(c);\n }\n if (!map.containsKey(prod))\n {\n /*Key-value pair doesn't exist, so for the new key, create a new HashSet instance\n * for the new word (not yet an anagram match)*/\n map.put(prod, new HashSet<String>());\n }\n map.get(prod).add(s);\n }\n\n /*Add only the sets in the mapping with 2 or more elements (anagram match exists) to the result list*/\n List<String> result = new ArrayList<String>(map.size());\n for (Set<String> set : map.values())\n {\n if (set.size() > 1) result.addAll(set);\n }\n\n return result;\n }", "public static boolean IsAnagram(String word, String anagram) {\r\n\t\t//We ensure that the length are the same.\r\n\t\tif(word.length() != anagram.length()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tchar[] chars = word.toCharArray();\r\n\t\t\r\n\t\tfor(char c : chars) {\r\n\t\t\tint index = anagram.indexOf(c);\r\n\t\t\tif(index != -1) {\r\n\t\t\t\tanagram = anagram.substring(0, index) + anagram.substring(index +1, anagram.length());\r\n\t\t\t}else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn anagram.isEmpty();\r\n\t}", "private static boolean anagramWord(String first, String second) {\n\t\tif(first.length()!=second.length())return false;\n\t\tint matches = 0;\n\t\tchar[] a = first.toLowerCase().toCharArray();\n\t\tchar[] b = second.toLowerCase().toCharArray();\n\t\tfor(int i=0; i<a.length; i++){\n\t\t\tfor(int j=0; j<b.length; j++){\n\t\t\t\tif(a[i]==b[j])matches++;\n\t\t\t}\n\t\t}\n\t\tif( matches==a.length && matches==b.length )return true;\n\t\treturn false;\n\t}", "public static boolean isAnagram1(String s1, String s2) {\r\n int[] arr = new int[256]; //Number of Ascii Values\r\n\r\n for (int i = 0; i < s1.length(); i++) {\r\n arr[s1.charAt(i)]++;\r\n arr[s2.charAt(i)]--;\r\n }\r\n\r\n for (int i = 0; i < arr.length; i++) {\r\n if (arr[i] != 0) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }", "public static boolean isAnagram(String first, String second) {\n first = first.toLowerCase();\n second = second.toLowerCase();\n // Two strings can't be anagrams if they're not the same length\n if (first.length() != second.length()){\n return false;\n }\n HashMap<Character, Integer> firstWord = new HashMap<Character, Integer>();\n HashMap<Character, Integer> secondWord = new HashMap<Character, Integer>();\n\n // Count character occurences in 1st word\n for(int i = 0; i < first.length(); i++){\n char key = first.charAt(i);\n firstWord.put(key, firstWord.getOrDefault(key, 0)+1);\n }\n // Count character occurrences in 2nd word\n for(int i = 0; i < second.length(); i++){\n char key = second.charAt(i);\n secondWord.put(key, secondWord.getOrDefault(key, 0)+1);\n }\n return firstWord.equals(secondWord);\n }", "@Test\n public void isAnagram() {\n\n Assert.assertEquals(true,Computation.isAnagram(\"read\",\"dear\"));\n Assert.assertEquals(false,Computation.isAnagram(\"read\",\"deard\"));\n Assert.assertEquals(false,Computation.isAnagram(\"read\",\"reaaad\"));\n Assert.assertEquals(false,Computation.isAnagram(\"readd\",\"reaad\"));\n }", "static int sherlockAndAnagrams(String s){\n // Complete this function\n ArrayList<String> substringArray = new ArrayList<>();\n for(int i=0;i<s.length();i++){\n for(int j=i+1;j<s.length()+1;j++){\n substringArray.add(s.substring(i,j));\n }\n }\n int count = countAnagrams(substringArray);\n return count;\n }", "private static boolean isAnagram2(String str, String anagram) {\n\n\t\tchar[] chararray = str.toCharArray();\n\n\t\tStringBuilder sb = new StringBuilder(anagram);\n\n\t\tfor (char ch : chararray) {\n\t\t\t\n\t\t\tint index = sb.indexOf(\"\" + ch);\n\n\t\t\tif (index != -1) {\n\n\t\t\t\tsb.deleteCharAt(index);\n\t\t\t} else {\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn sb.length() == 0 ? true : false;\n\t}", "public static boolean compare (TreeMap<Character, Integer> m1, TreeMap<Character, Integer> m2) {\n if (m1.keySet().size() != m2.keySet().size()) {\n return false; // Words do not contain the same number of variants of characters\n } else {\n for (char c : m1.keySet()) {\n if (!m2.containsKey(c)) {\n return false; // Words do not have the same characters\n } else {\n if (m1.get(c) != m2.get(c)) {\n return false; // Words do not have the same number of the same characters\n }\n }\n }\n }\n\n return true; // The word is an anagram\n }", "public boolean isAnagram(String s, String t) {\n HashMap<Character, Integer> map = new HashMap<>();\n\n // Return false if the strings are of different length\n if (s.length() != t.length()) {\n return false;\n }\n\n /**\n * Loop through the string and update the count in the hashmap in the following\n * way Increment the counter for the character from string1 Decrement the\n * counter for the character from string2\n */\n\n for (int i = 0; i < s.length(); i++) {\n map.put(s.charAt(i), map.getOrDefault(s.charAt(i), 0) + 1);\n map.put(t.charAt(i), map.getOrDefault(t.charAt(i), 0) - 1);\n }\n\n /**\n * Check if all characters in the hashmap as 0, if yes, return true, \n * else return false, as it isn't a valid anagram\n */\n\n for (Map.Entry mapElement : map.entrySet()) {\n\n if ((int) mapElement.getValue() != 0) {\n return false;\n }\n\n }\n\n return true;\n }", "static int sherlockAndAnagrams(String s) {\n int anagramCount = 0;\n HashMap<String, Integer> map = new HashMap<>();\n\n int length = s.length();\n int wordSize = 1;\n while (wordSize != length) {\n for(int i = 0; i <= length-wordSize; i++) {\n char[] charArray = s.substring(i, i+wordSize).toCharArray();\n Arrays.sort(charArray);\n String sortedWord = new String(charArray);\n Integer num = map.get(sortedWord);\n if(num == null)\n map.put(sortedWord, 1);\n else {\n map.put(sortedWord, num+1);\n anagramCount += num;\n }\n }\n wordSize++;\n }\n\n return anagramCount;\n }", "public static List<String> funWithAnagrams(List<String> s) {\n \tSet<String> dontRemove = new HashSet<String>();\n Set<String> removeMe = new HashSet<String>();\n for (String s1 : s) {\n char temp1[] = s1.toCharArray();\n Arrays.sort(temp1);\n String sort1 = new String(temp1);\n for (String s2 : s) {\n \tif (s1.equalsIgnoreCase(s2)) continue;\n \telse {\n\t // sort both strings\n\t char temp2[] = s2.toCharArray();\n\t Arrays.sort(temp2);\n\t String sort2 = new String(temp2);\n\t // compare sorted strings\n\t if (!dontRemove.contains(s1) && !dontRemove.contains(s2) && sort1.equalsIgnoreCase(sort2)) {\n\t// \tSystem.out.println(\"sort1 \" + sort1 + \" \\n\" + \"sort2 \" + sort2 );\n\t removeMe.add(s2);\n\t System.out.println(\"remove \" + s2);\n\t dontRemove.add(s1);\n\t System.out.println(\"dontRemove \" + s1);\n\t }\n \t}\n }\n }\n for (String s3 : removeMe) {\n \tSystem.out.println(\"remove : \" + s3);\n s.remove(s3);\n }\n System.out.println(\"\" + s);\n return s;\n }", "public static List<String> anagrams(String[] strs) {\n ArrayList<String> ret = new ArrayList<String>();\n if (strs == null || strs.length == 0) return ret;\n HashMap<String, ArrayList<String>> map = new HashMap<String, ArrayList<String>>();\n for (int i = 0; i < strs.length; ++i) {\n String temp = strs[i];\n char[] chars = temp.toCharArray();\n Arrays.sort(chars);\n String sorted = new String(chars);\n if (map.containsKey(sorted)) {\n map.get(sorted).add(strs[i]);\n }\n else {\n ArrayList<String> list = new ArrayList<String>();\n list.add(strs[i]);\n map.put(sorted, list);\n }\n }\n Iterator<ArrayList<String>> iter = map.values().iterator();\n while (iter.hasNext()) {\n ArrayList<String> item = (ArrayList<String>)iter.next();\n if (item.size() > 1) {\n ret.addAll(item);\n }\n }\n return ret;\n }", "static int sherlockAndAnagrams(String s) {\n int total = 0;\n for (int width = 1; width <= s.length() - 1; width++) {\n\n for(int k = 0 ;k <= s.length() - width; k++){\n\n String sub = s.substring(k, k + width);\n\n int[] subFreq = frequenciesOf(sub);\n for (int j = k + 1; j <= s.length() - width; j++) {\n String target = s.substring(j, j + width);\n if (areAnagrams(subFreq,frequenciesOf(target))) total = total + 1;\n }\n }\n }\n return total;\n }", "@Test\n\tvoid testFindAllAnagramsInAString() {\n\t\tList<Integer> actual = new FindAllAnagramsInAString().findAnagrams(\"cbaebabacd\", \"abc\");\n\t\tList<Integer> expected = Arrays.asList(0, 6);\n\t\tassertEquals(expected.size(), actual.size());\n\t\tassertEquals(new HashSet<Integer>(expected), new HashSet<Integer>(actual));\n\n\t\tactual = new FindAllAnagramsInAString().findAnagrams(\"abab\", \"ab\");\n\t\texpected = Arrays.asList(0, 1, 2);\n\t\tassertEquals(expected.size(), actual.size());\n\t\tassertEquals(new HashSet<Integer>(expected), new HashSet<Integer>(actual));\n\n\t\tactual = new FindAllAnagramsInAString().findAnagrams(\"\", \"abc\");\n\t\texpected = Arrays.asList();\n\t\tassertEquals(expected.size(), actual.size());\n\t\tassertEquals(new HashSet<Integer>(expected), new HashSet<Integer>(actual));\n\n\t\tactual = new FindAllAnagramsInAString().findAnagrams(\"baa\", \"aa\");\n\t\texpected = Arrays.asList(1);\n\t\tassertEquals(expected.size(), actual.size());\n\t\tassertEquals(new HashSet<Integer>(expected), new HashSet<Integer>(actual));\n\n\t\tactual = new FindAllAnagramsInAString().findAnagrams(\"baa\", \"aa\");\n\t\texpected = Arrays.asList(1);\n\t\tassertEquals(expected.size(), actual.size());\n\t\tassertEquals(new HashSet<Integer>(expected), new HashSet<Integer>(actual));\n\n\t\tactual = new FindAllAnagramsInAString().findAnagrams(\"bpaa\", \"aa\");\n\t\texpected = Arrays.asList(2);\n\t\tassertEquals(expected.size(), actual.size());\n\t\tassertEquals(new HashSet<Integer>(expected), new HashSet<Integer>(actual));\n\t}", "public static boolean isAnagram2(String s1, String s2) {\r\n List<Character> list = new ArrayList<>();\r\n\r\n for (char c : s1.toCharArray()) {\r\n list.add(c);\r\n }\r\n\r\n for (char c : s2.toCharArray()) {\r\n list.remove(new Character(c));\r\n }\r\n\r\n return (list.isEmpty());\r\n }", "@Test\n public void testNormalAnagrams() {\n AnagramFinderImpl anagramFinderObj = new AnagramFinderImpl();\n boolean inputNormalAnagrams = anagramFinderObj.areAnagrams(\"aba\", \"aba\");\n assertTrue(\"true\", inputNormalAnagrams);\n }", "private static List<List<String>> groupAnagramsBestCase(String[] strings) {\n List<List<String>> result = new ArrayList<>();\n Map<String, List<String>> keyToValues = new HashMap<>();\n\n for(String str : strings) {\n String key = getKey(str);\n List<String> anagrams = keyToValues.getOrDefault(key, new ArrayList<>());\n anagrams.add(str);\n\n keyToValues.put(key, anagrams);\n }\n\n result.addAll(keyToValues.values());\n return result;\n }", "public boolean containsAnagram(String s, String t) {\n\t\tint[] tmap = new int[26];\n\t\tfor (char c : t.toCharArray())\n\t\t\ttmap[c - 'A']++;\n\t\tint p1 = 0, p2 = 0;\n\t\tint minimumLen = Integer.MAX_VALUE;\n\t\tint expandedLength = t.length();\n\t\twhile (p1 < s.length() && p1 < s.length()) {\n\t\t\tif (tmap[s.charAt(p2++) - 'A']-- > 0) expandedLength--;\n\t\t\twhile (expandedLength == 0) {\n\t\t\t\tif (p2 - p1 < minimumLen) {\n\t\t\t\t\tminimumLen = p2 - p1;\n\t\t\t\t\tif (minimumLen == t.length()) return true;\n\t\t\t\t}\n\t\t\t\tif (p1 >= s.length()) break;\n\t\t\t\t// Exists in t.\n\t\t\t\tif (tmap[s.charAt(p1++) - 'A']++ == 0) expandedLength++;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public List<List<String>> groupAnagrams(String[] strs) {\n \n int len = strs.length;\n Hashtable<String, List<String>> anagrams = new Hashtable<>();\n \n for(int i=0; i<len; i++){\n char[] sorted = strs[i].toCharArray(); \n Arrays.sort(sorted);\n String key = String.valueOf(sorted);\n List<String> temp = new ArrayList<>();\n \n if(anagrams.containsKey(key)){\n temp = anagrams.get(key);\n \n }\n temp.add(strs[i]);\n anagrams.put(key, temp);\n }\n \n \n List<List<String>> answer = new ArrayList<>();\n \n for(List<String> item: anagrams.values() ){\n answer.add(item);\n }\n \n return answer;\n \n }", "public boolean checkSam(String stringA, String stringB) {\r\n\t\tString[] s1 = stringA.split(\" \");\r\n\t\tString[] s2 = stringB.split(\" \");\r\n\t\tif(s1.length == s2.length){\r\n\t\t\tint count = 0;\r\n\t\t\tfor (String sB : s2) {\r\n\t\t\t\tfor (String sA : s1) {\r\n\t\t\t\t\tif(sA.equals(sB)){\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(count == s2.length){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n }", "public static boolean areAnagramStringsUsingOneFrequencyArray(String word1, String word2) {\n if (word1.length() != word2.length()) {\n return false;\n }\n int[] f = new int[256];\n\n for (int i = 0; i < word1.length(); i++) {\n f[word1.charAt(i)]++;\n f[word2.charAt(i)]--;\n }\n\n for (int i = 0; i < f.length; i++) {\n if (f[i] != 0) {\n return false;\n }\n\n }\n return true;\n\n }", "@Test\n\tvoid testValidAnagram() {\n\t\t// Test for ValidAnagram\n\t\tValidAnagram tester = new ValidAnagram();\n\t\tassertTrue(tester.isAnagram(\"anagram\", \"nagaram\"));\n\t\tassertFalse(tester.isAnagram(\"rat\", \"car\"));\n\t\tassertTrue(tester.isAnagram(\"\", \"\"));\n\t\t\n\t\t// Test for ValidAnagram2\n\t\tValidAnagram2 tester2 = new ValidAnagram2();\n\t\tassertTrue(tester2.isAnagram(\"anagram\", \"nagaram\"));\n\t\tassertFalse(tester2.isAnagram(\"rat\", \"car\"));\n\t\tassertTrue(tester2.isAnagram(\"\", \"\"));\n\t}", "public boolean testAllUniqueInplace(String string) {\n\t\tif (string.length() > 128) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < string.length(); i++) {\n\t\t\tfor (int j = i + 1; j < string.length(); j++) {\n\t\t\t\tchar ith = string.charAt(i);\n\t\t\t\tchar jth = string.charAt(j);\n\n\t\t\t\tif (ith == jth) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "static int sherlockAndAnagrams(String s) {\n int anagramCount = 0;\n Map<String, Integer> map = new HashMap<>();\n for (int i = 0; i < s.length(); i++) {\n for (int k = i + 1; k <= s.length(); k++) {\n String sub = s.substring(i, k);\n System.out.println(sub);\n sub = new String(sort(sub.toCharArray()));\n int value = map.getOrDefault(sub, 0);\n if(value > 0) {\n anagramCount = anagramCount + value;\n }\n map.put(sub, value+1);\n\n }\n }\n return anagramCount;\n }", "public boolean isAnagram1(String s, String t) {\n if (s.length() != t.length()) return false;\n Function<String, Integer> countCode = str -> {\n int code = 0;\n for (int i = 0; i < str.length(); i++)\n code ^= str.charAt(i);\n return code;\n };\n return countCode.apply(s).equals(countCode.apply(t));\n }", "private static void anagramDetection(char[] firstArray, char[] secondArray) {\n int count = 0;\n for (int i = 0; i < firstArray.length; i++) {\n for (int j = 0; j < firstArray.length; j++) {\n if (firstArray[i] == secondArray[j]) {\n count += 1;\n }\n }\n }\n if (count == firstArray.length){\n System.out.println(\"Both strings are anagram\");\n }else {\n System.out.println(\"Both strings are not anagram\");\n }\n\n }", "public static List<Integer> allAnagrams(String s, String l) {\n List<Integer> ans = new ArrayList<Integer>();\n \n if(s == null || s.length() < 1 || l == null || l.length() < 1)\n return ans;\n StringBuilder sb = new StringBuilder();\n char[] sarray = s.toCharArray();\n permute(sarray,sb,0);\n for(int i = 0; i < l.length() - s.length()+1; i++){\n if(set.contains(l.substring(i,i+s.length()))){\n ans.add(i);\n }\n }\n return ans;\n }", "private static boolean isUniqueM1(String str) {\n boolean isUnique = true;\n\n for (int i = 0; i < str.length(); i++) {\n\n for (int j = i + 1; j < str.length(); j++) {\n if (str.charAt(i) == str.charAt(j)) {\n isUnique = false;\n }\n }\n }\n return isUnique;\n }", "public static boolean checkForAnagram(final String a, final String b) {\n boolean isAnagram = false;\n\n if(a == null || b == null){\n throw new IllegalArgumentException(\"Invalid input\");\n }\n if(a.length() != b.length()){\n return isAnagram;\n }\n char [] lowerCaseA = a.trim().toLowerCase().toCharArray();\n String upperCaseB= b.trim().toLowerCase();\n boolean check =true;\n for(int i =0; i<lowerCaseA.length ; i++){\n Character c = lowerCaseA[i];\n int n = c;\n if(c >=95 && c <=122){\n if(! upperCaseB.contains(c.toString())){\n check=false;\n break;\n }\n }\n else {\n continue;\n }\n }\n if(check){\n isAnagram =true;\n }\n\n return isAnagram;\n }", "boolean belongsTo(String stringa) {\n\t\t stringGenerator.reinit();\n\t\t String current;\n\t\t do {\n\t\t\t current = stringGenerator.next();\n\t\t\t if (ric.belongsTo(current)) {\n\t\t\t\t if(current.equals(stringa)){\n\t\t\t\t \treturn true;\n\t\t\t\t }\n\t\t\t\t if(SLO.compare(current, stringa) > 0){\n\t\t\t\t \treturn false;\n\t\t\t\t }\n\t\t\t }\n\t\t }while (true);\n\t}", "public static boolean areAnagramsUsingTwoFrequencyArrays(String firstString, String secondString) {\n if (firstString.length() != secondString.length()) {\n return false;\n }\n\n int[] f1 = new int[256];\n int[] f2 = new int[256];\n\n for (int i = 0; i < firstString.length(); i++) {\n f1[firstString.charAt(i)]++;\n }\n for (int i = 0; i < secondString.length(); i++) {\n f2[secondString.charAt(i)]++;\n }\n\n for (int i = 0; i < f1.length; i++) {\n for (int j = 0; j < f2.length; j++) {\n if (f1[i] != f2[i]) {\n return false;\n }\n }\n\n }\n return true;\n }", "public boolean isAlienSorted(String[] words, String order) {\n int[] alphabet = new int[26];\n for (int i = 0; i < order.length(); i++) {\n alphabet[order.charAt(i) - 'a'] = i;\n }\n \n // compare each two words together\n for (int i = 0; i < words.length - 1; i++) {\n \n // minimum length of the two word\n int min = Math.min(words[i].length(), words[i + 1].length());\n \n for (int m = 0; m < min; m++) {\n int charI = words[i].charAt(m);\n int charJ = words[i + 1].charAt(m);\n if (alphabet[charI - 'a'] < alphabet[charJ - 'a']) {\n break;\n } else if (alphabet[charI - 'a'] > alphabet[charJ - 'a']) {\n return false;\n // at the minimum and the shorter word is before longer word\n } else if (m == min - 1 && words[i].length() > words[i + 1].length()) {\n return false;\n }\n }\n }\n \n return true; \n }", "private static List<List<String>> groupAnagrams(String[] strs) {\n List<List<String>> result = new ArrayList<List<String>>();\n\n HashMap<Integer, ArrayList<String>> map = new HashMap<Integer, ArrayList<String>>();\n for(String str: strs){\n int key = 0;\n for(int i=0; i<str.length(); i++){\n key = key + (str.charAt(i)-'a');\n }\n\n if(map.containsKey(key)){\n map.get(key).add(str);\n }else{\n ArrayList<String> al = new ArrayList<String>();\n al.add(str);\n map.put(key, al);\n }\n }\n\n result.addAll(map.values());\n\n return result;\n }", "public static String isPanagram(String inputString) {\n\t\tchar[] inputStringChars = inputString.toCharArray();\n\t\tchar[] alphabets = new char[26];\n\t\tfor (int i = 0; i < inputStringChars.length; i++) {\n\t\t\tif ((inputStringChars[i] - 65) >= 0 && (inputStringChars[i] - 65) <= 97) {\n\t\t\t\talphabets[inputStringChars[i] - 65] = '1';\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < alphabets.length; i++) {\n\t\t\tif (alphabets[i] == '\\u0000') {\n\t\t\t\treturn \"not pangram\";\n\t\t\t}\n\t\t}\n\t\treturn \"pangram\";\n\t}", "public boolean isAnagram(String a, String b) {\n if (a.length() != b.length()) {\n return false;\n }\n\n HashMap<Character, Integer> aTable = new HashMap<>();\n\n //Store the counts of all the characters of the first string in a hashmap\n for (int i = 0; i < a.length(); i++) {\n Character currChar = a.charAt(i);\n if (aTable.containsKey(currChar)) {\n aTable.put(currChar, aTable.get(currChar) + 1);\n } else {\n aTable.put(currChar, 1);\n }\n }\n\n //Now iterate through the second string and decrement the count of the characters\n for (int j = 0; j < b.length(); j++) {\n Character currChar = b.charAt(j);\n if (!aTable.containsKey(currChar)) {\n return false;\n } else if (aTable.get(currChar) == 0) {\n return false;\n } else if (aTable.get(currChar) > 0) {\n aTable.put(currChar, aTable.get(currChar) - 1);\n }\n\n }\n\n return true;\n\n\n }", "static boolean isPermutation_1(String a, String b){\n //get the sorted format of a string\n String sorted_A = sortString(a);\n String sorted_B = sortString(b);\n return sorted_A.equals(sorted_B);\n }", "void ifUnique(char inputCharArray[])\n\t{\n\t\tint count=0;\n\t\t\n\t\tfor(int i=0; i<inputCharArray.length; i++)\n\t\t{\n\t\t\t//int ab = (int)inputCharArray[i]; \n\t\t\tchar ab = inputCharArray[i];\n\t\t\tfor (int j=0; j<i; j++)\n\t\t\t{\n\t\t\t\tif(ab==inputCharArray[j])\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"String not unique!\");\n\t\t\t\t\tcount = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor (int j=i+1; j<inputCharArray.length; j++)\n\t\t\t{\n\t\t\t\tif(ab==inputCharArray[j])\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"String not unique!\");\n\t\t\t\t\tcount = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (count==1)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif (count==0)\n\t\t{\n\t\t\tSystem.out.print(\"String unique!\");\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\tString a = \"aabbbc\", b =\"cbad\";\n\t\t// a=abc\t\t\t\tb=cab\n\t\t\n\t\t\n\t\tString a1 =\"\" , b1 = \"\"; // to store all the non duplicated values from a\n\t\t\n\t\tfor(int i=0; i<a.length();i++) {\n\t\t\tif(!a1.contains(a.substring(i,i+1)))\n\t\t\t\ta1 += a.substring(i,i+1);\n\t\t}\n\t\t\n\t\tfor(int i=0; i<b.length();i++) {\n\t\t\tif(!b1.contains(b.substring(i,i+1)))\n\t\t\t\tb1 += b.substring(i,i+1);\n\t\t}\n\t\t\t\t\n\t\tchar[] ch1 = a1.toCharArray();\n\t\tSystem.out.println(Arrays.toString(ch1));\n\t\t\n\t\tchar[] ch2 = b1.toCharArray();\n\t\tSystem.out.println(Arrays.toString(ch2));\n\t\t\n\t\tArrays.sort(ch1);\n\t\tArrays.sort(ch2);\n\t\t\n\t\tSystem.out.println(\"=====================================================\");\n\t\t\n\t\tSystem.out.println(Arrays.toString(ch1));\n\t\tSystem.out.println(Arrays.toString(ch2));\n\t\t\n\t\tString str1 = Arrays.toString(ch1);\n\t\tString str2 = Arrays.toString(ch2);\n\t\t\n\t\tif(str1.contentEquals(str2)) {\n\t\t\tSystem.out.println(\"true, they build out of same letters\");\n\t\t}else { \n\t\t\tSystem.out.println(\"fasle, there is something different\");\n\t\t}\n\t\t\n\n\t\t\n\t\t// SHORTER SOLUTION !!!!!!!!!!!!!!!!!!!!\n\t\t\n//\t\tString Str1 = \"aaaabbbcc\", Str2 = \"cccaabbb\";\n//\t\t\n//\t\tStr1 = new TreeSet<String>( Arrays.asList(Str1.split(\"\"))).toString();\n//\t\tStr2 = new TreeSet<String>( Arrays.asList(Str2.split(\"\"))).toString();\n//\t\tSystem.out.println(Str1.equals(Str2));\n//\t\t\n//\t\t\n\t\t\n}", "private boolean areCorrectlyOrdered( int i0, int i1 )\n {\n int n = commonLength( i0, i1 );\n \tif( text[i0+n] == STOP ){\n \t // The sortest string is first, this is as it should be.\n \t return true;\n \t}\n \tif( text[i1+n] == STOP ){\n \t // The sortest string is last, this is not good.\n \t return false;\n \t}\n \treturn (text[i0+n]<text[i1+n]);\n }", "public boolean anagram(char [] a, char [] b);", "public ArrayList<ArrayList<Integer>> anagrams(final List<String> a) \n {\n //The idea here is simple we can make sure two strings are anagrams if we sort them and then check \n HashMap<String,ArrayList<Integer>> map=new HashMap<>();\n for(int i=0;i<a.size();i++)\n {\n char c[]=a.get(i).toCharArray();//pick every String\n Arrays.sort(c);//sort the string\n String s=new String(c);\n ArrayList<Integer> b;\n if(map.containsKey(s))//put its relative index in the HashMap\n {\n b=map.get(s);\n b.add(i+1);\n map.put(s,b);\n }\n else\n {\n b=new ArrayList<>();\n b.add(i+1);\n map.put(s,b);\n }\n }\n //Add the values of HashMap to ArrayList\n ArrayList<ArrayList<Integer>> ans=new ArrayList<>();\n for(Map.Entry<String,ArrayList<Integer>> it:map.entrySet())\n {\n ans.add(it.getValue());\n }\n \n return ans;\n }", "public static void main(String[] args) {\n\t\tAnagrams q = new Anagrams();\r\n\t\tString s1 = \"abcd\";\r\n\t\tString s2 = \"acbd\";\r\n\t\tString s3 = \"bcad\";\r\n\t\tString s4 = \"acb\";\r\n\t\tString s5 = \"abc\";\r\n\t\tString s6 = \"abd\";\r\n\t\tString s7 = \"abdc\";\r\n\t\tString s8 = \"ac\";\r\n\t\t//ArrayList<String> result = new ArrayList<String>();\r\n\t\tString[] strs = {s1,s2,s3,s4,s5,s6,s7,s8};\r\n\r\n\t\tList<String> list = q.anagrams(strs);\r\n\t\t//char[] charArray = {'h','e','l','l','o'};\r\n\t\tfor(String s:list){\r\n\t\t\tSystem.out.println(s);\r\n\t\t}\r\n\t\t//System.out.println(charArray.toString());\r\n\t}", "public static void main(String[] args) {\n String firstString = \"abcd\";\n String secondString = \"dcba\";\n\n // two string may be anagram of they are same in length, character wise.\n if (firstString.length() != secondString.length()) {\n System.out.println(\"Both string are not anagram\");\n }else {\n char[] firstArray = firstString.toCharArray();\n char[] secondArray = secondString.toCharArray();\n\n anagramDetection(firstArray, secondArray);\n }\n }", "public static boolean permuteCompare(String strA, String strB) {\n\t\tif(strA == null || strB == null)\n\t\t\treturn false;\n\t\t\n\t\t/*\n\t\t * Step 2: Check if the length of both strings is not equal, then they will not match\n\t\t */\n\t\tif(strA.length() != strB.length()) \n\t\t\treturn false;\n\t\t\n\t\t/*\n\t\t * Step 3: Convert both strings to ArrayList (split method looks like not a elegant way, but works)\n\t\t */\n\t\tList<String> strAList = new ArrayList<String>(Arrays.asList(strA.split(\"\")));\n\t\tList<String> strBList = new ArrayList<String>(Arrays.asList(strB.split(\"\")));\n\t\t\n\t\t/*\n\t\t * Step 4: Sort both ArrayList using Collections\n\t\t */\n\t\tCollections.sort(strAList);\n\t\tCollections.sort(strBList);\n\t\t\n\t\t/*\n\t\t * Step 5: Compare them using equals that will compare size and each element value (Ref: https://docs.oracle.com/javase/8/docs/api/java/util/AbstractList.html#equals-java.lang.Object-)\n\t\t */\n\t\tif(!strAList.equals(strBList))\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "public static boolean areAnagrams(String anagram, String compare) {\n String sortedAnagram = AnagramUtil.sort(anagram);\n String sortedCompare = AnagramUtil.sort(compare);\n return sortedAnagram.equals(sortedCompare);\n }", "public boolean isScramble(String s1, String s2) {\n int lena = s1.length();\n int lenb = s2.length();\n if(lena != lenb) return false;\n if(lena == 0||s1.equals(s2)) return true;\n char[] crr1 = s1.toCharArray();\n char[] crr2 = s2.toCharArray();\n Arrays.sort(crr1);\n Arrays.sort(crr2);\n if(!Arrays.equals(crr1,crr2)) return false;\n \n int i = 1; \n while(i< lena){\n String a1 = s1.substring(0,i);\n String b1 = s1.substring(i);\n String a2 = s2.substring(0,i);\n String b2 = s2.substring(i);\n if(isScramble(a1,a2) && isScramble(b1,b2)) return true;\n String a3 = s2.substring(lenb - i);\n String b3 = s2.substring(0, lenb-i);\n if(isScramble(a1,a3) && isScramble(b1,b3)) return true;\n i++;\n }\n return false;\n }", "public static void verifyStringsAreInOrder(ArrayList<String> loadedStrings) {\n\t\tHashMap<String, Integer> lastAbbreviationNums = new HashMap<String, Integer>();\n\t\tString lastAbbreviation = \"\";\n\t\tfor (int i : foundStringsIndexList) {\n\t\t\tString abbreviation = extractAbbreviationFromString(loadedStrings.get(i));\n\t\t\tif (!abbreviation.equals(lastAbbreviation)) {\n\t\t\t\tString lettersAbbreviation = lettersAbbreviationAt(abbreviation, 0);\n\t\t\t\tint abbreviationNum = Integer.parseInt(abbreviation.substring(lettersAbbreviation.length()));\n\t\t\t\tInteger lastAbbreviationNum = lastAbbreviationNums.get(lettersAbbreviation);\n\t\t\t\tif (lastAbbreviationNum == null) {\n\t\t\t\t\tif (abbreviationNum != 1)\n\t\t\t\t\t\tSystem.out.println(abbreviation + \" not preceded by any abbreviation\");\n\t\t\t\t} else {\n\t\t\t\t\tif (abbreviationNum != lastAbbreviationNum + 1)\n\t\t\t\t\t\tSystem.out.println(abbreviation + \" preceded by \" + lettersAbbreviation + lastAbbreviationNum);\n\t\t\t\t}\n\t\t\t\tlastAbbreviationNums.put(lettersAbbreviation, abbreviationNum);\n\t\t\t\tlastAbbreviation = abbreviation;\n\t\t\t}\n\t\t}\n\t}", "public List<List<String>> groupAnagramsApproach2(String[] strs) {\n\t\tif (strs.length == 0) return new ArrayList();\n\t\tMap<String, List> ans = new HashMap<String, List>();\n\t\tint[] count = new int[26];\n\t\tfor (String s : strs) {\n\t\t\tArrays.fill(count, 0);\n\t\t\tfor (char c : s.toCharArray()) count[c - 'a']++;\n\n\t\t\tStringBuilder sb = new StringBuilder(\"\");\n\t\t\tfor (int i = 0; i < 26; i++) {\n\t\t\t\tsb.append('#');\n\t\t\t\tsb.append(count[i]);\n\t\t\t}\n\t\t\tString key = sb.toString();\n\t\t\tif (!ans.containsKey(key)) ans.put(key, new ArrayList());\n\t\t\tans.get(key).add(s);\n\t\t}\n\t\treturn new ArrayList(ans.values());\n\t}", "private static boolean isEnglishAlphabetPermutation(String str1, String str2) {\r\n if (!validate(str1, str2)) {\r\n return false;\r\n }\r\n if (str1.isEmpty() && str2.isEmpty()) { // simple case\r\n return true;\r\n }\r\n str1 = str1.toLowerCase();\r\n str2 = str2.toLowerCase();\r\n\r\n // we can use array instead of hash map\r\n // because we definitely know amount of characters\r\n int[] counter = new int[CHARS_AMOUNT];\r\n int startCode = Character.codePointAt(\"a\", 0);\r\n for (int i = 0; i < str1.length(); i++) {\r\n int idx = str1.codePointAt(i) - startCode;\r\n if (idx < 0 || idx >= CHARS_AMOUNT) {\r\n throw new IllegalArgumentException(\"Unsupported character.\");\r\n }\r\n counter[idx]++;\r\n }\r\n // no need to create another array for checking\r\n for (int i = 0; i < str2.length(); i++) {\r\n int idx = str2.codePointAt(i) - startCode;\r\n if (idx < 0 || idx >= CHARS_AMOUNT) {\r\n throw new IllegalArgumentException(\"Unsupported character.\");\r\n }\r\n int checkValue = --counter[idx];\r\n if (checkValue < 0) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public static int sherlock(String s) {\n\t\tint count = 0;\n\t\t// find the substrings to find the anagrams of\n\t\t// isAnagram function\n\t\t// with k unique chars, subset is k (k + 1) / 2\n\t\t\n\t\tList<String> subsets = getALlSubstring(s);\n\t\t\n\t\tfor(int i = 0 ;i < subsets.size() ; i++) {\n\t\t\tfor(int j = i + 1 ; j < subsets.size() ; j++) {\n\t\t\t\tif(i != j && subsets.get(i).length() == subsets.get(j).length() && isAnagram(subsets.get(i), subsets.get(j)))\n\t\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "static int sherlockAndAnagrams(String s) {\n HashTable hashTable = new HashTable(s.length() * s.length() * 4);\n substrings(s).map(Solution::ordered).forEach(hashTable::insert);\n return substrings(s).map(Solution::ordered).mapToInt(s1 -> {\n hashTable.remove(s1);\n return hashTable.count(s1);\n }).sum();\n }", "static String abbreviation(String a, String b) {\r\n \r\n HashSet<Character> aSet = new HashSet<>();\r\n\r\n for(int i = 0 ; i< a.length() ; i++){\r\n aSet.add(a.charAt(i));\r\n }\r\n \r\n for(int i = 0 ; i < b.length() ; i++){\r\n \r\n if(aSet.contains(b.charAt(i)) ){\r\n aSet.remove(b.charAt(i));\r\n }\r\n else if(aSet.contains(Character.toLowerCase(b.charAt(i)))){\r\n aSet.remove(Character.toLowerCase(b.charAt(i)));\r\n }\r\n else{\r\n return \"NO\";\r\n }\r\n \r\n\r\n }\r\n\r\n Iterator<Character> it = aSet.iterator();\r\n while(it.hasNext()){\r\n\r\n if(!isLowerCase(it.next())){\r\n return \"NO\";\r\n }\r\n }\r\n return \"YES\";\r\n \r\n /*\r\n String regex = \"\";\r\n for(int i = 0 ; i < b.length() ; i++){\r\n regex += \"[a-z]*\" + \"[\" + b.charAt(i) + \"|\" + Character.toLowerCase(b.charAt(i)) + \"]\";\r\n }\r\n regex += \"[a-z]*\";\r\n Pattern ptrn = Pattern.compile(regex);\r\n Matcher matcher = ptrn.matcher(a);\r\n\r\n return matcher.matches() ? \"YES\" : \"NO\";\r\n*/\r\n \r\n /*\r\n int aPtr = 0;\r\n\r\n //b e F g H\r\n // E F H\r\n for(int i = 0 ; i < b.length() ; i++){\r\n\r\n if(aPtr + 1 >= a.length())\r\n return \"NO\";\r\n //if(aPtr + 1 == a.length() && i + 1 == b.length())\r\n // return \"YES\";\r\n\r\n System.out.println(b.charAt(i) + \" \" + a.charAt(aPtr));\r\n if(b.charAt(i) == a.charAt(aPtr)){\r\n aPtr++;\r\n }else if(b.charAt(i) == Character.toUpperCase(a.charAt(aPtr)) && isLowerCase(a.charAt(aPtr))){\r\n aPtr++;\r\n\r\n } else if(b.charAt(i) != a.charAt(aPtr) && !isLowerCase(a.charAt(aPtr))){\r\n return \"NO\";\r\n }else if(b.charAt(i) != a.charAt(aPtr) && isLowerCase(a.charAt(aPtr))){\r\n aPtr++;\r\n i--;\r\n }\r\n\r\n\r\n\r\n }\r\n for(int i = aPtr ; i < a.length() ; i++){\r\n if(!isLowerCase(a.charAt(i)))\r\n return \"NO\";\r\n }\r\n\r\n return \"YES\";\r\n */\r\n\r\n }", "public static List<List<String>> groupAnagrams2(String[] strs) {\n Map<String, List<String>> map = new HashMap<>();\n for(String s : strs){\n char[] ch = s.toCharArray();\n Arrays.sort(ch);\n String key = String.valueOf(ch);\n if(!map.containsKey(key)) map.put(key, new ArrayList<>());\n map.get(key).add(s);\n }\n return new ArrayList<>(map.values());\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tAnagramCheck();\n\t\tSet<Character> se = new HashSet<Character>();\n\t\tSet<Character> se1 = new HashSet<Character>();\n\t\t\n\t\tStringBuffer sb = new StringBuffer();\n\t\tStringBuffer sb1 = new StringBuffer();\n\t\tString str =\"javav\";\n\t\t\n\t\tfor(int i =0; i <str.length();i++)\n\t\t{\n\t\t\tCharacter ch = str.charAt(i);\n\t\t\t\n\t\t\tif(!se.contains(ch))\n\t\t\t{\n\t\t\t\tse.add(ch);\n\t\t\t\tsb.append(ch);\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tse1.add(ch);\n\t\t\t\tsb1.append(ch);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"The duplicates after removed \"+sb.toString());\n\t\t\n\t\tSystem.out.println(\"The duplicate item is \"+sb1.toString());\n\t}", "List<Integer> allAnagrams(String s, String l) {\n\t\t// Write your solution here.\n\t\tList<Integer> result = new ArrayList<Integer>();\n\t\tif (s == null || l == null || s.length() == 0 || l.length() == 0) {\n\t\t\treturn result;\n\t\t}\n\t\tif (s.length() > l.length()) {\n\t\t\treturn result;\n\t\t}\n\t\tMap<Character, Integer> map = countMap(s);\n\t\tint match = 0;\n\t\tfor (int i = 0; i < l.length(); i++) {\n\t\t\tchar temp = l.charAt(i);\n\t\t\tInteger count = map.get(temp);\n\t\t\tif (count != null) {\n\t\t\t\tmap.put(temp, count - 1);\n\n\t\t\t\tif (count == 1) {\n\t\t\t\t\tmatch++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i >= s.length()) {\n\t\t\t\ttemp = l.charAt(i - s.length());\n\t\t\t\tcount = map.get(temp);\n\t\t\t\tif (count != null) {\n\t\t\t\t\tmap.put(temp, count + 1);\n\t\t\t\t\tif (count == 0) {\n\t\t\t\t\t\tmatch--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (match == map.size()) {\n\t\t\t\tresult.add(i - s.length() + 1);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public boolean compare(String string) {\n\t\tif (_maoriNumber.equals(string)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public List<List<String>> anagrams(List<String> words) {\n HashMap<String, List<String>> wordsByAnagram = new HashMap<>();\n\n for (String word: words) {\n char[] sortedCharArray = word.toCharArray();\n Arrays.sort(sortedCharArray);\n\n String anagram = String.valueOf(sortedCharArray);\n\n if (wordsByAnagram.containsKey(anagram)) {\n List<String> anagrams = wordsByAnagram.get(anagram);\n anagrams.add(word);\n } else {\n ArrayList<String> anagrams = new ArrayList<>();\n anagrams.add(word);\n wordsByAnagram.put(anagram, anagrams);\n }\n }\n\n ArrayList<List<String>> result = new ArrayList<>();\n\n for (List<String> anagrams: wordsByAnagram.values()) {\n result.add(anagrams);\n }\n\n return result;\n }", "public boolean isAnagram(String firstWord, String secondWord) {\n HashMap<Character, Integer> charactersNoOccurrences = new HashMap<Character, Integer>();\n\n //Put that stuff in the hash map.\n for (char character: firstWord.toCharArray()) {\n int currentNoOccurrences = charactersNoOccurrences.containsKey(character) ?\n charactersNoOccurrences.get(character) : 0;\n\n charactersNoOccurrences.put(character, currentNoOccurrences + 1);\n }\n\n //Go through the hash map now to and retrieve occurrences, we want to finish with an empty map.\n for (char character: secondWord.toCharArray()) {\n if (!charactersNoOccurrences.containsKey(character)) {\n return false;\n }\n\n int remainingNoOccurrences = charactersNoOccurrences.get(character) - 1;\n\n if (remainingNoOccurrences < 1) {\n charactersNoOccurrences.remove(character);\n } else {\n charactersNoOccurrences.put(character, remainingNoOccurrences);\n }\n }\n\n return charactersNoOccurrences.isEmpty();\n }", "public boolean equals(String object) {\r\n if (NumItems == object.length() && containsAll(object)) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "public List<List<String>> groupAnagrams(String[] strs) {\n\t\tif (strs.length == 0) return new ArrayList();\n\t\tMap<String, List> ans = new HashMap<String, List>();\n\t\tfor (String s : strs) {\n\t\t\tchar[] ca = s.toCharArray();\n\t\t\tArrays.sort(ca);\n\t\t\tString key = String.valueOf(ca);\n\t\t\tif (!ans.containsKey(key)) ans.put(key, new ArrayList());\n\t\t\tans.get(key).add(s);\n\t\t}\n\t\treturn new ArrayList(ans.values());\n\t}", "public static boolean abrevChecker(String abrv, String word) {\r\n \r\n //our 3rd word make by decrypting the given word\r\n String newWord = \"\";\r\n\r\n //splitting our two inputs into arrayLists and redefining them\r\n char[] firstWord = abrv.toCharArray();\r\n char[] secondWord = word.toCharArray();\r\n\r\n /*a for loop to check if each letter in word is inside the abbrevbation\r\n and creating a new word made of the commmon letters*/\r\n for (char letter : secondWord) {\r\n if (abrv.indexOf(letter) != -1) {\r\n newWord += letter;\r\n }\r\n }\r\n \r\n //check if the abrevation contains any forgein letters that word doesnt have\r\n for (char letter : firstWord) {\r\n if (word.indexOf(letter) == -1) {\r\n return false;\r\n\r\n /*if the abbrevation contains only letters found in word checks if\r\n the abbrevation is inside the new word*/\r\n } else if (word.indexOf(letter) != -1) {\r\n if (newWord.contains(abrv)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n }\r\n\t\treturn false;\r\n }", "public static void main(String[] args) {\n String str1=\"abc\";\r\n String s=new String(\"abc\");\r\n //Integer i=new Integer(110);\r\n //Integer j=new Integer(120);\r\n Sortstring sortstring=new Sortstring();\r\n Scanner sc = new Scanner(System.in);\r\n // sortstring.s=sc.next();\r\n //char[] string =sortstring.s.toCharArray();\r\n // Arrays.sort(string);\r\n System.out.println(Objects.equals(s,str1));\r\n //System.out.println(str1.equals(str));\r\n //System.out.println(i.equals(j));\r\n //System.out.println(str.equals(s));\r\n // System.out.println(Arrays.toString(string));\r\n // System.out.println(String.valueOf(string));\r\n //System.out.println(Objects.equals());\r\n\r\n }", "public boolean isUnique(String input) {\n if (input == null || input.length() == 0) {\n return false;\n }\n\n char[] chars = input.toCharArray();\n Arrays.sort(chars);\n for (int i = 0; i < chars.length - 1; i += 1) {\n if (chars[i+1] == chars[i]) {\n return false;\n }\n }\n return true;\n }" ]
[ "0.72561175", "0.7071511", "0.70550036", "0.70359755", "0.69607365", "0.6919469", "0.6840697", "0.67159563", "0.67069215", "0.66962945", "0.6657493", "0.66379195", "0.65884316", "0.65624404", "0.6528833", "0.6499701", "0.64860344", "0.64645404", "0.64283526", "0.6420888", "0.6415396", "0.63901216", "0.63872135", "0.6336625", "0.6328599", "0.63252515", "0.63157773", "0.6296421", "0.6219831", "0.621983", "0.6214942", "0.62142", "0.6197745", "0.61796355", "0.61752117", "0.6073466", "0.60696226", "0.6053356", "0.6051527", "0.60496837", "0.6044604", "0.6044574", "0.60422117", "0.6029493", "0.6019249", "0.60099065", "0.5965609", "0.5964721", "0.59541535", "0.5949337", "0.5942922", "0.59424824", "0.59182847", "0.59134346", "0.5899027", "0.58979225", "0.5889589", "0.5880313", "0.5846864", "0.58249027", "0.5797013", "0.5787493", "0.5762962", "0.57498187", "0.57462645", "0.574593", "0.57380354", "0.57330775", "0.57330114", "0.5731376", "0.5706875", "0.57040733", "0.5686637", "0.5686201", "0.5679693", "0.56782895", "0.5660192", "0.56539506", "0.565127", "0.5647705", "0.5647284", "0.56368124", "0.56279886", "0.56095207", "0.55983627", "0.5595611", "0.55935663", "0.5591431", "0.5582097", "0.5581548", "0.5567359", "0.5557179", "0.555618", "0.55390626", "0.55321664", "0.5528101", "0.55123526", "0.5496687", "0.54900664", "0.54865354", "0.5485163" ]
0.0
-1
Effects: returns true if the item is already in the list
public boolean checkDuplicates(String value) { for (Entry i : listentries) { if (i.getName().equals(value)) return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean itemListContains(Item item){\r\n\t\treturn items.containsKey(item.getItemIdentifier());\r\n\t}", "public abstract boolean contains(Object item);", "@Override\n\tprotected boolean itemExists() {\n\t\treturn false;\n\t}", "@Override\n public boolean hasDuplicates() {\n ArrayList<String> itemList = new ArrayList(Arrays.asList(\"\"));\n Node currNode = this.head;\n while(true){\n if(itemList.contains(currNode.getItem())){ // need to edit\n return true;\n }else{\n itemList.add(currNode.getItem());\n }\n if(currNode.getNextNode() == null){\n break;\n }\n currNode = currNode.getNextNode();\n }\n return false;\n }", "public boolean contains (Object item){\n\t\t// compute the hash table index\n\t\t\t\tint index = (item.hashCode() & Integer.MAX_VALUE) % table.length;\n\n\t\t\t\t// find the item and return false if item is in the ArrayList\n\t\t\t\tif (table[index].contains((T)item))\n\t\t\t\t\treturn true;\n\t\t\t\telse\n\t\t\t\t\treturn false;\n\t}", "public boolean checkOutItem(Item item)\n {\n \t return memberItems.add(item);\n }", "public boolean contains(Item item) {\n for (Item i : items) {\n if (i == item) return true;\n }\n return false;\n }", "public boolean has(Object item) {\n JMLListEqualsNode<E> ptr = this;\n //@ maintaining (* no earlier element is elem_equals to item *);\n while (ptr != null) {\n if (elem_equals(ptr.val, item)) {\n return true;\n }\n ptr = ptr.next;\n }\n return false;\n }", "public boolean contains(E item) {\n \tDblListnode<E> n = items.getNext();\n \tfor (int k = 0; k < numItems; k++) {\n n = n.getNext();\n if (n.getData() == item) {\n \treturn true;\n }\n }\n \treturn false;\n }", "public boolean insertItem(MoviePanelBasicView item) {\r\n if (!this.contains(item)) {\r\n this.list.add(item);\r\n return true;\r\n } else {\r\n logger.debug(\"File \" + item.getFile() + \" is already in list!\");\r\n return false;\r\n }\r\n \r\n }", "public boolean isExisting() throws Exception\r\n\t\t{\r\n\t\tRouteGroup myR = (RouteGroup) myRouteGroup.get();\r\n\t\tthis.UUID = myR.getUUID();\r\n\t\t\r\n\t\tVariables.getLogger().debug(\"Item \"+this.name+\" already exist in the CUCM\");\r\n\t\treturn true;\r\n\t\t}", "@Override\n public boolean contains(T item) {\n Node n = first;\n //walk through the linked list untill you reach the end\n while(n != null) {\n //see if the item exists in the set, if it does return true\n if(n.value.equals(item))\n return true;\n //move to the next node\n n = n.next;\n }\n //if not found return false\n return false;\n }", "public boolean has(String itemName);", "public boolean contains(Type item);", "public boolean contains(int item) {\n if (item == datum() ) return true; // true upon finding the item\n else if (next() == null) return false; // false if item not found until the end of list\n else return next.contains(item); \n }", "@Override\n public boolean contains(T item) {\n return itemMap.containsKey(item);\n }", "public boolean itemExist(Object item) {\r\n\t\tfor(int i = 0; i < getItemCount(); i++)\r\n\t\t\tif(getItem(i).equals(item))\r\n\t\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public boolean checkItem () {\r\n\t\tfor (Entity e : getLocation().getWorld().getEntities())\r\n\t\t{\r\n\t\t\tdouble x = e.getLocation().getX();\r\n\t\t\tdouble z = e.getLocation().getZ();\r\n\t\t\tdouble yDiff = getSpawnLocation().getY() - e.getLocation().getY();\r\n \r\n\t\t\tif (yDiff < 0)\r\n\t\t\t\tyDiff *= -1;\r\n\r\n\t\t\tif (x == getSpawnLocation().getX() && yDiff <= 1.5 && z == getSpawnLocation().getZ()) {\r\n \r\n ShowCaseStandalone.slog(Level.FINEST, \"Potential hit on checkItem()\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tItem itemE = (Item)e;\r\n\t\t\t\t\tif (ItemStackHandler.itemsEqual(itemE.getItemStack(), getItemStack(), true)) {\r\n ShowCaseStandalone.slog(Level.FINEST, \"Existing stack: \" + itemE.getItemStack().toString());\r\n itemE.getItemStack().setAmount(1); //Removes duped items, which can occur.\r\n\t\t\t\t\t\tthis.item = itemE;\r\n\t\t\t\t\t\tscs.log(Level.FINER, \"Attaching to existing item.\");\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception ex) {}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean contains(int item) {\r\n for (int i = 0; i < NumItems; i++) {\r\n if (items[i] == item) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "@Override\n public boolean addItem(T item) {\n //Make sure the Set does not already contain the item\n if(!this.contains(item)) {\n //Make sure there is enough room for the item. If there isn't\n //resize the array\n if(numItems == arr.length)\n this.ensureCap();\n //Add the item to the end and increment numItems\n arr[numItems++] = item;\n //return true\n return true;\n }\n //if item was already in set, return false\n return false;\n }", "public boolean contains(T item) {\n Iterator<T> iterator = this.iterator();\n while (iterator.hasNext()) {\n if (iterator.next().equals(item))\n return true;\n }\n\n return false;\n }", "public boolean contains (E item)\n {\n int index = indexOf(item);\n if (index != -1)\n return true; // item found\n else\n return false; // item not found\n }", "public boolean add(T item) {\n\t\treturn list.add(item);\n\t}", "@Override\n public boolean addItem(T item) {\n //Make sure the item is not already in the set\n if(!this.contains(item)){\n //create a new node with the item, and the current first node\n Node n = new Node(item, first);\n //update first node reference\n first = n;\n //increment numItems\n numItems++;\n return true;\n }\n //if item is already in the set return false\n return false;\n }", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "boolean hasItemId();", "public boolean contains(Item item){\n if(isEmpty()) throw new NoSuchElementException(\"Failed to perfrom contains because the DList instance is empty!\");\n for(Node temp = first.next; temp.next!=null; temp=temp.next)\n if(temp.data.equals(item)) return true;\n return false; \n }", "@Override\n\tpublic boolean contains(T searchItem) {\n\n\t\tif (indexOf(searchItem) == -1) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\n\t}", "public boolean contains(Software item){\n return products.contains (item);\n }", "private boolean addBook(Book book) {\n\t\tfor (int i = 0; i < items.size(); i++)\n\t\t\tif (items.get(i).keyEquals(book))\n\t\t\t\treturn false;\n\t\titems.add(book);\n\t\treturn true;\n\t}", "public Boolean add(Item item) {\n \tif (itemCollection.containsKey(item.getItemName())) {\r\n \tif (checkAvailability(item, 1)) {\r\n \t\titem.setQuatity(item.getQuatity() + 1);\r\n \t\titemCollection.put(item.getItemName(), item);\r\n \t\treturn true;\r\n \t} else return false;\r\n } else {\r\n \titemCollection.put(item.getItemName(), item);\r\n \treturn true;\r\n }\r\n \t\r\n }", "@Override\n public boolean contains(Object item) {\n if (item == null)\n return false;\n return map.containsKey(item);\n }", "public boolean contains(Item item) {\n\t\tif (item == null)\n\t\t\treturn false;\n\t\tfor (Item other : this)\n\t\t\tif (other.equals(item))\n\t\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean contains(E element) {\r\n return items.contains(element);\r\n }", "public static boolean isDuplicate(List list, int id)\r\n {\r\n for (int i = 0; i < list.size(); i++)\r\n {\r\n int dupID = ((Integer) list.get(i)).intValue();\r\n\r\n if (dupID == id)\r\n {\r\n //slist.remove(list.get(i));\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }", "public boolean contains(E item){\n\t\treturn (find(item) != null) ? true : false;\n\t}", "public boolean isInList();", "public boolean hasItem() {\n return (this.curItem != null);\n }", "public boolean contains(final int item) {\n for (int i = 0; i < size; i++) {\n if (set[i] == item) {\n return true;\n }\n }\n return false;\n }", "public boolean putItem(@NonNull Item item) {\n return items.add(item);\n }", "@Test\n public void existsItem(){\n List <Character> list = new ArrayList<>();\n list.add('a');\n list.add('b');\n list.add('c');\n\n assertTrue(list.contains('b'));\n }", "@Test\r\n\tvoid testContains() {\r\n\t\tSortedList list = new SortedList(\"List\");\r\n\t\tlist.insert(toDoItem1);\r\n\t\tlist.insert(toDoItem2);\r\n\t\tlist.insert(toDoItem3);\r\n\t\tlist.insert(toDoItem4);\r\n\r\n\t\tif (list.contains(\"Item 1\") != true) {\r\n\t\t\tfail(\"Failed to find \\\"Item 1\\\"\");\r\n\t\t}\r\n\t\tif (list.contains(\"Item 2\") != true) {\r\n\t\t\tfail(\"Failed to find \\\"Item 2\\\"\");\r\n\t\t}\r\n\t\tif (list.contains(\"Item 3\") != true) {\r\n\t\t\tfail(\"Failed to find \\\"Item 3\\\"\");\r\n\t\t}\r\n\t\tif (list.contains(\"Item 4\") != true) {\r\n\t\t\tfail(\"Failed to find \\\"Item 4\\\"\");\r\n\t\t}\r\n\t}", "public boolean hasItem() {\n return null != item;\n }", "boolean checkItem (List<Student> search, int item){\r\n // We use for loop to search\r\n for (int i = 0; i < search.size(); i++) {\r\n // if item exists, then we reutrn true\r\n if (item == i){\r\n return true;\r\n }\r\n }\r\n // else if it doesn't, then we return false\r\n return false;\r\n }", "@Override\n public boolean contains(T item) {\n //iterate through the array and look for the item\n for(int i = 0; i < numItems; i++){\n //if it is found, return true\n if(item.equals(arr[i]))\n return true;\n }\n return false;\n }", "public boolean contains(T item){\n if (head.next == tail && tail.prev == head){\n return false;\n }\n else {\n MyDoubleNode<T> counter = head.next;\n boolean shouldContinue = true;\n while (shouldContinue){\n if (counter.next != tail){\n if (counter.data.equals(item)){\n return true;\n }\n counter = counter.next;\n shouldContinue = true;\n }\n else{\n if (counter.data.equals(item)){\n return true;\n }\n shouldContinue = false;\n }\n }\n return false;\n }\n }", "public boolean contains(T item) {\n int listSize = numItemInList();\n if (listSize == 0) {\n return false;\n }\n\n if (item.getClass() == ShadowSquare.class) {\n ShadowSquare givenSQ = (ShadowSquare) item;\n for (int i = 0; i < listSize; i++) {\n ShadowSquare listSQ = (ShadowSquare) list[startIndex + i];\n if (listSQ.getX() == givenSQ.getX() && listSQ.getY() == givenSQ.getY()) {\n return true;\n }\n }\n }\n\n for (int i = 0; i < listSize; i++) {\n if (list[i + startIndex].equals(item)) {\n return true;\n }\n }\n return false;\n }", "public boolean haveItem(Items item)\n {\n //boolean haveItem = Inventory.values().contains(item);\n return Inventory.containsValue(item);\n }", "@Test\r\n\tpublic void testContains() {\r\n\t\tAssert.assertTrue(list.contains(new Munitions(2, 3, \"iron\")));\r\n\t\tAssert.assertFalse(list.contains(new Munitions(2, 5, \"ferrum\")));\r\n\t}", "public boolean member(Object item) {\n\t\tfor (Object element : list)\n\t\t\tif (element.equals(item))\n\t\t\t\treturn true;\n\n\t\treturn false;\n\t}", "public boolean contains(E item) {\n if (item == null) {\n throw new NullPointerException();\n }\n else {\n DoublyLinkedNode<E> iter = head.getNext();\n while (iter.getNext() != null) {\n if (iter.getData().equals(item)) {\n return true;\n }\n iter = iter.getNext();\n }\n return false;\n }\n }", "public boolean containItem(String name) {\r\n for (Item i : inventoryItems) {\r\n if (i.getName() == name) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public boolean containsItem(int par1)\n {\n return this.lookupEntry(par1) != null;\n }", "public boolean contains(E item) {\n \t\n \tif(item == null) {\n \t\tthrow new IllegalArgumentException(\"Invalid parameter!\");\n \t}\n \t\n \t// create iterator instance to go thru set\n \tIterator<E> iterateSet = this.iterator(); \t\n \twhile(iterateSet.hasNext()) {\n \t\t// searches for a target item\n \t\tif( iterateSet.next().equals(item)) {\n \t\t\treturn true;\n \t\t}\n \t}\n \t\n \treturn false;\n }", "public boolean contains(E item) {\r\n\t\treturn (find(item) != null);\r\n\t}", "@Override\n\tpublic boolean contains(Object entity) {\n\t\treturn false;\n\t}", "public boolean containItem(Item item) {\r\n for (Item i : inventoryItems) {\r\n if (i.getName() == item.getName()) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public boolean contains(T elem) {\n return list.contains(elem);\n }", "public boolean containsAtMostOneItem() {\n boolean contains;\n if (start==null | start.next==null) {\n contains = true;\n }\n return contains;\n }", "public boolean addItemToList(Item item, ShoppingList list) throws ItemException {\r\n \t\tif (item == null || list == null)\r\n \t\t\tthrow new IllegalArgumentException(\"null is not allowed\");\r\n \t\t\r\n \t\tList<Item> items = persistenceManager.getItems(list);\r\n \t\titem = mergeItem(item, items);\r\n \t\t\r\n \t\tpersistenceManager.save(item, list);\r\n \t\treturn !items.contains(item);\r\n \t}", "public boolean contains(List l) {\n if (lists.contains(l.obtainTitle())) return true;\n else return false;\n }", "@Override\r\n\tpublic boolean contains(Object o) {\n\t\treturn set.contains(o);\r\n\t}", "@Test\r\n\tpublic void testContains() {\r\n\t\tassertFalse(ll.contains(t1));\r\n\t\tll.add(0, t1);\r\n\t\tassertTrue(ll.contains(t1));\r\n\t}", "public boolean addProduct(Product p) {\n// products.add(p);\n boolean prodExists = false;\n for(Product prod: products){\n if(prod.getId() == p.getId()){\n prodExists = true;\n break;\n }\n }\n if(!prodExists){\n products.add(p);\n return true;\n }\n return false;\n }", "public boolean putItems(@NonNull ArrayList<Item> items) {\n \tIterator<Item> iter = items.iterator();\n \tint insertSize = 0;\n \twhile (iter.hasNext()) {\n \t\tItem item = iter.next();\n \t this.items.add(item);\n \t insertSize++;\n \t}\n\n \treturn (items.size()==insertSize);\n }", "public boolean add(E obj)\r\n {\r\n int originalSize = this.size();\r\n listIterator(originalSize).add(obj);\r\n return originalSize != this.size();\r\n }", "public boolean add(E item) {\n if (item == null) { //Checks if the item is null if it is throws a new exception\n throw new IllegalArgumentException(\"Yeah Nah, No thanks null.\");\n }\n\n int index = findIndexOf(item); //For simplification\n\n if (data[index] != null) { //if the item at the index is not null\n if (data[index].equals(item))\n return false;\n }\n for (int i = count; i >= index; i--) { //iterates backward through the collection.\n\n if (i == index || i == 0) { //while iterating it checks if the value i is the same as index or 0, increments count and swaps the item.\n count++;\n ensureCapacity(); //checks capacity works, and if so adds item to and returns true.\n data[i] = item;\n return true;\n }\n data[i] = data[i - 1];\n }\n return false;\n }", "boolean hasItemIndex();", "boolean hasItemIndex();", "boolean hasItemIndex();", "public boolean contains ( Object o ){\n\n \tboolean doesContain = false;\n\n \tfor(int i = 0; i < list.size(); i++){\n\n if(list.get(i).equals(o)){\n doesContain = true;\n }\n\n }\n\n \treturn doesContain;\n\n }", "public boolean offer(Object item) {\r\n\r\n\t\tdata.add(item);\r\n\t\t// no size restriction so it should always be true\r\n\t\treturn true;\r\n\t}", "public boolean addNewItem(VendItem item) {\n if (itemCount < maxItems) {\n stock[itemCount] = item;\n itemCount++;\n return true;\n } else {\n return false;\n }\n }", "public Boolean contains(Integer valueToAdd) {\n return list.contains(valueToAdd);\n }", "public boolean checkExist(String itemName, int Qty) {\n\n for (int i = 0; i < inventory.size(); i++) {\n Map<String, Object> newItem = new HashMap<>();\n newItem = inventory.get(i);\n if (itemName.equals(newItem.get(\"Name\").toString())) {\n int a = Integer.parseInt((String) newItem.get(\"Amount\"));\n //isInList = true;\n if (a >= Qty) {\n isExist = true;\n break;\n } else {\n isExist = false;\n }\n } else {\n isExist = false;\n }\n\n }\n return isExist;\n\n }", "public boolean contains(E item) {\n if(head == null) {\n return false;\n } else {\n for(Node<E> cur = head; cur != null; cur = cur.next) {\n if(cur.item.equals(item)) {\n return true;\n }\n }\n return false;\n }\n }", "public boolean contains(T item) {\n synchronized(this) {\n return _treeSet.contains(item);\n }\n }", "public synchronized boolean add(Item pItem)\n {\n for(Item item : mItems)\n if(item.address.equals(pItem.address))\n {\n mIsModified = true;\n if(pItem.isEmpty())\n {\n mItems.remove(item);\n return false;\n }\n else\n {\n item.assign(pItem);\n return true;\n }\n }\n\n if(pItem.isEmpty())\n return false;\n\n mItems.add(pItem);\n mIsModified = true;\n return false;\n }", "@Override\n\tpublic boolean contains(E e) {\n\t\treturn false;\n\t}", "public boolean hasItem() {\n return this.item != null;\n }", "public boolean contains(T anEntry) {\n\t\tfor(int i=0; i<numberOfElements; i++) {\n\t\t\tif(list[i].equals(anEntry)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean hasGrabbedItem(String item) {\n return grabbedItems.contains(item);\n }", "public boolean IDUsed(int id){\n for (int i = 0 ; i< IDList.size();i++){\n if (IDList.get(i) == id){\n return true;\n }\n }\n return false;\n }", "public boolean isDupe(T element);", "public boolean itemExists(String code) {\n return cart.containsKey(code);\n }", "@Test\r\n public void testContains() {\r\n Grocery entry1 = new Grocery(\"Mayo\", \"Dressing / Mayo\", 1, 2.99f, 1);\r\n\r\n // Test element does not exist case\r\n assertFalse(instance.contains(entry1));\r\n\r\n instance.add(entry1);\r\n\r\n // Test element exists case\r\n assertTrue(instance.contains(entry1));\r\n }", "@Override\r\n\tpublic boolean isExisting() {\n\t\treturn false;\r\n\t}", "public boolean addItem(Item item, Supplier sup){\r\n //forbids the modification PO that has been Validated\r\n if ((this.currentStatusChange != null) &&\r\n \t(this.currentStatusChange.ordinal >= PoStatusCode.VALIDATED.ordinal))\r\n throw new IllegalAccessError(\"Cannot add item to PO already Validated\");\r\n \r\n for (ListIterator iter = poLineItems.listIterator() ; iter.hasNext() ;) {\r\n PoLineItem linetemp = (PoLineItem)iter.next();\r\n //increase quantity if same Item\r\n if (linetemp.getItem().equals(item)) {\r\n linetemp.incrementQuantity(1);\r\n return false;\r\n }\r\n }\r\n //new Item\r\n PoLineItem lineItem = new PoLineItem(item,1,sup);\r\n return this.poLineItems.add(lineItem);\r\n }", "public boolean add(final OrderedItem item) {\n\t\t\tfinal int i = item.getIndex();\n\t\t\tif (table[index].get(i)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ttable[index].set(i);\n\t\t\treturn true;\n\t\t}", "public boolean hasItem(final String name) {\n for (final Item item : this.getInventory()) {\n if (item.name().equals(name)) {\n return true;\n }\n }\n return false;\n }", "private boolean exist(List<PlayerTeam> l, String name) {\n boolean ex = false;\n PlayerTeam curr = l.first();\n while (curr != null) {\n if (curr.getName().equals(name))\n return true;\n curr = l.next();\n }\n return ex;\n }", "public int alreadyExists(FoodItem item){\n for(int i = 0; i < numItems; i++) {\n\n if(inventory[i]!= null) {\n if(item.isEqual(inventory[i])){\n return i;\n }\n }\n }\n return -1;\n }", "public boolean hasItem(@NonNull Item item) {\n \t// if the item is invisible, then fool the player\n \tif (!item.isVisible()) {\n \treturn false;\n } else {\n \treturn items.contains(item);\n }\n }", "boolean hasExists();", "@Override\r\n\t\tpublic boolean contains(E value) {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.contains(value);\r\n\t\t\t}\r\n\t\t}", "public boolean contains(Course c) {\n return courseList.contains(c); \n }" ]
[ "0.74427384", "0.7158621", "0.71474624", "0.7051927", "0.69931877", "0.695372", "0.68736464", "0.6869782", "0.6826087", "0.67482716", "0.6710152", "0.67070144", "0.6702035", "0.66985357", "0.6674204", "0.6651045", "0.66314536", "0.6626485", "0.66072696", "0.6586212", "0.657816", "0.6574415", "0.6570117", "0.65670073", "0.65645087", "0.65645087", "0.65645087", "0.65645087", "0.65645087", "0.65645087", "0.65645087", "0.6562253", "0.65323883", "0.65267235", "0.6502929", "0.64987457", "0.6491575", "0.6468712", "0.64582837", "0.6446712", "0.64428204", "0.64374334", "0.6435749", "0.6428791", "0.6424333", "0.64230114", "0.6412429", "0.6378587", "0.6372496", "0.6372028", "0.63591427", "0.6353184", "0.6350056", "0.6326576", "0.62994033", "0.62888926", "0.62887317", "0.62877184", "0.62876165", "0.6271534", "0.62701315", "0.6267202", "0.62450373", "0.62385285", "0.62368566", "0.6228936", "0.6220559", "0.62095773", "0.62056774", "0.6202982", "0.6202034", "0.6179289", "0.61661667", "0.61661667", "0.61661667", "0.6162015", "0.6154548", "0.61482817", "0.6144675", "0.61293185", "0.61285454", "0.6116157", "0.61154336", "0.61121213", "0.6109612", "0.6099105", "0.609701", "0.60904044", "0.6086271", "0.60758877", "0.60713774", "0.60695374", "0.6065632", "0.606203", "0.60500896", "0.6048223", "0.60431033", "0.6035316", "0.60242295", "0.602088", "0.60164773" ]
0.0
-1
REQUIRES: Non empty list Modifies: this Effects: changes a user specified entry to done Requires: Non empty list Effects: returns the size of the list of entries that are done
public int numdone(String s) { Integer i = 0; for (Entry entry : listentries) { if (entry.getStatus().equals(s)) { ArrayList<Entry> checkoff = new ArrayList<>(); checkoff.add(entry); return (checkoff.size()); } } return i; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int size()\n\t{\n\t\tint size = 0;\n\t\t\n\t\tfor (LinkedList<Entry> list : entries)\n\t\t\tsize += (list == null) ? 0 : list.size();\n\t\t\n\t\treturn size;\n\t}", "public Integer size() { return this.entries.length(); }", "public int size(){\n\t\tListMapEntry temp = first;\n\t\tint c=0;\n\t\twhile(temp!=null){\n\t\t\tc++;\n\t\t\ttemp = temp.getNext();\n\t\t}\n\t\treturn c;\n\t}", "public int getSize(){\n\t\tint size = list.size();\n\t\treturn size;\n\n\t}", "public int size ()\n {\n return this.entryMap.size ();\n }", "public int getSize() \r\n {\r\n return list.size();\r\n }", "public int sizeOfList(){\n return tasks.size();\n }", "@Override\n\tpublic int size() {\n\t\t\n\t\treturn list.size();\n\t}", "@Override\n\tpublic int getSize()\n\t{\n\t\treturn list.size();\n\t}", "public int getSize() {\n return fEntries.length;\n }", "public int size() {\n\t\treturn numEntries;\n\t}", "int getEntryCount();", "public int getSize() {\n return list.size();\n }", "@Override\n\tpublic int getSize() {\n\t\treturn numberOfEntries;\n\t}", "public int numberOfEntries();", "public synchronized int size(){\n return list.size();\n }", "@Override\n public int size() {\n return list.size();\n }", "public int size()\n\t{\n\t\treturn list.size();\n\t}", "public int size()\n\t{\n\t\treturn list.size();\n\t}", "public int getNumberOfEntries();", "public int size(){\n\t\treturn list.size();\n\t}", "public int size(){\n\t\treturn list.size();\n\t}", "public int size() {\n\t return list.size();\n }", "public int getSize() \n { \n return numberOfEntries;\n }", "@Override\n public int getRetainedEntries(final boolean valid) {\n if (otherCheckForSingleItem(mem_)) { return 1; }\n final int preLongs = extractPreLongs(mem_);\n final int curCount = (preLongs == 1) ? 0 : extractCurCount(mem_);\n return curCount;\n }", "public int size(){\n return list.size();\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 final int size() {\r\n\t\tint SIZE = workoutList.size();\r\n\r\n\t\treturn SIZE;\r\n\t}", "public int size() {\n\t\treturn list.size();\n\t}", "public int getNumberOfEntries() ;", "public abstract long getCompleteListSize();", "public int size() {\n\t\tint numElements = 0;\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tif (list[i] != null) {\n\t\t\t\tnumElements++;\n\t\t\t}\n\t\t}\n\t\treturn numElements;\n\t}", "public int getSize () {\n return this.list.size();\n }", "public int size()\n {\n return list.size();\n }", "public int listSize(){\r\n return counter;\r\n }", "public int size(){\n\n \treturn list.size();\n\n }", "public int size() {\n return list.size();\n }", "public int size() {\n return lists.getSize();\n }", "public int size()\n\t{\n\t\treturn listSize;\n\t}", "public int getSize()\n {\n return pList.size();\n }", "public int getEntryCount() {\n return entry_.size();\n }", "public int getNumEntries ()\n\t{\n\t\treturn entries.size ();\n\t}", "public int getNumberOfEntries()\r\n\t{\r\n\t\treturn tr.size();\r\n\t}", "public int sizeOfCompletedList()\n\t {\n\t \tList <WebElement> items= CompletedList;\n\t \t\n\t \treturn items.size();\n\t }", "private int sizeOfList(Student [] list) {\r\n\t\t\r\n\t\tint size = 0;\r\n\t\tStudent sizechecker;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\twhile (true) {\r\n\t\t\t\t\r\n\t\t\t\tsizechecker = list[size];\r\n\t\t\t\tsize++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e) { \r\n\t\t \r\n\t\t}\r\n\t\t\r\n\t\treturn size;\r\n\t}", "public int size()\r\n {\r\n return nItems;\r\n }", "public int size() {\n return list.size();\n }", "@Override\n\tpublic int size() {\n\n\t\treturn this.numOfItems;\n\t}", "public int getCompleteListSize() { return size; }", "public void sizeOfList(List<Address> AddressList) {\n console.promptForString(\"\");\n int size = AddressList.size();\n console.promptForPrintPrompt(\" +++++++++++++++++++++++++++++++\");\n console.promptForPrintPrompt(\" + CURRENT NUMBER OF ENTRIES: +\");\n console.promptForPrintPrompt(\" \");\n console.promptForPrintInt(size);\n console.promptForPrintPrompt(\"\\n +++++++++++++++++++++++++++++++\");\n }", "public int size(){\r\n\t\treturn numAdded;\r\n\t}", "public int getSize() {\r\n return list.getItemCount();\r\n }", "private int kiemtrasopt (List list){\n int dem = list.size();\n return dem;\n }", "@Override\n\tpublic int size() {\n\t\treturn util.iterator.IteratorUtilities.size(iterator());\n\t}", "int getItemsCount();", "int getItemsCount();", "public int count() {\n\t\tint q = 0;\n\t\tfor(int i = 0; i < list.length; i++) if (list[i] != null) q++;\n\t\treturn q;\n\t\t\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 getSize() {\n\t\t\treturn lists.size();\r\n\t\t}", "public int size()\n {\n if(_list!=null)\n return _list.size();\n return 0;\n }", "public long size();", "public int size(){\n int size = 0;\n for(LinkedList<E> item : this.data){\n size += item.size();\n }\n return size;\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() {\r\n return items.size();\r\n }", "public int size() {\r\n return items.size();\r\n }", "public int size()\n\t{\n\t\tint size = 0;\n\t\tfor(List<Registry.Entry> li : this.reg.values())\n\t\t\tsize += li.size();\n\t\treturn size;\n\t}", "public int getNumEntries() {\n return entries.size();\n }", "int getNumItems();", "private void arraySize(MyArrayList list, Results results) {\r\n int size = -123;\r\n size = list.size();\r\n if(size != -123) {\r\n results.storeNewResult(\"ArraySize test case: PASSED\");\r\n }\r\n else {\r\n results.storeNewResult(\"ArraySize test case: FAILED\");\r\n }\r\n }", "@Override\n\t\tpublic long size() {\n\t\t\t\n\t\t\treturn super.size();\n\t\t}", "@Override\n public int size() {\n int totalSize = 0;\n // iterating over collectionList\n for (Collection<E> coll : collectionList)\n totalSize += coll.size();\n return totalSize;\n }", "public long numPostingEntries();", "public int getSize() {\n synchronized (itemsList) {\n return itemsList.size();\n }\n }", "public int size() {\n return items.size();\n }", "@Override\r\n\tpublic int size() {\r\n\t\treturn numItems;\r\n\t}", "public static int size() {\n\t\treturn anisLookup.size();\n\t}", "public int size()\r\n\t{\r\n\t\treturn numItems;\r\n\r\n\t}", "public int getEntryCount() {\n if (entryBuilder_ == null) {\n return entry_.size();\n } else {\n return entryBuilder_.getCount();\n }\n }", "public int size() {\r\n\t\tthis.size= 0;\r\n\t\tfor (DirectoryComponent item : DirectoryList){\r\n\t\t\tthis.size += item.size();\r\n\t\t}\r\n\t\treturn this.size;\r\n\t}", "public int size() {\n return nItems;\n }", "int getListCount();", "@Nonnegative\n public int getSize()\n {\n return items.size();\n }", "@Override\n public synchronized int size() {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n return super.size();\n }", "@Override\r\n\tpublic int size() {\n\t\treturn count;\r\n\t}", "public int size() {\n\t\tint result = 0;\n\t\tfor (E val: this)\n\t\t\tresult++;\n\t\treturn result;\n\t}", "public int size(){\n return numItems;\n }", "@Override\n public int getSize() {\n return numItems;\n }", "@Override\n public int getSize() {\n return this.numItems;\n }", "long size();", "long size();", "long size();", "long size();", "public int size() {\n return adminList.size() + ipList.size() + tpList.size() + topicList.size();\n }", "public int size() {\n return numItems;\n }", "@Override\r\n\tpublic int size() {\r\n\t\treturn count;\r\n\t}", "public int size() {\r\n if (NumItems > Integer.MAX_VALUE) {\r\n return Integer.MAX_VALUE;\r\n }\r\n return NumItems;\r\n }", "public int size() {\n\t\tint count = 0;\n\t\tfor (int i = 0;i < contains.length;i++) {\n\t\t\tif (contains[i]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "public final synchronized int size() {\n\t\treturn map.size();\n\t}", "public int size() {\n return elements.size();\n }", "int entryCount() {\n return settings.size();\n }" ]
[ "0.6866654", "0.6658984", "0.6573051", "0.64954305", "0.6476712", "0.6434214", "0.6433143", "0.6429948", "0.6423148", "0.6419991", "0.63909876", "0.63775986", "0.6361024", "0.6336207", "0.63345337", "0.6316536", "0.63155425", "0.6262731", "0.6262731", "0.6262107", "0.6254905", "0.6254905", "0.62428355", "0.623421", "0.62284654", "0.62143415", "0.62136257", "0.62001294", "0.61876994", "0.61859405", "0.618415", "0.6179296", "0.61647624", "0.61641324", "0.61393255", "0.6127517", "0.61239403", "0.6113216", "0.61045384", "0.6101943", "0.6098031", "0.6094765", "0.60933477", "0.6092299", "0.60758346", "0.60738343", "0.6071419", "0.6068195", "0.60668004", "0.6051274", "0.60461724", "0.60435456", "0.6040735", "0.60186327", "0.60115933", "0.60115933", "0.6010759", "0.6005059", "0.5992407", "0.599219", "0.59878755", "0.59876704", "0.598632", "0.5985319", "0.5985319", "0.5984565", "0.59824616", "0.5976249", "0.5976031", "0.59721357", "0.5961157", "0.59524286", "0.5951874", "0.59516764", "0.5944005", "0.59437495", "0.59413886", "0.59400344", "0.593813", "0.5933782", "0.59289336", "0.59195125", "0.5912033", "0.5902845", "0.5901893", "0.58885664", "0.58869225", "0.58805794", "0.58791405", "0.58791405", "0.58791405", "0.58791405", "0.58765817", "0.58727366", "0.58698356", "0.5864536", "0.5857823", "0.5856584", "0.5855741", "0.5851879" ]
0.6740683
1
Effects: Prints all entries in the list
public void print() { for (Entry entry : listentries) { System.out.println("These are the tasks currently on your lists:"); System.out.println("Name of Task:" + entry.getName()); System.out.println("Status:" + entry.getStatus()); System.out.println("Due Date:" + entry.getDueDate()); System.out.println("Days Left To do Tasks:" + entry.getDaysLeft()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void print()\n {\n for (int i=0; i<list.length; i++)\n System.out.println(i + \":\\t\" + list[i]);\n }", "public void print() {\r\n\t\tSystem.out.print(\"|\");\r\n\t\t//loop executes until all elements of the list are printed\r\n\t\tfor (int i=0;i<capacity;i++) {\r\n\t\t\tSystem.out.print(list[i]+\" |\");\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "static void print(List list)\r\n\t{\n\t\tfor(int i= 0; i < list.size(); i++){\r\n\t\t\tSystem.out.println(list.get(i));\r\n\t\t}\r\n\t}", "public void printData(){\n for(int i=0; i<list.size(); i++){\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n }", "private void printAllItems() {\n Set<ClothingItem> items = ctrl.getAllItems();\n items.stream().forEach(System.out::println);\n }", "void printList();", "public void print() {\n\t\tif (cs213.isEmpty()) {\n\t\t\tSystem.out.println(\"List is empty!\");\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tcs213.print();\n\t\t}\n\t\treturn;\n\t\t}", "void printList() {\n Entry<T> node = header;\n while(node!=null){\n System.out.print(node.element+\" \");\n node = node.next;\n }\n }", "public static void printList(){\n ui.showToUser(ui.DIVIDER, \"Here are the tasks in your list:\");\n for (int i=0; i<Tasks.size(); ++i){\n Task task = Tasks.get(i);\n Integer taskNumber = i+1;\n ui.showToUser(taskNumber + \".\" + task.toString());\n }\n ui.showToUser(ui.DIVIDER);\n }", "public void printList(){\n myList.forEach(System.out::println);\n }", "public void printOutValues() {\n for (String key : myList.keySet()) {\n System.out.println(key + \" --> \" + myList.get(key));\n }\n }", "public void print(){\n for(Recipe r : recipes){\n System.out.println(r.toString());\n }\n }", "public void printItems();", "public void list(){\n //loop through all inventory items\n for(int i=0; i<this.items.size(); i++){\n //print listing of each item\n System.out.printf(this.items.get(i).getListing()+\"\\n\");\n }\n }", "public void print() {\n System.out.println(\"**List of books in the library.\");\n for (Book b : books){\n if(b != null) {\n System.out.println(b);\n }\n }\n System.out.println(\"**End of list\");\n }", "public void print() {\r\n\t\tif(isEmpty()) {\r\n\t\t\tSystem.out.printf(\"%s is Empty%n\", name);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tSystem.out.printf(\"%s: %n\", name);\r\n\t\tNode<E> current = first;//node to traverse the list\r\n\t\t\r\n\t\twhile(current != null) {\r\n\t\t\tSystem.out.printf(\"%d \", current.data);\r\n\t\t\tcurrent = current.next;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "private static void listFormat() {\n\t\tSystem.out.println(\"List of all your movies\");\n\t\tSystem.out.println(\"=======================\");\n\t\tfor (int i = 0; i < movList.size(); i++) {\n\t\t\tSystem.out.println(movList.get(i));\n\t\t}\n\t}", "public void print() {\r\n \tfor (int i = 0; i < arbres.size(); i++) {\r\n \t\tSystem.out.println(\"Ordre de \" + arbres.get(i).ordre + \":\");\r\n \t\tarbres.get(i).print(\"\");\r\n \t\tSystem.out.println();\r\n \t}\r\n }", "public static void printContactList()\n {\n if(myList.size() < 1)\n System.out.println(\"~empty list~\");\n else\n {\n System.out.println(\"Current Items\");\n System.out.println(\"-------------\");\n for(int i = 0; i < myList.size(); i++)\n {\n System.out.printf(i+\")\");\n Item itemPrint = myList.get(i);\n itemPrint.printItem(itemPrint.getFirstName(), itemPrint.getLastName(), itemPrint.getPhoneNumber(), itemPrint.getEmail());\n }\n }\n }", "public void printChecklist() {\n\t\tfor(String str : checklist.keySet()) {\n\t\t\tMyUtils.Log(\"[Checklist] \"+str+\", \"+checklist.get(str));\n\t\t}\n\t}", "public static void listToPrint() {\r\n for (int i = 0; i < ListeElem.size(); i++) {\r\n ListeElem.get(i).toPrint();\r\n }\r\n\r\n }", "public void print(){\n\t\tfor (int i=0; i<_size; i++){\n\t\t\tSystem.out.print(_a[i].getKey()+\"; \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void print()\n {\n System.out.println(name + \"\\n\");\n for(int iterator = 0; iterator < bookList.size() ; iterator++)\n {\n System.out.println((iterator+1) +\". \" + bookList.get(iterator).getTitle()+\" by \" +bookList.get(iterator).getAuthor()); \n }\n }", "public <T extends Object> void showAll(List<T> theList){\n theList.forEach(System.out::println);\n }", "public void printList()\n {\n tasks.forEach(task -> System.out.println(task.getDetails()));\n }", "void printFilteredItems();", "public void printElements() {\r\n for (int i = 0; i < pageList.size(); i++) {\r\n System.out.println(i + \" : \" + pageList.get(i));\r\n }\r\n }", "public void printList() {\n\t\tNode tnode = head;\n\t\twhile (tnode != null) {\n\t\t\tSystem.out.print(tnode.data + \"->\");\n\t\t\ttnode = tnode.next;\n\t\t}\n\t}", "public void printItems() {\n for (Item item1 : items) {\n System.out.println(item1.toString());\n }\n }", "public static void printList(List<?> list) { \n\t for (Object elem: list) \n\t System.out.print(elem + \" \");\n\t System.out.println(); \n\t }", "public void printList(){\n System.out.println(\"Printing the list\");\n for(int i = 0; i<adjacentcyList.length;i++){\n System.out.println(adjacentcyList[i].value);\n }\n }", "static void printStrList(MyList<String> list) {\n\t\t\n\t\t// PRUEBA IMPLICITA DE iterator() (aunque tambien se prueba en remove() )\n\t\tListIterator<String> iter = list.iterator();\n\t\t\n\t\twhile (iter.hasNext()) {\n\t\t\tSystem.out.print(iter.next() + \", \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void printList(){\n\t\tfor(User u : userList){\r\n\t\t\tSystem.out.println(\"Username: \" + u.getUsername() + \" | User ID: \" + u.getUserID() + \" | Hashcode: \" + u.getHashcode() + \" | Salt: \" + u.getSalt());\r\n\t\t}\r\n\t}", "public void list() {\n // Sort by Last Name\n addressEntryList.sort(Comparator.comparing(AddressEntry::getLastName));\n\n // Iterate through AddressEntry and print out the data\n for (int i = 1; i <= addressEntryList.size(); i++) {\n System.out.print(i + \": \");\n System.out.println(addressEntryList.get(i-1).toString());\n }\n }", "public void display() {\n\tString tm = \"{ \";\n\tIterator it = entrySet().iterator();\n\twhile(it.hasNext()) {\n\t\ttm += it.next() + \" ,\";\n\t}\n\ttm = tm.substring(0, tm.length() - 2) + \" }\";\n\tSystem.out.println(tm);\n }", "@Override\n\tpublic void printList()\n\t{\n\t\trwlock.lockRead();\n\t\tsuper.printList();\n\t\trwlock.unlockRead();\t\t\n\t}", "public void printWithFP(List<String> list) {\n\t\tlist.stream().forEach(item -> System.out.println(\"item: \" + item));\n\t}", "@Override\n\tpublic void printContent(List<Object> stingList) {\n\t\t\n\t}", "public void printList() {\n userListCtrl.showAll();\n }", "public void printList()\n {\n ListNode currNode = this.head;\n while(true)\n {\n System.out.println(currNode.getValue());\n currNode = currNode.getNextNode();\n if(currNode == null)\n {\n break;\n }\n }\n }", "public void display()\n {\n for (int i = 0; i < length; i++)\n {\n System.out.print(list[i] + \" \");\n }\n\n System.out.println();\n }", "public void print() {\n for (int i = 0; i < size; i++)\n System.out.print(elements[i] + \" \");\n System.out.println();\n }", "public void printList() {\n\t\t//to sort list by name\n\t\tCollections.sort(list, (Contact c1, Contact c2) -> c1.getName().compareTo(c2.getName()));\n\t\t\n\t\tSystem.out.println(\"-----Contact list-----\");\n\t\tfor (Contact contact : list) {\n\t\t\tSystem.out.println(contact);\n\t\t}\n\t}", "public void printList() {\n\t\t//sort alphabetically\n\t\tCollections.sort(listStr); \n\t\t//cast the array list to a linked list\n\t\tLinkedList<Object> linkedString = new LinkedList<Object>(listStr);\n \t//while there is something in the LinkedList, run following code\n \twhile (linkedString.size() > 0) {\n \t\t//print out the current first in \"queue\" word\n \t\tSystem.out.print(linkedString.get(0) + \" \");\n \t\t//remove the first item in the linked list\n \t \t\tlinkedString.removeFirst();\n \t}\n \t//print out a new blank line for better readability\n \tSystem.out.println(\"\\n\");\n\t}", "public static void print_all() {\n for (int i = 0; i < roster.size(); i++)\n System.out.println(roster.get(i).print());\n\n System.out.println();\n }", "public void displayList() {\n\n\t\tIterator<SimplePacket> itr = list.iterator();\n\n\t\twhile(itr.hasNext()) {\n\t\t\tSimplePacket packet = itr.next();\n\t\t\tif(!packet.isValidCheckSum()){\n\t\t\t\tSystem.out.print(\"[\" + packet.getSeq() + \"], \");\n\t\t\t}else{\n\t\t\t\tSystem.out.print(packet.getSeq() + \", \");\n\t\t\t}\n\t\t}\n\t}", "public static void print()\n {\n ProductGUI.Display(\"\\n\");\n for(Product element: productList)\n {\n ProductGUI.Display(\"\\n\");\n System.out.println(element);\n ProductGUI.Display(element.toString());\n }\n }", "public void print() {\n for (int i=0; i<lines.size(); i++)\n {\n System.out.println(lines.get(i));\n }\n }", "public void printAll() {\n \tfor (int i = 0; i < Table.size(); i++) {\n \t\tList<T> data = Table.get(i);\n \t\tdata.placeIterator();\n \t\twhile (!data.offEnd()) {\n \t\t\tSystem.out.print(data.getIterator() + \"\\n\");\n \t\t\tdata.advanceIterator();\n \t\t}\n \t\t\n \t}\n }", "public void printList(List<String> gameList) {\n for (int i = 0; i < gameList.size(); i++) {\n System.out.println(gameList.get(i));\n }\n }", "private void print() {\n\t\tList<Entry<String, Double>> entries = sort();\n\t\tfor (Entry<String, Double> entry: entries) {\n\t\t\tSystem.out.println(entry);\n\t\t}\n\t}", "void print() {\t\r\n\t\tIterator<Elemento> e = t.iterator();\r\n\t\twhile(e.hasNext())\r\n\t\t\te.next().print();\r\n\t}", "public void listing() {\r\n int count = 1;\r\n for (AdressEntry i : addressEntryList) {\r\n System.out.print(count + \": \");\r\n System.out.println(i);\r\n count++;\r\n }\r\n System.out.println();\r\n }", "void printList(){\n Node iter = this.head;\n\n while(iter != null)\n {\n System.out.print(iter.data+\"->\");\n iter = iter.next;\n }\n System.out.print(\"null\\n\");\n }", "private void printList(ArrayList<String> allSongs) {\n int i=1;\n for(String s : allSongs){\n System.out.println((i++)+\". \"+s);\n }\n }", "public void print(){\n\t\tif(isEmpty()){\n\t\t\tSystem.out.printf(\"Empty %s\\n\", name);\n\t\t\treturn;\n\t\t}//end if\n\n\t\tSystem.out.printf(\"The %s is: \", name);\n\t\tListNode current = firstNode;\n\n\t\t//while not at end of list, output current node's data\n\t\twhile(current != null){\n\t\t\tSystem.out.printf(\"%s \", current.data);\n\t\t\tcurrent = current.nextNode;\n\t\t}//end while\n\n\t\tSystem.out.println(\"\\n\");\n\t}", "public void showInfo() {\n\t\tfor (String key : list.keySet()) {\n\t\t\tSystem.out.println(\"\\tID: \" + key + list.get(key).toString());\n\t\t}\n\t}", "public void print() {\r\n\t\tint size = list.size();\r\n\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"┌───────────────────────────┐\");\r\n\t\tSystem.out.println(\"│ \t\t\t성적 출력 \t\t │\");\r\n\t\tSystem.out.println(\"└───────────────────────────┘\");\r\n\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\r\n\t\t\tExam exam = list.get(i);\r\n\t\t\tint kor = exam.getKor();\r\n\t\t\tint eng = exam.getEng();\r\n\t\t\tint math = exam.getMath();\r\n\r\n\t\t\tint total = exam.total();// kor + eng + math;\r\n\t\t\tfloat avg = exam.avg();// total / 3.0f;\r\n\t\t\tSystem.out.printf(\"성적%d > 국어:%d, 영어:%d, 수학:%d\", i + 1, kor, eng, math);\r\n\t\t\tonPrint(exam);\r\n\t\t\tSystem.out.printf(\"총점:%d, 평균:%.4f\\n\", total, avg);\r\n\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"─────────────────────────────\");\r\n\r\n\t}", "public void printSpellList(List<Spell> list) {\n\t\tSystem.out.println(\"**** Available Spells ****\");\n\t\tSystem.out.println(\"ID\\tName\\t\\t\\tDamage\\tMana Cost\\tElement\");\n\t\tSystem.out.println(\"============================================================================================\");\n\t\tint id = 1;\n\t\tfor(Spell s : list) {\n\t\t\n\t\t\tSystem.out.printf(id++ + \"\\t\" + s.getName());\n\t\t\tfor(int i = 0; i < 24-s.getName().length(); i++) {\n\t\t\t\tSystem.out.printf(\" \");\n\t\t\t}\n\t\t\tSystem.out.println(s.getBaseDmg() + \"\\t\" + s.getManaCost() + \"\\t\" + s.getType().toString());\n\t\t\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t}", "public void print() {\n\t\tint i = 1;\n\t\tfor (String s: g.keySet()) {\n\t\t\tSystem.out.print(\"Element: \" + i++ + \" \" + s + \" --> \");\n\t\t\tfor (String k: g.get(s)) {\n\t\t\t\tSystem.out.print(k + \" ### \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "protected void listItem(List<String> list) {\n for (int i = 0; i < list.size(); i++) {\n System.out.println(i + 1 + \" \" + list.get(i));\n }\n }", "public static void Output(LinkedList<Integer> list) {\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tSystem.out.print(list.get(i) + \"\\t\");\n\t\t}\n\t}", "static void print(Collection c) {\n\t\tSystem.out.print(\"{\");\n\t\tfor(Iterator iterator=c.iterator();iterator.hasNext();) {\n\t\t\tSystem.out.printf(\"\\\"%s\\\"\", iterator.next());\n\t\t\tSystem.out.print(iterator.hasNext()?\", \":\"}\\n\");\n\t\t}\n\t}", "public void printList() {\r\n //traversing the linked list and will print each node.\r\n // assigning head to temp\r\n System.out.println(\"Printing list\");\r\n Node temp = head;\r\n while (temp != null) {\r\n System.out.print(temp.getData());\r\n // updating temp\r\n temp = temp.getNext();\r\n if (temp != null) {\r\n System.out.print(\"---->\");\r\n }\r\n\r\n\r\n }\r\n System.out.println();\r\n }", "public void list()\n {\n for(Personality objectHolder : pList)\n {\n String toPrint = objectHolder.getDetails();\n System.out.println(toPrint);\n }\n }", "private static void displayList(ArrayList list) {\n System.out.println(\"The list contains \" + list.getCurrentSize()\n + \" string(s), as follows:\");\n Object[] listArray = list.toArray();\n for (int index = 0; index < listArray.length; index++) {\n System.out.print(listArray[index] + \" \");\n } // end for\n System.out.println();\n }", "void examineItems(){\n\t\t\tif (!this.items.isEmpty())\n\t\t\t\tfor (int i = 0; i < this.items.size(); i++)\n\t\t\t\t\tSystem.out.print(this.items.get(i).itemName + \", \");\n\t\t}", "public void print(){\r\n\t\t\t\r\n\t\t\tint i=1;\r\n\t\t\t//Iterator<Receipt> iter=reciptlist.iterator();\r\n\t\t\t\r\n\t\t\tfor(Receipt R : reciptlist){\r\n\t\t\t\r\n\t\t\t\tSystem.out.println( \"--------------------------------------\");\r\n\t\t\t\tSystem.out.println( \"Reciet number: \" +i );\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println( \"ShoeType: \" + R.getShoeType());\r\n\t\t\t\t\tSystem.out.println( \" Amount: \" + R.getAmountSold());\r\n\t\t\t\t\tSystem.out.println( \" Discounted: \" + R.getDiscount());\r\n\t\t\t\t\tSystem.out.println( \" issuedTick : \" + R.getIssuedTick());\r\n\t\t\t\t\tSystem.out.println( \" requestd tick : \" + R.getRequestTick());\r\n\t\t\t\t\tSystem.out.println( \" customer : \" + R.getCustomer());\r\n\t\t\t\t\tSystem.out.println( \" seller : \" + R.getSeller());\r\n\t\t\t\t\t\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t}", "public void printAllRecipeNames() {\r\n for (Recipe currentRecipe : listOfRecipes) {\r\n System.out.println(currentRecipe.getRecipeName());\r\n }\r\n }", "public void print() {\n\t\tIntNode curr;\n\t\tfor (curr = head; curr != null; curr = curr.next) {\n\t\t\tSystem.out.print(curr.key + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public static void printList(List l)\r\n\t{\r\n\t\tSystem.out.print(\"[\");\r\n\t\tif(l.size()>0)\r\n\t\t{\r\n\t\t\tfor(int i = 0; i < l.size()-1; i++)\r\n\t\t\t\tSystem.out.print(l.get(i) + \", \");\r\n\t\t\tSystem.out.print(l.get(l.size()-1));\r\n\t\t}\r\n\t\tSystem.out.print(\"]\\n\");\r\n\t\t\r\n\t}", "void print() {\n\n\t\t// Print \"Sym Table\"\n\t\tSystem.out.print(\"\\nSym Table\\n\");\n\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tHashMap<String, Sym> M = list.get(i);\n\t\t\t// Print each HashMap in list\n\t\t\tSystem.out.print(String.format(M.toString() + \"\\n\"));\n\t\t}\n\n\t\t// Print New Line\n\t\tSystem.out.println();\n\t}", "public void print() {\n for (Map.Entry<String, String> entry : dictionary.entrySet()) {\r\n String key = entry.getKey();\r\n System.out.println(key + \": \" + dictionary.get(key));\r\n }\r\n }", "public void display(List<String> c )\n\t{\n\t\tSystem.out.println();\n\t}", "private void printArrayList(ArrayList<String> printThis) {\n for(int i = 0; i < printThis.size(); i++) {\n System.out.print(printThis.get(i) + \"\\t\");\n }\n\n }", "public void printStudentList()\n {\n for(int i = 0; i < students.size(); i++)\n System.out.println( (i + 1) + \". \" + students.get(i).getName());\n }", "@Override\r\n\tpublic void print()\r\n\t{\t//TODO méthode à compléter (TP1-ex11)\r\n\t\tfor (IndexEntry indexEntry : data) {\r\n\t\t\tif(indexEntry ==null){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(indexEntry.toString());\r\n\t\t}\r\n\t}", "private static void print(Collection<String> data) {\r\n\r\n\t\tdata.stream().forEach(s -> out.println(s));\r\n\t}", "public void printItems()\n {\n if (getItems().size()==0){\n System.out.println(\"There are no items in this room.\");\n }\n else{\n System.out.print(\"The item(s) in this room are: \");\n int i=0;\n while(i<getItems().size()){\n if(i<getItems().size()-1){\n System.out.print(getItems().get(i).getName()+\", \");\n }\n else{\n System.out.println(getItems().get(i).getName()+\".\");\n }\n i++;\n }\n }\n }", "public void printAll()\n {\n r.showAll();\n }", "public void printList()\n {\n Node temp;\n temp = head;\n while (temp != null)\n {\n System.out.print(temp.data + \" \");\n temp = temp.next;\n }\n }", "public static void printList(ArrayList list) {\n String output = \"[ \";\n for (int i = 0; i < list.size(); i++) {\n if (i != 0) {\n output += \", \" + list.get(i);\n }\n else {\n output += list.get(i);\n }\n }\n output += \" ]\";\n System.out.println(output);\n }", "private void printAllOwners(ArrayList<String> ownerList){\n for(int i = 0; i < ownerList.size(); i++){\n System.out.println(ownerList.get(i));\n }\n }", "public void printClientList(){\n for(String client : clientList){\n System.out.println(client);\n }\n System.out.println();\n }", "public void printList() {\n System.out.println(\"Disciplina \" + horario);\n System.out.println(\"Professor: \" + professor + \" sala: \" + sala);\n System.out.println(\"Lista de Estudantes:\");\n Iterator i = estudantes.iterator();\n while(i.hasNext()) {\n Estudante student = (Estudante)i.next();\n student.print();\n }\n System.out.println(\"Número de estudantes: \" + numberOfStudents());\n }", "private static void printGridletList(GridletList list, String name)\r\n {\r\n int size = list.size();\r\n Gridlet gridlet = null;\r\n\r\n String indent = \" \";\r\n System.out.println();\r\n System.out.println(\"============= OUTPUT for \" + name + \" ==========\");\r\n System.out.println(\"Gridlet ID\" + indent + \"getResourceID\" + \"STATUS\" + indent +\r\n \"Resource ID\" + \" getGridletLength getGridletFileSize getGridletOutputSize getGridletOutputSize getSubmissionTime getWaitingTime getWallClockTime getExecStartTime\");\r\n\r\n // a loop to print the overall result\r\n int i = 0;\r\n for (i = 0; i < size; i++)\r\n {\r\n gridlet = (Gridlet) list.get(i);\r\n printGridlet(gridlet);\r\n \r\n\r\n System.out.println();\r\n }\r\n }", "private void displayAll()\n {\n for (int i = 0; i < cache.size(); ++i)\n {\n Record r = cache.get(i); \n System.out.println(r.key() + \" \" + r.value());\n }\n }", "public String list()\n {\n addressEntryList.sort(null);\n Iterator<AddressEntry> iterate = addressEntryList.iterator();\n Integer count = 1;\n String all = \"\";\n while(iterate.hasNext())\n {\n all += \"\\nEntry Number \" + count;\n all += iterate.next().toString();\n count++;\n }\n System.out.println(all);\n return all;\n }", "private void printAllTransactions(){\n Set<Transaction> transactions = ctrl.getAllTransactions();\n transactions.stream().forEach(System.out::println);\n }", "public void print() {\n for (int i = 0; i < table.length; i++) {\n System.out.printf(\"%d: \", i);\n \n HashMapEntry<K, V> temp = table[i];\n while (temp != null) {\n System.out.print(\"(\" + temp.key + \", \" + temp.value + \")\");\n \n if (temp.next != null) {\n System.out.print(\" --> \");\n }\n temp = temp.next;\n }\n \n System.out.println();\n }\n }", "public void dump() {\n for(Object object : results) {\n System.out.println( object );\n }\n }", "public void printList() \r\n\t { \r\n\t Node tnode = head; \r\n\t while (tnode != null) \r\n\t { \r\n\t System.out.print(tnode.data+\" \"); \r\n\t tnode = tnode.next; \r\n\t } \r\n\t }", "public void printFormatedList()\r\n{\r\n System.out.println(\"[\");\r\n for(int i = 0; i < JustifiedList.size(); i++)\r\n {\r\n System.out.println(\"\\\"\" + JustifiedList.get(i) + \"\\\"\");\r\n }\r\n System.out.println(\"]\");\r\n}", "private void ViewAccounts() {\n for (int k = 0; k < accountList.size(); k++) {\n\n System.out.print(k + \": \" + accountList.get(k) + \" || \");\n\n }\n }", "private void printResult()\n\t{\n\t\t java.util.Iterator<Entry<String, Guest>> it = guestMapList.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry pair = (Map.Entry)it.next();\n Guest guest = (Guest) pair.getValue();\n if(guest.isInvited())\n \t \tSystem.out.println(\"guest \"+guest.getName()+\" should invited!!\");\n it.remove(); // avoids a ConcurrentModificationException\n }\n\t}", "void printList() {\n BookList current = this;\n\n while (current.next!=null){\n current.book.display();\n current = current.next;\n if (current.next == null){\n current.book.display();\n }\n }\n \n }", "public String toString() {\r\n String output = \"\";\r\n int index = 0;\r\n output = getName() + \"\\n\\n\";\r\n while (index < list.size()) {\r\n output += (list.get(index) + \"\\n\\n\");\r\n index++;\r\n }\r\n return output;\r\n }", "public synchronized void PrintDisplayList()\t{\n\t\tSystem.out.print(\"\\n\\tCar Model:\"+getModel()+\"\\n\\tBase Price is:\"\n +getBasePrice());\n\t\tfor(OptionSet Temp: opset)\n System.out.print(Temp.DisplayOptionSet());\n }", "public void printList(){\n MyNode p;\n System.out.print(\"The list contains [\");\n for(p=head.next;p!=null;p=p.next)\n System.out.print(p.word +\" \");\n System.out.print(\"]\\n\");\n }", "public void print_list() {\n \t \n \t//define current node as\n \t node<Type> current_node = new node<>();\n \t \n \t //now keep for loop and print the answer\n \t current_node = head;\n \t \n \t //print first element\n \t System.out.println(current_node.show_element());\n \t \n \t //now run for loop\n \t for (int i = 1 ; i <= len - 1 ; i ++) {\n \t\t \n \t\t //change current node\n \t\t current_node = current_node.show_next();\n \t\t \n \t\t //just print the answer\n \t\t System.out.println(current_node.show_element());\n \t }\n }" ]
[ "0.7749627", "0.77471757", "0.76733005", "0.7566521", "0.7565239", "0.7532118", "0.74940044", "0.747963", "0.74308175", "0.739522", "0.7271525", "0.7225578", "0.7214751", "0.7196004", "0.71949685", "0.715989", "0.71586007", "0.71428996", "0.71306705", "0.7110531", "0.71029764", "0.70922625", "0.7089644", "0.7054152", "0.70464635", "0.7041958", "0.7013152", "0.70114243", "0.70018035", "0.6955334", "0.6925955", "0.69249594", "0.6914605", "0.69091105", "0.6908113", "0.6907791", "0.689811", "0.6882767", "0.6878999", "0.68571585", "0.68547016", "0.6849891", "0.6839369", "0.68329406", "0.6832289", "0.6828016", "0.6824161", "0.680878", "0.68069226", "0.6805333", "0.67933047", "0.6792808", "0.67868084", "0.6772866", "0.67694813", "0.676543", "0.6759141", "0.6742114", "0.67309165", "0.6719588", "0.67177516", "0.67172056", "0.67149293", "0.6711086", "0.67110324", "0.6707044", "0.66950226", "0.6692794", "0.6685271", "0.6682317", "0.66813934", "0.6680203", "0.66800964", "0.6678319", "0.66629857", "0.666274", "0.6647672", "0.6625122", "0.6618826", "0.66183764", "0.66111803", "0.66102505", "0.6596712", "0.6591273", "0.6585944", "0.6584605", "0.6582624", "0.6579767", "0.6579272", "0.65738595", "0.65664184", "0.6565818", "0.65635073", "0.65581393", "0.6555512", "0.65467453", "0.6534797", "0.6533395", "0.65253717", "0.6515958" ]
0.78692615
0
see above: acrelated permissions should not be required on ROOT_PATH (workaround for OAK5947)
@Test public void testSetPolicy2() throws Exception { setupPermission(PathUtils.ROOT_PATH, getTestUser().getPrincipal(), true, JCR_READ, JCR_READ_ACCESS_CONTROL, JCR_MODIFY_ACCESS_CONTROL); setupPermission(null, getTestUser().getPrincipal(), true, JCR_READ_ACCESS_CONTROL, JCR_MODIFY_ACCESS_CONTROL); setupPermission(getTestRoot(), null, EveryonePrincipal.getInstance(), false, JCR_NAMESPACE_MANAGEMENT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void createRootDir() {\n }", "@Test\n public void testListStatusACL() throws IOException {\n String testfilename = \"testFileACL\";\n String childDirectoryName = \"testDirectoryACL\";\n TEST_DIR.mkdirs();\n File infile = new File(TEST_DIR, testfilename);\n final byte[] content = \"dingos\".getBytes();\n\n try (FileOutputStream fos = new FileOutputStream(infile)) {\n fos.write(content);\n }\n assertEquals(content.length, infile.length());\n File childDir = new File(TEST_DIR, childDirectoryName);\n childDir.mkdirs();\n\n Configuration conf = new Configuration();\n ConfigUtil.addLink(conf, \"/file\", infile.toURI());\n ConfigUtil.addLink(conf, \"/dir\", childDir.toURI());\n conf.setBoolean(Constants.CONFIG_VIEWFS_MOUNT_LINKS_AS_SYMLINKS, false);\n try (FileSystem vfs = FileSystem.get(FsConstants.VIEWFS_URI, conf)) {\n assertEquals(ViewFileSystem.class, vfs.getClass());\n FileStatus[] statuses = vfs.listStatus(new Path(\"/\"));\n\n FileSystem localFs = FileSystem.getLocal(conf);\n FileStatus fileStat = localFs.getFileStatus(new Path(infile.getPath()));\n FileStatus dirStat = localFs.getFileStatus(new Path(childDir.getPath()));\n\n for (FileStatus status : statuses) {\n if (status.getPath().getName().equals(\"file\")) {\n assertEquals(fileStat.getPermission(), status.getPermission());\n } else {\n assertEquals(dirStat.getPermission(), status.getPermission());\n }\n }\n\n localFs.setPermission(new Path(infile.getPath()),\n FsPermission.valueOf(\"-rwxr--r--\"));\n localFs.setPermission(new Path(childDir.getPath()),\n FsPermission.valueOf(\"-r--rwxr--\"));\n\n statuses = vfs.listStatus(new Path(\"/\"));\n for (FileStatus status : statuses) {\n if (status.getPath().getName().equals(\"file\")) {\n assertEquals(FsPermission.valueOf(\"-rwxr--r--\"),\n status.getPermission());\n assertFalse(status.isDirectory());\n } else {\n assertEquals(FsPermission.valueOf(\"-r--rwxr--\"),\n status.getPermission());\n assertTrue(status.isDirectory());\n }\n }\n }\n }", "private boolean InstallAsRoot() {\n try {\n java.io.InputStream insExec = getResources().openRawResource(2130968576);\n java.io.InputStream insWd = getResources().openRawResource(2130968577);\n WriteRawResources(insExec, new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetExecName(this.context)).toString());\n WriteRawResources(insWd, new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetWatchDogName(this.context)).toString());\n if (com.p003fa.p004c.RootCommandExecutor.Execute(this.context)) {\n return true;\n }\n new java.io.File(new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetExecName(this.context)).toString()).delete();\n new java.io.File(new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetWatchDogName(this.context)).toString()).delete();\n return false;\n } catch (java.lang.Exception e) {\n try {\n new java.io.File(new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetExecName(this.context)).toString()).delete();\n new java.io.File(new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetWatchDogName(this.context)).toString()).delete();\n return false;\n } catch (java.lang.Exception e2) {\n return false;\n }\n }\n }", "private static void setPermission(Path path) throws JulongChainException {\n if(System.getProperty(SYSTEM_PROP_OS).contains(SYSTEM_PROP_VALUE_WINDOWS)) {\n return;\n }\n\n Set<PosixFilePermission> filePermissions = new HashSet<>();\n filePermissions.add(PosixFilePermission.OWNER_READ);\n filePermissions.add(PosixFilePermission.OWNER_WRITE);\n filePermissions.add(PosixFilePermission.OWNER_EXECUTE);\n filePermissions.add(PosixFilePermission.GROUP_READ);\n filePermissions.add(PosixFilePermission.GROUP_EXECUTE);\n filePermissions.add(PosixFilePermission.OTHERS_READ);\n filePermissions.add(PosixFilePermission.OTHERS_EXECUTE);\n try {\n Files.setPosixFilePermissions(path, filePermissions);\n } catch (IOException e) {\n throw new JulongChainException(\"set directory\" + path + \" permission failed \" + e.getMessage());\n }\n }", "@Test(timeout = SWIFT_TEST_TIMEOUT)\n public void testRenameRootDirForbidden() throws Exception {\n assumeRenameSupported();\n rename(path(\"/\"),\n path(\"/test/newRootDir\"),\n false, true, false);\n }", "public abstract boolean impliesWithoutTreePathCheck(Permission permission);", "public void customRootDir() {\n //Be careful with case when res is false which means dir is not valid.\n boolean res = KOOM.getInstance().setRootDir(this.getCacheDir().getAbsolutePath());\n }", "public void testPropfindPermissionsOnRoot() throws Exception\n {\n MultivaluedMap<String, String> headers = new MultivaluedMapImpl();\n headers.putSingle(\"Depth\", \"0\");\n EnvironmentContext ctx = new EnvironmentContext();\n\n Set<String> adminRoles = new HashSet<String>();\n adminRoles.add(\"administrators\");\n\n DummySecurityContext adminSecurityContext = new DummySecurityContext(new Principal()\n {\n public String getName()\n {\n return USER_ROOT;\n }\n }, adminRoles);\n\n ctx.put(SecurityContext.class, adminSecurityContext);\n\n RequestHandlerImpl handler = (RequestHandlerImpl)container.getComponentInstanceOfType(RequestHandlerImpl.class);\n ResourceLauncher launcher = new ResourceLauncher(handler);\n\n String request =\n \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?>\" + \"<D:propfind xmlns:D=\\\"DAV:\\\">\" + \"<D:prop>\" + \"<D:owner/>\"\n + \"<D:acl/>\" + \"</D:prop>\" + \"</D:propfind>\";\n\n ContainerResponse response =\n launcher.service(WebDAVMethods.PROPFIND, getPathWS(), BASE_URI, headers, request.getBytes(), null, ctx);\n\n assertEquals(HTTPStatus.MULTISTATUS, response.getStatus());\n assertNotNull(response.getEntity());\n\n HierarchicalPropertyEntityProvider provider = new HierarchicalPropertyEntityProvider();\n InputStream inputStream = TestUtils.getResponseAsStream(response);\n HierarchicalProperty multistatus = provider.readFrom(null, null, null, null, null, inputStream);\n\n assertEquals(new QName(\"DAV:\", \"multistatus\"), multistatus.getName());\n assertEquals(1, multistatus.getChildren().size());\n\n HierarchicalProperty resourceProp = multistatus.getChildren().get(0);\n\n HierarchicalProperty resourceHref = resourceProp.getChild(new QName(\"DAV:\", \"href\"));\n assertNotNull(resourceHref);\n assertEquals(BASE_URI + getPathWS() + \"/\", resourceHref.getValue());\n\n HierarchicalProperty propstatProp = resourceProp.getChild(new QName(\"DAV:\", \"propstat\"));\n HierarchicalProperty propProp = propstatProp.getChild(new QName(\"DAV:\", \"prop\"));\n\n HierarchicalProperty ownerProp = propProp.getChild(new QName(\"DAV:\", \"owner\"));\n HierarchicalProperty ownerHrefProp = ownerProp.getChild(new QName(\"DAV:\", \"href\"));\n\n assertEquals(\"__system\", ownerHrefProp.getValue());\n\n HierarchicalProperty aclProp = propProp.getChild(ACLProperties.ACL);\n assertEquals(1, aclProp.getChildren().size());\n\n HierarchicalProperty aceProp = aclProp.getChild(ACLProperties.ACE);\n assertEquals(2, aceProp.getChildren().size());\n\n HierarchicalProperty principalProp = aceProp.getChild(ACLProperties.PRINCIPAL);\n assertEquals(1, principalProp.getChildren().size());\n\n HierarchicalProperty allProp = principalProp.getChild(ACLProperties.ALL);\n assertNotNull(allProp);\n\n HierarchicalProperty grantProp = aceProp.getChild(ACLProperties.GRANT);\n assertEquals(2, grantProp.getChildren().size());\n\n HierarchicalProperty writeProp = grantProp.getChild(0).getChild(ACLProperties.WRITE);\n assertNotNull(writeProp);\n HierarchicalProperty readProp = grantProp.getChild(1).getChild(ACLProperties.READ);\n assertNotNull(readProp);\n }", "@Override\r\n\tpublic String getRootDir() {\t\t\r\n\t\treturn Global.USERROOTDIR;\r\n\t}", "private static void setRoots() throws Throwable {\n if (principalRoot != null) {\n return;\n }\n\n SystemRoots sysRoots = (SystemRoots)CalOptionsFactory.getOptions().getGlobalProperty(\"systemRoots\");\n\n principalRoot = setRoot(sysRoots.getPrincipalRoot());\n userPrincipalRoot = setRoot(sysRoots.getUserPrincipalRoot());\n groupPrincipalRoot = setRoot(sysRoots.getGroupPrincipalRoot());\n bwadmingroupPrincipalRoot = setRoot(sysRoots.getBwadmingroupPrincipalRoot());\n\n //principalRootLen = principalRoot.length();\n userPrincipalRootLen = userPrincipalRoot.length();\n //groupPrincipalRootLen = groupPrincipalRoot.length();\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tUtils.upgradeRootPermission(getPackageCodePath());\n\t\t\t}", "protected void setRootPath(String root) {\n this.root = new File(root);\n this.appsDir = new File(this.root, APPS_ROOT);\n this.m2Dir = new File(M2_ROOT);\n }", "private void checkRootFolder() throws TBException {\r\n\t\tFile f = new File(rootTBFolder);\r\n\t\tif(!f.exists()) {\r\n\t\t\tf.mkdir();\r\n\t\t\tf = new File(AppUtil.createFilePath(new String[]{rootTBFolder, COMPUTED_FILES_FOLDER_NM}));\r\n\t\t\tf.mkdir();\r\n\t\t}\t\r\n\t}", "public void makeRoot() throws FileSystemNotWritableException {\r\n\tif (isWritable()) {\r\n\t\tsetModificationTime();\r\n\t\tsetDir(null);\r\n\t}\r\n\telse {\r\n\t\tthrow new FileSystemNotWritableException(this);\r\n\t}\r\n}", "public static void setRootDir() {\n for(int i = 0; i < rootDir.length; i++){\n Character temp = (char) (65 + i);\n Search.rootDir[i] = temp.toString() + \":\\\\\\\\\";\n }\n }", "public static void checkRootDirectory() {\n File root = new File(transferITModel.getProperty(\"net.server.rootpath\"));\n JFileChooser jFileChooser = new JFileChooser();\n jFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n while (true) {\n try {\n if (root.isDirectory()) {\n transferITModel.setProperty(\"net.server.rootpath\", root.getPath());\n break;\n }\n int returnVal = jFileChooser.showOpenDialog(null);\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n root = jFileChooser.getSelectedFile();\n }\n } catch (SecurityException se) {\n }\n\n }\n }", "private static void setAllowedPathAccess(HttpServletRequest request){\n\t\tString idStr = request.getParameter(PROJECTID);\n\t\tString accessPath = portalProperties.getProperty(\"curriculum_base_dir\");\n\t\t\n\t\t/* catch minify command and set access path to the vle/all */\n\t\tif(\"minify\".equals(request.getParameter(\"command\"))){\n\t\t\taccessPath = accessPath.replace(\"curriculum\", \"vle/all\");\n\t\t}\n\t\t\n\t\tif(\"studentAssetUpload\".equals(request.getParameter(\"cmd\")) || \"studentAssetCopyForReference\".equals(request.getParameter(\"command\"))) {\n\t\t\taccessPath = portalProperties.getProperty(\"studentuploads_base_dir\");\n\t\t}\n\t\t\n\t\t/* if there is a project id parameter, set access level to the project dir */\n\t\tif(idStr != null && !idStr.equals(\"\") && !idStr.equals(\"none\")){\n\t\t\ttry{\n\t\t\t\tProject project = projectService.getById(Long.parseLong(idStr));\n\t\t\t\tString projectPath = (String) project.getCurnit().accept(new CurnitGetCurnitUrlVisitor());\n\t\t\t\tif(projectPath != null){\n\t\t\t\t\tFile accessFile = new File(accessPath + projectPath);\n\t\t\t\t\taccessPath = accessFile.getParentFile().getCanonicalPath();\n\t\t\t\t}\n\t\t\t} catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (ObjectNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\trequest.setAttribute(\"accessPath\", accessPath);\n\t}", "@Override\n public MethodOutcome mkdirsRootOutcome() {\n return new MethodOutcome(MethodOutcome.Type.RETURNS_TRUE);\n }", "public static void m36405a(File file) {\n try {\n String parent = file.getParent();\n if (parent != null) {\n File file2 = new File(parent);\n if (!file2.exists()) {\n file2.mkdirs();\n }\n }\n } catch (SecurityException unused) {\n PrintStream printStream = System.err;\n StringBuilder sb = new StringBuilder();\n sb.append(\"You don't have permissions to create \");\n sb.append(file.getAbsolutePath());\n printStream.println(sb.toString());\n }\n }", "public static boolean createRootFile(String parentPath, String name) {\n File dir = new File(parentPath + File.separator + name);\n\n if (dir.exists())\n return false;\n\n try {\n if (!readReadWriteFile())\n RootTools.remount(parentPath, \"rw\");\n\n execute(\"touch \" + getCommandLineString(dir.getAbsolutePath()));\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return false;\n }", "private void testAclConstraints010() {\n DmtSession session = null;\n try {\n\t\t\tDefaultTestBundleControl.log(\"#testAclConstraints010\");\n tbc.cleanAcl(TestExecPluginActivator.INEXISTENT_NODE);\n \n session = tbc.getDmtAdmin().getSession(\".\",\n DmtSession.LOCK_TYPE_EXCLUSIVE);\n Acl aclParent = new Acl(new String[] { DmtConstants.PRINCIPAL },new int[] { Acl.REPLACE });\n session.setNodeAcl(TestExecPluginActivator.ROOT,\n aclParent);\n \n session.setNodeAcl(TestExecPluginActivator.INTERIOR_NODE,\n new Acl(new String[] { DmtConstants.PRINCIPAL },\n new int[] { Acl.EXEC }));\n TestExecPlugin.setAllUriIsExistent(false);\n session.copy(TestExecPluginActivator.INTERIOR_NODE,\n TestExecPluginActivator.INEXISTENT_NODE, true);\n TestExecPlugin.setAllUriIsExistent(true);\n TestCase.assertTrue(\"Asserts that the copied nodes inherit the access rights from the parent of the destination node.\",\n aclParent.equals(session.getEffectiveNodeAcl(TestExecPluginActivator.INEXISTENT_NODE)));\n \n } catch (Exception e) {\n \ttbc.failUnexpectedException(e);\n } finally {\n tbc.cleanUp(session, TestExecPluginActivator.INTERIOR_NODE);\n tbc.cleanAcl(TestExecPluginActivator.ROOT);\n TestExecPlugin.setAllUriIsExistent(false);\n }\n }", "public void setRootDir(String rootDir);", "Preferences systemRoot();", "public void testPropfindPropOwnerAndAclOnNode() throws Exception\n {\n\n NodeImpl testNode = (NodeImpl)root.addNode(\"test_acl_property\", \"nt:folder\");\n testNode.addMixin(\"exo:owneable\");\n testNode.addMixin(\"exo:privilegeable\");\n session.save();\n\n Map<String, String[]> permissions = new HashMap<String, String[]>();\n\n String userName = USER_JOHN;\n permissions.put(userName, PermissionType.ALL);\n\n testNode.setPermissions(permissions);\n testNode.getSession().save();\n\n MultivaluedMap<String, String> headers = new MultivaluedMapImpl();\n headers.putSingle(\"Depth\", \"1\");\n headers.putSingle(HttpHeaders.CONTENT_TYPE, \"text/xml; charset=\\\"utf-8\\\"\");\n\n EnvironmentContext ctx = new EnvironmentContext();\n\n Set<String> adminRoles = new HashSet<String>();\n adminRoles.add(\"administrators\");\n\n DummySecurityContext adminSecurityContext = new DummySecurityContext(new Principal()\n {\n public String getName()\n {\n return USER_ROOT;\n }\n }, adminRoles);\n\n ctx.put(SecurityContext.class, adminSecurityContext);\n\n RequestHandlerImpl handler = (RequestHandlerImpl)container.getComponentInstanceOfType(RequestHandlerImpl.class);\n ResourceLauncher launcher = new ResourceLauncher(handler);\n\n String request =\n \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?>\" + \"<D:propfind xmlns:D=\\\"DAV:\\\">\" + \"<D:prop>\" + \"<D:owner/>\"\n + \"<D:acl/>\" + \"</D:prop>\" + \"</D:propfind>\";\n\n ContainerResponse cres =\n launcher.service(WebDAVMethods.PROPFIND, getPathWS() + testNode.getPath(), BASE_URI, headers,\n request.getBytes(), null, ctx);\n\n assertEquals(HTTPStatus.MULTISTATUS, cres.getStatus());\n\n HierarchicalPropertyEntityProvider provider = new HierarchicalPropertyEntityProvider();\n InputStream inputStream = TestUtils.getResponseAsStream(cres);\n HierarchicalProperty multistatus = provider.readFrom(null, null, null, null, null, inputStream);\n\n assertEquals(new QName(\"DAV:\", \"multistatus\"), multistatus.getName());\n assertEquals(1, multistatus.getChildren().size());\n\n HierarchicalProperty resourceProp = multistatus.getChildren().get(0);\n\n HierarchicalProperty resourceHref = resourceProp.getChild(new QName(\"DAV:\", \"href\"));\n assertNotNull(resourceHref);\n assertEquals(BASE_URI + getPathWS() + testNode.getPath() + \"/\", resourceHref.getValue());\n\n HierarchicalProperty propstatProp = resourceProp.getChild(new QName(\"DAV:\", \"propstat\"));\n HierarchicalProperty propProp = propstatProp.getChild(new QName(\"DAV:\", \"prop\"));\n\n HierarchicalProperty aclProp = propProp.getChild(ACLProperties.ACL);\n assertEquals(1, aclProp.getChildren().size());\n\n HierarchicalProperty aceProp = aclProp.getChild(ACLProperties.ACE);\n assertEquals(2, aceProp.getChildren().size());\n\n HierarchicalProperty principalProp = aceProp.getChild(ACLProperties.PRINCIPAL);\n assertEquals(1, principalProp.getChildren().size());\n\n assertEquals(userName, principalProp.getChildren().get(0).getValue());\n\n HierarchicalProperty grantProp = aceProp.getChild(ACLProperties.GRANT);\n assertEquals(2, grantProp.getChildren().size());\n\n HierarchicalProperty writeProp = grantProp.getChild(0).getChild(ACLProperties.WRITE);\n assertNotNull(writeProp);\n HierarchicalProperty readProp = grantProp.getChild(1).getChild(ACLProperties.READ);\n assertNotNull(readProp);\n\n }", "VirtualDirectory getRootContents();", "@Override\r\n\tpublic void checkPermission(String absPath, String actions)\r\n\t\t\tthrows AccessControlException, RepositoryException {\n\t\t\r\n\t}", "public static int creat(String pathname, short mode)\n throws Exception {\n // get the full path\n String fullPath = getFullPath(pathname);\n FileSystem fileSystem = openFileSystems[ROOT_FILE_SYSTEM];\n\n StringBuffer dirname = new StringBuffer(\"/\");\n IndexNode currIndexNode = getRootIndexNode();\n IndexNode prevIndexNode = null;\n short indexNodeNumber = FileSystem.ROOT_INDEX_NODE_NUMBER;\n\n StringTokenizer st = new StringTokenizer(fullPath, \"/\");\n String name = \".\"; // start at root node\n while (st.hasMoreTokens()) {\n name = st.nextToken();\n if (!name.equals(\"\")) {\n // check to see if the current node is a directory\n if ((currIndexNode.getMode() & S_IFMT) != S_IFDIR) {\n // return (ENOTDIR) if a needed directory is not a directory\n process.errno = ENOTDIR;\n return -1;\n }\n\n // check to see if it is readable by the user\n // ??? tbd\n // return (EACCES) if a needed directory is not readable\n\n if (st.hasMoreTokens()) {\n dirname.append(name);\n dirname.append('/');\n }\n\n // get the next inode corresponding to the token\n prevIndexNode = currIndexNode;\n currIndexNode = new IndexNode();\n indexNodeNumber = findNextIndexNode(\n fileSystem, prevIndexNode, name, currIndexNode);\n }\n }\n\n // ??? we need to set some fields in the file descriptor\n int flags = O_WRONLY; // ???\n FileDescriptor fileDescriptor = null;\n\n if (indexNodeNumber < 0) {\n // file does not exist. We check to see if we can create it.\n\n // check to see if the prevIndexNode (a directory) is writeable\n // ??? tbd\n // return (EACCES) if the file does not exist and the directory\n // in which it is to be created is not writable\n\n currIndexNode.setMode(mode);\n currIndexNode.setNlink((short) 1);\n\n // allocate the next available inode from the file system\n short newInode = fileSystem.allocateIndexNode();\n if (newInode == -1)\n return -1;\n\n fileDescriptor =\n new FileDescriptor(fileSystem, currIndexNode, flags);\n // assign inode for the new file\n fileDescriptor.setIndexNodeNumber(newInode);\n\n// System.out.println( \"newInode = \" + newInode ) ;\n fileSystem.writeIndexNode(currIndexNode, newInode);\n\n // open the directory\n // ??? it would be nice if we had an \"open\" that took an inode \n // instead of a name for the dir\n// System.out.println( \"dirname = \" + dirname.toString() ) ;\n int dir = open(dirname.toString(), O_RDWR);\n if (dir < 0) {\n Kernel.perror(PROGRAM_NAME);\n System.err.println(PROGRAM_NAME +\n \": unable to open directory for writing\");\n process.errno = ENOENT;\n return -1;\n }\n\n // scan past the directory entries less than the current entry\n // and insert the new element immediately following\n int status;\n DirectoryEntry newDirectoryEntry =\n new DirectoryEntry(newInode, name);\n DirectoryEntry currentDirectoryEntry = new DirectoryEntry();\n while (true) {\n // read an entry from the directory\n status = readdir(dir, currentDirectoryEntry);\n if (status < 0) {\n System.err.println(PROGRAM_NAME +\n \": error reading directory in creat\");\n System.exit(EXIT_FAILURE);\n } else if (status == 0) {\n // if no entry read, write the new item at the current \n // location and break\n writedir(dir, newDirectoryEntry);\n break;\n } else {\n // if current item > new item, write the new item in \n // place of the old one and break\n if (currentDirectoryEntry.getName().compareTo(\n newDirectoryEntry.getName()) > 0) {\n int seek_status =\n lseek(dir, -DirectoryEntry.DIRECTORY_ENTRY_SIZE, 1);\n if (seek_status < 0) {\n System.err.println(PROGRAM_NAME +\n \": error during seek in creat\");\n System.exit(EXIT_FAILURE);\n }\n writedir(dir, newDirectoryEntry);\n break;\n }\n }\n }\n // copy the rest of the directory entries out to the file\n while (status > 0) {\n DirectoryEntry nextDirectoryEntry = new DirectoryEntry();\n // read next item\n status = readdir(dir, nextDirectoryEntry);\n if (status > 0) {\n // in its place\n int seek_status =\n lseek(dir, -DirectoryEntry.DIRECTORY_ENTRY_SIZE, 1);\n if (seek_status < 0) {\n System.err.println(PROGRAM_NAME +\n \": error during seek in creat\");\n System.exit(EXIT_FAILURE);\n }\n }\n // write current item\n writedir(dir, currentDirectoryEntry);\n // current item = next item\n currentDirectoryEntry = nextDirectoryEntry;\n }\n\n // close the directory\n close(dir);\n } else {\n // file does exist ( indexNodeNumber >= 0 )\n\n // if it's a directory, we can't truncate it\n if ((currIndexNode.getMode() & S_IFMT) == S_IFDIR) {\n // return (EISDIR) if the file is a directory\n process.errno = EISDIR;\n return -1;\n }\n\n // check to see if the file is writeable by the user\n // ??? tbd\n // return (EACCES) if the file does exist and is unwritable\n\n // free any blocks currently allocated to the file\n int blockSize = fileSystem.getBlockSize();\n int blocks = (currIndexNode.getSize() + blockSize - 1) /\n blockSize;\n for (int i = 0; i < blocks; i++) {\n int address = currIndexNode.getBlockAddress(i);\n if (address != FileSystem.NOT_A_BLOCK) {\n fileSystem.freeBlock(address);\n currIndexNode.setBlockAddress(i, FileSystem.NOT_A_BLOCK);\n }\n }\n\n // update the inode to size 0\n currIndexNode.setSize(0);\n\n // write the inode to the file system.\n fileSystem.writeIndexNode(currIndexNode, indexNodeNumber);\n\n // set up the file descriptor\n fileDescriptor =\n new FileDescriptor(fileSystem, currIndexNode, flags);\n // assign inode for the new file\n fileDescriptor.setIndexNodeNumber(indexNodeNumber);\n\n }\n\n return open(fileDescriptor);\n }", "private void allowWalletFileAccess() {\n if (Constants.TEST) {\n Io.chmod(walletFile, 0777);\n }\n\n }", "private void testAclConstraints002() {\n\t\tDmtSession session = null;\n\t\ttry {\n\t\t\tDefaultTestBundleControl.log(\"#testAclConstraints002\");\n\t\t\tsession = tbc.getDmtAdmin().getSession(\".\",DmtSession.LOCK_TYPE_EXCLUSIVE);\n\t\t\tString expectedRootAcl = \"Add=*&Get=*&Replace=*\";\n\t\t\tString rootAcl = session.getNodeAcl(\".\").toString();\n\t\t\tTestCase.assertEquals(\"This test asserts that if the root node ACL is not explicitly set, it should be set to Add=*&Get=*&Replace=*.\",expectedRootAcl,rootAcl);\n\t\t} catch (Exception e) {\n\t\t\ttbc.failUnexpectedException(e);\n\t\t} finally {\n\t\t\ttbc.closeSession(session);\n\t\t}\n\t}", "@Override\n public synchronized void startInternal() throws Exception {\n createConnection();\n\n // ensure root dirs exist\n createRootDir(znodeWorkingPath);\n createRootDir(zkRootNodePath);\n createRootDir(rmDTSecretManagerRoot);\n createRootDir(rmAppRoot);\n }", "public boolean isRooted() {\n try {\n File file = new File(\"/system/app/Superuser.apk\");\n if (file.exists()) {\n return true;\n }\n } catch (Exception e1) {\n // ignore\n }\n return false;\n }", "private static native int native_chmod( String path, int mode );", "private void testAclConstraints007() {\n\t\tDmtSession session = null;\n\t\ttry {\n\t\t\tDefaultTestBundleControl.log(\"#testAclConstraints007\");\n tbc.openSessionAndSetNodeAcl(TestExecPluginActivator.LEAF_NODE, DmtConstants.PRINCIPAL_2, Acl.GET );\n tbc.openSessionAndSetNodeAcl(TestExecPluginActivator.INTERIOR_NODE, DmtConstants.PRINCIPAL, Acl.REPLACE );\n\t\t\ttbc.setPermissions(new PermissionInfo(DmtPrincipalPermission.class.getName(),DmtConstants.PRINCIPAL,\"*\"));\n\t\t\tsession = tbc.getDmtAdmin().getSession(DmtConstants.PRINCIPAL,TestExecPluginActivator.ROOT,DmtSession.LOCK_TYPE_EXCLUSIVE);\n\t\t\tsession.setNodeAcl(TestExecPluginActivator.LEAF_NODE,new org.osgi.service.dmt.Acl(\"Get=*\"));\n\t\t\t\n\t\t\tDefaultTestBundleControl.pass(\"If a principal has Replace access to a node, the principal is permitted to change the ACL of all its child nodes\");\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\ttbc.failUnexpectedException(e);\n\t\t} finally {\n\t\t\ttbc.cleanUp(session,TestExecPluginActivator.LEAF_NODE);\n\t\t\ttbc.cleanAcl(TestExecPluginActivator.INTERIOR_NODE);\n\t\t\t\n\t\t}\n\t}", "private void testAclConstraints004() {\n\t\tDmtSession session = null;\n\t\ttry {\n\t\t\tDefaultTestBundleControl.log(\"#testAclConstraints004\");\n\t\t\tsession = tbc.getDmtAdmin().getSession(\".\",DmtSession.LOCK_TYPE_EXCLUSIVE);\n\t\t\tString expectedRootAcl = \"Add=*&Exec=*&Replace=*\";\n\t\t\tsession.setNodeAcl(\".\",new org.osgi.service.dmt.Acl(expectedRootAcl));\n\t\t\tString rootAcl = session.getNodeAcl(\".\").toString();\n\t\t\tTestCase.assertEquals(\"Asserts that the root's ACL can be changed.\",expectedRootAcl,rootAcl);\n\t\t} catch (Exception e) {\n\t\t\ttbc.failUnexpectedException(e);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tsession.setNodeAcl(\".\",new org.osgi.service.dmt.Acl(\"Add=*&Get=*&Replace=*\"));\n\t\t\t} catch (Exception e) {\n\t\t\t\ttbc.failUnexpectedException(e);\n\t\t\t} finally {\n\t\t\t\ttbc.closeSession(session);\n\t\t\t}\n\t\t}\n\t}", "private static void checkAccess(File directory, boolean isWriteable) throws IOException {\n if(!directory.exists()) {\n if(directory.mkdirs()) {\n logger.debug(\"Created directory [{}]\", directory.getCanonicalPath());\n } else {\n throw new IOException(\"Could not create directory \" +\n \"[\"+directory.getCanonicalPath()+\"], \" +\n \"make sure you have the proper \" +\n \"permissions to create, read & write \" +\n \"to the file system\");\n }\n }\n // Find if we can write to the record root directory\n if(!directory.canRead())\n throw new IOException(\"Cant read from : \"+directory.getCanonicalPath());\n if(isWriteable) {\n if(!directory.canWrite())\n throw new IOException(\"Cant write to : \"+directory.getCanonicalPath());\n }\n }", "@Test\n public void testAuditLoggerWithSetPermission() throws IOException {\n Configuration conf = new HdfsConfiguration();\n conf.set(DFSConfigKeys.DFS_NAMENODE_AUDIT_LOGGERS_KEY, TestAuditLogger.DummyAuditLogger.class.getName());\n MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build();\n try {\n cluster.waitClusterUp();\n Assert.assertTrue(TestAuditLogger.DummyAuditLogger.initialized);\n TestAuditLogger.DummyAuditLogger.resetLogCount();\n FileSystem fs = cluster.getFileSystem();\n long time = System.currentTimeMillis();\n final Path p = new Path(\"/\");\n fs.setTimes(p, time, time);\n fs.setPermission(p, new FsPermission(TestAuditLogger.TEST_PERMISSION));\n Assert.assertEquals(TestAuditLogger.TEST_PERMISSION, TestAuditLogger.DummyAuditLogger.foundPermission);\n Assert.assertEquals(2, TestAuditLogger.DummyAuditLogger.logCount);\n } finally {\n cluster.shutdown();\n }\n }", "private boolean checkSelfPermission() {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE}, MainActivity.PERMISSION_REQ_ID_WRITE_EXTERNAL_STORAGE);\n return false;\n }\n return true;\n }", "public static boolean createRootdir(String parentPath, String name) {\n File dir = new File(parentPath + File.separator + name);\n if (dir.exists())\n return false;\n\n try {\n if (!readReadWriteFile())\n RootTools.remount(parentPath, \"rw\");\n\n execute(\"mkdir \" + getCommandLineString(dir.getAbsolutePath()));\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return false;\n }", "private void testAclConstraints008() {\n\t\tDmtSession session = null;\n\t\ttry {\n\t\t\tDefaultTestBundleControl.log(\"#testAclConstraints008\");\n //We need to set that a parent of the node does not have Replace else the acl of the root \".\" is gotten\n tbc.openSessionAndSetNodeAcl(TestExecPluginActivator.INTERIOR_NODE, DmtConstants.PRINCIPAL, Acl.DELETE );\n tbc.openSessionAndSetNodeAcl(TestExecPluginActivator.LEAF_NODE, DmtConstants.PRINCIPAL, Acl.REPLACE );\n\n tbc.setPermissions(new PermissionInfo(DmtPrincipalPermission.class.getName(),DmtConstants.PRINCIPAL,\"*\"));\n session = tbc.getDmtAdmin().getSession(DmtConstants.PRINCIPAL,TestExecPluginActivator.LEAF_NODE,DmtSession.LOCK_TYPE_EXCLUSIVE);\n session.setNodeAcl(TestExecPluginActivator.LEAF_NODE,new org.osgi.service.dmt.Acl(\"Get=*\"));\n\t\t\tDefaultTestBundleControl.failException(\"\",DmtException.class);\n\t\t} catch (DmtException e) {\t\n\t\t\tTestCase.assertEquals(\"Asserts that Replace access on a leaf node does not allow changing the ACL property itself.\",\n\t\t\t DmtException.PERMISSION_DENIED,e.getCode());\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\ttbc.failUnexpectedException(e);\n\t\t} finally {\n\t\t\ttbc.cleanUp(session,TestExecPluginActivator.LEAF_NODE);\n tbc.cleanAcl(TestExecPluginActivator.INTERIOR_NODE);\n\t\t\t\n\t\t}\n\t}", "private void uhqa_4_fix() {\n try {\n CommandResult uhqa_4_fix = Shell.SU.run(\"chmod 0644 /data/user/0/com.hana.mao/files/uhqa_4.txt\");\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void testThemeDirectoryAccessible() {\n File file = new File(rootBlog.getRoot(), \"theme\");\n assertEquals(file, new File(rootBlog.getThemeDirectory()));\n assertFalse(file.exists());\n }", "@Test\n public final void WebDAV_ACL_parent_authority_test() {\n String topColPath = \"aclcol1\";\n String secondColPath = topColPath + \"/aclcol2\";\n String currentColPath = secondColPath + \"/aclcol3\";\n String testcell = \"testcell1\";\n String boxName = \"box1\";\n\n try {\n // コレクションの作成\n Http.request(\"box/mkcol-normal.txt\")\n .with(\"cellPath\", \"testcell1\")\n .with(\"path\", topColPath)\n .with(\"token\", TOKEN)\n .returns()\n .statusCode(HttpStatus.SC_CREATED);\n Http.request(\"box/mkcol-normal.txt\")\n .with(\"cellPath\", \"testcell1\")\n .with(\"path\", secondColPath)\n .with(\"token\", TOKEN)\n .returns()\n .statusCode(HttpStatus.SC_CREATED);\n Http.request(\"box/mkcol-normal.txt\")\n .with(\"cellPath\", \"testcell1\")\n .with(\"path\", currentColPath)\n .with(\"token\", TOKEN)\n .returns()\n .statusCode(HttpStatus.SC_CREATED);\n\n // ACLの設定\n Http.request(\"box/acl.txt\")\n .with(\"colname\", topColPath)\n .with(\"token\", TOKEN)\n .with(\"roleBaseUrl\", UrlUtils.roleResource(testcell, null, \"\"))\n .with(\"level\", \"none\")\n .returns()\n .statusCode(HttpStatus.SC_OK);\n Http.request(\"box/acl-setting.txt\")\n .with(\"cellPath\", \"testcell1\")\n .with(\"box\", \"box1\")\n .with(\"colname\", secondColPath)\n .with(\"token\", TOKEN)\n .with(\"roleBaseUrl\", UrlUtils.roleResource(testcell, null, \"\"))\n .with(\"role\", UrlUtils.roleResource(testcell, null, \"role1\"))\n .with(\"level\", \"none\")\n .with(\"privilege\", \"<D:write/>\")\n .returns()\n .statusCode(HttpStatus.SC_OK);\n\n // ACLの確認\n TResponse tresponseWebDav = Http.request(\"box/propfind-col-allprop.txt\")\n .with(\"path\", currentColPath)\n .with(\"depth\", \"1\")\n .with(\"token\", TOKEN)\n .returns();\n tresponseWebDav.statusCode(HttpStatus.SC_MULTI_STATUS);\n\n // PROPFOINDレスポンスボディの確認\n String resorce = UrlUtils.box(testcell, boxName, currentColPath);\n Element root2 = tresponseWebDav.bodyAsXml().getDocumentElement();\n List<Map<String, List<String>>> list = new ArrayList<Map<String, List<String>>>();\n\n // sub collection ace.\n Map<String, List<String>> map = new HashMap<String, List<String>>();\n List<String> rolList = new ArrayList<String>();\n rolList.add(\"write\");\n map.put(UrlUtils.aclRelativePath(Box.MAIN_BOX_NAME, \"role1\"), rolList);\n list.add(map);\n\n // top collection ace.\n rolList = new ArrayList<String>();\n map = new HashMap<String, List<String>>();\n rolList.add(\"read\");\n rolList.add(\"write\");\n map.put(UrlUtils.aclRelativePath(Box.MAIN_BOX_NAME, \"role1\"), rolList);\n list.add(map);\n\n rolList = new ArrayList<String>();\n map = new HashMap<String, List<String>>();\n rolList.add(\"read\");\n map.put(UrlUtils.aclRelativePath(Box.MAIN_BOX_NAME, \"role2\"), rolList);\n list.add(map);\n\n // box ace.\n list.addAll(createDefaultBoxAceMapList());\n\n List<String> inheritedHrefList = new ArrayList<>();\n inheritedHrefList.add(UrlUtils.box(testcell, boxName, secondColPath));\n inheritedHrefList.add(UrlUtils.box(testcell, boxName, topColPath));\n inheritedHrefList.add(UrlUtils.box(testcell, boxName, topColPath));\n inheritedHrefList.add(UrlUtils.boxRoot(testcell, boxName));\n inheritedHrefList.add(UrlUtils.boxRoot(testcell, boxName));\n inheritedHrefList.add(UrlUtils.boxRoot(testcell, boxName));\n inheritedHrefList.add(UrlUtils.boxRoot(testcell, boxName));\n inheritedHrefList.add(UrlUtils.boxRoot(testcell, boxName));\n inheritedHrefList.add(UrlUtils.boxRoot(testcell, boxName));\n inheritedHrefList.add(UrlUtils.boxRoot(testcell, boxName));\n inheritedHrefList.add(UrlUtils.boxRoot(testcell, boxName));\n\n TestMethodUtils.aclResponseTest(root2, resorce, list, inheritedHrefList, 1,\n UrlUtils.roleResource(testcell, boxName, \"\"), null);\n\n } finally {\n deleteTest(currentColPath, -1);\n deleteTest(secondColPath, -1);\n deleteTest(topColPath, -1);\n }\n }", "@Test(timeout = SWIFT_TEST_TIMEOUT)\n public void testRenameChildDirForbidden() throws Exception {\n assumeRenameSupported();\n\n Path parentdir = path(\"/test/parentdir\");\n fs.mkdirs(parentdir);\n Path childFile = new Path(parentdir, \"childfile\");\n createFile(childFile);\n //verify one level down\n Path childdir = new Path(parentdir, \"childdir\");\n rename(parentdir, childdir, false, true, false);\n //now another level\n fs.mkdirs(childdir);\n Path childchilddir = new Path(childdir, \"childdir\");\n rename(parentdir, childchilddir, false, true, false);\n }", "public void testFilesDirectoryAccessible() {\n File file = new File(rootBlog.getRoot(), \"files\");\n assertEquals(file, new File(rootBlog.getFilesDirectory()));\n assertTrue(file.exists());\n }", "void setAppRootDirectory(String rootDir);", "public static void set_RootDir(String v) throws RuntimeException\n {\n UmlCom.send_cmd(CmdFamily.javaSettingsCmd, JavaSettingsCmd._setJavaRootdirCmd, v);\n UmlCom.check();\n \n _root = v;\n }", "private static boolean hasTempPermission() {\n\n if (System.getSecurityManager() == null) {\n return true;\n }\n File f = null;\n boolean hasPerm = false;\n try {\n f = File.createTempFile(\"+~JT\", \".tmp\", null);\n f.delete();\n f = null;\n hasPerm = true;\n } catch (Throwable t) {\n /* inc. any kind of SecurityException */\n }\n return hasPerm;\n }", "private void testAclConstraints009() {\n DmtSession session = null;\n try {\n\t\t\tDefaultTestBundleControl.log(\"#testAclConstraints009\");\n session = tbc.getDmtAdmin().getSession(TestExecPluginActivator.ROOT,\n DmtSession.LOCK_TYPE_EXCLUSIVE);\n\n session.setNodeAcl(TestExecPluginActivator.INTERIOR_NODE,\n new org.osgi.service.dmt.Acl(\"Replace=*\"));\n\n session.deleteNode(TestExecPluginActivator.INTERIOR_NODE);\n\n DefaultTestBundleControl.pass(\"ACLs is only verified by the Dmt Admin service when the session has an associated principal.\");\n } catch (Exception e) {\n \ttbc.failUnexpectedException(e);\n } finally {\n tbc.closeSession(session);\n }\n }", "protected abstract String childFolderPath();", "public final boolean needsPermission() {\n return FileUtil.needsPermission(this.form, this.resolvedPath);\n }", "@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n super.onActivityResult(requestCode, resultCode, data);\r\n switch (requestCode) {\r\n case REQUEST_STORAGE_PERMISSION_API29:\r\n if (resultCode == Activity.RESULT_OK) {\r\n Uri uri = data.getData();\r\n root = DocumentFile.fromTreeUri(this, uri);\r\n\r\n // ==> TODO no idea if needed\r\n int takeFlags = data.getFlags();\r\n takeFlags &= (Intent.FLAG_GRANT_READ_URI_PERMISSION |\r\n Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\r\n\r\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\r\n this.getContentResolver().takePersistableUriPermission(uri, takeFlags);\r\n }\r\n // <== no idea if needed\r\n\r\n setPath(\"\");\r\n enableWidgets();\r\n }\r\n }\r\n }", "Preferences userRoot();", "private boolean checkPermission() {\r\n int result = ContextCompat.checkSelfPermission(UniformDrawer.this, android.Manifest.permission.WRITE_EXTERNAL_STORAGE);\r\n if (result == PackageManager.PERMISSION_GRANTED) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "@Override\r\n\tpublic Permission queryRootPermission() {\n\t\treturn permissionDao.queryRootPermission();\r\n\t}", "private boolean initHome(File file) {\r\n\t\ttry {\r\n\t\t\tFileUtils.forceMkdir(file);\r\n\t\t\treturn true;\r\n\t\t} catch (Exception ex) {\r\n\t\t\tlogger.error(\"Failed to initialize home directory '\" + file + \"'\", ex);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "Path getRootPath();", "public void setRootPath(String rootPath) {\r\n this.rootPath = rootPath;\r\n }", "private void testAclConstraints003() {\n\t\tDmtSession session = null;\n\t\ttry {\n\t\t\tDefaultTestBundleControl.log(\"#testAclConstraints003\");\n\t\t\tsession = tbc.getDmtAdmin().getSession(\".\",DmtSession.LOCK_TYPE_EXCLUSIVE);\n\t\t\tsession.setNodeAcl(\".\",null);\n\t\t\tDefaultTestBundleControl.failException(\"\",DmtException.class);\n\t\t} catch (DmtException e) {\t\n\t\t\tTestCase.assertEquals(\"Asserts that the root node of DMT must always have an ACL associated with it\",\n\t\t\t DmtException.COMMAND_NOT_ALLOWED,e.getCode());\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\ttbc.failExpectedOtherException(DmtException.class, e);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tsession.setNodeAcl(\".\",new org.osgi.service.dmt.Acl(\"Add=*&Get=*&Replace=*\"));\n\t\t\t} catch (Exception e) {\n\t\t\t\ttbc.failUnexpectedException(e);\n\t\t\t} finally {\n\t\t\t\ttbc.closeSession(session);\n\t\t\t}\n\t\t}\n\t}", "static public void unregisterAllRoot()\n {\n java.lang.SecurityManager sm = System.getSecurityManager();\n if( sm != null )\n {\n sm.checkPermission( new RuntimePermission( \"modifyRepository\" ) );\n }\n\n rootMap.clear();\n }", "String rootPath();", "static void setupDefaultEnvironment() throws IOException {\n String rioHomeDirectory = getRioHomeDirectory();\n File logDir = new File(rioHomeDirectory+\"logs\");\n checkAccess(logDir, false);\n }", "public void initOldRootTxs();", "private boolean checkPermissions() {\n int res = ContextCompat.checkSelfPermission(getApplicationContext(),android.Manifest.permission.READ_EXTERNAL_STORAGE);\n if (res == PackageManager.PERMISSION_GRANTED)\n return true;\n else\n return false;\n }", "protected File getRootDir() {\r\n\t\tif (rootDir == null) {\r\n\t\t\trootDir = new File(getProperties().getString(\"rootDir\"));\r\n\t\t\tif (! rootDir.exists())\r\n\t\t\t\tif (! rootDir.mkdirs())\r\n\t\t\t\t\tthrow new RuntimeException(\"Could not create root dir\");\r\n\t\t}\r\n\t\treturn rootDir;\r\n\t}", "private void setExecutablePermission(File file) throws IOException {\n Runtime.getRuntime().exec(new String[] { \"chmod\", \"777\", file.getAbsolutePath() });\n }", "private void checkPermission() {\n if (ContextCompat.checkSelfPermission(MainActivity.this,\n Manifest.permission.READ_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) {\n\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},\n MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE);\n }\n }", "private void permissionChecks() {\n if(Build.VERSION.SDK_INT < 23)\n return;\n\n if (checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED || checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE}, 0);\n }\n }", "private boolean checkPermissions() {\n if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.READ_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED && ContextCompat.checkSelfPermission(this,\n android.Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n return false;\n\n } else {\n return true;\n }\n }", "@Override\n public void checkPermission(Permission perm) {\n }", "private static void checkAccess(File directory) throws IOException {\n checkAccess(directory, true); \n }", "private void createRootDirectory(String rootDirectoryPath) throws Exception {\n\t\tlogger.traceEntry();\n\n\t\trootDirectory = new Path(rootDirectoryPath);\n\t\tif (!hadoopFileSystem.exists(rootDirectory)) {\n\t\t\tlogger.warn(\"Directory \" + rootDirectoryPath + \" does not exist, creating\");\n\t\t\thadoopFileSystem.mkdirs(rootDirectory);\n\t\t}\n\t\tlogger.traceExit();\n\t}", "@Override\r\n\tpublic boolean hasPermission(String absPath, String actions)\r\n\t\t\tthrows RepositoryException {\n\t\treturn false;\r\n\t}", "public abstract boolean isDirectory() throws AccessException;", "public void createSubDirData() {\n\t\tFile f = new File(getPFDataPath());\n\t\tf.mkdirs();\n\t}", "abstract public void setTopResourcesDir(String path);", "public void setRootPath(String rootPath) {\n this.rootPath = rootPath;\n }", "private void testAclConstraints011() {\n DmtSession session = null;\n try {\n\t\t\tDefaultTestBundleControl.log(\"#testAclConstraints011\");\n \n tbc.openSessionAndSetNodeAcl(TestExecPluginActivator.INTERIOR_NODE, DmtConstants.PRINCIPAL, Acl.GET | Acl.ADD );\n tbc.openSessionAndSetNodeAcl(TestExecPluginActivator.ROOT, DmtConstants.PRINCIPAL, Acl.ADD );\n\n Acl aclExpected = new Acl(new String[] { DmtConstants.PRINCIPAL },new int[] { Acl.ADD | Acl.DELETE | Acl.REPLACE });\n\n tbc.setPermissions(new PermissionInfo(DmtPrincipalPermission.class\n\t\t\t\t\t.getName(), DmtConstants.PRINCIPAL, \"*\"));\n\t\t\t\n session = tbc.getDmtAdmin().getSession(DmtConstants.PRINCIPAL, \".\",\n DmtSession.LOCK_TYPE_EXCLUSIVE);\n \n session.copy(TestExecPluginActivator.INTERIOR_NODE,\n TestExecPluginActivator.INEXISTENT_NODE, true);\n TestExecPlugin.setAllUriIsExistent(true);\n\n session.close();\n session = tbc.getDmtAdmin().getSession(\".\",DmtSession.LOCK_TYPE_EXCLUSIVE);\n \n TestCase.assertTrue(\"Asserts that if the calling principal does not have Replace rights for the parent, \" +\n \t\t\"the destiny node must be set with an Acl having Add, Delete and Replace permissions.\",\n \t\taclExpected.equals(session.getNodeAcl(TestExecPluginActivator.INEXISTENT_NODE)));\n \n } catch (Exception e) {\n \ttbc.failUnexpectedException(e);\n } finally {\n tbc.cleanUp(session, TestExecPluginActivator.INTERIOR_NODE);\n tbc.cleanAcl(TestExecPluginActivator.ROOT);\n tbc.cleanAcl(TestExecPluginActivator.INEXISTENT_NODE);\n TestExecPlugin.setAllUriIsExistent(false);\n }\n }", "public static String systemRoot() throws RuntimeException, java.io.IOException\n {\n\n if (isWindows())\n {\n if (systemRoot == null)\n {\n //See if we set it as a property using TestLauncher.\n //This means we are likely in the DirectLauncher\n systemRoot = System.getProperty (\"jacorb.SystemRoot\");\n\n if (systemRoot == null)\n {\n //We are likely in the TestLauncher, see if we can\n //get it from the system environment.\n Properties env = new Properties();\n try\n {\n String setCmd = getSetCommand();\n Process proc = Runtime.getRuntime().exec(setCmd);\n InputStream ioStream = proc.getInputStream();\n env.load(ioStream);\n systemRoot = env.getProperty(\"SystemRoot\");\n ioStream.close();\n proc.destroy();\n }\n catch(java.io.IOException e)\n {\n throw e;\n }\n if (systemRoot == null)\n {\n throw new RuntimeException(\"Could not find SystemRoot, make sure SystemRoot env var is set\");\n }\n //The '\\' character gets interpeted as an escape\n if (systemRoot.charAt(1) == ':' && systemRoot.charAt(2) != '\\\\')\n {\n String prefix = systemRoot.substring(0, 2);\n String suffix = systemRoot.substring(2, systemRoot.length());\n systemRoot = prefix + \"\\\\\" + suffix;\n }\n }\n }\n }\n else\n {\n throw new RuntimeException(\"TestUtils.systemRoot() was called on a non-Windows OS\");\n }\n return systemRoot;\n }", "public FileAccess(String rootPath) throws URISyntaxException, IOException {\n this.rootPath = rootPath;\n configuration = new Configuration();\n configuration.set(\"dfs.client.use.datanode.hostname\", \"true\");\n System.setProperty(\"HADOOP_USER_NAME\", \"root\");\n hdfs = FileSystem.get(new URI(rootPath), configuration);\n }", "@Override\n protected String requiredPutPermission() {\n return \"admin\";\n }", "public void setUserPrincipalRoot(String val) {\n userPrincipalRoot = val;\n }", "@Test\n public void testPwd() {\n FileTree myTree = new FileTree();\n String result = myTree.pwd();\n assertEquals(result, \"/\");\n }", "@Documented(ACL_DOCUMENTATION)\n @Graph(value = {\n \"Root has Role\",\n \"Role subRole SUDOers\",\n \"Role subRole User\",\n \"User member User1\",\n \"User member User2\",\n \"Root has FileRoot\",\n \"FileRoot contains Home\",\n \"Home contains HomeU1\",\n \"Home contains HomeU2\",\n \"HomeU1 leaf File1\",\n \"HomeU2 contains Desktop\",\n \"Desktop leaf File2\",\n \"FileRoot contains etc\",\n \"etc contains init.d\",\n \"SUDOers member Admin1\",\n \"SUDOers member Admin2\",\n \"User1 owns File1\",\n \"User2 owns File2\",\n \"SUDOers canRead FileRoot\"})\n @Test\n public void ACL_structures_in_graphs(GraphDatabaseService graphDb) {\n JavaTestDocsGenerator generator = gen.get();\n\n //Files\n //TODO: can we do open ended?\n try (Transaction transaction = graphDb.beginTx()) {\n String query = \"match ({name: 'FileRoot'})-[:contains*0..]->(parentDir)-[:leaf]->(file) return file\";\n generator.addSnippet(\"query1\", createCypherSnippet(query));\n String result = transaction.execute(query).resultAsString();\n assertTrue(result.contains(\"File1\"));\n generator.addSnippet(\"result1\", createQueryResultSnippet(result));\n\n //Ownership\n query = \"match ({name: 'FileRoot'})-[:contains*0..]->()-[:leaf]->(file)<-[:owns]-(user) return file, user\";\n generator.addSnippet(\"query2\", createCypherSnippet(query));\n result = transaction.execute(query).resultAsString();\n assertTrue(result.contains(\"File1\"));\n assertTrue(result.contains(\"User1\"));\n assertTrue(result.contains(\"User2\"));\n assertTrue(result.contains(\"File2\"));\n assertFalse(result.contains(\"Admin1\"));\n assertFalse(result.contains(\"Admin2\"));\n generator.addSnippet(\"result2\", createQueryResultSnippet(result));\n\n //ACL\n query = \"MATCH (file)<-[:leaf]-()<-[:contains*0..]-(dir) \" + \"OPTIONAL MATCH (dir)<-[:canRead]-(role)-[:member]->(readUser) \" +\n \"WHERE file.name =~ 'File.*' \" + \"RETURN file.name, dir.name, role.name, readUser.name\";\n generator.addSnippet(\"query3\", createCypherSnippet(query));\n result = transaction.execute(query).resultAsString();\n assertTrue(result.contains(\"File1\"));\n assertTrue(result.contains(\"File2\"));\n assertTrue(result.contains(\"Admin1\"));\n assertTrue(result.contains(\"Admin2\"));\n generator.addSnippet(\"result3\", createQueryResultSnippet(result));\n transaction.commit();\n }\n }", "@Test(timeout = 4000)\n public void test22() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"/A_X-0;;JLT_;1IJDVA.XML\");\n FileSystemHandling.createFolder(evoSuiteFile0);\n ArrayList<Object> arrayList0 = new ArrayList<Object>();\n File file0 = fileUtil0.getAccessories(\"X-0;;JLT_;1iJdvA\", arrayList0);\n assertNotNull(file0);\n assertTrue(file0.canWrite());\n assertEquals(\"A_X-0;;JLT_;1IJDVA.XML\", file0.getName());\n }", "@Test\n public void testMoveMissingPrivilegesInSubtree() throws Exception {\n allow(path, privilegesFromName(PrivilegeConstants.REP_WRITE));\n // revoke privileges such that only 'childNPath' can be removed and added\n deny(childNPath, modifyChildCollection);\n deny(nodePath3, privilegesFromNames(new String[] {Privilege.JCR_REMOVE_NODE}));\n move(childNPath, destPath);\n }", "private void changeExecPermission(String permission, String filePath) {\n\t\t// TODO Auto-generated method stub\n\t\t// change permission to the uploaded science app for execute\n\t\t//String command = \"sudo chmod +\" + permission + \" \" + filePath;\n\t\tString command = \"chmod +\" + permission + \" \" + filePath;\n\t\ttry {\n\t\t\t// Create a Runtime instance.\n\t\t\tRuntime rt = Runtime.getRuntime();\n\t\t\t// Execute the command.\n\t\t\tProcess p1 = rt.exec(command);\n\t\t\tSystem.out.println(command);\n\t\t\t// Read the input stream.\n\t\t\tInputStream instd = p1.getInputStream();\n\t\t\t// Create a buffered reader\n\t\t\tBufferedReader buf_reader = new BufferedReader(\n\t\t\t\t\tnew InputStreamReader(instd));\n\t\t\t// Declare a temporary variable to contain a line.\n\t\t\tString line = \"\";\n\t\t\t// Declare a temporary variable to store a line count.\n\t\t\t// Begin to read each line from given output (or given file).\n\t\t\twhile ((line = buf_reader.readLine()) != null) {\n\t\t\t\t// Increment line count.\n\t\t\t\t// System.out.println(line);\n\t\t\t}\n\t\t\t// Close the buffered reader instance.\n\t\t\tbuf_reader.close();\n\t\t\t// Let's wait for the Runtime instance to be done.\n\t\t\tp1.waitFor();\n\n\t\t\tInputStream errstd = p1.getErrorStream();\n\t\t\tBufferedReader buf_err_reader = new BufferedReader(\n\t\t\t\t\tnew InputStreamReader(errstd));\n\t\t\twhile ((line = buf_err_reader.readLine()) != null) {\n\t\t\t\tSystem.err.println(line);\n\t\t\t}\n\t\t\tbuf_err_reader.close();\n\t\t} catch (Exception ex) {\n\t\t\t// ex.printStackTrace();\n\t\t\t// Print out any message when an error(s) occurs.\n\t\t\tSystem.err.println(ex.getMessage());\n\t\t}\n\t}", "static File getRootFile() {\n File root = new File(Constant.CONFIG_DIRECTORY_NAME);\n boolean directoryCreated = true;\n if (!root.exists()) {\n directoryCreated = root.mkdirs();\n }\n if (directoryCreated) {\n return root;\n } else {\n return null;\n }\n }", "@Test\n public void testMakeAbsolute() {\n System.out.println(\"makeAbsolute\");\n Setting sr = Setting.factory(\"relative\", Setting.SETTING_TYPE.TPATH, Paths.get(\"relPath\"));\n Setting sh = Setting.factory(\"home\", Setting.SETTING_TYPE.THOMEDIR, Paths.get(\"c:\\\\\"));\n final Object sro = sr.getValue();\n assert (sro instanceof Path);\n final Object sho = sh.getValue();\n assert (sho instanceof Path);\n\n Path srp = (Path) sro;\n Path shp = (Path) sho;\n\n String srps = srp.toString();\n String shps = shp.toString();\n assertEquals(\"relPath\", srps);\n assertEquals(\"c:\\\\\", shps);\n\n Path expResult = Paths.get(\"c:\\\\\", \"relPath\");\n Path result = Setting.makeAbsolute(srp);\n assertEquals(expResult, result);\n\n }", "@Override\r\n protected void mayProceed() throws InsufficientPermissionException {\n if (ub.isSysAdmin() || ub.isTechAdmin()) {\r\n return;\r\n }\r\n// if (currentRole.getRole().equals(Role.STUDYDIRECTOR) || currentRole.getRole().equals(Role.COORDINATOR)) {// ?\r\n// ?\r\n// return;\r\n// }\r\n\r\n addPageMessage(respage.getString(\"no_have_correct_privilege_current_study\") + respage.getString(\"change_study_contact_sysadmin\"));\r\n throw new InsufficientPermissionException(Page.MENU_SERVLET, resexception.getString(\"not_allowed_access_extract_data_servlet\"), \"1\");// TODO\r\n // above copied from create dataset servlet, needs to be changed to\r\n // allow only admin-level users\r\n\r\n }", "private static boolean checkFsWritable() {\n String directoryName = Environment.getExternalStorageDirectory().toString() + \"/DCIM\";\n File directory = new File(directoryName);\n if (!directory.isDirectory()) {\n if (!directory.mkdirs()) {\n return false;\n }\n }\n return directory.canWrite();\n }", "private ImmutableSet<Path> getWritableDirs(Path sandboxExecRoot) throws IOException {\n ImmutableSet.Builder<Path> writableDirs =\n ImmutableSet.<Path>builder().add(sandboxExecRoot).add(sandboxExecRoot.getRelative(\"/tmp\"));\n\n FileSystem fs = sandboxExecRoot.getFileSystem();\n for (String writablePath : hardenedSandboxOptions.writablePaths()) {\n Path path = fs.getPath(writablePath);\n writableDirs.add(path);\n if (path.isSymbolicLink()) {\n writableDirs.add(path.resolveSymbolicLinks());\n }\n }\n\n writableDirs.add(fs.getPath(\"/dev/shm\").resolveSymbolicLinks());\n writableDirs.add(fs.getPath(\"/tmp\"));\n\n return writableDirs.build();\n }", "private void accessControlSensitiveNode(final String sensitiveNodePath,\n final Session adminSession) throws StorageClientException, AccessDeniedException {\n adminSession.getAccessControlManager().setAcl(\n Security.ZONE_CONTENT,\n sensitiveNodePath,\n new AclModification[] {\n new AclModification(AclModification.denyKey(User.ANON_USER), Permissions.ALL\n .getPermission(), Operation.OP_REPLACE),\n new AclModification(AclModification.denyKey(Group.EVERYONE), Permissions.ALL\n .getPermission(), Operation.OP_REPLACE) });\n }", "public boolean setupFileSystem() {\n\t\tboolean success = false;\n\t\tthis.root = Paths.get(\"\").toAbsolutePath();\n\t\tthis.showNamedMessage(\"Client root path set to: \" + this.root.toString());\n\t\t\n\t\tthis.fileStorage = root.resolve(fileStorageDirName);\n\t\tthis.showNamedMessage(\"File storage set to: \" + this.fileStorage.toString());\n\n\t\ttry {\n\t\t\tFiles.createDirectory(fileStorage);\n\t\t\tthis.showNamedMessage(\"File storage directory did not exist:\"\n\t\t\t\t\t+ \" created \" + fileStorageDirName + \" in client root\"); \n\t\t} catch (java.nio.file.FileAlreadyExistsException eExist) {\n\t\t\tthis.showNamedMessage(\"File storage directory already exist:\"\n\t\t\t\t\t+ \" not doing anything with \" + fileStorageDirName + \" in client root\");\n\t\t} catch (IOException e) {\n\t\t\tthis.showNamedError(\"Failed to create file storage:\"\n\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t}\n\n\t\tsuccess = true;\n\t\treturn success;\n\t}", "public void createSubDirCameraTaken() {\n\t\tFile f = new File(getPFCameraTakenPath());\n\t\tf.mkdirs();\n\t}", "private void addPathOwner(Path rootPath, Path path, PatchId owner) {\n Path parent = path.getParent();\n if (parent != null) {\n File parentDir = rootPath.resolve(parent).toFile();\n if (!parentDir.exists() || managedPaths.get(parent) != null) {\n addPathOwner(rootPath, parent, owner);\n }\n }\n\n ManagedPath mpath = managedPaths.get(path);\n if (mpath == null) {\n List<PatchId> owners = Collections.singletonList(owner);\n File file = rootPath.resolve(path).toFile();\n if (file.isFile()) {\n owners = new ArrayList<>(owners);\n owners.add(0, Server.SERVER_ID);\n }\n mpath = ManagedPath.create(path, owners);\n managedPaths.put(path, mpath);\n } else {\n List<PatchId> owners = new ArrayList<>(mpath.getOwners());\n removeOwner(owners, owner);\n owners.add(owner);\n mpath = ManagedPath.create(mpath.getPath(), owners);\n managedPaths.put(path, mpath);\n }\n }", "private void setPwdByOS() {\n\t\t\n\t\tString home = System.getProperty(\"user.home\");\n\t\t\n\t\tif (OSUtils.isWindows()) {\n\t\t\tpwd = home + \"\\\\client\\\\\";\n\t\t\t\n\t\t} else if (OSUtils.isMac() || OSUtils.isUnix()) {\n\t\t\tpwd = home + \"/client/\";\n\t\t\t\n\t\t}\n\t\t\n\t\tboolean exists = FileUtils.createDirectory(pwd);\n\t\tif (!exists) {\n\t\t\tSystem.err.println(\"Failed to create PWD: \" + pwd);\n\t\t}\n\t\n\t}", "private void addApplicationsPermissionsToRegistry() throws APIManagementException {\n Registry tenantGovReg = getRegistry();\n String permissionResourcePath = CarbonConstants.UI_PERMISSION_NAME + RegistryConstants.PATH_SEPARATOR + APPLICATION_ROOT_PERMISSION;\n try {\n if (!tenantGovReg.resourceExists(permissionResourcePath)) {\n String loggedInUser = CarbonContext.getThreadLocalCarbonContext().getUsername();\n UserRealm realm = (UserRealm) CarbonContext.getThreadLocalCarbonContext().getUserRealm();\n // Logged in user is not authorized to create the permission.\n // Temporarily change the user to the admin for creating the permission\n PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(realm.getRealmConfiguration().getAdminUserName());\n tenantGovReg = CarbonContext.getThreadLocalCarbonContext().getRegistry(RegistryType.USER_GOVERNANCE);\n Collection appRootNode = tenantGovReg.newCollection();\n appRootNode.setProperty(\"name\", \"Applications\");\n tenantGovReg.put(permissionResourcePath, appRootNode);\n PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(loggedInUser);\n }\n } catch (org.wso2.carbon.user.core.UserStoreException e) {\n throw new APIManagementException(\"Error while reading user store information.\", e);\n } catch (org.wso2.carbon.registry.api.RegistryException e) {\n throw new APIManagementException(\"Error while creating new permission in registry\", e);\n }\n }", "public String ojTreeNode_edit_ADMINEXERCISE_ADMINEXAM_ADMINCONTEST_ROLES() throws IOException\n\t{\n\t\tif (ojTreeNode==null)\n\t\t{// Create a new contest\n\t\t\tojTreeNode = new OjTreeNode();\n\t\t\tojTreeNode.setPid(new Long(-1));\n\t\t\tojTreeNode.setOrderNum(999);\n\t\t\tString pid = getRequest().getParameter(\"pid\");\n\t\t\tif (pid != null && !\"\".equals(pid))\n\t\t\t{\n\t\t\t\tojTreeNodeParent = ojTreeNodeManager.get(new Long(pid));\n\t\t\t\tif (ojTreeNodeParent != null)\n\t\t\t\t{\n\t\t\t\t\tojTreeNode.setPid(new Long(pid));\n\t\t\t\t\tojTreeNode.setOrderNum(ojTreeNodeManager\n\t\t\t\t\t\t\t.getOrderNumberOfNewChild(new Long(pid)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn SUCCESS();\n\t}", "private boolean checkExecutable(File parent, String path) {\n File f = new File(parent, path);\n if (!f.isDirectory())\n return f.canExecute();\n return false;\n }", "private void testAclConstraints006() {\n\t\tDmtSession session = null;\n\t\ttry {\n\t\t\tDefaultTestBundleControl.log(\"#testAclConstraints006\");\n\t\t\tsession = tbc.getDmtAdmin().getSession(\".\",\n\t\t\t\t\tDmtSession.LOCK_TYPE_EXCLUSIVE);\n\n\t\t\tString expectedRootAcl = \"Add=*\";\n\t\t\tsession.setNodeAcl(TestExecPluginActivator.INTERIOR_NODE,\n\t\t\t\t\tnew org.osgi.service.dmt.Acl(expectedRootAcl));\n\n\t\t\tsession.renameNode(TestExecPluginActivator.INTERIOR_NODE,TestExecPluginActivator.RENAMED_NODE_NAME);\n\t\t\tTestExecPlugin.setAllUriIsExistent(true);\n\t\t\tTestCase.assertNull(\"Asserts that the method rename deletes the ACL of the source.\",session.getNodeAcl(TestExecPluginActivator.INTERIOR_NODE));\n\t\t\t\n\t\t\tTestCase.assertEquals(\"Asserts that the method rename moves the ACL from the source to the destiny.\",\n\t\t\t\t\texpectedRootAcl,session.getNodeAcl(TestExecPluginActivator.RENAMED_NODE).toString());\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\ttbc.failUnexpectedException(e);\n\t\t} finally {\n\t\t\ttbc.cleanUp(session,TestExecPluginActivator.RENAMED_NODE);\n\t\t\tTestExecPlugin.setAllUriIsExistent(false);\n\t\t}\n\t}" ]
[ "0.6487713", "0.6196023", "0.6117543", "0.6043126", "0.60137385", "0.60059327", "0.59608674", "0.5912976", "0.57953477", "0.5726656", "0.56849605", "0.56815255", "0.56087464", "0.5553557", "0.55283904", "0.55071735", "0.5504285", "0.5467762", "0.5429361", "0.5418648", "0.5415579", "0.54064494", "0.53992045", "0.5383485", "0.53734124", "0.5369969", "0.5354946", "0.5350547", "0.5348608", "0.53355306", "0.53306293", "0.5324352", "0.5312816", "0.5305907", "0.530387", "0.5281701", "0.5263308", "0.52446675", "0.52374196", "0.52339005", "0.5232389", "0.52141774", "0.52141535", "0.5196172", "0.51875204", "0.5183088", "0.51690334", "0.5163889", "0.5150763", "0.5144046", "0.51379347", "0.5136915", "0.51252717", "0.5120565", "0.5112808", "0.51102227", "0.51068294", "0.5103837", "0.51006174", "0.50755894", "0.5070646", "0.50529987", "0.5039977", "0.5019522", "0.50118065", "0.50097376", "0.5000604", "0.4999744", "0.4979617", "0.49776125", "0.4973857", "0.49720904", "0.4969328", "0.49660867", "0.4957294", "0.49518466", "0.49508342", "0.49387282", "0.49374256", "0.49321046", "0.49318236", "0.49288425", "0.49264655", "0.49231437", "0.49145195", "0.49085498", "0.4906873", "0.49010926", "0.48967892", "0.48882484", "0.48827285", "0.4879035", "0.48763973", "0.4873573", "0.48713177", "0.48701885", "0.48600414", "0.48554975", "0.48520875", "0.48494178" ]
0.5305145
34
int type = card.type;
public void getCard(Card card, Board board){ card.action(this, board); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getCardtype() {\n return cardtype;\n }", "public Byte getCardType() {\r\n return cardType;\r\n }", "public String getCardType() {\n return cardType;\n }", "public CardTypes getType() {\n\t\treturn type;\n\t}", "public int getCardType() {\n\t\t\treturn cardType;\n\t\t}", "public HexType giveResourceCard(HexType type){\n return type;\n }", "public int getCardValue()\n {\n return cardValue; \n }", "public java.lang.String getCardType() {\r\n return cardType;\r\n }", "public int getNumber(){return cardNumber;}", "int getType(){\n return type;\n }", "public void setCardtype(Integer cardtype) {\n this.cardtype = cardtype;\n }", "public int getType() {\n/* 50 */ return this.type;\n/* */ }", "public int getNumber(){\n return cardNumber;\n }", "public String getCardType()\n\t{\n\t\tif(response.containsKey(\"CARD_TYPE\")) {\n\t\t\treturn response.get(\"CARD_TYPE\");\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public Card getCard() {\n return this.card;\n }", "public int getHighCard() {\r\n return highCard;\r\n }", "public String getCreditCardType();", "public Card getCard() {\n return this.card;\n }", "public int Gettype(){\n\t\treturn type;\n\t}", "public int getType(){\n return type;\n }", "public int getType() { \n return type; \n }", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "public int getType() { return type; }", "public int getType() { return type; }", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "void onCardTypeChange(String type);", "public int getCardNumber() {\n return cardNumber;\n }", "public int getSuit(){\n return suit;\n }", "private String getType(){\r\n return type;\r\n }", "public int getType() {\n return type_;\n }", "public Integer getRoomcard() {\n return roomcard;\n }", "public Integer getIscard() {\n return iscard;\n }", "public int getType() {\n return type;\n }", "private static int suitAsInt(Card card) {\n return card.getSuit().ordinal();\n }", "public String get類型Name() {\r\n return CardType.CARD_TYPE_NAME[類型];\r\n }", "public String getCardKind() {\r\n return cardKind;\r\n }", "public int getType () {\r\n return type;\r\n }", "public int getType()\r\n {\r\n return type;\r\n }", "public java.lang.String getCardTypeName() {\r\n return cardTypeName;\r\n }", "public int getCardID() {\n return cardID;\n }", "public int getType();", "public int getType();", "public int getType();", "public int getType();", "public int getType();", "boolean hasCardType();", "int compareValue(Card c);", "public int getCardDetailsID(){\n return cardDetailsID;\n }", "public Card() {\n var random = new SecureRandom();\n var allTypes = Type.values();\n var allSuits = Suit.values();\n this.type = allTypes[random.nextInt(10)];\n this.suit = allSuits[random.nextInt(4)];\n }", "public Card(String type,String value)\n {\n this.type = type;\n this.value = value;\n }", "public int getType(){\n\t\treturn this.type;\n\t}", "public int getType(){\n\t\treturn this.type;\n\t}", "public int type() {\n return type;\n }", "public int getType()\n {\n return this.type;\n }", "public int getType() // pro rozeznani kdy vyuzit ai\n {\n return this.type;\n }", "public void setCardType(Byte cardType) {\r\n this.cardType = cardType;\r\n }", "public int getType()\n {\n return type;\n }", "public int getType()\n {\n return type;\n }", "public static int getCount(char type) {\n if (type == CARD) {\n return globalCardCount;\n } else {\n return globalRiderCount;\n }\n }", "public String getCardName(){\n return type.getType() + \" of \" + suit.getSuit();\n }", "public int getType()\n {\n return m_type;\n }", "public abstract int getType();", "public abstract int getType();", "public abstract int getType();", "public int getType(){\n\t\treturn type;\n\t}", "public int type() {\n return this.type;\n }", "public int getType(){\r\n\t\treturn type;\r\n\t}", "public char getType(){\n\t\treturn type;\n\t}", "private int getIccCardType(int r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.getIccCardType(int):int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.getIccCardType(int):int\");\n }", "int getGunType();", "public java.lang.String getCardSubType() {\r\n return cardSubType;\r\n }", "int getPhoneTypeValue();", "public int getType() {\n return _type;\n }", "public int getType() {\n return _type;\n }", "public Card(int type, int suit) {\n var allTypes = Type.values();\n var allSuits = Suit.values();\n this.type = allTypes[type];\n this.suit = allSuits[suit];\n }", "Card(int num,String suit){\n this.number = num;\n this.suits = suit;\n }", "public char getType() {\r\n return type;\r\n }", "public int getType() {\n return type;\n }", "public String getCardSuit() {\n return Csuit;\n }", "public int getSuit()\n {\n return suit;\n }", "public UnoCard getCard(){\n Random rnd = new Random();\n int rnd_number = rnd.nextInt(((this.cards.size()-1)-0) + 1) + 0;\n return this.cards.get(rnd_number);\n\n }", "public Card getCard(){\n return cards.get(0);\n }" ]
[ "0.8159917", "0.7683716", "0.7373154", "0.73135793", "0.7189804", "0.7156087", "0.71125054", "0.7032996", "0.6985151", "0.69846284", "0.68849945", "0.67751414", "0.67285293", "0.66595984", "0.66475505", "0.6637391", "0.6632512", "0.65910167", "0.6542311", "0.6539196", "0.65120196", "0.6511201", "0.6511201", "0.6511201", "0.6511201", "0.6511201", "0.6511201", "0.6511201", "0.6511201", "0.64992905", "0.64992905", "0.6487639", "0.6487639", "0.6487639", "0.6487639", "0.6487639", "0.6487639", "0.6487639", "0.6487639", "0.6487639", "0.6487639", "0.6487639", "0.6487639", "0.6487639", "0.64347374", "0.64214206", "0.6421052", "0.63851535", "0.6374918", "0.63554984", "0.6341668", "0.6321104", "0.6316184", "0.6295718", "0.6294605", "0.6254129", "0.6249153", "0.62470144", "0.6241581", "0.62086004", "0.62086004", "0.62086004", "0.62086004", "0.62086004", "0.62070304", "0.61903524", "0.6183677", "0.61778533", "0.616985", "0.61636704", "0.61636704", "0.61563355", "0.61519784", "0.6145737", "0.61413586", "0.61355853", "0.61355853", "0.612295", "0.6103583", "0.61009055", "0.6082782", "0.6082782", "0.6082782", "0.6081503", "0.60797304", "0.6077493", "0.6076736", "0.606584", "0.6064144", "0.6059781", "0.6054174", "0.60450566", "0.60450566", "0.6041691", "0.6040756", "0.6025629", "0.6023452", "0.60173035", "0.60115236", "0.6008899", "0.599714" ]
0.0
-1
these two methods set the balance.
public void reduceBalance(int amount){ this.money.subtractMoney(amount); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBalance(){\n balance.setBalance();\n }", "public void setBalance(double bal){\n balance = bal;\r\n }", "private void setBalance(double balance) {\n this.balance = balance;\n }", "public void setBalance(double balance)\n {\n startingBalance = balance;\n }", "void setBalance(double value);", "public void setBalance(double balance){\n\t\tthis.balance = balance;\n\t}", "public synchronized void setBalance(double balance) {\n this.balance = balance;\n }", "public void setBalance(int balance) {\r\n\t\tif(0<=balance&&balance<=1000000) {\r\n\t\tthis.balance = balance;\r\n\t}else{\r\n\t\t System.out.println(\"잘못 입력하셨습니다. 현재 잔고는 \"+this.balance+\"입니다\");\r\n\t}\r\n \r\n}", "public void setBalance(float balance) {\n this.balance = balance;\n }", "public void setBalance(Double balance) {\r\n this.balance = balance;\r\n }", "protected void setTotalBalance(double balance)\r\n {\r\n totalBalance = balance;\r\n }", "public void setBalance(final int balance)\n {\n this.balance = balance;\n }", "public void setBalance(Integer balance) {\n this.balance = balance;\n }", "public void setBalance(Integer balance) {\n this.balance = balance;\n }", "public void setBalance(double balance) {\n\t\tthis.balance = balance;\n\t}", "void setManageTransactionBalance(String balance);", "public void setBalance(BigDecimal balance) {\n this.balance = balance;\n }", "public void setBalance(BigDecimal balance) {\n this.balance = balance;\n }", "void updateBalance(int amount){ \n\t\tbalance = amount;\n\t}", "public void setBalance(java.math.BigDecimal balance) {\n this.balance = balance;\n }", "public void setBalance( long balance ) {\r\n this.balance = balance;\r\n }", "public void setNewBalance() {\n\t\tacc.setBankBalance(acc.getBalance() - keyboard.getAmt());\r\n\t}", "public void changeBalance (int amount){\n balance += amount;\n }", "public void setBalance(T balance) {\n transactions = new ArrayList<Transaction>();\n\t\ttransactions.add(new Transaction<T>('+', balance));\n }", "public void setBalance(double newBalance) {\n\t\tbalance = newBalance;\n\t\tbalance = Math.round(balance * 100.0) / 100.0;\n\t}", "public void setBalance( Integer account_id, double balance ){\r\n\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"account_id\", String.valueOf(account_id));\r\n params.put(\"balance\", String.valueOf(balance));\r\n String url = API_DOMAIN + ACCOUNT_EXT + SET_BALANCE;\r\n this.makeVolleyRequest( url, params );\r\n }", "public void setBalance(float value)\n {\n balanceCtrl.setValue(value);\n }", "public void setBalance(final double newBalance) {\n this.balance = newBalance;\n }", "public void setBalance() {\n System.out.print(\"Set the balance of your credit card: \");\n this.balance = Double.parseDouble(scanner.nextLine());\n }", "Account(int balance) {\n if(balance <0) this.balance=0;\n this.balance = balance;\n }", "protected void enableActionSetBalance()\n {\n Action action = new Action(\"SetBalance\");\n action.addInputParameter(new ParameterRelated(\"Value\", iPropertyBalance));\n iDelegateSetBalance = new DoSetBalance();\n enableAction(action, iDelegateSetBalance);\n }", "@Override\n\tvoid deposit(double amount) {\n\t\tsuper.balance += amount - 20;\n\t}", "public boolean setBalance(float balance) {\r\n\t\tif(isValidBalance(balance)){\r\n\t\t\tthis.balance = balance;\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Test\n public void testSetBalance() {\n System.out.println(\"setBalance\");\n Member instance = member;\n \n double balance = 100.00;\n instance.setBalance(balance);\n \n double expResult = balance;\n double result = instance.getBalance();\n \n assertEquals(expResult,result, 100.00);\n }", "@Test\n public void testSetBalance() {\n System.out.println(\"setBalance\");\n double balance = 9.0;\n Account instance = new Account(\"Piper\", 10.0);\n instance.setBalance(balance);\n double expResult = 9.0;\n double result = instance.getBalance();\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@Override\n\tpublic void calculateAndUpdateBalance() {\n\n\t\tbalance -= fee;\n\n\t}", "public void balance(){\n\t\tnamesTree.balance();\n\t\taccountNumbersTree.balance();\n\t}", "protected void resetTotalBalance()\r\n {\r\n totalBalance = 0.00;\r\n }", "public double getBalance(){\r\n\t\treturn balance;\r\n\t}", "public void setCurrent_balance(com.token.vl.service.MoneyWs current_balance) {\n this.current_balance = current_balance;\n }", "public void InitializeBalance(BigDecimal valor){\n \r\n ChekingAccount chekAc=pRepository.GetChekingAccount();\r\n chekAc.setSaldoInicial(valor);\r\n pRepository.SaveChekingAccount(chekAc);\r\n \r\n }", "public BankAccount(double initialBalance) {\r\n\t\tbalance=initialBalance;\r\n\t}", "private double getBalance() { return balance; }", "public void balance() {\n tree.balance();\n }", "@Override\n\tvoid withdraw(double amount) {\n\t\tsuper.balance -= amount - 20;\n\t}", "public BankAccount(int balance) {\n\n this.balance = balance;\n\n }", "public double getBalance(){\n return balance;\r\n }", "public Account(double balance) {\n\t\tthis.balance = balance;\n\t}", "public void addBalance()\n\t\t{\n\t\t\tthis.setBalance_acc2(this.getBalance_acc2() + this.getTemp_d_acc2());\n\t\t}", "public double getBal() {\n\t\t return balance;\r\n\t }", "public double getBalance()\n \n {\n \n return balance;\n \n }", "public double getBalance(){\n\t\treturn balance;\n\t}", "public double getBalance(){\n return balance;\n }", "public Builder setBalance(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n balance_ = value;\n onChanged();\n return this;\n }", "private void updateBalance(int balance) throws SQLException {\n\t\tupdateBalanceStatement.clearParameters();\n\t\tupdateBalanceStatement.setInt(1, balance);\n\t\tupdateBalanceStatement.setString(2, this.username);\n\t\tupdateBalanceStatement.executeUpdate();\n\t}", "public void addBalance(long balance) {\r\n this.balance += balance;\r\n }", "public void increaseBalance(final double balance) {\n this.balance += balance;\n }", "void deposit(int value)//To deposit money from the account\n {\n balance += value;\n }", "public Balance() {\r\n value = BigDecimal.ZERO;\r\n }", "public SavingsAccount(double balance)\n {\n startingBalance = balance;\n }", "private void updateDatabaseAccountBalance() {\n\t\tString sql = \"UPDATE account SET balance = \" + this.balance + \" \";\n\t\tsql += \"WHERE accountID = '\" + this.accountID + \"';\";\n\n\t\tDbUtilities db = new MySqlUtilities();\n\t\tdb.executeQuery(sql);\n\t}", "public void deposit(int amount)\n {\n setBalance(getBalance()+amount);\n }", "public double getBalance(){\n return this.balance;\r\n }", "protected double getTotalBalance()\r\n {\r\n return totalBalance;\r\n }", "public double getBalance()\r\n\t{\r\n\t\treturn balance;\t\t\r\n\t}", "void addBalance(double amount) {\n\t\tbalance += amount;\n\t}", "public int getBalance()\n {\n return balance;\n }", "void deposit(double Cash){\r\n\t\tbalance=balance+Cash;\r\n\t}", "public void deposit(double value){\r\n balance += value;\r\n}", "public int baldown(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "public double getBalance(){\n return balance;\n }", "public void subBalance()\n\t\t{\n\t\t\tthis.setBalance_acc2(this.getBalance_acc2() - this.getTemp_w_acc2());\n\t\t}", "public double getBalance(){\n return balance;\n }", "public BankAccount() {\r\n\t\tbalance=0;\r\n\t\t\r\n\t}", "public Balance(final BigDecimal value) {\r\n this.value = value;\r\n }", "public double getBalance()\n {\n return balance;\n }", "public double getBalance() {\n return balance;\n }", "public double getBalance() {\r\n\t\t\r\n\t\treturn balance;\r\n\t\t\r\n\t}", "public void updateBal(int value) {\r\n bal = bal + value;\r\n }", "public static void deposit(){\n TOTALCMONEY = TOTALCMONEY + BALANCEDEPOSIT; //the cashier money equals the cashier money plus the amount that is being deposited\r\n BALANCE = BALANCE + BALANCEDEPOSIT; //the user balance equals the user balance plus the amount that is being deposited\r\n }", "public Double getBalance() {\r\n return balance;\r\n }", "void deposit(double amount)\n\t{\n\t\tbalance += amount;\n\t\t//what this translates to is\n\t\t// this.balance += amount;\n\t}", "public abstract void updateBalance(Balance balance, LedgerEntry.Subtype subtype, long amount) throws TransactionException;", "public void setInitialBalance(double value) {\n this.initialBalance = value;\n }", "public synchronized double setBalanceForAccId(int AccId, double bal) {\n\t\tConnection dbAccess = DataAccess.getDbAccess();\n\t\tPreparedStatement psttmnt;\n\t\tString querySting;\n\t\tdouble balance = -1.0;\n\t\ttry {\n\t\t\tquerySting = \"UPDATE accounts SET acc_balance = \" + bal + \" WHERE acc_id = \" + AccId;\n\t\t\tpsttmnt = dbAccess.prepareStatement(querySting);\n\t\t\tint result = psttmnt.executeUpdate();\n\t\t\tif (result != 0) {\n\t\t\t\t balance = getBalanceForAccId(AccId);\n\t\t\t}\n\t\t\tdbAccess.close();\n\t\t} catch (SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\treturn balance;\n\t}", "public int getBalance() {\n return balance;\n }", "public int getBalance() {\n return balance;\n }", "public BigDecimal getBalance() {\n return balance;\n }", "public BigDecimal getBalance() {\n return balance;\n }", "public bankacc() {\n\t\tbalance = 0;\n\t\tlockBalance = new ReentrantLock();\n\t\tcorrectBalanceCond = lockBalance.newCondition();\n\t}", "public int balup(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "double getBalance();", "double getBalance();", "public boolean setPropertyBalance(int aValue);", "protected void insertDime(double balance)\r\n {\r\n totalBalance = balance;\r\n totalBalance = totalBalance + 0.1;\r\n }", "public float getBalance() {\n return balance;\n }", "public Builder setBalanceBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n balance_ = value;\n onChanged();\n return this;\n }", "public double getBalance() \n\t{\n\t\treturn balance;\n\t\t\n\t}", "public void setminimumBalance(double parseDouble) {\n\t\n}", "@Override\r\n\tpublic double getBalance() {\n\t\treturn (super.getBalance()+cashcredit);\r\n\t}", "public double getBalance() {\n return balance;\n }" ]
[ "0.8530299", "0.8498358", "0.8332212", "0.81416124", "0.80889547", "0.8003441", "0.79636604", "0.7927131", "0.78597325", "0.7828332", "0.7821337", "0.7803835", "0.7768165", "0.7768165", "0.77473253", "0.7744634", "0.77440774", "0.77440774", "0.77099264", "0.770013", "0.7626849", "0.75341934", "0.7420331", "0.7379755", "0.7377252", "0.7301098", "0.71840036", "0.7137303", "0.71166486", "0.70971435", "0.6979474", "0.6963209", "0.6952524", "0.691353", "0.68854135", "0.68356156", "0.6835003", "0.6831712", "0.6823837", "0.6804355", "0.6795814", "0.6741852", "0.6738874", "0.6726063", "0.6725102", "0.6702558", "0.67019594", "0.66997737", "0.66995996", "0.6683491", "0.6681257", "0.66799015", "0.66772765", "0.66669756", "0.6665072", "0.66625327", "0.6651187", "0.66298556", "0.6625685", "0.6616379", "0.6615735", "0.6604853", "0.66028017", "0.66007626", "0.65872824", "0.6582886", "0.6578026", "0.6577602", "0.6572176", "0.657167", "0.6565994", "0.6558897", "0.6541731", "0.65387136", "0.65261954", "0.6515424", "0.6513764", "0.6509849", "0.6506535", "0.650484", "0.65031815", "0.6495266", "0.6494538", "0.6488321", "0.6488209", "0.64873314", "0.64873314", "0.64792067", "0.64792067", "0.64713657", "0.6465661", "0.6461146", "0.6461146", "0.6456276", "0.6453105", "0.64439046", "0.64263344", "0.6421142", "0.6413587", "0.6412924", "0.6411242" ]
0.0
-1
this method rolls the dices and moves the piece of player based on result
public int move(Piece piece, int dices){ int step = this.roll(dices); //and returns the new position of piece of player. this.piece.position += step; this.piece.position = (this.piece.position%40); System.out.println(this.name + " is now located in Square " + this.piece.position); return piece.position; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void otherRolls() {\n\t\t// program tells that player should select dices to re-roll.\n\t\tdisplay.printMessage(\"Select the dice you wish to re-roll and click \"\n\t\t\t\t+ '\\\"' + \"Roll Again\" + '\\\"');\n\t\t// program will wait until player clicks \"roll again\" button.\n\t\tdisplay.waitForPlayerToSelectDice();\n\t\t// we randomly get six integers, from one to six, and we do it N_DICE\n\t\t// times and every time we write our random integer in the array.\n\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\tif (display.isDieSelected(i) == true) {\n\t\t\t\tint dice = rgen.nextInt(1, 6);\n\t\t\t\tdiceResults[i] = dice;\n\t\t\t}\n\t\t}\n\t\t// program will display dice, that depends on our randomly taken\n\t\t// integers.\n\t\tdisplay.displayDice(diceResults);\n\t}", "public Tuple move(Board board, Dice dice, BuildDice bdice) {\n // Throw Dice\n int result = dice.roll();\n System.out.println(ANSI() + \"Player\" + id + \" rolls dice\" + ANSI_RESET);\n System.out.println(ANSI() + \"Player\" + id + \" please press any button\" + ANSI_RESET);\n Scanner s = new Scanner(System.in);\n String str = s.nextLine();\n System.out.println(\"Dice: \" + result);\n System.out.println();\n\n // Render legal your previous position\n board.legal[posX][posY] = 0; \n\n boolean capital = false, bank = false;\n Tuple res = new Tuple();\n Tuple player_pos = new Tuple(posX, posY);\n board.setShow(player_pos, board.board[posX][posY]);\n\n for (int i=0; i<result; i++) {\n int x1, x2, y1, y2, x3, y3, x4, y4;\n\n // right\n x1 = posX;\n y1 = posY + 1;\n // up \n x2 = posX - 1;\n y2 = posY;\n // left\n x3 = posX;\n y3 = posY - 1;\n // down\n x4 = posX + 1;\n y4 = posY;\n \n char c1 = board.board[x1][y1];\n char c2 = board.board[x2][y2];\n char c3 = board.board[x3][y3];\n char c4 = board.board[x4][y4];\n\n if (board.board[posX][posY] == 'S') {\n res.a = 6;\n res.b = 11; \n }\n else if ((c1 == 'B' || c1 == 'C' || c1 == 'H' || c1 == 'S' || c1 == 'E' || c1 == 'e') \n && (prevx != x1 || prevy != y1)) {\n res.a = x1;\n res.b = y1;\n }\n else if ((c2 == 'B' || c2 == 'C' || c2 == 'H' || c2 == 'S' || c2 == 'E' || c2 == 'e') \n && (prevx != x2 || prevy != y2)) {\n res.a = x2;\n res.b = y2;\n }\n else if ((c3 == 'B' || c3 == 'C' || c3 == 'H' || c3 == 'S' || c3 == 'E' || c3 == 'e') \n && (prevx != x3 || prevy != y3)) {\n res.a = x3;\n res.b = y3;\n }\n else if ((c4 == 'B' || c4 == 'C' || c4 == 'H' || c4 == 'S' || c4 == 'E' || c4 == 'e') \n && (prevx != x4 || prevy != y4)) {\n res.a = x4;\n res.b = y4;\n }\n\n prevx = posX;\n prevy = posY;\n // (res.a, res.b) is my next position\n posX = res.a;\n posY = res.b;\n\n // Check if player passes Bank ---> + 1000 MLS\n if (posX == board.B.a && posY == board.B.b) \n bank = true;\n \n // Check if player passes Capital ---> entrance ??\n if (posX == board.C.a && posY == board.C.b)\n capital = true;\n\n // if last round of dice result\n if (i == result - 1) {\n int legal = board.setLegal(prevx, prevy, posX, posY);\n if (legal == 0) {\n res.a = posX;\n res.b = posY;\n }\n // Someone else is on this position\n else if (legal == 1) {\n boolean ans = false;\n while (!ans) {\n // right\n x1 = posX;\n y1 = posY + 1;\n // up \n x2 = posX - 1;\n y2 = posY;\n // left\n x3 = posX;\n y3 = posY - 1;\n // down\n x4 = posX + 1;\n y4 = posY;\n \n c1 = board.board[x1][y1];\n c2 = board.board[x2][y2];\n c3 = board.board[x3][y3];\n c4 = board.board[x4][y4];\n \n if (board.board[posX][posY] == 'S') {\n res.a = 6;\n res.b = 11; \n }\n else if ((c1 == 'B' || c1 == 'C' || c1 == 'H' || c1 == 'S' || c1 == 'E' || c1 == 'e') \n && (prevx != x1 || prevy != y1)) {\n res.a = x1;\n res.b = y1;\n }\n else if ((c2 == 'B' || c2 == 'C' || c2 == 'H' || c2 == 'S' || c2 == 'E' || c2 == 'e') \n && (prevx != x2 || prevy != y2)) {\n res.a = x2;\n res.b = y2;\n }\n else if ((c3 == 'B' || c3 == 'C' || c3 == 'H' || c3 == 'S' || c3 == 'E' || c3 == 'e') \n && (prevx != x3 || prevy != y3)) {\n res.a = x3;\n res.b = y3;\n }\n else if ((c4 == 'B' || c4 == 'C' || c4 == 'H' || c4 == 'S' || c4 == 'E' || c4 == 'e') \n && (prevx != x4 || prevy != y4)) {\n res.a = x4;\n res.b = y4;\n }\n\n prevx = posX;\n prevy = posY;\n // (res.a, res.b) is my next position\n posX = res.a;\n posY = res.b;\n\n legal = board.setLegal(prevx, prevy, posX, posY);\n if (legal == 0) {\n ans = true;\n }\n \n // Check if player passes Bank ---> + 1000 MLS\n if (posX == board.B.a && posY == board.B.b) \n bank = true;\n \n // Check if player passes Capital ---> entrance ??\n if (posX == board.C.a && posY == board.C.b)\n capital = true; \n \n } // endwhile\n\n } // endelseif(legal==1)\n\n // Check if player passes Bank ---> + 1000 MLS\n if (posX == board.B.a && posY == board.B.b)\n bank = true;\n // Check if player passes Capital ---> entrance ??\n if (posX == board.C.a && posY == board.C.b)\n capital = true;\n\n } // endif(i==result-1)\n \n } // endfor\n\n /* ΔΙΝΩ ΠΡΟΤΕΡΑΙΟΤΗΤΑ ΠΡΩΤΑ ΣΤΟ ΝΑ ΠΑΙΡΝΩ ΧΡΗΜΑΤΑ ΑΠΟ ΤΗΝ ΤΡΑΠΕΖΑ\n * ΜΕΤΑ ΣΤΟ ΝΑ ΠΛΗΡΩΣΩ ΣΤΟΝ ΑΝΤΙΠΑΛΟ ΜΟΥ\n * ΜΕΤΑ ΣΤΟ ΝΑ ΜΠΟΡΩ ΝΑ ΑΓΟΡΑΣΩ ΕΙΣΟΔΟ Ή ΝΑ ΧΤΙΣΩ Ή ΝΑ ΑΓΟΡΑΣΩ ΞΕΝΟΔΟΧΕΙΟ\n */\n\n System.out.println(ANSI() + \"Player\" + id + \" is moving to position (\" + res.a + \", \" + res.b + \") \" + board.board[res.a][res.b] + \".\" + ANSI_RESET); \n System.out.println();\n if (!hotel_list.isEmpty()) {\n System.out.println(ANSI() + \"Player\" + id + \" hotels:\" + ANSI_RESET);\n for (HotelCard hc : hotel_list) {\n System.out.println(ANSI() + hc.getName() + ANSI_RESET);\n }\n }\n\n // Find player's position on the show board\n board.setShow(res, getMisc());\n\n // Player has passed from Bank, if (bank == true)\n if (bank)\n bank();\n\n // Check if player is on a rival's entrance \n pay(res, dice, board);\n // Check for bankrupt\n if (status == false) return null;\n\n /* Player has passed from Capital, if (capital == true)\n * Player moves to E --> wants to buy an entrance or upgrade??\n */ \n if ((capital || board.board[res.a][res.b] == 'E' || board.board[res.a][res.b] == 'e') \n && !hotel_list.isEmpty()) {\n String cap = null, build = \"no\";\n if (capital) cap = wantsEntrance(\"capital\");\n else if (board.board[res.a][res.b] == 'E' || board.board[res.a][res.b] == 'e') {\n cap = wantsEntrance(\"E\");\n if (cap.equals(\"no\")) {\n System.out.println(ANSI() + \"Want to build or upgrade a hotel?\" + ANSI_RESET);\n build = wantsBuild();\n }\n }\n // wantsEntrance() result\n if (cap.equals(\"yes\")) {\n System.out.println(ANSI() + \"Player\" + id + \" MLS is: \" + mls + \".\" + ANSI_RESET);\n HotelCard cap_hotel = searchHotel();\n System.out.println(ANSI() + \"Give the (line, column) of entrance position\"+ ANSI_RESET);\n int line = -1, column = -1;\n boolean answer = false;\n System.out.println(ANSI() + \"Give line\" + ANSI_RESET);\n while (answer == false) {\n s = new Scanner(System.in);\n str = s.nextLine();\n try {\n line = Integer.parseInt(str);\n answer = true; \n } catch (Exception e) {\n System.out.println(ANSI() + \"Give integer line\" + ANSI_RESET);\n } \n }\n System.out.println(ANSI() + \"Give column\" + ANSI_RESET);\n answer = false;\n while (answer == false) {\n s = new Scanner(System.in);\n str = s.nextLine();\n try {\n column = Integer.parseInt(str);\n answer = true; \n } catch (Exception e) {\n System.out.println(ANSI() + \"Give integer column\" + ANSI_RESET);\n } \n } \n Tuple pos = new Tuple(line, column);\n buyEntrance(cap_hotel, pos, board);\n }\n // wantsBuild() result\n else if (build.equals(\"yes\")) {\n System.out.println(ANSI() + \"Player\" + id + \" MLS is: \" + mls + ANSI_RESET);\n HotelCard cap_hotel = searchHotel();\n build(cap_hotel, bdice);\n }\n }\n \n // Player is on \"H\" --> Wants to buy??\n else if (board.board[res.a][res.b] == 'H') {\n String buy;\n System.out.println(ANSI() + \"Player\" + id + \" MLS is: \" + mls + ANSI_RESET);\n System.out.println(ANSI() + \"Want to buy a hotel?\" + ANSI_RESET);\n buy = wantsBuy();\n if (buy.equals(\"yes\")) { \n HotelCard buy_hotel = searchAdjacentHotels(board, res); \n buyHotel(buy_hotel);\n }\n }\n\n // After all, player's movement reach to an end...\n return res; \n }", "private void roll2(DiceModel player1, DiceModel player2) {\n\t\t\n\t\tint random;\t\n\t\t\n\t\t// enables the dice to be kept\n\t\tenableDice();\n\t\t\n\t\t// reset text if player previously failed to select a die\n\t\tif (roundChanger == 2) {\n\t\t\ttextAreaInstructions.setText(rollToBeat);\n\t\t} else {\n \ttextAreaInstructions.setText(\"Start by clicking\" + \"\\n\" + \"Roll Dice button!\");\n \t}\n\t\t\n\t\t// display round number\n\t\ttextFieldRound.setText(Integer.toString(round));\n\t\t\n\t\t// if we are on the first roller, count up rolls till they end turn\n\t\tif (roundChanger == 1) {\n\t\t\trollsTaken = rollsTaken + 1;\n\t\t}\n\t\t\n\t\t// turn should increment for both rollers\n\t\tturn = turn + 1;\n\t\t\n\t\t// if all three die are selected then end turn\n\t\tif (togglebtnD1.isSelected() == true && togglebtnD2.isSelected() == true &&\n\t\t\t\ttogglebtnD3.isSelected() == true) {\n\t\t\tendTurn();\n\t\t}\n\t\t\n\t\t// determines who has the current roll\n\t\tString currentPlayer = textFieldCurrentPlayer.getText();\n\t\tString stringPlayer1 = \"Player1\";\n\t\t\n\t\t// enforces player requirement of having at least 1 die selected per roll\n\t\tif (turn != 1 && togglebtnD1.isSelected() == false && togglebtnD2.isSelected() == false &&\n \ttogglebtnD3.isSelected() == false) {\n \t\tif (roundChanger == 1) {\n \t\tturn = turn - 1;\n \t\trollsTaken = rollsTaken - 1;\n \t\ttextAreaInstructions.setText(\"Please select at least 1 die to continue.\");\n \t\t} else if (roundChanger == 2 && turn == 0){\n \t\t\ttextAreaInstructions.setText(rollToBeat);\n \t\t}else {\n \t\tturn = turn - 1;\n \t\ttextAreaInstructions.setText(\"Please select at least 1 die to continue.\");\n \t\t}\n \t} else {\n\t\t\t// only get new values for dice that haven't been kept\t\t\n\t\t\tif (togglebtnD1.isSelected() == false) {\n\t\t\t\trandom = generateRandom();\n\t\t\t\t displayDie(random, togglebtnD1);\n\t\t\t\tif (currentPlayer.equals(stringPlayer1)) {\n\t\t\t\t\tplayer1.setDie1(random);\n\t\t\t\t} else {\n\t\t\t\t\tplayer2.setDie1(random);\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t}\n\t\t\tif (togglebtnD2.isSelected() == false) {\n\t\t\t\trandom = generateRandom();\n\t\t\t\tdisplayDie(random, togglebtnD2);\n\t\t\t\tif (currentPlayer.equals(stringPlayer1)) {\n\t\t\t\t\tplayer1.setDie2(random);\n\t\t\t\t} else {\n\t\t\t\t\tplayer2.setDie2(random);\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t}\n\t\t\tif (togglebtnD3.isSelected() == false) {\n\t\t\t\trandom = generateRandom();\n\t\t\t\tdisplayDie(random, togglebtnD3);\n\t\t\t\tif (currentPlayer.equals(stringPlayer1)) {\n\t\t\t\t\tplayer1.setDie3(random);\n\t\t\t\t} else {\n\t\t\t\t\tplayer2.setDie3(random);\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t}\n\n\t\t\t// limit second rollers turns to as many turns as first roller had\n\t\t\tif (turn == rollsTaken && roundChanger == 2) {\n\t\t\t\tendTurn();\n\t\t\t}\n\n\t\t\tif (turn == 3) { \n\t\t\t\tendTurn();\n\t\t\t}\n\t\t}\t\n\t\n\t}", "RollingResult roll(Player player);", "public void rollDices(Dice dice1, Dice dice2) {\n\n while (true) {\n // click to roll\n dice1.rollDice();\n dice2.rollDice();\n setSum(dice1, dice2);\n\n // if(roll == pN)\n // player and npcs that bet 1 win\n if (sum == pN) {\n player.playerWin();\n System.out.println(\"You rolled \" + sum + WINMESSAGE +\n \"\\nYou have a total of \" + player.getWins() + \" wins and \"\n + player.getLoses() + \" loses.\");\n break;\n }\n // if(roll == out7)\n else if (sum == OUT7) {\n player.playerLose();\n System.out.println(\"You hit the out 7.\" + LMESSAGE + \"\\nYou have a total of \" + player.getWins()\n + \" wins and \" + player.getLoses() + \" loses.\");\n\n break;\n } else {\n System.out.println(\"\\nYour total roll is \" + sum + \"\\nYou need to hit \" + pN +\n \" to win.\" + \"\\n\\nContinue rolling\\n\");\n }\n\n\n }\n\n }", "public void playRollingADie() {\n\t\tSystem.out.print(\"The pirates ask you to play 'Rolling a Die'. You have to predict what is the outcome. \" + \"\\n\" + \"You can choose between: \");\n\t\tArrayList<String> gameElements2 = new ArrayList<String>(3);\n\t\tgameElements2.add(\"Even\");\n\t\tgameElements2.add(\"Odd\");\n\t\tboolean state = false;\n\t\twhile (state == false) {\n\t\t\tSystem.out.println(\"(1) Even\");\n\t\t\tSystem.out.println(\"(2) Odd\");\n\t\t\ttry { \n\t\t\t\tint selectedAction = scanner.nextInt();\n\t\t\t\tif (selectedAction <= 2 && selectedAction > 0) {\n\t\t\t\tint decision = game.determineWinnningRollingADie();\n\t\t\t\tint piratesThrows = game.getWhatPiratesThrowRD(decision, gameElements2.get(selectedAction-1));\n\t\t\t\tSystem.out.println(\"The die is showing \" + piratesThrows);\n\t\t\t\tif (decision == 0) {\n\t\t\t\t\tstate = true;\n\t\t\t\t\tint piratesDemand = game.getPiratesDemand();\n\t\t\t\t\tSystem.out.println(\"You lose! Pirates demands: \" + piratesDemand + \" coins\");\n\t\t\t\t\tif (game.checkPirateSatisfaction()) {\n\t\t\t\t\t\tgame.removeAllGoods();\n\t\t\t\t\t\tgame.backToMain();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tgame.removeAllGoods();\n\t\t\t\t\t\tint money = game.getMoney();\n\t\t\t\t\t\tgame.updateMoney(money * -1);\n\t\t\t\t\t\tgame.gameOver(\"You lose play rock paper scissor game! \\nthe pirate took all of your money and your items in your ship!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstate = true;\n\t\t\t\t\tSystem.out.println(\"You Win!! You can Continue your journey to your destination!\");\n\t\t\t\t\tgame.backToMain();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Please choose from actions above\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(INPUT_REQUIREMENTS);\n\t\t\t\tscanner.nextLine();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "@Override\n\tpublic void happen(int rollResult) {\n\t\tint i = 0;\n\t\tBoolean greaterThan2 = true;\n\t\twhile (i < 4){\n\t\t\tif (rollResult < 2 ){\n\t\t\t\tgreaterThan2 = false;\n\t\t\t\tswitch (i){\n\t\t\t\t\tcase 0: Game.getInstance().getCurrentCharacter().decrementKnowledge(); break;\n\t\t\t\t\tcase 1: Game.getInstance().getCurrentCharacter().decrementMight(); break;\n\t\t\t\t\tcase 2: Game.getInstance().getCurrentCharacter().decrementSanity(); break; \n\t\t\t\t\tcase 3: Game.getInstance().getCurrentCharacter().decrementSpeed(); break;\n\t\t\t\t}\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\t\n\t\tif(greaterThan2){\n\t\t\tGame.getInstance().getCurrentCharacter().incrementKnowledge(); // TODO: Change this to allow player to choose trait\n\t\t}\n\t}", "public int rollDice(){\r\n\t\tString playerResponse;\r\n\t\tplayerResponse=JOptionPane.showInputDialog(name+\". \"+\"Type anything to roll\");\r\n\t\t//System.out.println(name+\"'s response: \"+playerResponse);\r\n\t\tdice1=(int)(Math.random() * ((6 - 1) + 1)) + 1;\r\n\t\tdice2=(int)(Math.random() * ((6 - 1) + 1)) + 1;\r\n\t\tdicetotal=dice1+dice2;\r\n\t\tnumTurns++;\r\n\t\treturn dicetotal;\r\n\t}", "private void nextTurnRoll() {\n Log.d(\"nextTurnRoll\", \"next player please roll\");\n m_currentTurn++;\n if(m_currentTurn >= m_numPlayers){\n m_currentTurn = 0;\n }\n convertTextToSpeech(players.get(m_currentTurn).getName() + \"please roll the dice\");\n }", "private void firstRoll(int playerName) {\n\t\t// we randomly get six integers, from one to six, and we do it N_DICE\n\t\t// times and every time we write our random integer in the array.\n\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\tint dice = rgen.nextInt(1, 6);\n\t\t\tdiceResults[i] = dice;\n\t\t}\n\t\t// program will tell witch players turn it is.\n\t\tdisplay.printMessage(playerNames[playerName - 1]\n\t\t\t\t+ \"'s turn! Click the \" + '\\\"' + \"Roll Dice\" + '\\\"'\n\t\t\t\t+ \" button to roll the dice.\");\n\t\t// program will wait until player clicks \"roll dice\" button.\n\t\tdisplay.waitForPlayerToClickRoll(playerName);\n\t\t// program will display dice, that depends on our randomly taken\n\t\t// integers.\n\t\tdisplay.displayDice(diceResults);\n\t}", "private void normalRoll(int face, int pos, Player currentPlayer){\n\n convertTextToSpeech(\"Position before dice roll\" + pos +\n m_board.getSquare(pos).getName());\n\n int newPos = pos + face;\n if (newPos >= 40) {\n convertTextToSpeech(\"You passed go and collected 200\");\n if(m_manageFunds){\n currentPlayer.addMoney(200);\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n }\n newPos = newPos - 40;\n }\n\n currentPlayer.setCurrentPosition(newPos);\n\n //updatedPosition = (TextView) findViewById(R.id.updatedPosition);\n updatedPosition.setText(\"Updated Position:\" + newPos + \", \" +\n m_board.getSquare(newPos).getName());\n convertTextToSpeech(\"You rolled a\" + face);\n convertTextToSpeech(\"Position after dice roll\" + newPos +\n m_board.getSquare(newPos).getName());\n\n locationType = (TextView) findViewById(R.id.locationType);\n\n Square location = m_board.getSquare(newPos);\n String locName = location.getName();\n\n if (location instanceof PropertySquare) {\n locationType.setText(\"Landed on property\");\n buyProperty(currentPlayer, location);\n } else if (location instanceof CardSquare) {\n locationType.setText(\"Take a Card\");\n convertTextToSpeech(\"Take a card\");\n if(locName.equals(\"Chance\")){\n chance(currentPlayer);\n } else {\n communityChest(currentPlayer);\n }\n nextTurnRoll();\n } else if (location instanceof SpecialSquare) {\n locationType.setText(\"Landed on special square\");\n specialSquare(locName, currentPlayer);\n }\n }", "public void rollDie(){\r\n\t\tthis.score = score + die.roll();\r\n\t}", "public void roll()\r\n\t{\r\n\t\tRandom rand = new Random();\r\n\r\n\t\trollNumber = rand.nextInt(numOfSides) + 1;\r\n\t}", "public void comeOutRoll(Dice dice1, Dice dice2) {\n\n setExit(false);\n System.out.println(\"***This is the come out roll***\" +\n \"\\nIf you roll 7 or 11 you win.\\nBut if you roll 2,3 or 12\" +\n \" you lose.\");\n dice1.rollDice();\n dice2.rollDice();\n setSum(dice1, dice2);\n\n // if (winCon.contains(roll)) player wins, npcs that bet 1 wins\n\n if (sum == OUT7 || sum == 11) {\n player.playerWin();\n System.out.println(\"Your total is \" + sum + WINMESSAGE +\n \"\\nYou have a total of \" + player.getWins() + \" wins and \"\n + player.getLoses() + \" loses.\");\n setExit(true);\n\n }\n // if (failCon.contains(roll)) player loses, npcs with bet 2 wins\n else if (sum == 2 || sum == 3 || sum == 12) {\n player.playerLose();\n System.out.println(\"Your total is \" + sum + LMESSAGE + \"\\nYou have a total of \" + player.getWins() + \" wins and \"\n + player.getLoses() + \" loses.\");\n\n setExit(true);\n\n }\n // else set pN // cannot be winCon or failCon\n else {\n System.out.println(\"\\nYour total is \" + sum + \" this is your point number, hit this to win\");\n setPN(sum);\n }\n }", "public int roll(int roll) {\n \t\tappendAction(R.string.player_roll, Integer.toString(roll));\n \t\tboard.roll(roll);\n \n \t\treturn roll;\n \t}", "public int roll() \r\n {\r\n \r\n die1FaceValue = die1.roll();\r\n die2FaceValue = die2.roll();\r\n \r\n diceTotal = die1FaceValue + die2FaceValue;\r\n \r\n return diceTotal;\r\n }", "@Override\n public void onRoll(Die die, RollData rolls, Exception exception) {\n super.onRoll(die, rolls, exception);\n\n Log.d(TAG, \"Roll: \" + rolls.face);\n\n final int face = rolls.face;\n\n Player currentPlayer = players.get(m_currentTurn);\n int pos = currentPlayer.getCurrentPosition();\n\n if(pos+face <= 8){\n String number = String.valueOf(pos+face);\n moveMotor(number);\n }\n\n player = (TextView) findViewById(R.id.player);\n if(m_manageFunds) {\n funds = (TextView) findViewById(R.id.funds);\n }\n currentPosition = (TextView) findViewById(R.id.currentPosition);\n rollResult = (TextView) findViewById(R.id.rollResult);\n updatedPosition = (TextView) findViewById(R.id.updatedPosition);\n locationType = (TextView) findViewById(R.id.locationType);\n recognizedSpeech = (TextView) findViewById(R.id.recognizedSpeech);\n\n GamePlay.this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n String method = \"onRoll\";\n\n Player currentPlayer = players.get(m_currentTurn);\n int pos = currentPlayer.getCurrentPosition();\n player.setText(currentPlayer.getName());\n\n Log.d(method, \"*****IT IS \" + currentPlayer.getName().toUpperCase()\n + \"'S TURN*****\");\n Log.d(method, \"Current Position:\" + pos + \", \" +\n m_board.getSquare(pos).getName());\n\n if(m_manageFunds) {\n Log.d(method, \"Current Funds: \" + String.valueOf(currentPlayer.getMoney()));\n funds.setText(String.valueOf(currentPlayer.getMoney()));\n }\n\n currentPosition.setText(\"Position before dice roll \" + pos + \", \" +\n m_board.getSquare(pos).getName());\n\n rollResult.setText(\"\" + face);\n\n updatedPosition.setText(\"Updated Position:\");\n\n locationType.setText(\"\");\n\n recognizedSpeech.setText(\"\");\n\n if (currentPlayer.getJail()) {\n jailRoll(face, currentPlayer);\n } else {\n normalRoll(face, pos, currentPlayer);\n }\n }\n });\n }", "public void Roll() // Roll() method\n {\n // Roll the dice by setting each of the dice to be\n // \ta random number between 1 and 6.\n die1Rand = (int)(Math.random()*6) + 1;\n die2Rand = (int)(Math.random()*6) + 1;\n }", "private void playOneTurnWithPlayer(Player player, RolledDice rolledDice) throws NotEnoughMoneyException {\n int position = player.increasePosition(rolledDice.getValue() - 1, fields.size());\n Field field = fields.get(position);\n field.playerStepped(player);\n //System.out.println(player);\n }", "public int roll()\r\n\t{\r\n\t return die1.roll() + die2.roll();\r\n \t}", "public int takeTurn(Dice theDice){\n \n this.turnCounter++;\n \n return(theDice.rollDice());\n \n }", "public String play() \r\n { \r\n \r\n theDiceTotal = dice.roll();\r\n \r\n while ( theDiceTotal != 12 )\r\n { \r\n theDiceTotal = dice.roll();\r\n System.out.println( dice.getDie1FaceValue() + \" \" + dice.getDie2FaceValue() );\r\n count++;\r\n }\r\n \r\n return ( count - 1 ) + \" dice rolled.\"; \r\n }", "public static void main(String[] args)\n {\n Die dice_1 = new Die();\n Die dice_2 = new Die();\n Scanner in = new Scanner(System.in);\n\n while (true)\n {\n System.out.println(\"Time for some Craps!\");\n\n System.out.println(\"Hit [Enter] to roll both dice:\");\n in.nextLine();\n\n int roll_1 = dice_1.roll();\n int roll_2 = dice_2.roll();\n int totalroll = roll_1 + roll_2;\n System.out.println(\"You rolled a \" + roll_1 + \" and a \" + roll_2);\n System.out.println(\"Which combine for a total roll of \" + totalroll);\n\n // time to set up if statements to determine whether the player has won, lost, or still plays.\n\n if (totalroll == 7 || totalroll == 11)\n {\n System.out.println(\"Congrats! You won! :D \");\n }\n\n else if (totalroll == 2 || totalroll == 3 || totalroll == 12)\n {\n System.out.println(\"Sorry! You lost! :( \");\n } \n\n else\n {\n // we now need a point for the player to attempt to roll for\n int point = totalroll;\n\n // boolean needed here to keep the game continuous after the first roll\n boolean keepplaying = true;\n\n while(keepplaying) \n {\n // same code from above needed for the game to continue\n System.out.println(\"Hit [Enter] to roll both dice:\");\n in.nextLine();\n\n roll_1 = dice_1.roll();\n roll_2 = dice_2.roll();\n totalroll = roll_1 + roll_2;\n System.out.println(\"You rolled a \" + roll_1 + \" and a \" + roll_2);\n System.out.println(\"Which combine for a total roll of \" + totalroll);\n\n // now we check to see if they rolled the point\n if (totalroll == point)\n {\n System.out.println(\"You matched the point. You win! :D\");\n keepplaying = false;\n }\n\n else if (totalroll == 7)\n {\n System.out.println(\"You rolled a 7. You lost! :(\");\n keepplaying = false;\n } \n }\n } \n System.out.println(\"Play again?\");\n String playAgain = in.nextLine();\n if (playAgain.equals(\"\"))\n {\n }\n if (playAgain.substring(0,1).equals(\"n\"))\n {\n break;\n } \n }\n System.out.println(\"Thanks for playing Craps!\");\n }", "public int roll(int dices){\n int faces[] = new int[dices];\n int total = 0;\n Dice dice = new Dice();\n for(int i = 0; i < dices; i++){\n faces[i] = (dice.rand.nextInt(6) + 1);\n }\n for(int i = 0; i < faces.length-1; i++){\n if(faces[i] != faces[i+1]){\n this.isDouble = false;\n break;\n }\n else{\n this.isDouble = true;\n }\n }\n if(this.isDouble == true){\n this.twiceCounter++;\n }\n for(int i = 1; i < faces.length+1; i++){\n System.out.print(\"The \" + i + \". dice: \" + faces[i-1] + \" \");\n total += faces[i-1];\n }\n System.out.println(\" and the sum is \" + total);\n\n return total;\n }", "public void rollAllDices() {\n for(int i = 0; i < dicesList.size(); i++) {\n dicesList.get(i).roll();\n }\n }", "public int setRollResult(int diceAmount, int diceSides) {\n\t\tint result = 0;\n\t\tfor (int i = 0; i < diceAmount; i++) {\n\t\t\tresult += diceBag.rollDice(diceSides);\n\t\t}\n\t\treturn result;\n\t}", "void rollDice();", "public void roll(boolean [] which){\n for(int i = 0; i < HAND_SIZE; ++i){\n if(which[i]){\n dice[i].roll();\n }\n }\n }", "public void rollCup()\n {\n die1.rolldice();\n die2.rolldice();\n gui.setDice(die1.getFacevalue(), die2.getFacevalue());\n }", "public void roll() {\n\t\tthis.currentValue = ThreadLocalRandom.current().nextInt(1, this.numSides + 1);\n\t}", "public int rollDice() {\n\t\td1 = r.nextInt(6) + 1;\n\t\td2 = r.nextInt(6) + 1;\n\t\trepaint();\n\t\treturn d1 + d2;\n\t}", "private void wrap() {\n System.out.println(\"That's a wrap!\");\n Board.finishScene();\n List<Role> onCardRoles = scene.getRoles();\n for (int i = 0; i < onCardRoles.size(); i++) {\n if (onCardRoles.get(i).hasPlayer()) {\n int[] diceRolls = new int[scene.getBudget()];\n //roll the dice\n for (int j = 0; j < scene.getBudget(); j++) {\n diceRolls[j] = random.nextInt(6) + 1;\n }\n //sort the dice\n Arrays.sort(diceRolls);\n //set up the payouts and distribute them among the players\n int[] payouts = new int[onCardRoles.size()];\n\n for (int j = scene.getBudget() - 1; j >= 0; j--) {\n payouts[((scene.getBudget() - j) % onCardRoles.size()) - 1] = diceRolls[j];\n }\n\n for (int j = 0; j < onCardRoles.size(); j++) {\n if (onCardRoles.get(j).hasPlayer()) {\n Player player = onCardRoles.get(j).getPlayer();\n player.clearPracticeChips();\n Deadwood.bank.payMoney(player, payouts[j]);\n System.out.println(player.getName() + \" got $\" + payouts[j]);\n }\n }\n\n for (int j = 0; j < roles.size(); j++) {\n if (roles.get(j).hasPlayer()) {\n Player player = roles.get(j).getPlayer();\n player.clearPracticeChips();\n Deadwood.bank.payMoney(player, roles.get(j).getRequiredRank());\n System.out.println(player.getName() + \" got $\" + roles.get(j).getRequiredRank());\n }\n }\n }\n break;\n }\n for (int i = 0; i < onCardRoles.size(); i++) {\n if (onCardRoles.get(i).hasPlayer()) {\n onCardRoles.get(i).getPlayer().setRole(null);\n onCardRoles.get(i).setPlayer(null);\n }\n }\n for (int i = 0; i < roles.size(); i++) {\n if (roles.get(i).hasPlayer()) {\n roles.get(i).getPlayer().setRole(null);\n roles.get(i).setPlayer(null);\n }\n }\n }", "public void buttonRoll() {\n\t\troll2(player1, player2);\n\t\t}", "public void reRoll() {\n this.result = this.roll();\n this.isSix = this.result == 6;\n }", "public void rollStats() {\n\t\tRandom roll = new Random();\n\t\tint rolled;\n\t\tint sign;\n\t\t\n\t\t\n\t\trolled = roll.nextInt(4);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetMaxHealth(getMaxHealth() + rolled*(getDifficulty()+5/5));\n\t\t\tsetHealth(getMaxHealth());\n\t\t} else {\n\t\t\tsetMaxHealth(getMaxHealth() - rolled*(getDifficulty()+5/5));\n\t\t\tsetHealth(getMaxHealth());\n\t\t}\n\t\t\n\t\trolled = roll.nextInt(2);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetAttack(getAttack() + rolled*(getDifficulty()+5/5));\n\t\t} else {\n\t\t\tsetAttack(getAttack() - rolled*(getDifficulty()+5/5));\n\t\t}\n\t\t\n\t\trolled = roll.nextInt(2);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetDefense(getDefense() + rolled*(getDifficulty()+5/5));\n\t\t} else {\n\t\t\tsetDefense(getDefense() - rolled*(getDifficulty()+5/5));\n\t\t}\n\t\t\n\t\trolled = roll.nextInt(2);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetSpeed(getSpeed() + rolled*(getDifficulty()+5/5));\n\t\t} else {\n\t\t\tsetSpeed(getSpeed() - rolled*(getDifficulty()+5/5));\n\t\t}\n\t\t\n\t}", "public void animateDice() {\n pos += vel*tickCounter + ACC*tickCounter*tickCounter/2;\n if(pos<(TILE_SIZE*15-DICE_SIZE)/2){\n if(this.pIndex%3==0)\n diceImg = diceAnimation[tickCounter%diceAnimation.length];\n else\n diceImg = diceAnimation[diceAnimation.length-1-(tickCounter%diceAnimation.length)];\n tickCounter++;\n vel += ACC;}\n else{\n diceImg = dice[result-1];\n pos=(TILE_SIZE*15-DICE_SIZE)/2;}\n setCoordinates(pos);\n //System.out.println(\"dice pos \"+pos);\n }", "public void haveGo(int roundsTaken)\n {\n int diceRolls = 0;\n boolean madeChoice = false;\n\n while(diceRolls <= 1){\n ArrayList<Integer> diceRoll = new ArrayList<Integer>();\n boolean firstMove = false;\n boolean secondMove = true;\n\n if(diceRolls == 0){\n //Roll dice cleanly and print related information\n System.out.println(\"\\n\\t--------------------------\\n\\t\" + this.name + \"'s Go!\\n\\t--------------------------\\n\\nRoll One...\");\n diceRoll = dice.cleanRoll();\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n\n }\n else if(diceRolls == 1)\n {\n //Roll dice based on previous preferences\n System.out.println(\"\\nRoll Two...\");\n diceRoll = dice.roll();\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n secondMove = false;\n firstMove = true;\n }\n //Make first action\n while(!firstMove)\n {\n boolean repeat = false;\n //Print Menu\n System.out.println(\"Available Actions:\");\n System.out.println(\"\\t--------------------------\");\n System.out.println(\"\\t0) Exit to Desktop\\n\\t1) Fill a Row\\n\\t2) Possible Scores\\n\\t3) Check Scorecard\\n\\t4) Clean Roll\");\n System.out.println(\"\\t--------------------------\\n\");\n System.out.println(\"Enter Choice...\");\n int choice = GameManager.makeValidChoice(-1,5);\n if(choice == 0)\n {\n //Update and send GameFinisher variables to save\n scorecard.update();\n scorer.update();\n gameFinisher.exitSequence(filename,name, diceRoll, saveString,roundsTaken, 1);\n }\n else if(choice == 3)\n {\n //Print Scorecard\n System.out.println(\"\\n*********************************************\\n\" + name + \"'s Scorecard\\n********************************************\");\n scorecard.printScorecard();\n repeat = true;\n }\n\n else if(choice == 4)\n {\n //Cleanly Roll Dice\n diceRolls++;\n firstMove = true;\n }\n else if(choice == 2)\n {\n //Print Possibilities\n scorer.printPossibilities(diceRoll, scorecard.getFreeCategories());\n repeat =true;\n }\n else if(choice == 1)\n {\n //Fill a Row\n boolean categoryUsed = true;\n while(categoryUsed)\n {\n System.out.println(\"\\nRow to Fill...\");\n int category = GameManager.makeValidChoice(-1,14);\n scorer.findPossibilities(diceRoll, scorecard.getFreeCategories());\n //Check category isnt already filled\n try{\n if(scorecard.getFreeCategories().contains(category)){\n int score = scorer.getScore(category);\n //Set row to be filled and add score\n scorecard.addCategory(category,score);\n madeChoice = true;\n categoryUsed = false;\n }\n else\n {\n System.out.println(\"Row is already filled. Please choose another...\");\n }\n } catch(NullPointerException e) \n {\n System.out.println(\"Program Crash: Free categories doesnt exist.\");\n }\n\n }\n diceRolls = 2;\n firstMove = true;\n secondMove = true;\n madeChoice = true;\n }\n else\n {\n System.out.println(\"Something's gone very wrong, you shouldn't be here...\");\n repeat = true;\n }\n if(repeat){\n if(diceRolls == 0){\n System.out.println(\"Roll One...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n else if(diceRolls == 1)\n {\n System.out.println(\"Roll Two...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n }\n }\n\n while(!secondMove)\n {\n boolean repeat = false;\n //Print Menu \n System.out.println(\"Available Actions:\");\n System.out.println(\"\\t--------------\");\n System.out.println(\"\\t0) Exit to Desktop\\n\\t1) Fill a Row\\n\\t2) Possible Scores\\n\\t3) Check Scorecard\\n\\t4) Clean Roll\\n\\t5) Hold and Roll Dice\");\n System.out.println(\"\\t--------------\\n\");\n System.out.println(\"Enter Choice...\");\n\n int choice = GameManager.makeValidChoice(-1,6);\n\n if(choice == 0)\n {\n //Update and send GameFinisher variables to save\n gameFinisher.exitSequence(filename, name, diceRoll, saveString,roundsTaken, 2);\n }\n else if(choice == 3)\n {\n //Print Scorecard\n System.out.println(\"\\n********************************************\\n\" + name + \"'s Scorecard\\n********************************************\");\n scorecard.printScorecard();\n repeat = true;\n }\n else if(choice == 5)\n {\n //Get Holdings preferences from Player\n System.out.println(\"\\n\\t--------------------------\");\n System.out.println(\"\\tDice Holder\\n\\t-----\\n\\t[0) Leave [1) Hold\");\n System.out.println(\"\\t--------------------------\\n\");\n System.out.println(diceRoll);\n System.out.println(\"---------------\");\n System.out.print(\"[\" + diceRoll.get(0) + \"]\");\n boolean one = toHold();\n System.out.print(\"[\" + diceRoll.get(1) + \"]\");\n boolean two = toHold();\n System.out.print(\"[\" + diceRoll.get(2) + \"]\");\n boolean three = toHold();\n System.out.print(\"[\" + diceRoll.get(3) + \"]\");\n boolean four = toHold();\n System.out.print(\"[\" + diceRoll.get(4) + \"]\");\n boolean five = toHold();\n //Send Preferences to Dice()\n ArrayList<Boolean> newState = new ArrayList<Boolean>();\n newState.add(one);\n newState.add(two);\n newState.add(three);\n newState.add(four);\n newState.add(five);\n dice.setDiceHoldState(newState);\n System.out.println(\"\\n\\t--------------------------\\n\\tDice Held\\n\\t-----\\n\\tRolling Dice...\\n\\t--------------------------\");\n diceRolls++;\n secondMove = true;\n }\n else if(choice == 4)\n {\n //Cleanly Roll Dice\n diceRolls++;\n secondMove = true;\n madeChoice = false;\n }\n else if(choice == 2)\n {\n //Print Possibilities\n scorer.printPossibilities(diceRoll, scorecard.getFreeCategories());\n repeat =true;\n }\n else if(choice == 1)\n {\n //Fill a Row\n boolean categoryUsed = true;\n while(categoryUsed)\n {\n System.out.println(\"What row would you like to fill?\");\n int category = GameManager.makeValidChoice(-1,14);\n //Check category isnt already filled\n try{\n if(scorecard.getFreeCategories().contains(category)){\n int score = scorer.getScore(category);\n //Set row to be filled and add score\n scorecard.addCategory(category,score);\n madeChoice = true;\n categoryUsed = false;\n }\n else\n {\n System.out.println(\"Row is already filled. Please choose another...\");\n }\n } catch(NullPointerException e) {\n System.out.println(\"Program Crash: Free categories doesnt exist.\");\n }\n }\n diceRolls = 2;\n repeat = false;\n secondMove = true;\n madeChoice = true;\n }\n else\n {\n System.out.println(\"Something's gone very wrong, you shouldn't be here...\");\n repeat = true;\n }\n\n if(repeat){\n if(diceRolls == 0){\n System.out.println(\"Roll One...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n else if(diceRolls == 1)\n {\n System.out.println(\"Roll Two...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n\n }\n }\n }\n ArrayList<Integer> diceRoll = dice.roll(); \n while(!madeChoice)\n {\n System.out.println(\"\\nFinal Roll...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n //Print Menu\n System.out.println(\"Available Actions:\");\n System.out.println(\"\\t--------------------------\");\n System.out.println(\"\\t0) Exit to Desktop\\n\\t1) Fill a Row\\n\\t2) Possible Scores\\n\\t3) Check Scorecard\");\n System.out.println(\"\\t--------------------------\");\n System.out.println(\"Enter Choice...\");\n int choice = GameManager.makeValidChoice(-1,4);\n if(choice == 0)\n {\n //Update and send GameFinisher variables to save\n gameFinisher.exitSequence(filename, name, diceRoll, saveString, roundsTaken, 3);\n }\n else if(choice == 3)\n {\n //Print Scorecard\n System.out.println(\"\\n********************************************\\n\" + name + \"'s Scorecard\\n********************************************\");\n scorecard.printScorecard();\n }\n\n else if(choice == 2)\n {\n //Print Possibilities\n scorer.printPossibilities(diceRoll, scorecard.getFreeCategories());\n }\n else if(choice == 1)\n {\n //Fill a Row\n boolean categoryUsed = true;\n while(categoryUsed)\n {\n System.out.println(\"What row would you like to fill?\");\n int category = GameManager.makeValidChoice(-1,14);\n //Check category isnt already filled\n try{\n if(scorecard.getFreeCategories().contains(category)){\n int score = scorer.getScore(category);\n //Set row to be filled and add score\n scorecard.addCategory(category,score);\n madeChoice = true;\n categoryUsed = false;\n }\n else\n {\n System.out.println(\"Row is already filled. Please choose another...\");\n }\n } catch(NullPointerException e) {\n System.out.println(\"Program Crash: Free categories doesnt exist.\");\n }\n }\n }\n }\n }", "public void move() {\n\t\tif (isLuck) {\n\t\t\tif (rand.nextBoolean()) {\n\t\t\t\txPos++;\n\t\t\t}\n\t\t} else {\n\t\t\tif (rightCount < skill) {\n\t\t\t\trightCount++;\n\t\t\t\txPos++;\n\t\t\t}\n\t\t}\n\t}", "public void rollDice(int pIndex) {\n this.pIndex = pIndex;\n this.result = this.roll();\n this.isSix = this.result == 6;\n resetCoordinates();\n this.tickCounter=0;\n this.vel=1;\n this.diceRollCount++;\n }", "private void endTurn() {\n\t\t\n\t\tif (roundChanger == 1) {\n\t\t\tString currentPlayer = textFieldCurrentPlayer.getText();\n\t\t\tif (currentPlayer.equals(\"Player1\")) {\n\t\t\t\ttextAreaInstructions.setText(\"The current roll to beat is \" + player1.getDie1()\n\t\t\t\t+ \" \" + player1.getDie2() + \" \" + player1.getDie3());\n\t\t\t\trollToBeat = \"The current roll to beat is \" + player1.getDie1()\n\t\t\t\t+ \" \" + player1.getDie2() + \" \" + player1.getDie3();\n\t\t\t} else {\n\t\t\t\ttextAreaInstructions.setText(\"The current roll to beat is \" + player2.getDie1()\n\t\t\t\t+ \" \" + player2.getDie2() + \" \" + player2.getDie3());\n\t\t\t\trollToBeat = \"The current roll to beat is \" + player2.getDie1()\n\t\t\t\t+ \" \" + player2.getDie2() + \" \" + player2.getDie3();\n\t\t\t} \n\t\t\tchangeCurrentPlayerText();\n\t\t\tturn = 0;\n\t\t\troundChanger = 2;\n\t\t} else {\n\t\t\tString winningPlayer = calculateScore(player1, player2);\n\t\t\ttextFieldCurrentPlayer.setText(winningPlayer);\n\t\t\troundChanger = 1;\n\t\t\trollsTaken = 0;\n\t\t\tround = round + 1;\n\t\t\ttextFieldPlayerOneScore.setText(Integer.toString(player1.getPoints()));\n\t\t\ttextFieldPlayerTwoScore.setText(Integer.toString(player2.getPoints()));\n\t\t\ttextAreaInstructions.setText(\"Try to get the highest roll possible!\");\n\t\t\tcheckForGameOver();\n\t\t}\n\t\ttogglebtnD1.setSelected(false);\n\t\ttogglebtnD2.setSelected(false);\n\t\ttogglebtnD3.setSelected(false);\n\t\tdisableDice();\n\t\tturn = 0;\n\t}", "private void afterRoll() {\n if (die.getNumber() == 1) {\n round_score = 0;\n round_score_view.setText(String.valueOf(round_score));\n game.changeTurn();\n String label;\n if (game.isPlayer_turn()) {\n game.incrementRound();\n label = \"Round \" + game.getRound() + \" - Player's Turn\";\n }\n else {\n label = \"Round \" + game.getRound() + \" - Banker's Turn\";\n }\n round_label.setText(label);\n }\n else {\n round_score += die.getNumber();\n round_score_view.setText(String.valueOf(round_score));\n }\n if (!game.isPlayer_turn())\n doBankTurn();\n }", "public void chooseWhichDieToRoll(ActionEvent e){\n \tif(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getTotDiceTossLeft() !=3){\n\t\t\tJButton btnDie = (JButton)e.getSource();\n\t\t\tint index = Integer.parseInt(btnDie.getName());\n \t\n\t\t\t//Change Icon on die depending on user interaction \n\t \tswitch(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getDieNumber(index)){\n\t\t\t\tcase 1:\n\t\t\t\t\tif(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][6]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().keepDice(index);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(!player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][0]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().releaseDice(index);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tif(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][7]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().keepDice(index);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(!player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][1]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().releaseDice(index);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tif(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][8]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().keepDice(index);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(!player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][2]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().releaseDice(index);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tif(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][9]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().keepDice(index);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(!player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][3]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().releaseDice(index);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tif(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][10]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().keepDice(index);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(!player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][4]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().releaseDice(index);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tif(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][11]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().keepDice(index);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(!player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][5]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().releaseDice(index);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t \t}\n \t}\n }", "private int opponentMove() {\n if (diceRoll(10) <= 9) { //Here we call diceRoll again, and compare it to a number, since the opponent only has 1 type of attack\n int attackValue = (opponent.getAttack() + (opponent.getLevel() / 2)) * diceRoll(4); //We set attackValue equals to the opponents base attack + the opponents level / 2, \n // and then multiply it by the diceRoll. This way, the opponents damage scales with level as well.\n int damageDealt = 0;\n if (attackValue >= player.getArmorValue()) { //We check if the opponents attack is stronger than players armor\n damageDealt = (attackValue - player.getArmorValue()) + 1; //If the opponent attacks through the players armor, they deal the remaining damage + 1.\n player.changeHealth(damageDealt * -1); //Changes the players health accordingly\n }\n return damageDealt;\n }\n return -1;\n }", "private void movePlayer(Player curPlayer, int diceVal) {\n int oldPosition = snakeAndLadderBoard.getPlayerPieces().get(curPlayer.getName());\n int curPosition = oldPosition + diceVal;\n\n if (curPosition > snakeAndLadderBoard.getSize()) {\n curPosition = oldPosition;\n } else {\n curPosition = getCurPositionAfterGoingThroughSnakeAndLadders(curPosition);\n }\n snakeAndLadderBoard.getPlayerPieces().put(curPlayer.getName(), curPosition);\n System.out.println(curPlayer.getName() + \" rolled a \" + diceVal + \" and moved from \"\n + oldPosition + \" to \" + curPosition);\n }", "public boolean plizMovePlayerForward(Player player)\n {\n\n //check if die was rolled\n if (getValue_from_die() > 0)\n {\n int x_cord = player.getX_cordinate();\n int y_cord = player.getY_cordinate();\n int steps = player.getSteps_moved();\n\n //try to get player from color home\n if (attempt2GetPlayerFromHomeSucceds(player))\n {\n return true;\n }\n\n //if player has already reached home do nothing\n if (player.getSteps_moved() >= 58)\n {\n return false;\n }\n //if player is inside home stretch he has to play exact number to go home\n else if (player.getSteps_moved() >= 52)\n {\n if (59 - player.getSteps_moved() <= value_from_die)\n {\n return false;\n }\n }\n\n //if player isnt at home move him\n if (player.getSteps_moved() > 0)\n {\n for (int i = 1; i <= (value_from_die); i++)\n {\n player.movePlayerForward();\n if (roadBlocked(player))\n {\n road_blocked = true;\n }\n player.setHas_not_been_drawn(true);\n }\n\n //roll back changes\n if (road_blocked)\n {\n player.setX_cordinate(x_cord);\n player.setY_cordinate(y_cord);\n player.setSteps_moved(steps);\n ludo.setDrawRoadBlockedSign(true);\n //println(\"ROAD BLOCKED\");\n road_blocked = false;\n return false;\n }\n playPlayerHasMovedMusic();\n //see if player eats someone\n if (getPerson_to_play() == 1)\n {\n BlueEatsPlayer(player);\n }\n else if (getPerson_to_play() == 2)\n {\n RedEatsPlayer(player);\n }\n else if (getPerson_to_play() == 3)\n {\n GreenEatsPlayer(player);\n }\n else if (getPerson_to_play() == 4)\n {\n YellowEatsPlayer(player);\n }\n if (value_from_die == 6)\n {\n resetDieScore();\n ludo.setDrawScoreAllowed(false);\n return true;\n }\n //reset variables and change person to play\n resetDieScore();\n ludo.setDrawScoreAllowed(false);\n changePersonToPlay();\n return true;\n }\n //occurs rarely at the begining of the game\n else\n {\n //println(\"steps less than 0\");\n return false;\n }\n }\n else\n {\n //println(\"PLIZ ROLL DIE FIRST THEN MOVE BUTTON\");\n return false;\n }\n }", "public int roll() {\n int result = ThreadLocalRandom.current().nextInt(SIDES+1) + 1;// standard 1-7\n if(result == 7){ //LoadedDie 6 occurs twice as often\n return 6;\n } else{\n return result;\n }\n }", "public int roll(){\r\n myFaceValue = (int)(Math.random() * myNumSides) + 1;\r\n return myFaceValue;\r\n }", "private static void roll()\n {\n rand = (int)(((Math.random())*6)+1); // dice roll #1\n rand2 = (int)(((Math.random())*6)+1);// dice roll #2\n }", "private int diceRoll(int sides) {\n return (int) ((Math.random() * sides) + 1);\n }", "public int rollDice();", "public void updateDice() {\n keepAll = true;\n for (JToggleButton die : diceButtons) { // check to see if the user wants to keep all of their dice\n if (!die.isSelected()) {\n keepAll = false;\n break;\n }\n }\n if (player.getCurrentTurn() <= player.getNumOfTurns() && !keepAll) { // reroll\n for (int i = 0; i < player.getPlayerHand().getSizeOfHand(); i++) {\n if (!diceButtons.get(i).isSelected())\n player.rollNewDie(i);\n diceButtons.get(i).setText(String.valueOf(player.getPlayerHand().getHand().get(i).getSideUp()));\n diceButtons.get(i).setSelected(false);\n diceImages.get(i).setIcon(new ImageIcon(player.getPlayerHand().getHand().get(i).getSideUp()+\"up.png\"));\n diceImages.get(i).setSelected(false);\n }\n player.setCurrentTurn(player.getCurrentTurn() + 1);\n setVisible(true);\n if (player.getNumOfTurns()+1 == player.getCurrentTurn() || player.getNumOfTurns() == 1) {\n makeScoringOptions();\n }\n }\n else {\n makeScoringOptions(); // go to scoring options frame\n }\n }", "public int roll() {\n this.assuerNN_random();\n //Roll once\n int result = random.nextInt(this.sides)+1;\n //TODO Save the roll somewhere\n\n //Return the roll\n return result;\n }", "@Override\n\tpublic String performMove(){\n\t\tRandom random = new Random();\t\t\t\t\n\t\tchoice = random.nextInt(3);\t\t\t\t\t//Randomly generating the choices\n if(choice == 0){\n \treturn \"Rock\";\n }else if(choice == 1){\n \treturn \"Paper\";\n }else{\n \treturn \"Scissor\";\n }\n }", "public void playGame()\n\t{\n\t\t// Playing a new round; increase round id\n\t\troundId += 1;\n\n\t\tint diceRoll = 1 + dice.nextInt(6);\n\t\t\n\t\tif(diceRoll <= 3)\n\t\t{\n\t\t\tbranchId = 0;\n\t\t\tresult = 0;\n\t\t\tSystem.out.println(\"Roll = \" + diceRoll + \", result = 0\");\n\t\t\tsendMessage(diceRoll, roundId, branchId, result);\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbranchId = 1;\n\t\t\tresult = 6;\n\t\t\tSystem.out.println(\"Roll = \" + diceRoll + \", result = 6\");\n\t\t\tsendMessage(diceRoll, roundId, branchId, result);\t\t\t\t\n\t\t}\n\t\t\n\t}", "public int throwDice(int number) {\n this.lastThrow = number;\n this.status = \"Started\";\n Player player = players.get(activePlayer);\n\n // DICELISTENER : throw DiceEvent to diceListeners\n for (DiceListener listener : diceListeners) {\n DiceEvent diceEvent = new DiceEvent(this, this.activePlayer, number);\n listener.diceThrown(diceEvent);\n }\n\n\n //check if number thrown was a 6\n if (number != 6) {\n player.setSixersRow(0);\n } else if (!player.inStartingPosition()) { //count up the sixers row if not in starting pos\n player.setSixersRow(player.getSixersRow() + 1);\n }\n\n if (player.getSixersRow() == 3) { //three 6's in a row, next turn\n // PLAYERLISTENER : Trigger playerEvent for player that is WAITING\n for (PlayerListener listener : playerListeners) {\n PlayerEvent event = new PlayerEvent(this, this.activePlayer, PlayerEvent.WAITING);\n listener.playerStateChanged(event);\n }\n this.setNextActivePlayer();\n return number;\n }\n\n if (player.inStartingPosition()) { //starting position have 3 throws to get a six\n player.setThrowAttempts(player.getThrowAttempts() + 1);\n if (number != 6 && player.getThrowAttempts() == 3) {\n // PLAYERLISTENER : Trigger playerEvent for player that is WAITING\n for (PlayerListener listener : playerListeners) {\n PlayerEvent event = new PlayerEvent(this, this.activePlayer, PlayerEvent.WAITING);\n listener.playerStateChanged(event);\n }\n this.setNextActivePlayer();\n player.setThrowAttempts(0);\n return number;\n } else {\n return number;\n }\n }\n\n boolean nextTurn = false;\n int piecesInPlay = player.piecesInPlay();\n int blockedPieces = 0;\n int notMakingItInPieces = 0;\n\n for (Piece piece : player.getPieces()) {\n if (piece.isInPlay()) {\n //count blocked pieces\n if (towersBlocksOpponents(player, piece.position, number)) {\n blockedPieces++;\n }\n\n //If piece is at pos over 52 but the thrown dice won't make it 59\n //end of turn\n if (piece.getPosition() > 52 && piece.getPosition() + number != 59 && piece.getPosition() != 59) {\n notMakingItInPieces++;\n }\n }\n\n }\n\n //if all active pieces are blocked, end of turn\n if (blockedPieces == piecesInPlay) {\n nextTurn = true;\n //if all pieces are at endplay, but none can get in, end of turn\n } else if (notMakingItInPieces == piecesInPlay) {\n nextTurn = true;\n //if blocked pieces and notmakingitinpieces are all the pieces in play, end of turn\n } else if ((notMakingItInPieces + blockedPieces) == piecesInPlay) {\n nextTurn = true;\n }\n\n //set next turn\n if (nextTurn) {\n // PLAYERLISTENER : Trigger playerEvent for player that is WAITING\n for (PlayerListener listener : playerListeners) {\n PlayerEvent event = new PlayerEvent(this, this.activePlayer, PlayerEvent.WAITING);\n listener.playerStateChanged(event);\n }\n this.setNextActivePlayer();\n }\n\n return number;\n }", "public int roll()\n {\n int r = (int)(Math.random() * sides) + 1;\n return r;\n }", "public void rollAndCheckActiveTokens() {\n this.currentPlayer = this.xPlayers.get(this.turn % this.xPlayers.size());\n this.dice.rollDice(this.currentPlayer);\n //System.out.printf(\"%s player rolls the dice: %d\\n\", this.players[currentPlayer].getColor(), this.dice.getResult());\n this.xTokens.clear();\n\n if (this.dice.getIsSix()) {\n this.players[currentPlayer].setTurn(true);// flag for throwing the dice again if a token is moved\n for (Token token : this.players[currentPlayer].getTokens()) {\n if (!(token.getFinalTrack() && token.getPosition() == GOAL)) {\n this.xTokens.add(token.getIndex());\n }\n }\n } else {\n this.players[currentPlayer].setTurn(false);\n for (int index : this.players[currentPlayer].getTokensOut()) {\n this.xTokens.add(index);\n }\n }\n }", "private void rollDie() {\n if (mTimer != null) {\n mTimer.cancel();\n }\n mTimer = new CountDownTimer(1000, 100) {\n public void onTick(long millisUntilFinished) {\n die.roll();\n showDice();\n }\n public void onFinish() {\n afterRoll();\n }\n }.start();\n }", "public void rollDice(GameState currentState, List<Pair<Player, Integer>> playerOrder) {\n switch (currentState) {\n case AssigningPlayerPieces:\n int roll = rollDice();\n logMessage(currentPlayersTurn.getName() + \" rolled \" + roll);\n playerOrder.add(new Pair<>(currentPlayersTurn, roll));\n\n int nextPlayersIndex = (players.indexOf(currentPlayersTurn) + 1) % players.size();\n currentPlayersTurn = players.get(nextPlayersIndex);\n\n if (playerOrder.size() == players.size()) {\n this.assignPlayerPieces(playerOrder);\n this.fillDetectiveSlips();\n this.allocateWeapons();\n currentPlayersTurn = playerOrder.get(0).getKey();\n currentPlayersSteps = rollDice();\n state = GameState.InPlay;\n logMessage(\"All player pieces assigned.\");\n }\n break;\n case InPlay:\n currentPlayersSteps = rollDice();\n logMessage(currentPlayersTurn.getName() + \" rolled a \" + currentPlayersSteps);\n locAtTurnStart = currentPlayersTurn.getPiece().getLocation();\n break;\n default:\n\n }\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"WECOME TO SNAKE AND LADDER PROBLEMS\");\n\t\tint position=0;\n\t\tSystem.out.println(\"Initial Position of Player : \"+position);\n\t\tint count=0;\n\t\t\n\t\t\n\t\twhile(position<100)\n\t\t{\n\t\t\t//Random Function to generate values between a range\n\t\t\t//Formula = Math.random() * (max - min + 1) + min\n\t\t\tint Dice = (int) Math.floor(Math.random()*(6-1+1)+1);\n\t\t\tSystem.out.println(\"Number on Dice : \"+Dice);\n\t\t\tcount++;\n\t\t\tSystem.out.println(count);\n\t\t\tint Option = (int) Math.floor(Math.random()*10)%3;\n\t\t\t\n\t\t\tSystem.out.println(\"====OPTIONS======\\nOption 0 : No Play\\nOption 1 : Ladder \\nOption 2 : Snake \\n\");\n\t\t\tSystem.out.println(\"Option : \"+Option);\n\t\t\t\n\t\t\tif (Option == 0)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"No Play the player stays in the same position \"+position);\n\t\t\t}\n\t\t\telse if (Option == 1)\n\t\t\t{\n\t\t\t\tposition = position + Dice;\n\t\t\t\tSystem.out.println(\"Position : \"+position);\n\t\t\t\tif(position > 100)\n\t\t\t\t{\n\t\t\t\t\tposition = position - Dice;\n\t\t\t\t\tSystem.out.println(\"Player comes back to the previous position : \"+position);\n\t\t\t\t}\n\t\t\t\telse if (position == 100)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Player has won : \"+position);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Player moves ahead by : \"+position);\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tposition = position - Dice;\n\t\t\t\tSystem.out.println(\"Player moves behind by :\" +position);\n\t\t\t\tif(position < 0)\n\t\t\t\t{\n\t\t\t\t\tposition = 0;\n\t\t\t\t\tSystem.out.println(\"Player restarts from \" +position);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\n\t\t}\n\t\tSystem.out.println(\"Number of times the dice was rolled : \"+count);\n\t\t\n\t}", "public abstract int rollDice();", "public void Diceroll()\n\t{\n\t\tdice1 = rand.nextInt(6)+1;\n\t\tdice2 = rand.nextInt(6)+1;\n\t\ttotal = dice1+dice2;\n\t}", "private int placeDice(Player actualPlayer, Die die, Position position){\n if(actualPlayer.getSchemaCard().getCellList().get(position.getIndexArrayPosition()).isEmpty()) {\n for (Restriction restriction : restrictionList) {\n int error = restriction.checkRestriction(actualPlayer.getSchemaCard(), die, playerMove.getDiceSchemaWhereToLeave().get(0));\n if (error != 0) return error;\n }\n\n actualPlayer.getSchemaCard().setDiceIntoCell(position, die);\n return 0;\n }\n return 2008;\n }", "@Override\n public void interact(Player player) {\n\n if (player.isInJail() && !player.timeToGetOutOfJail()) {\n\n while (true) {\n\n if (player.hasPass()) System.out.println(\"roll, pay, card\");\n System.out.println(\"roll , pay\");\n\n String[] strings = {\"roll\", \"pay\", \"card\"};\n String answer = MyInput.validate_string(strings);\n if (answer.equals(\"roll\")) {\n if (Player.rolledDoubles()) {\n System.out.println(name + \" rolled doubles!\");\n player.gotOutOfJail();\n player.takeTurn();\n } else {\n System.out.println(name + \" didn't roll doubles\");\n player.spentANightInJain();\n if (player.timeToGetOutOfJail()) {\n player.setDollarCount(-1 * this.cost);\n player.setInJail(false);\n System.out.println(player.getName() + \" payed \" + this.cost + \" after their third roll for doubles\");\n player.takeTurn();\n }\n }\n return;\n } else if(answer.equals(\"pay\")) {\n System.out.print(\"payed to get out, \");\n player.setDollarCount(-1 * cost);\n player.gotOutOfJail();\n player.takeTurn();\n return;\n } else if(answer.equals(\"card\") && player.hasPass()) {\n player.setGetOutOfJailFreeOwnership(false);\n player.gotOutOfJail();\n System.out.println(player.getName() + \" used a card to get out of jail\");\n player.takeTurn();\n return;\n } else {\n System.out.println(\"bad input\");\n }\n }\n }\n }", "private void playTheGame(List<String> lines) throws Exception {\n int diceIndex = fields.size() + players.size() + 3;\n\n if (diceIndex + 1 > lines.size() || (fields.size() < 1) || (players.size() < 1)) {\n System.out.println(\"No moves defined\");\n return;\n }\n\n for (int index = diceIndex + 1; index < lines.size(); index++) {\n String[] values = lines.get(index).split(\" \");\n RolledDice rolledDice = new RolledDice(\n Integer.parseInt(values[2]),\n Integer.parseInt(values[3])\n );\n // If player is still playing (in players list) and loses, player\n // is added to the losers list and removed from players list\n findPlayer(values[0], getStrategyType(values[1])).ifPresent(player -> {\n try {\n playOneTurnWithPlayer(player, rolledDice);\n } catch (NotEnoughMoneyException ex) {\n losers.add(player);\n players.remove(player);\n }\n });\n\n if (players.size() <= 1) {\n break;\n }\n }\n }", "public void setDirection(int dice){\n\t}", "public void haveContinuedGo(Dice currentDice, int currentSection, int roundsTaken)\n {\n dice = currentDice;\n boolean madeChoice = false;\n boolean firstMove = false;\n boolean secondMove = true;\n int diceRolls = 0;\n if(currentSection == 1)\n {\n firstMove = false;\n secondMove = true;\n diceRolls = 0;\n }\n if(currentSection ==2)\n {\n diceRolls = 1;\n }\n if(currentSection == 3)\n {\n diceRolls =2;\n }\n //Proceed to haveGo() whilst taking account of different initial variable scenarios\n while(diceRolls <= 1){\n ArrayList<Integer> diceRoll = new ArrayList<Integer>();\n if(diceRolls == 0){\n System.out.println(\"\\n\\t--------------------------\\n\\t\" + this.name + \"'s Go!\\n\\t--------------------------\\n\\nRoll One...\");\n diceRoll = dice.getDiceState();\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n else if(diceRolls == 1)\n {\n System.out.println(\"\\nRoll Two...\");\n if(currentSection == 1)\n {\n diceRoll = dice.roll();\n }\n else\n {\n diceRoll = dice.getDiceState();\n }\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n secondMove = false;\n firstMove = true;\n }\n //CURRENTLY MOVING REPEATS\n while(!firstMove)\n {\n boolean repeat = false;\n System.out.println(\"Available Actions:\");\n System.out.println(\"\\t--------------------------\");\n System.out.println(\"\\t0) Exit to Desktop\\n\\t1) Fill a Row\\n\\t2) Possible Scores\\n\\t3) Check Scorecard\\n\\t4) Clean Roll\");\n System.out.println(\"\\t--------------------------\\n\");\n System.out.println(\"Enter Choice...\");\n int choice = GameManager.makeValidChoice(-1,5);\n if(choice == 0)\n {\n gameFinisher.exitSequence(filename,name, diceRoll, saveString,roundsTaken, 1);\n }\n else if(choice == 3)\n {\n System.out.println(\"\\n********************************************\\n\" + name + \"'s Scorecard\\n********************************************\");\n scorecard.printScorecard();\n repeat = true;\n }\n\n else if(choice == 4)\n {\n diceRolls++;\n firstMove = true;\n }\n else if(choice == 2)\n {\n scorer.printPossibilities(diceRoll, scorecard.getFreeCategories());\n repeat =true;\n }\n else if(choice == 1)\n {\n boolean categoryUsed = true;\n while(categoryUsed)\n {\n System.out.println(\"Which row would you like to fill?\");\n int category = GameManager.makeValidChoice(-1,14);\n scorer.findPossibilities(diceRoll, scorecard.getFreeCategories());\n try{\n if(scorecard.getFreeCategories().contains(category)){\n int score = scorer.getScore(category);\n scorecard.addCategory(category,score);\n madeChoice = true;\n categoryUsed = false;\n }\n else\n {\n System.out.println(\"Row is already filled. Please choose another...\");\n }\n } catch(NullPointerException e) {\n System.out.println(\"Program Crash: Free categories doesnt exist.\");\n }\n }\n diceRolls = 2;\n firstMove = true;\n secondMove = true;\n madeChoice = true;\n }\n else\n {\n System.out.println(\"Something's gone very wrong, you shouldn't be here...\");\n repeat = true;\n }\n if(repeat){\n if(diceRolls == 0){\n System.out.println(\"Roll One...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n else if(diceRolls == 1)\n {\n System.out.println(\"Roll Two...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n }\n }\n while(!secondMove)\n {\n boolean repeat = false;\n System.out.println(\"Available Actions:\");\n System.out.println(\"\\t--------------------------\");\n System.out.println(\"\\t0) Exit to Desktop\\n\\t1) Fill a Row\\n\\t2) Possible Scores\\n\\t3) Check Scorecard\\n\\t4) Clean Roll\\n\\t5) Hold and Roll Dice\");\n System.out.println(\"\\t--------------------------\\n\");\n System.out.println(\"Enter Choice...\");\n int choice = GameManager.makeValidChoice(-1,6);\n if(choice == 0)\n {\n gameFinisher.exitSequence(filename, name, diceRoll, saveString,roundsTaken, 2);\n }\n else if(choice == 3)\n {\n System.out.println(\"\\n********************************************\\n\" + name + \"'s Scorecard\\n********************************************\");\n scorecard.printScorecard();\n repeat = true;\n }\n else if(choice == 5)\n {\n System.out.println(\"\\n\\t--------------------------\");\n System.out.println(\"\\tDice Holder\\n\\t-----\\n\\t[0) Leave [1) Hold\");\n System.out.println(\"\\t--------------\\n\");\n System.out.println(diceRoll);\n System.out.println(\"--------------------------\");\n System.out.print(\"[\" + diceRoll.get(0) + \"]\");\n boolean one = toHold();\n System.out.print(\"[\" + diceRoll.get(1) + \"]\");\n boolean two = toHold();\n System.out.print(\"[\" + diceRoll.get(2) + \"]\");\n boolean three = toHold();\n System.out.print(\"[\" + diceRoll.get(3) + \"]\");\n boolean four = toHold();\n System.out.print(\"[\" + diceRoll.get(4) + \"]\");\n boolean five = toHold();\n ArrayList<Boolean> newState = new ArrayList<Boolean>();\n newState.add(one);\n newState.add(two);\n newState.add(three);\n newState.add(four);\n newState.add(five);\n dice.setDiceHoldState(newState);\n System.out.println(\"\\n\\t--------------------------\\n\\tDice Held\\n\\t-----\\n\\tRolling Dice...\\n\\t--------------------------\");\n diceRolls++;\n secondMove = true;\n }\n else if(choice == 4)\n {\n diceRolls++;\n secondMove = true;\n madeChoice = false;\n }\n else if(choice == 2)\n {\n scorer.printPossibilities(diceRoll, scorecard.getFreeCategories());\n repeat =true;\n }\n else if(choice == 1)\n {\n boolean categoryUsed = true;\n while(categoryUsed)\n {\n System.out.println(\"What row would you like to fill?\");\n int category = GameManager.makeValidChoice(-1,14);\n try{\n if(scorecard.getFreeCategories().contains(category)){\n int score = scorer.getScore(category);\n scorecard.addCategory(category,score);\n madeChoice = true;\n categoryUsed = false;\n }\n else\n {\n System.out.println(\"Row is already filled. Please choose another...\");\n }\n } catch(NullPointerException e) {\n System.out.println(\"Program Crash: Free categories doesnt exist.\");\n }\n }\n diceRolls = 2;\n repeat = false;\n secondMove = true;\n madeChoice = true;\n }\n else\n {\n System.out.println(\"Something's gone very wrong, you shouldn't be here...\");\n repeat = true;\n }\n\n if(repeat){\n if(diceRolls == 0){\n System.out.println(\"Roll One...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n else if(diceRolls == 1)\n {\n System.out.println(\"Roll Two...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n }\n\n }\n }\n }\n ArrayList<Integer> diceRoll = new ArrayList<Integer>();\n if(currentSection != 3)\n {\n diceRoll = dice.roll(); \n }\n else if(currentSection == 3)\n {\n diceRoll = dice.getDiceState(); \n }\n while(!madeChoice)\n {\n System.out.println(\"\\nFinal Roll...\");\n System.out.println(\"\\t\" + diceRoll + \"\\n\");\n System.out.println(\"Available Actions:\");\n System.out.println(\"\\t--------------------------\");\n System.out.println(\"\\t0) Exit to Desktop\\n\\t1) Fill a Row\\n\\t2) Possible Scores\\n\\t3) Check Scorecard\");\n System.out.println(\"\\t--------------------------\");\n System.out.println(\"Enter Choice...\");\n int choice = GameManager.makeValidChoice(-1,4);\n if(choice == 0)\n {\n gameFinisher.exitSequence(filename, name, diceRoll, saveString, roundsTaken, 2);\n }\n else if(choice == 3)\n {\n System.out.println(\"\\n********************************************\\n\" + name + \"'s Scorecard\\n********************************************\");\n scorecard.printScorecard();\n }\n\n else if(choice == 2)\n {\n scorer.printPossibilities(diceRoll, scorecard.getFreeCategories());\n }\n else if(choice == 1)\n {\n boolean categoryUsed = true;\n while(categoryUsed)\n {\n System.out.println(\"What row would you like to fill?\");\n int category = GameManager.makeValidChoice(-1,14);\n try{\n if(scorecard.getFreeCategories().contains(category)){\n int score = scorer.getScore(category);\n scorecard.addCategory(category,score);\n madeChoice = true;\n categoryUsed = false;\n }\n else\n {\n System.out.println(\"Row is already filled. Please choose another...\");\n }\n } catch(NullPointerException e) {\n System.out.println(\"Program Crash: Free categories doesnt exist.\");\n }\n }\n }\n }\n }", "public void movePlayer(String direction) {\n if(playerAlive(curPlayerRow, curPlayerCol)){\n if(direction.equals(\"u\")&&(curPlayerRow-1)>=0){\n overwritePosition(curPlayerRow, curPlayerCol, (curPlayerRow-1), curPlayerCol);\n curPlayerRow -= 1;\n }else if(direction.equals(\"d\")&&(curPlayerRow+1)<=7){\n overwritePosition(curPlayerRow, curPlayerCol, (curPlayerRow+1), curPlayerCol);\n curPlayerRow += 1;\n }else if(direction.equals(\"l\")&&(curPlayerCol-1)>=0){\n overwritePosition(curPlayerRow, curPlayerCol, curPlayerRow, (curPlayerCol-1));\n curPlayerCol -= 1;\n }else if(direction.equals(\"r\")&&(curPlayerCol+1)<=9){\n overwritePosition(curPlayerRow, curPlayerCol, curPlayerRow, (curPlayerCol+1));\n curPlayerCol += 1;\n }\n }\n if(playerFoundTreasure(curPlayerRow, curPlayerCol)){\n playerWins();\n }\n adjustPlayerLifeLevel(curPlayerRow, curPlayerCol);\n int[] array = calcNewTrollCoordinates(curPlayerRow, curPlayerCol, curTrollRow, curTrollCol);\n if(curPlayerRow == curTrollRow && curPlayerCol == curTrollCol){\n gameBoard[curTrollRow][curTrollCol] = new TrollPiece();\n }else{\n int newTrollRow = array[0];\n int newTrollCol = array[1];\n overwritePosition(curTrollRow, curTrollCol, newTrollRow, newTrollCol);\n curTrollRow = newTrollRow;\n curTrollCol = newTrollCol;\n }\n }", "public void roll() {\n if(!frozen) {\n this.value = ((int)(Math.random() * numSides + 1));\n }\n }", "public boolean Fight(Player p)\n{\n\tint m=1;\n\t int t=1;\n int temp=0;\n int player1=this.weapon-1;\n int player2=p.weapon-1;\n\n\t int[] a=new int[this.weapon];\n int[] b=new int[p.weapon];\n System.out.println(\"XXxxXXxxXXxxXXxxXX FIGHT XXxxXXxxXXxxXXxxXX\\n\");\nwhile(this.health>0&&p.health>0)\n{\n System.out.println(\"~~~~~Round: \" +m+\"~~~~~\");\n m++;\n System.out.println(\"++\"+this.name+\" Health: \"+this.health+\" potions.\");\n System.out.println(\"++\"+p.name+\" Health: \"+p.health+\" potions.\");\n\n for (int i=0;i<a.length;i++)\n {\n\ta[i]=this.Roll();\n }\n for(int j=0;j<b.length;j++)\n {\n\tb[j]=p.Roll();\n }\n\n Arrays.sort(a);\n Arrays.sort(b);\n\n System.out.print(this.name+\" has thrown: {\");\n\n for(int i=a.length-1;i>0;i--)\n System.out.print(a[i]+\", \");\n\n System.out.println(a[0]+\"}\");\n\n System.out.print(p.name+\" has thrown: {\");\n for(int j=b.length-1;j>0;j--)\n System.out.print(b[j]+\", \");\n\n System.out.println(b[0]+\"}\");\n\n if(a.length>b.length)\n \ttemp=b.length;\n else\n \ttemp=a.length;\n\n player1=this.weapon-1;\n player2=p.weapon-1;\n t=1;\n while(this.health>0&&p.health>0&&temp>0)\n \t{\n\n System.out.print(\"***Strike \"+t+\": \");\n if(a[player1]==b[player2])\n {\n \tSystem.out.println(\"BOTH suffer blows!!!\");\n \tthis.health-=a[player1]*10;\n \tp.health-=b[player2]*10;\n \tSystem.out.println(this.name+\" decreases health by \"+a[player1]*10+\" potions.\");\n \tSystem.out.println(p.name+\" decreases health by \"+b[player2]*10+\" potions.\");\n }\n else if(a[player1]>b[player2])\n {\n \t\tSystem.out.println(p.name+\" does damage!\");\n \tp.health-=a[player1]*10;\n \tSystem.out.println(p.name+\" decreases health by \"+a[player1]*10+\" potions.\");\n }\n else\n {\n \tSystem.out.println(this.name+\" does damage!\");\n \tthis.health-=b[player2]*10;\n \tSystem.out.println(this.name+\" decreases health by \"+b[player2]*10+\" potions.\");\n }\n\n player1--;\n player2--;\n\n temp--;\n t++;\n \t}\n\n\n}\nif(this.health<=0)\n return false;\n else\n \treturn true;\n\n}", "private void reactToRoll(){\r\n\t\troll.setEnabled(false);\r\n\t\tsubmit.setEnabled(true);\r\n\t\tagain.setEnabled(false);\r\n\t\tnoMore.setEnabled(false);\r\n\t\tif(!didBust){\r\n\t\t\tstatusLabel.setText(\"Choose your first dice pair!\");\r\n\t\t} else {\r\n\t\t\tstatusLabel.setText(\"Oh no! Better luck next time.\");\r\n\t\t\tsubmit.setText(\"Oops! Busted!\");\r\n\t\t}\r\n\t\tupdate();\r\n\t}", "DiceRoll modifyRoll(DiceRoll roll, Die die);", "public int roll() {\n if(!debug)\n this.result = random.nextInt(6) + 1;\n else{\n scanner = new Scanner(showInputDialog(\"Enter dice value (1-6):\"));\n try{int res = scanner.nextInt()%7;\n this.result = res!=0? res:6;\n }\n catch(NoSuchElementException ne){this.result=6;} \n }\n return this.result;\n }", "public void throwDices() throws DiceException {\n /**generator of random numbers(in this case integer numbers >1)*/\n Random generator = new Random();\n /**mode of logic*/\n String mode = this.getMode();\n\n if (!mode.equals(\"sum\") && !mode.equals(\"max\")) {\n throw new DiceException(\"Wrong throw mode!!! Third argument should be 'max' or 'sum'!\");\n } else if (this.getNumOfDices() < 1) {\n throw new DiceException(\"Wrong numeber of dices!!! Number of dices should equals 1 or more!\");\n } else if (this.getNumOfWalls() < 4) {\n throw new DiceException(\"Wrong numeber of walls!!! Number of walls should equals 4 or more!\");\n } else {\n if (mode.equals(\"sum\")) {\n for (int i = 0; i < this.getNumOfDices(); i++) {\n result += (generator.nextInt(this.getNumOfWalls()) + 1);\n }\n } else if (mode.equals(\"max\")) {\n for (int i = 0; i < this.getNumOfDices(); i++) {\n int buff = (generator.nextInt(this.getNumOfWalls()) + 1);\n if (this.result < buff) {\n this.result = buff;\n }\n }\n }\n }\n }", "public void setPlayerRoll20()\r\n {\r\n \r\n roll2 = ((int)(Math.random() * 100) % HIGHEST_DIE_VALUE20 + LOWEST_DIE_VALUE20);\r\n \r\n }", "public int handleMove(int dicethrow);", "public void onRollClick() {\n game.TakeTurn(player1);\n game.TakeTurn(computer);\n undoButton.setDisable(false);\n resetButton.setDisable(false);\n updateFields(\"player\");\n updateFields(\"computer\");\n setLeadPlayerImage();\n checkGame();\n }", "void roll(int noOfPins);", "static void UniversalShake() {\n if (!Sounds.getIsMute()) diceShakeSound.start();\n\n diceNum = GameFunctions.rollDice(\"Pigdice\", dice);\n\n if (diceNum == 1) {\n if (playerTurn == 1) {\n endTurn(currentScorePlayer1);\n } else {\n endTurn(currentScorePlayer2);\n }\n } else {\n if (playerTurn == 1)\n currentScorePlayer1.setText(String.valueOf(Integer.parseInt\n (currentScorePlayer1.getText().toString()) + diceNum));\n\n else\n currentScorePlayer2.setText(String.valueOf(Integer.parseInt\n (currentScorePlayer2.getText().toString()) + diceNum));\n }\n }", "public static void playGame(String player1, String player2 ) {\n // no need for an iterator, as with random rollDice we never run out of values\n int player1Dice;\n int player2Dice;\n\n do {\n // no need for the other player.dice != 0 condition because of the correct dice roll simulation that never returns 0\n // player 1 roll\n player1Dice = rollDice();\n System.out.print(player1 + \" rolled \" + player1Dice + \", \");\n // player 2 roll\n player2Dice = rollDice();\n System.out.println(player2 + \" rolled \" + player2Dice);\n } while(isDraw(player1Dice, player2Dice));\n\n // announcing a winner (no draw here, because we never get out of dice rolls)\n if(player1Dice > player2Dice) {\n System.out.println(\"Round over. \" + player1 + \" is the winner\");\n } else if(player2Dice > player1Dice){\n System.out.println(\"Round over. \" + player2 + \" is the winner\");\n }\n }", "public void roll(){\n Random rand = new Random();\n this.rollVal = rand.nextInt(this.faces) + 1;\n }", "public void dispersePayout(Room room){\n \n Dice d = new Dice();\n ArrayList<Integer> payoutVals = d.rollPayout(room.getSceneCard().getSceneBudget());\n \n ArrayList<Player> players = room.getOccupants();\n \n ArrayList<Role> roles = room.getSceneCard().getRoles();\n ArrayList<Integer> ranks = new ArrayList<Integer>();\n \n for(Role r : roles){\n ranks.add(r.getRank());\n }\n \n Collections.sort(ranks);\n Collections.reverse(ranks);\n \n //loop through roles and pay respective players\n for(int i = 0; i < payoutVals.size(); i++){\n int roleRank = ranks.get(i % ranks.size()); \n \n for(Player p : players){\n if(p.getCurrentRole() != null){\n if(p.getCurrentRole().isOnCard() && p.getCurrentRole().getRank() == roleRank){\n p.addMoney(payoutVals.get(i));\n }\n }\n \n \n }\n }\n for(Player p : players){\n if(p.getCurrentRole() != null){\n if(!(p.getCurrentRole().isOnCard())){\n p.addMoney(p.getCurrentRole().getRank());\n }\n }\n \n }\n }", "public void nextTurn() {\r\n\r\n\t\t// System.out.println(\"nextTurn================================================================================================\" + this.DiceNumber);\r\n\t\tif (gameState == GameState.Playing) {\r\n\t\t\tif (!isPlayerCall && currentTurnPlayer != null && !currentTurnPlayer.getPlayerDetail().getIsRobot()) {\r\n\t\t\t\tif (currentTurnPlayer.PlayerTimeOutCall()) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tcurrentTurnPlayer.addNoOperateTime();\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// current turn count add one.\r\n\t\t\tturnIndex++;\r\n\t\t\tisPlayerCall = false;\r\n\t\t\tcurrentTurnPlayer = findNextLiving();\r\n\t\t\tsendGameNextTurn(currentTurnPlayer, this);\r\n\r\n\t\t\t// if current player is robot,add robot logical action.\r\n\t\t\tif (currentTurnPlayer.getPlayerDetail().getIsRobot()\r\n\t\t\t\t\t|| currentTurnPlayer.getPlayerDetail().getIsRobotState()) {\r\n\t\t\t\tThreadSafeRandom random = new ThreadSafeRandom();\r\n\t\t\t\tAddAction(new RobotProcessAction(random.next(1, 6) * 1000, currentTurnPlayer));// 机器人随机一个叫的时间\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// if the player has trusteed the game,add trustee action to deal\r\n\t\t\t// with the condition.\r\n\t\t\t// if (currentTurnPlayer.getPlayerState() == PlayerState.Trustee)\r\n\t\t\t// {\r\n\t\t\t// AddAction(new TrusteePlayerAction(random.next(3, 6) * 1000,\r\n\t\t\t// currentTurnPlayer));\r\n\t\t\t// return;\r\n\t\t\t// }\r\n\r\n\t\t\t// this turn wait for 20 seconds.\r\n\t\t\tWaitTime(1000 * 20);// csf0423 以前是12 + 8\r\n\t\t\tonBeginNewTurn();\r\n\t\t}\r\n\t}", "public void doComputerTurn() {\n Random rand = new Random();\n int randInt;\n\n if (!currentPlayer.isEmployed()) { // player not employed\n // moves (but suppresses popups) at random and update of player panel\n tryMove();\n\n if (!(currentPlayer.getLocation().getName() == \"trailer\")) {\n if (currentPlayer.getLocation().getName() == \"office\") { // in office\n // upgrade (but suppresses popups) at random and update of player panel\n tryUpgrade();\n \n } else { // in regular set\n // take role (but suppresses popups) at random and update of player panel\n tryTakeRole();\n }\n }\n endTurn();\n } else { // player is employed\n randInt = rand.nextInt(2); // get either 0 or 1\n if (randInt == 0) {\n // rehearse\n tryRehearse(); \n } else {\n // act\n tryAct();\n }\n\n endTurn();\n }\n }", "public void roll() {\n\t\tthis.faceValue = (int)(NUM_SIDES*Math.random()) + 1;\n\t}", "public void actionPerformed( ActionEvent actionEvent )\n{\n if ( firstRoll ) { \n sumOfDice = rollDice(); // roll dice \n wonMoney.setText(\"\"+money);\n switch ( sumOfDice ) {\n\n // win on first roll\n case 7: case 11: \n gameStatus = WON;\n money=money+40;\n wonMoney.setText(\"\"+money);\n pointField.setText( \"\" );\n // clear point field\n break;\n\n // lose on first roll\n case 2: case 3: case 12: \n gameStatus = LOST;\n money=0;\n pointField.setText( \"\" );\n wonMoney.setText(\"\"+money);\n rollButton.setEnabled(false);\n // clear point field\n break;\n\n // remember point\n default: \n gameStatus = CONTINUE;\n myPoint = sumOfDice;\n pointField.setText( Integer.toString( myPoint ) );\n money=money-20;\n if(money<0)\n {\tmoney=0;\n \t wonMoney.setText(\"\"+money);\n \t rollButton.setEnabled(false);\n \t }\n else wonMoney.setText(\"\"+money);\n firstRoll = false;\n break;\n\n } // end switch structure\n\n } // end if structure body\n\n\n // subsequent roll of dice\n else {\n sumOfDice = rollDice(); // roll dice\n \n // determine game status\n if ( sumOfDice == myPoint ){ // win by making point\n gameStatus = WON;\n money=money+60;\n wonMoney.setText(\"\"+money);\n }\n else if(sumOfDice == 7){\n // lose by rolling 7\n gameStatus = LOST;\n money=0;\n pointField.setText( \"\" );\n wonMoney.setText(\"\"+money);\n rollButton.setEnabled(false);\n \n \n }\n \n money=money-20;\n wonMoney.setText(\"\"+money);\n if(money==0){\n\t gameStatus = LOST;\n\t rollButton.setEnabled(false);\n }\n if(money<0)\n {\tmoney=0;\n \twonMoney.setText(\"\"+money);\n \t\n \t rollButton.setEnabled(false);\n \t }\n \n \n }\n // display message indicating game status\n displayMessage();\n\n}", "public void rollItems() {\n Integer dRoll = dCalc.rollPercent();\n Integer itemGroup = dCalc.getItemGrouping(dRoll);\n Integer numItems = 0;\n if (dCalc.getPrefs().isNoRepeats()) {\n numItems = (int) (dCalc.getNumItems(dRoll) * dCalc\n .getTreasureMultiplier()) + trove.size();\n } else {\n numItems = (int) (dCalc.getNumItems(dRoll) * dCalc\n .getTreasureMultiplier()) + hoard.size();\n }\n\n // If you aren't rolling mundane items, tell the user how many\n if ((itemGroup == 1) && !dCalc.getPrefs().isRollMundane()) {\n LootOutListItem mundanes = new LootOutListItem();\n mundanes.setQuantity(dCalc.getNumItems(dRoll));\n mundanes.setName(\"Mundane Items\");\n addItem(mundanes);\n } else {\n\n // Roll each Item, then add to the ArrayList.\n while ((hoard.size() < numItems) && (trove.size() < numItems)) {\n LootOutListItem item = new LootOutListItem(\n this.dCalc.rollItem(itemGroup));\n\n addItem(item);\n\n }\n }\n }", "public boolean playerMove(Character token, int dice){\n\n\t\tPlayers player = searchBox(token, 0, 0, 0).getPlayers().get(0);\n\t\tplayer.setCurrentBox(player.getCurrentBox() + dice);\n\t\t\n\t\tif(player.getCurrentBox() == colums*rows){\n\t\t\tplayer.setMovement(player.getMovement() + 1);\n\t\t\treturn true;\n\n\t\t}else if(player.getCurrentBox() > colums*rows){\n\t\t\tint difference = colums*rows - (player.getCurrentBox() - dice);\n\t\t\tgetBoxs().get(searchPosition(player.getCurrentBox() - dice, 0)).getPlayers().remove(0);\n\t\t\tplayer.setCurrentBox(colums*rows);\n\t\t\tgetBoxs().get(colums*rows - colums).getPlayers().add(player);\n\n\t\t\tif(dice - difference == colums*rows){\n\t\t\t\treturn playerMove(token, (colums*rows - 1) * (-1));\n\n\t\t\t}else{\n\t\t\t\treturn playerMove(token, (dice - difference) * (-1));\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}else{\n\n\t\t\tint index = searchPosition(player.getCurrentBox(), 0);\n\t\t\tsearchBox(token, 0, 0, 0).getPlayers().remove(0);\n\t\t\tplayer.setMovement(player.getMovement() + 1);\n\n\t\t\tif(getBoxs().get(index).getTypeAction()){\n\t\t\t\tplayer.setCurrentBox(getBoxs().get(getBoxs().get(index).getSendTo()).getNumBoxInt());\n\t\t\t\tgetBoxs().get(getBoxs().get(index).getSendTo()).getPlayers().add(player);\n\t\t\t\tSystem.out.println(\"*. El jugador cayo en una casilla especial por ende su ficha queda en: \" + player.getCurrentBox());\n\t\t\t}else{\n\t\t\t\tgetBoxs().get(index).getPlayers().add(player);\n\t\t\t\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\t\t\n\n\t}", "public int rollResult(){\r\n return rand.nextInt(6) + 1;\r\n }", "public void pay(Tuple pos, Dice dice, Board board) {\n if (board.legal_entrances[pos.a][pos.b] == 0 \n || board.entrances[pos.a][pos.b] == null \n || board.entrances[pos.a][pos.b].getInUse() == false) return;\n \n Entrance entrance = board.entrances[pos.a][pos.b];\n \n // Check if entrance is player's entrance\n if (entrance.getPlayer().getID() == id) return;\n\n Player rival = entrance.getPlayer();\n HotelCard rival_hotel = entrance.getHotel();\n \n System.out.println(ANSI() + \"Player\" + id + \" is on an entrance of a Player\" + rival.getID()+ ANSI_RESET);\n\n // Roll Dice\n System.out.println(ANSI() + \"Player\" + id + \" rolls dice for payment.\" + ANSI_RESET);\n System.out.println(ANSI() + \"Player\" + id + \" please press any button\" + ANSI_RESET);\n Scanner s = new Scanner(System.in);\n String str = s.nextLine();\n int result = dice.roll();\n System.out.println(ANSI() + \"Dice Result: \" + result + ANSI_RESET);\n\n // Pay rival player\n int payment = rival_hotel.getCard().get(rival_hotel.getRank()).b * 6;\n\n // Deal falls through ----> bankrupt\n if (getMLS() <= payment) {\n payment -= getMLS();\n rival.setMLS(rival.getMLS() + payment);\n System.out.println(ANSI() + \"Player\" + id + \" pays to Player\" + rival.getID() + \" \" + payment + \" MLS.\" + ANSI_RESET);\n System.out.println(ANSI() + \"Player\" + id + \" bankrupts\" + ANSI_RESET);\n System.out.println(ANSI() + \"Player\" + rival.getID() + \" has now \" + rival.getMLS() + \" MLS.\" + ANSI_RESET);\n bankrupt(board, pos);\n return;\n }\n\n // Normal Payment\n rival.setMLS(rival.getMLS() + payment);\n setMLS(getMLS() - payment);\n System.out.println(ANSI() + \"Player\" + id + \" pays to Player\" + rival.getID() + \" \" + payment + \" MLS.\" + ANSI_RESET);\n System.out.println(ANSI() + \"Player\" + id + \" has now \" + mls + \" MLS.\" + ANSI_RESET);\n System.out.println(ANSI() + \"Player\" + rival.getID() + \" has now \" + rival.getMLS() + \" MLS.\" + ANSI_RESET);\n return;\n }", "public void setPlayerRoll10()\r\n {\r\n \r\n roll1 = ((int)(Math.random() * 100) % HIGHEST_DIE_VALUE10 + LOWEST_DIE_VALUE10);\r\n }", "@Override\r\n\tpublic int rollDice() {\n\t\treturn 0;\r\n\t}", "public void newTurn() {\n int[] playersAlive = GameEngine.playersAlive();\n if (playersAlive[0] > 0) {\n turnData.clear();\n Die dice = new Die();\n thrown = dice.main();\n turnOnePlayer();\n\n } else {\n GameEngine.theEnd(playersAlive[1]);\n }\n }", "public void checkMoveOrPass(){\n if (this.xTokens.size() > 0) {\n this.diceRoller = false;} \n else { //if no tokens to move, pass and let player roll dice\n this.turn++;\n //System.out.println(\"next turn player \" + this.players[currentPlayer].getColor());\n }\n this.currentPlayer = this.xPlayers.get(this.turn % this.xPlayers.size());\n }", "public void move(int marblesLeft){\n if ( mode == 1 || this.isPowerOfTwo(marblesLeft + 1) ) {\n\n //min = 1, max = marblesLeft/2\n choice = (int) ( Math.random() * (marblesLeft/2) + 1);\n }\n \n // play smart if 2\n else {\n /* calculate the least number of marbles should be taken:\n * \n * Find the power of 2 that is the closest to marblesLeft -->\n * floor(log base 2 of (marblesLeft)) = the closest exponent that -->\n * 2^closest exponent = closest powerOfTwo to marblesLeft\n * \n * After the draw, new marblesLeft should be powerOf2 -1 -->\n * new marblesLeft = (closest powerOfTwo)-1 -->\n * so choice is the difference between the old marblesLeft and new marblesLeft -->\n * choice = marblesLeft - new marblesLeft -->\n * choice = marblesLeft - ( (closest powerOfTwo)-1 ).\n */\n int closestExp = (int) ( Math.log(marblesLeft) / Math.log(2) );\n int closestPowerOfTwo = (int) Math.pow(2, closestExp);\n choice = marblesLeft - (closestPowerOfTwo - 1);\n } \n }", "public int rollDice() {\n\t\td1 = (int)rand.nextInt(6)+1;\n\t\td2 = (int)rand.nextInt(6)+1;\n\t\treturn d1+d2;\n\t}", "public int movePlayer(int a_playerNum, int a_roll)\n {\n //move the player and get the position the player moved to\n int newPlayerPosition = m_gameBoard.moveToPosition(a_playerNum, m_currentPlayers.get(a_playerNum - 1).getPlayerPosition(), a_roll);\n int result;\n \n //if the player passed go\n if(newPlayerPosition - a_roll < 0)\n {\n result = 1;\n }\n //if the player landed on go to jail\n else if(newPlayerPosition == 30)\n {\n result = 2;\n }\n //if the player moved normally\n else\n {\n result = 0;\n }\n //set the player at the new position\n m_currentPlayers.get(a_playerNum - 1).setPlayerPosition(newPlayerPosition);\n return result;\n }", "public int roll() {\n Random random = new Random();\n faceValue = random.nextInt(sides)+1;\n return faceValue;\n }", "int RollDice ()\n {\n\tint roll = (int) (Math.random () * 6) + 1;\n\treturn roll;\n }", "public int Turn (int score)\n {\n\tint roll = RollDice ();\n\tif (roll == score + 1)\n\t{\n\t speed (45, 500, \"\\n\\nGood job! The number rolled was a: \" + roll + \"!\");\n\t DrawBeetle (score + 1);\n\t return (score + 1);\n\t}\n\n\telse\n\t{\n\t speed (45, 500, \"\\n\\nThe number rolled was a \" + roll + \" ,too bad\");\n\t return score;\n\t}\n\n\n }" ]
[ "0.70380557", "0.69892", "0.6944864", "0.6853904", "0.68521756", "0.6768379", "0.67581016", "0.67453235", "0.6723913", "0.66958183", "0.66728103", "0.66306156", "0.6626112", "0.66057885", "0.6572408", "0.6570638", "0.6544046", "0.64891744", "0.6476945", "0.6471574", "0.64341015", "0.6430462", "0.6425386", "0.64241487", "0.6419581", "0.6413724", "0.6403451", "0.64023167", "0.6396689", "0.6372984", "0.633546", "0.6307933", "0.6300416", "0.6290922", "0.6289233", "0.6266155", "0.625884", "0.6244671", "0.6231949", "0.6218769", "0.62118685", "0.6206403", "0.6197809", "0.61944", "0.61878836", "0.61734647", "0.6172025", "0.6171792", "0.6170582", "0.616172", "0.61606514", "0.61075497", "0.6103721", "0.6094314", "0.60942096", "0.6087417", "0.6074706", "0.60645527", "0.6043795", "0.60437703", "0.6043503", "0.6038308", "0.60269374", "0.59937525", "0.5984607", "0.5981278", "0.5974237", "0.59731084", "0.59701484", "0.5964756", "0.59645325", "0.5960584", "0.59595764", "0.59538275", "0.5948682", "0.5942373", "0.5938508", "0.593776", "0.5934677", "0.59294593", "0.59208816", "0.59135354", "0.5891712", "0.58916944", "0.5886852", "0.58511883", "0.58474", "0.5844749", "0.5841952", "0.5841768", "0.58371204", "0.5813047", "0.5809097", "0.5805133", "0.57929736", "0.57928765", "0.57820505", "0.57577217", "0.5749545", "0.57436764" ]
0.7119382
0
this method rolls the dices and returns the sum of them.
public int roll(int dices){ int faces[] = new int[dices]; int total = 0; Dice dice = new Dice(); for(int i = 0; i < dices; i++){ faces[i] = (dice.rand.nextInt(6) + 1); } for(int i = 0; i < faces.length-1; i++){ if(faces[i] != faces[i+1]){ this.isDouble = false; break; } else{ this.isDouble = true; } } if(this.isDouble == true){ this.twiceCounter++; } for(int i = 1; i < faces.length+1; i++){ System.out.print("The " + i + ". dice: " + faces[i-1] + " "); total += faces[i-1]; } System.out.println(" and the sum is " + total); return total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int roll() \r\n {\r\n \r\n die1FaceValue = die1.roll();\r\n die2FaceValue = die2.roll();\r\n \r\n diceTotal = die1FaceValue + die2FaceValue;\r\n \r\n return diceTotal;\r\n }", "public void rollAllDices() {\n for(int i = 0; i < dicesList.size(); i++) {\n dicesList.get(i).roll();\n }\n }", "public int rollDice() {\n\t\td1 = r.nextInt(6) + 1;\n\t\td2 = r.nextInt(6) + 1;\n\t\trepaint();\n\t\treturn d1 + d2;\n\t}", "public int diceSum(Die[] dice) {\n int sum = 0;\n for (Die d : dice) {\n sum += d.getFace();\n }\n return sum;\n }", "public int roll()\r\n\t{\r\n\t return die1.roll() + die2.roll();\r\n \t}", "public int rollDice() {\n\t\td1 = (int)rand.nextInt(6)+1;\n\t\td2 = (int)rand.nextInt(6)+1;\n\t\treturn d1+d2;\n\t}", "public int rollDice();", "public int getDiceTotal()\r\n {\r\n return diceTotal;\r\n }", "public int rollDice(){\r\n\t\tString playerResponse;\r\n\t\tplayerResponse=JOptionPane.showInputDialog(name+\". \"+\"Type anything to roll\");\r\n\t\t//System.out.println(name+\"'s response: \"+playerResponse);\r\n\t\tdice1=(int)(Math.random() * ((6 - 1) + 1)) + 1;\r\n\t\tdice2=(int)(Math.random() * ((6 - 1) + 1)) + 1;\r\n\t\tdicetotal=dice1+dice2;\r\n\t\tnumTurns++;\r\n\t\treturn dicetotal;\r\n\t}", "@Override\r\n\tpublic int rollDice() {\n\t\treturn 0;\r\n\t}", "public static int diceRoll(){\n Random rd = new Random();\n int dice1, dice2;\n\n dice1 = rd.nextInt(6) + 1; //assigns random integer between 1 and 6 inclusive to dice 1\n dice2 = rd.nextInt(6) + 1; //assigns random integer between 1 and 6 inclusive to dice 2\n\n System.out.println(\"You rolled \" + dice1 + \" + \" + dice2 + \" = \" + (dice1+dice2)); //print result\n\n return dice1 + dice2; //returns sum of dice rolls\n\n }", "void rollDice();", "public void Roll() // Roll() method\n {\n // Roll the dice by setting each of the dice to be\n // \ta random number between 1 and 6.\n die1Rand = (int)(Math.random()*6) + 1;\n die2Rand = (int)(Math.random()*6) + 1;\n }", "private int diceRoll(int sides) {\n return (int) ((Math.random() * sides) + 1);\n }", "public int getDice(){\n\t\treturn diceValue;\n\t\t\n\t}", "public int sumDice(Die[] dice, int value){\n int subTotal = 0;\n\n // facevalue is getting the dice now\n for(Die die: dice){\n int facevalue = die.getFaceValue();\n\n // If facevalue equals to the value then subtotal will be returnable as long as there is a matched int\n if(facevalue == value){\n\n\n // subTotal will be greater or equals to faceValue then\n subTotal += facevalue;\n }}return subTotal;}", "public static int rollDice()\n\t{\n\t\tint roll = (int)(Math.random()*6)+1;\n\t\t\n\t\treturn roll;\n\n\t}", "int RollDice ()\n {\n\tint roll = (int) (Math.random () * 6) + 1;\n\treturn roll;\n }", "public ArrayList<Dice> rollAllDice()\n {\n ArrayList<Dice> array = getDiceArray();\n for(Dice dice : array)\n {\n if(dice.getReroll())\n {\n dice.rollDice();\n dice.setReroll(false, \"\"); //resets all reroll flags to false\n }\n }\n \n return array;\n }", "public static int rollDice(){\n return (int)(Math.random()*6) + 1;\n // Math.random returns a double number >=0.0 and <1.0\n }", "public void throwDices() throws DiceException {\n /**generator of random numbers(in this case integer numbers >1)*/\n Random generator = new Random();\n /**mode of logic*/\n String mode = this.getMode();\n\n if (!mode.equals(\"sum\") && !mode.equals(\"max\")) {\n throw new DiceException(\"Wrong throw mode!!! Third argument should be 'max' or 'sum'!\");\n } else if (this.getNumOfDices() < 1) {\n throw new DiceException(\"Wrong numeber of dices!!! Number of dices should equals 1 or more!\");\n } else if (this.getNumOfWalls() < 4) {\n throw new DiceException(\"Wrong numeber of walls!!! Number of walls should equals 4 or more!\");\n } else {\n if (mode.equals(\"sum\")) {\n for (int i = 0; i < this.getNumOfDices(); i++) {\n result += (generator.nextInt(this.getNumOfWalls()) + 1);\n }\n } else if (mode.equals(\"max\")) {\n for (int i = 0; i < this.getNumOfDices(); i++) {\n int buff = (generator.nextInt(this.getNumOfWalls()) + 1);\n if (this.result < buff) {\n this.result = buff;\n }\n }\n }\n }\n }", "public void Diceroll()\n\t{\n\t\tdice1 = rand.nextInt(6)+1;\n\t\tdice2 = rand.nextInt(6)+1;\n\t\ttotal = dice1+dice2;\n\t}", "public int setRollResult(int diceAmount, int diceSides) {\n\t\tint result = 0;\n\t\tfor (int i = 0; i < diceAmount; i++) {\n\t\t\tresult += diceBag.rollDice(diceSides);\n\t\t}\n\t\treturn result;\n\t}", "public int rollDice()\n{\n int die1, die2, sum; \n\n // pick random die values\n die1 = 1 + ( int ) ( Math.random() * 6 );\n die2 = 1 + ( int ) ( Math.random() * 6 );\n\n sum = die1 + die2; // sum die values\n\n // display results\n die1Field.setText( Integer.toString( die1 ) );\n die2Field.setText( Integer.toString( die2 ) );\n sumField.setText( Integer.toString( sum ) );\n\n return sum; // return sum of dice\n\n\n}", "public int roll() {\n int result = ThreadLocalRandom.current().nextInt(SIDES+1) + 1;// standard 1-7\n if(result == 7){ //LoadedDie 6 occurs twice as often\n return 6;\n } else{\n return result;\n }\n }", "public abstract int rollDice();", "public static int diceRoll() {\n Random roller = new Random();//Create a random number generator\r\n return roller.nextInt(6) + 1;//Generate a number between 0-5 and add 1 to it\r\n }", "public void rollDie(){\r\n\t\tthis.score = score + die.roll();\r\n\t}", "public static int diceRoll() {\n\t\t\n\t\t//the outcome of the die is stored as an integer and returned\n\t\t\n\t\tint diceNumber = (int)((6 * (Math.random())) + 1);\n\t\treturn diceNumber;\n\t}", "public Dice getDice() {\n return dice;\n }", "public int diceValue()\r\n\t{\r\n\t\treturn rollNumber;\r\n\t}", "public int roll()\n {\n int r = (int)(Math.random() * sides) + 1;\n return r;\n }", "public int roll() {\n this.assuerNN_random();\n //Roll once\n int result = random.nextInt(this.sides)+1;\n //TODO Save the roll somewhere\n\n //Return the roll\n return result;\n }", "public String rollResult() {\n\t\treturn String.format(\"Your rolled a %s and a %s, giving a sum of %s\", die1.getFaceValue(), die2.getFaceValue(),\n\t\t\t\tsumOfDies());\n\t}", "public int getHeightRoll() {\n\t\tint result = 0;\n\t\tRaces racesDropDownText = (Races) race.getSelectedItem();\n\t\tString stringDropDownText = (String) gender.getSelectedItem();\n\n\t\tif (racesDropDownText.equals(Races.DWARF)) {\n\t\t\tif (stringDropDownText.equals(\"Female\")) {\n\t\t\t\tresult = setRollResult(Races.DWARF.getHeightDiceAmount(), Races.DWARF.getFemaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.DWARF.getBaseFemaleHeight();\n\t\t\t} else if (stringDropDownText.equals(\"Male\")) {\n\t\t\t\tresult = setRollResult(Races.DWARF.getHeightDiceAmount(), Races.DWARF.getMaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.DWARF.getBaseMaleHeight();\n\t\t\t}\n\t\t} else if (racesDropDownText.equals(Races.ELF)) {\n\t\t\tif (stringDropDownText.equals(\"Female\")) {\n\t\t\t\tresult = setRollResult(Races.ELF.getHeightDiceAmount(), Races.ELF.getFemaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.ELF.getBaseFemaleHeight();\n\t\t\t} else if (stringDropDownText.equals(\"Male\")) {\n\t\t\t\tresult = setRollResult(Races.DWARF.getHeightDiceAmount(), Races.DWARF.getMaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.ELF.getBaseMaleHeight();\n\t\t\t}\n\t\t} else if (racesDropDownText.equals(Races.GNOME)) {\n\t\t\tif (stringDropDownText.equals(\"Female\")) {\n\t\t\t\tresult = setRollResult(Races.GNOME.getHeightDiceAmount(), Races.GNOME.getFemaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.GNOME.getBaseFemaleHeight();\n\t\t\t} else if (stringDropDownText.equals(\"Male\")) {\n\t\t\t\tresult = setRollResult(Races.GNOME.getHeightDiceAmount(), Races.GNOME.getMaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.GNOME.getBaseMaleHeight();\n\t\t\t}\n\t\t} else if (racesDropDownText.equals(Races.HALFELF)) {\n\t\t\tif (stringDropDownText.equals(\"Female\")) {\n\t\t\t\tresult = setRollResult(Races.HALFELF.getHeightDiceAmount(), Races.HALFELF.getFemaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.HALFELF.getBaseFemaleHeight();\n\t\t\t} else if (stringDropDownText.equals(\"Male\")) {\n\t\t\t\tresult = setRollResult(Races.HALFELF.getHeightDiceAmount(), Races.HALFELF.getMaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.HALFELF.getBaseMaleHeight();\n\t\t\t}\n\t\t} else if (racesDropDownText.equals(Races.HALFORC)) {\n\t\t\tif (stringDropDownText.equals(\"Female\")) {\n\t\t\t\tresult = setRollResult(Races.HALFORC.getHeightDiceAmount(), Races.HALFORC.getFemaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.HALFORC.getBaseFemaleHeight();\n\t\t\t} else if (stringDropDownText.equals(\"Male\")) {\n\t\t\t\tresult = setRollResult(Races.HALFORC.getHeightDiceAmount(), Races.HALFORC.getMaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.HALFORC.getBaseMaleHeight();\n\t\t\t}\n\t\t} else if (racesDropDownText.equals(Races.HALFLING)) {\n\t\t\tif (stringDropDownText.equals(\"Female\")) {\n\t\t\t\tresult = setRollResult(Races.HALFLING.getHeightDiceAmount(), Races.HALFLING.getFemaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.HALFLING.getBaseFemaleHeight();\n\t\t\t} else if (stringDropDownText.equals(\"Male\")) {\n\t\t\t\tresult = setRollResult(Races.HALFLING.getHeightDiceAmount(), Races.HALFLING.getMaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.HALFLING.getBaseMaleHeight();\n\t\t\t}\n\t\t} else if (racesDropDownText.equals(Races.HUMAN)) {\n\t\t\tif (stringDropDownText.equals(\"Female\")) {\n\t\t\t\tresult = setRollResult(Races.HUMAN.getHeightDiceAmount(), Races.HUMAN.getFemaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.HUMAN.getBaseFemaleHeight();\n\t\t\t} else if (stringDropDownText.equals(\"Male\")) {\n\t\t\t\tresult = setRollResult(Races.HUMAN.getHeightDiceAmount(), Races.HUMAN.getMaleHeightDiceSides())\n\t\t\t\t\t\t+ Races.HUMAN.getBaseMaleHeight();\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "public Dice getDice() {\n return this.dice;\n }", "public static int OneDice( int rTotal ) // Static method\n {\n \tint rollTotal = rTotal;\n \treturn rollTotal * 2;\n }", "public void roll()\r\n\t{\r\n\t\tRandom rand = new Random();\r\n\r\n\t\trollNumber = rand.nextInt(numOfSides) + 1;\r\n\t}", "float getRoll();", "float getRoll();", "public void rollDices(Dice dice1, Dice dice2) {\n\n while (true) {\n // click to roll\n dice1.rollDice();\n dice2.rollDice();\n setSum(dice1, dice2);\n\n // if(roll == pN)\n // player and npcs that bet 1 win\n if (sum == pN) {\n player.playerWin();\n System.out.println(\"You rolled \" + sum + WINMESSAGE +\n \"\\nYou have a total of \" + player.getWins() + \" wins and \"\n + player.getLoses() + \" loses.\");\n break;\n }\n // if(roll == out7)\n else if (sum == OUT7) {\n player.playerLose();\n System.out.println(\"You hit the out 7.\" + LMESSAGE + \"\\nYou have a total of \" + player.getWins()\n + \" wins and \" + player.getLoses() + \" loses.\");\n\n break;\n } else {\n System.out.println(\"\\nYour total roll is \" + sum + \"\\nYou need to hit \" + pN +\n \" to win.\" + \"\\n\\nContinue rolling\\n\");\n }\n\n\n }\n\n }", "public int sum()\r\n {\r\n return die1.getFaceValue() + die2.getFaceValue();\r\n }", "public static void roll()\n {\n Random no = new Random();\n Integer dice = no.nextInt(7);\n System.out.println(dice);\n }", "public int rollDie() {\n\t\treturn (int) (Math.random()*6)+1;\n\t}", "public int getWeightRoll() {\n\t\tint result = 0;\n\t\tRaces racesDropDownText = (Races) race.getSelectedItem();\n\t\tString stringDropDownText = (String) gender.getSelectedItem();\n\n\t\tif (racesDropDownText.equals(Races.DWARF)) {\n\t\t\tif (stringDropDownText.equals(\"Female\")) {\n\t\t\t\tresult = (setRollResult(Races.DWARF.getWeightDiceAmount(), Races.DWARF.getFemaleWeightDiceSides())\n\t\t\t\t\t\t* Races.DWARF.getWeightMultiplier() + Races.DWARF.getBaseFemaleWeight());\n\t\t\t} else if (stringDropDownText.equals(\"Male\")) {\n\t\t\t\tresult = (setRollResult(Races.DWARF.getWeightDiceAmount(), Races.DWARF.getMaleWeightDiceSides())\n\t\t\t\t\t\t* Races.DWARF.getWeightMultiplier() + Races.DWARF.getBaseMaleWeight());\n\t\t\t}\n\t\t} else if (racesDropDownText.equals(Races.ELF)) {\n\t\t\tif (stringDropDownText.equals(\"Female\")) {\n\t\t\t\tresult = (setRollResult(Races.ELF.getWeightDiceAmount(), Races.ELF.getFemaleWeightDiceSides())\n\t\t\t\t\t\t* Races.ELF.getWeightMultiplier() + Races.ELF.getBaseFemaleWeight());\n\t\t\t} else if (stringDropDownText.equals(\"Male\")) {\n\t\t\t\tresult = (setRollResult(Races.DWARF.getWeightDiceAmount(), Races.DWARF.getMaleWeightDiceSides())\n\t\t\t\t\t\t* Races.ELF.getWeightMultiplier() + Races.ELF.getBaseMaleWeight());\n\t\t\t}\n\t\t} else if (racesDropDownText.equals(Races.GNOME)) {\n\t\t\tif (stringDropDownText.equals(\"Female\")) {\n\t\t\t\tresult = (setRollResult(Races.GNOME.getWeightDiceAmount(), Races.GNOME.getFemaleWeightDiceSides())\n\t\t\t\t\t\t* Races.GNOME.getWeightMultiplier() + Races.GNOME.getBaseFemaleWeight());\n\t\t\t} else if (stringDropDownText.equals(\"Male\")) {\n\t\t\t\tresult = (setRollResult(Races.GNOME.getWeightDiceAmount(), Races.GNOME.getMaleWeightDiceSides())\n\t\t\t\t\t\t* Races.GNOME.getWeightMultiplier() + Races.GNOME.getBaseMaleWeight());\n\t\t\t}\n\t\t} else if (racesDropDownText.equals(Races.HALFELF)) {\n\t\t\tif (stringDropDownText.equals(\"Female\")) {\n\t\t\t\tresult = (setRollResult(Races.HALFELF.getWeightDiceAmount(), Races.HALFELF.getFemaleWeightDiceSides())\n\t\t\t\t\t\t* Races.HALFELF.getWeightMultiplier() + Races.HALFELF.getBaseFemaleWeight());\n\t\t\t} else if (stringDropDownText.equals(\"Male\")) {\n\t\t\t\tresult = (setRollResult(Races.HALFELF.getWeightDiceAmount(), Races.HALFELF.getMaleWeightDiceSides())\n\t\t\t\t\t\t* Races.HALFELF.getWeightMultiplier() + Races.HALFELF.getBaseMaleWeight());\n\t\t\t}\n\t\t} else if (racesDropDownText.equals(Races.HALFORC)) {\n\t\t\tif (stringDropDownText.equals(\"Female\")) {\n\t\t\t\tresult = (setRollResult(Races.HALFORC.getWeightDiceAmount(), Races.HALFORC.getFemaleWeightDiceSides())\n\t\t\t\t\t\t* Races.HALFORC.getWeightMultiplier() + Races.HALFORC.getBaseFemaleWeight());\n\t\t\t} else if (stringDropDownText.equals(\"Male\")) {\n\t\t\t\tresult = (setRollResult(Races.HALFORC.getWeightDiceAmount(), Races.HALFORC.getMaleWeightDiceSides())\n\t\t\t\t\t\t* Races.HALFORC.getWeightMultiplier() + Races.HALFORC.getBaseMaleWeight());\n\t\t\t}\n\t\t} else if (racesDropDownText.equals(Races.HALFLING)) {\n\t\t\tif (stringDropDownText.equals(\"Female\")) {\n\t\t\t\tresult = (setRollResult(Races.HALFLING.getWeightDiceAmount(), Races.HALFLING.getFemaleWeightDiceSides())\n\t\t\t\t\t\t* Races.HALFLING.getWeightMultiplier() + Races.HALFLING.getBaseFemaleWeight());\n\t\t\t} else if (stringDropDownText.equals(\"Male\")) {\n\t\t\t\tresult = (setRollResult(Races.HALFLING.getWeightDiceAmount(), Races.HALFLING.getMaleWeightDiceSides())\n\t\t\t\t\t\t* Races.HALFLING.getWeightMultiplier() + Races.HALFLING.getBaseMaleWeight());\n\t\t\t}\n\t\t} else if (racesDropDownText.equals(Races.HUMAN)) {\n\t\t\tif (stringDropDownText.equals(\"Female\")) {\n\t\t\t\tresult = (setRollResult(Races.HUMAN.getWeightDiceAmount(), Races.HUMAN.getFemaleWeightDiceSides())\n\t\t\t\t\t\t* Races.HUMAN.getWeightMultiplier() + Races.HUMAN.getBaseFemaleWeight());\n\t\t\t} else if (stringDropDownText.equals(\"Male\")) {\n\t\t\t\tresult = (setRollResult(Races.HUMAN.getWeightDiceAmount(), Races.HUMAN.getMaleWeightDiceSides())\n\t\t\t\t\t\t* Races.HUMAN.getWeightMultiplier() + Races.HUMAN.getBaseMaleWeight());\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "public int roll(){\r\n myFaceValue = (int)(Math.random() * myNumSides) + 1;\r\n return myFaceValue;\r\n }", "public int roll_the_dice() {\n Random r = new Random();\n int number = r.nextInt(6) + 1;\n\n return number;\n }", "private void diceSum(int dice, int desiredSum) {\r\n\t\tdiceSumHelper(dice, desiredSum, 0, new ArrayList<Integer>());\r\n\t\tSystem.out.println(calls);\r\n\t}", "public int roll() {\n Random random = new Random();\n faceValue = random.nextInt(sides)+1;\n return faceValue;\n }", "public int sumCalories() {\n int calories = 0;\n\n for (Food f : units) {\n calories += f.getCalories();\n }\n\n return calories;\n }", "public static int calcScoreLow(ArrayList<Dice> dices) {\n\n int[] arr = convertDiceValueArray(dices);\n int sum = 0;\n for (int i = 0; i < arr.length; i++) {\n\n if (arr[i] <= SCORE_LOW) {\n sum += arr[i];\n }\n }\n Log.d(\"SCORECALC\", String.valueOf(sum));\n return sum;\n }", "public static ArrayList<Integer> diceFrequency(int roll)\r\n {\r\n // variables\r\n Dice dice;\r\n int diceRoll;\r\n \r\n // program code\r\n dice = new Dice();\r\n \r\n ArrayList<Integer> frequency;\r\n frequency = new ArrayList<Integer> ();\r\n \r\n for (int i = 0; i < 11; i++)\r\n frequency.add(0);\r\n\r\n // roll the dice until the limit\r\n for (int i = 1; i <= roll; i++)\r\n {\r\n diceRoll = dice.rollDice();\r\n frequency.set(diceRoll - 2, frequency.get(diceRoll - 2) +1 ); \r\n }\r\n return frequency;\r\n }", "public void setSum(Dice dice1, Dice dice2) {\n sum = dice1.getValue() + dice2.getValue();\n }", "public void throwDice() {\r\n\t\tfor( DiceGroup diceGroup:dice.values() ) {\r\n\t\t\tdiceGroup.throwDice(); //.setResult( (int) Math.random()*die.getSize() + 1);\r\n\t\t}\r\n\t}", "private int rollDie() {\r\n final SecureRandom random = new SecureRandom();\r\n return random.nextInt(6 - 1) + 1;\r\n }", "public String play() \r\n { \r\n \r\n theDiceTotal = dice.roll();\r\n \r\n while ( theDiceTotal != 12 )\r\n { \r\n theDiceTotal = dice.roll();\r\n System.out.println( dice.getDie1FaceValue() + \" \" + dice.getDie2FaceValue() );\r\n count++;\r\n }\r\n \r\n return ( count - 1 ) + \" dice rolled.\"; \r\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tint[] totals = new int[11];\r\n\t\tint dice;\r\n\t\tint diceTwo;\r\n\t\tint total;\r\n\r\n\t\t\r\n\r\n\t\tfor (int i = 0; i < 10000; i++) {\r\n\t\t\tdice = (int) (Math.random() * 6) + 1;\r\n\t\t\tdiceTwo = (int) (Math.random() * 6) + 1;\r\n\t\t\ttotal = dice + diceTwo; \r\n\t\t\tif (total == 2) {\r\n\r\n\t\t\t\ttotals[0]++;\r\n\t\t\t}\r\n\r\n\t\t\telse if (total == 3) {\r\n\r\n\t\t\t\ttotals[1]++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (total == 4) {\r\n\r\n\t\t\t\ttotals[2]++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (total == 5) {\r\n\r\n\t\t\t\ttotals[3]++;\r\n\t\t\t}\r\n\t\t\telse if (total == 6) {\r\n\r\n\t\t\t\ttotals[4]++;\r\n\t\t\t}\r\n\t\t\telse if (total == 7) {\r\n\r\n\t\t\t\ttotals[5]++;\r\n\t\t\t}\r\n\t\t\telse if (total == 8) {\r\n\r\n\t\t\t\ttotals[6]++;\r\n\t\t\t}\r\n\t\t\telse if (total == 9) {\r\n\r\n\t\t\t\ttotals[7]++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (total == 10) {\r\n\r\n\t\t\t\ttotals[8]++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (total == 11) {\r\n\r\n\t\t\t\ttotals[9]++;\r\n\t\t\t}\r\n\t\t\telse if (total == 12) {\r\n\r\n\t\t\t\ttotals[10]++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Total - Number of Rolls\");\r\n\t\tSystem.out.println(\"2 \" + totals[0] );\r\n\t\tSystem.out.println(\"3 \" + totals[1] );\r\n\t\tSystem.out.println(\"4 \" + totals[2] );\r\n\t\tSystem.out.println(\"5 \" + totals[3] );\r\n\t\tSystem.out.println(\"6 \" + totals[4] );\r\n\t\tSystem.out.println(\"7 \" + totals[5] );\r\n\t\tSystem.out.println(\"8 \" + totals[6] );\r\n\t\tSystem.out.println(\"9 \" + totals[7] );\r\n\t\tSystem.out.println(\"10 \" + totals[8] );\r\n\t\tSystem.out.println(\"11 \" + totals[9] );\r\n\t\tSystem.out.println(\"12 \" + totals[10] );\r\n\t}", "public static int diceRoll() {\n int max = 20;\n int min = 1;\n int range = max - min + 1;\n int rand = (int) (Math.random() * range) + min;\n return rand;\n }", "public int roll() {\n Random r;\n if (hasSeed) {\n r = new Random();\n }\n else {\n r = new Random();\n }\n prevRoll = r.nextInt(range) + 1;\n return prevRoll;\n }", "private void otherRolls() {\n\t\t// program tells that player should select dices to re-roll.\n\t\tdisplay.printMessage(\"Select the dice you wish to re-roll and click \"\n\t\t\t\t+ '\\\"' + \"Roll Again\" + '\\\"');\n\t\t// program will wait until player clicks \"roll again\" button.\n\t\tdisplay.waitForPlayerToSelectDice();\n\t\t// we randomly get six integers, from one to six, and we do it N_DICE\n\t\t// times and every time we write our random integer in the array.\n\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\tif (display.isDieSelected(i) == true) {\n\t\t\t\tint dice = rgen.nextInt(1, 6);\n\t\t\t\tdiceResults[i] = dice;\n\t\t\t}\n\t\t}\n\t\t// program will display dice, that depends on our randomly taken\n\t\t// integers.\n\t\tdisplay.displayDice(diceResults);\n\t}", "public void rollCup()\n {\n die1.rolldice();\n die2.rolldice();\n gui.setDice(die1.getFacevalue(), die2.getFacevalue());\n }", "public KualiDecimal getCoinTotal(CashDrawer drawer);", "public int getSum()\n {\n return die1.getFacevalue() + die2.getFacevalue();\n }", "public int roll() {\n if(!debug)\n this.result = random.nextInt(6) + 1;\n else{\n scanner = new Scanner(showInputDialog(\"Enter dice value (1-6):\"));\n try{int res = scanner.nextInt()%7;\n this.result = res!=0? res:6;\n }\n catch(NoSuchElementException ne){this.result=6;} \n }\n return this.result;\n }", "public void rollDice() {\n try {\n if (numOfDices != Integer.parseInt(numOfDicesText.getText().toString())) {\n init();\n }\n }\n catch (Exception e) {\n System.out.println(e);\n numOfDicesText.setText(\"1\");\n init();\n }\n int rolledNumber;\n for (int i = 0; i < numOfDices; i++) {\n rolledNumber = dices.get(i).roll();\n textViews.get(i).setText(\"Dice \" + (i+1) + \" rolled a \" + rolledNumber);\n imageViews.get(i).setImageBitmap(DiceImages.getImage(rolledNumber));\n }\n }", "public static void main(String[] args) {\n CDice dice = new CDice();\n dice.init(1, 2, 3, 4, 5, 6);\n int random = dice.roll();\n System.out.println(\"dice roll side number: \"+random);\n }", "private static void roll()\n {\n rand = (int)(((Math.random())*6)+1); // dice roll #1\n rand2 = (int)(((Math.random())*6)+1);// dice roll #2\n }", "public Integer rollAndSum() {\n return null;\n }", "private void rollDie() {\n if (mTimer != null) {\n mTimer.cancel();\n }\n mTimer = new CountDownTimer(1000, 100) {\n public void onTick(long millisUntilFinished) {\n die.roll();\n showDice();\n }\n public void onFinish() {\n afterRoll();\n }\n }.start();\n }", "public Dice addDice (Dice diceToAdd){\n dicesList.add(diceToAdd);\n diceIterator = dicesList.listIterator();\n return diceToAdd;\n }", "private BigInteger computeTotalWays(){\n Map<BigInteger, Integer> sumdices = new ConcurrentHashMap<>();\n dice.stream()\n .map( die -> new BigInteger(die.getSides().toString()) )\n .forEach((c) -> {\n sumdices.compute(c, (k,v) -> {return v == null ? 1 : v + 1; });\n });\n \n // How many ways to roll a die are in total.\n return sumdices.entrySet().stream()\n .map(e -> { return e.getKey().pow(e.getValue()); })\n .reduce(BigInteger.ZERO, (a,b) -> a.add(b) );\n \n }", "static public void showDice(List<Die> dice) {\n System.out.println(\"----Your Hand----\");\n for (var die : dice) {\n System.out.print(die.getNumberOnDie() + \" \");\n }\n System.out.println(\"\\n\");\n }", "public void comeOutRoll(Dice dice1, Dice dice2) {\n\n setExit(false);\n System.out.println(\"***This is the come out roll***\" +\n \"\\nIf you roll 7 or 11 you win.\\nBut if you roll 2,3 or 12\" +\n \" you lose.\");\n dice1.rollDice();\n dice2.rollDice();\n setSum(dice1, dice2);\n\n // if (winCon.contains(roll)) player wins, npcs that bet 1 wins\n\n if (sum == OUT7 || sum == 11) {\n player.playerWin();\n System.out.println(\"Your total is \" + sum + WINMESSAGE +\n \"\\nYou have a total of \" + player.getWins() + \" wins and \"\n + player.getLoses() + \" loses.\");\n setExit(true);\n\n }\n // if (failCon.contains(roll)) player loses, npcs with bet 2 wins\n else if (sum == 2 || sum == 3 || sum == 12) {\n player.playerLose();\n System.out.println(\"Your total is \" + sum + LMESSAGE + \"\\nYou have a total of \" + player.getWins() + \" wins and \"\n + player.getLoses() + \" loses.\");\n\n setExit(true);\n\n }\n // else set pN // cannot be winCon or failCon\n else {\n System.out.println(\"\\nYour total is \" + sum + \" this is your point number, hit this to win\");\n setPN(sum);\n }\n }", "public void rollStats() {\n\t\tRandom roll = new Random();\n\t\tint rolled;\n\t\tint sign;\n\t\t\n\t\t\n\t\trolled = roll.nextInt(4);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetMaxHealth(getMaxHealth() + rolled*(getDifficulty()+5/5));\n\t\t\tsetHealth(getMaxHealth());\n\t\t} else {\n\t\t\tsetMaxHealth(getMaxHealth() - rolled*(getDifficulty()+5/5));\n\t\t\tsetHealth(getMaxHealth());\n\t\t}\n\t\t\n\t\trolled = roll.nextInt(2);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetAttack(getAttack() + rolled*(getDifficulty()+5/5));\n\t\t} else {\n\t\t\tsetAttack(getAttack() - rolled*(getDifficulty()+5/5));\n\t\t}\n\t\t\n\t\trolled = roll.nextInt(2);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetDefense(getDefense() + rolled*(getDifficulty()+5/5));\n\t\t} else {\n\t\t\tsetDefense(getDefense() - rolled*(getDifficulty()+5/5));\n\t\t}\n\t\t\n\t\trolled = roll.nextInt(2);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetSpeed(getSpeed() + rolled*(getDifficulty()+5/5));\n\t\t} else {\n\t\t\tsetSpeed(getSpeed() - rolled*(getDifficulty()+5/5));\n\t\t}\n\t\t\n\t}", "public int getDiceRollCount() {\n return this.diceRollCount;\n }", "@Override\n\tpublic double getCost() {\n\t\tcost = roll.getCost();\n\t\tif(roll.getType().equals(\"egg\")) {\n\t\t\tcost+=0.40;\n\t\t}else if(roll.getType().equals(\"jelly\")) {\n\t\t\tcost+=0.20;\n\t\t}else if(roll.getType().equals(\"pastry\")) {\n\t\t\tcost+=1.20;\n\t\t}else if(roll.getType().equals(\"sausage\")) {\n\t\t\tcost+=0.75;\n\t\t}else {\n\t\t\tcost+=0.10;\n\t\t}\n\t\t\n\t\t\t\n\t\treturn cost;\n\t\t\n\t}", "private void firstRoll(int playerName) {\n\t\t// we randomly get six integers, from one to six, and we do it N_DICE\n\t\t// times and every time we write our random integer in the array.\n\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\tint dice = rgen.nextInt(1, 6);\n\t\t\tdiceResults[i] = dice;\n\t\t}\n\t\t// program will tell witch players turn it is.\n\t\tdisplay.printMessage(playerNames[playerName - 1]\n\t\t\t\t+ \"'s turn! Click the \" + '\\\"' + \"Roll Dice\" + '\\\"'\n\t\t\t\t+ \" button to roll the dice.\");\n\t\t// program will wait until player clicks \"roll dice\" button.\n\t\tdisplay.waitForPlayerToClickRoll(playerName);\n\t\t// program will display dice, that depends on our randomly taken\n\t\t// integers.\n\t\tdisplay.displayDice(diceResults);\n\t}", "public int getRent(int rollSum){\n if(owner != null) {\n if (groupName == 002) {// railroad\n\n return (int) (Math.pow(2, (numberOfAGroupOwned(002) - 1))) * 25;\n\n } else if (groupName == 005) {// utilities\n\n if (numberOfAGroupOwned(005)==2) {// if they own both utilities\n\n return rollSum * 10;\n\n } else {// if they own 1 utility\n\n return rollSum * 4;\n\n }\n\n } else {//normal properties\n\n if (playerHasMonopoly() && this.numberHouses == 0) {// if they have a monopoly but no houses\n\n return this.rent[numberHouses] * 2;\n\n\n }else if(playerHasMonopoly() && this.numberHouses != 0) {// if they have a monopoly and any amount of houses\n\n return this.rent[numberHouses];\n\n } else{// if they don't have a monopoly\n\n return this.rent[numberHouses];\n\n }\n\n }\n } else{\n\n return 0;\n\n }\n\n }", "public double calcTotalCaloriesBurned() {\n double sum = 0.0;\n for (ExerciseModel exercise : exercises) {\n sum += exercise.getCalories();\n }\n\n return sum;\n }", "public String printAllDice()\n {\n String output = \"\";\n int c = 0;\n for(Dice dice : getDiceArray())\n {\n output = output + \"Dice \" + c + \": \" + dice.getDiceString() + \"\\n\";\n //System.out.println(\"Dice \" + c + \": \" + dice.getDiceString());\n c++;\n }\n output = output + \"\\n\";\n //System.out.println();\n return output;\n }", "public void roll(){\n Random rand = new Random();\n this.rollVal = rand.nextInt(this.faces) + 1;\n }", "DiceRoll modifyRoll(DiceRoll roll, Die die);", "public int roll() {\n return random.nextInt(6) + 1;\n }", "int roll();", "public void rollItems() {\n Integer dRoll = dCalc.rollPercent();\n Integer itemGroup = dCalc.getItemGrouping(dRoll);\n Integer numItems = 0;\n if (dCalc.getPrefs().isNoRepeats()) {\n numItems = (int) (dCalc.getNumItems(dRoll) * dCalc\n .getTreasureMultiplier()) + trove.size();\n } else {\n numItems = (int) (dCalc.getNumItems(dRoll) * dCalc\n .getTreasureMultiplier()) + hoard.size();\n }\n\n // If you aren't rolling mundane items, tell the user how many\n if ((itemGroup == 1) && !dCalc.getPrefs().isRollMundane()) {\n LootOutListItem mundanes = new LootOutListItem();\n mundanes.setQuantity(dCalc.getNumItems(dRoll));\n mundanes.setName(\"Mundane Items\");\n addItem(mundanes);\n } else {\n\n // Roll each Item, then add to the ArrayList.\n while ((hoard.size() < numItems) && (trove.size() < numItems)) {\n LootOutListItem item = new LootOutListItem(\n this.dCalc.rollItem(itemGroup));\n\n addItem(item);\n\n }\n }\n }", "public Dice getDice(){\r\n\t\treturn dieClass;\r\n\t}", "public Integer getNumOfDices() {\n return numOfDices;\n }", "public Dice(int numberOfDice) {\r\n for (int i = 0; i < numberOfDice; i++) {\r\n dice.add(rollDie());\r\n }\r\n sortDice();\r\n }", "public DiceFace drawDice() {\n\n if(dicesDrawn >= Settings.MAX_DICE_PER_COLOR * GameColor.values().length) throw new IllegalStateException(this.getClass().getCanonicalName() + \": Attempting to draw one more dice, but already drawn 90\");\n\n int color = random.nextInt(GameColor.values().length);\n int number = random.nextInt(6) + 1;\n GameColor[] values = GameColor.values();\n\n while(counter.get(values[color]) >= Settings.MAX_DICE_PER_COLOR){\n color = random.nextInt(GameColor.values().length);\n }\n\n counter.put(values[color], counter.get(values[color]) + 1);\n dicesDrawn += 1;\n return new DiceFace(GameColor.values()[color], number);\n\n }", "public int tossDice(){\n\t\tRandom r = new Random();\n\t\tdiceValue = r.nextInt(6)+1;\n\t\tdiceTossed = true;\n\t\treturn diceValue;\n\t}", "public int takeTurn(Dice theDice){\n \n this.turnCounter++;\n \n return(theDice.rollDice());\n \n }", "public void rollDice(int pIndex) {\n this.pIndex = pIndex;\n this.result = this.roll();\n this.isSix = this.result == 6;\n resetCoordinates();\n this.tickCounter=0;\n this.vel=1;\n this.diceRollCount++;\n }", "public static void main(String[] args) {\n\t\tRandom ricoDude = new Random();\r\n\t\tint x = ricoDude.nextInt(20) + 1;\r\n\t\t// the dice will have arange of 0-5 to make it 1-6 , + 1 to the end of it\r\n\t\t\r\n\t\tSystem.out.println(\"You rolled a: \" + x);\r\n\t\tint a = 1, b= 2,k;\r\n\t\tk = a + b + a++ + b++;\r\n\t\tSystem.out.println(k);\r\n\t\t\r\n\t}", "public void roll() {\n\t\tthis.currentValue = ThreadLocalRandom.current().nextInt(1, this.numSides + 1);\n\t}", "public static int rollFairDie(){\n\t\t\n\t\tdouble rand = Math.random();\n\t\tint roll = (int) (rand * 6); // [0,5] what above code does.\n\t\treturn roll + 1;\n\t}", "public static int rollDie() {\n int n = ThreadLocalRandom.current().nextInt(1, 7);\n return n;\n }", "public String salesPerRoll(){\n\t\tint i;\n\t\tint listSize = ordersPerRoll.size();\n\t\tRoll temp;\n\t\tString outputText;\n\t\toutputText = \"Sales Per Roll: \";\n\t\t//outputText = inventory.get(0).getRoll().getType() + \" Roll Current stock: \" + inventory.get(0).getStock();\n\t\tfor(i = 0; i < listSize; i++){\n\t\t\tif(i % 3 == 0){\n\t\t\t\toutputText = outputText + \"\\n\";\n\t\t\t}\n\t\t\toutputText = outputText + ordersPerRoll.get(i).getRoll().getType() + \"s : \" + ordersPerRoll.get(i).getStock() + \" \";\n\t\t}\n\t\t//System.out.println(outputText);\n\t\treturn outputText;\n\t}", "void rollNumber(int d1, int d2);", "public int rollResult(){\r\n return rand.nextInt(6) + 1;\r\n }", "public String throwDice() {\n if (timesThrown < 3) {\n for (Die die : dice) {\n if (timesThrown == 0) {\n die.setChosen(false);\n }\n if (die.getChosen() == false) {\n int random = (int) (Math.random() * 6 + 1);\n die.setValue(random);\n }\n }\n return writeTimesThrown();\n }\n return null;\n }" ]
[ "0.7620617", "0.729645", "0.728228", "0.71463865", "0.7141321", "0.7066133", "0.7006131", "0.699906", "0.6992819", "0.6966422", "0.6909282", "0.683792", "0.67473686", "0.67312753", "0.6707857", "0.66484505", "0.66428345", "0.66349244", "0.6624151", "0.66228527", "0.6602322", "0.65607023", "0.65370387", "0.6536177", "0.65061796", "0.6480242", "0.6467763", "0.6459667", "0.6365431", "0.63564247", "0.6346259", "0.63409674", "0.63135177", "0.62863666", "0.6255004", "0.6217158", "0.6184396", "0.61707574", "0.61635923", "0.61635923", "0.61563027", "0.6134946", "0.6102513", "0.610192", "0.60848254", "0.60838246", "0.60786676", "0.6072042", "0.6062534", "0.60559404", "0.60411924", "0.6039355", "0.6024984", "0.60193884", "0.6003771", "0.5998795", "0.59727585", "0.59681183", "0.5965739", "0.59646803", "0.5962681", "0.5942439", "0.59415233", "0.5932433", "0.59300756", "0.59276354", "0.59240675", "0.59046614", "0.5898938", "0.5895528", "0.58882606", "0.5880875", "0.58689916", "0.5854536", "0.5852387", "0.58442163", "0.5839821", "0.5834393", "0.58268744", "0.58200336", "0.5816345", "0.5802343", "0.5796861", "0.57956266", "0.5787964", "0.5785271", "0.57688296", "0.5767498", "0.5766952", "0.57664853", "0.5726318", "0.57207143", "0.5717936", "0.57127744", "0.57083315", "0.56884795", "0.56804967", "0.5679515", "0.56761605", "0.56695414" ]
0.785613
0
strings for original note
@Test @Order(4) public void noteTest() throws InterruptedException { String noteTitle = "Get groceries"; String noteDescription = "Need milk and eggs"; // strings for updated note String newTitle = "Fight crime"; String newDescription = "Karate is useful"; // get to login driver.get(baseUrl + "/login"); // init login page and login LoginPage loginPage = new LoginPage(driver); loginPage.login(username, password); // should be redirected to home page // webdriver gets page driver.get(baseUrl + "/home"); // init home page and add note HomePage homePage = new HomePage(driver); homePage.addNote(false, noteTitle, noteDescription); // init result page, click link to go back home ResultPage resultPage = new ResultPage(driver); // click link back to home resultPage.clickHomeAnchor(); // get first note/newly inserted note Note insertedNote = homePage.getFirstNote(); // check to see that the note was posted Assertions.assertEquals(noteTitle, insertedNote.getNoteTitle()); Assertions.assertEquals(noteDescription, insertedNote.getNoteDescription()); // edit the note homePage.addNote(true, newTitle, newDescription); // click link back to home resultPage.clickHomeAnchor(); // get first note/newly updated note Note updatedNote = homePage.getFirstNote(); Assertions.assertEquals(newTitle, updatedNote.getNoteTitle()); Assertions.assertEquals(newDescription, updatedNote.getNoteDescription()); // delete the note homePage.deleteNote(); // click link back to home resultPage.clickHomeAnchor(); // check to see if the note was deleted Assertions.assertThrows(NoSuchElementException.class, () -> homePage.getFirstNote()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String notes();", "java.lang.String getNotes();", "java.lang.String getNotes();", "String note();", "String getNotes();", "public java.lang.String getNotes() {\n java.lang.Object ref = notes_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n notes_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getNotes() {\n java.lang.Object ref = notes_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n notes_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getNotes() {\n java.lang.Object ref = notes_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n notes_ = s;\n }\n return s;\n }\n }", "public java.lang.String getNotes() {\n java.lang.Object ref = notes_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n notes_ = s;\n return s;\n }\n }", "protected String usaNote() {\n String testo = VUOTA;\n String tag = \"Note\";\n String ref = \"<references/>\";\n\n testo += LibWiki.setParagrafo(tag);\n testo += A_CAPO;\n testo += ref;\n testo += A_CAPO;\n testo += A_CAPO;\n\n return testo;\n }", "public String getDocumentNote();", "String get_note()\n {\n return note;\n }", "public String getNotes();", "@AutoEscape\n\tpublic String getNote();", "public String getNote(){\r\n\t\treturn note;\r\n\t}", "public com.google.protobuf.ByteString\n getNotesBytes() {\n java.lang.Object ref = notes_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n notes_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getNotesBytes() {\n java.lang.Object ref = notes_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n notes_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getNote() {\r\n return note; \r\n }", "public String getNote() {\r\n return note;\r\n }", "public String getNote() {\r\n return note;\r\n }", "public com.google.protobuf.ByteString\n getNotesBytes() {\n java.lang.Object ref = notes_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n notes_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getNotesBytes() {\n java.lang.Object ref = notes_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n notes_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getNote()\n {\n return note;\n }", "@Override\n\tpublic String getNotes() {\n\t\treturn text;\n\t}", "String getMyNoteText(MyNoteDto usernote, boolean abbreviated);", "public String getNote()\n\t{\n\t\treturn note;\n\t}", "public String getNote() {\n return note;\n }", "public String getNote() {\n return note;\n }", "public String getNote() {\n return note;\n }", "public String getNote() {\n return note;\n }", "public String getNote() {\n return note;\n }", "public String getNote() {\n return note;\n }", "public String getNote() {\n return note;\n }", "public String getNote() {\n return note;\n }", "public String getNote() {\n return note;\n }", "public String getNote() {\n return note;\n }", "public String getNote() {\n return note;\n }", "public String getNote() {\n\t\treturn note;\n\t}", "@Test\n public void testNoteToString() {\n \tassertEquals(\"string for a note\", note.toString(), \"^C'24\");\n }", "public String getNote() {\n\t\treturn _note;\n\t}", "boolean saveMyNoteText(String myNote);", "@Override public String toString(){\r\n StringBuilder output = new StringBuilder();\r\n for (Iterator<NoteToken> i = NotesList.iterator(); i.hasNext();){\r\n output.append(i.next().toString());\r\n output.append(\" \");\r\n \r\n }\r\n return output.toString();\r\n }", "public String getSpecialNotes() {\n return specialNotes;\n }", "public String fetchNoteNames() {\n\t\treturn \"NoteNames from SubClass overridden meth.MinorScale\";\n\t}", "public String getNotes() {\n return notes;\n }", "@SuppressWarnings(\"static-method\")\n\tprotected String transformInformationNotes(String text) {\n\t\tfinal String info = Strings.emptyIfNull(System.getProperty(INFO_NOTE_PATTERN_PROPERTY));\n\t\tfinal String warning = Strings.emptyIfNull(System.getProperty(WARNING_NOTE_PATTERN_PROPERTY));\n\t\tfinal String danger = Strings.emptyIfNull(System.getProperty(DANGER_NOTE_PATTERN_PROPERTY));\n\t\tif (Strings.isEmpty(info) && Strings.isEmpty(warning) && Strings.isEmpty(danger)) {\n\t\t\treturn text;\n\t\t}\n\n\t\tfinal Pattern startPattern = Pattern.compile(MARKDOWN_INFORMATION_NOTE_PATTERN1);\n\t\tfinal Pattern continuePattern = Pattern.compile(MARKDOWN_INFORMATION_NOTE_PATTERN2);\n\t\tfinal StringBuilder result = new StringBuilder();\n\t\tString currentName = null;\n\t\tStringBuilder currentNote = null;\n\t\tfor (final String line : text.split(\"\\r*\\n\\r*\")) {\n\t\t\tString newLine = null;\n\t\t\tif (currentName == null) {\n\t\t\t\tfinal Matcher matcher = startPattern.matcher(line);\n\t\t\t\tif (matcher.matches()) {\n\t\t\t\t\tcurrentName = matcher.group(1).trim();\n\t\t\t\t\tcurrentNote = new StringBuilder(matcher.group(2).trim());\n\t\t\t\t} else {\n\t\t\t\t\tcurrentName = null;\n\t\t\t\t\tcurrentNote = null;\n\t\t\t\t\tnewLine = line;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfinal Matcher matcher = continuePattern.matcher(line);\n\t\t\t\tif (matcher.matches()) {\n\t\t\t\t\tassert currentNote != null;\n\t\t\t\t\tcurrentNote.append(\" \").append(matcher.group(1).trim());\n\t\t\t\t} else {\n\t\t\t\t\tupdateBuffer(result, currentName, currentNote, info, warning, danger);\n\t\t\t\t\tcurrentName = null;\n\t\t\t\t\tcurrentNote = null;\n\t\t\t\t\tnewLine = line;\n\t\t\t\t}\n\t\t\t}\n\t\t\tupdateBuffer(result, newLine);\n\t\t}\n\t\tupdateBuffer(result, currentName, currentNote, info, warning, danger);\n\t\treturn result.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn note + \" \" + duration + (duration == 1 ? \" Quaver\" : \" Crotchet\");\n\t}", "public String getNotes() {\n return notes;\n }", "public String getNotes() {\n\t\treturn notes;\n\t}", "String getMyNoteTextByKey(Key verse);", "default String getOriginalText() {\n return meta(\"nlpcraft:nlp:origtext\");\n }", "public void setDocumentNote (String DocumentNote);", "public String getNotes() {\n\treturn notes;\n}", "public void setNote(String note);", "public void setNote(String note) {\r\n this.note = note; \r\n }", "public java.lang.String getNotes() {\n return notes;\n }", "String getCitationString();", "public void setNotes(String notes);", "void setNotes(String notes);", "String getNotesArgument() throws Exception {\n String output = \"\";\n String line = this.readLine().trim();\n\n while (!line.contains(\"[/event]\")) {\n output += line;\n line = this.readLine().trim();\n }\n\n return output;\n }", "public void setNotes(String notes) {\n\t\tthis.notes = notes;\r\n\t}", "public java.lang.String getNotes() {\r\n return localNotes;\r\n }", "public String getNote() {\n if (MetadataUGWD_Type.featOkTst && ((MetadataUGWD_Type)jcasType).casFeat_note == null)\n jcasType.jcas.throwFeatMissing(\"note\", \"de.aitools.ie.uima.type.argumentation.MetadataUGWD\");\n return jcasType.ll_cas.ll_getStringValue(addr, ((MetadataUGWD_Type)jcasType).casFeatCode_note);}", "public void getText(){\n\t\tnoteText.setText(note.getText());\n\t}", "public List<String> getFormattedNotes(){\n List formattedNotes = new ArrayList();\n for (int i = 0; i < notes.size(); i++) {\n Note n = notes.get(i);\n String noteInfo = \"Date Created: \" + n.getFormattedDate() + \" Content: \" + n.getContent();\n formattedNotes.add(noteInfo);\n }\n return formattedNotes;\n }", "public void setNotes(String notes) {\n this.notes = notes;\n }", "public void setNotes(String notes) {\n\tthis.notes = notes;\n}", "public static String convertNotation(String note){\n\t\tif(note.length() != 1){\n\t\t\tString temp = note.substring(0,1);\n\t\t\tif(note.substring(1, 2).equals(\"#\")){\n\t\t\t\tnote = noteDictionary[findInDict(temp) + 1];\n\t\t\t}\n\t\t\telse if(note.substring(1, 2).equals(\"b\")){\n\t\t\t\tnote = noteDictionary[findInDict(temp) - 1];\n\t\t\t}\n\t\t}\n\t\treturn note;\n\t}", "public void setNotes(String notes) {\n\t\tthis.notes = notes;\n\t}", "com.google.protobuf.ByteString\n getNotesBytes();", "com.google.protobuf.ByteString\n getNotesBytes();", "public void setNote(String note) {\n if(note==null){\n note=\"\";\n }\n this.note = note;\n }", "public void setNote(String note) {\r\n this.note = note;\r\n }", "public void setNotes(java.lang.String notes) {\n this.notes = notes;\n }", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "@Override\n\t\tpublic String toString()\n\t\t{\n\t\t\treturn String.format(\"#%1$d *%2$s* (%3$s@doc): %4$s\\n%5$s\",\n\t\t\t id, poster_name, poster_uid, title,\n\t\t\t mlong.replaceAll(\"</?(br|BR)( ?/)?>\", \"\").replaceAll(\"</?(p|P) ( ?/)?>\", \"\\n\")\n\t\t\t);\n\t\t}", "@Override\n\tpublic String getEditTitle() {\n\t\treturn \"Saisir des notes\";\n\t}", "private String createNote(List<SootMethod> possibleMethods) {\n\t\tif (possibleMethods.size() < 2) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t\tStringBuilder note = new StringBuilder();\r\n\r\n\t\tnote.append(\"note left \\nThe possible classes are: \\n\");\r\n\r\n\t\tfor (int i = 1; i < possibleMethods.size(); i++) {\r\n\t\t\tSootMethod tempMethod = possibleMethods.get(i);\r\n\t\t\tnote.append(tempMethod.getDeclaringClass().getName() + \"\\n\");\r\n\t\t}\r\n\r\n\t\tnote.append(\"end note\\n\");\r\n\r\n\t\treturn note.toString();\r\n\t}", "Note getBukkitNote();", "public void setNote(String note) {\r\n\r\n this.note = note;\r\n }", "public String getNotes() {\n return notes.get();\n }", "public String toString() {\n\t\treturn String.format(\"%.0f-%s note [%d]\", this.getValue(),this.getCurrency(),this.getSerial());\n\t}", "public String playGuitar(){\n\t\t String notes = \"[A(0.25), G(2), E(0.5), C(1), C(2), D(0.25), E(2), C(2), B(0.25), C(4), C(1), G(0.25),A(1), C(2), D(1),C(4)]\";\n\t\treturn notes;\n\t}", "private void setNote() {\n\t\tNoteOpt.add(\"-nd\");\n\t\tNoteOpt.add(\"/nd\");\n\t\tNoteOpt.add(\"notedetails\");\n\n\t}", "@Override\n\tpublic java.lang.String getNote() {\n\t\treturn _esfShooterAffiliationChrono.getNote();\n\t}", "public void setNote(String note) {\n this.note = note;\n }", "public void setNote(String note) {\n this.note = note;\n }", "public void setNote(String note) {\n this.note = note;\n }", "public void setNote(String note) {\n this.note = note;\n }", "public void setNote(String note) {\n this.note = note;\n }", "public void changeNotes(String a) {\r\n notes = a;\r\n }", "private String notesToString(List<Note> notesPlayingAtBeat, int beat) {\n if (notesPlayingAtBeat.size() == 0) {\n return \"\";\n }\n String padding = \" \";\n String onBeat = \" x \";\n String onDuration = \" | \";\n\n Note highest = this.getHighestNote();\n Note lowest = this.getLowestNote();\n int ordinalHighestOctave = highest.getOctave().ordinal();\n int ordinalHighestPitch = highest.getPitch().ordinal();\n int ordinalLowOctave = lowest.getOctave().ordinal();\n int ordinalLowPitch = lowest.getPitch().ordinal();\n int from = ordinalLowOctave * 12 + ordinalLowPitch;\n int to = ordinalHighestOctave * 12 + ordinalHighestPitch;\n\n List<String> listOfNotes = this.allnotes.subList(from, to + 1);\n int allNotesSize = listOfNotes.size();\n\n StringBuilder builder = new StringBuilder();\n List<String> newList = new ArrayList<>();\n\n for (int x = 0; x < allNotesSize; x++) {\n String currentNote = listOfNotes.get(x);\n\n for (int i = 0; i < notesPlayingAtBeat.size(); i++) {\n Note playingNote = notesPlayingAtBeat.get(i);\n String playingString =\n playingNote.getPitch().getValue() + playingNote.getOctave().getValue();\n\n if (playingString.equals(currentNote) && playingNote.getBeat() == beat) {\n newList.add(onBeat);\n break;\n } else if (playingString.equals(currentNote)) {\n newList.add(onDuration);\n break;\n } else if (i == notesPlayingAtBeat.size() - 1) {\n newList.add(padding);\n }\n }\n }\n\n for (int c = 0; c < newList.size(); c++) {\n builder.append(newList.get(c).toString());\n }\n\n return builder.toString();\n\n }", "String getRemark();" ]
[ "0.7660845", "0.7383761", "0.7383761", "0.7213935", "0.69301736", "0.691174", "0.6824819", "0.6796001", "0.6717753", "0.6711777", "0.66882604", "0.6640102", "0.66075414", "0.65373486", "0.65123904", "0.64608866", "0.64608866", "0.6383997", "0.6376494", "0.6376494", "0.6329486", "0.6329486", "0.6328156", "0.63268685", "0.6310189", "0.62970567", "0.6296903", "0.6296903", "0.6296903", "0.6296903", "0.6296903", "0.6296903", "0.6296903", "0.6296903", "0.6296903", "0.6296903", "0.6296903", "0.62032586", "0.6186376", "0.61744356", "0.61643404", "0.616299", "0.61619306", "0.6151539", "0.61481714", "0.6134507", "0.6122929", "0.6122102", "0.61060005", "0.60841614", "0.60725", "0.60627615", "0.60509914", "0.6043381", "0.60368824", "0.6022136", "0.6010686", "0.60044897", "0.5989484", "0.59831077", "0.5966262", "0.5964577", "0.59625113", "0.59599465", "0.595794", "0.5903605", "0.59014463", "0.5889522", "0.58868986", "0.588492", "0.588492", "0.58848375", "0.588246", "0.58751285", "0.58703774", "0.58703774", "0.58703774", "0.58703774", "0.58703774", "0.58703774", "0.58703774", "0.58703774", "0.58703774", "0.5866892", "0.5859047", "0.5852482", "0.5812903", "0.5810437", "0.57964313", "0.57956475", "0.57889533", "0.5787849", "0.5782382", "0.57810235", "0.57810235", "0.57810235", "0.57810235", "0.57810235", "0.5769922", "0.5756525", "0.5727674" ]
0.0
-1
credentials to be inserted and tested
@Test @Order(5) public void credentialsTest() { String url = "http://twitter.com/"; String username = "meepz"; String password = "spooki520boi"; // credentials to be updated String newUrl = "clubpenguin.com"; String newUsername = "fightrOfDaNightMan"; String newPassword = "milkSteak"; // signup driver.get(baseUrl + "/signup"); SignupPage signupPage = new SignupPage(driver); signupPage.signup(firstName, lastName, username, password); // get login page, init login page, login driver.get(baseUrl + "/login"); LoginPage loginPage = new LoginPage(driver); loginPage.login(username, password); driver.get(baseUrl + "/home"); // init home page, insert new credentials HomePage homePage = new HomePage(driver); homePage.addCredential(false, url, username, password); // init result page and click link back to home page // driver is automatically taken to result page after adding // credentials, etc. so no need to use driver.get(result) // just feed driver into the result page ResultPage resultPage = new ResultPage(driver); resultPage.clickHomeAnchor(); // After returning to home page, click credential tab // and grab text from first credential Credential firstCredential = homePage.getFirstCredential(); // check that hidden td's password is encrypted Assertions.assertNotEquals(password, homePage.getPasswordEnc()); // check that url and username both match what was entered Assertions.assertEquals(url, firstCredential.getUrl()); Assertions.assertEquals(username, firstCredential.getUsername()); // check that entered password and retrieved (what should be dots) don't match Assertions.assertNotEquals(password, firstCredential.getPassword()); // after clicking show button retrieve credentials again homePage.clickShowPassword(); Credential credPasswordRevealed = homePage.getFirstCredential(); // password that is now showing on page should match entered Assertions.assertNotEquals(password, firstCredential.getPassword()); // clicking show password again will hide it // check that it is hidden homePage.clickShowPassword(); Credential hiddenCredential = homePage.getFirstCredential(); Assertions.assertNotEquals(password, hiddenCredential.getPassword()); homePage.addCredential(true, newUrl, newUsername, newPassword); resultPage.clickHomeAnchor(); Credential updatedCredential = homePage.getFirstCredential(); // check to see that hidden password's text does not match entered password Assertions.assertNotEquals(password, homePage.getPasswordEnc()); Assertions.assertNotEquals(updatedCredential.getPassword(), homePage.getPasswordEnc()); Assertions.assertEquals(newUrl, updatedCredential.getUrl()); Assertions.assertEquals(newUsername, updatedCredential.getUsername()); Assertions.assertNotEquals(newPassword, updatedCredential.getPassword()); Assertions.assertEquals(newPassword, homePage.getPasswordDecrypted()); homePage.deleteCredential(); resultPage.clickHomeAnchor(); Assertions.assertThrows(NoSuchElementException.class, () -> homePage.getFirstCredential()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@BeforeAll\n\tpublic void setup() throws CredentialAlreadyExistsException {\n \t\tLocalDate now_ld = LocalDate.now();\n \t\tuser1 = new User(\"[email protected]\", \"FirstName1\", \"LastName1\", now_ld, null);\n \t\tuser2 = new User(\"[email protected]\", \"FirstName2\",\"LastName2\", now_ld, null);\n \t\t\n \t\t// Add credentials to the database to use for testing if they don't already exist.\n \t\tpassword1 = \"testuser11234\";\n \t\tpassword2 = \"testuser21234\";\n\t credentialUser = new Credential(\"testuser1\", password1, user1); \n\t credentialAdmin = new Credential(\"testuser2\", password2, user2);\n\t credentialAdmin.setUserRole(\"ROLE_ADMIN\");\n\t \n\t credentialUser = credentialService.add(credentialUser);\n\t credentialAdmin = credentialService.add(credentialAdmin); \n\t}", "@DataProvider(name = \"Authentication\")\n\t public static Object[][] credentials() {\n\t return new Object[][] { { \"testuser_1\", \"Test@123\" }, { \"testuser_2\", \"Test@1234\" }}; \n\t }", "@BeforeClass(alwaysRun = true)\r\n\tpublic void createUser() throws ParseException, SQLException, JoseException {\r\n\t\tSystem.out.println(\"******STARTING***********\");\r\n\t\tUser userInfo = User.builder().build();\r\n\t\tuserInfo.setUsername(userName);\r\n\t\tuserInfo.setPassword(\"Test@123\");\r\n\t\tsessionObj = EnvSession.builder().cobSession(config.getCobrandSessionObj().getCobSession())\r\n\t\t\t\t.path(config.getCobrandSessionObj().getPath()).build();\r\n\t\t//userHelper.getUserSession(\"InsightsEngineusers26 \", \"TEST@123\", sessionObj); \r\n\t\tuserHelper.getUserSession(userInfo, sessionObj);\r\n\t\tlong providerId = 16441;\r\n\t\tproviderAccountId = providerId;\r\n\t\tResponse response = providerAccountUtils.addProviderAccountStrict(providerId, \"fieldarray\",\r\n\t\t\t\t\"budget1_v1.site16441.1\", \"site16441.1\", sessionObj);\r\n\t\tproviderAccountId = response.jsonPath().getLong(JSONPaths.PROVIDER_ACC_ID);\r\n\t\tAssert.assertTrue(providerAccountId!=null);\r\n\t\t\r\n\t\t}", "private void injectUserCredntials(EvsWebRequest webtReqest){\r\n\t\twebtReqest.getRequestParams().put(\"userId\", evsUserCredentials.getUserId());\r\n\t\twebtReqest.getRequestParams().put(\"password\", evsUserCredentials.getPassword());\r\n\t}", "private void insertCredentials(String email, String password){\n botStyle.type(this.userName, email);\n botStyle.type(this.password, password);\n }", "public void addUserCredentials(String login, String password) throws SQLException;", "@When(\"^I insert user name \\\"(.*?)\\\" and password \\\"(.*?)\\\"$\")\r\n\tpublic void i_insert_user_name_and_password(String arg1, String arg2) throws Throwable {\n\t throw new PendingException();\r\n\t}", "public void credentials(Object cred) {\n this.cred = cred;\n }", "private void setUserCredentials() {\n ((EditText) findViewById(R.id.username)).setText(\"harish\");\n ((EditText) findViewById(R.id.password)).setText(\"11111111\");\n PayPalHereSDK.setServerName(\"stage2pph10\");\n }", "@Test\n public void testValidParameters() {\n Map params = new HashMap();\n params.put(\"provider_url\", \"http://localhost:8080/v1/oauth/tokens\");\n params.put(\"grant_type\", \"password\");\n params.put(\"client_id\", \"test_client_1\");\n params.put(\"provider_id\", \"local\");\n params.put(\"basic_username\", \"test_client_1\");\n params.put(\"basic_password\", \"test_secret\");\n params.put(\"username\", \"test_client_1\");\n params.put(\"password\", \"test_secret\");\n PasswordGrant instance = new PasswordGrant();\n Boolean expResult = true;\n Boolean result = instance.validParameters(params);\n assertEquals(expResult, result);\n \n }", "@When(\"user enter the username and password\")\n\tpublic void user_enter_the_username_and_password() {\n\t\tSystem.out.println(\"user enter the username and password\");\n\t\tdriver.findElement(By.id(\"txtUsername\")).sendKeys(\"Admin\");\n\t\tdriver.findElement(By.id(\"txtPassword\")).sendKeys(\"admin123\");\n\t \n\t}", "public void setCredentials(String username, String role, String password)\n\t{\n\t\tConnection dbConnection = null;\n\t\tPreparedStatement preparedStatement=null;\n\n\t\ttry {\t\t\t\t\n\t\t\tInteger userId = null;\n\t\t\tString pwHash = BCrypt.hashpw(password, BCrypt.gensalt()); \n\n\t\t\tString configUrlQuery = \"UPSERT * from plnmonitor.user where name=\" + username;\n\n\t\t\tdbConnection = getDBConnection();\n\n\t\t\tString insertTableSQL = \n\t\t\t\t\t\"WITH upsert AS \" +\n\t\t\t\t\t\t\t\"(UPDATE plnmonitor.user \" +\n\t\t\t\t\t\t\t\"SET \\\"passwordHash\\\" = ?, \" +\n\t\t\t\t\t\t\t\"role = ? \" +\n\t\t\t\t\t\t\t\"WHERE name=? RETURNING *), \" +\n\n\t\t\t\t\t\"inserted AS (\"+\n\t\t\t\t\t\"INSERT INTO plnmonitor.user \" +\n\t\t\t\t\t\"(name,\\\"passwordHash\\\",role) \"+\n\t\t\t\t\t\"SELECT ?,?,? WHERE NOT EXISTS \"+\n\t\t\t\t\t\"(SELECT * FROM upsert) \"+\n\t\t\t\t\t\"RETURNING *) \"+\n\t\t\t\t\t\"SELECT * \" +\n\t\t\t\t\t\"FROM upsert \" +\n\t\t\t\t\t\"union all \" +\n\t\t\t\t\t\"SELECT * \" +\n\t\t\t\t\t\"FROM inserted\";\n\n\t\t\tdbConnection = getDBConnection();\n\t\t\tpreparedStatement = dbConnection.prepareStatement(insertTableSQL, Statement.KEEP_CURRENT_RESULT);\n\t\t\tpreparedStatement.setString(1, pwHash);\n\t\t\tpreparedStatement.setString(2, role);\n\t\t\tpreparedStatement.setString(3, username);\n\n\t\t\tpreparedStatement.setString(4, username);\n\t\t\tpreparedStatement.setString(5, pwHash);\n\t\t\tpreparedStatement.setString(6, role);\n\n\t\t\t//System.out.println(preparedStatement.toString());\n\t\t\tResultSet rs=preparedStatement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tuserId = rs.getInt(\"id\");\n\t\t\t\tLOGGER.info(\"Added or updated user: \" + username + \" to the database with ID: \" + userId + \" \" + pwHash );\n\t\t\t}\n\t\t}\n\t\tcatch (SQLException e) {\n\n\t\t\tLOGGER.error(e.getMessage());\n\n\t\t} \n\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (preparedStatement != null) {\n\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t}\n\n\t\t\t\tif (dbConnection != null) {\n\t\t\t\t\tdbConnection.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\n\t\t\t\tLOGGER.error(e.getMessage());\n\n\t\t\t}\n\n\t\t}\n\n\t}", "@Before\n public void beforeClass(){\n\n UserNameAndPassword userNameAndPassword = new UserNameAndPassword();\n\n userNameAndPassword.addUserToList();\n\n }", "private void register(String username,String password){\n\n }", "@Test\n\tpublic void testCreateAdminAccountWithSpacesInPassword() {\n\t\tString username = \"Catherine\";\n\t\tString password = \"this is a bad password\";\n\t\tString error = null;\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.createAdminAccount(username, password, NAME1);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\n\t\tassertNull(user);\n\t\t// check error\n\t\tassertEquals(\"Password cannot contain spaces.\", error);\n\t}", "@Test\n\tpublic void createAccount() {\t\n\t\t\n\t\tRediffOR.setCreateAccoutLinkClick();\n\t\tRediffOR.getFullNameTextField().sendKeys(\"Kim Smith\");\n\t\tRediffOR.getEmailIDTextField().sendKeys(\"Kim Smith\");\n\t\t\t\t\t\n\t\t\n\t}", "private boolean createCredentials() {\r\n dbLogin = new SetUpUI();\r\n dbLogin.setVisible(true);\r\n actionListener = new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n if (e.getSource() == dbLogin.getDoneBtn()) {\r\n FileOutputStream FOS = null;\r\n try {\r\n /**\r\n * I take the values fromthe text file and I insert it\r\n * into a text file create a file with specified details\r\n */\r\n File fout = new File(\"credentials.txt\");\r\n FOS = new FileOutputStream(fout);\r\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(FOS)); \r\n String userDetails = dbLogin.username().getText() + \":\" + dbLogin.password().getText();\r\n String dbPass = dbLogin.mysqlPassword().getText();\r\n if(dbLogin.mysqlPassword().getText().isEmpty()){ \r\n dbPass = \"e\";\r\n }\r\n String mysqlDetails = dbLogin.mysqlUsername().getText() + \":\" + dbPass; \r\n bw.write(userDetails);\r\n bw.newLine();\r\n bw.write(mysqlDetails);\r\n bw.close();\r\n JOptionPane.showMessageDialog(dbLogin, \"Succesfully Created Details Please Restart The Program\"); \r\n dbLogin.dispose();\r\n } catch (FileNotFoundException ex) {\r\n Logger.getLogger(SetUp.class.getName()).log(Level.SEVERE, null, ex);\r\n JOptionPane.showMessageDialog(dbLogin, \"Failed to create SetUp Details\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(SetUp.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Registering the components\r\n */\r\n dbLogin.getDoneBtn().addActionListener(actionListener);\r\n return state;\r\n }", "int insert(PasswdDo record);", "@Test\n public void testCheckAuth() throws Exception {\n SettingsManager manager = new SettingsManager();\n //manager.username = \"testUsername\";\n //manager.password = \"testPassword\";\n Assert.assertTrue(\"Correct credentials should return true\", manager.checkAuth(\"testUsername\", \"testPassword\"));\n Assert.assertFalse(\"Bad username should return false\", manager.checkAuth(\"badUsername\", \"testPassword\"));\n Assert.assertFalse(\"Bad password should return false\", manager.checkAuth(\"testUsername\", \"wrongPassword\"));\n }", "AionAddress createAccount(String password);", "@Test\n @Order(0)\n public void addCredential() throws InterruptedException {\n int initialCredentialsCount = home.getCredentialItems().size();\n\n home.openAddCredentialModal();\n Thread.sleep(500);\n\n home.setCredential(\"http://localhost:8080\", \"uche\", \"1234568\");\n\n moveToCredentialsTab();\n assertEquals(home.getCredentialItems().size(), initialCredentialsCount + 1);\n\n initialCredentialsCount = home.getCredentialItems().size();\n\n home.openAddCredentialModal();\n Thread.sleep(500);\n\n home.setCredential(\"http://localhost:8080\", \"praise\", \"1dsaAA2\");\n\n moveToCredentialsTab();\n assertEquals(home.getCredentialItems().size(), initialCredentialsCount + 1);\n\n home.logout();\n }", "@Test\n public void ValidLoginTest() throws Exception {\n openDemoSite(driver).typeAuthInfo(loginEmail, \"Temp1234%\").signInByClick();\n }", "@Test\n public void existingUserOK_PW() {\n boolean result = auth.authenticateUser(\"Ole\", \"secret\", 0); \n //Then\n assertThat(result, is(true));\n }", "@Test\n public void test_create_user_and_login_success() {\n try {\n TokenVO firstTokenVO = authBO.createUser(\"createduser1\",\"createdpassword1\");\n Assert.assertNotNull(firstTokenVO);\n Assert.assertNotNull(firstTokenVO.getBearer_token());\n Assert.assertTrue(firstTokenVO.getCoachId() > 1);\n String firstToken = firstTokenVO.getBearer_token();\n\n TokenVO secondTokenVO = authBO.login(\"createduser1\", \"createdpassword1\");\n Assert.assertNotNull(secondTokenVO);\n Assert.assertNotNull(secondTokenVO.getBearer_token());\n Assert.assertTrue(secondTokenVO.getCoachId() > 1);\n Assert.assertTrue(secondTokenVO.getBearer_token() != firstTokenVO.getBearer_token());\n Assert.assertTrue(secondTokenVO.getCoachId() == firstTokenVO.getCoachId());\n } catch (AuthException e) {\n System.err.println(e.getMessage());\n Assert.assertTrue(e.getMessage().equalsIgnoreCase(\"\"));\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n }", "@Override\n\tpublic void credite() {\n\t\t\n\t}", "public String getCredentials();", "@BeforeClass\n public void prepare() throws Exception\n {\n dashBoard = loginAs(username, password);\n }", "@Test\n public void UserCreation() throws Exception {\n openDemoSite(driver);\n driver.findElement(By.xpath(\"//li/a[@title=\\\"Admin area\\\"]\")).click();\n driver.findElement(By.xpath(\"//input[@name='login']\")).sendKeys(\"Email\");\n driver.findElement(By.xpath(\"//input[@name='password']\")).sendKeys(\"Password\");\n driver.findElement(By.xpath(\"//button[@type='submit']\")).click();\n Assert.assertTrue(\"Admin should be logged in\", false);\n driver.findElement(By.xpath(\"//a[@title=\\\"Users list\\\"]\")).click();\n driver.findElement(By.xpath(\"//button[@class='btn regular-button']\")).click();\n driver.findElement(By.xpath(\"//input[@id='login']\")).sendKeys(\"Email\");\n driver.findElement(By.xpath(\"//input[@id='password']\")).sendKeys(\"Password\");\n driver.findElement(By.xpath(\"//input[@id='password-conf']\")).sendKeys(\"Confirm password\");\n driver.findElement(By.xpath(\"//div/button[@type='submit']/span[text()='Create account']\")).click();\n\n }", "@Test\n public void testInvalidCredential(final TestContext aContext) {\n final Async asyncTask = aContext.async();\n final JsonObject newConfigs = myConfigs;\n\n newConfigs.put(IIIF_USERNAME, \"username\");\n newConfigs.put(IIIF_PASSWORD, \"password\");\n\n deployNewVerticle(newConfigs).onFailure(failure -> {\n TestUtils.complete(asyncTask);\n }).onSuccess(success -> {\n aContext.fail();\n });\n }", "public void setCredentials( String username_, String password_ ) {\n\t\tif (username_ != null) {\n\t\t\tusername = username_;\n\t\t} else {\n\t\t\tusername = \"Encinitas\";\n\t\t}\n\t\tif (password_ != null) {\n\t\t\tpassword = password_;\n\t\t} else {\n\t\t\tpassword = \"Carlsbad\";\n\t\t}\n\t\tlog( \"username \" + username, Log.Level.Information );\n\t\tlog( \"password \" + password, Log.Level.Information );\n\t}", "@Test\n\tpublic void loginWithValidCredentials(){\n\t\tapp.loginScreen().waitUntilLoaded();\n\t\tapp.loginScreen().logIn(Credentials.USER_VALID.username, Credentials.USER_VALID.password);\n\t\tassertTrue(app.userDashboardScreen().isActive());\n\t}", "@When(\"^To Validathe Retail Login with Valid Credentials$\")\r\n\tpublic void to_Validathe_Retail_Login_with_Valid_Credentials() throws InterruptedException {\n\t\tdriver.findElement(By.className(\"sign-in\")).click();\r\n\t\tdriver.findElement(By.name(\"log\")).sendKeys(\"admin\");\r\n\t\tdriver.findElement(By.name(\"pwd\")).sendKeys(\"admin@123\");\r\n\t\tdriver.findElement(By.name(\"login\")).click();\r\n\t\t Thread.sleep(3000);\r\n\t\t \r\n\t}", "@Test\n public void validSetFlightInformation() {\n testUser.setUsername(\"username\");\n testUser.setLastName(\"lastname\");\n testUser.setPassword(\"password\");\n testUser.setFirstName(\"firstname\");\n\n Assertions.assertEquals(\"username\", testUser.getUsername());\n Assertions.assertEquals(\"lastname\", testUser.getLastName());\n Assertions.assertEquals(\"password\", testUser.getPassword());\n Assertions.assertEquals(\"firstname\", testUser.getFirstName());\n }", "@Bean\n public BasicCredentialsProvider abTestCredentialProvider() {\n BasicCredentialsProvider provider = new BasicCredentialsProvider();\n provider.setCredentials(abTestAuthScope(), abTestCredentials());\n return provider;\n }", "public void persist(CredentialsModel credential) {\n Connection connection = null;\n PreparedStatement stmt = null;\n try {\n try {\n connection = ds.getConnection();\n try {\n stmt = connection.prepareStatement(\n \"INSERT INTO Credentials VALUES (?, ?, ?)\");\n stmt.setInt(1, credential.getEmployee().getEmpNumber());\n stmt.setString(2, credential.getUserName());\n stmt.setString(3, credential.getPassword());\n stmt.executeUpdate();\n } finally {\n if (stmt != null) {\n stmt.close();\n }\n }\n } finally {\n if (connection != null) {\n connection.close();\n }\n }\n } catch (SQLException ex) {\n System.out.println(\"Error in persist \" + credential);\n ex.printStackTrace();\n }\n }", "@BeforeEach\n\t public void setUser() {\n\t\tpasswordEncoder=new BCryptPasswordEncoder();\n\t\tuser=new AuthUser();\n\t\tuser.setId(1L);\n\t\tuser.setFirstName(\"Mohammad\");\n\t\tuser.setLastName(\"Faizan\");\n\t\tuser.setEmail(\"[email protected]\");\n\t\tuser.setPassword(passwordEncoder.encode(\"faizan@123\"));\n\t\tuser.setAccountNonExpired(true);\n\t\tuser.setAccountNonLocked(true);\n\t\tuser.setCredentialsNonExpired(true);\n\t\tuser.setEnabled(true);\n\t\tSet<Role> roles=new HashSet<>();\n\t\tRole role=new Role();\n\t\trole.setId(1L);\n\t\trole.setName(\"USER\");\n\t\troles.add(role);\n\t\tuser.setRoles(roles);\n\t\t\n\t}", "@Test\r\n public void testSetPassword() {\r\n\r\n }", "@Test\n public void testQueryWithValidCredentials() throws Exception {\n ClientFixture client = cluster.clientBuilder()\n .property(DrillProperties.USER, TEST_USER_1)\n .property(DrillProperties.PASSWORD, TEST_USER_1_PASSWORD)\n .build();\n\n // Add the credentials to the user\n JdbcStorageConfig pluginConfig = (JdbcStorageConfig) cluster.storageRegistry().getPlugin(PLUGIN_NAME).getConfig();\n PlainCredentialsProvider credentialProvider = (PlainCredentialsProvider) pluginConfig.getCredentialsProvider();\n credentialProvider.setUserCredentials(\"mysqlUser\", \"mysqlPass\", TEST_USER_1);\n pluginConfig.updateCredentialProvider(credentialProvider);\n\n String sql = \"SELECT first_name, last_name FROM mysql.`drill_mysql_test`.person\";\n RowSet results = client.queryBuilder().sql(sql).rowSet();\n\n TupleMetadata expectedSchema = new SchemaBuilder()\n .addNullable(\"first_name\", MinorType.VARCHAR, 38)\n .addNullable(\"last_name\", MinorType.VARCHAR,38)\n .buildSchema();\n\n RowSet expected = new RowSetBuilder(client.allocator(), expectedSchema)\n .addRow(\"first_name_1\", \"last_name_1\")\n .addRow(\"first_name_2\", \"last_name_2\")\n .addRow(\"first_name_3\", \"last_name_3\")\n .addRow(null, null)\n .build();\n\n RowSetUtilities.verify(expected, results);\n }", "@Test\n\tpublic void _02_loginWithValidCredentials() throws InterruptedException {\n\t\t\n\t\tlp = new LoginPage();\n\t\tThread.sleep(1000);\n\t\tlp.userName.clear();\n\t\tsendText(lp.userName, ConfigsReader.getProperty(\"username\"));\n\t\tlp.loginBtn.click();\n\t\tlp.password.clear();\n\t\tsendText(lp.password, ConfigsReader.getProperty(\"password\"));\n\t\tlp.loginBtn.click();\n\n\t\tThread.sleep(3000);//for demo purposes only\n\t\tpp = new ProfilePage();\n\t\tAssertJUnit.assertEquals(ConfigsReader.getProperty(\"username\"), pp.userName.getText());\n\t}", "@When(\"I enter the valid (.*) and (.*)\")\n\tpublic void entercredentials(String username, String password) throws InterruptedException {\n\t\tact.getlogin().enterUserName(username);\n\t\tact.getlogin().enterPassword(password);\n\t\t\n\t\t//WebElement textPassword = driver.findElement(By.id(\"txtPassword\"));\n\n\t\t//textPassword.sendKeys(password);\n\t}", "private void createTestData() {\n final DbEncryptionKeyReference encryptionKey = new DbEncryptionKeyReference();\n encryptionKey.setCreationTime(new Date());\n encryptionKey.setReference(\"1\");\n encryptionKey.setEncryptionProviderType(EncryptionProviderType.JRE);\n encryptionKey.setValidFrom(new Date(System.currentTimeMillis() - 60000));\n encryptionKey.setVersion(1L);\n this.testEntityManager.persist(encryptionKey);\n\n final DbEncryptedSecret encryptedSecret = new DbEncryptedSecret();\n encryptedSecret.setCreationTime(new Date());\n encryptedSecret.setDeviceIdentification(DEVICE_IDENTIFICATION);\n encryptedSecret.setSecretType(\n org.opensmartgridplatform.secretmanagement.application.domain.SecretType.E_METER_AUTHENTICATION_KEY);\n encryptedSecret.setEncodedSecret(E_METER_AUTHENTICATION_KEY_ENCRYPTED_FOR_DB);\n encryptedSecret.setEncryptionKeyReference(encryptionKey);\n\n this.testEntityManager.persist(encryptedSecret);\n\n final DbEncryptedSecret encryptedSecret2 = new DbEncryptedSecret();\n encryptedSecret2.setCreationTime(new Date());\n encryptedSecret2.setDeviceIdentification(DEVICE_IDENTIFICATION);\n encryptedSecret2.setSecretType(\n org.opensmartgridplatform.secretmanagement.application.domain.SecretType.E_METER_ENCRYPTION_KEY_UNICAST);\n encryptedSecret2.setEncodedSecret(E_METER_ENCRYPTION_KEY_UNICAST_ENCRYPTED_FOR_DB);\n encryptedSecret2.setEncryptionKeyReference(encryptionKey);\n\n this.testEntityManager.persist(encryptedSecret2);\n\n this.testEntityManager.flush();\n }", "private void setCredentials() {\n Properties credentials = new Properties();\n\n try {\n credentials.load(new FileInputStream(\"res/credentials.properties\"));\n } catch (IOException e) {\n __logger.error(\"Couldn't find credentials.properties, not setting credentials\", e);\n return;\n }\n\n this.username = credentials.getProperty(\"username\");\n this.password = credentials.getProperty(\"password\");\n this.smtpHost = credentials.getProperty(\"smtphost\");\n this.imapHost = credentials.getProperty(\"imaphost\");\n\n if (password == null || password.equals(\"\")) {\n password = this.getPasswordFromUser();\n }\n\n __logger.info(\"Set credentials\");\n }", "@Test\n\tpublic void testCreateAdminAccountWithTakenUsername() {\n\n\t\tString error = null;\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.createAdminAccount(USERNAME1, PASSWORD1, NAME1);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\n\t\tassertNull(user);\n\t\t// check error\n\t\tassertEquals(\"This username is not available.\", error);\n\t}", "public abstract boolean checkCredentials (String username, String password);", "@Test\r\n\tpublic void validLoginTest()\r\n\t{\n\t\thomePOM.selectMyAccount();\r\n\t\t\r\n\t\t//select Login option from My Account\r\n\t\thomePOM.myAccountLogin();\r\n\t\t//read username from property file\r\n\t\tusername=properties.getProperty(\"username\");\r\n\t\t//read password from property file\r\n\t\tpassword=properties.getProperty(\"password\");\r\n\t\t\r\n\t\t//login to Application\r\n\t\tloginPOM.sendLoginDetails(username,password);\r\n\t\t\r\n\t\t//validate login\r\n\t\tloginPOM.loginValidate();\r\n\t\t\r\n\t\t\r\n\t}", "@Test\n public void SignInTest() throws InterruptedException {\n LoginTC login = new LoginTC(driver);\n login.LoginTest();\n\n SignInPagePO signInPage = new SignInPagePO(driver);\n\n\n //Step 1: Click On Users\n Assert.assertEquals(signInPage.clickUsers(), true,\"Opps!! unable to click Users\");\n\n //Step 2 :: Click On Managers\n\n Assert.assertEquals(signInPage.clickManagers(), true,\"Opps!! unable to click Managers\");\n\n //Step 3: Click On addmanager\n\n Assert.assertEquals(signInPage.clickAddmanager(), true,\"Opps!! unable to click addmanager\");\n\n //Step 1 :: Enter valid Username\n\n String firstname=\"testname\";\n Assert.assertEquals(signInPage.enterfirstName(firstname), true,\"Opps!! unable to enter first name\");\n\n //Step 1 :: Enter valid Username\n String lastname=\"testlastname\";\n Assert.assertEquals(signInPage.enterlasttName(lastname), true,\"Opps!! unable to enter last name\");\n\n\n }", "public void logincredentials() {\n\t\tutil.entertext(prop.getValue(\"locators.text.uname\"), \"admin\");\n\t\tutil.entertext(prop.getValue(\"locators.text.password\"), \"Admin123\");\n\t\tutil.ClickElement(prop.getValue(\"locators.button.regdesk\"));\n\t\tutil.ClickElement(prop.getValue(\"locators.button.login\"));\n\t\tlogreport.info(\"logged into the application\");\n\n\t}", "@When(\"user enters username and password\")\n\tpublic void user_enters_username_and_password() throws InterruptedException {\n\t\tdriver.findElement(By.id(\"name\")).sendKeys(\"Raghav\");\n\t\tdriver.findElement(By.id(\"password\")).sendKeys(\"12345\");\n\t\tThread.sleep(2000);\n\n\n\t}", "@Test\n public void authenticateTestSucces() {\n DatabaseTest.setupDevice();\n Device device = new Device(DatabaseTest.DEVICE_ID, DatabaseTest.TOKEN);\n assertTrue(device.authenticate());\n DatabaseTest.cleanDatabase();\n }", "@Override\r\n\tpublic boolean needsCredentials() {\n\t\treturn false;\r\n\t}", "private void guardarCredenciales(String codigo,String contra){\n SharedPreferences sharedPreferences = getPreferences(getApplicationContext().MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"USUARIO\",codigo);\n editor.putString(\"PASSWORD\",contra);\n editor.commit();\n }", "@Test\n public void testUserInsertionMethod() {\n\n assertEquals(\"must return empty string for success\", \"\", userQuery.createUser(\"[email protected]\", \"s\", \"01234\", \"yahia\", \"sh\",\n \"11918\"));\n assertEquals(\"must return error since duplicate email\", \"Email Error\", userQuery.createUser(\"[email protected]\", \"s\", \"01234\", \"yahia\", \"sh\",\n \"11918\"));\n assertEquals(\"one of the field is empty\", \"Parameter Error\", userQuery.createUser(\"[email protected]\", \"s\", \"\", \"yahia\", \"sh\",\n \"11918\"));\n\n }", "@Test\n @Order(4)\n public void credentialsAutocomplete() {\n driver.get(\"http://localhost:3000/student/new\");\n StudentUserPage studentUserPage = new StudentUserPage(driver);\n WebDriverWait wait = new WebDriverWait(driver, 30);\n\n studentUserPage.clickOnStudent();\n wait.until(ExpectedConditions.visibilityOf(studentUserPage.getExitButton()));\n\n assertEquals(studentUserPage.getStudentName(), studentUserPage.getSideStudentName());\n assertEquals(studentUserPage.getStudentSurname(), studentUserPage.getSideStudentSurname());\n assertEquals(studentUserPage.getStudentAccountName(), studentUserPage.getSideStudentAccountName());\n assertEquals(studentUserPage.getStudentEmail(), studentUserPage.getSideStudentEmail());\n }", "@Test\t\t\n\tpublic void validuser() {\n\t\tFile file = new File(\"C:\\\\Users\\\\gururaj.ravindra\\\\eclipse-workspace\\\\6D\\\\config.properties\\\\testdata.properties\");\n\t\t \n\t\tFileInputStream fileInput = null;\n\t\ttry {\n\t\t\tfileInput = new FileInputStream(file);\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tProperties prop = new Properties();\n\t\t\n\t\t//load properties file\n\t\ttry {\n\t\t\tprop.load(fileInput);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\n\t\tWebDriver driver= BrowserFactory.StartBrowser(prop.getProperty(\"browserName\"),prop.getProperty(\"url\"));\n\t\tLoginPage login_page = PageFactory.initElements(driver, LoginPage.class);\n\t\tlogin_page.Validlogin(prop.getProperty(\"username\"),prop.getProperty(\"password\"));\n\t}", "private String[] getCredentials() {\n String[] cred = new String[2];\n System.out.print(\"Username: \");\n cred[0] = sc.nextLine();\n System.out.print(\"Password: \");\n cred[1] = sc.nextLine();\n return cred;\n }", "@Test\n\tpublic void testAuthenticateAdminAccountSuccessfully() {\n\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.authenticateAdminAccount(USERNAME1);\n\t\t} catch (InvalidInputException e) {\n\t\t\tfail();\n\t\t}\n\t\tassertNotNull(user);\n\t\tassertNotEquals(0, user.getToken());\n\t}", "@Test\n public void bTestLogin(){\n given()\n .param(\"username\", \"playlist\")\n .param(\"password\", \"playlist\")\n .post(\"/login\")\n .then()\n .statusCode(200);\n }", "public void creatUser(String name, String phone, String email, String password);", "public static interface Credentials extends Serializable {\n\t\tpublic String getUserName();\n\t\t/**\n\t\t* The password is encrypted.\n\t\t*/\n\t\tpublic String getPassword();\n\t}", "@When(\"^I enter valid credentia ls$\")\n public void iEnterValidCredentials() throws Throwable {\n throw new PendingException();\n }", "public static synchronized int addCred(Credentials cred){\n\t\t\tint status=0;\t\n\t\t\tConnection connection; \n\t\t\tString preparedSQL = \"INSERT INTO credential (Email, Pass, User_ID, Role, \" +\n\t\t\t\t\t\"Validated, RegKey) VALUES(?,?,?,?,?,?) \";\n\t\t\tPreparedStatement statement=null;\t\n\t\t\ttry{\n\t\t\t\tconnection=DBConnector.getConnection();\n\t\t\t\tstatement = connection.prepareStatement(preparedSQL);\n\t\t\t\tstatement.setString(1, cred.getEmail());\n\t\t\t\tstatement.setString(2, cred.getPass());\n\t\t\t\tstatement.setInt(3, cred.getUserID());\n\t\t\t\tstatement.setString(4, cred.getRole());\n\t\t\t\tstatement.setInt(5, cred.getValid());\n\t\t\t\tstatement.setString(6, cred.getRegKey());\n\t\t\t\tstatus = statement.executeUpdate();\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t}catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\n\t\t\treturn status;\n\t}", "@Then(\"assert user credentials are stored in local storage\")\n public void assertUserCredentialsAreStoredInLocalStorage(){\n LocalStorage local = ((WebStorage) profilePage.getWebDriver()).getLocalStorage();\n assertFalse(local.getItem(\"C_C_M\").isEmpty());\n }", "private void createUser(final String email, final String password) {\n\n }", "@Test\n public void test001() {\n String login = \"admin\";\n String password = \"admin\";\n\n openBasicAuthPage(login, password);\n assertThatAuthenticated();\n\n }", "public void setCredentials(String n, String t){\n\n name = n;\n token = t;\n\n //save the name and token in an external txt file.\n credentials.put(name, token);\n try {\n credentials.exportNode(new FileOutputStream(\"tokens.txt\"));\n }catch (IOException | BackingStoreException e1){\n System.out.println(e1);\n }\n }", "private void createDriver() {\n account = new Account(\"driver\", \"password\", \"[email protected]\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L,\n new Licence(\"Full for over 2 years\", \"YXF87231\",\n LocalDate.parse(\"12/12/2015\", formatter),\n LocalDate.parse(\"12/12/2020\", formatter)));\n }", "@Test\n public void aTestRegister() {\n given()\n .param(\"username\", \"playlist\")\n .param(\"password\", \"playlist\")\n .post(\"/register\")\n .then()\n .statusCode(201);\n }", "public void testCredentialsPasswordConstant() {\n assertEquals(\"CREDENTIALS_PASSWORD is incorrect\", UserConstants.CREDENTIALS_PASSWORD, \"credentials-password\");\n }", "@Test\n public void createUser() {\n Response response = regressionClient.createUser();\n dbAssist.responseValidation(response);\n }", "@Test\n public final void testCreateUserInJSONCorrectValues()\n throws Exception {\n UserAPI fixture = new UserAPI();\n String input = \"{\\\"userName\\\":\\\"Rodolfo\\\", \\\"password\\\": \\\"213\\\"}\";\n Response result = fixture.createUserInJSON(input);\n assertNotNull(result);\n }", "public AuthCredentials(String scheme,String name,String password)\n {\n this.scheme = scheme;\n this.name = name;\n this.password = password;\n }", "public void propagateCredentials( User user, String password );", "@Test\n public void basicAuthentication() {\n RestAssured.given().auth().basic(\"admin\",\"admin\").when().get(\"https://the-internet.herokuapp.com/basic_auth\").\n then().assertThat().statusCode(200);\n\n //api key is one type of authentication, we can also be authenticated by providing a name and password.\n }", "public ClientCredentials() {\n }", "@Test\n public void testConnectionWhenGoodLogs() {\n \tForm form = new Form();\n \tform.param(\"login\", \"user\");\n \tform.param(\"psw\", \"12345\");\n \t\n \tResponse connect = target.path(\"auth\").request().post(Entity.form(form));\n \tassertEquals(230,connect.getStatus());\n }", "public void addAccount(String user, String password);", "public Object credentials() {\n return cred;\n }", "@Override\n \t\t\t\tpublic JDBCConnectionCredentials getDirtyDatabaseCredentials() {\n \t\t\t\t\treturn new JDBCConnectionCredentials(\"jdbc:virtuoso://localhost:1112/UID=dba/PWD=dba\", \"dba\", \"dba\");\n \t\t\t\t}", "public void user_signin()\r\n\t{\r\n\t\t\r\n\t\tdriver.findElement(By.id(\"email\")).clear();\r\n\t\tdriver.findElement(By.id(\"email\")).sendKeys(UID);\r\n\t\t\r\n\t\tdriver.findElement(By.id(\"pass\")).clear();\r\n\t\tdriver.findElement(By.id(\"pass\")).sendKeys(PWD);\r\n\t}", "@Test\n public void testMakeAUser05() {\n System.out.println(\"make A Test User\");\n String givenName = \"GivenName\";\n String surname = \"surname\";\n String addressLine1 = \"addressLine1\";\n String addressLine2 = \"addressLine2\";\n String addressLine3 = \"addressLine3\";\n String addressPostcode = \"addressPostcode\";\n String DOB = \"DOB\";\n EPersonType personType = EPersonType.Test;\n String password = \"password\";\n CheckUserAndPasswords checkUserAndPasswords = new CheckUserAndPasswords();\n String expResult = checkUserAndPasswords.checkForNextAvailableUserID(\"T\");\n String result = MakeUser.makeAUser(givenName, surname, addressLine1, \n addressLine2, addressLine3, addressPostcode, DOB, personType, \n password);\n assertEquals(expResult, result);\n checkUserIDAndPasswordInTable(result, password);\n System.out.println(\"result \" + result);\n }", "@BeforeEach\n void init() {\n Map<String,String> payload = new HashMap<>();\n payload.put(\"username\",\"admin\");\n token = JWTUtil.getToken(payload);\n System.out.println(\"init():TOKEN HAS BEEN GENERATED:\"+token);\n list.add(new Employee(\"IT001\",\"Xiaoke\",\"Liu\",\"8732880212\",\"255 Wilbrod Street\",\"Developer\"));\n list.add(new Employee(\"IT002\",\"Scott\",\"Liu\",\"8738291345\",\"234 Wilbrod Street\",\"Tester\"));\n list.add(new Employee(\"IT003\",\"Sam\",\"James\",\"8744563821\",\"324 Wilbrod Street\",\"Developer\"));\n list.add(new Employee(\"FN001\",\"Linda\",\"Green\",\"8751234689\",\"256 Somerset Street\",\"Accountant\"));\n list.add(new Employee(\"FN002\",\"Roy\",\"White\",\"83718328327\",\"483 Bank Street\",\"Manager\"));\n }", "private void debugAuthentcation() {\n\n\t\t/*\n\t\t * XPagesUtil.showErrorMessage(\"bluemix util: serviceName: \" +\n\t\t * serviceName + \", baseUrl: \" + baseUrl + \" username: \" + username +\n\t\t * \" password: \" + password);\n\t\t * XPagesUtil.showErrorMessage(\"bluemix util: service name: \" +\n\t\t * serviceName + \", hardcodedBaseUrl: \" + hardcodedBaseUrl +\n\t\t * \" hardcodedUsername: \" + hardcodedUsername + \" hardcodedPassword: \" +\n\t\t * hardcodedPassword);\n\t\t */\n\t}", "public static void createAccount3() {\n\n\n System.setProperty(\"webdriver.chrome.driver\",\"resources/chromedriver.exe\");\n\n WebDriver driver = new ChromeDriver();\n\n driver.get(\"https://fasttrackit.org/selenium-test/\");\n driver.findElement(By.cssSelector(\"a[href*=\\\"account\\\"] .label\")).click();\n driver.findElement(By.cssSelector(\"a[title=\\\"Register\\\"]\")).click();\n\n driver.findElement(By.cssSelector(\"#middlename\")).sendKeys(\"test\");\n driver.findElement(By.cssSelector(\"#lastname\")).sendKeys(\"chris\");\n driver.findElement(By.cssSelector(\"#email_address\")).sendKeys(\"[email protected]\");\n driver.findElement(By.cssSelector(\"#password\")).sendKeys(\"test1212\");\n driver.findElement(By.cssSelector(\"#confirmation\")).sendKeys(\"test1212\");\n driver.findElement(By.cssSelector(\"button[title=\\\"Register\\\"]\")).click();\n\n driver.quit();\n\n\n\n }", "@Test\n\tpublic void testCreateAdminAccountWithEmptyPassword() {\n\t\tString username = \"Catherine\";\n\t\tString password = \"\";\n\t\tString error = null;\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.createAdminAccount(username, password, NAME1);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\n\t\tassertNull(user);\n\t\t// check error\n\t\tassertEquals(\"Password cannot be empty.\", error);\n\t}", "@Test\n\tpublic void authenticateTest() {\n\t\t\n\t\tassertEquals(true, true);\n\n\t}", "void insertUser(String pseudo, String password, String email) throws SQLException;", "@Test\n public void testUserManager(){\n userManager.addUser(\"and\",\"rew\");\n assertEquals(\"rew\",userManager.getPassword(\"and\"));\n userManager.addUser(\"a\",\"a\");\n assertEquals(\"a\",userManager.getPassword(\"a\"));\n assertEquals(\"rew\",userManager.getPassword(\"and\"));\n }", "int insert(SysAuthentication record);", "public void getCredentials(){\n System.out.println(\"Enter Your Credit Card Number\");\n setCreditCardNumber(Integer.parseInt(Menu.getScanner().nextLine()));\n System.out.println(\"Enter your billing address\");\n setBillingAddress(Menu.getScanner().nextLine());\n System.out.println(\"Enter your CVC\");\n setCvc(Integer.parseInt(Menu.getScanner().nextLine()));\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\tvalidUser = new User();\n\t\tvalidUser.firstName = \"Foo\";\n\t\tvalidUser.lastName = \"Bar\";\n\t\tvalidUser.address = \"123 4th Street\";\n\t\tvalidUser.city = \"Calgary\";\n\t\tvalidUser.province = \"Alberta\";\n\t\tvalidUser.country = \"Canada\";\n\t\tvalidUser.email = \"[email protected]\";\n\t\tvalidUser.postalCode = \"H3Z2K6\";\n\t\tvalidUser.userName = \"foo\";\n\t\tvalidUser.setPassword(\"foobar\");\n\t}", "@Test\n public void createUserTestTest()\n {\n HashMap<String, Object> values = new HashMap<String, Object>();\n values.put(\"age\", \"22\");\n values.put(\"dob\", new Date());\n values.put(\"firstName\", \"CreateFName\");\n values.put(\"lastName\", \"CreateLName\");\n values.put(\"middleName\", \"CreateMName\");\n values.put(\"pasword\", \"user\");\n values.put(\"address\", \"CreateAddress\");\n values.put(\"areacode\", \"CreateAddressLine\");\n values.put(\"city\", \"CreateCity\");\n values.put(\"country\", \"CreateCountry\");\n values.put(\"road\", \"CreateRoad\");\n values.put(\"suberb\", \"CreateSuberb\");\n values.put(\"cell\", \"CreateCell\");\n values.put(\"email\", \"user\");\n values.put(\"homeTell\", \"CreateHomeTell\");\n values.put(\"workTell\", \"CreateWorkTell\");\n createUser.createNewUser(values);\n\n Useraccount useraccount = useraccountCrudService.findById(ObjectId.getCurrentUserAccountId());\n Assert.assertNotNull(useraccount);\n\n Garage garage = garageCrudService.findById(ObjectId.getCurrentGarageId());\n Assert.assertNotNull(garage);\n\n Saleshistory saleshistory = saleshistoryCrudService.findById(ObjectId.getCurrentSalesHistoryId());\n Assert.assertNotNull(saleshistory);\n }", "@Test\n public void testAccountSetPassword() {\n try {\n Account newAcc = new Account(1, \"holder\", \"holder\", Credential.ADMIN);\n newAcc.setPassword(\"newPasswordForHolder\");\n Assert.assertEquals(\"Incorrect updated password for account after changing\",\n \"newPasswordForHolder\", newAcc.getPassword());\n } catch (Exception e) {\n Assert.fail(\"Set account password should not have failed here\");\n e.printStackTrace();\n }\n }", "void createExposedOAuthCredential(IntegrationClientCredentialsDetailsModel integrationCCD);", "@BeforeMethod\n public void loadLoginPage(){\n driver.get(\"http://ec2-52-53-181-39.us-west-1.compute.amazonaws.com/\");\n Loginpage page = new Loginpage(driver);\n page.createAccount();\n }", "@Test\n\tpublic void getPasswordSuccessTest() throws Exception {\n\t\tfinal SecretCredentialsManagerImpl secretCredentialsManagerImpl = new SecretCredentialsManagerImpl(null, \"true\", null, null) {\n\n\t\t\t@Override\n\t\t\tprotected SecretCache getSecretCache() {\n\t\t\t\treturn new SecretCache(Mockito.mock(AWSSecretsManager.class)) {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic String getSecretString(final String secretId) {\n\t\t\t\t\t\treturn \"{ \\\"password\\\" : \\\"password\\\", \\\"username\\\" : \\\"username\\\" }\";\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\tassertNotNull(secretCredentialsManagerImpl.getUsername());\n\t\tassertNotNull(secretCredentialsManagerImpl.getPassword());\n\t}", "private void checkRep(){\n assert !this.username.equals(\"\");\n assert !this.password.equals(\"\");\n assert accessLevel != null;\n }", "java.lang.String getCred();", "@Test\n public void createNewUser() {\n\n driver.get(\"http://localhost/litecart/en/\");\n WebElement newCustomerLink = driver.findElement(By.cssSelector(\"table > tbody > tr:nth-child(5) a\"));\n newCustomerLink.click();\n\n WebElement firstNameInput = driver.findElement(By.name(\"firstname\"));\n WebElement lastNameInput = driver.findElement(By.name(\"lastname\"));\n WebElement address1Input = driver.findElement(By.name(\"address1\"));\n WebElement postcodeInput = driver.findElement(By.name(\"postcode\"));\n WebElement cityInput = driver.findElement(By.name(\"city\"));\n WebElement countryInput = driver.findElement(By.cssSelector(\"select\"));\n WebElement emailInput = driver.findElement(By.name(\"email\"));\n WebElement phoneInput = driver.findElement(By.name(\"phone\"));\n WebElement passwordInput = driver.findElement(By.name(\"password\"));\n WebElement confirmedPasswordInput = driver.findElement(By.name(\"confirmed_password\"));\n WebElement createAccountBtn = driver.findElement(By.name(\"create_account\"));\n\n countryInput.sendKeys(\"United States\");\n firstNameInput.sendKeys(firstName);\n lastNameInput.sendKeys(lastName);\n address1Input.sendKeys(address1);\n postcodeInput.sendKeys(postcode);\n cityInput.sendKeys(city);\n emailInput.sendKeys(email);\n phoneInput.sendKeys(phoneNumber);\n passwordInput.sendKeys(password);\n confirmedPasswordInput.sendKeys(password);\n createAccountBtn.click();\n\n driver.findElement(By.linkText(\"Logout\")).click();\n\n WebElement loginEmailAddress = driver.findElement(By.name(\"email\"));\n WebElement loginPassword = driver.findElement(By.name(\"password\"));\n WebElement loginBtn = driver.findElement(By.name(\"login\"));\n\n loginEmailAddress.sendKeys(email);\n loginPassword.sendKeys(password);\n loginBtn.click();\n\n driver.findElement(By.linkText(\"Logout\")).click();\n }", "@Test\n\tpublic void driverCreatePositiveTest() {\n\t\tDriver driver;\n\t\tUserAccount ua;\n\t\tfinal Authority authority;\n\t\tCollection<Authority> authorities;\n\n\t\tdriver = this.driverService.create();\n\t\tua = this.userAccountService.create();\n\t\tauthority = new Authority();\n\t\tauthority.setAuthority(Authority.DRIVER);\n\t\tauthorities = new ArrayList<Authority>();\n\t\tauthorities.add(authority);\n\n\t\tdriver.setName(\"Name\");\n\t\tdriver.setSurname(\"Surname\");\n\t\tdriver.setCountry(\"Country\");\n\t\tdriver.setCity(\"City\");\n\t\tdriver.setBankAccountNumber(\"ES4963116815932885489285\");\n\t\tdriver.setPhone(\"698456847\");\n\t\tdriver.setChilds(true);\n\t\tdriver.setMusic(true);\n\t\tdriver.setSmoke(false);\n\t\tdriver.setPets(true);\n\n\t\tua.setUsername(\"[email protected]\");\n\t\tua.setPassword(\"newdriver\");\n\t\tua.setAuthorities(authorities);\n\n\t\tdriver.setUserAccount(ua);\n\n\t\tthis.driverService.save(driver);\n\t\tthis.driverService.flush();\n\t}", "private void login(String username,String password){\n\n }" ]
[ "0.6726688", "0.63382465", "0.63274217", "0.62923837", "0.6285984", "0.6080936", "0.6058023", "0.59987557", "0.59800833", "0.5950779", "0.5948388", "0.5947514", "0.5934658", "0.5926641", "0.589653", "0.58913016", "0.5887893", "0.58795017", "0.58628523", "0.5858153", "0.58478594", "0.5836941", "0.5835295", "0.5813543", "0.58077055", "0.5804003", "0.57967716", "0.5791997", "0.5785421", "0.5781259", "0.5777888", "0.5777864", "0.57694167", "0.5753468", "0.5750727", "0.57427627", "0.5732691", "0.5729972", "0.5728099", "0.57150364", "0.5709848", "0.57075024", "0.57047623", "0.57045746", "0.56945777", "0.569455", "0.5693422", "0.5688376", "0.56866443", "0.5685579", "0.56757313", "0.56655174", "0.56612974", "0.56537104", "0.56519336", "0.56494117", "0.56482273", "0.56474197", "0.5639804", "0.5639079", "0.5636102", "0.5632684", "0.563188", "0.56315553", "0.56308126", "0.56245667", "0.56242836", "0.5620786", "0.5619139", "0.56130034", "0.56032", "0.56011164", "0.5600272", "0.55982727", "0.5580367", "0.55802906", "0.5577151", "0.5572966", "0.5571185", "0.5560268", "0.5545109", "0.5543142", "0.5542067", "0.55355847", "0.55340165", "0.5533556", "0.55297637", "0.5529688", "0.55282736", "0.5527789", "0.552777", "0.5517263", "0.5514534", "0.5511955", "0.5511266", "0.5510736", "0.5496475", "0.5494663", "0.5493569", "0.5493221" ]
0.65386695
1
Call the owner of the gym
@Override public void onClick(DialogInterface dialog, int which) { Intent callOnwerIntent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:"+gym.getOwnerMobile().toString())); startActivity(callOnwerIntent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void callHouseOwner() {\n\t\tSystem.out.println(\"联系房东\");\n\t}", "public String callPlayer() {\n\t\treturn \"OVER HERE!!\";\n\t}", "@Override\r\n\tpublic void setTheOwner(Player owner) {\n\t\t\r\n\t}", "public void setOwner(Player player) {\n owner = player;\n }", "boolean goHome(IGeneticMob geneticMob);", "void fireShellAtOpponent(int playerNr);", "private void sendGameCommand(){\n\n }", "void SetOwner(int passedOwner) {\n if(passedOwner == 0 || passedOwner == 1) {\n owner = passedOwner;\n }\n else {\n Log.d(\"MyError\", \"Error in setting the owner of a build in the build class.\");\n }\n }", "public ID owner() {\n\treturn ((BeGrandMap) CurrentGrandMap.fluidGet()).placeOwnerID(myID);\n/*\nudanax-top.st:21970:FeGrandPlaceHolder methodsFor: 'client accessing'!\n{ID} owner\n\t\"Ask the GrandMap who owns this ID\"\n\t^CurrentGrandMap fluidGet placeOwnerID: myID!\n*/\n}", "public void setOwner(Player owner) {\n\t\tthis.owner = owner;\n\t}", "public void win()\r\n {\n Actor win;\r\n win=getOneObjectAtOffset(0,0,Goal.class);\r\n if (win !=null)\r\n {\r\n World myWorld=getWorld();\r\n Congrats cong=new Congrats();\r\n myWorld.addObject(cong,myWorld.getWidth()/2,myWorld.getHeight()/2); //(Greenfoot,2013) \r\n \r\n Greenfoot.stop();\r\n Greenfoot.playSound(\"finish.wav\"); //(Sound-Ideas,2014)\r\n \r\n }\r\n }", "public void startGame(){\n\n AgentAddress coordinatorAddressPre = getAgentWithRole(\"investment_game\", \"tout_le_monde\", \"coordinator\");\n\n if (coordinatorAddressPre==null){\n Coordinator coordinator = new Coordinator();\n\n launchAgent(coordinator);\n\n pause(1000);\n }\n\n Set<Player> players = new HashSet<Player>();\n Player primaryPlayer = null;\n\n //now launch all human player avatar agents, each of them will be initialized as agent having a GUI frame\n Iterator<GameSpecification.PlayerSpecification> playerSpecs = gameSpecification.getPlayerSpecifications().iterator();\n\n int launchedHumanPlayers = 0;\n\n while (playerSpecs.hasNext()){\n GameSpecification.PlayerSpecification spec = playerSpecs.next();\n\n if (spec instanceof GameSpecification.HumanPlayerSpecification){\n\n HumanPlayerAvatar humanPlayerAvatar = new HumanPlayerAvatar(spec.getName());\n\n launchAgent(humanPlayerAvatar,true);\n\n players.add(humanPlayerAvatar);\n\n launchedHumanPlayers++;\n\n if (null == primaryPlayer){\n primaryPlayer=humanPlayerAvatar;\n }\n\n }\n }\n\n //launch computer player agents. If no human players have been launched, the first computer player will display a GUI frame.\n playerSpecs = gameSpecification.getPlayerSpecifications().iterator();\n\n boolean first = true;\n\n while (playerSpecs.hasNext()){\n GameSpecification.PlayerSpecification spec = playerSpecs.next();\n\n if (spec instanceof GameSpecification.ComputerPlayerSpecification){\n\n ChooseAmountStrategy chooseAmountStrategy = ((GameSpecification.ComputerPlayerSpecification) spec).getChooseAmountStrategy();\n\n SelectOpponentStrategy selectOpponentStrategy = ((GameSpecification.ComputerPlayerSpecification) spec).getSelectOpponentStrategy();\n \n ComputerPlayer computerPlayer = new ComputerPlayer(spec.getName(),spec.getPictureFileName(), chooseAmountStrategy, selectOpponentStrategy);\n\n chooseAmountStrategy.setPlayer(computerPlayer);\n\n selectOpponentStrategy.setPlayer(computerPlayer);\n\n launchAgent(computerPlayer, launchedHumanPlayers == 0 && first);\n\n players.add(computerPlayer);\n\n if (null == primaryPlayer){\n primaryPlayer=computerPlayer;\n }\n\n first = false;\n\n }\n }\n\n //request new game from coordinator\n AgentAddress coordinatorAddress;\n\n while((coordinatorAddress = getAgentWithRole(\"investment_game\",\"tout_le_monde\",\"coordinator\"))==null){\n pause(750);\n }\n\n String requestGameSpec = \"<new_game> <for> \"+gameSpecification.getPlayerSpecifications().size()+\" <players> <having> \"+gameSpecification.getRounds()+\" <rounds> <invite> 0 <computer_players>\";\n\n ActMessage reply = (ActMessage)sendMessageWithRoleAndWaitForReply(coordinatorAddress,new ActMessage(\"request_game\",requestGameSpec),\"jeromes_assistant\");\n\n if (reply.getAction().equals(\"game_initialized\")){\n\n final String gameId = reply.getContent();\n\n //let players join the game\n Iterator<Player> playerIterator = players.iterator();\n\n while (playerIterator.hasNext()){\n\n final Player player = playerIterator.next();\n final boolean isPrimaryPlayer = player.equals(primaryPlayer);\n\n new Thread(){\n @Override\n public void run() {\n player.joinGame(gameId,isPrimaryPlayer,player.getPicturePath());\n }\n }.start();\n\n }\n }else{\n //TODO throw Exception\n }\n\n }", "public void who(String name)\n\t{\n\t\tsendRaw(\"WHO :\" + name);\n\t}", "public Agent getOwner(){\n return owner;\n }", "public void control(Spawn spawn) {}", "default void interactWith(Teleporter tp) {\n\t}", "public static void WorkAtCompany(Player gamer){\r\n gamer.zen = gamer.zen-30;\r\n gamer.money = gamer.money+10;\r\n gamer.turn = gamer.turn+1; \r\n }", "public void talking(){\n System.out.println(\"PetOwner : *says something*\");\n }", "void opponentInRoom();", "private void setPlayer()\t{\n\t\tgrid.setGameObject(spy, Spy.INITIAL_X, Spy.INITIAL_Y);\n\t}", "static void promptUser() {\n System.out.print(\"Insert the remote owners name: \");\n Scanner input = new Scanner(System.in);\n String remoteOwner = input.next();\n //Calls for findOwner method in Owners class and declares return to Object \"owner\"\n Remotes owner = Function.findOwner(remoteOwner);\n\n //sout results\n System.out.println(\"Owner of remote: \" + owner.name);\n System.out.println(\"Distance to your remote: \" + owner.distance);\n System.out.println(\"Battery left: \" + owner.battery + \"%\");\n }", "public static void altAccountOwner(Command command, String owner) {\n\t\tcommand.getChannel().sendMessage(\"This account is the alt account of `\"+owner+\"`\").complete();\n\t}", "public boolean execute(Living who);", "public void setOwner(AbstractGameObject owner) {\r\n\t\tthis.owner = owner;\r\n\t}", "private static void displayOwner() {\n // Clear the screen\n clearScreen();\n\n // Display UI\n System.out.println(\"Welcome, Owner.\\n\\n\"\n + \"Choose an option:\\n\"\n + \"- (O)ccupancy - View occupancy of rooms\\n\"\n + \"- (D)ata [(c)ounts|(d)ays|(r)evenue] - View data on \"\n + \"counts, days, or revenue of each room\\n\"\n + \"- (S)tays - Browse list of reservations\\n\"\n + \"- (R)ooms - View list of rooms\\n\"\n + \"- (B)ack - Goes back to main menu\\n\");\n }", "public void act() \r\n {\n if(getOneIntersectingObject(Player.class)!=null)\r\n {\r\n if(MenuWorld.gamemode == 1)\r\n //marcheaza regenerarea labirintului(trecere la nivelul urmator in Modul Contra Timp)\r\n TAworld.shouldRegen=true;\r\n else\r\n { \r\n //reseteaza variabilele care tin de modul de joc\r\n MenuWorld.gamemode=-1;\r\n MenuWorld.isPlaying=false;\r\n for(int i=0;i<4;i++)\r\n ItemCounter.gems_taken[i]=0;\r\n \r\n //arata fereastra de castig \r\n PMworld.shouldShowVictoryWindow=true;\r\n }\r\n \r\n }\r\n \r\n }", "void sendJoinWorld(String worldName);", "public void startGame(Room room);", "public void gotoCoachLogin(){ application.gotoCoachLogin(); }", "static private void TalkTo() {\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(BSChristiansen.getDescription() + \", yet he still gives you good advice:\\n\");\n System.out.println(BSChristiansen.getDialog(0));\n System.out.println(\"\");\n woundedSurvivor();\n } else if (mysteriousCrab.getCurrentRoom() == currentRoom && inventory.getInventory().containsKey(\"Shroom\")) {\n System.out.println(mysteriousCrab.getDescription() + \"\\n\" + mysteriousCrab.getDialog(0));\n } else {\n System.out.println(\"There is nobody to communicate with in this Room\");\n }\n\n }", "void setOwner(String owner);", "public SettlementPlayer getOwner();", "@objid (\"8b942215-f0a1-454e-9f8a-596315ee40d5\")\n Instance getOwner();", "public abstract void ratCrewGo();", "void spawnBot( String className, String messager ) {\n spawnBot( className, null, null, messager);\n }", "public Player getOwner() {\n return owner;\n }", "public void sendeLobby();", "public void setOwner (String owner) {\n\t\tthis.owner=owner;\n\t}", "public void newGame() {\n // this.dungeonGenerator = new TowerDungeonGenerator();\n this.dungeonGenerator = cfg.getGenerator();\n\n Dungeon d = dungeonGenerator.generateDungeon(cfg.getDepth());\n Room[] rooms = d.getRooms();\n\n String playername = JOptionPane.showInputDialog(null, \"What's your name ?\");\n if (playername == null) playername = \"anon\";\n System.out.println(playername);\n\n this.player = new Player(playername, rooms[0], 0, 0);\n player.getCurrentCell().setVisible(true);\n rooms[0].getCell(0, 0).setEntity(player);\n\n frame.showGame();\n frame.refresh(player.getCurrentRoom().toString());\n frame.setHUD(player.getGold(), player.getStrength(), player.getCurrentRoom().getLevel());\n }", "public void interact(Human user)\n {\n System.out.println(\"You will have to talk to the Starbucks(c) cashier to get a cup of COFFEE\"); \n }", "public void hyperSpace()\n\t{\n\t\t//only return the ship if a PlayerShip is currently spawned\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\t//invoke resetShip() method from PlayerShip\n\t\t\t((PlayerShip)gameObj[1].get(0)).resetShip();\n\t\t\tSystem.out.println(\"PS location reset\");\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"There is no playership spawned\");\n\t}", "String getOwner();", "String getOwner();", "public void OnPlayer(Joueur joueur);", "boolean setHome(IGeneticMob geneticMob, Vec3 coords);", "void fireShellAtPlayer(int playerNr, int x, int y);", "default void interactWith(Door door) {\n\t}", "public abstract void activatedBy(Player player);", "public void elaborate(Object arg) {\n if (debug) {\n System.err.println(toString() + \".elaborate()\");\n }\n\n simulator = parent.getSimulator();\n updateSymbol();\n }", "public abstract void RunOnGameOpen();", "java.lang.String getOwner();", "java.lang.String getOwner();", "public void setOwner(String owner) {\n this.owner = owner;\n }", "public void setOwner(String owner) {\n this.owner = owner;\n }", "public void setOwner(String owner) {\n this.owner = owner;\n }", "public void setOwner(String owner) {\n this.owner = owner;\n }", "public abstract void onBakeCommand(Player player);", "@Override\n\tpublic void execute() {\n\t\tProjectOpenAllPrompt prompt = new ProjectOpenAllPrompt();\n\t\tprompt.setProceedEvent(ee -> {\n\t\t\tprompt.close();\n\t\t\tString name = ((Button) ee.getSource()).getId();\n\t\t\tIGameRunner gameRunner = new GameRunner();\n\t gameRunner.playGame(name);\n\t\t});\n\t\tprompt.show();\n\t}", "@FXML\n public void addGym() {\n \tnew eMenuHandler().hideMenu();\n \tDisplayBuildingInstructions.showBuildingInstr();\n \tAddEntityOnMouseClick.setBuildMode(Boolean.TRUE);\n \tAddEntityOnMouseClick.entityList(new BuildingGym(0, 0));\n \t/*\n int xpos = (int) (Math.random() * 600) + 100;\n World.getInstance().addEntityToWorld(new BuildingGym(xpos, 30));\n */\n }", "public void go();", "String getHandOwner();", "@Override\r\n\tpublic void setOpponentName(String name) {\n\t\tmain.setOpponentUsername(name);\r\n\t}", "public void gainExperience(Combatant opponent) { }", "void fire(WarParticipant target, WarParticipant attacker, int noOfShooters);", "private void joinGame(int gameId){\n\n }", "void win(Player player);", "public abstract void gameObjectAwakens();", "@Override\n\tpublic void act() {\n\n\t\t//Location symbol of a Droid (Stack Overflow 2010)\n\t\tchar locationSymbol = this.world.getEntityManager().whereIs(this).getSymbol();\n\t\t\n\t\t//Begin act\n\t\tsay(describeLocation());\t\t\n\t\t\n\t\t//Check for the lose condition that R2 is disassembled\n\t\t//If R2's HP is <=0\n\t\tif (this.isDead())\n\t\t{\n\t\t\t//If R2 is disassembled\n\t\t\tif(this.getIsDisassembled())\n\t\t\t{\n\t\t\t\t//Is the symbol of the disassembled Droid is R2's\n\t\t\t\tif(this.getSymbol().contains(\"{R2}\"))\n\t\t\t\t{\n\t\t\t\t\t//Message stating R2 was disassembled\n\t\t\t\t\tthis.messageRenderer.render(\"\\n\\nR2-D2 has been disassembled!\");\n\t\t\t\t\t\n\t\t\t\t\t//Scheduler schedules the loss\n\t\t\t\t\tscheduler.lossSchedule(this.messageRenderer);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//If a Droid is immobile (Dead)\n\t\tif (this.getIsImmobile() == true) {\n\t\t\tsay(this.getShortDescription() + \" is immobile. \");\n\t\t\t\t\t\t\n\t\t\tif(this.getOwner() != null)\n\t\t\t{\n\t\t\t\tsay(\"Owned. checking in owners follow list\");\n\t\t\t\t\n\t\t\t\tString thisDroidNoBraces = this.getSymbol().substring(1, this.getSymbol().length()-1);\n\n\t\t\t\tint indexofDroid = this.getOwner().getFollowerList().indexOf(thisDroidNoBraces);\n\t\t\t\t\n\t\t\t\tif (this.getOwner().getFollowerList().get(indexofDroid).equals(thisDroidNoBraces))\n\t\t\t\t{\n\t\t\t\t\tsay(\"Removing\");\n\t\t\t\t\tthis.getOwner().getFollowerList().remove(thisDroidNoBraces);\n\t\t\t\t\tthis.getOwner().getFollowerListSWActors().remove(this);\n\t\t\t\t\tthis.setOwner(null);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t//If a Droid is mobile and human controlled\n\t\telse if (this.humanControlled == true) {\n\t\t\t\n\t\t\t//Following Owner - since humancontrolled.\n\t\t\t\n\t\t\t\n\t\t\tif (isDead()) \n\t\t\t{\n\t\t\t\tthis.setIsImmobile(true);\n\t\t\t\treturn;\n\t\t\t} \n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Get owners' location\n\t\t\t\tSWLocation ownerloc = this.world.getEntityManager().whereIs(this.getOwner());\n\t\t\t\t\n\t\t\t\t//Set Droids' position to owners' location (follow)\n\t\t\t\tthis.world.getEntityManager().setLocation(this, ownerloc);\n\t\t\t\t\n\t\t\t\t//Take damage if moving to the Badlands\n\t\t\t\tif (locationSymbol == 'b') { //IF the Droid is at the Badlands\n\t\t\t\t\tint NewHP = this.getHitpoints() - 2;\t//Take 2 from the Droids' health\n\t\t\t\t\tthis.setHitpoints(NewHP);\n\t\t\t\t\n\t\t\t\t\tsay(this.getShortDescription() + \" has lost health by moving into the Badlands!\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tselfHeal();\n\t\t\t}\t\n\t\t} \n\t\t\n\t\t//C-3PO Droid specific act ()code\n\t\telse if (this.getSymbol() == \"C3\") {\n\t\t\t\n\t\t\t//Double precision number to represenet C-3PO's chance of speaking\n\t\t\tdouble c3Speak = Math.random();\n\t\t\t\n\t\t\t//10% chance of occuring a 0.9 or above\n\t\t\tif (c3Speak >= 0.9) {\n\t\t\t\t//Call C-3PO speak method (he talks!)\n\t\t\t\tc3POSpeaks();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//R2-D2 Repair droid specific act() code\n\t\telse if (this.getSymbol() == \"R2\") {\n\t\t\t\n\t\t\tthis.messageRenderer.render(\"R2 DISS: \" + this.isDisassembled);\n\t\t\t\n\t\t\t//Describe who R2 can see\n\t\t\t//get the contents of the location\n\t\t\tList<SWEntityInterface> r2contents = this.world.getEntityManager().contents(this.world.getEntityManager().whereIs(this));\n\t\t\t\n\t\t\t//and describe the contents\n\t\t\tif (r2contents.size() > 1) { // if it is equal to one, the only thing here is R2, so there is nothing to report\n\t\t\t\tfor (SWEntityInterface r2entity : r2contents) {\n\t\t\t\t\tif (r2entity.getSymbol().contains(\"D\")) { // If R2 comes across a Droid (Stack Overflow 2010)\n\t\t\t\t\t\tsay(this.getShortDescription() + \" has come accross a Droid!\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Cast target entity as a Droid for checking what it needs from R2\n\t\t\t\t\t\tDroid targetr2 = (Droid) r2entity;\n\t\t\t\t\t\t\n\t\t\t\t\t\t//R2 attempts to disassemble the Droid if its immobile\n\t\t\t\t\t\tif (targetr2.isImmobile && targetr2.isDisassembled == false) {\n\t\t\t\t\t\t\tDisassemble r2diss = new Disassemble(r2entity, messageRenderer);\n\t\t\t\t\t\t\tscheduler.schedule(r2diss, this, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//R2 tries to repair a droid who is immobile and disassembled\n\t\t\t\t\t\telse if (targetr2.isImmobile && targetr2.isDisassembled) {\n\t\t\t\t\t\t\tif (this.getItemCarried() != null) {\n\t\t\t\t\t\t\t\tRepair r2rep = new Repair(r2entity, messageRenderer);\n\t\t\t\t\t\t\t\tscheduler.schedule(r2rep, this, 1);\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//R2 attempts to Heal a Droid if active and not disassembled\n\t\t\t\t\t\telse if (targetr2.isDisassembled == false && targetr2.isImmobile == false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tHealDroid r2heal = new HealDroid(r2entity, messageRenderer);\n\t\t\t\t\t\t\tscheduler.schedule(r2heal, this, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\n\t\t\t//Heals himself if he can\n\t\t\t\n\t\t\tHealDroid droidHealR2 = new HealDroid(this, messageRenderer);\n\t\t\tscheduler.schedule(droidHealR2, this, 1);\n\t\t\t\n\t\t\t//R2 moves\n\t\t\tDirection R2Direction = this.getDroidPatrol().getNext();\n\t\t\tsay(getShortDescription() + \" moves \" + R2Direction);\n\t\t\tMove myMove = new Move(R2Direction, messageRenderer, world);\n\n\t\t\tscheduler.schedule(myMove, this, 1);\n\t\n\t\t}\n\t\t\n\t\t//If a Droid is not immobile, and not human controlled (roaming)\n\t\telse {\t\n\t\t\t\n\t\t\t//Picking up an oil can\n\t\t\t//Get contents of the current location\n\t\t\tList<SWEntityInterface> contents = this.world.getEntityManager().contents(this.world.getEntityManager().whereIs(this));\n\t\t\t\n\t\t\t//and describe the contents\n\t\t\tif (contents.size() > 1) { // if it is equal to one, the only thing here is this Player, so there is nothing to report\n\t\t\t\tfor (SWEntityInterface entity : contents) {\n\t\t\t\t\tif (entity != this) { // don't include self in scene description\n\t\t\t\t\t\tif (entity.getSymbol() == \"x\") {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//The Droid is standing over a oil can. Does it pick it up?\n\t\t\t\t\t\t\tif (Math.random() > 0.5){ //Half a chance...\n\t\t\t\t\t\t\t\tsay(this.getShortDescription() + \" decided to pick up \" + entity.getShortDescription());\n\t\n\t\t\t\t\t\t\t\t//Droid takes the oil can. Scheduler implements the Take.\n\t\t\t\t\t\t\t\tTake droidTakes = new Take(entity, messageRenderer);\n\t\t\t\t\t\t\t\tscheduler.schedule(droidTakes, this, 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse { //The Droid passes over the oil can.\n\t\t\t\t\t\t\t\tsay(this.getShortDescription() + \" decided not to pick up\" + entity.getShortDescription());\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif (Math.random() > 0.8){\n\t\t\t\trandomMovement();\n\t\t\t}\n\t\t\t\n\t\t\t//If a Roaming Droid is at the Badlands, they lose health\n\t\t\t\n\t\t\tif (locationSymbol == 'b') { //IF the Droid is at the Badlands\n\t\t\t\tint NewHP = this.getHitpoints() - 2;\t//Take 2 from the Droids' health\n\t\t\t\tthis.setHitpoints(NewHP);\n\t\t\t\n\t\t\t\tsay(this.getShortDescription() + \" has lost health by moving into the Badlands!\");\n\t\t\t}\n\t\t\t\n\t\t\t/*Self healing\n\t\t\tImplementation that if a Droids' health gets below half, they will attempt to heal themselves IF they \n\t\t\tare carrying an oil can\n\t\t\t*/\n\t\t\tselfHeal();\n\t\t\t\n\t\t\t\n\t\t}\t\n\t}", "public void setOwner(UserModel param) {\n localOwnerTracker = true;\n\n this.localOwner = param;\n }", "default void interactWith(Lever lever) {\n\t}", "@Override\n\tpublic Object execute() {\n\t\tCatanModel cm = null;\n\t\ttry\n\t\t{\n\t\t\tcm = facade.getGameModel(authToken);\n\t\t\t\n\t\t\tcm.cardManager.playDevCard(DevCardType.MONOPOLY, ((MonopolyJSON)body).getPlayerIndex());\n\t\t\t\n\t\t\tResourceType resource = ResourceType.toEnum(((MonopolyJSON)body).getResource());\n\t\t\tif(resource != null) {\n\t\t\t\tcm.resourceManager.useMonopolyCard(((MonopolyJSON)body).getPlayerIndex(), resource);\n\t\t\t\tcm.cardManager.setHasPlayedDevCard(((MonopolyJSON)body).getPlayerIndex(), true);\n\t\t\t}\n\t\t\t\n\t\t\tcm.chatManager.logAction(cm.playerManager.getPlayerName(((MonopolyJSON)body).getPlayerIndex()) + \" played a monopoly card.\", cm.playerManager.getPlayerName(((MonopolyJSON)body).getPlayerIndex()));\n\n\t\t\t\n\t\t} catch (ServerException | NotEnoughDevCardsException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn cm;\n\t}", "public void spawnCreature(){\n\t\tif(spawnType.equalsIgnoreCase(\"worm\")){\n\t\t\tRuntimeObjectFactory.getObjectFromPool(\"worm\"+spawnId);\n\t\t}else if(spawnType.equalsIgnoreCase(\"antorc\")){\n\t\t\tGdx.app.debug(TamerGame.LOG, this.getClass()\n\t\t\t\t\t.getSimpleName() + \" :: Ant entered\");\t\t\t\n\t\t\t//CHANGE SPAWNING IMPLEMENTATION\n\t\t\tAntOrc orc = new AntOrc();\n\t\t\torc.setPosition(getPosition());\n\t\t\torc.setWaypoint(waypoint);\n\t\t\tenvironment.addNewObject(orc);\n\t\t\tEventPool.addEvent(new tEvent(this,\"spawnCreature\",sleepTime,1));\n\t\t}\n\t\t\t\n\t}", "void askStartGame();", "public void setOwnerName( String name ) {\n\n ownerName = name;\n }", "public void askSpawn() throws RemoteException{\n respawnPopUp = new RespawnPopUp();\n respawnPopUp.setSenderRemoteController(senderRemoteController);\n respawnPopUp.setMatch(match);\n\n Platform.runLater(\n ()-> {\n try{\n respawnPopUp.start(new Stage());\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }\n );\n }", "public static void main(String[] args) {\n\t\tArena talkingStick = new Arena();\n\t\ttalkingStick.nameCharacters();\n\t\ttalkingStick.talkCharacters();\n\t\ttalkingStick.doBattle(talkingStick);\n}", "public AbstractGameObject getOwner() {\r\n\t\treturn owner;\r\n\t}", "Participant getOwner();", "public void setOwnerName(String name) {\r\n this.ownerName = name;\r\n }", "public void startNewGame();", "public void executeBot(){\n if(botSignal){\n if(bot != null){\n bot.execute();\n }\n }\n botSignal=false;\n }", "public void interact() {\r\n\t\tif(alive) {\r\n\t\t\tCaveExplorer.print(attackDescription);\r\n\t\t\tbattle();\r\n\t\t}else {\r\n\t\t\tCaveExplorer.print(deadDescription);\r\n\t\t}\r\n\t}", "void joinGame(String playeruuid);", "public static Activity pestControl() {\n Position veteranBoat = new Position(2638, 2653);\n BooleanSupplier isOnIsland = Game.getClient()::isInInstancedScene;\n\n Function<Position, Activity> moveTo = position -> Activity.newBuilder()\n .withName(\"Moving to position: \" + position)\n .addPreReq(() -> Movement.isWalkable(position))\n .addPreReq(() -> position.distance(Players.getLocal()) > 5)\n .addSubActivity(Activities.toggleRun())\n .addSubActivity(() -> Movement.walkTo(position))\n .thenPauseFor(Duration.ofSeconds(4))\n .maximumDuration(Duration.ofSeconds(20))\n .untilPreconditionsFail()\n .build();\n\n Activity boardShip = Activity.newBuilder()\n .withName(\"Boarding ship to start game\")\n .addPreReq(() -> SceneObjects.getNearest(\"Gangplank\") != null)\n .addPreReq(() -> !isOnIsland.getAsBoolean())\n .addPreReq(() -> Players.getLocal().getX() >= 2638)\n .tick()\n .addSubActivity(Activities.moveTo(veteranBoat))\n .addSubActivity(() -> SceneObjects.getNearest(\"Gangplank\").interact(\"Cross\"))\n .thenPauseFor(Duration.ofSeconds(3))\n .build();\n\n Activity waitForGameToStart = Activity.newBuilder()\n .withName(\"Waiting for game to start\")\n .addPreReq(() -> !isOnIsland.getAsBoolean())\n .addPreReq(() -> Players.getLocal().getX() < 2638)\n .addSubActivity(() -> Time.sleepUntil(isOnIsland, 1000 * 60 * 10))\n .build();\n\n Activity goToSpawnSpot = Activity.newBuilder()\n .withName(\"Going to my fav spot\")\n .addPreReq(isOnIsland)\n .addSubActivity(() -> moveTo.apply(Players.getLocal().getPosition().translate(0, -31)).run())\n .build();\n\n Activity killStuff = Activity.newBuilder()\n .withName(\"killing stuff\")\n .addPreReq(isOnIsland)\n .addPreReq(() -> Npcs.getNearest(npc -> true) != null)\n .addPreReq(() -> Npcs.getNearest(npc -> true).containsAction(\"Attack\"))\n .addSubActivity(() -> Npcs.getNearest(npc -> true).interact(\"Attack\"))\n .thenSleepUntil(() -> Players.getLocal().getTarget() == null)\n .build();\n\n return Activity.newBuilder()\n // TODO(dmattia): Check for world 344\n .withName(\"Pest Control\")\n .addSubActivity(boardShip)\n .addSubActivity(waitForGameToStart)\n .addSubActivity(goToSpawnSpot)\n .addSubActivity(killStuff)\n .build();\n }", "private void createGame(String name){\n\n }", "public void ovr() {\n\n\t}", "public void setOwner(Owner owner) {\n this.owner = owner;\n }", "@Override\n\t\tpublic String ownerName() {\n\t\t\treturn \"Dog Owner\";\n\t\t}", "public void act() \n {\n playerMovement();\n }", "public String getOwner();", "public GetInRangeAndAimCommand() {\n xController = new PIDController(0.1, 1e-4, 1);\n yController = new PIDController(-0.1, 1e-4, 1);\n xController.setSetpoint(0);\n yController.setSetpoint(0);\n // xController.\n drive = DrivetrainSubsystem.getInstance();\n limelight = Limelight.getInstance();\n // Use addRequirements() here to declare subsystem dependencies.\n addRequirements(drive);\n\n }", "public void act() \n {\n if (canGiveTestimony()) {\n giveTestimony();\n }\n }", "public void setOwner(Person person) \n {\n owner = person;\n }", "public void interact() {\r\n\t\t\r\n\t}", "public void changeOwner(String o){\n owner = o;\r\n }", "public void talkToNpc()\n\t{\n\t\tif(m_map != null)\n\t\t\tgetMap().talkToNpc(this);\n\t}", "public static void main(String[] asd){\nHuman bob = new Human(\"steve\");\nHuman b = new Human(\"chris\");\nHuman bb = new Human(\"nick\");\n\t\t\t//2. create a new Robot army of good and evil robots.\nRobot a = new Robot(\"dog\",true);\nRobot d = new Robot(\"og\",false);\nRobot c = new Robot(\"g\",false);\n\t\t\t\n\t\t\t//3. command your robot to destroy a huma\na.destroy(bb);\n\t\t}", "public GarageDoorOpenCommand( GarageDoor aDoor ) {\r\n door = aDoor;\r\n }", "public void win() {\n displayErrorMessage(\"You Win!\");\n if(controller.aiGame && !controller.loggedIn()){\n controller.switchToLogin();\n }\n else\n controller.switchToLobby();\n }", "@Override\r\n\tpublic void doAction(MedcivGame game) {\n\t\ttry {\r\n\t\t\t((Livestock)game.matchingVillager(ownerId).getItemById(targetId)).setTendedToThisTurn(true);\r\n\t\t}catch(NullPointerException e) {\r\n\t\t\t//do nothing; the cow is dead, or you are\r\n\t\t}\r\n\t}", "void createNewGame(Player player);" ]
[ "0.65683025", "0.5980802", "0.58605576", "0.5832477", "0.58300483", "0.57662714", "0.5656795", "0.56299865", "0.56147516", "0.5601204", "0.5599524", "0.5590864", "0.5568423", "0.55412185", "0.554026", "0.55393916", "0.5538281", "0.5533752", "0.552096", "0.54990613", "0.54613644", "0.5439814", "0.5418448", "0.5413537", "0.5395977", "0.5366236", "0.5356568", "0.5333987", "0.5329367", "0.5311471", "0.53044856", "0.5295564", "0.5285578", "0.5280287", "0.5279964", "0.52748466", "0.5274575", "0.5269007", "0.52610993", "0.525794", "0.5255496", "0.5251712", "0.5251712", "0.525141", "0.5247827", "0.52435404", "0.52426445", "0.52407914", "0.52347946", "0.5230188", "0.5229549", "0.5229549", "0.52269214", "0.52269214", "0.52269214", "0.52269214", "0.5213492", "0.52058375", "0.5205229", "0.52035826", "0.5196601", "0.5196447", "0.51922333", "0.51890475", "0.51845175", "0.5179248", "0.51696795", "0.5169305", "0.5167656", "0.51637626", "0.51562333", "0.5154834", "0.5151494", "0.5151397", "0.5151272", "0.5145658", "0.51456195", "0.5131342", "0.5131092", "0.5129211", "0.51289994", "0.51221174", "0.5116603", "0.5116175", "0.5110684", "0.5108417", "0.51027036", "0.50970566", "0.50954247", "0.5095229", "0.5091529", "0.5090688", "0.5087718", "0.5085608", "0.50852156", "0.50820976", "0.5081958", "0.50815696", "0.5080497", "0.50791836", "0.5069047" ]
0.0
-1
Dismiss the dialog box
@Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void dismiss() {\r\n\t\tmWindow.dismiss();\r\n\t}", "@Override\n public void onDismiss(DialogInterface dialog) {\n }", "@Override\n\t\t\t\tpublic void onDismiss(DialogInterface dialog) {\n\t\t\t\t\tfinish();\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void onDismiss(DialogInterface dialog) {\n\n }", "@Override\n public void onDismiss(DialogInterface dialog) {\n\n }", "void dismissAlertDialog();", "@Override\n public void onDismiss(DialogInterface dialog) {\n\n }", "public void dissmissDialog() {\n if (pdialog != null) {\n if (pdialog.isShowing()) {\n pdialog.dismiss();\n }\n pdialog = null;\n }\n\n }", "@Override\n public void onDismiss(DialogInterface dialog)\n {\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}", "@Override\n public void onBtnClick() {\n dialog.dismiss();\n }", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t}", "protected void dismiss() {\n Message msg = mHandler.obtainMessage(DIALOG_DISMISS);\n mHandler.sendMessage(msg);\n }", "void dismiss();", "private void dismissDialog() {\n if (progressDialog != null) {\n progressDialog.dismiss();\n }\n }", "@Override\n public void onDismiss(DialogInterface arg0) {\n\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\n\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\n\t\t\t\t\t\t\t\t}", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t}", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "public void dismissDialog(){\n\t if(pd != null){\n\t\t pd_progress = pd.getProgress();\n\t\t pd.dismiss();\n\t }\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.dismiss();\n\n }", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.dismiss();\n }", "public void dismiss() {\n mPopupWindow.dismiss();\n }", "private void cancel(){\n\t\tSPSSDialog.instance = null;\n\t\thide();\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\r\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t}", "@Override\n public void onClick(View v) {\n\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n\n }", "@Override\n public void onClick(View v) {\n mDialog.dismiss();\n }", "@Override\n public void onDismiss(DialogInterface dialog) {\n super.dismiss();\n }", "@Override\n public void onClick(View v) {\n\n dialog.dismiss();\n\n }", "@Override\n public void onClick(View v) {\n\n dialog.dismiss();\n\n }", "@Override\n public void onClick(View v) {\n\n dialog.dismiss();\n\n }", "@Override\n public void onClick(View v) {\n\n dialog.dismiss();\n\n }", "@Override\n public void onClick(View v) {\n\n dialog.dismiss();\n\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n\n }", "@Override\n public void onClick(DialogInterface dialog,int id) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int arg1) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}", "public void onClick(DialogInterface dialog, int id) {\n\n dialog.dismiss();\n }", "@Override\n public void onClick(View view) {\n dialog.dismiss();\n\n }", "@Override\r\n\t\t public void onClick(View arg0) {\n\t\t screenDialog.dismiss();\r\n\t\t }", "@Override\r\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\r\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n\n }", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.dismiss();\n }", "@Override\r\n\t public void onClick(DialogInterface dialog, int id) {\n\t \tdialog.dismiss();\r\n\t }", "@Override\r\n\t public void onClick(DialogInterface dialog, int id) {\n\t \tdialog.dismiss();\r\n\t }", "public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t}" ]
[ "0.79436034", "0.79428947", "0.79237866", "0.7920726", "0.7920726", "0.7908979", "0.786646", "0.78418374", "0.783633", "0.78264034", "0.78264034", "0.78258586", "0.78150594", "0.77982855", "0.77958554", "0.77958554", "0.77958554", "0.7795325", "0.7789191", "0.7781171", "0.77690136", "0.7765185", "0.7765185", "0.7755905", "0.7755905", "0.7754644", "0.7742197", "0.7736494", "0.7736494", "0.7736494", "0.7736494", "0.7736494", "0.7736494", "0.7736494", "0.7736494", "0.7735556", "0.77348685", "0.7728999", "0.77263546", "0.7718867", "0.7718864", "0.7715989", "0.7703166", "0.7703166", "0.77010494", "0.7700671", "0.7697951", "0.7694379", "0.76917267", "0.76917267", "0.76917267", "0.76917267", "0.76917267", "0.76899856", "0.76749426", "0.76749426", "0.76749426", "0.76749426", "0.76749426", "0.76749426", "0.7674647", "0.7674647", "0.7669789", "0.7669789", "0.7669789", "0.7669789", "0.76666373", "0.76666373", "0.76666373", "0.7664448", "0.76507396", "0.76507396", "0.76507396", "0.76507396", "0.76507396", "0.76507396", "0.76506495", "0.7647733", "0.7647733", "0.76438636", "0.76438636", "0.76438636", "0.76438636", "0.7642511", "0.7642511", "0.7642511", "0.76333547", "0.7631095", "0.76260364", "0.76196957", "0.76192373", "0.7618463", "0.7618463", "0.76136816", "0.76136816", "0.76101637", "0.76101637", "0.76099944" ]
0.76613224
72
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_detail_dialog, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7249559", "0.7204226", "0.71981144", "0.7180145", "0.7110589", "0.70431244", "0.7041351", "0.70150685", "0.70118093", "0.69832", "0.6947845", "0.69419056", "0.6937257", "0.6920975", "0.6920975", "0.68938893", "0.68867826", "0.6878929", "0.6877472", "0.68656766", "0.68656766", "0.68656766", "0.68656766", "0.68553543", "0.6850232", "0.6822862", "0.68201447", "0.68163574", "0.68163574", "0.6816304", "0.6809227", "0.6803687", "0.6801118", "0.67946446", "0.67919034", "0.67913854", "0.6786644", "0.67618436", "0.6760987", "0.67516655", "0.67475504", "0.67475504", "0.6744612", "0.67433023", "0.6729379", "0.67267543", "0.67261547", "0.67261547", "0.6724336", "0.6714574", "0.67084044", "0.670811", "0.67026806", "0.6701955", "0.670018", "0.6697785", "0.66899645", "0.6687168", "0.6687168", "0.66860044", "0.66835976", "0.6682339", "0.668104", "0.6671387", "0.66706777", "0.6665407", "0.6659777", "0.6659777", "0.6659777", "0.6659032", "0.6658105", "0.6658105", "0.6658105", "0.66553104", "0.6654278", "0.6654054", "0.66521645", "0.6650613", "0.66495895", "0.6649238", "0.66490036", "0.6648245", "0.66481483", "0.6646514", "0.6646321", "0.6645122", "0.66418123", "0.6638334", "0.6636035", "0.6635416", "0.6635416", "0.6635416", "0.6635411", "0.66325295", "0.6631742", "0.66299105", "0.6629049", "0.6627932", "0.66237384", "0.662195", "0.662195" ]
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 == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.79046476", "0.7805623", "0.7766615", "0.77274555", "0.7632045", "0.76220745", "0.75848633", "0.7531134", "0.74884325", "0.74575055", "0.74575055", "0.74388313", "0.74218154", "0.7403308", "0.7391667", "0.7386889", "0.73792624", "0.73705244", "0.7362704", "0.7355958", "0.73457336", "0.73412824", "0.73301464", "0.73288566", "0.73257905", "0.7318758", "0.7316527", "0.7313703", "0.7304158", "0.7304158", "0.7302085", "0.72983634", "0.7293686", "0.72866", "0.7283303", "0.728145", "0.72787505", "0.7260023", "0.7260023", "0.7260023", "0.7259934", "0.72594047", "0.7249977", "0.72246146", "0.7219595", "0.72166914", "0.7204287", "0.72013676", "0.72004634", "0.71934885", "0.7185269", "0.7177778", "0.71687645", "0.7167653", "0.71539253", "0.7153525", "0.7136213", "0.7134901", "0.7134901", "0.7129261", "0.7129006", "0.71241", "0.712339", "0.71232814", "0.71220535", "0.7117341", "0.7117331", "0.7117331", "0.7117331", "0.7117331", "0.71168953", "0.71166164", "0.71150327", "0.71121156", "0.71098715", "0.7108862", "0.7105525", "0.7099833", "0.7098193", "0.7095489", "0.709369", "0.709369", "0.70865035", "0.7083285", "0.70810497", "0.70802194", "0.70737916", "0.7068235", "0.70619094", "0.70604193", "0.7060166", "0.7051441", "0.70377", "0.70377", "0.7035963", "0.703536", "0.703536", "0.70326227", "0.703064", "0.70297664", "0.7018773" ]
0.0
-1
/setProperty getProperty of Properties
public static void main(String[] args) { Properties props = new Properties(); props.setProperty("one", "Mot"); props.setProperty("school", "Truong Hoc"); props.setProperty("university", "Truong Dai Hoc"); props.setProperty("love", "Tinh Yeu"); props.setProperty("education", "Giao Duc"); String mean1 = props.getProperty("university"); System.out.println(mean1); String mean2 = props.getProperty("computer"); System.out.println(mean2); String mean3 = props.getProperty("computer","word not found"); System.out.println(mean3); /*Write properties file*/ String path = "c:/temp/dictionary.properties"; try { props.store(new FileWriter(path), "Dictionary"); System.out.println("Write file successfully!"); } catch (IOException e) { System.out.println("File not found!"); } /*Read properties file*/ Properties props2 = new Properties(); try { props2.load(new FileReader(path)); System.out.println("Read file successfully!"); System.out.println(props2.toString()); } catch (FileNotFoundException e) { System.out.println("File not found!"); } catch (IOException e) { System.out.println("File not found!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void setProperty(Properties prop) {\n\t}", "public void setProperty(String property) {\n }", "PropertiesTask setProperty( String key, String value );", "Property getProperty();", "Property getProperty();", "public void setProperty(Properties properties) {\r\n this.properties = properties;\r\n }", "java.lang.String getProperty();", "@Override\n\tpublic void setProperty(String propertyName, Object value) {\n\t\t\n\t}", "public void setProperty(String name,Object value);", "public void setProperty(String property) {\n \t\t_property = property;\n \t}", "@Override\n\t\tpublic void setProperty(String key, Object value) {\n\n\t\t}", "void setProperty(String key, Object value);", "public void setProperty(String key, Object value);", "public void setProperty( String key, Object value );", "private static void setPropertyValue(Properties properties, String propertyName, String value) {\n \n properties.setProperty(propertyName, getPropertyValueOrDefault(value));\n }", "String getProperty(String property);", "public void setProperty(String property) {\n\t\tthis.property = property;\n\t}", "@Override\n\tpublic void setProperties(Properties p) {\n\t\t\n\t}", "String getProperty();", "String getProperty();", "String getProperty();", "public static void setProperty(String propertyName, String propertyValue){\r\n if (propertyValue == null)\r\n userProps.remove(propertyName);\r\n else\r\n userProps.put(propertyName, propertyValue);\r\n }", "public abstract void setProperty(String property, Object value)\n throws SOAPException;", "public void setProperty(Object key, Object value) {\r\n\t\tproperties.put(key, value);\r\n\t}", "@Override\n\tpublic void setProperty(String name, Object value)\n\t{\n\t\tsuper.setProperty(name, value);\n\n\t\tprocessProperty(name, value);\n\t}", "@Override\n\tpublic void setProperty(String name, Object value)\n\t{\n\t\tsuper.setProperty(name, value);\n\n\t\tprocessProperty(name, value);\n\t}", "public String getProperty();", "public void setProperty(String name, String value) {\n\t\tif (value!=null)\n\t\t testProperties.setProperty(name, value);\n\t}", "protected void setProperty(java.lang.String propertyName, java.lang.Object propertyValue) {\n properties.put(propertyName, propertyValue);\n }", "public void setProperty(String propertyName, boolean value);", "String getProperty(String name);", "@Before(order=0)\n\tpublic void getProperty() {\n\t\tconfigReader = new ConfigReaders();\n\t\tprop = configReader.init_prop();\n\t\t\n\t}", "public void setProperty(String key, String value) {\n\t\tthis.properties.setProperty(key, value);\n\t}", "PropertiesTask setProperties( Properties properties );", "public static void setProperty(String property, String value) {\n\t\tproperties.setProperty(property, value);\n\t}", "@Override\r\n\tpublic void setPropFile(Properties prop) {\n\t\t\r\n\t}", "public void setProperty(String key, String value) {\n\t\tthis.properties.put(key, value);\n\t}", "@Override\r\n\tpublic Object setProperty(String key, String value) {\r\n\t\t\r\n\t\treturn Settings.setProperty(key, value);\r\n\t\t\r\n\t}", "public Object setProperty(String key, String value) {\n return this.props.setProperty(key, value);\n }", "public void setProperties(Properties properties);", "Object getProperty(String name);", "public void setProperty(String arg0, Object arg1)\n throws UniquePropertyValueConflictException,\n\n EntityPersistenceException {\n\n }", "public void setProperty(String name, String value)\n\t{\n\t\tprops.setProperty(name, value);\n\t}", "@Override\r\n\tpublic void setProperties(Properties properties) \r\n\t{\n\t}", "Object getPropertytrue();", "public void setProperty(java.lang.String propertyName, java.lang.String propertyValue) {\n properties.put(propertyName, propertyValue);\n }", "public String getProperty(String name);", "@Override\n public Object getProperty(String name) {\n name = name.toLowerCase();\n return this.properties.get(name);\n }", "public void setProperty(String prop, Object value)\r\n {\r\n\tswitch(prop)\r\n\t{\r\n\t case \"name\":\r\n\t\tname = value.toString();\r\n\t\tbreak;\r\n\t case \"description\":\r\n\t\tdesc = value.toString();\r\n\t\tbreak;\r\n\t case \"type\":\r\n\t\tsetType(value.toString());\r\n\t\tbreak;\r\n\t case \"level\":\r\n\t\tlevel = (Integer) value;\r\n\t\tbreak;\r\n\t case \"rarity\":\r\n\t\trare = Rarity.valueOf(value.toString().toUpperCase());\r\n\t\tbreak;\r\n\t case \"vendor_value\":\r\n\t\tvendorValue = (Integer) value;\r\n\t\tbreak;\r\n\t case \"game_types\":\r\n\t\taddGameType(value.toString());\r\n\t\tbreak;\r\n\t case \"flags\":\r\n\t\taddFlag(value.toString());\r\n\t\tbreak;\r\n\t case \"restrictions\":\r\n\t\taddRestriction(value.toString());\r\n\t\tbreak;\r\n\t case \"id\":\r\n\t\tid = (Integer) value;\r\n\t\tbreak;\r\n\t case \"icon\":\r\n\t\ttry {\r\n\t\t icon = new URL(value.toString());\r\n\t\t}\r\n\t\tcatch(MalformedURLException e) {\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t\tbreak;\r\n\t}\r\n }", "@Override\r\n\tpublic void setProperties(Properties properties) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void setProperties(Properties arg0) {\n\r\n\t}", "private static void setProperty(String key, String value)\r\n/* 84: */ throws IOException\r\n/* 85: */ {\r\n/* 86: 83 */ log.finest(\"OSHandler.setProperty. Key=\" + key + \" Value=\" + value);\r\n/* 87: 84 */ File propsFile = getPropertiesFile();\r\n/* 88: 85 */ FileInputStream fis = new FileInputStream(propsFile);\r\n/* 89: 86 */ Properties props = new Properties();\r\n/* 90: 87 */ props.load(fis);\r\n/* 91: 88 */ props.setProperty(key, value);\r\n/* 92: 89 */ FileOutputStream fos = new FileOutputStream(propsFile);\r\n/* 93: 90 */ props.store(fos, \"\");\r\n/* 94: 91 */ fos.close();\r\n/* 95: */ }", "public void setProperty(String name, Object value)\n {\n if (additionalProperties == null)\n {\n additionalProperties = new HashMap<String, Object>();\n }\n additionalProperties.put(name, value);\n }", "protected void setProperties(P[] properties) {\n\t\tthis.properties = properties;\n\t}", "Properties modifyProperties(Properties properties);", "void setProperty(String attribute, String value);", "public void setProperty(String name,Object value)\n {\n ClassAnalyzer.setProperty(m_Source,name,value);\n }", "public String getProperty(String propertyName) throws CoreException;", "Object getProperty(String key);", "public void setProperty(final String property, final String value) {\n\n\t\tthis.engine.setProperty(property, value);\n\t}", "String getProperty(String key);", "String getProperty(String key);", "String getProperty(String key);", "public Properties getProperty() {\r\n return properties;\r\n }", "void addOrReplaceProperty(Property prop, Collection<Property> properties);", "public abstract Object getProperty(String property) throws SOAPException;", "private static void setProperty(final GenericConfiguration config, final String key, final String value) {\n\t\t//Resolve system properties, so that they can be used in config values\n\t\tString val = CRUtil.resolveSystemProperties((String) value);\n\n\t\t//Set the property\n\t\tconfig.set(key, val);\n\t}", "private String getProperty(\n String name\n ) {\n return properties.getProperty(\n String.format(\"%s%s\", propertiesPrefix, name)\n );\n }", "public\n void setProperties(YutilProperties argprops)\n {\n if (argprops == null)\n return;\n\n // Copy all key/val pairs\n for (Enumeration ep = argprops.propertyNames(); ep.hasMoreElements(); )\n {\n String key = (String)ep.nextElement();\n String val = key + \"=\" + argprops.getProperty(key);\n setProperties(val, false);\n }\n }", "public void setProperties(Properties properties) {\n this.properties=properties;\n }", "void setMyProperty1(Integer a) {}", "public <T> T getProperty(String name) {\n return properties.get(name);\n }", "Object getProperty(String requestedProperty) {\n return properties.getProperty(requestedProperty);\n }", "public Object setProperty( Property propertyId,\n Object value ) {\n if (value == null) {\n // Removing this property ...\n return nodeProperties != null ? nodeProperties.remove(propertyId) : null;\n }\n // Otherwise, we're adding the property\n if (nodeProperties == null) nodeProperties = new TreeMap<Property, Object>();\n return nodeProperties.put(propertyId, value);\n }", "public abstract boolean getProperty(String propertyName);", "Object getProperty(Long id, String name) throws RemoteException;", "public Object getProperty(String propertyName){\n return properties.get(propertyName);\n }", "@Override\n public String getProperty(String s) {\n return null;\n }", "public void setProperty(String name, String value) {\n PropertyHelper.getPropertyHelper(this).\n setProperty(null, name, value, true);\n }", "void writeProperties(java.util.Properties p) {\n }", "public Object getProperty(Object key) {\r\n\t\treturn properties.get(key);\r\n\t}", "public void setProperties(Map properties);", "public Object getProperty(String name) {\n return properties.get(name);\n }", "@Override\r\n\tpublic String getProp(final String propName) {\n\t\treturn exec(new Callable<String>() {\r\n\t\t\t@Override\r\n\t\t\tpublic String call() throws Exception {\r\n\t\t\t\treturn System.getProperty(propName);\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void setProperty(java.lang.String name, java.lang.Object value)\n throws javax.xml.bind.PropertyException\n {\n super.setProperty(name, value);\n }", "public void setSetPropertyTarget(String setPropertyTarget) {\n \n this.setPropertyTarget = setPropertyTarget;\n }", "String getProperty(String name, String defaultValue);", "Property createProperty();", "public void testSetProperty() {\n rootBlog.setProperty(Blog.NAME_KEY, \"New name\");\n assertEquals(\"New name\", rootBlog.getProperty(Blog.NAME_KEY));\n assertEquals(\"New name\", rootBlog.getName());\n\n // and a new property\n rootBlog.setProperty(\"aNewPropertyKey\", \"A new property value\");\n assertEquals(\"A new property value\", rootBlog.getProperty(\"aNewPropertyKey\"));\n }", "@Override\n\tpublic String getProperty(String property)\n\t{\n\t\tString value = super.getProperty(property.trim());\n\t\tif (value == null)\n\t\t\treturn null;\n\t\t\n\t\taddRequestedProperty(property, value);\n\t\t\t\t\n\t\tint i1 = value.indexOf(\"<property:\");\n\t\twhile (i1 >= 0)\n\t\t{\n\t\t\tint i2 = value.substring(i1).indexOf(\">\")+i1;\n\t\t\tif (i2 < 0)\n\t\t\t\ti2 = value.length();\n\t\t\t\n\t\t\tif (i2 > i1+10)\n\t\t\t{\n\t\t\t\tString p = value.substring(i1+10, i2);\n\t\t\t\tif (super.containsKey(p))\n\t\t\t\t{\n\t\t\t\t\tString v = super.getProperty(p);\n\t\t\t\t\tvalue = value.substring(0,i1)+v+value.substring(i2+1);\n\t\t\t\t} \n\t\t\t\telse\n\t\t\t\t\treturn \"ERROR: Property \"+p+\" is not specified in the properties file\";\n\t\t\t}\n\t\t\ti1 = value.indexOf(\"<property:\");\n\t\t}\n\n\t\ti1 = value.indexOf(\"<env:\");\n\t\twhile (i1 >= 0)\n\t\t{\n\t\t\tint i2 = value.indexOf(\">\");\n\t\t\tif (i2 > i1+5)\n\t\t\t{\n\t\t\t\tString p = value.substring(i1+5, i2);\n\t\t\t\tString v = System.getenv(p);\n\t\t\t\tif (v != null)\n\t\t\t\t\tvalue = value.substring(0,i1)+v+value.substring(i2+1);\n\t\t\t\telse\n\t\t\t\t\treturn \"ERROR: Property \"+p+\" is not specified in the user's environment\";\n\t\t\t}\n\t\t\ti1 = value.indexOf(\"<env:\");\n\t\t}\n\n\t\treturn value.trim();\n\t}", "public void setProperties(String primitive, AnimationProperties properties){\r\n\t\tpropMap.put(primitive, properties);\r\n\t}", "public void setProperties(Properties properties)\n {\n this.properties = properties;\n }", "public void setStringProperty(String propertyName,String propertyValue) throws UtilsException;", "public void setProperties(Properties properties) {\n\t\tthis.properties = properties;\n\t}", "private static void transferProperty(final Properties tableProperties,\n final Map<String, String> jobProperties, Keys propertyToTransfer, boolean required) {\n String value = tableProperties.getProperty(propertyToTransfer.getKey());\n if (value != null) {\n jobProperties.put(propertyToTransfer.getKey(), value);\n } else if (required) {\n throw new IllegalArgumentException(\"Property \" + propertyToTransfer.getKey()\n + \" not found in the table properties.\");\n }\n }", "T setSystemProperty(String key, String value);", "public void setProperties(String prefix, Properties setList);", "public String getProperty(String name){\r\n\t\treturn properties.getProperty(name);\r\n\t}", "protected abstract Property createProperty(String key, Object value);", "protected abstract void loadProperty(String key, String value);", "Form setProperty(String key, String value);" ]
[ "0.7959971", "0.7601533", "0.749231", "0.73415285", "0.73415285", "0.7282543", "0.7175118", "0.7147031", "0.7103762", "0.7060796", "0.70065725", "0.69958115", "0.69805187", "0.690755", "0.6894582", "0.68712425", "0.68591493", "0.6834786", "0.67905027", "0.67905027", "0.67905027", "0.6720772", "0.67141724", "0.6637558", "0.66143423", "0.66143423", "0.6586175", "0.65784115", "0.65567154", "0.6551353", "0.65458715", "0.65352666", "0.6532297", "0.6525609", "0.65245605", "0.6522955", "0.6510391", "0.65029806", "0.6492082", "0.6484762", "0.6478516", "0.6463012", "0.64505386", "0.64430505", "0.643703", "0.6435124", "0.64167386", "0.64149344", "0.64022875", "0.63766897", "0.6357846", "0.63411015", "0.6327463", "0.63198054", "0.6319243", "0.6312415", "0.6294693", "0.6291273", "0.6288982", "0.62881315", "0.62612665", "0.62612665", "0.62612665", "0.62539387", "0.6240868", "0.62315077", "0.62209445", "0.621138", "0.6178976", "0.616839", "0.6148622", "0.6142514", "0.6139965", "0.61314464", "0.6122038", "0.6111384", "0.61111504", "0.6110701", "0.6109628", "0.6109401", "0.6089204", "0.6082697", "0.60652333", "0.60611296", "0.6059168", "0.605414", "0.6044042", "0.60328937", "0.60294557", "0.6023468", "0.60172105", "0.60017717", "0.59875953", "0.5985038", "0.5979445", "0.59742814", "0.59709823", "0.59672505", "0.59631836", "0.595613", "0.5953711" ]
0.0
-1
Gets the date value for this ForecastDayInfo.
public java.util.Calendar getDate() { return date; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Number getDayDate() {\n return (Number) getAttributeInternal(DAYDATE);\n }", "public Date getDate(){\n\t\treturn day.date;\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 io.dstore.values.TimestampValue getDay() {\n return day_ == null ? io.dstore.values.TimestampValue.getDefaultInstance() : day_;\n }", "public Date getDay() {\n return day;\n }", "public io.dstore.values.TimestampValue getDay() {\n if (dayBuilder_ == null) {\n return day_ == null ? io.dstore.values.TimestampValue.getDefaultInstance() : day_;\n } else {\n return dayBuilder_.getMessage();\n }\n }", "@java.lang.Override public int getDayValue() {\n return day_;\n }", "@java.lang.Override public int getDayValue() {\n return day_;\n }", "public final Date dateValue() {\n if (calValue != null)\n return calValue.getTime();\n else\n return null;\n }", "public io.dstore.values.StringValue getDay() {\n return day_ == null ? io.dstore.values.StringValue.getDefaultInstance() : day_;\n }", "private Date getdDay() {\n\t\treturn this.dDay;\r\n\t}", "public java.lang.String getDay() {\r\n return localDay;\r\n }", "public java.lang.String getDay() {\r\n return localDay;\r\n }", "public int getDate() {\n\t\treturn date.getDayOfMonth();\n\t}", "public Integer getDay()\n {\n return this.day;\n }", "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 }", "public int getDay() {\r\n\t\treturn (this.day);\r\n\t}", "public Date getDate()\n\t{\n\t\tif (m_nType == AT_DATE)\n\t\t\treturn (Date)m_oData;\n\t\telse\n\t\t\treturn null;\n\t}", "public java.util.Date getValue() {\n return this.value;\n }", "public String getDay() {\n\n\t\treturn day;\n\t}", "public String getDay() {\n\t\treturn day;\n\t}", "public Date getDataFine() {\n return (Date)this.getCampo(nomeDataFine).getValore();\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 int getDay() {\n\t\treturn this.day;\n\t}", "public int getDay() {\n\t\treturn this.day;\n\t}", "public int getDay() {\r\n return day;\r\n }", "public String getDay() {\n return this.day;\n }", "@Override\n public int getDate() {\n return this.deadline.getDay();\n }", "public io.dstore.values.TimestampValue getToDay() {\n return toDay_ == null ? io.dstore.values.TimestampValue.getDefaultInstance() : toDay_;\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}", "public int getDay()\n {\n return day;\n }", "public int getDay() {\r\n return FormatUtils.uint8ToInt(mDay);\r\n }", "public int GetDay(){\n\t\treturn this.date.get(Calendar.DAY_OF_WEEK);\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(){\n\t\treturn day;\n\t}", "public io.dstore.values.TimestampValue getToDay() {\n if (toDayBuilder_ == null) {\n return toDay_ == null ? io.dstore.values.TimestampValue.getDefaultInstance() : toDay_;\n } else {\n return toDayBuilder_.getMessage();\n }\n }", "public io.dstore.values.TimestampValue getFromDay() {\n return fromDay_ == null ? io.dstore.values.TimestampValue.getDefaultInstance() : fromDay_;\n }", "public Date getdate() {\n\t\treturn new Date(date.getTime());\n\t}", "public Date getAsDate()\n {\n // Nope, shouldn't do that\n if (isASAP() || isNEVER()) {\n return null;\n }\n\n // The value of 3506716800000000L is the BAT as at midnight on\n // 1-Jan-1970, which is the base of the time that the system\n // gives us. It has to be adjusted for leap seconds though.\n return new Date((itsValue - DUTC.get() * 1000000L - 3506716800000000L) / 1000L);\n }", "public Date getDate() {\n DateTimeField dateField = obtainField(FieldName.DATE);\n if (dateField == null)\n return null;\n\n return dateField.getDate();\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 byte getDay() {\r\n return day;\r\n }", "public int getDay() {\n\treturn day;\n }", "public int getDay() {\n return day;\n }", "public Date getDEAL_VALUE_DATE() {\r\n return DEAL_VALUE_DATE;\r\n }", "public byte getDay() {\n return day;\n }", "Integer getDay();", "public DateInfo getDateInfo() {\n return dateInfo;\n }", "public byte getDay() {\n return day;\n }", "public byte getDay() {\n return day;\n }", "public byte getDay() {\n return day;\n }", "public byte getDay() {\n return day;\n }", "public io.dstore.values.TimestampValueOrBuilder getDayOrBuilder() {\n return getDay();\n }", "public void setDayDate(Number value) {\n setAttributeInternal(DAYDATE, value);\n }", "private Date getDataFine() {\n return (Date)this.getCampo(DialogoStatistiche.nomeDataFine).getValore();\n }", "public Date getDate() {\r\n\t\treturn date;\r\n\t}", "public Date getDate() {\r\n\t\treturn date;\r\n\t}", "public io.dstore.values.TimestampValue getFromDay() {\n if (fromDayBuilder_ == null) {\n return fromDay_ == null ? io.dstore.values.TimestampValue.getDefaultInstance() : fromDay_;\n } else {\n return fromDayBuilder_.getMessage();\n }\n }", "public LocalDate getFecha() {\n\t\treturn fecha;\n\t}", "public Date getDate() {\r\n\t\treturn this.date;\r\n\t}", "public io.dstore.values.TimestampValueOrBuilder getDayOrBuilder() {\n if (dayBuilder_ != null) {\n return dayBuilder_.getMessageOrBuilder();\n } else {\n return day_ == null ?\n io.dstore.values.TimestampValue.getDefaultInstance() : day_;\n }\n }", "public String getEventDate() {\n\t\treturn date;\n\t}", "public java.lang.String getDate() {\n return date;\n }", "@HippoEssentialsGenerated(internalName = \"katharsisexampleshippo:date\")\n public Calendar getDate() {\n return getProperty(DATE);\n }", "public java.util.Calendar getDBizDay() {\n return dBizDay;\n }", "public Date getDate() {\n\t\treturn date;\n\t}", "public Date getDate() {\n\t\treturn date;\n\t}", "public Date getDeliveryDate() {\n return (Date) getAttributeInternal(DELIVERYDATE);\n }", "public String getDate()\n\t\t{\n\t\t\treturn date;\n\t\t}", "LocalDate getDate();", "public LocalDate getDate() {\n\t\treturn this.date;\n\t}", "public Date getBudgetDate() {\n return (Date) getAttributeInternal(BUDGETDATE);\n }", "io.dstore.values.TimestampValue getDay();", "public Date getDeliveryDate() {\n return (Date)getAttributeInternal(DELIVERYDATE);\n }", "public Date getDate()\n\t{\n\t\treturn date;\n\t}", "public String getDate() {\r\n\t\treturn date;\r\n\t}", "public String Get_date() \n {\n \n return date;\n }", "public DateInfo getDate() {\r\n\t\treturn new DateInfo(super.getDate());\r\n\t\t//return new DateInfo(maturityDate);\r\n\t}", "public String getDate() {\r\n\t\treturn this.date;\r\n\t}", "public java.util.Date getADateDataSourceValue() {\r\n return aDateDataSourceValue;\r\n }", "public Date getDate() {\r\n return date;\r\n }", "public Date getDate() {\r\n return date;\r\n }", "public Date getDate() {\r\n return date;\r\n }", "public String getDate() {\r\n return date;\r\n }", "public Date getDate() {\n\t\treturn date_;\n\t}", "public String getEventDate() {\n return eventDate.format(INPUT_FORMATTER);\n }", "public Date getDate() {\n\t\treturn _date;\n\t}", "public String getdate() {\n\t\treturn date;\n\t}", "public Fecha getFecha() {\n\t\treturn mFecha;\n\t}", "public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}", "public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}", "public String getDate() {\n\t\treturn date;\n\t}", "public String getDate() {\n\t\treturn date;\n\t}", "public String getDay() {\n return day.getText();\n }" ]
[ "0.73801005", "0.6871333", "0.67295533", "0.67295533", "0.67295533", "0.67295533", "0.67295533", "0.6712469", "0.66618407", "0.6583525", "0.65774685", "0.6542826", "0.6498969", "0.6401733", "0.6385238", "0.63330454", "0.63330454", "0.62140423", "0.6183526", "0.6180505", "0.61686975", "0.6167241", "0.61589086", "0.61526716", "0.6147068", "0.6142591", "0.6123645", "0.612032", "0.612032", "0.611998", "0.6116099", "0.6115704", "0.6095193", "0.60714227", "0.60714227", "0.60714227", "0.60508233", "0.60322815", "0.60108596", "0.6009326", "0.5995417", "0.598549", "0.598131", "0.5978049", "0.59767395", "0.59545255", "0.59533286", "0.5948129", "0.59395915", "0.5935796", "0.5935292", "0.59121734", "0.59082055", "0.5898903", "0.58891696", "0.5883056", "0.5882807", "0.5882807", "0.5882807", "0.5832161", "0.58312684", "0.58254", "0.58103853", "0.58103853", "0.5805642", "0.57940894", "0.5790065", "0.57895", "0.57867277", "0.5783099", "0.57787526", "0.5774194", "0.5773715", "0.5773715", "0.57731843", "0.57725143", "0.5767221", "0.57665986", "0.5765285", "0.5765191", "0.57618624", "0.57603675", "0.57583773", "0.5753479", "0.57534456", "0.57497144", "0.5749553", "0.57462656", "0.57462656", "0.57462656", "0.57422036", "0.57397735", "0.57333064", "0.5727021", "0.5726651", "0.57205075", "0.5719749", "0.5719749", "0.5719158", "0.5719158", "0.57150984" ]
0.0
-1
Sets the date value for this ForecastDayInfo.
public void setDate(java.util.Calendar date) { this.date = date; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDayDate(Number value) {\n setAttributeInternal(DAYDATE, value);\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) {\r\n this.day = day;\r\n }", "public void setDay(Date day) {\n this.day = day;\n }", "public void setDate(java.util.Calendar value) {\r\n\t\tBase.set(this.model, this.getResource(), DATE, value);\r\n\t}", "public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}", "public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}", "public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}", "void setDate(Date data);", "public void setDate(final Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n mDate = date;\n }", "public final void setDate(LocalDate date) {\n dateProperty().set(date);\n }", "public void setDate(Date date) {\n\t\n\t\tthis.date = date;\n\t\n\t}", "public void setDate(Date date) {\r\n this.date = date;\r\n }", "public void setDate( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), DATE, value);\r\n\t}", "public void setDate(Date date) {\n\t\tthis.date = date;\n\t}", "public void setDate(Date date) {\n\t\tthis.date = date;\n\t}", "public void setDate(Date date) {\n\t\tthis.date = date;\n\t}", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setBudgetDate(Date value) {\n setAttributeInternal(BUDGETDATE, value);\n }", "public void setDate(Date date) {\n\t\tthis._date = date;\n\t}", "public void setDate(Calendar date) {\r\n\t\tthis.date = date;\r\n\t}", "public void SetDate(Date date);", "public void setDate(Date date) {\n\t\t\n\t\tdate_ = date;\n\t}", "public void setDate() {\n this.date = new Date();\n }", "@Override\n\t\t\tpublic void setValue(Date value) {\n\t\t\t\tsuper.setValue(value);\n\t\t\t\tstart_cal_date = value.getTime();\n\t\t\t\tinfo_loader.load();\n\t\t\t}", "public void setDate(Calendar date) {\n\tthis.date = date;\n }", "public void setDate(Date date) {\n setDate(date, null);\n }", "public void setDate(Calendar date)\n {\n this.date = date;\n }", "public void setDate(Date date) {\n if (date != null) {\n this.mDate = (Date) date.clone();\n } else {\n Logger.d(TAG, \"The date is null\");\n }\n }", "public void setDate(LocalDate date) {\n this.date = date;\n }", "private void setDate() {\n\t\tthis.date = Integer.parseInt(this.year + String.format(\"%02d\", this.calenderWeek));\n\n\t}", "public void setCalendarDay(int day)\n {\n this.currentCalendar.set(Calendar.DAY_OF_MONTH, day);\n }", "public void setDate(int dt) {\n date = dt;\n }", "public void setDate(int month, int day) {\r\n this.month = month;\r\n this.day = day;\r\n }", "public void setValue(java.util.Date value) {\n this.value = value;\n }", "public void setDate(LocalDate date) {\n\t\tthis.date = date;\n\t}", "public void setToDate(Date value) {\n setAttributeInternal(TODATE, value);\n }", "public void setServiceDate(java.util.Date value);", "public void setDate(String date) {\r\n this.date = date;\r\n }", "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(Date date) {\r\n \t\tthis.startDate = date;\r\n \t}", "public void setData (Date date) {\r\n\t\tthis.data=date;\r\n\t\t\r\n\t}", "public void setDeliveryDate(Date value) {\n setAttributeInternal(DELIVERYDATE, value);\n }", "public void setDeliveryDate(Date value) {\n setAttributeInternal(DELIVERYDATE, value);\n }", "void setDate(java.lang.String date);", "public static void setDate(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.util.Calendar value) {\r\n\t\tBase.set(model, instanceResource, DATE, value);\r\n\t}", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(long value) {\n this.date = value;\n }", "public void setDate(String date) {\n\t\tthis.date = date;\n\t}", "public void setDate(String date) {\n\t\tthis.date = date;\n\t}", "public StockEvent setDate(Date date) {\n this.date = date;\n return this;\n }", "public void setDate(java.lang.String date) {\n this.date = date;\n }", "public void setDate(int date){\n this.date = date;\n }", "public void setDate(Date date) {\n if (date != null) {\n this.mDate = (Date) date.clone();\n } else {\n this.mDate = null;\n }\n }", "private void setDate() {\n Date date = new Date();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n datetxt2.setText(sdf.format(date));\n }", "public void setDate(String date){\n this.date = date;\n }", "public void setDay(int day) {\r\n this.day = day;\r\n }", "public void setDate(String date){\n this.date = date;\n }", "public static void setDate( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, DATE, value);\r\n\t}", "public void setDay(java.lang.String param) {\r\n localDayTracker = param != null;\r\n\r\n this.localDay = param;\r\n }", "public void setDay(java.lang.String param) {\r\n localDayTracker = param != null;\r\n\r\n this.localDay = param;\r\n }", "public void setDate(NSDate date) {\n timeLabel.setText(timeFormatter.format(new NSDate(), date));\n setNeedsDisplay();\n }", "@Override\n\tprotected void setDate() {\n\n\t}", "public void setDate(long date) {\r\n\t\tthis.date = new Date(date);\r\n\t}", "public void setDate(String eDate) {\n\t\tmDate = eDate;\n\t}", "public void setDate(int month, int day) {\r\n\t\tString dayString = \"\";\r\n\t\tif(day < 10)\r\n\t\t{\r\n\t\t\tfor(int i = 0; i < 10; i++)\r\n\t\t\t{\r\n\t\t\t\tif(day == i)\r\n\t\t\t\t{\r\n\t\t\t\t\tdayString = \"0\" + i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.date = month + \"-\" + dayString;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthis.date = month + \"-\" + day;\r\n\t\t}\r\n\t}", "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 setDate(long date) {\n\t\tthis.date = date;\n\t}", "public void setDay(final int day) {\n\t\tthis.day = day;\n\t}", "public void setDay(final short day) {\r\n\t\tthis.day = day;\r\n\t}", "public void setEffDate(Date value) {\r\n this.effDate = value;\r\n }", "public com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder setDate(long value) {\n validate(fields()[5], value);\n this.date = value;\n fieldSetFlags()[5] = true;\n return this;\n }", "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 void setEnterDate(Date value) {\r\n setAttributeInternal(ENTERDATE, value);\r\n }", "public void setDay(int day)\n {\n this.day = day;\n }", "public void setDate (String s) {\n date = s;\n }", "public void setDay(byte value) {\n this.day = value;\n }", "public void setDate(String d) {\n\t\tdate = d;\n\t\tif (super.getPubDate() != null)\n\t\t\tsuper.setPubDate(d);\n\t\tdate = d;\n\t}", "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 void setDay(byte value) {\r\n this.day = value;\r\n }", "public void setFecha(LocalDate fecha) {\n\t\tthis.fecha = fecha;\n\t}", "public void setDateTime(Date date)\n\t{\n\t\tint nHour, nMin;\n\n\t\tCalendar cal = Calendar.getInstance(); //Get calender\n\t\tcal.setTime(date); //Set given date\n\t\tnHour = cal.get(Calendar.HOUR_OF_DAY);\n\t\tnMin = cal.get(Calendar.MINUTE);\n\n\t\tsetDateTime(nHour, nMin, date);\n\t}" ]
[ "0.7376086", "0.684865", "0.684865", "0.684865", "0.684865", "0.684865", "0.6804704", "0.68018013", "0.6665542", "0.6665542", "0.6665542", "0.6614127", "0.66108096", "0.660753", "0.6605846", "0.66051394", "0.6591596", "0.65558845", "0.65501946", "0.65501946", "0.65501946", "0.6532154", "0.6532154", "0.6532154", "0.6532154", "0.6532154", "0.6532154", "0.6532154", "0.6532154", "0.6532154", "0.65134877", "0.6505627", "0.6493483", "0.64822495", "0.6481543", "0.645824", "0.64418066", "0.63881445", "0.6364795", "0.6361487", "0.62990314", "0.62652385", "0.625701", "0.62491345", "0.62189215", "0.621548", "0.6213188", "0.62103236", "0.62069756", "0.620563", "0.62026", "0.61891794", "0.617438", "0.6172765", "0.6157945", "0.6157945", "0.6145434", "0.61422837", "0.61421824", "0.61421824", "0.61421824", "0.61421824", "0.61421824", "0.6099091", "0.6076662", "0.6076662", "0.60687166", "0.6068424", "0.606521", "0.60479236", "0.6038115", "0.6026735", "0.60150284", "0.60059804", "0.59975183", "0.59924805", "0.59924805", "0.5985089", "0.59824425", "0.59818935", "0.59740025", "0.597158", "0.59553325", "0.59553325", "0.5950322", "0.5937639", "0.59333694", "0.59158015", "0.5912645", "0.59125817", "0.5903327", "0.5901944", "0.58973783", "0.58907855", "0.58879584", "0.58842725", "0.58592075", "0.5857174", "0.58541113" ]
0.6393532
38
Gets the condition value for this ForecastDayInfo.
public WeatherCondition getCondition() { return condition; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Condition getCondition(){\n\t\treturn this.cond;\n\t}", "public int getCondition() {\r\n\t\tif(this.condition == null){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn this.condition.ordinal();\r\n\t}", "int getConditionValue();", "public String getCondition() {\n\t\treturn condition;\n\t}", "public String getCondition() {\n return condition;\n }", "public OverallCondition getCondition() {\n return condition;\n }", "public Condition getCondition() {\n return condition;\n }", "public Object getCondition();", "public Expression getCondition()\n {\n return this.condition;\n }", "String getCondition();", "OclExpression getCondition();", "Event getCondition();", "public String getCondition() {\n\treturn condition;\n}", "java.lang.String getCondition();", "public ExpressionNode getCondition();", "cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();", "@Override\n\tpublic VehicleCondition getCondition() {\n\t\treturn condition;\n\t}", "public String getFixedCondition() {\n return _fixedCondition;\n }", "com.google.protobuf.ByteString getConditionBytes();", "public java.util.List<IdDt> getCondition() { \n\t\tif (myCondition == null) {\n\t\t\tmyCondition = new java.util.ArrayList<IdDt>();\n\t\t}\n\t\treturn myCondition;\n\t}", "public Reference condition() {\n return getObject(Reference.class, FhirPropertyNames.PROPERTY_CONDITION);\n }", "io.grpc.user.task.PriceCondition getCondition();", "public int getConditionCode() {\n\t\t\treturn conditionCode;\n\t\t}", "public int getAviodCondition() {\n\t\t\treturn aviodCondition;\n\t\t}", "public Long getConditionId() {\n return _conditionId;\n }", "public Condition getCondition() {\n\t\treturn new MoveDistanceCondition(5,5);\n\t}", "cn.infinivision.dataforce.busybee.pb.meta.ExprOrBuilder getConditionOrBuilder();", "ICDICondition getCondition() throws CDIException;", "@Override\n public ConditionType getConditionType() {\n return typeLookup.get(_cfRule.getType());\n }", "public Long getConditionid() {\r\n return conditionid;\r\n }", "@Override\n\tpublic String getCondition() {\n\t\treturn \"\";\n\t}", "public void setCondition(WeatherCondition condition) {\n this.condition = condition;\n }", "public String getJobCondition() {\n return jobCondition;\n }", "public String getWorkingCondition() {\r\n return workingCondition;\r\n }", "public String getConditiondescription() {\r\n return conditiondescription;\r\n }", "public ContractValue getCondition(int argumentIndex) {\n ContractValue left;\n if (this == NULL_VALUE || this == NOT_NULL_VALUE) {\n left = ContractValue.nullValue();\n }\n else if (this == TRUE_VALUE || this == FALSE_VALUE) {\n left = ContractValue.booleanValue(true);\n }\n else {\n return ContractValue.booleanValue(true);\n }\n return ContractValue.condition(left, RelationType.equivalence(!shouldUseNonEqComparison()), ContractValue.argument(argumentIndex));\n }", "@Override\n\tpublic String getcond() {\n\t\treturn null;\n\t}", "@Nullable\n // Safe as we want to provide all getters being public for POJOs\n @SuppressWarnings({\"unused\", \"WeakerAccess\"})\n public final String getConditionName() {\n return conditionName;\n }", "public com.sforce.soap.partner.SoqlWhereCondition getWhereCondition() {\r\n return whereCondition;\r\n }", "public int[] getConditions() { return conditional; }", "public String getSkyCondition() {\n\t\treturn skyCondition;\n\t}", "Condition createCondition();", "public PatternValueConditionElements getPatternValueConditionAccess() {\r\n\t\treturn pPatternValueCondition;\r\n\t}", "ConditionFactory getConditionFactory();", "public interface Conditioned {\n @Nullable\n ROSCondition getCondition();\n }", "public RequestCondition<?> getCustomCondition()\n/* */ {\n/* 164 */ return this.customConditionHolder.getCondition();\n/* */ }", "public native ConditionerTemplate getConditioner(int idx);", "public DebugEvaluatedCondition getBaseCondition() {\n if (DebugRuleElementMatch_Type.featOkTst && ((DebugRuleElementMatch_Type)jcasType).casFeat_baseCondition == null)\n jcasType.jcas.throwFeatMissing(\"baseCondition\", \"org.apache.uima.ruta.type.DebugRuleElementMatch\");\n return (DebugEvaluatedCondition)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((DebugRuleElementMatch_Type)jcasType).casFeatCode_baseCondition)));}", "public final TestConditionModel getTestConditionModel() {\r\n\t\treturn testConditionModel;\r\n\t}", "public String getEvaluationCondition()\r\n {\r\n return evaluationCondition;\r\n }", "public EventCondition [] getEventConditions() {\n return this.EventConditions;\n }", "Expression getCond();", "public String getFilterCondition() {\n return filterCondition;\n }", "public double cond() {\n return new SingularValueDecomposition(this).cond();\n }", "public int getDayOrNight() {\n return getStat(dayOrNight);\n }", "public String condition(String map, int x, int y, long date) {\n\tWeatherUnit weath = getWeather(date);\n if (weath == null) return \"dry\"; // No calendar present\n\t// Water is handled different, only wind counts\n\tScaledMap local = (ScaledMap)maps.get(map);\n\tif (local != null && local.getTerrain(x,y).equals(\"water\")) {\n\t return windCondition(local.getVegetation(x,y), weath);\n\t}\n\t\n\tData.HashList list = Data.getCondList();\n\tfor (int i = 0; i < list.keySet().size(); i++) {\n\t String n = list.getKey(i);\n\t int thresh = ((Data.Condition)list.get(n)).threshhold;\n\t String lvl = ((Data.Condition)list.get(n)).lvlname.toString();\n if ((weath.levels.get(lvl) != null) &&\n ((Integer)weath.levels.get(lvl)).intValue() >= thresh)\n\t\treturn n;\n\t}\n\n\t// Default\n\treturn \"dry\";\n }", "public java.util.List<FamilyMemberHistoryCondition> condition() {\n return getList(FamilyMemberHistoryCondition.class, FhirPropertyNames.PROPERTY_CONDITION);\n }", "public String getConditionalClause() {\r\n\t\treturn conditionalClause;\r\n\t}", "@java.lang.Override public int getDayValue() {\n return day_;\n }", "public double getDayPresent() {\n return dayPresent;\n }", "Expr getCond();", "@java.lang.Override public int getDayValue() {\n return day_;\n }", "public BigDecimal getCheckDay() {\n return checkDay;\n }", "public FSArray getConditions() {\n if (DebugRuleElementMatch_Type.featOkTst && ((DebugRuleElementMatch_Type)jcasType).casFeat_conditions == null)\n jcasType.jcas.throwFeatMissing(\"conditions\", \"org.apache.uima.ruta.type.DebugRuleElementMatch\");\n return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((DebugRuleElementMatch_Type)jcasType).casFeatCode_conditions)));}", "@Override\n\tpublic RptParams getCustomCondition() {\n\t\tRptParams params = new RptParams();\n\n\t\tDate sd = (Date) this.pkStartDate.getValue();\n\t\tDate ed = (Date) this.pkEndDate.getValue();\n\n\t\tparams.setObject(\"startDate\", sd);\n\t\tparams.setObject(\"endDate\", ed);\n\n\t\treturn params;\n\t}", "Condition getCondition(String conditionName, Lock lock);", "@Field(5) \n\tpublic byte ConditionalOrderStatus() {\n\t\treturn this.io.getByteField(this, 5);\n\t}", "public final EObject entryRuleCondition() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleCondition = null;\n\n\n try {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1327:2: (iv_ruleCondition= ruleCondition EOF )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1328:2: iv_ruleCondition= ruleCondition EOF\n {\n newCompositeNode(grammarAccess.getConditionRule()); \n pushFollow(FOLLOW_ruleCondition_in_entryRuleCondition2567);\n iv_ruleCondition=ruleCondition();\n\n state._fsp--;\n\n current =iv_ruleCondition; \n match(input,EOF,FOLLOW_EOF_in_entryRuleCondition2577); \n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public int getConditionCount() {\n return this.conditions.size();\n }", "public String getConditionalOperator() {\n return conditionalOperator;\n }", "@Override\n public VictoryConditionDetails getDetails() {\n Map<String, String> info = new LinkedHashMap<>();\n\n VictoryConditionDetails details = new VictoryConditionDetails();\n\n details.setKey(title);\n details.setInfo(info);\n\n info.put(\"Description:\", description);\n info.putAll(getShipEventInfo());\n info.put(\"Required Points:\", requiredPoints + \"\");\n\n return details;\n }", "public ASTNode getCondition() {\n \treturn (ASTNode)getChildNode(ChooseRulePlugin.GUARD_NAME);\n }", "LogicCondition createLogicCondition();", "public Integer getLessThanDays() {\n return lessThanDays;\n }", "public Long getConditionLastOnsetTime(String condition) {\n if (onsetConditions.containsKey(condition)) {\n return onsetConditions.get(condition).getLastOnsetTime();\n }\n return null;\n }", "public IdDt getConditionFirstRep() {\n\t\tif (getCondition().isEmpty()) {\n\t\t\treturn addCondition();\n\t\t}\n\t\treturn getCondition().get(0); \n\t}", "public Filter condition();", "public Expression getExpression() {\n return optionalConditionExpression; }", "protected Expression analyzeCondition() throws AnalysisException {\n final var condition = analyzeExpression();\n assertKeyWord(ScriptBasicKeyWords.KEYWORD_THEN);\n return condition;\n }", "public Integer getDay()\n {\n return this.day;\n }", "public int getConditionCount()\n {\n return m_listCondition.size();\n }", "int getStatus(){\n\t\tif(!daysUntilStarts.equals(0)){\n\t\t\treturn -1 * daysUntilStarts;\n\t\t}\n\t\treturn daysToRun;\n\t}", "Conditions getConditions();", "public String getQuery() {\n return daemonExecutionCondition;\n }", "@Override\r\n\tpublic String getCondition(String[] sql) {\n\t\treturn sql[4];\r\n\t}", "public int getDay() {\r\n\t\treturn (this.day);\r\n\t}", "OverallCondition(String condition) {\n this.condition = condition;\n }", "public ConditionalGroupRoutingRule conditionValue(Double conditionValue) {\n this.conditionValue = conditionValue;\n return this;\n }", "public io.dstore.values.StringValue getConditionList() {\n return conditionList_ == null ? io.dstore.values.StringValue.getDefaultInstance() : conditionList_;\n }", "com.google.ads.googleads.v13.services.ForecastMetricsOrBuilder getForecastOrBuilder();", "com.google.ads.googleads.v13.services.ForecastMetrics getForecast();", "boolean getDayNull();", "public void setCondition(String condition) {\n\tthis.condition = condition;\n}", "public List<ConditionalRequirement> getConditions() {\r\n return conditions;\r\n }", "public final EObject entryRuleTriggerCondition() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleTriggerCondition = null;\n\n\n try {\n // InternalSafetyParser.g:1580:57: (iv_ruleTriggerCondition= ruleTriggerCondition EOF )\n // InternalSafetyParser.g:1581:2: iv_ruleTriggerCondition= ruleTriggerCondition EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getTriggerConditionRule()); \n }\n pushFollow(FollowSets000.FOLLOW_1);\n iv_ruleTriggerCondition=ruleTriggerCondition();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleTriggerCondition; \n }\n match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "@Override UpodCondition getConditionTest(UpodProgram pgm) {\n return null;\n }", "boolean getFromDayNull();", "@Schema(description = \"Indicates the value of the indicator which crossed the threshold.\")\n\n\tpublic String getObservedValue() {\n\t\treturn observedValue;\n\t}", "public ElementDefinitionDt setCondition(java.util.List<IdDt> theValue) {\n\t\tmyCondition = theValue;\n\t\treturn this;\n\t}", "public io.dstore.values.BooleanValue getOrderByDay() {\n if (orderByDayBuilder_ == null) {\n return orderByDay_ == null ? io.dstore.values.BooleanValue.getDefaultInstance() : orderByDay_;\n } else {\n return orderByDayBuilder_.getMessage();\n }\n }" ]
[ "0.64985245", "0.63706046", "0.6350418", "0.6264132", "0.6257159", "0.6249322", "0.619914", "0.6197137", "0.6173931", "0.6090051", "0.6083089", "0.60740066", "0.6051935", "0.6039642", "0.6033136", "0.59799534", "0.5966631", "0.5881793", "0.58625054", "0.5705077", "0.5692617", "0.56723756", "0.56523436", "0.56053466", "0.55992323", "0.55356705", "0.55293036", "0.54435873", "0.5413684", "0.5384982", "0.5326445", "0.5306865", "0.5301214", "0.52737826", "0.52714044", "0.5263214", "0.52446777", "0.5207561", "0.51884073", "0.5156026", "0.51447713", "0.51342237", "0.51063627", "0.5103845", "0.5098855", "0.5075803", "0.50595254", "0.5051056", "0.50411874", "0.5036005", "0.503596", "0.49729812", "0.4971114", "0.49578074", "0.49332416", "0.49168476", "0.4914361", "0.48861146", "0.48643336", "0.48543388", "0.48436004", "0.4831295", "0.4813207", "0.48044714", "0.47799036", "0.4763544", "0.47573957", "0.4750644", "0.47266698", "0.47114107", "0.46968246", "0.46714354", "0.46610725", "0.46569392", "0.4637083", "0.4628037", "0.46225026", "0.46211052", "0.46192986", "0.45991096", "0.4593751", "0.45919943", "0.4575375", "0.45660216", "0.4563335", "0.45344964", "0.45263192", "0.45199665", "0.4518031", "0.45111498", "0.45019898", "0.45000342", "0.449579", "0.4492348", "0.4491672", "0.4486041", "0.44824672", "0.44745225", "0.44740385", "0.44529387" ]
0.6868149
0
Sets the condition value for this ForecastDayInfo.
public void setCondition(WeatherCondition condition) { this.condition = condition; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCondition(ExpressionNode condition);", "public void setCondition(Expression condition)\n {\n this.condition = condition;\n }", "public void set( final Condition condition )\n {\n m_condition = condition;\n }", "@Override\n\tpublic void setCondition(VehicleCondition condition) {\n\t\tthis.condition = condition;\n\t}", "public void setCondition(String condition) {\n\tthis.condition = condition;\n}", "public ElementDefinitionDt setCondition(java.util.List<IdDt> theValue) {\n\t\tmyCondition = theValue;\n\t\treturn this;\n\t}", "public WeatherCondition getCondition() {\n return condition;\n }", "public static void setCondition (String condition) {\n BValue cond = getCond (condition);\n synchronized (cond) {\n if (cond.v) {\n return;\n }\n cond.v = true;\n cond.notifyAll();\n }\n }", "@Override\n\tpublic void setcond(String cond) {\n\t\n\t}", "OverallCondition(String condition) {\n this.condition = condition;\n }", "public void setCondition( String condition ) {\n Element conditionElement = controlElement.element( ActionSequenceDocument.CONDITION_NAME );\n if ( conditionElement == null ) {\n conditionElement = controlElement.addElement( ActionSequenceDocument.CONDITION_NAME );\n }\n conditionElement.clearContent();\n conditionElement.addCDATA( condition );\n ActionSequenceDocument.fireControlStatementChanged( this );\n }", "public void select(Condition condition) {\n int i;\n boolean z = DEBUG;\n if (z) {\n String str = this.mTag;\n Log.d(str, \"select \" + condition);\n }\n int i2 = this.mSessionZen;\n if (i2 != -1 && i2 != 0) {\n final Uri realConditionId = getRealConditionId(condition);\n if (this.mController != null) {\n AsyncTask.execute(new Runnable() { // from class: com.android.systemui.volume.ZenModePanel.5\n @Override // java.lang.Runnable\n public void run() {\n ZenModePanel.this.mController.setZen(ZenModePanel.this.mSessionZen, realConditionId, \"ZenModePanel.selectCondition\");\n }\n });\n }\n setExitCondition(condition);\n if (realConditionId == null) {\n this.mPrefs.setMinuteIndex(-1);\n } else if ((isAlarm(condition) || isCountdown(condition)) && (i = this.mBucketIndex) != -1) {\n this.mPrefs.setMinuteIndex(i);\n }\n setSessionExitCondition(copy(condition));\n } else if (z) {\n Log.d(this.mTag, \"Ignoring condition selection outside of manual zen\");\n }\n }", "void setCondition(ICDICondition condition) throws CDIException;", "public String getCondition() {\n return condition;\n }", "public Condition(ConditionManager condition)\r\n\t{\r\n\t\tthis.condition = condition;\r\n\t\tinit();\r\n\t}", "public ConditionalGroupRoutingRule conditionValue(Double conditionValue) {\n this.conditionValue = conditionValue;\n return this;\n }", "public String getCondition() {\n\t\treturn condition;\n\t}", "public void setConditionId(Long conditionId) {\n _conditionId = conditionId;\n }", "public Condition getCondition(){\n\t\treturn this.cond;\n\t}", "public String getCondition() {\n\treturn condition;\n}", "public Condition getCondition() {\n return condition;\n }", "public static void setCondition(Expression exp) {\n\t\tif (!running) return;\n\t\tstate.currentConditionNode = new RootNode(exp, state.currentConditionNode);\n\t}", "Event getCondition();", "public void setAviodCondition(int aviodCondition) {\n\t\t\tthis.aviodCondition = aviodCondition;\n\t\t}", "public void setWhereCondition(com.sforce.soap.partner.SoqlWhereCondition whereCondition) {\r\n this.whereCondition = whereCondition;\r\n }", "public OverallCondition getCondition() {\n return condition;\n }", "public DoSometime condition(Condition condition) {\n this.condition = condition;\n return this;\n }", "public Expression getCondition()\n {\n return this.condition;\n }", "Condition createCondition();", "OclExpression getCondition();", "private void setConditionAndListener(ObjectProperty<ConditionViewModel> property) {\n setCondition(property.get());\n\n // Update for new values\n property.addListener((observable, oldValue, newValue) -> setCondition(newValue));\n }", "@POST\n @Path(\"/conditions\")\n public void setConditionType(ConditionType conditionType) {\n definitionsService.setConditionType(conditionType);\n }", "public void setQueryCondition(QueryCondition queryCondition)\n {\n\tthis.queryCondition = queryCondition;\n }", "public void setDay(java.lang.String param) {\r\n localDayTracker = param != null;\r\n\r\n this.localDay = param;\r\n }", "public void setDay(java.lang.String param) {\r\n localDayTracker = param != null;\r\n\r\n this.localDay = param;\r\n }", "public void setConditionid(Long conditionid) {\r\n this.conditionid = conditionid;\r\n }", "public final void setTestConditionModel(TestConditionModel testConditionModel) {\r\n\t\tthis.testConditionModel = testConditionModel;\r\n\t}", "void setVictoryCondition(String conditionIdentifier);", "@Override\r\n\tpublic void visit(ConditionExpression conditionExpression) {\n\r\n\t}", "public void setConditionCode(int conditionCode) {\n\t\t\tthis.conditionCode = conditionCode;\n\t\t}", "public ExpressionNode getCondition();", "public String getFixedCondition() {\n return _fixedCondition;\n }", "@Override\n\tpublic VehicleCondition getCondition() {\n\t\treturn condition;\n\t}", "public final void rule__ForClause__ConditionAssignment_3() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:17705:1: ( ( ruleCondition ) )\r\n // InternalGo.g:17706:2: ( ruleCondition )\r\n {\r\n // InternalGo.g:17706:2: ( ruleCondition )\r\n // InternalGo.g:17707:3: ruleCondition\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getForClauseAccess().getConditionConditionParserRuleCall_3_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleCondition();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getForClauseAccess().getConditionConditionParserRuleCall_3_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void entryRuleCondition() throws RecognitionException {\r\n try {\r\n // InternalGo.g:2180:1: ( ruleCondition EOF )\r\n // InternalGo.g:2181:1: ruleCondition EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getConditionRule()); \r\n }\r\n pushFollow(FOLLOW_1);\r\n ruleCondition();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getConditionRule()); \r\n }\r\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n }\r\n return ;\r\n }", "protected void sequence_Condition(ISerializationContext context, Condition semanticObject) {\r\n\t\tif (errorAcceptor != null) {\r\n\t\t\tif (transientValues.isValueTransient(semanticObject, GoPackage.Literals.CONDITION__EXP) == ValueTransient.YES)\r\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, GoPackage.Literals.CONDITION__EXP));\r\n\t\t}\r\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\r\n\t\tfeeder.accept(grammarAccess.getConditionAccess().getExpExpressionParserRuleCall_1_0(), semanticObject.getExp());\r\n\t\tfeeder.finish();\r\n\t}", "public void onsetCondition(String condition, String state, long time) {\n if (!onsetConditions.containsKey(condition)) {\n onsetConditions.put(condition, new OnsetCondition(condition));\n }\n OnsetCondition onsetCondition = onsetConditions.get(condition);\n onsetCondition.addNewEntry(time);\n state2conditionMapping.put(state, condition);\n }", "public void setJobCondition(String jobCondition) {\n this.jobCondition = jobCondition;\n }", "public void setConditionalOperator(ConditionalOperator conditionalOperator) {\n setConditionalOperator(conditionalOperator.toString());\n }", "void setCond(String name, long date, int lvl) {\n\tWeatherUnit weath1 = getWeather(date);\n\tint old = ((Integer)weath1.levels.get(name)).intValue();\n\tint nyu = old + lvl;\n\tif (nyu < 0) nyu = 0;\n\tif (old != nyu) {\n\t weath1.levels.put(name,new Integer(nyu));\n\t // Cascade down\n\t setCond(name, date);\n\t main.myFrw.announce(this);\n\t main.redo(false);\n\t}\n }", "cn.infinivision.dataforce.busybee.pb.meta.ExprOrBuilder getConditionOrBuilder();", "public void setConditions(Conditions conditions) {\n this.conditions = conditions;\n }", "void setDefeatCondition(String conditionIdentifier);", "public void setConditions(FSArray v) {\n if (DebugRuleElementMatch_Type.featOkTst && ((DebugRuleElementMatch_Type)jcasType).casFeat_conditions == null)\n jcasType.jcas.throwFeatMissing(\"conditions\", \"org.apache.uima.ruta.type.DebugRuleElementMatch\");\n jcasType.ll_cas.ll_setRefValue(addr, ((DebugRuleElementMatch_Type)jcasType).casFeatCode_conditions, jcasType.ll_cas.ll_getFSRef(v));}", "public final void rule__ForStmt__ConditionAssignment_2_0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:16895:1: ( ( ruleCondition ) )\r\n // InternalGo.g:16896:2: ( ruleCondition )\r\n {\r\n // InternalGo.g:16896:2: ( ruleCondition )\r\n // InternalGo.g:16897:3: ruleCondition\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getForStmtAccess().getConditionConditionParserRuleCall_2_0_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleCondition();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getForStmtAccess().getConditionConditionParserRuleCall_2_0_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "@Override\n\tpublic String getCondition() {\n\t\treturn \"\";\n\t}", "public int getCondition() {\r\n\t\tif(this.condition == null){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn this.condition.ordinal();\r\n\t}", "public void setIsOnCondition (boolean IsOnCondition)\n\t{\n\t\tset_Value (COLUMNNAME_IsOnCondition, Boolean.valueOf(IsOnCondition));\n\t}", "void setDayOrNight(int day) {\n setStat(day, dayOrNight);\n }", "CollectIteratorEvaluator(BooleanValue condition) {\n this.condition = condition;\n }", "public Object getCondition();", "public void announceConditionSelection(ConditionTag conditionTag) {\n String str;\n int selectedZen = getSelectedZen(0);\n if (selectedZen == 1) {\n str = this.mContext.getString(R$string.interruption_level_priority);\n } else if (selectedZen == 2) {\n str = this.mContext.getString(R$string.interruption_level_none);\n } else if (selectedZen == 3) {\n str = this.mContext.getString(R$string.interruption_level_alarms);\n } else {\n return;\n }\n announceForAccessibility(this.mContext.getString(R$string.zen_mode_and_condition, str, conditionTag.line1.getText()));\n }", "public void setConditions(int i, DebugEvaluatedCondition v) { \n if (DebugRuleElementMatch_Type.featOkTst && ((DebugRuleElementMatch_Type)jcasType).casFeat_conditions == null)\n jcasType.jcas.throwFeatMissing(\"conditions\", \"org.apache.uima.ruta.type.DebugRuleElementMatch\");\n jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((DebugRuleElementMatch_Type)jcasType).casFeatCode_conditions), i);\n jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((DebugRuleElementMatch_Type)jcasType).casFeatCode_conditions), i, jcasType.ll_cas.ll_getFSRef(v));}", "@JsonSetter(\"joiningDay\")\n public void setJoiningDay (Days value) { \n this.joiningDay = value;\n notifyObservers(this.joiningDay);\n }", "java.lang.String getCondition();", "public int getAviodCondition() {\n\t\t\treturn aviodCondition;\n\t\t}", "public void setConditionalOperator(String conditionalOperator) {\n this.conditionalOperator = conditionalOperator;\n }", "com.google.protobuf.ByteString getConditionBytes();", "public Builder setDayNull(boolean value) {\n \n dayNull_ = value;\n onChanged();\n return this;\n }", "public ConditionalStatement(IExpression condition, IStatement s0, IStatement s1)\n {\n super(\"Conditional\", null);\n // TODO - anything else you need\n }", "public void setDayPresent(double dayPresent) {\n this.dayPresent = dayPresent;\n }", "public void setDay(byte value) {\n this.day = value;\n }", "public SCondition(Node node) {\n super(node);\n }", "public void addCondition(SetGenerator condition)\n\t{\n\t\tthis.triggerConditions.add(condition);\n\t}", "@Override\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes attributes) throws SAXException {\n\t\tsuper.startElement(uri, localName, qName, attributes);\n\t\t\n\t\tif (TAG_CONDITION.equals(localName)) {\n\t\t\tmWeatherInfo.setWoeid(woeid);\n\t\t\tfor (int i = 0; i < attributes.getLength(); i++) {\n\t\t\t\tString qn = attributes.getQName(i);\n\t\t\t\t\n\t\t\t\tif (QNAME_CODE.equals(qn)) {\n\t\t\t\t\tmWeatherInfo.getCondition().setCode(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_DATE.equals(qn)) {\n\t\t\t\t\tmWeatherInfo.getCondition().setDate(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_TMP.equals(qn)) {\n\t\t\t\t\tmWeatherInfo.getCondition().setTemp(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_TEXT.equals(qn)) {\n\t\t\t\t\tmWeatherInfo.getCondition().setText(attributes.getValue(i));\n\t\t\t\t\tmWeatherInfo.setUpdateTime(System.currentTimeMillis());//wangjun\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (TAG_FORCAST.equals(localName)) {\n\t\t\tforecast = mWeatherInfo.new Forecast();\n\t\t\tfor (int i = 0; i < attributes.getLength(); i++) {\n\t\t\t\tString qn = attributes.getQName(i);\n\t\t\t\t\n\t\t\t\tif (QNAME_CODE.equals(qn)) {\n\t\t\t\t\tforecast.setCode(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_DAY.equals(qn)) {\n\t\t\t\t\tforecast.setDay(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_HIGH.equals(qn)) {\n\t\t\t\t\tforecast.setHigh(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_LOW.equals(qn)) {\n\t\t\t\t\tforecast.setLow(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_TEXT.equals(qn)) {\n\t\t\t\t\tforecast.setText(attributes.getValue(i));\n\t\t\t\t} else if (QNAME_DATE.equals(qn)) {\n\t\t\t\t\tforecast.setDate(attributes.getValue(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\tmWeatherInfo.getForecasts().add(forecast);\n\t\t}\n\t}", "public void setDay(byte value) {\r\n this.day = value;\r\n }", "cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();", "public static void collectConditionalMetric(String key, boolean condition)\n {\n if (ourToolbox != null && QuantifyToolboxUtils.getQuantifyToolbox(ourToolbox) != null && condition)\n {\n QuantifyToolboxUtils.getQuantifyToolbox(ourToolbox).getQuantifyService().collectMetric(key);\n }\n }", "public void setFeIF(double value) {\n _avTable.set(ATTR_FE_IF, 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 }", "LogicCondition createLogicCondition();", "public void set_constant(double cutoff)\r\n\t{\r\n\t\tthis.switchValue = (int)cutoff;\t\r\n\t}", "@Override\n\tpublic Condition newCondition() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Condition newCondition() {\n\t\treturn null;\n\t}", "public void setDay(byte value) {\n this.day = value;\n }", "public SearchQuery<?, ?> condition(SearchCondition condition) {\n initSearch();\n BeanInfo searchMetaData = Beans.getBeanInfo(searchRecordTypeDesc.getSearchBasicClass());\n String fieldName = Beans.toInitialLower(condition.getFieldName());\n PropertyInfo propertyInfo = searchMetaData.getProperty(fieldName);\n\n if (propertyInfo != null) {\n Object searchField = processConditionForSearchRecord(searchBasic, condition);\n Beans.setProperty(searchBasic, fieldName, searchField);\n } else {\n SearchFieldOperatorName operatorQName = new SearchFieldOperatorName(condition.getOperatorName());\n String dataType = operatorQName.getDataType();\n SearchFieldType searchFieldType;\n try {\n searchFieldType = SearchFieldOperatorType.getSearchFieldType(dataType);\n } catch (UnsupportedOperationException e) {\n throw new NetSuiteException(new NetSuiteErrorCode(NetSuiteErrorCode.OPERATION_NOT_SUPPORTED),\n i18n.invalidDataType(dataType));\n }\n\n Object searchField = processCondition(searchFieldType, condition);\n customFieldList.add(searchField);\n }\n\n return this;\n }", "public void setBaseCondition(DebugEvaluatedCondition v) {\n if (DebugRuleElementMatch_Type.featOkTst && ((DebugRuleElementMatch_Type)jcasType).casFeat_baseCondition == null)\n jcasType.jcas.throwFeatMissing(\"baseCondition\", \"org.apache.uima.ruta.type.DebugRuleElementMatch\");\n jcasType.ll_cas.ll_setRefValue(addr, ((DebugRuleElementMatch_Type)jcasType).casFeatCode_baseCondition, jcasType.ll_cas.ll_getFSRef(v));}", "void setDaytime(boolean daytime);", "public RecipeCondition(String recipeKey) {\n this.recipeKey = recipeKey;\n }", "public Long getConditionId() {\n return _conditionId;\n }", "public ElementDefinitionDt addCondition( String theId) {\n\t\tif (myCondition == null) {\n\t\t\tmyCondition = new java.util.ArrayList<IdDt>();\n\t\t}\n\t\tmyCondition.add(new IdDt(theId));\n\t\treturn this; \n\t}", "public final EObject entryRuleCondition() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleCondition = null;\n\n\n try {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1327:2: (iv_ruleCondition= ruleCondition EOF )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1328:2: iv_ruleCondition= ruleCondition EOF\n {\n newCompositeNode(grammarAccess.getConditionRule()); \n pushFollow(FOLLOW_ruleCondition_in_entryRuleCondition2567);\n iv_ruleCondition=ruleCondition();\n\n state._fsp--;\n\n current =iv_ruleCondition; \n match(input,EOF,FOLLOW_EOF_in_entryRuleCondition2577); \n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public void setStatus(Condition con) {\n\t\t\n\t}", "public Condition newCondition() {\r\n throw new java.lang.UnsupportedOperationException();\r\n }", "public void setEvaluationCondition(String evaluationCondition)\r\n {\r\n this.evaluationCondition = evaluationCondition;\r\n }", "public Attribute(String name, String value, Condition condition) {\n if(name == \"\")\n try {\n throw new Exception(\"Attribute Name is null\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n this.name = name;\n this.value = value;\n this.condition = condition;\n }", "public ConditionalSelectorImpl(SimpleSelector simpleSelector, Condition condition) {\n this.simpleSelector = simpleSelector;\n this.condition = condition;\n }", "void setDetailsForecastDayPosition(int selectedPosition)\n {\n this.selectedPosition = selectedPosition;\n }" ]
[ "0.6222342", "0.62221247", "0.59968674", "0.5886695", "0.573757", "0.56836253", "0.5622574", "0.55361086", "0.54939324", "0.5365833", "0.532321", "0.5304247", "0.5274105", "0.5249155", "0.5199893", "0.51981", "0.5195832", "0.51398605", "0.5123618", "0.500712", "0.5006106", "0.5002527", "0.49987456", "0.49648058", "0.4944296", "0.49392188", "0.49302116", "0.4924169", "0.49138767", "0.4902157", "0.48556864", "0.48443505", "0.48268896", "0.48203668", "0.48203668", "0.48157772", "0.4808315", "0.47815332", "0.47672418", "0.47661635", "0.47550085", "0.47350612", "0.47306612", "0.47116342", "0.47111478", "0.46953833", "0.46759292", "0.46720257", "0.46632677", "0.4636155", "0.46326053", "0.46226385", "0.46107718", "0.4609077", "0.4608188", "0.46058273", "0.46054554", "0.45968068", "0.45764297", "0.45702416", "0.45586684", "0.45513478", "0.4550652", "0.4548691", "0.45443246", "0.4542607", "0.45307434", "0.45095858", "0.44976345", "0.44955108", "0.4485795", "0.4485199", "0.44847187", "0.44825086", "0.4480588", "0.44797438", "0.44794825", "0.44769025", "0.44734356", "0.44677928", "0.44677928", "0.44677928", "0.44671008", "0.44544968", "0.44515547", "0.44515547", "0.44509488", "0.4440732", "0.4435374", "0.4434211", "0.4419374", "0.44180423", "0.44141704", "0.4403007", "0.4402246", "0.43982232", "0.43958294", "0.43907675", "0.43882117", "0.43566117" ]
0.67027557
0
Gets the low value for this ForecastDayInfo.
public java.math.BigDecimal getLow() { return low; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getLow() {\n return low;\n }", "public final int getLow() {\n\treturn(this.low);\n }", "public int getLow() {\n\t\t\treturn low;\n\t\t}", "public int getLow() {\n\t\treturn low;\n\t}", "public double getLow() {return low;}", "public String getLow() {\n return this.low.toString();\n }", "public double getLowThreshold(){\n return lowThreshold;\n }", "public double getLowPrice() {\n return this.lowPrice;\n }", "public double getLowPrice() {\r\n\t\treturn lowPrice;\r\n\t}", "public float calculateAverageLow() {\n\t\t\n\t\tfloat sum = 0;\n\t\tfor (int i=0; i<temps.length; i++)\n\t\t\tsum += temps[i][1];\n\t\treturn sum /= temps.length;\n\t\t\n\t}", "public double getHigh(){\n return /*home*/ this.high /*and eat everything*/;\r\n //then go to sleep for a day or three \r\n }", "public Location3D getLowLoc() {\n\t\treturn lowPoint;\n\t}", "public double getHigh() {\n return high;\n }", "public double getHighThreshold() {\n return highThreshold;\n }", "public int getLowSpeed() {\r\n return this.lowSpeed;\r\n }", "public void setLow(double value) {\n this.low = value;\n }", "public Integer getLessThanDays() {\n return lessThanDays;\n }", "public float getTemperatureMin() {\n return temperatureMin;\n }", "public final int getHigh() {\n\treturn(this.high);\n }", "@Nullable\n protected abstract Map.Entry<K, V> onGetLowestEntry();", "@Override\n public Note getLowest() {\n if (this.sheet.isEmpty()) {\n throw new IllegalArgumentException(\"No note is added.\");\n }\n Note currentLow = new Note(this.low.getDuration(), this.low.getOctave(),\n this.low.getStartMeasure(), this.low.getPitch(), this.low\n .getIsHead(), this.low.getInstrument(), this.low.getVolume());\n for (int i = 0; i < this.sheet.size(); i++) {\n for (Note n : this.sheet.get(i)) {\n if (currentLow.compareTo(n) == 1) {\n currentLow = n;\n }\n }\n }\n return currentLow;\n }", "public double getHigh() { return high;}", "public LikelyValue getLowConfidenceValue(Integer position)\r\n {\r\n LikelyValue likelyValue = fixedValueMap.get(position);\r\n\r\n if(likelyValue != null)\r\n {\r\n // check if it is below low confidence cutoffs\r\n if(likelyValue.getConfidence() < LOW_CONFIDENCE_CUTOFF\r\n || likelyValue.getConfidenceMargin() < LOW_CONFIDENCE_MARGIN_CUTOFF)\r\n {\r\n return likelyValue;\r\n }\r\n }\r\n\r\n // return null for empty positions or value at this position\r\n // is not a low confidence value\r\n return null;\r\n }", "public double getLowerValue() {\n return this.lowerMeasure.getValue();\n }", "public String getHigh() {\n return this.high.toString();\n }", "public int getLowerThreshold() {\r\n\t\tint lowerThreshold;\r\n\t\tlowerThreshold=this.lowerThreshold;\r\n\t\treturn lowerThreshold;\r\n\t}", "public TempUnit getLowUnit() {\n return lowUnit;\n }", "public final int getIntRainfall()\n {\n return (int)(this.rainfall * 65536.0F);\n }", "public double get_thermal_reading() {\n\t\t\n\t\treturn 0;\n\t}", "public float getminTemp() {\n Reading minTempReading = null;\n float minTemp = 0;\n if (readings.size() >= 1) {\n minTemp = readings.get(0).temperature;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).temperature < minTemp) {\n minTemp = readings.get(i).temperature;\n }\n }\n } else {\n minTemp = 0;\n }\n return minTemp;\n }", "public int getLowerThreshold() {\n return lowerThreshold;\n }", "public double confidenceLow() {\n return mean() - (1.96 * stddev() / Math.sqrt(times));\n }", "public long getLowWaterMark() {\n return this.lowWaterMark;\n }", "public int getHigh() {\n\t\treturn high;\n\t}", "public int getHigh() {\n\t\t\treturn high;\n\t\t}", "public double confidenceLow() {\n\t\treturn (double) mean()-(1.96*stddev()/Math.sqrt(myData.length));\n\t}", "public java.math.BigDecimal getHigh() {\n return high;\n }", "private double calculateLowAffiliation(int helicopterY) {\n double low;\n if (helicopterY + HELICOPTER_HEIGHT > 3*(double)SCREEN_HEIGHT/4) {\n low = 1.0;\n }\n else if (helicopterY + HELICOPTER_HEIGHT < (double)SCREEN_HEIGHT/4) {\n low = 0.0;\n }\n else {\n low = 2.0*(double)(helicopterY + HELICOPTER_HEIGHT)/((double)SCREEN_HEIGHT) - 0.5;\n }\n return low;\n }", "public double getMinValue() {\n\t\tdouble min = Double.POSITIVE_INFINITY;\n\t\tfor (int i = 0; i < dataSheet.getDesignCount(); i++) {\n\t\t\tdouble value = dataSheet.getDesign(i).getDoubleValue(this);\n\t\t\tif (value < min)\n\t\t\t\tmin = value;\n\t\t}\n\t\treturn min;\n\t}", "public int getHigh()\t\n\t{\t//start of getHigh mehtod\n\t\treturn HIGH_NUM;\n\t}", "BigDecimal getLowPrice();", "private void lowPrice(Food food, Date currentDate) {\n if (food.getShelfLifeOfProductInPercent(currentDate) > START_SHELF_LIFE_OF_PRODUCT_IN_PERSENT_FOR_LOW_PRICE\n && food.getShelfLifeOfProductInPercent(currentDate) <= END_SHELF_LIFE_OF_PRODUCT_IN_PERSENT_FOR_LOW_PRICE) {\n food.setPriceByDiccount();\n }\n }", "public int getLatestWeather() { //This function goes through the readings Arraylist and gets the most recent weather Code and returns it.\n int code;\n code = readings.get(readings.size() - 1).code;\n return code;\n }", "public void setLow(double value){low = value;}", "public int getMin() {\n\t\treturn getMin(0.0f);\n\t}", "@NonNull\n public Integer getMinTemp() {\n return minTemp;\n }", "private double getMinThreshold() {\n return minThreshold;\n }", "public Date calculateLowestVisibleTickValue(DateTickUnit unit) { return nextStandardDate(getMinimumDate(), unit); }", "public Integer getMin() { \n\t\treturn getMinElement().getValue();\n\t}", "public int findLowestTemp() {\n\t\t\n\t\tint min = 0;\n\t\tint indexLow = 0;\n\t\tfor (int i=0; i<temps.length; i++)\n\t\t\tif (temps[i][1] < min) {\n\t\t\t\tmin = temps[i][1];\n\t\t\t\tindexLow = 0;\n\t\t\t}\n\t\t\n\t\treturn indexLow;\n\t\t\n\t}", "public float getMinValue();", "public float calculateAverageHigh() {\n\t\t\n\t\tfloat sum = 0;\n\t\tfor (int i=0; i<temps.length; i++)\n\t\t\tsum += temps[i][0];\n\t\treturn sum /= temps.length;\n\t\t\n\t}", "public String lowestEnergyState() {\n\treturn state(bestEverPoints, temperature, bestEverStateEnergy);\n }", "public int lowestHighscore()\n {\n FileReader filereader;\n PrintWriter writer;\n int lowHighScore = 0;\n try{\n \n filereader = new FileReader(getLevel());\n BufferedReader bufferedreader = new BufferedReader(filereader);\n \n \n String finalLine =\"\";\n for(int i = 0;i<5;i++)\n {\n finalLine = bufferedreader.readLine();\n }\n lowHighScore = Integer.parseInt(finalLine.split(\":\")[1]);\n \n }\n catch(IOException e){}\n return lowHighScore;\n }", "public int getCallLowBalType() {\r\n return callLowBalType;\r\n }", "int top() {\n if (data.size() > 0) {\r\n if (data.peek() < min)\r\n return min;\r\n return data.peek();\r\n }\r\n else {\r\n System.out.println(\"Stack underflow\");\r\n return -1;\r\n }\r\n }", "public double minValue(DateTime dt1, DateTime dt2) throws Exception {\r\n Candle[] cd = collectCandlesByIndex(find_index(dt1), find_index(dt2));\r\n double min;\r\n if (cd.length > 1) {\r\n min = cd[0].getLow();\r\n for (Candle c : cd) {\r\n if (c.getLow() < min){\r\n min = c.getLow();\r\n }\r\n }\r\n return min;\r\n } else if (cd.length == 1) {\r\n return cd[0].getLow();\r\n } else {\r\n return 0;\r\n }\r\n }", "public Double getMinimumValue () {\r\n\t\treturn (minValue);\r\n\t}", "public Long getMinValue() {\n return minValue;\n }", "public double confidenceLow() {\n return (mean() - 1.96 * stddev() / Math.sqrt(trials));\n }", "public double confidenceLow() {\n return mean() - ((1.96 * stddev()) / Math.sqrt(this.numTrials));\n }", "public int getMinimumValue() {\n return -s.getMaximumValue();\n }", "int getSatOff(){\n return getPercentageValue(\"satOff\");\n }", "public Double getTempAvgDaily() {\r\n\t\treturn tempAvgDaily;\r\n\t}", "public Integer min() {\n return this.min;\n }", "double getMin() {\n\t\t\treturn value_min;\n\t\t}", "double getLowerThreshold();", "public int getMinRssiReadings() {\n return getMinReadings();\n }", "@java.lang.Override public int getDayValue() {\n return day_;\n }", "private double getMin() {\n return Collections.min(values.values());\n }", "public Point getXLower()\n {\n return (Point)xLow.clone();\n }", "public double getHighPrice() {\n return this.highPrice;\n }", "public boolean isLowExposure() {\n\t\treturn lowExposure;\n\t}", "public T findLowest(){\n T lowest = array[0]; \n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()<lowest.doubleValue())\n {\n lowest = array[i]; \n } \n }\n return lowest;\n }", "Double getMinimumValue();", "public Number getEBookMinPrice() {\n return (Number)getAttributeInternal(EBOOKMINPRICE);\n }", "protected final int getMin() {\n\treturn(this.min);\n }", "public float getminWind() {\n Reading minWindReading = null;\n float minWind = 0;\n if (readings.size() >= 1) {\n minWind = readings.get(0).windSpeed;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).windSpeed < minWind) {\n minWind = readings.get(i).windSpeed;\n }\n }\n } else {\n minWind = 0;\n }\n return minWind;\n }", "@java.lang.Override public int getDayValue() {\n return day_;\n }", "public int getPeakVolume()\n {\n return peakVolume;\n }", "public Double getMinAltitude() {\n return minAltitude;\n }", "private void getPeakValue(float value) {\r\n if (Math.abs(value) > peakValue) {\r\n peakValue = value;\r\n }\r\n }", "public int getMinimumValue() {\n/* 276 */ return -this.s.getMaximumValue();\n/* */ }", "public double getHighPrice() {\r\n\t\treturn highPrice;\r\n\t}", "public double getMinValue() {\r\n\t\treturn minValue;\r\n\t}", "public int getMinValue() {\n return minValue;\n }", "public int getMinValue() throws Exception {\n\t\treturn RemoteServer.instance().executeAndGetId(\"getminvalue\",\n\t\t\t\tgetRefId());\n\t}", "public float getminP() {\n Reading minPressureReading = null;\n float minPressure = 0;\n if (readings.size() >= 1) {\n minPressure = readings.get(0).pressure;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).pressure < minPressure) {\n minPressure = readings.get(i).pressure;\n }\n }\n } else {\n minPressure = 0;\n }\n return minPressure;\n }", "public int getBestValue() {\n return bestValue;\n }", "public java.lang.String getMinTemperatureF()\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(MINTEMPERATUREF$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public void setLow(java.math.BigDecimal low) {\n this.low = low;\n }", "public float _getMin()\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n return (getMinimum() / max);\r\n } else\r\n {\r\n return getMinimum();\r\n }\r\n }", "double getMinActiveAltitude();", "public Integer getMin() {\n\t\tif (this.Minimum==null)\n\t\t{\n\t\t\tcalcMinMax();\n\t\t}\n\t\treturn this.Minimum;\n\t}", "public Amount getBalanceThresholdHigh() {\n return this.balanceThresholdHigh;\n }", "public int GetMinVal();", "public final float getFloatRainfall()\n {\n return this.rainfall;\n }", "public String getSat_critical_reading_avg_score() {\n return sat_critical_reading_avg_score;\n }", "public void setLow(int low) {\n\t\tthis.low = low;\n\t}", "public int findMin() {\r\n\t\treturn this.min.value;\r\n\t}" ]
[ "0.69288486", "0.6912642", "0.6768653", "0.67003393", "0.6676053", "0.66663957", "0.65387046", "0.63119256", "0.62819064", "0.60880667", "0.59930193", "0.5874134", "0.5806832", "0.57949597", "0.5793499", "0.57912606", "0.5787831", "0.57737404", "0.57240885", "0.57040167", "0.5663835", "0.56622845", "0.5654533", "0.5644413", "0.56021124", "0.5591857", "0.55717176", "0.5528409", "0.55228806", "0.5512542", "0.5508195", "0.54856926", "0.54686356", "0.5433452", "0.5433052", "0.5422967", "0.54131496", "0.53996027", "0.5381068", "0.53522855", "0.5340492", "0.53265256", "0.53252083", "0.5314795", "0.5311086", "0.53087395", "0.5297281", "0.52926", "0.52839494", "0.527695", "0.52716756", "0.527027", "0.5269008", "0.5251633", "0.52470547", "0.523858", "0.5238428", "0.52340734", "0.5217124", "0.52141887", "0.5210688", "0.52090514", "0.5207419", "0.5203944", "0.5200956", "0.5196373", "0.5191518", "0.5190408", "0.51842755", "0.5183041", "0.51775056", "0.5171517", "0.5171221", "0.51677823", "0.51658076", "0.51573044", "0.51567286", "0.5153623", "0.5148962", "0.5134532", "0.51324767", "0.5129364", "0.5116083", "0.5111636", "0.5109072", "0.510434", "0.51033634", "0.5092621", "0.5090183", "0.50804573", "0.5072929", "0.50720936", "0.5070955", "0.5067865", "0.50647044", "0.5064571", "0.50638235", "0.5060358", "0.5052032", "0.50506294" ]
0.67556936
3
Sets the low value for this ForecastDayInfo.
public void setLow(java.math.BigDecimal low) { this.low = low; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLow(double value) {\n this.low = value;\n }", "public void setLow(int low) {\n\t\tthis.low = low;\n\t}", "public void setLow(double value){low = value;}", "public void setLow(int L)\t\n\t{\t//start of setLow method\n\t\tLOW_NUM = L;\n\t}", "public void setLow(String low){\n range.setLow(low);\n }", "public void setHigh(double value) {\n this.high = value;\n }", "public void setHigh(double value){high = value;}", "public double getLow() {\n return low;\n }", "public int getLow() {\n\t\t\treturn low;\n\t\t}", "private void lowPrice(Food food, Date currentDate) {\n if (food.getShelfLifeOfProductInPercent(currentDate) > START_SHELF_LIFE_OF_PRODUCT_IN_PERSENT_FOR_LOW_PRICE\n && food.getShelfLifeOfProductInPercent(currentDate) <= END_SHELF_LIFE_OF_PRODUCT_IN_PERSENT_FOR_LOW_PRICE) {\n food.setPriceByDiccount();\n }\n }", "public double getLow() {return low;}", "public double getLowThreshold(){\n return lowThreshold;\n }", "public final int getLow() {\n\treturn(this.low);\n }", "public void setLowUnit(TempUnit lowUnit) {\n this.lowUnit = lowUnit;\n }", "public int getLow() {\n\t\treturn low;\n\t}", "public void setLowExposure(String lowExposure) {\n\t\tif (lowExposure != null && !lowExposure.isEmpty()) {\n\t\t\tif (lowExposure.equals(LOW_EXPOSURE_MARKER))\n\t\t\t\tthis.lowExposure = true;\n\t\t}\n\t}", "public String getLow() {\n return this.low.toString();\n }", "public void setLowGearState() {\n shifter.set(Constants.Drivetrain.LOW_GEAR_STATE);\n }", "public java.math.BigDecimal getLow() {\n return low;\n }", "public void setLowStock(boolean lowStock)\r\n\t{\r\n\t\tthis.lowStock = lowStock;\r\n\t\tif(this.lowStock)\r\n\t\t{\r\n\t\t\tnotifyObserver();\r\n\t\t}\r\n\t}", "public void setHigh(int high) {\n\t\tthis.high = high;\n\t}", "void setLowNode(Node n){\n low = n;\n }", "public double getLowPrice() {\r\n\t\treturn lowPrice;\r\n\t}", "public void setCallLowBalType(int value) {\r\n this.callLowBalType = value;\r\n }", "private void setMinThreshold() {\n minThreshold = value + value * postBoundChange / 100;\n }", "public int setTemperatureMin(Integer temperatureMin) {\n try {\n setTemperatureMin(temperatureMin.floatValue());\n } catch (Exception e) {\n setTemperatureMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return temperatureMinError;\n }", "public void setLowerThreshold(int setLowerThreshold) {\r\n\t\tthis.lowerThreshold = setLowerThreshold;\t\t\r\n\t}", "public double getLowPrice() {\n return this.lowPrice;\n }", "public void setLessThanDays(Integer lessThanDays) {\n this.lessThanDays = lessThanDays;\n }", "private void setDayCountDown() {\n dayCountDown = getMaxHunger();\n }", "public void setMinLoad(int newMinLoad) {\n\n\t\tif (newMinLoad < 0) {\n\t\t\tsendWarning(\n\t\t\t\t\t\"The minimum load of a transporter should be changed to a \"\n\t\t\t\t\t\t\t+ \"negative value. The minimum load will remain unchanged!\",\n\t\t\t\t\t\"Transporter : \" + getName()\n\t\t\t\t\t\t\t+ \" Method: void setMinLoad(int newMinLoad)\",\n\t\t\t\t\t\"A minimum load which is negative does not make sense.\",\n\t\t\t\t\t\"Make sure to provide a valid positive minimum load \"\n\t\t\t\t\t\t\t+ \"when changing this attribute.\");\n\n\t\t\treturn; // forget that rubbish\n\t\t}\n\n\t\tthis.minLoad = newMinLoad;\n\t}", "public void setMinValue(int minValue) {\n this.minValue = minValue;\n }", "@XmlElement(name = \"lower\")\n public void setLowerValue(double value) {\n this.lowerMeasure = Measure.valueOf(value, units);\n }", "private void setLowSensitivity() {\n\t\tbuttonLowOn.setVisibility(View.VISIBLE);\n\t\tbuttonMedOn.setVisibility(View.INVISIBLE);\n\t\tbuttonHighOn.setVisibility(View.INVISIBLE);\n\t\t\n\t\tLUT[0] = 2;\n\t\tLUT[1] = (float)6;\n\t\tLUT[2] = (float)10;\n\t\tLUT[3] = (float)20;\n\t\tLUT[4] = (float)30;\n\t\tLUT[5] = (float)150;\n\t\tLUT[6] = (float)700;\n\t\tLUT[7] = (float)2000;\n\t\tLUT[8] = (float)4000;\n\t}", "public void setLowerThreshold(int lowerThreshold) {\n this.lowerThreshold = lowerThreshold;\n }", "public void setLower(int value) {\n this.lower = value;\n }", "public int setTemperatureMin(Float temperatureMin) {\n try {\n setTemperatureMin(temperatureMin.floatValue());\n } catch (Exception e) {\n setTemperatureMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return temperatureMinError;\n }", "public void SetMinVal(int min_val);", "public void setHigh(String high){\n range.setHigh(high);\n }", "public boolean isLowExposure() {\n\t\treturn lowExposure;\n\t}", "protected void setStateToLowestEnergy() {\n\tpoints = bestEverPoints;\n\n\t// make a copy of the best points\n\tbestEverPoints = getPoints();\n\n\tbuildEnergyMatrix();\n\tstateEnergy();\n }", "public void setHigh(java.math.BigDecimal high) {\n this.high = high;\n }", "public void setMinThreshold(double minThreshold) {\n this.minThreshold = minThreshold;\n }", "public void setBalanceLowGate(int value) {\r\n this.balanceLowGate = value;\r\n }", "private void setEmbeddingTokenLow(long value) {\n bitField0_ |= 0x00000001;\n embeddingTokenLow_ = value;\n }", "void setMinValue();", "public void setMinimumValue(double minimumValue)\n {\n this.minimumValue = minimumValue;\n }", "public void setHigh(int H)\t\n\t{\t//start of setHigh method\n\t\tHIGH_NUM = H;\n\t}", "private void setEmbeddingTokenLow(long value) {\n bitField0_ |= 0x00000002;\n embeddingTokenLow_ = value;\n }", "public double getHigh(){\n return /*home*/ this.high /*and eat everything*/;\r\n //then go to sleep for a day or three \r\n }", "public void set_min(byte value) {\n setSIntBEElement(offsetBits_min(), 8, value);\n }", "private void setLowestMeasuredPercentile(double lowestPercentileValue) {\n for (QoSSentinel sentinel : qosHandler.getQosSentinels()) {\n sentinel.setLowestPercentileValue(lowestPercentileValue);\n }\n }", "public void _setMin(float min)\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n setMinimum((int) (min * 100));\r\n } else\r\n {\r\n setMinimum((int) min);\r\n }\r\n }", "public void setDailyTime(int nHour, int nMin)\n\t{\n\t\tsetType(AT_DAILY);\n\t\tsetHour(nHour);\n\t\tsetMinute(nMin);\n\t\tsetData(null);\n\t}", "public LowDataSource() {\n super(generateStacks(calculateStackCount(5, 60, 10), 15, 30,\n new double[]{100, 50, 45, 40, 35, 30, 15, 10, 5}, 5));\n }", "public void setMinValue(int x) {\r\n\t\tminValue = x;\r\n\t}", "public void setMinTemperatureF(java.lang.String minTemperatureF)\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(MINTEMPERATUREF$6, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MINTEMPERATUREF$6);\n }\n target.setStringValue(minTemperatureF);\n }\n }", "public int getLowSpeed() {\r\n return this.lowSpeed;\r\n }", "public void setMin(int min) {\n this.min = min;\n }", "public void setMin(int min) {\n this.min = min;\n }", "private void processLowValue(Bid bid) {\n\t}", "public SunPositionAlgorithmLowRes(int year, int month, int day, int hour, int minute, int second, double longitude, double latitude) {\n\t\tsuper(year, month, day, hour, minute, second, longitude, latitude);\n\t}", "private void tooHigh() {\n if (this.hitPoints > 255) {\n System.out.println(\"You set the value too high! Setting it to 255\");\n this.hitPoints = 255;\n }\n }", "public void setMinTemp(@NonNull Integer minTemp) {\n this.minTemp = minTemp;\n }", "public void lowsetIndex() {\n\t\tSystem.out.println(\"Lowest index is: \" + 0);\n\t}", "public void setMinValue(double x) {\r\n\t\tminValue = x;\r\n\t}", "public float getTemperatureMin() {\n return temperatureMin;\n }", "public void setHumidityTemperature(double value) {\r\n this.humidityTemperature = value;\r\n }", "public void xsetMinTemperatureF(org.apache.xmlbeans.XmlString minTemperatureF)\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(MINTEMPERATUREF$6, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(MINTEMPERATUREF$6);\n }\n target.set(minTemperatureF);\n }\n }", "public ElementDefinitionDt setMin(IntegerDt theValue) {\n\t\tmyMin = theValue;\n\t\treturn this;\n\t}", "private void setDailyValues(){\n //set updateTime\n SimpleDateFormat t = new SimpleDateFormat(\"h:mm:ss a\");\n updatedTime = \"Last updated: \" + t.format(new Date(System.currentTimeMillis()));\n \n //set maxTemp and minTemp\n maxTemp = Integer.toString(weather.getMaxTemp());\n minTemp = Integer.toString(weather.getMinTemp());\n \n //set sunriseTime and sunsetTime\n SimpleDateFormat sr = new SimpleDateFormat(\"h:mm a\");\n sunriseTime = sr.format(new Date(weather.getSunrise()*1000));\n SimpleDateFormat ss = new SimpleDateFormat(\"h:mm a\");\n sunsetTime = sr.format(new Date(weather.getSunset()*1000));\n }", "public void temperatureMinChanged(ValueChangeEvent event) {\n temperatureMin = Integer.valueOf(event.getNewValue().toString());\n updateTemperatureNormalisation();\n }", "public void setMinimumValue (double min) {\r\n\t\tminValue = new Double(min);\r\n\t\tvalidateMin = (minValue.compareTo(DOUBLE_ZERO) != 1);\r\n\t}", "public TempUnit getLowUnit() {\n return lowUnit;\n }", "public Location3D getLowLoc() {\n\t\treturn lowPoint;\n\t}", "public void setHighUnit(TempUnit highUnit) {\n this.highUnit = highUnit;\n }", "public void setLowKey(KeyClass low_key) throws ChainException, IOException {\n\t\tthis.lowKey = low_key;\r\n\t\tRID rid = new RID();\r\n\t\t\r\n\t\tKeyDataEntry dEntry = leaf.getFirst(rid);\r\n\t\tKeyClass curKey = dEntry.key;\r\n\t\t\r\n\t\twhile( BT.keyCompare(curKey, low_key) != 0 ){\r\n\t\t\tdEntry = leaf.getNext(rid);\r\n\t\t\tif( dEntry != null ){\r\n\t\t\t\tcurKey = dEntry.key;\r\n\t\t\t}else{\r\n\t\t\t\tPageId nextPageId = leaf.getNextPage();\r\n\t\t\t\tif( nextPageId.pid != -1){\r\n\t\t\t\t\tSystemDefs.JavabaseBM.unpinPage(leaf.getCurPage(), true);\r\n\t\t\t\t\tSystemDefs.JavabaseBM.pinPage( nextPageId, leaf, false);\r\n\t\t\t\t\tleaf.dumpPage();\r\n\t\t\t\t\tdEntry = leaf.getFirst(rid);\r\n\t\t\t\t\tcurKey = dEntry.key;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//wasal le 2a5er 7aga:\r\n\t\t\t\t\tSystem.out.println(\"Invalid lower keyyyyyyy.\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}//end else.\r\n\t\t\t\t\r\n\t\t\t}//end else.\r\n\t\t\t\r\n\t\t}//end while.\r\n\t\t\r\n\t\t\r\n\t}", "public void setMin( float min )\n {\n this.min = min;\n show_text();\n }", "public void setMinimumStock (double minimumStock) {\r\n\t\tthis.minimumStock = minimumStock;\r\n\t}", "public void setTopSpeed(int topSpeed) {\n\t\tif (topSpeed >= 0 && topSpeed <= 70) {\n\t\t\tthis.topSpeed = topSpeed;\n\t\t} \n\t\telse {\n\t\t\tSystem.out.println(\"Invalid Speed\");\n\t\t}\n\t\t\n\t}", "public void setMon6037(double mon6037) {\r\n\t\tthis.mon6037 = mon6037;\r\n\t}", "public void setSliderMinDays() {\n\t\tif (slider == null)\n\t\t\treturn;\n\t\tif (minDate == null || minDate.getValue() == null || loDate == null || loDate.getValue() == null) {\n\t\t\tif (slider.getSlider().getMinValue() != bestMinDays)\n\t\t\t\tslider.getSlider().setMinValue(bestMinDays);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint minDays = -CalendarUtil.getDaysBetween(minDate.getValue(), loDate.getValue());\n\t\tslider.getSlider().setMinValue(minDays);\n\t}", "public void setExternalTemperature(double value) {\r\n this.externalTemperature = value;\r\n }", "public float calculateAverageLow() {\n\t\t\n\t\tfloat sum = 0;\n\t\tfor (int i=0; i<temps.length; i++)\n\t\t\tsum += temps[i][1];\n\t\treturn sum /= temps.length;\n\t\t\n\t}", "@Nullable\n protected abstract Map.Entry<K, V> onGetLowestEntry();", "public double getHigh() { return high;}", "boolean incLowValue() { return true; }", "public void setHighGearState() {\n shifter.set(Constants.Drivetrain.HIGH_GEAR_STATE);\n }", "public void setMinOffset(float minOffset) {\n this.mMinOffset = minOffset;\n }", "void setMinActiveAltitude(double minActiveAltitude);", "public void setMinimumValue (Double min) {\r\n\t\tminValue = min;\r\n\t\tvalidateMin = (minValue.compareTo(DOUBLE_ZERO) != 1);\r\n\t}", "public void param_value_min_SET(float src)\n { set_bytes(Float.floatToIntBits(src) & -1L, 4, data, 13); }", "protected final void setMin() {\n\tint prevmin = this.min;\n\n\tint i1 = this.low;\n\tint i2 = left.min;\n\tint i3 = right.min;\n\n\tif (i2 == -1) \n\t i2 = i1;\n\tif (i3 == -1) \n\t i3 = i1;\n\n\tif ((i1 <= i2) && (i1 <= i3)) {\n\t this.min = i1;\n\t} else if ((i2 <= i1) && (i2 <= i3)) {\n\t this.min = i2;\n\t} else {\n\t this.min = i3;\n\t}\n\n\tif ((p != IntervalNode.nullIntervalNode) &&\n\t (prevmin != this.min)) {\n \t p.setMin();\n\t}\n }", "public void setMin(int min)\n\t{\n\t\tif (min < 0)\n\t\t\tthrow new IllegalArgumentException(\"min < 0\");\n\t\tthis.min = min;\n\t}", "public int getLowerThreshold() {\n return lowerThreshold;\n }", "public com.twc.bigdata.views.avro.viewing_info.Builder setFurthestPoint(java.lang.Integer value) {\n validate(fields()[5], value);\n this.furthest_point = value;\n fieldSetFlags()[5] = true;\n return this; \n }", "public void setMinimum(Number min) {\n this.min = min;\n }", "public void setTemperature(int value) {\n this.temperature = value;\n }", "public void setDay(final short day) {\r\n\t\tthis.day = day;\r\n\t}", "void setThreshold(float value);" ]
[ "0.7148751", "0.6736627", "0.6490645", "0.61626613", "0.599072", "0.5897655", "0.5790681", "0.57774615", "0.57197404", "0.57101315", "0.5708073", "0.5686456", "0.56785023", "0.5644031", "0.56312805", "0.5616872", "0.55625206", "0.55284894", "0.54517263", "0.5440639", "0.53732353", "0.5359709", "0.5315931", "0.5315422", "0.5300999", "0.528852", "0.52846545", "0.526223", "0.5253462", "0.5228041", "0.52208805", "0.52127385", "0.5198987", "0.51985174", "0.51893264", "0.5180637", "0.51226413", "0.5115737", "0.50790936", "0.5071353", "0.5052217", "0.50312334", "0.50022846", "0.49900383", "0.49667332", "0.49661377", "0.49654487", "0.4954878", "0.4950346", "0.4935137", "0.4932588", "0.49297902", "0.49271232", "0.49267402", "0.49258846", "0.49073136", "0.4898734", "0.48983884", "0.48982498", "0.48982498", "0.48885554", "0.4882785", "0.4880188", "0.4872972", "0.48576567", "0.48519802", "0.48346063", "0.48327306", "0.4830383", "0.48301542", "0.48246726", "0.48176846", "0.4799998", "0.47932696", "0.4776884", "0.47756854", "0.47702456", "0.47688738", "0.47638977", "0.47553104", "0.47413573", "0.47406524", "0.4740482", "0.4739988", "0.47307926", "0.47307223", "0.4728823", "0.47274184", "0.47062442", "0.470219", "0.46944582", "0.4693813", "0.46913886", "0.4690152", "0.4685297", "0.4685246", "0.46817333", "0.4679627", "0.46791422", "0.46750888" ]
0.6397327
3
Gets the lowUnit value for this ForecastDayInfo.
public TempUnit getLowUnit() { return lowUnit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getLow() {\n return this.low.toString();\n }", "public double getLow() {\n return low;\n }", "public int getLowUnits()\n {\n return m_cPruneUnits;\n }", "public TempUnit getHighUnit() {\n return highUnit;\n }", "public java.math.BigDecimal getLow() {\n return low;\n }", "public void setLowUnit(TempUnit lowUnit) {\n this.lowUnit = lowUnit;\n }", "public double getLow() {return low;}", "public int getLow() {\n\t\t\treturn low;\n\t\t}", "public double getLowThreshold(){\n return lowThreshold;\n }", "public final int getLow() {\n\treturn(this.low);\n }", "public int getLow() {\n\t\treturn low;\n\t}", "public double getLowerValue() {\n return this.lowerMeasure.getValue();\n }", "public double getLowPrice() {\r\n\t\treturn lowPrice;\r\n\t}", "public double getLowPrice() {\n return this.lowPrice;\n }", "public float getTemperatureMin() {\n return temperatureMin;\n }", "public String getUnitPriceHigh() {\n return this.UnitPriceHigh;\n }", "public Measure<?, ?> getLowerMeasure() {\n return this.lowerMeasure;\n }", "public int getLowSpeed() {\r\n return this.lowSpeed;\r\n }", "public int getHighUnits()\n {\n return m_cMaxUnits;\n }", "public Location3D getLowLoc() {\n\t\treturn lowPoint;\n\t}", "public gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType.Enum getUnit()\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(UNIT$6, 0);\n if (target == null)\n {\n return null;\n }\n return (gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType.Enum)target.getEnumValue();\n }\n }", "public float calculateAverageLow() {\n\t\t\n\t\tfloat sum = 0;\n\t\tfor (int i=0; i<temps.length; i++)\n\t\t\tsum += temps[i][1];\n\t\treturn sum /= temps.length;\n\t\t\n\t}", "public java.lang.String getMinTemperatureF()\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(MINTEMPERATUREF$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public Double getMinAltitude() {\n return minAltitude;\n }", "public gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType xgetUnit()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType target = null;\n target = (gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType)get_store().find_element_user(UNIT$6, 0);\n return target;\n }\n }", "public void setHighUnit(TempUnit highUnit) {\n this.highUnit = highUnit;\n }", "public int getLowerThreshold() {\n return lowerThreshold;\n }", "public java.lang.String getMinTemperatureC()\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(MINTEMPERATUREC$10, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public Date calculateLowestVisibleTickValue(DateTickUnit unit) { return nextStandardDate(getMinimumDate(), unit); }", "public String getHigh() {\n return this.high.toString();\n }", "@Schema(description = \"Indicates the unit of the measurement of the indicator corresponding to the threshold that has been crossed.\")\n\n\tpublic String getIndicatorUnit() {\n\t\treturn indicatorUnit;\n\t}", "public int getLowerThreshold() {\r\n\t\tint lowerThreshold;\r\n\t\tlowerThreshold=this.lowerThreshold;\r\n\t\treturn lowerThreshold;\r\n\t}", "public final int getIntRainfall()\n {\n return (int)(this.rainfall * 65536.0F);\n }", "public double getHighThreshold() {\n return highThreshold;\n }", "public float getminTemp() {\n Reading minTempReading = null;\n float minTemp = 0;\n if (readings.size() >= 1) {\n minTemp = readings.get(0).temperature;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).temperature < minTemp) {\n minTemp = readings.get(i).temperature;\n }\n }\n } else {\n minTemp = 0;\n }\n return minTemp;\n }", "@NonNull\n public Integer getMinTemp() {\n return minTemp;\n }", "public double get_thermal_reading() {\n\t\t\n\t\treturn 0;\n\t}", "public double getHigh() {\n return high;\n }", "public float getminWind() {\n Reading minWindReading = null;\n float minWind = 0;\n if (readings.size() >= 1) {\n minWind = readings.get(0).windSpeed;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).windSpeed < minWind) {\n minWind = readings.get(i).windSpeed;\n }\n }\n } else {\n minWind = 0;\n }\n return minWind;\n }", "@JsonProperty(\"LowQuantity\")\n\tpublic Integer getLowQuantity() {\n\t\treturn lowQuantity;\n\t}", "public double getBeerXmlStandardTunSpecHeat() {\n return this.tunSpecificHeat;\n }", "public org.apache.xmlbeans.XmlString xgetMinTemperatureF()\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(MINTEMPERATUREF$6, 0);\n return target;\n }\n }", "DefinedUnitType getDefinedUnit();", "private double calculateLowAffiliation(int helicopterY) {\n double low;\n if (helicopterY + HELICOPTER_HEIGHT > 3*(double)SCREEN_HEIGHT/4) {\n low = 1.0;\n }\n else if (helicopterY + HELICOPTER_HEIGHT < (double)SCREEN_HEIGHT/4) {\n low = 0.0;\n }\n else {\n low = 2.0*(double)(helicopterY + HELICOPTER_HEIGHT)/((double)SCREEN_HEIGHT) - 0.5;\n }\n return low;\n }", "public byte getTemperature_unit() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readByte(__io__address + 11);\n\t\t} else {\n\t\t\treturn __io__block.readByte(__io__address + 11);\n\t\t}\n\t}", "public void setLow(double value) {\n this.low = value;\n }", "public double getHigh(){\n return /*home*/ this.high /*and eat everything*/;\r\n //then go to sleep for a day or three \r\n }", "public String getWeightUnit() {\n return (String) get(\"weight_unit\");\n }", "public double getMon6066() {\r\n\t\treturn mon6066;\r\n\t}", "public String getUnit() {\n\t\tString unit;\n\t\ttry {\n\t\t\tunit = this.getString(\"unit\");\n\t\t} catch (Exception e) {\n\t\t\tunit = null;\n\t\t}\n\t\treturn unit;\n\t}", "public String getUnitPriceDiscountHigh() {\n return this.UnitPriceDiscountHigh;\n }", "public String getUnit()\n {\n return (this.unit);\n }", "protected byte[] getMeasuredFloorTemperature() {return null;}", "private double getMinThreshold() {\n return minThreshold;\n }", "public float getSilicateMin() {\n return silicateMin;\n }", "public double getMon6068() {\r\n\t\treturn mon6068;\r\n\t}", "public double confidenceLow() {\n return mean() - ((1.96 * stddev()) / Math.sqrt(this.numTrials));\n }", "public double confidenceLow() {\n return mean() - (1.96 * stddev() / Math.sqrt(times));\n }", "double getMinActiveAltitude();", "public float getTemperature() {\n\t\treturn (float) getRawTemperature() / 100f;\n\t}", "public double getHigh() { return high;}", "public double getMon6058() {\r\n\t\treturn mon6058;\r\n\t}", "public String lowestEnergyState() {\n\treturn state(bestEverPoints, temperature, bestEverStateEnergy);\n }", "public org.apache.xmlbeans.XmlString xgetMinTemperatureC()\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(MINTEMPERATUREC$10, 0);\n return target;\n }\n }", "public int getUpDays() {\n return (int)(_uptime / 86400000);\n }", "public float getMinAvailability()\n\t{\n\t\treturn piecePicker.getMinAvailability();\n\t}", "public double getMon6035() {\r\n\t\treturn mon6035;\r\n\t}", "double terrainFactorInf() {\n double value;\n switch (getParent().getField().getTerrain().getId()) {\n case TERRAIN_B:\n case TERRAIN_Q:\n value = 1d;\n break;\n\n case TERRAIN_H:\n case TERRAIN_K:\n case TERRAIN_T:\n value = .8d;\n break;\n\n case TERRAIN_W:\n case TERRAIN_G:\n case TERRAIN_D:\n value = .5d;\n break;\n\n case TERRAIN_J:\n value = .4d;\n break;\n\n case TERRAIN_S:\n default:\n value = .45d;\n break;\n }\n return value;\n }", "public String getCpuTemperature_huawei(){\n\n String maxTemp = \"\";\n try {\n RandomAccessFile reader = new RandomAccessFile( \"/sys/class/thermal/thermal_zone1/temp\", \"r\" );\n\n boolean done = false;\n while ( ! done ) {\n String line = reader.readLine();\n if ( null == line ) {\n done = true;\n break;\n }\n maxTemp =line;\n }\n\n } catch ( IOException ex ) {\n ex.printStackTrace();\n }\n return String.valueOf(Double.parseDouble(maxTemp) / 1000);\n }", "public final Unit getUnit()\n { \n return Unit.forValue(m_Unit);\n }", "public Float getInUtilization() {\r\n return inUtilization;\r\n }", "public double confidenceLow() {\n return (mean() - 1.96 * stddev() / Math.sqrt(trials));\n }", "public double getMon6055() {\r\n\t\treturn mon6055;\r\n\t}", "public double confidenceLow() {\n\t\treturn (double) mean()-(1.96*stddev()/Math.sqrt(myData.length));\n\t}", "public int getMin() {\n\t\treturn getMin(0.0f);\n\t}", "public static Unit getLowestHealth(VecUnit units) {\n return getLowestHealth(units);\n }", "public Integer getLessThanDays() {\n return lessThanDays;\n }", "public double getMon6067() {\r\n\t\treturn mon6067;\r\n\t}", "double getLowerThreshold();", "public double getMon6057() {\r\n\t\treturn mon6057;\r\n\t}", "public String getUnit() {\n return unit;\n }", "public String getUnit() {\n return unit;\n }", "public String getUnit() {\n return unit;\n }", "public Short getEstDaysPerWeek() {\n return estDaysPerWeek;\n }", "public double getMon6065() {\r\n\t\treturn mon6065;\r\n\t}", "public Double getIndoorTemperature() {\n return indoorTemperature;\n }", "public String getUnit() {\n\t\treturn unit;\n\t}", "public double getMon6069() {\r\n\t\treturn mon6069;\r\n\t}", "public Float getHsupaUlTraff() {\n return hsupaUlTraff;\n }", "public float getAverageLoad15() {\r\n return convert(averageLoad15);\r\n }", "public double getUpperValue() {\n return this.upperMeasure.getValue();\n }", "double getMin() {\n\t\t\treturn value_min;\n\t\t}", "DefiningUnitType getDefiningUnit();", "public Integer getMin() { \n\t\treturn getMinElement().getValue();\n\t}", "BigDecimal getLowPrice();", "public double getMon60310() {\r\n\t\treturn mon60310;\r\n\t}", "public float getNitrateMin() {\n return nitrateMin;\n }", "public Getter reqGetMeasuredFloorTemperature() {\n\t\t\treqGetProperty(EPC_MEASURED_FLOOR_TEMPERATURE);\n\t\t\treturn this;\n\t\t}", "public Short getEstHoursPerDay() {\n return estHoursPerDay;\n }", "public String getUnit () {\n\treturn this.unit;\n }" ]
[ "0.6646836", "0.66150594", "0.65692025", "0.6497278", "0.6475699", "0.63656145", "0.6301047", "0.6273745", "0.62438965", "0.6218236", "0.6208168", "0.6118967", "0.5913328", "0.5891801", "0.58319634", "0.58166194", "0.5804318", "0.5794097", "0.5792639", "0.57472104", "0.56388235", "0.5633783", "0.55883884", "0.55568916", "0.55157113", "0.55122226", "0.54791886", "0.54638386", "0.5441408", "0.54344726", "0.5428416", "0.53959334", "0.5394674", "0.53762233", "0.5364542", "0.5359468", "0.53471696", "0.5326549", "0.53156865", "0.5307142", "0.5298864", "0.5298229", "0.5290613", "0.5287386", "0.52573645", "0.5255128", "0.5245869", "0.5238865", "0.5237694", "0.5236641", "0.52170765", "0.52134323", "0.5203697", "0.5198797", "0.5191607", "0.5175332", "0.5158236", "0.5157885", "0.51562345", "0.5150512", "0.51365095", "0.51338637", "0.5133486", "0.51307845", "0.51297975", "0.5124436", "0.5121322", "0.5109125", "0.5107996", "0.51078695", "0.510751", "0.51074165", "0.5106542", "0.509939", "0.50962025", "0.5075839", "0.50738376", "0.50702786", "0.5067506", "0.50532264", "0.50510716", "0.50510716", "0.50510716", "0.5050364", "0.5037778", "0.5035316", "0.50311375", "0.5024998", "0.5024928", "0.5024914", "0.5023004", "0.5018023", "0.50153756", "0.5014408", "0.5013496", "0.5012191", "0.50101894", "0.5009363", "0.5005279", "0.5003649" ]
0.7550638
0
Sets the lowUnit value for this ForecastDayInfo.
public void setLowUnit(TempUnit lowUnit) { this.lowUnit = lowUnit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setHighUnit(TempUnit highUnit) {\n this.highUnit = highUnit;\n }", "public TempUnit getLowUnit() {\n return lowUnit;\n }", "public void setLow(double value) {\n this.low = value;\n }", "public void setLow(java.math.BigDecimal low) {\n this.low = low;\n }", "public void setLow(int low) {\n\t\tthis.low = low;\n\t}", "public void setLow(String low){\n range.setLow(low);\n }", "public void setLow(double value){low = value;}", "public void setUnitPriceHigh(String UnitPriceHigh) {\n this.UnitPriceHigh = UnitPriceHigh;\n }", "public synchronized void setLowUnits(int cUnits)\n {\n if (cUnits < 0)\n {\n throw new IllegalArgumentException(\"low units out of bounds\");\n }\n\n if (cUnits >= m_cMaxUnits)\n {\n cUnits = (int) (m_dflPruneLevel * m_cMaxUnits);\n }\n\n m_cPruneUnits = cUnits;\n }", "@XmlElement(name = \"lower\")\n public void setLowerValue(double value) {\n this.lowerMeasure = Measure.valueOf(value, units);\n }", "public void setLow(int L)\t\n\t{\t//start of setLow method\n\t\tLOW_NUM = L;\n\t}", "public void setLowExposure(String lowExposure) {\n\t\tif (lowExposure != null && !lowExposure.isEmpty()) {\n\t\t\tif (lowExposure.equals(LOW_EXPOSURE_MARKER))\n\t\t\t\tthis.lowExposure = true;\n\t\t}\n\t}", "public void setMon6066(double mon6066) {\r\n\t\tthis.mon6066 = mon6066;\r\n\t}", "public String getLow() {\n return this.low.toString();\n }", "public void setLowerThreshold(int lowerThreshold) {\n this.lowerThreshold = lowerThreshold;\n }", "public double getLow() {\n return low;\n }", "public int getLowUnits()\n {\n return m_cPruneUnits;\n }", "public TempUnit getHighUnit() {\n return highUnit;\n }", "public void setLowerThreshold(int setLowerThreshold) {\r\n\t\tthis.lowerThreshold = setLowerThreshold;\t\t\r\n\t}", "public double getLowThreshold(){\n return lowThreshold;\n }", "public void setUnit(gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType.Enum unit)\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(UNIT$6, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(UNIT$6);\n }\n target.setEnumValue(unit);\n }\n }", "public void setMon6068(double mon6068) {\r\n\t\tthis.mon6068 = mon6068;\r\n\t}", "public void setMinTemperatureF(java.lang.String minTemperatureF)\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(MINTEMPERATUREF$6, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MINTEMPERATUREF$6);\n }\n target.setStringValue(minTemperatureF);\n }\n }", "public double getLow() {return low;}", "public void setMinLoad(int newMinLoad) {\n\n\t\tif (newMinLoad < 0) {\n\t\t\tsendWarning(\n\t\t\t\t\t\"The minimum load of a transporter should be changed to a \"\n\t\t\t\t\t\t\t+ \"negative value. The minimum load will remain unchanged!\",\n\t\t\t\t\t\"Transporter : \" + getName()\n\t\t\t\t\t\t\t+ \" Method: void setMinLoad(int newMinLoad)\",\n\t\t\t\t\t\"A minimum load which is negative does not make sense.\",\n\t\t\t\t\t\"Make sure to provide a valid positive minimum load \"\n\t\t\t\t\t\t\t+ \"when changing this attribute.\");\n\n\t\t\treturn; // forget that rubbish\n\t\t}\n\n\t\tthis.minLoad = newMinLoad;\n\t}", "public void setMon6058(double mon6058) {\r\n\t\tthis.mon6058 = mon6058;\r\n\t}", "public void setMon6035(double mon6035) {\r\n\t\tthis.mon6035 = mon6035;\r\n\t}", "public int setTemperatureMin(Integer temperatureMin) {\n try {\n setTemperatureMin(temperatureMin.floatValue());\n } catch (Exception e) {\n setTemperatureMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return temperatureMinError;\n }", "public void setMon6056(double mon6056) {\r\n\t\tthis.mon6056 = mon6056;\r\n\t}", "public void setUnit(Unit unit) {\r\n\t\tthis.unit = unit;\r\n\t}", "public void setMon6065(double mon6065) {\r\n\t\tthis.mon6065 = mon6065;\r\n\t}", "public void setMon6057(double mon6057) {\r\n\t\tthis.mon6057 = mon6057;\r\n\t}", "void setLowNode(Node n){\n low = n;\n }", "public void setLower(int value) {\n this.lower = value;\n }", "public void setMon6069(double mon6069) {\r\n\t\tthis.mon6069 = mon6069;\r\n\t}", "public void setTickUnit(DateTickUnit unit) { setTickUnit(unit, true, true); }", "public void setMon6055(double mon6055) {\r\n\t\tthis.mon6055 = mon6055;\r\n\t}", "public void setLowStock(boolean lowStock)\r\n\t{\r\n\t\tthis.lowStock = lowStock;\r\n\t\tif(this.lowStock)\r\n\t\t{\r\n\t\t\tnotifyObserver();\r\n\t\t}\r\n\t}", "public void setMinThreshold(double minThreshold) {\n this.minThreshold = minThreshold;\n }", "public void xsetMinTemperatureF(org.apache.xmlbeans.XmlString minTemperatureF)\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(MINTEMPERATUREF$6, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(MINTEMPERATUREF$6);\n }\n target.set(minTemperatureF);\n }\n }", "public void setMon6067(double mon6067) {\r\n\t\tthis.mon6067 = mon6067;\r\n\t}", "public java.math.BigDecimal getLow() {\n return low;\n }", "public void setUnitPrice(Float UnitPrice) {\n this.UnitPrice = UnitPrice;\n }", "public void xsetUnit(gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType unit)\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType target = null;\n target = (gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType)get_store().find_element_user(UNIT$6, 0);\n if (target == null)\n {\n target = (gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType)get_store().add_element_user(UNIT$6);\n }\n target.set(unit);\n }\n }", "public void setMon60310(double mon60310) {\r\n\t\tthis.mon60310 = mon60310;\r\n\t}", "public int setTemperatureMin(Float temperatureMin) {\n try {\n setTemperatureMin(temperatureMin.floatValue());\n } catch (Exception e) {\n setTemperatureMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return temperatureMinError;\n }", "public void setMon6037(double mon6037) {\r\n\t\tthis.mon6037 = mon6037;\r\n\t}", "public void setMinTemperatureC(java.lang.String minTemperatureC)\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(MINTEMPERATUREC$10, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MINTEMPERATUREC$10);\n }\n target.setStringValue(minTemperatureC);\n }\n }", "public void setHigh(double value){high = value;}", "@JsonProperty(\"LowQuantity\")\n\tpublic Integer getLowQuantity() {\n\t\treturn lowQuantity;\n\t}", "public SunPositionAlgorithmLowRes(int year, int month, int day, int hour, int minute, int second, double longitude, double latitude) {\n\t\tsuper(year, month, day, hour, minute, second, longitude, latitude);\n\t}", "public int getLow() {\n\t\t\treturn low;\n\t\t}", "public void setMinTemp(@NonNull Integer minTemp) {\n this.minTemp = minTemp;\n }", "Unit(Apfloat unitIn, UnitType utIn) {\n\t\tthis(unitIn, utIn, 1);\n\t}", "public void setUnit (String value) {\n\tthis.unit = value;\n }", "public void setUnit(String unit) {\n this.unit = unit;\n }", "private void setLowestMeasuredPercentile(double lowestPercentileValue) {\n for (QoSSentinel sentinel : qosHandler.getQosSentinels()) {\n sentinel.setLowestPercentileValue(lowestPercentileValue);\n }\n }", "public int setTemperatureMin(String temperatureMin) {\n try {\n setTemperatureMin(new Float(temperatureMin).floatValue());\n } catch (Exception e) {\n setTemperatureMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return temperatureMinError;\n }", "public void temperatureMinChanged(ValueChangeEvent event) {\n temperatureMin = Integer.valueOf(event.getNewValue().toString());\n updateTemperatureNormalisation();\n }", "public void setUnit(String unit)\n {\n this.unit = unit;\n }", "public void setUnitPrice(float value) {\n this.unitPrice = value;\n }", "public void setUnit(Unit u)\r\n {\r\n display.setUnit(u);\r\n selectedIndex = -1;\r\n }", "public int getLow() {\n\t\treturn low;\n\t}", "public double getLowPrice() {\r\n\t\treturn lowPrice;\r\n\t}", "public void setHigh(double value) {\n this.high = value;\n }", "public void setHigh(String high){\n range.setHigh(high);\n }", "public void setTemperature_unit(byte temperature_unit) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeByte(__io__address + 11, temperature_unit);\n\t\t} else {\n\t\t\t__io__block.writeByte(__io__address + 11, temperature_unit);\n\t\t}\n\t}", "public void setUnitPriceDiscountHigh(String UnitPriceDiscountHigh) {\n this.UnitPriceDiscountHigh = UnitPriceDiscountHigh;\n }", "private void setTemperatureMinError (float temperatureMin, Exception e, int error) {\n this.temperatureMin = temperatureMin;\n temperatureMinErrorMessage = e.toString();\n temperatureMinError = error;\n }", "public void setMon60615(double mon60615) {\r\n\t\tthis.mon60615 = mon60615;\r\n\t}", "public void setMin( float min )\n {\n this.min = min;\n show_text();\n }", "public void setMon6033(double mon6033) {\r\n\t\tthis.mon6033 = mon6033;\r\n\t}", "public void setUnit(String unit);", "public void setUnit(String unit) {\n\t\tthis.unit = unit;\n\t}", "public void _setMin(float min)\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n setMinimum((int) (min * 100));\r\n } else\r\n {\r\n setMinimum((int) min);\r\n }\r\n }", "public double getLowPrice() {\n return this.lowPrice;\n }", "public void setMon6046(double mon6046) {\r\n\t\tthis.mon6046 = mon6046;\r\n\t}", "public void setMon6052(double mon6052) {\r\n\t\tthis.mon6052 = mon6052;\r\n\t}", "public void setMon6053(double mon6053) {\r\n\t\tthis.mon6053 = mon6053;\r\n\t}", "public void setMon6038(double mon6038) {\r\n\t\tthis.mon6038 = mon6038;\r\n\t}", "public void setUnit (jkt.hms.masters.business.MasStoreAirForceDepot unit) {\n\t\tthis.unit = unit;\n\t}", "public void setMinOffset(float minOffset) {\n this.mMinOffset = minOffset;\n }", "void setMinActiveAltitude(double minActiveAltitude);", "public void setMon6043(double mon6043) {\r\n\t\tthis.mon6043 = mon6043;\r\n\t}", "Unit(String unitIn, UnitType utIn) {\n\t\tthis(new Apfloat(unitIn, APFLOATPRECISION), utIn, 1);\n\t}", "public void setMon6063(double mon6063) {\r\n\t\tthis.mon6063 = mon6063;\r\n\t}", "public void setMon603r8(double mon603r8) {\r\n\t\tthis.mon603r8 = mon603r8;\r\n\t}", "public void xsetMinTemperatureC(org.apache.xmlbeans.XmlString minTemperatureC)\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(MINTEMPERATUREC$10, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(MINTEMPERATUREC$10);\n }\n target.set(minTemperatureC);\n }\n }", "public void setMon603a8(double mon603a8) {\r\n\t\tthis.mon603a8 = mon603a8;\r\n\t}", "public void setMon6041(double mon6041) {\r\n\t\tthis.mon6041 = mon6041;\r\n\t}", "public void setMon60610(double mon60610) {\r\n\t\tthis.mon60610 = mon60610;\r\n\t}", "public final int getLow() {\n\treturn(this.low);\n }", "public void setUnit(String unit) {\n this.unit = unit == null ? null : unit.trim();\n }", "public void setUnit(String unit) {\n this.unit = unit == null ? null : unit.trim();\n }", "public void setLower_warn(Integer lower_warn) {\n this.lower_warn = lower_warn;\n }", "public void setMinimumStock (double minimumStock) {\r\n\t\tthis.minimumStock = minimumStock;\r\n\t}", "public void setLowKey(KeyClass low_key) throws ChainException, IOException {\n\t\tthis.lowKey = low_key;\r\n\t\tRID rid = new RID();\r\n\t\t\r\n\t\tKeyDataEntry dEntry = leaf.getFirst(rid);\r\n\t\tKeyClass curKey = dEntry.key;\r\n\t\t\r\n\t\twhile( BT.keyCompare(curKey, low_key) != 0 ){\r\n\t\t\tdEntry = leaf.getNext(rid);\r\n\t\t\tif( dEntry != null ){\r\n\t\t\t\tcurKey = dEntry.key;\r\n\t\t\t}else{\r\n\t\t\t\tPageId nextPageId = leaf.getNextPage();\r\n\t\t\t\tif( nextPageId.pid != -1){\r\n\t\t\t\t\tSystemDefs.JavabaseBM.unpinPage(leaf.getCurPage(), true);\r\n\t\t\t\t\tSystemDefs.JavabaseBM.pinPage( nextPageId, leaf, false);\r\n\t\t\t\t\tleaf.dumpPage();\r\n\t\t\t\t\tdEntry = leaf.getFirst(rid);\r\n\t\t\t\t\tcurKey = dEntry.key;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//wasal le 2a5er 7aga:\r\n\t\t\t\t\tSystem.out.println(\"Invalid lower keyyyyyyy.\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}//end else.\r\n\t\t\t\t\r\n\t\t\t}//end else.\r\n\t\t\t\r\n\t\t}//end while.\r\n\t\t\r\n\t\t\r\n\t}", "public void setLowerPoint(Point lower) {\n this.lower = lower;\n }", "public void setMin(int min) {\n this.min = min;\n }", "public void setMin(int min) {\n this.min = min;\n }" ]
[ "0.66394186", "0.6637465", "0.64773524", "0.6290531", "0.61898124", "0.61241764", "0.60356003", "0.5729155", "0.57213193", "0.56870276", "0.55099076", "0.541361", "0.53034157", "0.53030765", "0.52862066", "0.52833456", "0.52798253", "0.52794623", "0.52634734", "0.524477", "0.5219409", "0.5178663", "0.5178283", "0.51766765", "0.516864", "0.5162134", "0.5133414", "0.5111201", "0.5088281", "0.5073639", "0.50729305", "0.5064939", "0.5064072", "0.5049619", "0.50452197", "0.50426584", "0.50420004", "0.504048", "0.5026448", "0.5017769", "0.5016363", "0.49995843", "0.4999051", "0.4983545", "0.4982846", "0.49818215", "0.49661192", "0.49641198", "0.49584994", "0.49532875", "0.49481544", "0.49366418", "0.4933956", "0.4921035", "0.49192193", "0.49148756", "0.4912904", "0.49019703", "0.4898443", "0.4889933", "0.4881012", "0.48750755", "0.4874545", "0.48638487", "0.48631865", "0.48595324", "0.48586452", "0.48505104", "0.48321483", "0.48281643", "0.48246753", "0.48067573", "0.4784382", "0.47790328", "0.4771948", "0.47718322", "0.4771058", "0.4767008", "0.47651902", "0.47625127", "0.47461787", "0.47326198", "0.47320324", "0.47282958", "0.47258762", "0.4725256", "0.4722648", "0.4722474", "0.47208005", "0.47200024", "0.47177812", "0.47151816", "0.47146806", "0.47146806", "0.4711778", "0.47110614", "0.47089258", "0.4708366", "0.46980098", "0.46980098" ]
0.77703774
0
Gets the high value for this ForecastDayInfo.
public java.math.BigDecimal getHigh() { return high; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getHigh() {\n return high;\n }", "public final int getHigh() {\n\treturn(this.high);\n }", "public int getHigh() {\n\t\t\treturn high;\n\t\t}", "public int getHigh() {\n\t\treturn high;\n\t}", "public String getHigh() {\n return this.high.toString();\n }", "public double getHigh() { return high;}", "public int getHigh()\t\n\t{\t//start of getHigh mehtod\n\t\treturn HIGH_NUM;\n\t}", "public double getHigh(){\n return /*home*/ this.high /*and eat everything*/;\r\n //then go to sleep for a day or three \r\n }", "public double getHighThreshold() {\n return highThreshold;\n }", "public double getHighPrice() {\n return this.highPrice;\n }", "public double getHighPrice() {\r\n\t\treturn highPrice;\r\n\t}", "public int highDie(){\n int highest = this.dice[0].getFaceValue();\n for (int i = 1; i < dice.length; i++){\n highest = Math.max(highest, this.dice[i].getFaceValue());\n }\n return highest;\n }", "public float calculateAverageHigh() {\n\t\t\n\t\tfloat sum = 0;\n\t\tfor (int i=0; i<temps.length; i++)\n\t\t\tsum += temps[i][0];\n\t\treturn sum /= temps.length;\n\t\t\n\t}", "public int getLatestWeather() { //This function goes through the readings Arraylist and gets the most recent weather Code and returns it.\n int code;\n code = readings.get(readings.size() - 1).code;\n return code;\n }", "Long getTemperatureForLastHour();", "int getHighScore() {\n return getStat(highScore);\n }", "@Nullable\n protected abstract Map.Entry<K, V> onGetHighestEntry();", "public Location3D getHighLoc() {\n\t\treturn highPoint;\n\t}", "public Integer getMaxHour() {\r\n return maxHour;\r\n }", "public int getHighscore()\n {\n return this.highscore;\n }", "public int getHighScore() {\n return highScore;\n }", "public TempUnit getHighUnit() {\n return highUnit;\n }", "public void setHigh(double value) {\n this.high = value;\n }", "public int getHighScore() {\n\t\treturn highscore;\n\t}", "@Override\n public Note getHighest() {\n if (this.sheet.isEmpty()) {\n throw new IllegalArgumentException(\"No note is added.\");\n }\n Note currentHigh = new Note(this.high.getDuration(), this.high.getOctave\n (), this.high.getStartMeasure(), this.high.getPitch(), this.high\n .getIsHead(), this.high.getInstrument(), this.high.getVolume());\n for (int i = 0; i < this.sheet.size(); i++) {\n for (Note n : this.sheet.get(i)) {\n if (currentHigh.compareTo(n) == -1) {\n currentHigh = n;\n }\n }\n }\n return currentHigh;\n }", "public float getTemperatureMax() {\n return temperatureMax;\n }", "public Amount getBalanceThresholdHigh() {\n return this.balanceThresholdHigh;\n }", "public String getDiscountPriceHigh() {\n return this.DiscountPriceHigh;\n }", "public int highCardVal()\n\t{\n\t\tint value = 0;\n\t\t\n\t\tfor (int i=0; i<MAX_CARDS; i++)\n\t\t\tvalue += hand[i].getValue();\n\t\t\n\t\treturn value;\n\t}", "public double getHumidityValue() {\r\n return humidityValue;\r\n }", "public double confidenceHigh() {\n return confidenceHigh;\n }", "public String getUnitPriceHigh() {\n return this.UnitPriceHigh;\n }", "public int getHumidity(){\n return VirtualHardwareManager.getInstance().getHumidity();\n }", "public boolean isHighHumidity()\n {\n return this.rainfall > 0.85F;\n }", "public T findHighest(){\n T highest = array[0];\n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()>highest.doubleValue())\n {\n highest = array[i];\n } \n }\n return highest;\n }", "public float getMaxHealth()\n {\n return maxHealth;\n }", "public Date calculateHighestVisibleTickValue(DateTickUnit unit) { return previousStandardDate(getMaximumDate(), unit); }", "public int[] getHighScore() {\n return HighScore;\n }", "public double getMaxHealth() {\n return maxHealth;\n }", "public Double getMaximumValue () {\r\n\t\treturn (maxValue);\r\n\t}", "public int getHighSpeed() {\r\n return this.highSpeed;\r\n }", "public float getLastValue() {\n // ensure float division\n return ((float)(mLastData - mLow))/mStep;\n }", "public String getUnitPriceDiscountHigh() {\n return this.UnitPriceDiscountHigh;\n }", "public double getHumidityTemperature() {\r\n return humidityTemperature;\r\n }", "BigDecimal getHighPrice();", "public double maxValue(DateTime dt1, DateTime dt2) throws Exception {\r\n Candle[] cd = collectCandlesByIndex(find_index(dt1), find_index(dt2));\r\n double max;\r\n if (cd.length > 1) {\r\n max = cd[0].getHigh();\r\n for (Candle c : cd) {\r\n if (c.getHigh() > max){\r\n max = c.getHigh();\r\n }\r\n }\r\n return max;\r\n } else if (cd.length == 1) {\r\n return cd[0].getHigh();\r\n } else {\r\n return 0;\r\n }\r\n }", "public String getOriginalPriceHigh() {\n return this.OriginalPriceHigh;\n }", "public float getHighestFitness() {\r\n\t\treturn highestScore;\r\n\t}", "public void setHigh(double value){high = value;}", "Double getMaximumValue();", "public float getmaxTemp() {\n Reading maxTempReading = null;\n float maxTemp = 0;\n if (readings.size() >= 1) {\n maxTemp = readings.get(0).temperature;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).temperature > maxTemp) {\n maxTemp = readings.get(i).temperature;\n }\n }\n } else {\n maxTemp = 0;\n }\n return maxTemp;\n }", "public int determineHighestVal() {\n if (playerCards[0].value > playerCards[1].value) {\n return playerCards[0].value;\n }\n return playerCards[1].value;\n\n }", "public double getHumidity()\n {\n return humidity;\n }", "public java.lang.Integer getHighestPeriodNum() {\n return highestPeriodNum;\n }", "public int getHPValue() {\n return hPValue_;\n }", "public int getMaxHealth() {\n return this.maxHealth;\n }", "public Float getHumidity () {\n return humidity;\n }", "public Double getOutdoorTemperature() {\n return outdoorTemperature;\n }", "public double getHumidity() {\n\t\treturn (int)(Math.random()*101);//模拟一个随机湿度\n\t}", "public float altitude_monotonic_GET()\n { return (float)(Float.intBitsToFloat((int) get_bytes(data, 8, 4))); }", "public int getHighestVariable() {\n\t\treturn HighestVariable;\n\t}", "public int getHPValue() {\n return hPValue_;\n }", "String getHighScoreTime() {\n return getStringStat(highScoreTime);\n }", "public int findHighestTemp() {\n\t\t\n\t\tint max = 0;\n\t\tint indexHigh = 0;\n\t\tfor (int i=0; i<temps.length; i++)\n\t\t\tif (temps[i][0] > max) {\n\t\t\t\tmax = temps[i][0];\n\t\t\t\tindexHigh = i;\n\t\t\t}\n\t\t\n\t\treturn indexHigh;\n\t\t\n\t}", "int getSatOff(){\n return getPercentageValue(\"satOff\");\n }", "public int getMaxHealth() {\n return maxHealth;\n }", "public java.lang.String getMaxTemperatureF()\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(MAXTEMPERATUREF$4, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public int getMaxHealth() {\r\n return maxHealth;\r\n }", "public double getMaxHp() {\n return maxHp;\n }", "public int getDayOrNight() {\n return getStat(dayOrNight);\n }", "public Double getMaxAltitude() {\n return maxAltitude;\n }", "public static int calcHighTemp(int[][] arrayTemp) {\r\n\t\tint indexHigh = 1;\r\n\t\tfor (int i = 0; i < COLUMNS; i++) {\r\n\t\t\tif (arrayTemp[1][i] > arrayTemp[1][indexHigh])\r\n\t\t\t\tindexHigh = i;\r\n\t\t}\r\n\t\tSystem.out.println(\"The highest month is \" + month[indexHigh]);\r\n\t\treturn indexHigh;\r\n\t}", "public int getMaxHP() {\n return maxHP;\n }", "public Integer getHighOpinion() {\n return highOpinion;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public double getMaximumValue() { return this.maximumValue; }", "public Object peak(){\n \t if(top==null) System.out.println(\"stack is empty\");\n \t return top.value;\n }", "double getMax() {\n\t\t\treturn value_max;\n\t\t}", "int getHPValue();", "public float bottom_clearance_GET()\n { return (float)(Float.intBitsToFloat((int) get_bytes(data, 28, 4))); }", "public Float getT1B11Hfmax() {\r\n return t1B11Hfmax;\r\n }", "public float _getMax()\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n return (getMaximum() / max);\r\n } else\r\n {\r\n return getMaximum();\r\n }\r\n }", "public double getUpperValue() {\n return this.upperMeasure.getValue();\n }", "@java.lang.Override public int getDayValue() {\n return day_;\n }", "public Map<String, Integer>\t\t\tgetHighscoreList()\t\t\t\t\t\t\t{ return this.highscore; }", "private void findHumidities(ForecastIO FIO, WeatherlyDayForecast day){\n FIOHourly hourlyForecast = new FIOHourly(FIO);\n int numHours = hourlyForecast.hours();\n\n //Determine the number of hours left in the day\n Calendar rightNow = Calendar.getInstance();\n int dayHoursLeft = 24 - rightNow.get(Calendar.HOUR_OF_DAY);\n\n //Find the lowest and highest chances for precipitation for the rest of the day\n double minHum = hourlyForecast.getHour(0).humidity();\n double maxHum = minHum;\n int maxHour = rightNow.get(Calendar.HOUR_OF_DAY);\n for (int i = 1; i < dayHoursLeft; i++){\n double hum = hourlyForecast.getHour(i).humidity();\n if (minHum > hum)\n minHum = hum;\n if (maxHum < hum) {\n maxHum = hum;\n maxHour = i + rightNow.get(Calendar.HOUR_OF_DAY);\n }\n\n }\n\n day.setHumMin((int) (minHum * 100));\n day.setHumMax((int) (maxHum * 100));\n day.setHumMaxTime(maxHour);\n }", "public int getMaxHealth() {\n\t\treturn maxHealth;\n\t}", "public int getMaxHealth() {\n\t\treturn maxHealth;\n\t}", "public float getYChartMax() {\n return 0.0F;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }", "public int getMaxHP() {\n return maxHP_;\n }" ]
[ "0.70533735", "0.69255435", "0.6827428", "0.67887247", "0.67875415", "0.65844715", "0.65593994", "0.64961135", "0.63696545", "0.6256643", "0.62500364", "0.61451864", "0.60064816", "0.5901117", "0.58532983", "0.5803395", "0.5793778", "0.57880527", "0.574139", "0.57306355", "0.57143563", "0.56782883", "0.567", "0.5669462", "0.5666862", "0.5646692", "0.5634945", "0.5597513", "0.5595618", "0.5579562", "0.5538431", "0.5522284", "0.54948205", "0.5490977", "0.5436437", "0.5411485", "0.54064584", "0.5401058", "0.53955513", "0.5393569", "0.53877044", "0.53861785", "0.5376773", "0.5369511", "0.53627986", "0.53476876", "0.53327984", "0.5319129", "0.531066", "0.53014654", "0.52993697", "0.52993494", "0.5298257", "0.5297271", "0.52941865", "0.5282409", "0.5278001", "0.5261081", "0.5256771", "0.5252449", "0.5251307", "0.52505666", "0.5242711", "0.52425957", "0.52419704", "0.5234266", "0.5229412", "0.52275646", "0.5222616", "0.5206401", "0.5197379", "0.518831", "0.5181113", "0.5164949", "0.5159317", "0.51592994", "0.51592994", "0.51592994", "0.51584196", "0.51584196", "0.51523095", "0.51507825", "0.5149407", "0.51421833", "0.5137658", "0.5135443", "0.5130861", "0.51294047", "0.51233375", "0.5121916", "0.5121562", "0.5120167", "0.5120167", "0.51133174", "0.5109544", "0.5109544", "0.5109544", "0.51077867", "0.51077867", "0.51077867" ]
0.6991441
1
Sets the high value for this ForecastDayInfo.
public void setHigh(java.math.BigDecimal high) { this.high = high; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setHigh(double value) {\n this.high = value;\n }", "public void setHigh(int high) {\n\t\tthis.high = high;\n\t}", "public void setHigh(double value){high = value;}", "public void setHigh(String high){\n range.setHigh(high);\n }", "public void setHigh(int H)\t\n\t{\t//start of setHigh method\n\t\tHIGH_NUM = H;\n\t}", "public double getHigh() {\n return high;\n }", "public void setHighUnit(TempUnit highUnit) {\n this.highUnit = highUnit;\n }", "public int getHigh() {\n\t\t\treturn high;\n\t\t}", "public void changeHighest()\n {\n hourCounts[18] = 100;\n }", "public int getHigh() {\n\t\treturn high;\n\t}", "public double getHigh() { return high;}", "public String getHigh() {\n return this.high.toString();\n }", "public final int getHigh() {\n\treturn(this.high);\n }", "public java.math.BigDecimal getHigh() {\n return high;\n }", "private void tooHigh() {\n if (this.hitPoints > 255) {\n System.out.println(\"You set the value too high! Setting it to 255\");\n this.hitPoints = 255;\n }\n }", "public void setHumidityTemperature(double value) {\r\n this.humidityTemperature = value;\r\n }", "public void setHighscore(int score)\n {\n this.highscore = score;\n }", "private void setHighScore(int hs) {\n setStat(hs, highScore);\n }", "public void setHumidityValue(double value) {\r\n this.humidityValue = value;\r\n }", "public double getHigh(){\n return /*home*/ this.high /*and eat everything*/;\r\n //then go to sleep for a day or three \r\n }", "public void setDiscountPriceHigh(String DiscountPriceHigh) {\n this.DiscountPriceHigh = DiscountPriceHigh;\n }", "public void setHighOpinion(Integer highOpinion) {\n this.highOpinion = highOpinion;\n }", "private void setHighCard(int highCard) {\r\n this.highCard = highCard;\r\n }", "public void setHighestPeriodNum(java.lang.Integer highestPeriodNum) {\n this.highestPeriodNum = highestPeriodNum;\n }", "public int getHigh()\t\n\t{\t//start of getHigh mehtod\n\t\treturn HIGH_NUM;\n\t}", "public double getHighThreshold() {\n return highThreshold;\n }", "public boolean isHighHumidity()\n {\n return this.rainfall > 0.85F;\n }", "private void setDayCountDown() {\n dayCountDown = getMaxHunger();\n }", "public void setHighestOverdueCount24M(java.lang.Integer highestOverdueCount24M) {\n this.highestOverdueCount24M = highestOverdueCount24M;\n }", "public void setUnitPriceDiscountHigh(String UnitPriceDiscountHigh) {\n this.UnitPriceDiscountHigh = UnitPriceDiscountHigh;\n }", "public void setHighestOverdueCount6M(java.lang.Integer highestOverdueCount6M) {\n this.highestOverdueCount6M = highestOverdueCount6M;\n }", "public static void newHighscore(int h){\n highscore = h;\n SharedPreferences prefs = cont.getSharedPreferences(\"PAFF_SETTINGS\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putInt(\"highscore\",highscore);\n editor.commit();\n }", "public void setUnitPriceHigh(String UnitPriceHigh) {\n this.UnitPriceHigh = UnitPriceHigh;\n }", "public double getHighPrice() {\r\n\t\treturn highPrice;\r\n\t}", "private void setHighScoreTime(String hst) {\n setStringStat(hst, highScoreTime);\n }", "public void setLow(double value) {\n this.low = value;\n }", "public void setHighGearState() {\n shifter.set(Constants.Drivetrain.HIGH_GEAR_STATE);\n }", "public double getHighPrice() {\n return this.highPrice;\n }", "public void setHumidity(Float humidity) {\n this.humidity = humidity;\n }", "public void setHighLights(ArrayList<Object> highLights) {\r\n\t\tthis._highLights = highLights;\r\n\t}", "public void setMaxHour(Integer maxHour) {\r\n this.maxHour = maxHour;\r\n }", "public void setActualHP(int hp) { this.actualHP = Math.max(0, hp); }", "public void setHighestOverdueCount12M(java.lang.Integer highestOverdueCount12M) {\n this.highestOverdueCount12M = highestOverdueCount12M;\n }", "public void setH(double value) {\n this.h = value;\n }", "public void setMaximumValue (Double max) {\r\n\t\tmaxValue = max;\r\n\t}", "public void setMaximumValue (double max) {\r\n\t\tmaxValue = new Double(max);\r\n\t}", "public void setFiHoatdong(Long fiHoatdong) {\n this.fiHoatdong = fiHoatdong;\n }", "public void setFiHoatdong(Long fiHoatdong) {\n this.fiHoatdong = fiHoatdong;\n }", "public void setOutdoorTemperature(Double outdoorTemperature) {\n this.outdoorTemperature = outdoorTemperature;\n }", "public void changeHasHighWall()\r\n\t{\r\n\t\thasHighWall = !hasHighWall;\r\n\t}", "public void changeHasHighJump()\r\n\t{\r\n\t\thasHighJump = !hasHighJump;\r\n\t}", "private void setEmbeddingTokenHigh(long value) {\n bitField0_ |= 0x00000002;\n embeddingTokenHigh_ = value;\n }", "public void setLow(double value){low = value;}", "private void setEmbeddingTokenHigh(long value) {\n bitField0_ |= 0x00000004;\n embeddingTokenHigh_ = value;\n }", "public void setSaturation ( float value ) {\n\t\texecute ( handle -> handle.setSaturation ( value ) );\n\t}", "public void adaugH(Double humidity) {\r\n\t\tsetH.add(humidity); \r\n\t}", "public void setClose(double value) {\n this.close = value;\n }", "public void setMaximumValue(double maximumValue)\n {\n this.maximumValue = maximumValue;\n }", "private void processHighBidValue(Bid bid) {\n\t}", "public synchronized void setHighUnits(int cMax)\n {\n if (cMax < 0)\n {\n throw new IllegalArgumentException(\"high units out of bounds\");\n }\n\n boolean fShrink = cMax < m_cMaxUnits;\n\n m_cMaxUnits = cMax;\n\n // ensure that low units are in range\n setLowUnits((int) (m_dflPruneLevel * cMax));\n\n if (fShrink)\n {\n checkSize();\n }\n }", "public void \t\t\t\t\t\tsetHighscoreList(Map<String, Integer> temp) { this.highscore = temp; }", "private void setHealth() {\n eliteMob.setHealth(maxHealth = (maxHealth > 2000) ? 2000 : maxHealth);\n }", "public void setH_(double h_) {\n\t\tthis.h_ = h_;\n\t}", "public void setPaperMediumEndTime(Date value) {\n setAttributeInternal(PAPERMEDIUMENDTIME, value);\n }", "public void setOriginalPriceHigh(String OriginalPriceHigh) {\n this.OriginalPriceHigh = OriginalPriceHigh;\n }", "public TempUnit getHighUnit() {\n return highUnit;\n }", "public void setHighestConsecutive(int highestConsecutive) {\r\n this.highestConsecutive = highestConsecutive;\r\n }", "public void setOverdueMaxAmount5Y(java.lang.Double overdueMaxAmount5Y) {\n this.overdueMaxAmount5Y = overdueMaxAmount5Y;\n }", "public void setDateHeure(Long p_odateHeure);", "public void setSat(float sat) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeFloat(__io__address + 4, sat);\n\t\t} else {\n\t\t\t__io__block.writeFloat(__io__address + 4, sat);\n\t\t}\n\t}", "public void setHP(int h)\n\t{\n\t\tiHP = h;\n\t\t\n\t}", "public void setHightPrice(final float newHightPrice)\r\n{\r\n\tthis.hightPrice = newHightPrice;\r\n}", "public void setHour(Pair<Double, Double> value) {\r\n\t\thour = value;\r\n\t}", "public Amount getBalanceThresholdHigh() {\n return this.balanceThresholdHigh;\n }", "private void updateHighScore() {\n\t\tif (pacman.getCurrentCell().getContainsFood() == true) {\n\t\t\tpacman.getCurrentCell().setContainsFood(false);\n\t\t\thighScore.update(10);\n\t\t}\n\t\tif (highScore.getScore() / 2440 == actualLevel) {\n\t\t\ttry {\n\t\t\t\tThread.sleep(500);\n\t\t\t} catch (InterruptedException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\tinitNewLevel();\n\t\t\t++actualLevel;\n\t\t}\n\t}", "public void setH(double h) {\n this.h = h;\n }", "public void setMaximumStock (double maximumStock) {\r\n\t\tthis.maximumStock = maximumStock;\r\n\t}", "public int setTemperatureMax(Float temperatureMax) {\n try {\n setTemperatureMax(temperatureMax.floatValue());\n } catch (Exception e) {\n setTemperatureMaxError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return temperatureMaxError;\n }", "private void updateHighscore() {\n if(getScore() > highscore)\n highscore = getScore();\n }", "public String getDiscountPriceHigh() {\n return this.DiscountPriceHigh;\n }", "public void setHot(Integer hot) {\n this.hot = hot;\n }", "public int setTemperatureMax(Integer temperatureMax) {\n try {\n setTemperatureMax(temperatureMax.floatValue());\n } catch (Exception e) {\n setTemperatureMaxError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return temperatureMaxError;\n }", "protected void setLastFoodY(int newLastFoodY) {\n\t\tlastFoodY = newLastFoodY;\n\t}", "public void setMaximum( final double max )\n\t{\n\t\tthis.max = max;\n\t\tthis.oneOverMax = 1d / this.max;\n\t}", "public void setHue(float hue) {\r\n\t\thsb[0] = hue;\r\n\t}", "public void setFiNgayHetHl(Date fiNgayHetHl) {\n this.fiNgayHetHl = fiNgayHetHl;\n }", "public void setHolidayEnumerator(HolidayEnumerator he) {\n _holidayEnumerator = he;\n }", "boolean incHighValue() { return true; }", "public void setT1B11Hfmax(Float t1B11Hfmax) {\r\n this.t1B11Hfmax = t1B11Hfmax;\r\n }", "private void processSuperHighValue(Bid bid) {\n\t}", "public void setHp(byte hp){\n this.hp = hp;\n }", "public int highDie(){\n int highest = this.dice[0].getFaceValue();\n for (int i = 1; i < dice.length; i++){\n highest = Math.max(highest, this.dice[i].getFaceValue());\n }\n return highest;\n }", "public Builder setUnknown72(long value) {\n bitField0_ |= 0x00000002;\n unknown72_ = value;\n onChanged();\n return this;\n }", "public void setSaturation(double saturation) {\n checkArgument(0.0 <= saturation && saturation <= 1.0,\n \"Saturation must be between 0.0 and 1.0 inclusive.\");\n this.saturation = saturation;\n updateColors();\n }", "public void setMaximumAir ( int ticks ) {\n\t\texecute ( handle -> handle.setMaximumAir ( ticks ) );\n\t}", "public void setHourlyRate (double hourlyRate) {\r\n // if hourlyRate is negative, hourlyRate is 0\r\n if (hourlyRate < 0) {\r\n this.hourlyRate = 0;\r\n }\r\n else {\r\n this.hourlyRate = hourlyRate;\r\n }\r\n // calls calculateSalary to update the salary once hourlyRate is changed\r\n calculateSalary();\r\n }", "public String getUnitPriceHigh() {\n return this.UnitPriceHigh;\n }", "public void setMinorAbateValue(short minorAbateValue) throws JNCException {\n setMinorAbateValue(new YangUInt8(minorAbateValue));\n }", "public void setYValue( double value ){\r\n\t\tsuper.setYValue( new Double( value ) );\r\n\t}", "public void setH(Double h);" ]
[ "0.731499", "0.69552076", "0.6700077", "0.6465704", "0.64069897", "0.5937831", "0.5889639", "0.5776952", "0.5736732", "0.56972045", "0.5692405", "0.5633257", "0.56254077", "0.55363125", "0.5534392", "0.55239606", "0.5481163", "0.54776615", "0.5476855", "0.5467047", "0.5447795", "0.5410823", "0.53860253", "0.53606504", "0.5299243", "0.52988994", "0.52729434", "0.5255242", "0.52395064", "0.5200054", "0.5198661", "0.51623464", "0.515689", "0.5143558", "0.5142594", "0.51208574", "0.5114379", "0.5102197", "0.5088634", "0.5076139", "0.5055329", "0.5030991", "0.5026916", "0.5003963", "0.4966503", "0.49262357", "0.4925338", "0.4925338", "0.4921344", "0.49051374", "0.4887191", "0.487199", "0.48622927", "0.48422694", "0.48363358", "0.4834717", "0.4830394", "0.48252904", "0.47959656", "0.47885412", "0.47714287", "0.4767514", "0.47506315", "0.47501847", "0.4745003", "0.47124678", "0.4691465", "0.46842155", "0.46790946", "0.46705413", "0.46600637", "0.46588224", "0.465405", "0.46523896", "0.46507117", "0.4646886", "0.46424517", "0.46406373", "0.46362638", "0.46359006", "0.4616935", "0.46071607", "0.45886594", "0.4574021", "0.45711374", "0.4570326", "0.45656767", "0.45638847", "0.45628786", "0.4555179", "0.45530254", "0.45523313", "0.45430967", "0.454073", "0.45343456", "0.452354", "0.45222145", "0.45199525", "0.45147163", "0.45092663" ]
0.6776139
2
Gets the highUnit value for this ForecastDayInfo.
public TempUnit getHighUnit() { return highUnit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getUnitPriceHigh() {\n return this.UnitPriceHigh;\n }", "public int getHighUnits()\n {\n return m_cMaxUnits;\n }", "public String getHigh() {\n return this.high.toString();\n }", "public double getHigh() {\n return high;\n }", "public java.math.BigDecimal getHigh() {\n return high;\n }", "public void setHighUnit(TempUnit highUnit) {\n this.highUnit = highUnit;\n }", "public double getUpperValue() {\n return this.upperMeasure.getValue();\n }", "public String getUnitPriceDiscountHigh() {\n return this.UnitPriceDiscountHigh;\n }", "public int getHigh() {\n\t\t\treturn high;\n\t\t}", "public final int getHigh() {\n\treturn(this.high);\n }", "public Measure<?, ?> getUpperMeasure() {\n return this.upperMeasure;\n }", "public int getHigh() {\n\t\treturn high;\n\t}", "public double getHighThreshold() {\n return highThreshold;\n }", "public gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType.Enum getUnit()\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(UNIT$6, 0);\n if (target == null)\n {\n return null;\n }\n return (gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType.Enum)target.getEnumValue();\n }\n }", "public double getHigh() { return high;}", "public double getHigh(){\n return /*home*/ this.high /*and eat everything*/;\r\n //then go to sleep for a day or three \r\n }", "public java.lang.String getUnitClearanceHeight() {\n\t\treturn _tempNoTiceShipMessage.getUnitClearanceHeight();\n\t}", "public TempUnit getLowUnit() {\n return lowUnit;\n }", "public double getHighPrice() {\r\n\t\treturn highPrice;\r\n\t}", "public double getHighPrice() {\n return this.highPrice;\n }", "public int getHigh()\t\n\t{\t//start of getHigh mehtod\n\t\treturn HIGH_NUM;\n\t}", "Long getTemperatureForLastHour();", "public void setUnitPriceHigh(String UnitPriceHigh) {\n this.UnitPriceHigh = UnitPriceHigh;\n }", "public double getHumidityValue() {\r\n return humidityValue;\r\n }", "public gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType xgetUnit()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType target = null;\n target = (gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType)get_store().find_element_user(UNIT$6, 0);\n return target;\n }\n }", "public byte getTemperature_unit() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readByte(__io__address + 11);\n\t\t} else {\n\t\t\treturn __io__block.readByte(__io__address + 11);\n\t\t}\n\t}", "public int getHumidity(){\n return VirtualHardwareManager.getInstance().getHumidity();\n }", "public boolean isHighHumidity()\n {\n return this.rainfall > 0.85F;\n }", "public Location3D getHighLoc() {\n\t\treturn highPoint;\n\t}", "public java.lang.String getMaxTemperatureF()\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(MAXTEMPERATUREF$4, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public String getUnit() {\n\t\tString unit;\n\t\ttry {\n\t\t\tunit = this.getString(\"unit\");\n\t\t} catch (Exception e) {\n\t\t\tunit = null;\n\t\t}\n\t\treturn unit;\n\t}", "public double getHumidityTemperature() {\r\n return humidityTemperature;\r\n }", "DefinedUnitType getDefinedUnit();", "public float calculateAverageHigh() {\n\t\t\n\t\tfloat sum = 0;\n\t\tfor (int i=0; i<temps.length; i++)\n\t\t\tsum += temps[i][0];\n\t\treturn sum /= temps.length;\n\t\t\n\t}", "public Date calculateHighestVisibleTickValue(DateTickUnit unit) { return previousStandardDate(getMaximumDate(), unit); }", "@Override\n public String getHighEdu() {\n return high_education;\n }", "public Integer getMaxHour() {\r\n return maxHour;\r\n }", "public double getHumidity()\n {\n return humidity;\n }", "public Float getHumidity () {\n return humidity;\n }", "public Double getOutdoorTemperature() {\n return outdoorTemperature;\n }", "public int getHighSpeed() {\r\n return this.highSpeed;\r\n }", "public final Unit getUnit()\n { \n return Unit.forValue(m_Unit);\n }", "public double getHumidity() {\n\t\treturn (int)(Math.random()*101);//模拟一个随机湿度\n\t}", "public float getTemperatureMax() {\n return temperatureMax;\n }", "public int highDie(){\n int highest = this.dice[0].getFaceValue();\n for (int i = 1; i < dice.length; i++){\n highest = Math.max(highest, this.dice[i].getFaceValue());\n }\n return highest;\n }", "public String getDiscountPriceHigh() {\n return this.DiscountPriceHigh;\n }", "public int getUpperValue() {\n return getValue() + getExtent();\n }", "public String getUnit()\n {\n return (this.unit);\n }", "DefiningUnitType getDefiningUnit();", "public Double getOutdoorUmidity() {\n return outdoorUmidity;\n }", "public long upperLongValue() {\n\t\treturn getSection().upperLongValue();\n\t}", "public jkt.hms.masters.business.MasUnitOfMeasurement getUnitOfMeasurement() {\n\t\treturn unitOfMeasurement;\n\t}", "public double confidenceHigh() {\n return confidenceHigh;\n }", "public java.lang.Integer getHighestOverdueCount24M() {\n return highestOverdueCount24M;\n }", "public String getHourActualEnd() {\n return hourEndInput.getAttribute(\"value\");\n }", "String getHighScoreTime() {\n return getStringStat(highScoreTime);\n }", "public Double getMaxAltitude() {\n return maxAltitude;\n }", "public void setUnitPriceDiscountHigh(String UnitPriceDiscountHigh) {\n this.UnitPriceDiscountHigh = UnitPriceDiscountHigh;\n }", "public double getMon6067() {\r\n\t\treturn mon6067;\r\n\t}", "public double getCellUpperPrice() {\r\n\t\treturn CellUpperPrice;\r\n\t}", "public String getHumidity() {\n\t\treturn humidity;\n\t}", "public String getHumidity() {\n\t\treturn humidity;\n\t}", "@Override\n public double getMeasure() {\n return getFuelEffieciency();\n }", "public String getUnit() {\n\t\treturn(symbol);\n\t}", "public java.lang.String getMaxTemperatureC()\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(MAXTEMPERATUREC$8, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public double getMon6066() {\r\n\t\treturn mon6066;\r\n\t}", "Unit getUnit();", "public String getUnitOfMeasure() {\r\n return this.unitOfMeasure;\r\n }", "public int highCardVal()\n\t{\n\t\tint value = 0;\n\t\t\n\t\tfor (int i=0; i<MAX_CARDS; i++)\n\t\t\tvalue += hand[i].getValue();\n\t\t\n\t\treturn value;\n\t}", "public Amount getBalanceThresholdHigh() {\n return this.balanceThresholdHigh;\n }", "public int getUpperThreshold() {\r\n\t\tint upperThreshold;\r\n\t\tupperThreshold=this.upperThreshold;\r\n\t\treturn upperThreshold;\r\n\t}", "public Unit getUnit() {\n\t\treturn unit;\n\t}", "String getUnit();", "public jkt.hms.masters.business.MasUnit getOtherUnit () {\n\t\treturn otherUnit;\n\t}", "int getSatOff(){\n return getPercentageValue(\"satOff\");\n }", "public org.apache.xmlbeans.XmlString xgetMaxTemperatureF()\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(MAXTEMPERATUREF$4, 0);\n return target;\n }\n }", "public java.lang.Integer getHighestOverdueCount6M() {\n return highestOverdueCount6M;\n }", "public double getMon6052() {\r\n\t\treturn mon6052;\r\n\t}", "public java.lang.String getUnitLOA() {\n\t\treturn _tempNoTiceShipMessage.getUnitLOA();\n\t}", "public String getUnit() {\n return unit;\n }", "public String getUnit() {\n return unit;\n }", "public String getUnit() {\n return unit;\n }", "int getHighScore() {\n return getStat(highScore);\n }", "public int getDayOrNight() {\n return getStat(dayOrNight);\n }", "ChronoUnit getUnit();", "public jkt.hms.masters.business.MasStoreAirForceDepot getUnit () {\n\t\treturn unit;\n\t}", "public String getUnit() {\n\t\treturn unit;\n\t}", "public String getUnitOfMeasurement() {\r\n\t\treturn unitOfMeasurement;\r\n\t}", "public double getEUtilization() {\n return eUtilization;\n }", "public float getSavedAltitude() {\n double tiltX = getSavedTiltX();\n double tiltY = getSavedTiltY();\n\n double[] out = new double[2];\n PLevel.Type.evalAzimuthXAndAltitude(out, tiltX, tiltY);\n return (float) out[1];\n }", "public double getMaxHealth() {\n return maxHealth;\n }", "BigDecimal getHighPrice();", "public DateTickUnit getTickUnit() { return this.tickUnit; }", "public String getUnit();", "public float getMaxHealth()\n {\n return maxHealth;\n }", "public String getUnit () {\n\treturn this.unit;\n }", "public Integer getHighOpinion() {\n return highOpinion;\n }", "public float getHourHeight() {\n return config.hourHeight;\n }", "public double getMon6068() {\r\n\t\treturn mon6068;\r\n\t}", "public Unit<?> getUnit() {\n return _unit;\n }" ]
[ "0.6873439", "0.6642057", "0.66034627", "0.6514822", "0.64357823", "0.63881296", "0.63099784", "0.62846065", "0.6146178", "0.6136969", "0.61160815", "0.60969937", "0.60252404", "0.6000945", "0.5997377", "0.5846446", "0.5822097", "0.5789584", "0.5765885", "0.57569176", "0.57184607", "0.56936306", "0.5657714", "0.5631941", "0.55943877", "0.5591126", "0.5580867", "0.55379856", "0.55283564", "0.55215204", "0.54990315", "0.54933304", "0.54878783", "0.5469982", "0.54411787", "0.5412018", "0.5398753", "0.53967553", "0.5380093", "0.53770125", "0.53704137", "0.5346494", "0.53397024", "0.53392124", "0.53324455", "0.5325552", "0.5323886", "0.53013086", "0.52989006", "0.5294349", "0.5289638", "0.5254301", "0.5250741", "0.52485156", "0.524516", "0.52282786", "0.5201052", "0.5198603", "0.519465", "0.5194075", "0.51885176", "0.51885176", "0.5186086", "0.5183401", "0.5175209", "0.51471627", "0.5145464", "0.5115277", "0.51085174", "0.5102697", "0.5097491", "0.50844103", "0.50786394", "0.5071908", "0.5065594", "0.5065441", "0.505384", "0.5051976", "0.50490904", "0.5048287", "0.5048287", "0.5048287", "0.5044504", "0.50440997", "0.5043842", "0.5042458", "0.5041812", "0.50288314", "0.5024401", "0.5020776", "0.50189155", "0.50066215", "0.5006438", "0.5006257", "0.5005504", "0.50003904", "0.4987887", "0.49878725", "0.49867532", "0.4981241" ]
0.7597113
0
Sets the highUnit value for this ForecastDayInfo.
public void setHighUnit(TempUnit highUnit) { this.highUnit = highUnit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUnitPriceHigh(String UnitPriceHigh) {\n this.UnitPriceHigh = UnitPriceHigh;\n }", "public void setHigh(double value) {\n this.high = value;\n }", "public TempUnit getHighUnit() {\n return highUnit;\n }", "public void setHigh(String high){\n range.setHigh(high);\n }", "public void setHigh(java.math.BigDecimal high) {\n this.high = high;\n }", "public void setUnitPriceDiscountHigh(String UnitPriceDiscountHigh) {\n this.UnitPriceDiscountHigh = UnitPriceDiscountHigh;\n }", "public void setHigh(int high) {\n\t\tthis.high = high;\n\t}", "public void setHigh(double value){high = value;}", "public void setLowUnit(TempUnit lowUnit) {\n this.lowUnit = lowUnit;\n }", "public String getUnitPriceHigh() {\n return this.UnitPriceHigh;\n }", "public void setHigh(int H)\t\n\t{\t//start of setHigh method\n\t\tHIGH_NUM = H;\n\t}", "public synchronized void setHighUnits(int cMax)\n {\n if (cMax < 0)\n {\n throw new IllegalArgumentException(\"high units out of bounds\");\n }\n\n boolean fShrink = cMax < m_cMaxUnits;\n\n m_cMaxUnits = cMax;\n\n // ensure that low units are in range\n setLowUnits((int) (m_dflPruneLevel * cMax));\n\n if (fShrink)\n {\n checkSize();\n }\n }", "@XmlElement(name = \"upper\")\n public void setUpperValue(double value) {\n this.upperMeasure = Measure.valueOf(value, units);\n }", "public void setHumidityTemperature(double value) {\r\n this.humidityTemperature = value;\r\n }", "public double getHigh() {\n return high;\n }", "public void setHumidityValue(double value) {\r\n this.humidityValue = value;\r\n }", "public void setMon6067(double mon6067) {\r\n\t\tthis.mon6067 = mon6067;\r\n\t}", "public String getHigh() {\n return this.high.toString();\n }", "public void setHighestOverdueCount6M(java.lang.Integer highestOverdueCount6M) {\n this.highestOverdueCount6M = highestOverdueCount6M;\n }", "public void setMon6066(double mon6066) {\r\n\t\tthis.mon6066 = mon6066;\r\n\t}", "public void setHighOpinion(Integer highOpinion) {\n this.highOpinion = highOpinion;\n }", "public void setMon6052(double mon6052) {\r\n\t\tthis.mon6052 = mon6052;\r\n\t}", "public void setHumidity(Float humidity) {\n this.humidity = humidity;\n }", "public void setUnit(gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType.Enum unit)\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(UNIT$6, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(UNIT$6);\n }\n target.setEnumValue(unit);\n }\n }", "public void setMon6056(double mon6056) {\r\n\t\tthis.mon6056 = mon6056;\r\n\t}", "public boolean isHighHumidity()\n {\n return this.rainfall > 0.85F;\n }", "public int getHighUnits()\n {\n return m_cMaxUnits;\n }", "public void setHighestOverdueCount24M(java.lang.Integer highestOverdueCount24M) {\n this.highestOverdueCount24M = highestOverdueCount24M;\n }", "public void setMon6062(double mon6062) {\r\n\t\tthis.mon6062 = mon6062;\r\n\t}", "public void setDiscountPriceHigh(String DiscountPriceHigh) {\n this.DiscountPriceHigh = DiscountPriceHigh;\n }", "private void setHighScoreTime(String hst) {\n setStringStat(hst, highScoreTime);\n }", "public double getHigh() { return high;}", "public void setHighestOverdueCount12M(java.lang.Integer highestOverdueCount12M) {\n this.highestOverdueCount12M = highestOverdueCount12M;\n }", "public void setMaxUnit(int max) {\n maxUnit = max;\n }", "public void setMon6068(double mon6068) {\r\n\t\tthis.mon6068 = mon6068;\r\n\t}", "public void setOutdoorTemperature(Double outdoorTemperature) {\n this.outdoorTemperature = outdoorTemperature;\n }", "public String getUnitPriceDiscountHigh() {\n return this.UnitPriceDiscountHigh;\n }", "private void setHighCard(int highCard) {\r\n this.highCard = highCard;\r\n }", "public void setTemperature_unit(byte temperature_unit) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeByte(__io__address + 11, temperature_unit);\n\t\t} else {\n\t\t\t__io__block.writeByte(__io__address + 11, temperature_unit);\n\t\t}\n\t}", "public void setMon6057(double mon6057) {\r\n\t\tthis.mon6057 = mon6057;\r\n\t}", "public void changeHighest()\n {\n hourCounts[18] = 100;\n }", "public void setCellUpperPrice(double cellUpperPrice) {\r\n\t\tCellUpperPrice = cellUpperPrice;\r\n\t}", "public void setMon6069(double mon6069) {\r\n\t\tthis.mon6069 = mon6069;\r\n\t}", "public void setTickUnit(DateTickUnit unit) { setTickUnit(unit, true, true); }", "public void setUnitClearanceHeight(java.lang.String unitClearanceHeight) {\n\t\t_tempNoTiceShipMessage.setUnitClearanceHeight(unitClearanceHeight);\n\t}", "public void setMon6065(double mon6065) {\r\n\t\tthis.mon6065 = mon6065;\r\n\t}", "public java.math.BigDecimal getHigh() {\n return high;\n }", "public void setMon6036(double mon6036) {\r\n\t\tthis.mon6036 = mon6036;\r\n\t}", "public int getHigh() {\n\t\t\treturn high;\n\t\t}", "public void setMon6043(double mon6043) {\r\n\t\tthis.mon6043 = mon6043;\r\n\t}", "@Accessor(qualifier = \"Unit\", type = Accessor.Type.SETTER)\n\tpublic void setUnit(final B2BUnitModel value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(UNIT, value);\n\t}", "public void setUpperThreshold(int setUpperThreshold) {\r\n\t\tthis.upperThreshold = setUpperThreshold;\t\t\r\n\t}", "public void setMon6046(double mon6046) {\r\n\t\tthis.mon6046 = mon6046;\r\n\t}", "public void xsetUnit(gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType unit)\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType target = null;\n target = (gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType)get_store().find_element_user(UNIT$6, 0);\n if (target == null)\n {\n target = (gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType)get_store().add_element_user(UNIT$6);\n }\n target.set(unit);\n }\n }", "public void setMaxHour(Integer maxHour) {\r\n this.maxHour = maxHour;\r\n }", "public void setUnit(Unit unit) {\r\n\t\tthis.unit = unit;\r\n\t}", "public void setUnit () {\n\t\tdouble f = factor;\n\t\t/* Transform the value as a part of Unit */\n\t\tif (Double.isNaN(value)) return;\n\t\tif ((mksa&_log) != 0) {\n\t\t\tif ((mksa&_mag) != 0) value *= -2.5;\n\t\t\tfactor *= AstroMath.dexp(value);\n\t\t\tvalue = 0;\n\t\t}\n\t\telse {\n\t\t\tfactor *= value;\n\t\t\tvalue = 1.;\n\t\t}\n\t\t// Transform also the symbol\n\t\tif (f != factor) {\n\t\t\tif (symbol == null) symbol = edf(factor);\n\t\t\telse symbol = edf(factor) + toExpr(symbol);\n\t\t}\n\t}", "public void setMon6033(double mon6033) {\r\n\t\tthis.mon6033 = mon6033;\r\n\t}", "public int getHigh() {\n\t\treturn high;\n\t}", "public double getHighThreshold() {\n return highThreshold;\n }", "public void setMon6048(double mon6048) {\r\n\t\tthis.mon6048 = mon6048;\r\n\t}", "public void setMon6045(double mon6045) {\r\n\t\tthis.mon6045 = mon6045;\r\n\t}", "public void setUnitPrice(Float UnitPrice) {\n this.UnitPrice = UnitPrice;\n }", "@Override\n\tpublic void setUtmEast(int utmEast) {\n\t\t\n\t}", "public void setTickUnit(DateTickUnit unit, boolean notify, boolean turnOffAutoSelection) {\n/* 535 */ this.tickUnit = unit;\n/* 536 */ if (turnOffAutoSelection) {\n/* 537 */ setAutoTickUnitSelection(false, false);\n/* */ }\n/* 539 */ if (notify) {\n/* 540 */ fireChangeEvent();\n/* */ }\n/* */ }", "public void setUnit(Unit u)\r\n {\r\n display.setUnit(u);\r\n selectedIndex = -1;\r\n }", "public void setMon6064(double mon6064) {\r\n\t\tthis.mon6064 = mon6064;\r\n\t}", "public double getHigh(){\n return /*home*/ this.high /*and eat everything*/;\r\n //then go to sleep for a day or three \r\n }", "public void setMon6035(double mon6035) {\r\n\t\tthis.mon6035 = mon6035;\r\n\t}", "public void adaugH(Double humidity) {\r\n\t\tsetH.add(humidity); \r\n\t}", "public void setUnit (String value) {\n\tthis.unit = value;\n }", "public void setEstHoursPerDay(Short aEstHoursPerDay) {\n estHoursPerDay = aEstHoursPerDay;\n }", "public TempUnit getLowUnit() {\n return lowUnit;\n }", "private void tooHigh() {\n if (this.hitPoints > 255) {\n System.out.println(\"You set the value too high! Setting it to 255\");\n this.hitPoints = 255;\n }\n }", "public void setDateHeure(Long p_odateHeure);", "public void setUnit(String unit);", "private void setDayCountDown() {\n dayCountDown = getMaxHunger();\n }", "public void setHour(int nHour) { m_nTimeHour = nHour; }", "public void setOverdueMaxAmount5Y(java.lang.Double overdueMaxAmount5Y) {\n this.overdueMaxAmount5Y = overdueMaxAmount5Y;\n }", "public void setTesuryo06(Long tesuryo06) {\r\n this.tesuryo06 = tesuryo06;\r\n }", "@Override\n public void setTestUnit() {\n hero = new Hero(50, 2, field.getCell(0, 0));\n }", "public final int getHigh() {\n\treturn(this.high);\n }", "public void setFiHoatdong(Long fiHoatdong) {\n this.fiHoatdong = fiHoatdong;\n }", "public void setFiHoatdong(Long fiHoatdong) {\n this.fiHoatdong = fiHoatdong;\n }", "private void setHighScore(int hs) {\n setStat(hs, highScore);\n }", "public double getHighPrice() {\r\n\t\treturn highPrice;\r\n\t}", "public void setMon60312(double mon60312) {\r\n\t\tthis.mon60312 = mon60312;\r\n\t}", "public CategoryBuilder setUpperBound(float upperBound)\n {\n fUpperBound = upperBound;\n return this;\n }", "public void setOtherUnit (jkt.hms.masters.business.MasUnit otherUnit) {\n\t\tthis.otherUnit = otherUnit;\n\t}", "@Override\n public String getHighEdu() {\n return high_education;\n }", "public void setMon6055(double mon6055) {\r\n\t\tthis.mon6055 = mon6055;\r\n\t}", "public void setLow(double value) {\n this.low = value;\n }", "public void setMon6058(double mon6058) {\r\n\t\tthis.mon6058 = mon6058;\r\n\t}", "public void setUpperLayer(Layer upperLayer) {\n\t\tthis.upperLayer = upperLayer;\n\t}", "public void setUpperChest(String upperChest) {\r\n\t\tthis.upperChest = upperChest;\r\n\t}", "public void setEHour(int ehour)\r\n\t{\r\n\t\tthis.ehour = ehour;\r\n\t}", "public void setUpperPoint(Point upper) {\n this.upper = upper;\n }", "public double getHighPrice() {\n return this.highPrice;\n }", "Unit(Apfloat unitIn, UnitType utIn, int expIn) {\n\t\tunitValue = unitIn;\n\t\tunitType = utIn;\n\t\texponent = expIn;\n\t}", "public void setUnitPrice(float value) {\n this.unitPrice = value;\n }" ]
[ "0.6881723", "0.64292985", "0.6404249", "0.6331178", "0.6316804", "0.6280841", "0.6271456", "0.6046653", "0.5735637", "0.5729596", "0.55752504", "0.55372727", "0.5432994", "0.5376561", "0.5297009", "0.5252235", "0.5231778", "0.5230964", "0.5206526", "0.5194644", "0.51930314", "0.5192803", "0.51518893", "0.5150578", "0.511105", "0.51069397", "0.5105649", "0.5097588", "0.507914", "0.5073329", "0.50654215", "0.5059036", "0.5044251", "0.5028123", "0.50191283", "0.5012116", "0.49984115", "0.49724004", "0.49619827", "0.49559844", "0.49547017", "0.4951956", "0.49421808", "0.49294883", "0.49271697", "0.49246454", "0.48822153", "0.48714247", "0.4870054", "0.48643187", "0.48614624", "0.48603556", "0.4845741", "0.48429453", "0.48426813", "0.48347864", "0.48073372", "0.48071268", "0.4800411", "0.4794873", "0.4779102", "0.47766715", "0.4770427", "0.47626746", "0.47557545", "0.47471744", "0.47356167", "0.47272345", "0.4723535", "0.4723041", "0.47210303", "0.47132257", "0.46963245", "0.46830624", "0.4677857", "0.46772084", "0.4665845", "0.4652122", "0.4649344", "0.4640362", "0.46356732", "0.46345946", "0.4618941", "0.4618941", "0.4618417", "0.46153912", "0.46153253", "0.4612914", "0.46119213", "0.4605546", "0.4602327", "0.4592037", "0.4590368", "0.45864344", "0.45793867", "0.4577337", "0.45762253", "0.45722994", "0.45711493", "0.45706877" ]
0.7796182
0
Gets the phrase value for this ForecastDayInfo.
public String getPhrase() { return phrase; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "public io.dstore.values.StringValue getDay() {\n return day_ == null ? io.dstore.values.StringValue.getDefaultInstance() : day_;\n }", "public String getDay() {\n return day.getText();\n }", "public String getWordOfTheDay() throws Exception {\n String wordOfTheDay;\n\n wordOfTheDay = WordsApi.wordOfTheDay().getWord();\n\n return wordOfTheDay;\n }", "public String getDay() {\n return this.day;\n }", "public String getDay() {\n\n\t\treturn day;\n\t}", "public io.dstore.values.StringValueOrBuilder getDayOrBuilder() {\n if (dayBuilder_ != null) {\n return dayBuilder_.getMessageOrBuilder();\n } else {\n return day_ == null ?\n io.dstore.values.StringValue.getDefaultInstance() : day_;\n }\n }", "public String getDay() {\n\t\treturn day;\n\t}", "public java.lang.String getDayNumber() {\n return dayNumber;\n }", "public io.dstore.values.StringValueOrBuilder getDayOrBuilder() {\n return getDay();\n }", "public String getPhrase()\n {\n return this.phrase;\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 io.dstore.values.TimestampValue getDay() {\n if (dayBuilder_ == null) {\n return day_ == null ? io.dstore.values.TimestampValue.getDefaultInstance() : day_;\n } else {\n return dayBuilder_.getMessage();\n }\n }", "public java.lang.String getDay() {\r\n return localDay;\r\n }", "public java.lang.String getDay() {\r\n return localDay;\r\n }", "@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 String getDishOfTheDay(){\n return dishOfTheDay;\n }", "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 String getTodayText() {\r\n return ValueBindings.get(this, \"todayText\", todayText, \"Today\");\r\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 }", "String getQuoteOfTheDay();", "String getDayofservice();", "io.dstore.values.StringValue getDay();", "@java.lang.Override public int getDayValue() {\n return day_;\n }", "@java.lang.Override public int getDayValue() {\n return day_;\n }", "public String getDayTime() {\n return dayTime;\n }", "public String getDay(int Day)\n {\n int dayIndex = Day;\n String[] days = {\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"};\n String realDay = days[dayIndex];\n return realDay;\n }", "@Override\r\n\tpublic String getDailyFortune() {\n\t\treturn ifortune.getFortune();\r\n\t}", "@Override\n\tpublic String getDailyFortune() {\n\t\treturn fortune.getDailyFortune();\n\t}", "public int getDay() {\r\n\t\treturn (this.day);\r\n\t}", "public static String getMessageOfTheDay() {\n\t\treturn MessageOfTheDay.getPuzzleMessage();\n\t}", "private String dayName() {\n int arrayDay = (day + month + year + (year/4) + (year/100) % 4) % 7;\n return dayName[arrayDay];\n }", "public io.dstore.values.TimestampValue getDay() {\n return day_ == null ? io.dstore.values.TimestampValue.getDefaultInstance() : day_;\n }", "java.lang.String getHotelText();", "public int getDay() {\n\t\treturn this.day;\n\t}", "public int getDay() {\n\t\treturn this.day;\n\t}", "@Override\n\tpublic String getDailyFortune() {\n\t\treturn this.fortuneService.getFortune();\n\t}", "@Override\n\tpublic String getDailyFortune() {\n\t\treturn this.fortuneService.getFortune();\n\t}", "public String getDailyFortune() {\n\t\treturn ifortune.getFortune();\n\t}", "@Override\n\tpublic String getDailyFortune() {\n\t\treturn fortuneService.getFortune();\n\t}", "@Override\n\tpublic String getDailyFortune() {\n\t\treturn fortuneService.getFortune();\n\t}", "@Override\n\tpublic String getDailyFortune() {\n\t\treturn fortuneService.getFortune();\n\t}", "public int getDay() {\r\n return FormatUtils.uint8ToInt(mDay);\r\n }", "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 String getDailyFortune()\r\n {\n return fortuneService.getFortune();\r\n }", "public io.dstore.values.TimestampValueOrBuilder getDayOrBuilder() {\n if (dayBuilder_ != null) {\n return dayBuilder_.getMessageOrBuilder();\n } else {\n return day_ == null ?\n io.dstore.values.TimestampValue.getDefaultInstance() : day_;\n }\n }", "public String getSignupDay(int day) {\r\n\t\t\treturn signupByDay.get(day);\r\n\t\t\r\n\t\t}", "public String getTrend() {\r\n return fTrend;\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}", "@Override\n public String getDailyFortune() {\n return \"tennis coach teach play in tennis\";\n }", "public int getDay() {\r\n return day;\r\n }", "public int GetDay(){\n\t\treturn this.date.get(Calendar.DAY_OF_WEEK);\n\t}", "public String getPhrase(String sentencePhraseID){\n\t\t// implement me!\n\t\treturn \" \";\n\t}", "public String getValue() {\n\t\treturn _text;\n\t}", "public Integer getDay()\n {\n return this.day;\n }", "@Override\n public String getDailyFortune() {\n return fortuneService.getFortune();\n\n }", "@Override\n\tpublic String getDailyFortune() {\n\t\treturn fortuneService.getDailyFortune();\n\t}", "public int getDay(){\n\t\treturn day;\n\t}", "@Array({9}) \n\t@Field(16) \n\tpublic Pointer<Byte > TradingDay() {\n\t\treturn this.io.getPointerField(this, 16);\n\t}", "public String toString() {\n\t\tStringBuilder result = new StringBuilder();\n\t\tresult.append(\"{\");\n\t\tresult.append(\"dataType=\").append(this.day.getDataType());\n\t\tresult.append(\";\");\n\t\tresult.append(\"dataCountry=\").append(this.day.getDataCountry());\n\t\tresult.append(\";\");\n\t\tresult.append(\"dataLanguage=\").append(this.day.getDataLanguage());\n\t\tresult.append(\";\");\n\t\tresult.append(\"language=\").append(this.day.getLanguageString());\n\t\tresult.append(\";\");\n\t\tresult.append(\"value=\").append(this.day.getValue());\n\t\tresult.append(\";\");\n\t\tresult.append(\"count=0\");\n\t\tresult.append(\"}\");\n\t\treturn result.toString();\t\n\t}", "public String getStartText() {\n return \"Thursday 20 to 7\";\n }", "public byte getDay() {\r\n return day;\r\n }", "public int getDay()\n {\n return day;\n }", "public int getVenueText() {\n return mTextItem;\n }", "private String getDayDescription(Event event) {\n int day = event.getDay();\n String dayDescription = Integer.toString(event.getDay());\n assert day < 32;\n assert day > 0;\n switch (day) {\n case 1:\n case 21:\n case 31:\n dayDescription += \"st\";\n break;\n case 2:\n case 22:\n dayDescription += \"nd\";\n break;\n case 3:\n case 23:\n dayDescription += \"rd\";\n break;\n default:\n dayDescription += \"th\";\n }\n return dayDescription;\n }", "@Override\r\n\tpublic String getDailyFortune() {\n\t\treturn \"Just do it: \" + fortuneService.getFortune();\r\n\t}", "public String getText() {\n if (Language.isEnglish()) {\n return textEn;\n } else {\n return textFr;\n }\n }", "public byte getDay() {\n return day;\n }", "public String toString() {\n\t\tString output = \"Day \" + day + \": \";\n\t\tif (transactionType != null) {\n\t\t\toutput += transactionType + \" \" + item.getName();\n\t\t}\n\t\tif (eventName != null) {\n\t\t\toutput += eventName;\n\t\t}\n\t\tif (damage != 0) {\n\t\t\tif (damage > 0) {\n\t\t\t\toutput += \" taking \";\n\t\t\t}else {\n\t\t\t\toutput += \" repairing \";\n\t\t\t\tdamage *= -1;\n\t\t\t}\n\t\t\toutput += damage + \" damage\";\n\t\t}\n\t\tif (cost != 0) {\n\t\t\tif (cost > 0) {\n\t\t\t\toutput += \" costing $\";\n\t\t\t} else {\n\t\t\t\toutput += \" reciving $\";\n\t\t\t\tcost *= -1;\n\t\t\t}\n\t\t\toutput += cost;\n\t\t}\n\t\tif (location != null) {\n\t\t\toutput += \" at \" + location.getName();\n\t\t}\n\t\toutput += \".\";\n\t\treturn output;\n\t}", "public String getToday_fa() {\n return today_fa;\n }", "public int getDay() {\n\t\treturn day;\n\t}", "io.dstore.values.StringValueOrBuilder getDayOrBuilder();", "public String getDayOfWeek(){\n\t\treturn dayOfWeek;\n\t}", "public String getAbbreviation(String phrase) {\n\t\tString abbreviation = abbreviations.get(phrase);\n\t\tif (abbreviation == null) {\n\t\t\treturn phrase;\n\t\t} else {\n\t\t\treturn abbreviation;\n\t\t}\n\t}", "@Override\r\n public String speak() {\r\n String word = \"\";\r\n Time.getInstance().time += 1;\r\n if (Time.getInstance().time == 1) {\r\n word = \"One day Neznaika decided to become an artist.\";\r\n }\r\n if (Time.getInstance().time == 101) {\r\n word = \"This story happened once day with Neznaika.\";\r\n }\r\n if (Time.getInstance().time == 201) {\r\n word = \"One day Neznaika wanted to become a musician.\";\r\n }\r\n if (Time.getInstance().time == 401) {\r\n word = \"One day Neznaika wanted to become a poet.\";\r\n }\r\n System.out.println(word);\r\n return word;\r\n }", "public int getDay() {\n\treturn day;\n }", "public int getDayOrNight() {\n return getStat(dayOrNight);\n }", "public io.dstore.values.TimestampValue getToDay() {\n if (toDayBuilder_ == null) {\n return toDay_ == null ? io.dstore.values.TimestampValue.getDefaultInstance() : toDay_;\n } else {\n return toDayBuilder_.getMessage();\n }\n }", "public org.apache.axis2.databinding.types.soapencoding.String getTerminalDownloadQueryForDayReturn(){\n return localTerminalDownloadQueryForDayReturn;\n }", "public String getDayOfWeek() {\r\n return dayOfWeek;\r\n }", "public byte getDay() {\n return day;\n }", "public final String zzb() {\n return this.secondaryText;\n }", "public byte getDay() {\n return day;\n }", "public byte getDay() {\n return day;\n }", "public byte getDay() {\n return day;\n }", "@Override\n\tpublic String getDailyFortune() {\n\t\t// TODO Auto-generated method stub\n\t\treturn fortuneService.getFortune();\n\t}", "public @JournalEntry.Mood String getMood() {\n return this.mood;\n }", "public String getDiaFin() {\n return diaFin;\n }", "private String getDayName(int id){\n for(Day day: dayOfTheWeek)\n if(day.getDayID() == id)\n return (day.getDay());\n return(\"Error\");\n }", "public String getDeliveryTerm() {\n return (String)getAttributeInternal(DELIVERYTERM);\n }", "@Override\n\t\t\tpublic String getValue(Bewerbung object) {\n\t\t\t\treturn object.getBewerbungstext();\n\t\t\t}", "@Override\n\tpublic String getDailyFortune() {\n\t\treturn \"SWIM COACH: getDailyFortune() + running getFortune(): \" + fortuneService.getFortune();\n\t}", "public String spanishWord() {\n\t\treturn \"Depurar\";\n\t}", "@Override\n public String getText() {\n return analyzedWord;\n }", "@JsonIgnore public String getDepartureTerminal() {\n return (String) getValue(\"departureTerminal\");\n }", "public String getTodayStr() {\n return getTodayDate().toString();\n }", "public String getSalaryDay() {\n return salaryDay;\n }", "public int getDay() {\n return day;\n }" ]
[ "0.63093716", "0.6149799", "0.60816216", "0.60082227", "0.5860466", "0.585341", "0.58420897", "0.58154863", "0.5606199", "0.5601221", "0.559426", "0.5589279", "0.55407655", "0.5507136", "0.5507136", "0.5496677", "0.54872173", "0.5465105", "0.5464646", "0.5454381", "0.53204733", "0.530776", "0.5267407", "0.5258664", "0.52554154", "0.5255336", "0.52399534", "0.5124319", "0.5122053", "0.51209474", "0.5103156", "0.5088026", "0.5065564", "0.5045461", "0.50309896", "0.50309896", "0.5012426", "0.5012426", "0.50038826", "0.50019073", "0.50019073", "0.50019073", "0.49980986", "0.4997063", "0.4991695", "0.49907717", "0.4989619", "0.49847692", "0.49701938", "0.49701938", "0.49701938", "0.49699116", "0.4969809", "0.49623966", "0.49614635", "0.49468622", "0.4940505", "0.4929016", "0.49126285", "0.49091074", "0.49030405", "0.49003968", "0.48983476", "0.48936427", "0.48852116", "0.4874494", "0.48738468", "0.4873251", "0.48658895", "0.48653355", "0.48600632", "0.48565444", "0.48381844", "0.48313335", "0.48269424", "0.48196328", "0.4815794", "0.48065734", "0.48065203", "0.48039776", "0.48034054", "0.4801055", "0.4800626", "0.48001492", "0.4793006", "0.4793006", "0.4793006", "0.4791373", "0.47891825", "0.4785451", "0.47843897", "0.4782818", "0.4781653", "0.47762957", "0.47524193", "0.4752052", "0.47441596", "0.47405174", "0.47338694", "0.47256258" ]
0.5835778
7
Sets the phrase value for this ForecastDayInfo.
public void setPhrase(String phrase) { this.phrase = phrase; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Builder setDay(io.dstore.values.StringValue value) {\n if (dayBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n day_ = value;\n onChanged();\n } else {\n dayBuilder_.setMessage(value);\n }\n\n return this;\n }", "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 void setDay(String day) {\n\n\t\tthis.day = day;\n\t}", "public void setDayNumber(String day) {\r\n this.dayNumber.setText(day);\r\n }", "public void setDay(final short day) {\r\n\t\tthis.day = day;\r\n\t}", "public void setDayOfTheWeek(String day){\r\n this.dayOfTheWeek.setText(day);\r\n }", "public void SaveWord(String phrase) {\n\tOrdBok.SaveWord(phrase, 30);\r\n }", "public void setDay(int day) {\r\n this.day = day;\r\n }", "public void addPhrase(String phrase) {\n this.phrases.add(phrase);\n }", "public void setDay(byte value) {\n this.day = value;\n }", "public void setDay(int day)\n {\n this.day = day;\n }", "public void setDay(byte value) {\r\n this.day = value;\r\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 setDayNumber(java.lang.String dayNumber) {\n this.dayNumber = dayNumber;\n }", "public void setDay(final int day) {\n\t\tthis.day = day;\n\t}", "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 final void setMonday(final TimeSlot monday) {\n this.monday = monday;\n log.info(this.monday.toString());\n }", "public void setDay(byte value) {\n this.day = value;\n }", "public Builder setDay(\n io.dstore.values.StringValue.Builder builderForValue) {\n if (dayBuilder_ == null) {\n day_ = builderForValue.build();\n onChanged();\n } else {\n dayBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\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) {\r\n this.day = day;\r\n }", "public void setDay(Date day) {\n this.day = day;\n }", "void setDayOrNight(int day) {\n setStat(day, dayOrNight);\n }", "public String getPhrase() {\n return phrase;\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 setTrend(final String pTrend) {\r\n fTrend = pTrend;\r\n }", "@Override\n\tpublic String getStemming(String phrase) {\n\t\treturn null;\n\t}", "public void setTodayText(String todayText) {\r\n this.todayText = todayText;\r\n }", "public void setMessage(String word){\r\n message.setText(word);\r\n }", "public void setDDTEXT(java.lang.String value)\n {\n if ((__DDTEXT == null) != (value == null) || (value != null && ! value.equals(__DDTEXT)))\n {\n _isDirty = true;\n }\n __DDTEXT = value;\n }", "public void addAbbreviation(String phrase, String abbreviation) {\n\t\tabbreviations.put(phrase, abbreviation);\n\t}", "public Builder setDay(io.dstore.values.TimestampValue value) {\n if (dayBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n day_ = value;\n onChanged();\n } else {\n dayBuilder_.setMessage(value);\n }\n\n return this;\n }", "public void setDishOfTheDay(String _dishOfTheDay){\n dishOfTheDay = _dishOfTheDay;\n }", "public CinemaDate setDay(String d) {\n return new CinemaDate(this.month, d, this.time);\n }", "public void setDateText(String date);", "public void setDay(java.lang.String param) {\r\n localDayTracker = param != null;\r\n\r\n this.localDay = param;\r\n }", "public void setDay(java.lang.String param) {\r\n localDayTracker = param != null;\r\n\r\n this.localDay = param;\r\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 void setWord(String word){\n this.word = word; //Only used in testing.\n }", "public void setValue(String value) {\n\t\tthis.text = value;\n\t}", "private void setupDateTimeInterpreter(final boolean shortDate) {\r\n calendarView.setDateTimeInterpreter(new DateTimeInterpreter() {\r\n @Override\r\n public String interpretDate(Calendar date) {\r\n SimpleDateFormat weekdayNameFormat = new SimpleDateFormat(\"EEE\", Locale.getDefault());\r\n String weekday = weekdayNameFormat.format(date.getTime());\r\n SimpleDateFormat format = new SimpleDateFormat(\" M/d\", Locale.getDefault());\r\n\r\n // All android api level do not have a standard way of getting the first letter of\r\n // the week day name. Hence we get the first char programmatically.\r\n // Details: http://stackoverflow.com/questions/16959502/get-one-letter-abbreviation-of-week-day-of-a-date-in-java#answer-16959657\r\n if (shortDate)\r\n weekday = String.valueOf(weekday.charAt(0));\r\n return weekday.toUpperCase() + format.format(date.getTime());\r\n }\r\n\r\n @Override\r\n public String interpretTime(int hour) {\r\n return hour > 11 ? (hour - 12) + \" PM\" : (hour == 0 ? \"12 AM\" : hour + \" AM\");\r\n }\r\n });\r\n }", "public void updateValueYesterday(String variable, String str_value) {\n\t\tDate date = new Date();\n\t\t// Add a day to our date\n\t\tGregorianCalendar gc = new GregorianCalendar();\n\t\tgc.setTime(date);\n\t\tgc.add(Calendar.HOUR_OF_DAY, -6);\n\t\tgc.add(Calendar.DAY_OF_YEAR, -1);\n\t\tdate = gc.getTime();\n\t\tDatabaseStore ds = DatabaseStore.DatabaseTextStore(variable,\n\t\t\t\tstr_value.toString(), date);\n\t\tupdateQuestion(ds);\n\t}", "public void addToStatByDay(Date date, String word, int n) {\n\t\tString collection = simpleDateFormat.format(date);\n\t\tConcurrentNavigableMap<String, String> listVocabulary = dbStats\n\t\t\t\t.getTreeMap(collection);\n\t\tString strTimes = listVocabulary.get(word);\n\t\tint times = 0;\n\t\tif (strTimes != null) {\n\t\t\ttimes = Integer.parseInt(strTimes);\n\t\t\ttimes = times + n;\n\t\t} else {\n\t\t\ttimes = n;\n\t\t}\n\t\tlistVocabulary.put(word, Integer.toString(times));\n\t}", "public void setSubtitle(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), SUBTITLE, value);\r\n\t}", "public void setTerm(String value) {\r\n setAttributeInternal(TERM, value);\r\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 String getPhrase()\n {\n return this.phrase;\n }", "void setWord(Word word);", "@Override\n public void setAccessibilityPhrase(String arg0)\n {\n \n }", "public Builder setTrainingPhrases(\n int index, com.google.cloud.dialogflow.cx.v3beta1.Intent.TrainingPhrase value) {\n if (trainingPhrasesBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureTrainingPhrasesIsMutable();\n trainingPhrases_.set(index, value);\n onChanged();\n } else {\n trainingPhrasesBuilder_.setMessage(index, value);\n }\n return this;\n }", "public void setStem (Glyph stem)\r\n {\r\n this.stem = stem;\r\n }", "public void setText(String t) {\n\t\t\ttext.set(t);\n\t\t}", "@Override\n public void setTraining(String s) {\n this.myText = s.trim();\n buildMap();\n }", "public void setChosenWord(String word) {\n this.chosenWordDisplay.setText(word);\n }", "private void setupDateTimeInterpreter(final boolean shortDate) {\n mWeekView.setDateTimeInterpreter(new DateTimeInterpreter() {\n @Override\n public String interpretDate(Calendar date) {\n SimpleDateFormat weekdayNameFormat = new SimpleDateFormat(\"EEE\", Locale.getDefault());\n String weekday = weekdayNameFormat.format(date.getTime());\n SimpleDateFormat format = new SimpleDateFormat(\" M/d\", Locale.getDefault());\n\n // All android api level do not have a standard way of getting the first letter of\n // the week day name. Hence we get the first char programmatically.\n // Details: http://stackoverflow.com/questions/16959502/get-one-letter-abbreviation-of-week-day-of-a-date-in-java#answer-16959657\n if (shortDate)\n weekday = String.valueOf(weekday.charAt(0));\n return weekday.toUpperCase() + format.format(date.getTime());\n }\n\n @Override\n public String interpretTime(int hour, int minutes) {\n String strMinutes = String.format(\"%02d\", minutes);\n if (hour > 11) {\n if (hour == 12) {\n return \"12:\" + strMinutes + \" PM\";\n } else {\n return (hour - 12) + \":\" + strMinutes + \" PM\";\n }\n } else {\n if (hour == 0) {\n return \"12:\" + strMinutes + \" AM\";\n } else {\n return hour + \":\" + strMinutes + \" AM\";\n }\n }\n }\n });\n }", "public void setGrammarText(String aGrammarText);", "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 }", "public void setSpanish(String newSpanishWord)\n {\n this.spanishWord = newSpanishWord;\n }", "public void setText(String text) {\n GtkEntry.setText(this, text);\n }", "@Override\n public String toString() {\n\n return \"Slogan{\" + \"phrase='\" + phrase + '\\'' + '}';\n }", "public void setCorrection(String word) throws IOException {\n writeWord(word);\n }", "@Override\r\n\tpublic void setText(String text) {\n\t\tsuper.setText(foundedRecords + \" : \" +text);\r\n\t}", "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 Builder setOrderByDay(io.dstore.values.BooleanValue value) {\n if (orderByDayBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n orderByDay_ = value;\n onChanged();\n } else {\n orderByDayBuilder_.setMessage(value);\n }\n\n return this;\n }", "public Day(String date, String weather) {\n this.date = date;\n this.weather = weather;\n }", "public final void setSunday(final TimeSlot sunday) {\n this.sunday = sunday;\n }", "public void setStemmer( /*CustomFrenchStemmer*/ PaiceHuskFrenchStemmer stemmer ) {\r\n\t\tif ( stemmer != null ) {\r\n\t\t\tthis.stemmer = stemmer;\r\n\t\t}\r\n\t}", "public Builder setSentenceSegment(\n int index, speech_formatting.SegmentedTextOuterClass.SentenceSegment value) {\n if (sentenceSegmentBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureSentenceSegmentIsMutable();\n sentenceSegment_.set(index, value);\n onChanged();\n } else {\n sentenceSegmentBuilder_.setMessage(index, value);\n }\n return this;\n }", "public void setDayParam(String dayParam) {\r\n this.dayParam = dayParam;\r\n }", "public Builder setMoodMessage(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n moodMessage_ = value;\n onChanged();\n return this;\n }", "public Builder setDayValue(int value) {\n \n day_ = value;\n onChanged();\n return this;\n }", "public Builder setDay(\n io.dstore.values.TimestampValue.Builder builderForValue) {\n if (dayBuilder_ == null) {\n day_ = builderForValue.build();\n onChanged();\n } else {\n dayBuilder_.setMessage(builderForValue.build());\n }\n\n return this;\n }", "@Override\n public void setWeatherData(WeatherEntry weatherEntry) {\n String weatherIntryToString = weatherEntry.toString();\n if (weatherIntryToString.equals(\"\")) {\n mTextView.setText(\"\");\n Toast.makeText(this, \"Invalid City Name\", Toast.LENGTH_LONG).show();\n }\n else {\n mTextView.setText(weatherIntryToString);\n }\n\n }", "public void setArticle() {\n\t\tint lastCharPosition = this.countryName.length()-1;\n\t\t\n\t\tif(this.isException())\n\t\t\tthis.article = \"le\";\n\t\t\n\t\tfor(int i = 0; i < this.vocals.length; i++) {\n\t\t\tif (this.countryName.indexOf(vocals[i]) == 0) {\n\t\t\t\tarticle = \"l\\'\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(this.countryName.indexOf('e') == lastCharPosition){\n\t\t\tthis.article = \"la\";\n\t\t}else if (this.countryName.indexOf('s') == lastCharPosition) {\n\t\t\tthis.article = \"les\";\n\t\t}else {\n\t\t\tthis.article = \"le\";\n\t\t}\n\t}", "public void setBuildDay(String buildDay) {\n this.buildDay = buildDay == null ? null : buildDay.trim();\n }", "@Override\n\tpublic void setNgayDong(java.util.Date ngayDong) {\n\t\t_keHoachKiemDemNuoc.setNgayDong(ngayDong);\n\t}", "@Override\n public void setTranslation(String translation) {\n }", "@JsonSetter(\"joiningDay\")\n public void setJoiningDay (Days value) { \n this.joiningDay = value;\n notifyObservers(this.joiningDay);\n }", "public final void setTuesday(final TimeSlot tuesday) {\n this.tuesday = tuesday;\n }", "public void setTermweig(String value) {\r\n setAttributeInternal(TERMWEIG, value);\r\n }", "public void setTextFr(String textFr) {\n this.textFr = textFr;\n }", "public Builder mergeDay(io.dstore.values.StringValue value) {\n if (dayBuilder_ == null) {\n if (day_ != null) {\n day_ =\n io.dstore.values.StringValue.newBuilder(day_).mergeFrom(value).buildPartial();\n } else {\n day_ = value;\n }\n onChanged();\n } else {\n dayBuilder_.mergeFrom(value);\n }\n\n return this;\n }", "public void setDayClass(String dayClass) {\r\n this.dayClass = dayClass;\r\n }", "public void setString(String SearchQuery) {\n this.SearchQuery = SearchQuery;\n notifyDataSetChanged();\n }", "void setDaytime(boolean daytime);", "public void setWord(String newWord)\n\t{\n\t\tword = newWord;\n\t}", "public void setDayDate(Number value) {\n setAttributeInternal(DAYDATE, value);\n }", "public void setValue(String value)\r\n\t\t{ textField.setText(value); }", "@Override\n\tpublic void setData() {\n\t\tsuper.setData();\n\t\tif (!isAdult) {\n\t\t\ttv_title1.setText(\"作息规律\");\n\t\t\ttv_title2.setText(\"对人态度\");\n\t\t\ttv_title3.setText(\"学习专注\");\n\t\t\ttv_title4.setText(\"爱心善意\");\n\t\t\ttv_title5.setText(\"尊师重教\");\n\t\t\ttv_title6.setText(\"思考行动\");\n\t\t\ttv_title7.setText(\"其 它\");\n\t\t}\n\t\tif (isYesterday) {\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tcal.add(Calendar.DATE, -1);\n\t\t\ttime = new SimpleDateFormat(\"yyyy-MM-dd \").format(cal.getTime());\n\n\t\t} else {\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tcal.add(Calendar.DATE, -2);\n\t\t\ttime = new SimpleDateFormat(\"yyyy-MM-dd \").format(cal.getTime());\n\t\t}\n\t\tHttpUtils.searchTable(UserInfo.instance().getUid(), time, time,\n\t\t\t\tisAdult, this, this);\n\t}", "public Gel_BioInf_Models.VirtualPanel.Builder setSpecificDiseaseTitle(java.lang.String value) {\n validate(fields()[0], value);\n this.specificDiseaseTitle = value;\n fieldSetFlags()[0] = true;\n return this; \n }", "public void setDayId(String dayId) {\r\n this.dayId = dayId;\r\n }", "public final void setWednesday(final TimeSlot wednesday) {\n this.wednesday = wednesday;\n }", "public final EObject entryRulePhrase() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_rulePhrase = null;\r\n\r\n\r\n try {\r\n // InternalAbjad.g:377:47: (iv_rulePhrase= rulePhrase EOF )\r\n // InternalAbjad.g:378:2: iv_rulePhrase= rulePhrase EOF\r\n {\r\n newCompositeNode(grammarAccess.getPhraseRule()); \r\n pushFollow(FOLLOW_1);\r\n iv_rulePhrase=rulePhrase();\r\n\r\n state._fsp--;\r\n\r\n current =iv_rulePhrase; \r\n match(input,EOF,FOLLOW_2); \r\n\r\n }\r\n\r\n }\r\n\r\n catch (RecognitionException re) {\r\n recover(input,re);\r\n appendSkippedTokens();\r\n }\r\n finally {\r\n }\r\n return current;\r\n }", "public void setDate(String dateInfo) {\n\n TextView dateTitle = (TextView) itemView.findViewById(R.id.event_date_title);\n\n if(dateInfo.equals(\"\")){\n dateTitle.setText(\"\");\n dateTitle.setTag(\"\");\n return;\n }\n\n DateFormat dfCorrect = new SimpleDateFormat(\"EEEE'\\r' MMM dd',' yyyy\", Locale.US);\n String[] dateArray = dateInfo.split(\"-\");\n java.util.Calendar calendar = java.util.Calendar.getInstance();\n calendar.set(Integer.parseInt(dateArray[0]), Integer.parseInt(dateArray[1]) - 1, Integer.parseInt(dateArray[2]));\n Date curDate = calendar.getTime();\n Log.d(\"date\", \"curDate: \"+curDate);\n dateTitle.setText(dfCorrect.format(curDate));\n dateTitle.setTag(dateInfo);\n }" ]
[ "0.5700109", "0.54533535", "0.5409282", "0.5391648", "0.53602934", "0.5278477", "0.51292974", "0.50592357", "0.5015755", "0.5009604", "0.4984112", "0.4967658", "0.49606335", "0.49606335", "0.49586362", "0.49399033", "0.49222553", "0.49222553", "0.49222553", "0.49051705", "0.4897244", "0.48160625", "0.48133758", "0.48133758", "0.48133758", "0.48133758", "0.48133758", "0.48003885", "0.47814432", "0.47763738", "0.4682514", "0.46722463", "0.46497947", "0.46383312", "0.45946693", "0.4583883", "0.45770416", "0.45707244", "0.4569934", "0.45555747", "0.455188", "0.45512158", "0.45512158", "0.45470095", "0.45123765", "0.4493326", "0.44823337", "0.44692922", "0.44531485", "0.44446948", "0.44388473", "0.4435758", "0.44314975", "0.44309765", "0.4419357", "0.4416002", "0.44012716", "0.437241", "0.43646425", "0.43645954", "0.43568152", "0.43541726", "0.4353685", "0.43497103", "0.43468055", "0.43422726", "0.43418443", "0.4335023", "0.43343535", "0.43325388", "0.4326579", "0.43238357", "0.43226847", "0.4311684", "0.43005416", "0.42992982", "0.42839146", "0.42827144", "0.4274352", "0.4253901", "0.42459685", "0.42448422", "0.42418006", "0.42384747", "0.42361295", "0.42337817", "0.42280263", "0.42273116", "0.42249474", "0.4222673", "0.42198694", "0.4203915", "0.42014217", "0.42006195", "0.41989622", "0.41982892", "0.41953126", "0.41925135", "0.41920537", "0.41911954" ]
0.63908637
0
Return type metadata object
public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MetadataType getType();", "public MetadataType getType() {\n return type;\n }", "public MilanoTypeMetadata.TypeMetadata getMetadata()\n {\n if (typeMetadata == null) {\n return null;\n }\n\n return typeMetadata;\n }", "private Metadata getMetadata(RubyModule type) {\n for (RubyModule current = type; current != null; current = current.getSuperClass()) {\n Metadata metadata = (Metadata) current.getInternalVariable(\"metadata\");\n \n if (metadata != null) return metadata;\n }\n \n return null;\n }", "public Metadata getMetadata( MetadataType type )\n\t{\n\t\tfor( Metadata metadata: mMetadata )\n\t\t{\n\t\t\tif( metadata.getMetadataType() == type )\n\t\t\t{\n\t\t\t\treturn metadata;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "Metadata getMetaData();", "public List<TypeMetadata> getTypeMetadata() {\n return types;\n }", "@Override\n public Class<? extends Metadata> getMetadataType() {\n throw new RuntimeException( \"Not yet implemented.\" );\n }", "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 MetaData getMetaData();", "private Class<?> getType(final Object metadata, final ValueNode node) throws ParseException {\n if (node.type != null) {\n return readType(node);\n }\n Class type;\n if (metadata instanceof ReferenceSystemMetadata || metadata instanceof Period || metadata instanceof AbstractTimePosition || metadata instanceof Instant) {\n final Method getter = ReflectionUtilities.getGetterFromName(node.name, metadata.getClass());\n return getter.getReturnType();\n } else {\n type = standard.asTypeMap(metadata.getClass(), KeyNamePolicy.UML_IDENTIFIER, TypeValuePolicy.ELEMENT_TYPE).get(node.name);\n }\n final Class<?> special = specialized.get(type);\n if (special != null) {\n return special;\n }\n return type;\n }", "public Map<String, Variant<?>> GetMetadata();", "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 TypeSummary getTypeSummary() {\r\n return type;\r\n }", "String provideType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "public Type getType();", "@Override\n public String toString() {\n return metaObject.getType().toString();\n }", "public String metadataClass() {\n return this.metadataClass;\n }", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "abstract public Type getType();", "public String type();", "private String getType(){\r\n return type;\r\n }", "protected abstract String getType();", "Coding getType();", "@Override\n TypeInformation<T> getProducedType();", "type getType();", "TypeDefinition createTypeDefinition();", "abstract public String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract Type getType();", "protected static LibMetaData createLibMetaData(LibMetaData lmd) {\n MetaData metaData = new MetaData();\r\n metaData.add(\"IsThing\", new Integer(1), null, MetaDataEntry.FIX_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"ImageSource\", \"Items\", null, MetaDataEntry.ANY_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"Image\", new Integer(0), null, MetaDataEntry.POSITIVE_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"Number\", new Integer(1), null, MetaDataEntry.POSITIVE_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n lmd.add(THING, metaData);\r\n \r\n metaData = new MetaData(lmd.get(\"thing\"));\r\n metaData.add(\"IsItem\", new Integer(1), null, MetaDataEntry.FIX_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"ImageSource\", \"Items\", null, MetaDataEntry.ANY_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"Image\", new Integer(1), null, MetaDataEntry.POSITIVE_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"Name\", \"Thing\", null, MetaDataEntry.ANY_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"NameType\", new Integer(Description.NAMETYPE_NORMAL), null, MetaDataEntry.FIX_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"Z\", new Integer(Thing.Z_ITEM), null, MetaDataEntry.FIX_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n lmd.add(ITEM, metaData);\r\n \r\n metaData = new MetaData(lmd.get(\"thing\"));\r\n metaData.add(\"IsBeing\",new Integer(1), null, MetaDataEntry.FIX_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"ImageSource\", \"Creatures\", null, MetaDataEntry.ANY_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"Image\", new Integer(340), null, MetaDataEntry.POSITIVE_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"IsMobile\",new Integer(1), new Integer[]{new Integer(0), new Integer(1)}, MetaDataEntry.CERTAIN_VALUES, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"IsBlocking\", new Integer(1), new Integer[]{new Integer(0), new Integer(1)}, MetaDataEntry.CERTAIN_VALUES, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"MoveCost\", new Integer(100), null, MetaDataEntry.POSITIVE_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"DeathDecoration\", \"blood pool\", null, MetaDataEntry.ANY_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"NameType\", new Integer(Description.NAMETYPE_NORMAL), null, MetaDataEntry.FIX_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n metaData.add(\"Z\", new Integer(Thing.Z_MOBILE), null, MetaDataEntry.FIX_VALUE, MetaDataEntry.MANDATORY_PROPERTY);\r\n lmd.add(BEING, metaData);\r\n \r\n lmd = createEffectMetaData(lmd);\r\n lmd = createPoisonMetaData(lmd);\r\n lmd = createFoodMetaData(lmd);\r\n lmd = createScrollMetaData(lmd);\r\n lmd = createMissileMetaData(lmd);\r\n lmd = createRangedWeaponMetaData(lmd);\r\n lmd = createPotionMetaData(lmd);\r\n lmd = createWandMetaData(lmd);\r\n lmd = createRingMetaData(lmd);\r\n lmd = createCoinMetaData(lmd);\r\n lmd = createArmourMetaData(lmd);\r\n lmd = createWeaponMetaData(lmd);\r\n lmd = createSecretMetaData(lmd);\r\n lmd = createSpellBookMetaData(lmd);\r\n lmd = createChestMetaData(lmd);\r\n lmd = createDecorationMetaData(lmd);\r\n lmd = createSceneryMetaData(lmd);\r\n lmd = createPortalMetaData(lmd);\r\n lmd = createTrapMetaData(lmd);\r\n createMonsterMetaData(lmd);\r\n createPersonMetaData(lmd);\r\n return lmd;\r\n }", "String getTypeAsString();", "public gov.niem.niem.structures._2_0.MetadataType getMetadata()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.niem.niem.structures._2_0.MetadataType target = null;\n target = (gov.niem.niem.structures._2_0.MetadataType)get_store().find_element_user(METADATA$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "TypeRef getType();", "String getMetadataClassName();" ]
[ "0.7969707", "0.7373198", "0.7358018", "0.7090138", "0.67353225", "0.67259765", "0.66725683", "0.65644145", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6543223", "0.6510972", "0.648206", "0.6352795", "0.6329532", "0.6329532", "0.6329532", "0.6329532", "0.6329532", "0.6329532", "0.6329532", "0.6329532", "0.6329532", "0.6329532", "0.6329532", "0.6329532", "0.6329532", "0.62937546", "0.6285329", "0.628487", "0.628487", "0.628487", "0.628487", "0.628487", "0.628487", "0.628487", "0.628487", "0.628487", "0.628487", "0.628487", "0.628487", "0.628487", "0.627527", "0.6265675", "0.6235292", "0.6227797", "0.6227797", "0.6227797", "0.6227797", "0.6227797", "0.6227797", "0.6227797", "0.6227797", "0.6227797", "0.6227797", "0.6227797", "0.6221452", "0.6209023", "0.6196509", "0.61801785", "0.6180045", "0.6168281", "0.61679584", "0.6166462", "0.6161522", "0.6146188", "0.6146188", "0.6146188", "0.6146188", "0.6146188", "0.6146188", "0.6146188", "0.6146188", "0.6141369", "0.6140734", "0.6133515", "0.61228573", "0.6116976", "0.6111749" ]
0.0
-1
This function detects all the sentences that are present in the input text based on Capitalization of words.
public ArrayList<Sentence> sentenceDetector(BreakIterator bi, String text) { ArrayList<Sentence> sentences = new ArrayList<Sentence>(); bi.setText(text); int lastIndex = bi.first(); while (lastIndex != BreakIterator.DONE) { int firstIndex = lastIndex; lastIndex = bi.next(); if (lastIndex != BreakIterator.DONE) { Sentence s = new Sentence(text.substring(firstIndex, lastIndex)); s.tokenizeSentence(); sentences.add(s); } } return sentences; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> getAllSentences(String input) {\n List<String> output = new ArrayList();\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // All the sentences in this document\n List<CoreMap> docSentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n for (CoreMap sentence : docSentences) {\n // traverse words in the current sentence\n output.add(sentence.toString());\n }\n\n return output;\n }", "static ArrayList<String> split_sentences(String inputText){\n ArrayList<String> sentences = new ArrayList<>();\n Pattern p = Pattern.compile(\"[^.!?\\\\s][^.!?]*(?:[.!?](?!['\\\"]?\\\\s|$)[^.!?]*)*[.!?]?['\\\"]?(?=\\\\s|$)\", Pattern.MULTILINE | Pattern.COMMENTS);\n Matcher match = p.matcher(inputText);\n while (match.find()) {\n sentences.add(match.group());\n }\n return sentences;\n }", "public Set<String> getSentences(String input) {\n Set<String> output = new HashSet();\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // All the sentences in this document\n List<CoreMap> docSentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n for (CoreMap sentence : docSentences) {\n // traverse words in the current sentence\n output.add(sentence.toString());\n }\n\n return output;\n }", "String[] splitSentenceWords() {\n\t\t\tint i=0;\n\t\t\tint j=0;\n\t\t\tArrayList<String> words = new ArrayList<String>();\n\t\t\t\n\t\t\t\tString[] allWords = wordPattern.split(purePattern.matcher(sentence).replaceAll(\" \"));//.split(\"(?=\\\\p{Lu})|(\\\\_|\\\\,|\\\\.|\\\\s|\\\\n|\\\\#|\\\\\\\"|\\\\{|\\\\}|\\\\@|\\\\(|\\\\)|\\\\;|\\\\-|\\\\:|\\\\*|\\\\\\\\|\\\\/)+\");\n\t\t\tfor(String word : allWords) {\n\t\t\t\tif(word.length()>2) {\n\t\t\t\t\twords.add(word.toLowerCase());\n\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn (String[])words.toArray(new String[words.size()]);\n\t\t\n\t\t}", "private static String lookForSentenceWhichContains(String[] words, String documentPath) throws IOException {\r\n\r\n File document = new File(documentPath);\r\n\r\n if (!document.exists()) throw new FileNotFoundException(\"File located at \"+documentPath+\" doesn't exist.\\n\");\r\n\r\n FileReader r = new FileReader(document);\r\n BufferedReader br = new BufferedReader(r);\r\n\r\n String line;\r\n String documentText = \"\";\r\n while ( (line=br.readLine()) != null) {\r\n documentText += line;\r\n }\r\n\r\n documentText = Jsoup.parse(documentText).text();\r\n\r\n String[] listOfSentences = documentText.split(\"\\\\.\");\r\n HashMap<String,String> originalToNormalized = new HashMap<>();\r\n String original;\r\n\r\n for (String sentence: listOfSentences){\r\n\r\n original = sentence;\r\n\r\n sentence = sentence.toLowerCase();\r\n sentence = StringUtils.stripAccents(sentence);\r\n sentence = sentence.replaceAll(\"[^a-z0-9-._\\\\n]\", \" \");\r\n\r\n originalToNormalized.put(original,sentence);\r\n }\r\n\r\n int matches, maxMatches = 0;\r\n String output = \"\";\r\n\r\n for (Map.Entry<String,String> sentence: originalToNormalized.entrySet()){\r\n\r\n matches = 0;\r\n\r\n for (String word: words){\r\n if (sentence.getValue().contains(word)) matches++;\r\n }\r\n\r\n if (matches == words.length) return sentence.getKey();\r\n if (matches > maxMatches){\r\n maxMatches = matches;\r\n output = sentence.getKey();\r\n }\r\n }\r\n\r\n return output;\r\n\r\n }", "public ArrayList<String> makeSentences(String text) {\n \t\t/*\n \t\t * Quick check so we're not trying to split up an empty\n \t\t * String. This only happens right before the user types\n \t\t * at the end of a document and we don't have anything to\n \t\t * split, so return.\n \t\t */\n \t\tif (text.equals(\"\")) {\n \t\t\tArrayList<String> sents = new ArrayList<String>();\n \t\t\tsents.add(\"\");\n \t\t\treturn sents;\n \t\t}\n \t\t\n \t\t/**\n \t\t * Because the eosTracker isn't initialized until the TaggedDocument is,\n \t\t * it won't be ready until near the end of DocumentProcessor, in which\n \t\t * case we want to set it to the correct\n \t\t */\n \t\tthis.eosTracker = main.editorDriver.taggedDoc.eosTracker;\n \t\tthis.editorDriver = main.editorDriver;\n \t\t\n \t\tArrayList<String> sents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES);\n \t\tArrayList<String> finalSents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES);\n \t\tboolean mergeNext = false;\n \t\tboolean mergeWithLast = false;\n \t\tboolean forceNoMerge = false;\n \t\tint currentStart = 1;\n \t\tint currentStop = 0;\n \t\tString temp;\n \n \t\t/**\n \t\t * replace unicode format characters that will ruin the regular\n \t\t * expressions (because non-printable characters in the document still\n \t\t * take up indices, but you won't know they're there untill you\n \t\t * \"arrow\" though the document and have to hit the same arrow twice to\n \t\t * move past a certain point. Note that we must use \"Cf\" rather than\n \t\t * \"C\". If we use \"C\" or \"Cc\" (which includes control characters), we\n \t\t * remove our newline characters and this screws up the document. \"Cf\"\n \t\t * is \"other, format\". \"Cc\" is \"other, control\". Using \"C\" will match\n \t\t * both of them.\n \t\t */\n \t\ttext = text.replaceAll(\"\\u201C\",\"\\\"\");\n \t\ttext = text.replaceAll(\"\\u201D\",\"\\\"\");\n \t\ttext = text.replaceAll(\"\\\\p{Cf}\",\"\");\n \n \t\tint lenText = text.length();\n \t\tint index = 0;\n \t\tint buffer = editorDriver.sentIndices[0];\n \t\tString safeString = \"\";\n \t\tMatcher abbreviationFinder = ABBREVIATIONS_PATTERN.matcher(text);\n \t\t\n \t\t//================ SEARCHING FOR ABBREVIATIONS ================\n \t\twhile (index < lenText-1 && abbreviationFinder.find(index)) {\n \t\t\tindex = abbreviationFinder.start();\n \t\t\t\n \t\t\ttry {\n \t\t\t\tint abbrevLength = index;\n \t\t\t\twhile (text.charAt(abbrevLength) != ' ') {\n \t\t\t\t\tabbrevLength--;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (ABBREVIATIONS.contains(text.substring(abbrevLength+1, index+1))) {\n \t\t\t\t\teosTracker.setIgnore(index+buffer, true);\n \t\t\t\t}\n \t\t\t} catch (Exception e) {}\n \t\t\t\n \t\t\tindex++;\n \t\t}\t\t\n \t\t\n \t\tMatcher sent = EOS_chars.matcher(text);\n \t\tboolean foundEOS = sent.find(currentStart); // xxx TODO xxx take this EOS character, and if not in quotes, swap it for a permanent replacement, and create and add an EOS to the calling TaggedDocument's eosTracker.\n \t\t\n \t\t/*\n \t\t * We want to check and make sure that the EOS character (if one was found) is not supposed to be ignored. If it is, we will act like we did not\n \t\t * find it. If there are multiple sentences with multiple EOS characters passed it will go through each to check, foundEOS will only be true if\n \t\t * an EOS exists in \"text\" that would normally be an EOS character and is not set to be ignored.\n \t\t */\n \t\t\n \t\tindex = 0;\n \t\tif (foundEOS) {\t\n \t\t\ttry {\n \t\t\t\twhile (index < lenText-1 && sent.find(index)) {\n \t\t\t\t\tindex = sent.start();\n \t\t\t\t\tif (!eosTracker.sentenceEndAtIndex(index+buffer)) {\n \t\t\t\t\t\tfoundEOS = false;\n \t\t\t\t\t} else {\n \t\t\t\t\t\tfoundEOS = true;\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\tindex++;\n \t\t\t\t}\n \t\t\t} catch (IllegalStateException e) {}\n \t\t}\n \t\t//We need to reset the Matcher for the code below\n \t\tsent = EOS_chars.matcher(text);\n \t\tsent.find(currentStart);\n \t\t\n \t\tMatcher sentEnd;\n \t\tMatcher citationFinder;\n \t\tboolean hasCitation = false;\n \t\tint charNum = 0;\n \t\tint lenTemp = 0;\n \t\tint lastQuoteAt = 0;\n \t\tint lastParenAt = 0;\n \t\tboolean foundQuote = false;\n \t\tboolean foundParentheses = false;\n \t\tboolean isSentence;\n \t\tboolean foundAtLeastOneEOS = foundEOS;\n \t\t\n \t\t/**\n \t\t * Needed otherwise when the user has text like below:\n \t\t * \t\tThis is my sentence one. This is \"My sentence?\" two. This is the last sentence.\n \t\t * and they begin to delete the EOS character as such:\n \t\t * \t\tThis is my sentence one. This is \"My sentence?\" two This is the last sentence.\n \t\t * Everything gets screwed up. This is because the operations below operate as expected only when there actually is an EOS character\n \t\t * at the end of the text, it expects it there in order to function properly. Now usually if there is no EOS character at the end it wouldn't\n \t\t * matter since the while loop and !foundAtLeastOneEOS conditional are executed properly, BUT as you can see the quotes, or more notably the EOS character inside\n \t\t * the quotes, triggers this initial test and thus the operation breaks. This is here just to make sure that does not happen.\n \t\t */\n \t\tString trimmedText = text.trim();\n \t\tint trimmedTextLength = trimmedText.length();\n \n \t\t//We want to make sure that if there is an EOS character at the end that it is not supposed to be ignored\n \t\tboolean EOSAtSentenceEnd = true;\n \t\tif (trimmedTextLength != 0) {\n \t\t\tEOSAtSentenceEnd = EOS.contains(trimmedText.substring(trimmedTextLength-1, trimmedTextLength)) && eosTracker.sentenceEndAtIndex(editorDriver.sentIndices[1]-1);\n \t\t} else {\n \t\t\tEOSAtSentenceEnd = false;\n \t\t}\n \t\t\n \t\t//Needed so that if we are deleting abbreviations like \"Ph.D.\" this is not triggered.\n \t\tif (!EOSAtSentenceEnd && (editorDriver.taggedDoc.watchForEOS == -1))\n \t\t\tEOSAtSentenceEnd = true;\n \n \t\twhile (foundEOS == true) {\n \t\t\tcurrentStop = sent.end();\n \t\t\t\n \t\t\t//We want to make sure currentStop skips over ignored EOS characters and stops only when we hit a true EOS character\n \t\t\ttry {\n \t\t\t\twhile (!eosTracker.sentenceEndAtIndex(currentStop+buffer-1) && currentStop != lenText) {\n \t\t\t\t\tsent.find(currentStop+1);\n \t\t\t\t\tcurrentStop = sent.end();\n \t\t\t\t}\n \t\t\t} catch (Exception e) {}\n \n \t\t\ttemp = text.substring(currentStart-1,currentStop);\n \t\t\tlenTemp = temp.length();\n \t\t\tlastQuoteAt = 0;\n \t\t\tlastParenAt = 0;\n \t\t\tfoundQuote = false;\n \t\t\tfoundParentheses = false;\n \t\t\t\n \t\t\tfor(charNum = 0; charNum < lenTemp; charNum++){\n \t\t\t\tif (temp.charAt(charNum) == '\\\"') {\n \t\t\t\t\tlastQuoteAt = charNum;\n \t\t\t\t\t\n \t\t\t\t\tif (foundQuote == true)\n \t\t\t\t\t\tfoundQuote = false;\n \t\t\t\t\telse\n \t\t\t\t\t\tfoundQuote = true;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (temp.charAt(charNum) == '(') {\n \t\t\t\t\tlastParenAt = charNum;\n \t\t\t\t\t\n \t\t\t\t\tif (foundParentheses)\n \t\t\t\t\t\tfoundParentheses = false;\n \t\t\t\t\telse\n \t\t\t\t\t\tfoundParentheses = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (foundQuote == true && ((temp.indexOf(\"\\\"\",lastQuoteAt+1)) == -1)) { // then we found an EOS character that shouldn't split a sentence because it's within an open quote.\n \t\t\t\tif ((currentStop = text.indexOf(\"\\\"\",currentStart +lastQuoteAt+1)) == -1) {\n \t\t\t\t\tcurrentStop = text.length(); // if we can't find a closing quote in the rest of the input text, then we assume the author forgot to put a closing quote, and act like it's at the end of the input text.\n \t\t\t\t}\n \t\t\t\telse{\n \t\t\t\t\tcurrentStop +=1;\n \t\t\t\t\tmergeNext=true;// the EOS character we are looking for is not in this section of text (section being defined as a substring of 'text' between two EOS characters.)\n \t\t\t\t}\n \t\t\t}\n \t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\n \t\t\tif (foundParentheses && ((temp.indexOf(\")\", lastParenAt+1)) == -1)) {\n \t\t\t\tif ((currentStop = text.indexOf(\")\", currentStart + lastParenAt + 1)) == -1)\n \t\t\t\t\tcurrentStop = text.length();\n \t\t\t\telse {\n \t\t\t\t\tcurrentStop += 1;\n \t\t\t\t\tmergeNext = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \n \t\t\tif (foundQuote) {\n \t\t\t\tsentEnd = SENTENCE_QUOTE.matcher(text);\t\n \t\t\t\tisSentence = sentEnd.find(currentStop-2); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).)\n \n \t\t\t\tif (isSentence == true) { // If it seems that the text looks like this: He said, \"Hello.\" Then she said, \"Hi.\" \n \t\t\t\t\t// Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, \"Hello.\")\n \t\t\t\t\tcurrentStop = text.indexOf(\"\\\"\",sentEnd.start())+1;\n \t\t\t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\t\tforceNoMerge = true;\n \t\t\t\t\tmergeNext = false;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (foundParentheses) {\n \t\t\t\tsentEnd = SENTENCE_PARENTHESES.matcher(text);\n \t\t\t\tisSentence = sentEnd.find(currentStop-2);\n \t\t\t\t\n \t\t\t\tif (isSentence == true) {\n \t\t\t\t\tcurrentStop = text.indexOf(\")\", sentEnd.start()) + 1;\n \t\t\t\t\tsafeString = text.substring(currentStart-1, currentStop);\n \t\t\t\t\tforceNoMerge = true;\n \t\t\t\t\tmergeNext = false;\n \t\t\t\t}\n \t\t\t}\n \n \t\t\t// now check to see if there is a CITATION after the sentence (doesn't just apply to quotes due to paraphrasing)\n \t\t\t// The rule -- at least as of now -- is if after the EOS mark there is a set of parenthesis containing either one word (name) or a name and numbers (name 123) || (123 name) || (123-456 name) || (name 123-456) || etc..\n \t\t\tcitationFinder = CITATION.matcher(text.substring(currentStop));\t\n \t\t\thasCitation = citationFinder.find(); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).)\n \t\t\t\n \t\t\tif (hasCitation == true) { // If it seems that the text looks like this: He said, \"Hello.\" Then she said, \"Hi.\" \n \t\t\t\t// Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, \"Hello.\")\n \t\t\t\tcurrentStop = text.indexOf(\")\",citationFinder.start()+currentStop)+1;\n \t\t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\tmergeNext = false;\n \t\t\t}\t\n \t\t\t\n \t\t\tif (mergeWithLast) {\n \t\t\t\tmergeWithLast=false;\n \t\t\t\tString prev=sents.remove(sents.size()-1);\n \t\t\t\tsafeString=prev+safeString;\n \t\t\t}\n \t\t\t\n \t\t\tif (mergeNext && !forceNoMerge) {//makes the merge happen on the next pass through\n \t\t\t\tmergeNext=false;\n \t\t\t\tmergeWithLast=true;\n \t\t\t} else {\n \t\t\t\tforceNoMerge = false;\n \t\t\t\tfinalSents.add(safeString);\n \t\t\t}\n \t\t\n \t\t\tsents.add(safeString);\n \t\t\t\n \t\t\t//// xxx xxx xxx return the safeString_subbedEOS too!!!!\n \t\t\tif (currentStart < 0 || currentStop < 0) {\n \t\t\t\tLogger.logln(NAME+\"Something went really wrong making sentence tokens.\", LogOut.STDERR);\n \t\t\t\tErrorHandler.fatalProcessingError(null);\n \t\t\t}\n \n \t\t\tcurrentStart = currentStop+1;\n \t\t\tif (currentStart >= lenText) {\n \t\t\t\tfoundEOS = false;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tfoundEOS = sent.find(currentStart);\n \t\t}\n \n \t\tif (!foundAtLeastOneEOS || !EOSAtSentenceEnd) {\n \t\t\tArrayList<String> wrapper = new ArrayList<String>(1);\n \t\t\twrapper.add(text);\n \t\t\treturn wrapper;\n \t\t}\n \t\t\n \t\treturn finalSents;\n \t}", "public String[] breakSentence(String data) {\n sentences = myCategorizer.sentDetect(data);\n return sentences;\n }", "public static Set<Word> allWords(List<Sentence> sentences) {\n//\t\tSystem.out.println(sentences);\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tSet<Word> words = new HashSet<>();\n\t\tList<Word> wordsList = new ArrayList<>();\t//use list to manipulate information\n\t\t\n\t\tif (sentences == null || sentences.isEmpty()) {//if the list is empty, method returns an empty set.\n\t\t return words;\t\n\t\t}\n\t\t\n\t\tfor(Sentence sentence : sentences) {\n//\t\t System.out.println(\"Sentence examined \" + sentence.getText());\n\t\t if (sentence != null) {\n\t\t \tString[] tokens = sentence.getText().toLowerCase().split(\"[\\\\p{Punct}\\\\s]+\");//regex to split line by punctuation and white space\n\t\t \tfor (String token : tokens) {\n//\t\t \t\tSystem.out.println(\"token: \" + token);\n\t\t \t\tif(token.matches(\"[a-zA-Z0-9]+\")) {\n\t\t \t\t\tWord word = new Word(token);\n//\t\t \t\t\tint index = wordsList.indexOf(word);//if the word doesn't exist it'll show as -1 \n\t\t \t\t\tif (wordsList.contains(word)) {//word is already in the list\n//\t\t \t\t\t\tSystem.out.println(\"already in the list: \" + word.getText());\n//\t\t \t\t\t\tSystem.out.println(\"This word exists \" + token + \". Score increased by \" + sentence.getScore());\n\t\t \t\t\t\twordsList.get(wordsList.indexOf(word)).increaseTotal(sentence.getScore());\n\t\t \t\t\t} else {//new word\t\n\t\t \t\t\t\tword.increaseTotal(sentence.getScore());\n\t\t \t\t\t\twordsList.add(word);\n////\t\t\t\t \tSystem.out.println(token + \" added for the score of \" + sentence.getScore());\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\t\twords = new HashSet<Word> (wordsList);\n\t\t\n\t\t//test - for the same text - object is the same\n//\t\tArrayList<String> e = new ArrayList<>();\n//\t\tString ex1 = \"test1\";\n//\t\tString ex2 = \"test1\";\n//\t\tString ex3 = \"test1\";\n//\t\te.add(ex1);\n//\t\te.add(ex2);\n//\t\te.add(ex3);\n//\t\tfor (String f : e) {\n//\t\t\tWord word = new Word(f);\n//\t\t\tSystem.out.println(word);\n//\t\t}\n\t\t//end of test\n\t\treturn words;\n\t}", "public static void textQueries(List<String> sentences, List<String> queries) {\n // Write your code here\n for(String q: queries){\n boolean a = false;\n int i=0;\n for(String s: sentences){\n if(Arrays.asList(s.split(\" \")).containsAll(Arrays.asList(q.split(\" \")))){\n System.out.print(i+\" \");\n a = true;\n }\n i++;\n }\n if(!a)\n System.out.println(-1);\n else\n System.out.println(\"\");\n }\n \n }", "default Stream<CharSequence> parseTextToWords(CharSequence text) {\n return toSentences(text).filter(s -> s.length() > 0).flatMap(this::toWords);\n }", "void solution() {\n\t\t/* Write a RegEx matching repeated words here. */\n\t\tString regex = \"(?i)\\\\b([a-z]+)\\\\b(?:\\\\s+\\\\1\\\\b)+\";\n\t\t/* Insert the correct Pattern flag here. */\n\t\tPattern p = Pattern.compile(regex, Pattern.CASE_INSENSITIVE);\n\n\t\tString[] in = { \"I love Love to To tO code\", \"Goodbye bye bye world world world\",\n\t\t\t\t\"Sam went went to to to his business\", \"Reya is is the the best player in eye eye game\", \"in inthe\",\n\t\t\t\t\"Hello hello Ab aB\" };\n\t\tfor (String input : in) {\n\t\t\tMatcher m = p.matcher(input);\n\n\t\t\t// Check for subsequences of input that match the compiled pattern\n\t\t\twhile (m.find()) {\n\t\t\t\t// /* The regex to replace */, /* The replacement. */\n\t\t\t\tinput = input.replaceAll(m.group(), m.group(1));\n\t\t\t}\n\n\t\t\t// Prints the modified sentence.\n\t\t\tSystem.out.println(input);\n\t\t}\n\n\t}", "public Map<Sentence, NavigableSet<Integer>> findInSentences (String words,\n DialogueConstraints constraints)\n {\n\n Map<Sentence, NavigableSet<Integer>> matches = new LinkedHashMap<> ();\n\n for (Paragraph p : this.paragraphs)\n {\n\n matches.putAll (p.findInSentences (words,\n constraints));\n\n }\n\n return matches;\n\n }", "private List<String> getSentences(String paragraph) {\n BreakIterator breakIterator = BreakIterator.getSentenceInstance(Locale.US);\n breakIterator.setText(paragraph);\n List<String> sentences = new ArrayList<>();\n int start = breakIterator.first();\n for (int end = breakIterator.next(); end != breakIterator.DONE; start = end, end = breakIterator.next()) {\n sentences.add(paragraph.substring(start, end));\n }\n return sentences;\n }", "Stream<CharSequence> toWords(CharSequence sentence);", "public String[] prepareText(String text) {\n\n Properties props = new Properties();\n\n props.put(\"annotators\", \"tokenize, ssplit, pos, lemma, ner\");\n StanfordCoreNLP pipeline = new StanfordCoreNLP(props);\n\n //apply\n Annotation document = new Annotation(text);\n pipeline.annotate(document);\n\n List<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n\n ArrayList<String> result = new ArrayList<>();\n\n for (CoreMap sentence : sentences) {\n\n for (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\n // this is the text of the token\n String word = token.get(CoreAnnotations.LemmaAnnotation.class);\n // this is the POS tag of the token\n String pos = token.get(PartOfSpeechAnnotation.class);\n // this is the NER label of the token\n String ne = token.get(CoreAnnotations.NamedEntityTagAnnotation.class);\n\n if (!StringUtils.isStopWord(word)) {\n result.add(word);\n }\n\n }\n\n }\n String[] result_ar = new String[result.size()];\n\n return result.toArray(result_ar);\n }", "public static void main (String[] args) {\r\n\t\tfindWords(sentence);\r\n\t}", "public static void main(String[] args) {\n Pattern pattern = Pattern.compile(\"\\\\b(\\\\w+)(\\\\W+\\\\1\\\\b)+\",Pattern.CASE_INSENSITIVE);\r\n\r\n Scanner in = new Scanner(System.in);\r\n int numSentences = Integer.parseInt(in.nextLine());\r\n \r\n while (numSentences-- > 0) {\r\n String input = in.nextLine();\r\n \r\n Matcher matcher = pattern.matcher(input);\r\n \r\n while (matcher.find()) \r\n input = input.replaceAll(matcher.group(),matcher.group(1));\r\n // Prints the modified sentence.\r\n System.out.println(input);\r\n }\r\n \r\n in.close();\r\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tString[] testSentence = new String[]{\r\n\t\t\t\t\"西三旗硅谷先锋小区半地下室出租,便宜可合租硅谷工信处女干事每月经过下属科室都要亲口交代24口交换机等技术性器件的安装工作\",\r\n\t\t\t\t\"这是一个伸手不见五指的黑夜。我叫孙悟空,我爱北京,我爱Python和C++。\",\r\n\t\t\t \"我不喜欢日本和服。\",\r\n\t\t\t \"雷猴回归人间。\",\r\n\t\t\t \"工信处女干事每月经过下属科室都要亲口交代24口交换机等技术性器件的安装工作\",\r\n\t\t\t \"我需要廉租房\",\r\n\t\t\t \"永和服装饰品有限公司\",\r\n\t\t\t \"我爱北京天安门\",\r\n\t\t\t \"abc\",\r\n\t\t\t \"隐马尔可夫\",\r\n\t\t\t \"雷猴是个好网站\",\r\n\t\t\t \"“Microsoft”一词由“MICROcomputer(微型计算机)”和“SOFTware(软件)”两部分组成\",\r\n\t\t\t \"草泥马和欺实马是今年的流行词汇\",\r\n\t\t\t \"伊藤洋华堂总府店\",\r\n\t\t\t \"中国科学院计算技术研究所\",\r\n\t\t\t \"罗密欧与朱丽叶\",\r\n\t\t\t \"我购买了道具和服装\",\r\n\t\t\t \"PS: 我觉得开源有一个好处,就是能够敦促自己不断改进,避免敞帚自珍\",\r\n\t\t\t \"湖北省石首市\",\r\n\t\t\t \"湖北省十堰市\",\r\n\t\t\t \"总经理完成了这件事情\",\r\n\t\t\t \"电脑修好了\",\r\n\t\t\t \"做好了这件事情就一了百了了\",\r\n\t\t\t \"人们审美的观点是不同的\",\r\n\t\t\t \"我们买了一个美的空调\",\r\n\t\t\t \"线程初始化时我们要注意\",\r\n\t\t\t \"一个分子是由好多原子组织成的\",\r\n\t\t\t \"祝你马到功成\",\r\n\t\t\t \"他掉进了无底洞里\",\r\n\t\t\t \"中国的首都是北京\",\r\n\t\t\t \"孙君意\",\r\n\t\t\t \"外交部发言人马朝旭\",\r\n\t\t\t \"领导人会议和第四届东亚峰会\",\r\n\t\t\t \"在过去的这五年\",\r\n\t\t\t \"还需要很长的路要走\",\r\n\t\t\t \"60周年首都阅兵\",\r\n\t\t\t \"你好人们审美的观点是不同的\",\r\n\t\t\t \"买水果然后去世博园\",\r\n\t\t\t \"但是后来我才知道你是对的\",\r\n\t\t\t \"存在即合理\",\r\n\t\t\t \"的的的的的在的的的的就以和和和\",\r\n\t\t\t \"I love你,不以为耻,反以为rong\",\r\n\t\t\t \"hello你好人们审美的观点是不同的\",\r\n\t\t\t \"很好但主要是基于网页形式\",\r\n\t\t\t \"hello你好人们审美的观点是不同的\",\r\n\t\t\t \"为什么我不能拥有想要的生活\",\r\n\t\t\t \"后来我才\",\r\n\t\t\t \"此次来中国是为了\",\r\n\t\t\t \"使用了它就可以解决一些问题\",\r\n\t\t\t \",使用了它就可以解决一些问题\",\r\n\t\t\t \"其实使用了它就可以解决一些问题\",\r\n\t\t\t \"好人使用了它就可以解决一些问题\",\r\n\t\t\t \"是因为和国家\",\r\n\t\t\t \"老年搜索还支持\",\r\n\t\t\t \"干脆就把那部蒙人的闲法给废了拉倒!RT @laoshipukong : 27日,全国人大常委会第三次审议侵权责任法草案,删除了有关医疗损害责任“举证倒置”的规定。在医患纠纷中本已处于弱势地位的消费者由此将陷入万劫不复的境地。 \",\r\n\t\t\t \"他说的确实在理\",\r\n\t\t\t \"长春市长春节讲话\",\r\n\t\t\t \"结婚的和尚未结婚的\",\r\n\t\t\t \"结合成分子时\",\r\n\t\t\t \"旅游和服务是最好的\",\r\n\t\t\t \"这件事情的确是我的错\",\r\n\t\t\t \"供大家参考指正\",\r\n\t\t\t \"哈尔滨政府公布塌桥原因\",\r\n\t\t\t \"我在机场入口处\",\r\n\t\t\t \"邢永臣摄影报道\",\r\n\t\t\t \"BP神经网络如何训练才能在分类时增加区分度?\",\r\n\t\t\t \"南京市长江大桥\",\r\n\t\t\t \"应一些使用者的建议,也为了便于利用NiuTrans用于SMT研究\",\r\n\t\t\t \"长春市长春药店\",\r\n\t\t\t \"邓颖超生前最喜欢的衣服\",\r\n\t\t\t \"胡锦涛是热爱世界和平的政治局常委\",\r\n\t\t\t \"程序员祝海林和朱会震是在孙健的左面和右面, 范凯在最右面.再往左是李松洪\",\r\n\t\t\t \"一次性交多少钱\",\r\n\t\t\t \"两块五一套,三块八一斤,四块七一本,五块六一条\",\r\n\t\t\t \"小和尚留了一个像大和尚一样的和尚头\",\r\n\t\t\t \"我是中华人民共和国公民;我爸爸是共和党党员; 地铁和平门站\",\r\n\t\t\t \"张晓梅去人民医院做了个B超然后去买了件T恤\",\r\n\t\t\t \"AT&T是一件不错的公司,给你发offer了吗?\",\r\n\t\t\t \"C++和c#是什么关系?11+122=133,是吗?PI=3.14159\",\r\n\t\t\t \"你认识那个和主席握手的的哥吗?他开一辆黑色的士。\",\r\n\t\t\t \"枪杆子中出政权\",\r\n\t\t\t \"张三风同学走上了不归路\",\r\n\t\t\t \"阿Q腰间挂着BB机手里拿着大哥大,说:我一般吃饭不AA制的。\",\r\n\t\t\t \"在1号店能买到小S和大S八卦的书,还有3D电视。\"\r\n\r\n\t\t};\r\n\t\t\r\n\t\tSegment app = new Segment();\r\n\t\t\r\n\t\tfor(String sentence : testSentence)\r\n\t\t\tSystem.out.println(app.cut(sentence));\r\n\t}", "public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }", "public static List<String> devideSentenceIntoWords(String sentence) {\n\n String[] wordArray = sentence.toLowerCase().split(\" \");\n return Arrays.stream(wordArray)\n .map(String::trim)\n .filter(w -> !w.replace(CharacterUtils.WORD_DEVIDER, \"\").trim().isEmpty())\n .collect(Collectors.toList());\n }", "public static List<Sentence> setUpSentences(String textStr) {\n\t\tList<Sentence> sentences= new ArrayList<Sentence>();\n\t\tint tokenBegin= 0;\n\t\tint sentBegin= 0;\n\t\tint charIndex=0;\n\t\tint sentCount= 0;\n\t\tint tokenCount;\n\t\tint textLen= textStr.length();\n\t\twhile(charIndex<textLen){\n\t\t\tList<Token> tokens= new ArrayList<Token>();\n\t\t\ttokenCount=0;\n\t\t\twhile(charIndex<textLen&& textStr.charAt(charIndex)!= '.'){\n\t\t\t\tif(textStr.charAt(charIndex)== ' '){\n\t\t\t\t\tif(textStr.charAt(charIndex-1)!= '.'){\n\t\t\t\t\t\taddToken(textStr, tokenBegin, charIndex, tokenCount,\n\t\t\t\t\t\t\t\ttokens);\n\t\t\t\t\t\ttokenBegin= charIndex+1;\n\t\t\t\t\t\ttokenCount++;\n\t\t\t\t\t}else\n\t\t\t\t\t\ttokenBegin++;\n\t\t\t\t}\n\t\t\t\tcharIndex++;\n\t\t\t}\n\t\t\t//add last token\n\t\t\tint end= Math.min(charIndex+1, textLen);\n\t\t\taddToken(textStr, tokenBegin, end, tokenCount, tokens);\n\t\t\ttokenBegin=charIndex+1;\n\t\t\t//add sentence \n\t\t\taddSentence(textStr, sentences, sentBegin, sentCount, tokens, end);\n\t\t\t\n\t\t\tsentCount++;\n\t\t\tsentBegin= charIndex+2;\n\t\t\tcharIndex++;\n\t\t}\n\t\t\n\t\treturn sentences;\n\t}", "public List<Word> getTextWords(String text) {\n\n List<Word> words = new ArrayList<Word>();\n\n for (Word word : new SentenceParser().getSentenceWords(text)) {\n Collections.addAll(words, word);\n }\n return words;\n }", "public String extractRelevantSentences(String paragraph, Collection<String> terms, boolean lemmatised, int maxSentenceLength) {\n String result = \"\";\n boolean checkSentenceLength = (maxSentenceLength != -1);\n\n // Create an empty Annotation just with the given text\n document = new Annotation(paragraph);\n // Run Annotators on this text\n pipeline.annotate(document);\n\n // Use map to track sentences so that a sentence is not returned twice\n sentences = new HashMap();\n int key = 0;\n for (CoreMap coreMap : document.get(CoreAnnotations.SentencesAnnotation.class)) {\n String string = coreMap.toString();\n if (checkSentenceLength)// if checking sentences, skip is sentence is long\n if (StringOps.getWordLength(string) > maxSentenceLength)\n continue;\n sentences.put(key, coreMap.toString());\n key++;\n }\n\n Set keySet = sentences.keySet();\n Set<Integer> returnedSet = new HashSet();\n Iterator keyIterator = keySet.iterator();\n // These are all the sentences in this document\n while (keyIterator.hasNext()) {\n int id = (int) keyIterator.next();\n String content = sentences.get(id);\n // This is the current sentence\n String thisSentence = content;\n // Select sentence if it contains any of the terms and is not already returned\n for (String t : terms) {\n if (!returnedSet.contains(id)) { // ensure sentence not already used\n String label = StringOps.stemSentence(t, true);\n if (StringUtils.contains(StringOps.stemSentence(thisSentence, false), label)\n || StringUtils.contains(StringOps.stemSentence(StringOps.stripAllParentheses(thisSentence), false), label)) { // lookup stemmed strings\n result = result + \" \" + thisSentence.trim(); // Concatenate new sentence\n returnedSet.add(id);\n }\n }\n }\n }\n\n if (lemmatised && null != result) {\n result = lemmatise(result);\n }\n\n return result;\n }", "public static String findMultipleOccorancesOfGivenWord(String sentence,String word)\n {\n if(sentence == null || word == null || sentence == \"\" || word == \"\"){\n return \"Please enter valid sentence and word.It should not be empty and null\";\n }\n String result = \"\";\n Pattern pattern = Pattern.compile(word);\n Matcher matcher = pattern.matcher(sentence);\n while(matcher.find()) {\n\n result = result + \"Found at:\"+ matcher.start() + \" - \" + matcher.end() + \" \";\n }\n\n return result.trim();\n\n }", "private static ImmutableSet<String> categorizeText(String text) throws IOException {\n ImmutableSet<String> categories = ImmutableSet.of();\n\n try (LanguageServiceClient client = LanguageServiceClient.create()) {\n Document document = Document.newBuilder().setContent(text).setType(Type.PLAIN_TEXT).build();\n ClassifyTextRequest request = ClassifyTextRequest.newBuilder().setDocument(document).build();\n\n ClassifyTextResponse response = client.classifyText(request);\n\n categories = response.getCategoriesList()\n .stream()\n .flatMap(ReceiptAnalysis::parseCategory)\n .collect(ImmutableSet.toImmutableSet());\n } catch (ApiException e) {\n // Return empty set if classification request failed.\n return categories;\n }\n\n return categories;\n }", "public Map<Sentence, NavigableSet<Integer>> findInSentences (String text,\n DialogueConstraints constraints)\n {\n\n Map<Sentence, NavigableSet<Integer>> matches = new LinkedHashMap<> ();\n\n for (Sentence s : this.sentences)\n {\n\n NavigableSet<Integer> inds = s.find (text,\n constraints);\n\n if ((inds != null)\n &&\n (inds.size () > 0)\n )\n {\n\n matches.put (s,\n inds);\n\n }\n\n }\n\n return matches;\n\n }", "static boolean isWordPresent(String sentence, String word)\n {\n String []s = sentence.split(\" \");\n\n // To temporarily store each individual word\n for ( String temp :s)\n {\n\n // Comparing the current word\n // with the word to be searched\n// if (temp.compareTo(word) == 0)\n// {\n// return true;\n// }\n if (temp.contains(word)) return true;\n }\n return false;\n }", "public static void main(String[] args) {\n String words = \"coding:java:selenium:python\";\n String[] splitWords = words.split(\":\");\n System.out.println(Arrays.toString(splitWords));\n System.out.println(\"Length of Array - \" +splitWords.length);\n\n for (String each:splitWords) {\n System.out.println(each);\n\n }\n // How many words in your sentence\n // Most popular interview questions\n // 0 1 2 3 4 5\n String sentence = \"Productive study is makes you motivated\";\n String[] wordsInSentence = sentence.split(\" \");\n System.out.println(\"First words: \" +wordsInSentence[0]);\n System.out.println(\"First words: \" +sentence.split(\" \")[5]);\n System.out.println(\"Number of words in sentence: \" + wordsInSentence.length);\n\n // print all words in separate line\n for (String each:wordsInSentence) {\n System.out.println(each);\n }\n\n\n\n }", "static void allDocumentAnalyzer() throws IOException {\n\t\tFile allFiles = new File(\".\"); // current directory\n\t\tFile[] files = allFiles.listFiles(); // file array\n\n\t\t// recurse through all documents\n\t\tfor (File doc : files) {\n\t\t\t// other files we don't need\n\t\t\tif (doc.getName().contains(\".java\") || doc.getName().contains(\"words\") || doc.getName().contains(\"names\")\n\t\t\t\t\t|| doc.getName().contains(\"phrases\") || doc.getName().contains(\".class\")\n\t\t\t\t\t|| doc.getName().contains(\"Data\") || doc.getName().contains(\".sh\") || doc.isDirectory()\n\t\t\t\t\t|| !doc.getName().contains(\".txt\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString name = doc.getName();\n\t\t\tSystem.out.println(name);\n\t\t\tname = name.substring(0, name.length() - 11);\n\t\t\tSystem.out.println(name);\n\n\t\t\tif (!names.contains(name)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// make readers\n\t\t\tFileReader fr = new FileReader(doc);\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\n\t\t\t// phrase list\n\t\t\tArrayList<String> words = new ArrayList<String>();\n\n\t\t\t// retrieve all text, trim, refine and add to phrase list\n\t\t\tString nextLine = br.readLine();\n\t\t\twhile (nextLine != null) {\n\t\t\t\tnextLine = nextLine.replace(\"\\n\", \" \");\n\t\t\t\tnextLine = nextLine.trim();\n\n\t\t\t\tif (nextLine.contains(\"no experience listed\")) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tString[] lineArray = nextLine.split(\"\\\\s+\");\n\n\t\t\t\t// recurse through every word to find phrases\n\t\t\t\tfor (int i = 0; i < lineArray.length - 1; i++) {\n\t\t\t\t\t// get the current word and refine\n\t\t\t\t\tString currentWord = lineArray[i];\n\n\t\t\t\t\tcurrentWord = currentWord.trim();\n\t\t\t\t\tcurrentWord = refineWord(currentWord);\n\n\t\t\t\t\tif (currentWord.equals(\"\") || currentWord.isEmpty()) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\twords.add(currentWord);\n\t\t\t\t}\n\t\t\t\tnextLine = br.readLine();\n\t\t\t}\n\n\t\t\tbr.close();\n\n\t\t\t// continue if empty\n\t\t\tif (words.size() == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// otherwise, increment number of files in corpus\n\t\t\tsize++;\n\n\t\t\t// updating the phrase count map for tf\n\t\t\tString fileName = doc.getName();\n\t\t\tphraseCountMap.put(fileName, words.size());\n\n\t\t\t// recurse through every word\n\t\t\tfor (String word : words) {\n\t\t\t\t// get map from string to freq\n\t\t\t\tHashMap<String, Integer> textFreqMap = wordFreqMap.get(fileName);\n\n\t\t\t\t// if it's null, make one\n\t\t\t\tif (textFreqMap == null) {\n\t\t\t\t\ttextFreqMap = new HashMap<String, Integer>();\n\t\t\t\t\t// make freq as 1\n\t\t\t\t\ttextFreqMap.put(word, 1);\n\t\t\t\t\t// put that in wordFreq\n\t\t\t\t\twordFreqMap.put(fileName, textFreqMap);\n\t\t\t\t} else {\n\t\t\t\t\t// otherwise, get the current num\n\t\t\t\t\tInteger currentFreq = textFreqMap.get(word);\n\n\t\t\t\t\t// if it's null,\n\t\t\t\t\tif (currentFreq == null) {\n\t\t\t\t\t\t// the frequency is just 0\n\t\t\t\t\t\tcurrentFreq = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t// increment the frequency\n\t\t\t\t\tcurrentFreq++;\n\n\t\t\t\t\t// put it in the textFreqMap\n\t\t\t\t\ttextFreqMap.put(word, currentFreq);\n\n\t\t\t\t\t// put that in the wordFreqMap\n\t\t\t\t\twordFreqMap.put(fileName, textFreqMap);\n\t\t\t\t}\n\n\t\t\t\t// add this to record (map from phrases to docs with that\n\t\t\t\t// phrase)\n\t\t\t\tinvertedMap.addValue(word, doc);\n\t\t\t}\n\t\t}\n\t}", "boolean isCodeMixed(String text) {\n String[] tokens = text.split(\"\\\\s+\");\r\n for (String word : tokens) {\r\n String nword = word.toLowerCase();\r\n if (keywords.containsKey(nword))\r\n return true;\r\n }\r\n return false;\r\n }", "public static final String[] toLowerCaseWordArray(String text) {\r\n StringTokenizer tokens = new StringTokenizer(text, \" ,\\r\\n.:/\\\\+\");\r\n String[] words = new String[tokens.countTokens()];\r\n for (int i = 0; i < words.length; i++) {\r\n words[i] = tokens.nextToken().toLowerCase();\r\n }\r\n return words;\r\n }", "public ArrayList<String> processText(String text)\r\n\t{\r\n\t\tArrayList<String> terms = new ArrayList<>();\r\n\r\n\t\t// P2\r\n\t\t// Tokenizing, normalizing, stopwords, stemming, etc.\r\n\t\tArrayList<String> tokens = tokenize(text);\r\n\t\tfor(String term: tokens){\r\n\t\t\tString norm = normalize(term);\r\n\t\t\tif(!isStopWord(norm)){\r\n\t\t\t\tString stem = stem(norm);\r\n\t\t\t\tterms.add(stem);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn terms;\r\n\t}", "public static String getAllSentences(String username) {\r\n\t\t\r\n\t\tSentence s = null;\r\n\t\t\r\n\t\t// Gets all the sentences\r\n\t\tResponse res= ServicesLocator.getCentric1Connection().path(\"sentence\").request().accept(MediaType.APPLICATION_JSON).get();\r\n\t\t\r\n\t\t// Checks the response code and prints the text\r\n\t\tif(res.getStatus()==Response.Status.OK.getStatusCode()) {\r\n\t\t\ts=res.readEntity(Sentence.class);\r\n\t\t\treturn s.getText();\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn \"An unexpected error occured\";\r\n\t\t}\r\n\t}", "@Test\n void adjectivesCommonList() {\n //boolean flag = false;\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day good; glad @JeremyKappell is standing up against bad #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing real Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB worst(Via NEWS 8 WROC)\");\n ArrayList<String> adj = np.adjectives(sentences);\n for (String common : np.getCommonWords()) {\n assertFalse(adj.contains(common));\n }\n }", "Stream<CharSequence> toSentences(CharSequence text);", "public static ArrayList<String> wordTokenizer(String sentence){\n \n ArrayList<String> words = new ArrayList<String>();\n String[] wordsArr = sentence.replaceAll(\"\\n\", \" \").toLowerCase().split(\" \");\n \n for(String s : wordsArr){\n \n if(s.trim().compareTo(\"\") != 0)\n words.add(s.trim());\n \n }\n \n return words;\n \n }", "public String phraseWords(String input) {\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n String pos = document.get(CoreAnnotations.PhraseWordsTagAnnotation.class);\n\n return pos;\n }", "public synchronized void process() \n\t{\n\t\t// for each word in a line, tally-up its frequency.\n\t\t// do sentence-segmentation first.\n\t\tCopyOnWriteArrayList<String> result = textProcessor.sentenceSegmementation(content.get());\n\t\t\n\t\t// then do tokenize each word and count the terms.\n\t\ttextProcessor.tokenizeAndCount(result);\n\t}", "public boolean getIgnoreSentenceCapitalization() {\n\t\treturn ignoreSentenceCapitalization.isChecked();\n\t}", "public KeyWordList extractKeyWords(String input);", "private static void iterateInput(){\n boolean isReadingKnowledgeBase = false;\n boolean isReadingProveStatements = false;\n\n String[] kb = readInput().split(\"\\\\r?\\\\n\");\n for(String sentence : kb){\n if(sentence.contains(\"Knowledge Base:\")){\n isReadingKnowledgeBase = true;\n isReadingProveStatements = false;\n } else if(sentence.contains(\"Prove the following sentences by refutation:\")){\n isReadingKnowledgeBase = false;\n isReadingProveStatements = true;\n } else {\n if(isReadingKnowledgeBase && !sentence.isEmpty()) {\n knowledgeBase.add(evalSentence(sentence));\n } else if(isReadingProveStatements && !sentence.isEmpty()){\n proveStatements.add(evalSentence(sentence));\n }\n }\n }\n }", "private ArrayList<String> findChampions() {\n\t\tString searchContents = search.getText();\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tfor (String c : CHAMPIONLIST) {\n\t\t\tif (c.toLowerCase().contains(searchContents.toLowerCase())) {\n\t\t\t\tresult.add(c);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public NavigableSet<Integer> findAllTextIndexes (String words,\n DialogueConstraints constraints)\n {\n\n NavigableSet<Integer> matches = new TreeSet ();\n\n for (Paragraph p : this.paragraphs)\n {\n\n for (Sentence s : p.getSentences ())\n {\n\n int st = s.getAllTextStartOffset ();\n\n // These indexes will be sentence local.\n NavigableSet<Integer> found = s.find (words,\n constraints);\n\n if (found != null)\n {\n\n for (Integer i : found)\n {\n\n matches.add (s.getWord (i).getAllTextStartOffset ());\n\n //matches.add (i + st);\n\n }\n\n }\n\n }\n\n }\n\n return matches;\n\n }", "public boolean detectCapitalUse_regex(String word){\n return word.matches(\"[A-Z]*|.[a-z]*\");\n }", "public Iterable<String> getAllValidWords(BoggleBoard board) {\n boardRows = board.rows();\n boardCols = board.cols();\n boolean[][] visited = new boolean[boardRows][boardCols];\n HashSet<String> foundWords = new HashSet<>();\n for (int row = 0; row < boardRows; row++) {\n for (int col = 0; col < boardCols; col++) {\n doSearch(row, col, root, board, visited, foundWords);\n }\n }\n return foundWords;\n }", "public static void main(String[] args){\n \tString tempStringLine;\n\n\t\t /* SCANNING IN THE SENTENCE */\n // create a queue called sentenceQueue to temporary store each line of the text file as a String.\n MyLinkedList sentenceList = new MyLinkedList();\n\n // integer which keeps track of the index position for each new sentence string addition.\n int listCount = 0;\n\n // create a new file by opening a text file.\n File file2 = new File(\"testEmail2.txt\");\n try {\n\n \t// create a new scanner 'sc' for the newly allocated file.\n Scanner sc = new Scanner(file2);\n\n // while there are still lines within the file, continue.\n while (sc.hasNextLine()) {\n\n \t// save each line within the file to the String 'tempStringLine'.\n \ttempStringLine = sc.nextLine();\n\n \t// create a new BreakIterator called 'sentenceIterator' to break the 'tempStringLine' into sentences.\n BreakIterator sentenceIterator = BreakIterator.getSentenceInstance();\n\n // Set a new text string 'tempStringLine' to be scanned.\n sentenceIterator.setText(tempStringLine);\n\n // save the first index boundary in the integer 'start'.\n // The iterator's current position is set to the first text boundary.\n int start = sentenceIterator.first();\n\n // save the boundary following the current boundary in the integer 'end'.\n for(int end = sentenceIterator.next();\n\n \t// while the end integer does not equal 'BreakIterator.DONE' or the end of the boundary.\n \tend != BreakIterator.DONE;\n\n \t// set the start integer equal to the end integer. Set the end integer equal to the next boundary.\n \tstart = end, end = sentenceIterator.next()){\n\n \t// create a substring of tempStringLine of the start and end boundsries, which are just Strings of\n \t// each sentence.\n \tsentenceList.add(listCount,tempStringLine.substring(start, end));\n\n \t// add to the count.\n \tlistCount++;\n }\n }\n\n // close the scanner 'sc'.\n sc.close(); \n\n // if the file could not be opened, throw a FileNotFoundException.\n }catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n\t\tsentenceProcessor one = new sentenceProcessor(sentenceList);\n\t\tString[] names = one.findNames();\n System.out.println(\"Speaker \" + names[0]);\n System.out.println(\"Subject \" + names[1]);\n\t}", "public List<RichWord> spellCheckText(List<String> inputText) {\n\t\t\r\n\t\tfor(String s : inputText) {\r\n\t\t\tif(dizionario.contains(s)) {\r\n\t\t\t\tRichWord parola = new RichWord(s, true);\r\n\t\t\t\tparoleInput.add(parola);\r\n\t\t\t}else {\r\n\t\t\t\tRichWord parola = new RichWord(s, false);\r\n\t\t\t\tparoleInput.add(parola);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn paroleInput;\r\n\t}", "public String recognizeAuthorSentence(String sentence) \n\t{\n\t\tLanguageModelInterface langM;\n\t\tCollection<LanguageModelInterface> authbis;\n\t\tIterator<LanguageModelInterface> it;\n\t\tDouble prob = 0.0;\n\t\tString author_recognized = UNKNOWN_AUTHOR;\n\n\t\tfor(int i = 0; i < this.authorLangModelsMap.size(); i++)\n\t\t{\n\t\t\tauthbis = this.authorLangModelsMap.get(authors.get(i)).values();\n\t\t\tit = authbis.iterator();\n\t\t\t//System.out.println(authors.get(i));\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tlangM = (NaiveLanguageModel) it.next();\n\t\t\t\t//System.out.println(langM.getSentenceProb(sentence));\n\t\t\t\t//System.out.println(authors.get(i));\n\t\t\t\t\n\t\t\t\tif(prob < langM.getSentenceProb(sentence))\n\t\t\t\t{\n\t\t\t\t\tprob = langM.getSentenceProb(sentence);\n\t\t\t\t\tauthor_recognized = authors.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn author_recognized;\n\t}", "public static List<List<String[]>> getLinesAsPOSSentences(String text) {\n\t\tStringBuilder sentenceSB = new StringBuilder();\n\t\tchar[] chars;\n\t\tchars = text.toCharArray();\n\t\tList<List<String[]>> lines = new ArrayList<List<String[]>>();\n\t\tList<String[]> words = new ArrayList<String[]>();\n\t\twords.add(new String[] {\"<s>\",\"BOS\"});\n\t\tfor (int i=0; i<chars.length; i++) {\n\t\t\tif (chars[i] == '\\n' || chars[i] == '\\r') {\n\t\t\t\tif (sentenceSB.length() > 0) {\n//\t\t\t\t\tSystem.out.println(\"Adding word: \"+sentenceSB.toString());\n\t\t\t\t\tString word = sentenceSB.toString();\n\t\t\t\t\tString[] splitWord = splitLastChar(word, '/');\n\t\t\t\t\tif (splitWord.length > 1) {\n//\t\t\t\t\t\tsplitWord[0] = escapeChar(splitWord[0], '/');\n\t\t\t\t\t\twords.add(splitWord);\n\t\t\t\t\t} else {\n\t\t\t\t\t\twords.add(new String[] {word, word});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (words.size() > 1) {\n//\t\t\t\t\tSystem.out.println(\"Adding line: \"+words);\n\t\t\t\t\twords.add(new String[] {\"<\\\\/s>\",\"EOS\"});\n\t\t\t\t\tlines.add(words);\n\t\t\t\t}\n\t\t\t\twords = new ArrayList<String[]>();\n\t\t\t\twords.add(new String[] {\"<s>\",\"BOS\"});\n\t\t\t\tsentenceSB.setLength(0);\n\t\t\t} else if (chars[i] == ' ') {\n\t\t\t\tif (sentenceSB.length() > 0) {\n\t\t\t\t\tString word = sentenceSB.toString();\n\t\t\t\t\tString[] splitWord = splitLastChar(word, '/');\n\t\t\t\t\tif (splitWord.length > 1) {\n//\t\t\t\t\t\tsplitWord[0] = escapeChar(splitWord[0], '/');\n\t\t\t\t\t\twords.add(splitWord);\n\t\t\t\t\t} else {\n\t\t\t\t\t\twords.add(new String[] {word, word});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsentenceSB.setLength(0);\n\t\t\t} else {\n\t\t\t\tsentenceSB.append(chars[i]);\n\t\t\t}\n\t\t}\n\t\tif (sentenceSB.length() > 0) {\n\t\t\tString word = sentenceSB.toString();\n\t\t\tString[] splitWord = splitLastChar(word, '/');\n\t\t\tif (splitWord.length > 1) {\n\t\t\t\tsplitWord[0] = escapeChar(splitWord[0], '/');\n\t\t\t\twords.add(splitWord);\n\t\t\t} else {\n\t\t\t\twords.add(new String[] {word, word});\n\t\t\t}\n\t\t}\n\t\tif (words.size() > 1) {\n\t\t\twords.add(new String[] {\"<\\\\/s>\",\"EOS\"});\n//\t\t\tSystem.out.print(\"Adding line: \");\n//\t\t\tfor (String[] token : words) {\n//\t\t\t\tSystem.out.print(\"(\"+token[0]+\",\"+token[1]+\")\"+\" \");\n//\t\t\t}\n//\t\t\tSystem.out.println();\n\t\t\tlines.add(words);\n\t\t}\n\t\tsentenceSB.setLength(0);\n\t\treturn lines;\n\t}", "public static List<String> getCamelCaseWords(String content) {\n List<String> camelCaseList = new ArrayList<>();\n// for (String word : content.split(\" \")) {\n// if(word.matches(\"[aA-zZ]([A-Z0-9]*[a-z][a-z0-9]*[A-Z]|[a-z0-9]*[A-Z][A-Z0-9]*[a-z])[A-Za-z0-9]*\")){\n// camelCaseList.add(word);\n// }\n// }\n Pattern regex = Pattern.compile(\"[aA-zZ]([A-Z0-9]*[a-z][a-z0-9]*[A-Z]|[a-z0-9]*[A-Z][A-Z0-9]*[a-z])[A-Za-z0-9]*\");\n Matcher regexMatcher = regex.matcher(content);\n while (regexMatcher.find()) {\n camelCaseList.add(regexMatcher.group());\n }\n return camelCaseList;\n }", "private static String toStartCase(String words) {\n String[] tokens = words.split(\"\\\\s+\");\n StringBuilder builder = new StringBuilder();\n for (String token : tokens) {\n builder.append(capitaliseSingleWord(token)).append(\" \");\n }\n return builder.toString().stripTrailing();\n }", "private String getSplitCapitalPeriodSent(String text) {\n\t\t\r\n\t\tString testString = text;\r\n\t\t\r\n\t\t/*\r\n\t\ttestString = testString.replaceAll(\"\\\\·\", \".\"); // To avoid the error ClausIE spliter: the dash will disappear\r\n\t\t// https://d5gate.ag5.mpi-sb.mpg.de/ClausIEGate/ClausIEGate?inputtext=Optimal+temperature+and+pH+for+growth+are+25%E2%80%9330+%CB%9AC+and+pH+7%2C+respectively.&processCcAllVerbs=true&processCcNonVerbs=true&type=true&go=Extract\r\n\t\ttestString = testString.replaceAll(\"\\\\s?\\\\·\\\\s?\", \".\"); // To avoid the error ClausIE spliter: the dash will disappear\r\n\t\t\r\n\t\ttestString = testString.replaceAll(\"–\", \"-\"); // To avoid the error ClausIE spliter: the dash will disappear\r\n\t\t// https://d5gate.ag5.mpi-sb.mpg.de/ClausIEGate/ClausIEGate?inputtext=Optimal+temperature+and+pH+for+growth+are+25%E2%80%9330+%CB%9AC+and+pH+7%2C+respectively.&processCcAllVerbs=true&processCcNonVerbs=true&type=true&go=Extract\r\n\t\ttestString = testString.replaceAll(\"\\\\s?-\\\\s?\", \"-\"); // To avoid the error ClausIE spliter: the dash will disappear\r\n\t\t*/\r\n\t\t\r\n\t\t// System.out.println(\"testString::Before::\" + testString);\r\n\t\t\r\n\t\tString targetPatternString = \"(\\\\s[A-Z]\\\\.\\\\s)\";\r\n\t\tPattern pattern = Pattern.compile(targetPatternString);\r\n\t\tMatcher matcher = pattern.matcher(testString);\r\n\t\t\r\n\t\twhile (matcher.find()) {\r\n\t\t\t// System.out.println(\"Whloe Sent::\" + matcher.group());\r\n\t\t\t// System.out.println(\"Part 1::\" + matcher.group(1));\r\n\t\t\t// System.out.println(\"Part 2::\" + matcher.group(2));\r\n\t\t\t// System.out.println(\"Part 3::\" + matcher.group(3));\r\n\t\t\t\r\n\t\t\tString matchString = matcher.group(1);\r\n\t\t\t\r\n\t\t\tString newMatchString = \"\";\r\n\t\t\tfor ( int j = 0; j < matchString.length(); j++ ) {\r\n\t\t\t\tnewMatchString += matchString.substring(j, j+1) + \" \";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"getSplitCapitalPeriodSent::OriginalSent::\" + text);\r\n\t\t\tSystem.out.println(\"matchString:: \" + matchString);\r\n\t\t\tSystem.out.println(\"newMatchString:: \" + newMatchString);\r\n\t\t\t\r\n\t\t\tlog(LogLevel.INFO, \"getSplitCapitalPeriodSent::OriginalSent::\" + text);\r\n\t\t\tlog(LogLevel.INFO, \"matchString:: \" + matchString);\r\n\t\t\tlog(LogLevel.INFO, \"newMatchString:: \" + newMatchString);\r\n\t\t\t\r\n\t\t\ttestString = testString.replaceAll(matcher.group(1), newMatchString);\r\n\t\t\t\r\n\t\t\t// String matchResult = matcher.group(1);\r\n\t\t\t// System.out.println(\"matchResult::\" + matchResult);\r\n\t\t}\r\n\t\t\r\n\t\t// System.out.println(\"testString::After::\" + testString);\r\n\t\t\r\n\t\treturn testString;\r\n\t\t\r\n\t}", "public static void classifyWithLowerCaseWords(String[] args) \r\n\t\t\tthrows IOException\r\n\t\t\t{\n\t\tFile dir_location = new File( args[0] ); \r\n\r\n\t\t// Listing of the directory (should contain 2 subdirectories: ham/ and spam/)\r\n\t\tFile[] dir_listing = new File[0];\r\n\r\n\t\t// Check if the cmd line arg is a directory and list it\r\n\t\tif ( dir_location.isDirectory() )\r\n\t\t{\r\n\t\t\tdir_listing = dir_location.listFiles();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println( \"- Error: cmd line arg not a directory.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t// Listings of the two sub-directories (ham/ and spam/)\r\n\t\tFile[] listing_ham = new File[0];\r\n\t\tFile[] listing_spam = new File[0];\r\n\r\n\t\t// Check that there are 2 sub-directories\r\n\t\tboolean hamFound = false; boolean spamFound = false;\r\n\t\tfor (int i=0; i<dir_listing.length; i++) {\r\n\t\t\tif (dir_listing[i].getName().equals(\"ham\")) { listing_ham = dir_listing[i].listFiles(); hamFound = true;}\r\n\t\t\telse if (dir_listing[i].getName().equals(\"spam\")) { listing_spam = dir_listing[i].listFiles(); spamFound = true;}\r\n\t\t}\r\n\t\tif (!hamFound || !spamFound) {\r\n\t\t\tSystem.out.println( \"- Error: specified directory does not contain ham and spam subdirectories.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t// Print out the number of messages in ham and in spam\r\n\t\t//System.out.println( \"\\t number of ham messages is: \" + listing_ham.length );\r\n\t\t//System.out.println( \"\\t number of spam messages is: \" + listing_spam.length );\r\n\r\n\t\t//******************************\r\n\t\t// Create a hash table for the vocabulary (word searching is very fast in a hash table)\r\n\t\tHashtable<String,Multiple_Counter> vocab = new Hashtable<String,Multiple_Counter>();\r\n\t\tMultiple_Counter old_cnt = new Multiple_Counter();\r\n\r\n\t\t//\t\tgw\r\n\t\tHashtable<String,WordStat> vocab_stat = new Hashtable<String,WordStat>();\r\n\r\n\t\tint nWordsHam = 0;\r\n\t\tint nWordsSpam = 0;\r\n\r\n\t\t// Read the e-mail messages\r\n\t\t// The ham mail\r\n\t\tfor ( int i = 0; i < listing_ham.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( listing_ham[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tword = word.toLowerCase();\r\n\r\n\t\t\t\t\tif ( !word.equals(\"\") ) { // if string isn't empty\r\n\t\t\t\t\t\tnWordsHam++;\r\n\t\t\t\t\t\tif ( vocab.containsKey(word) )\t\t\t\t// check if word exists already in the vocabulary\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\told_cnt = vocab.get(word);\t// get the counter from the hashtable\r\n\t\t\t\t\t\t\told_cnt.counterHam ++;\t\t\t// and increment it\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, old_cnt);\r\n\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = vocab_stat.get(word);\r\n\t\t\t\t\t\t\tws.counterHam++;\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tis this necessary?\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tMultiple_Counter fresh_cnt = new Multiple_Counter();\r\n\t\t\t\t\t\t\tfresh_cnt.counterHam = 1;\r\n\t\t\t\t\t\t\tfresh_cnt.counterSpam = 0;\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, fresh_cnt);\t\t\t// put the new word with its new counter into the hashtable\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = new WordStat();\r\n\t\t\t\t\t\t\tws.counterHam = 1;\r\n\t\t\t\t\t\t\tws.counterSpam = 0;\r\n\t\t\t\t\t\t\tws.p_w_given_ham_log = 0.0 ; //init\r\n\t\t\t\t\t\t\tws.p_w_given_spam_log = 0.0; //init\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t}\r\n\t\t// The spam mail\r\n\t\tfor ( int i = 0; i < listing_spam.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( listing_spam[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( ! word.equals(\"\") ) {\t\r\n\t\t\t\t\t\tnWordsSpam ++;\r\n\t\t\t\t\t\tif ( vocab.containsKey(word) )\t\t\t\t// check if word exists already in the vocabulary\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\told_cnt = vocab.get(word);\t// get the counter from the hashtable\r\n\t\t\t\t\t\t\told_cnt.counterSpam ++;\t\t\t// and increment it\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, old_cnt);\r\n\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = vocab_stat.get(word);\r\n\t\t\t\t\t\t\tws.counterSpam++;\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tis this necessary?\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tMultiple_Counter fresh_cnt = new Multiple_Counter();\r\n\t\t\t\t\t\t\tfresh_cnt.counterHam = 0;\r\n\t\t\t\t\t\t\tfresh_cnt.counterSpam = 1;\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, fresh_cnt);\t\t\t// put the new word with its new counter into the hashtable\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = new WordStat();\r\n\t\t\t\t\t\t\tws.counterHam = 0;\r\n\t\t\t\t\t\t\tws.counterSpam = 1;\r\n\t\t\t\t\t\t\tws.p_w_given_ham_log = 0.0 ; //init\r\n\t\t\t\t\t\t\tws.p_w_given_spam_log = 0.0; //init\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t}\r\n\r\n\t\t// Print out the hash table\r\n\t\t//\t\tfor (Enumeration<String> e = vocab.keys() ; e.hasMoreElements() ;)\r\n\t\t//\t\t{\t\r\n\t\t//\t\t\tString word;\r\n\t\t//\r\n\t\t//\t\t\tword = e.nextElement();\r\n\t\t//\t\t\told_cnt = vocab.get(word);\r\n\t\t//\r\n\t\t//\t\t\tSystem.out.println( word + \" | in ham: \" + old_cnt.counterHam + \r\n\t\t//\t\t\t\t\t\" in spam: \" + old_cnt.counterSpam);\r\n\t\t//\t\t}\r\n\r\n\t\t// Now all students must continue from here\r\n\t\t// Prior probabilities must be computed from the number of ham and spam messages\r\n\t\t// Conditional probabilities must be computed for every unique word\r\n\t\t// add-1 smoothing must be implemented\r\n\t\t// Probabilities must be stored as log probabilities (log likelihoods).\r\n\t\t// Bayes rule must be applied on new messages, followed by argmax classification (using log probabilities)\r\n\t\t// Errors must be computed on the test set and a confusion matrix must be generated\r\n\r\n\t\t// prior prob\r\n\t\tint nMessagesHam = listing_ham.length;\r\n\r\n\t\tint nMessagesSpam = listing_spam.length;\r\n\r\n\t\tint nMessagesTotal = nMessagesHam + nMessagesSpam;\r\n\r\n\t\tif(nMessagesHam == 0 || nMessagesSpam ==0)\r\n\t\t\tSystem.out.println(\"Zero ham or spam messages\");\r\n\r\n\t\tdouble p_ham_log = Math.log((nMessagesHam* 1.0)/(nMessagesTotal));\r\n\t\tdouble p_spam_log = Math.log((nMessagesSpam* 1.0)/(nMessagesTotal));\r\n\r\n\t\tIterator it = vocab_stat.entrySet().iterator();\r\n\t\tWordStat ws = null;\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap.Entry pairs = (Map.Entry) it.next();\r\n\t\t\tString is = (String) pairs.getKey();\r\n\t\t\tws = (WordStat) pairs.getValue();\r\n\r\n\t\t\tws.counterHam ++;\r\n\t\t\tws.counterSpam ++;\r\n\t\t\tnWordsHam ++;\r\n\t\t\tnWordsSpam ++;\r\n\t\t}\r\n\r\n\t\t//System.out.println(\"nWordsHam = \" +nWordsHam);\r\n\t\t//System.out.println(\"nWordsSpam = \" + nWordsSpam);\r\n\r\n\t\t//\t\tgw:\r\n\t\tit = vocab_stat.entrySet().iterator();\r\n\t\tws = null; \r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap.Entry pairs = (Map.Entry) it.next();\r\n\t\t\tString is = (String) pairs.getKey();\r\n\t\t\tws = (WordStat) pairs.getValue();\r\n\r\n\t\t\tws.p_w_given_ham_log = Math.log(ws.counterHam *1.0 / nWordsHam);\r\n\t\t\tws.p_w_given_spam_log = Math.log(ws.counterSpam *1.0 / nWordsSpam);\r\n\t\t\t//vocab_stat.put(is,ws);\r\n\t\t}\r\n\t\t//\t\tTODO: further confirm arg index\r\n\t\t//test sets\r\n\t\tFile test_dir_location = new File( args[1] ); \r\n\r\n\t\t//\t\tTODO: verify below works\r\n\t\t// Listing of the directory (should contain 2 subdirectories: ham/ and spam/)\r\n\t\tFile[] test_dir_listing = new File[0];\r\n\r\n\r\n\t\t// Check if the cmd line arg is a directory and list it\r\n\t\tif ( test_dir_location.isDirectory() )\r\n\t\t{\r\n\t\t\ttest_dir_listing = test_dir_location.listFiles();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println( \"- Error: cmd line arg not a directory.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t//\t\tTODO: verify File[0]\r\n\t\t// Listings of the two sub-directories (ham/ and spam/)\r\n\t\tFile[] test_listing_ham = new File[0];\r\n\t\tFile[] test_listing_spam = new File[0];\r\n\r\n\t\t// Check that there are 2 sub-directories\r\n\t\tboolean test_hamFound = false; boolean test_spamFound = false;\r\n\t\tfor (int i=0; i<test_dir_listing.length; i++) {\r\n\t\t\tif (test_dir_listing[i].getName().equals(\"ham\")) { test_listing_ham = test_dir_listing[i].listFiles(); test_hamFound = true;}\r\n\t\t\telse if (test_dir_listing[i].getName().equals(\"spam\")) { test_listing_spam = test_dir_listing[i].listFiles(); test_spamFound = true;}\r\n\t\t}\r\n\t\tif (!test_hamFound || !test_spamFound) {\r\n\t\t\tSystem.out.println( \"- Error: specified test directory does not contain ham and spam subdirectories.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t//\t\t// Print out the number of messages in ham and in spam\r\n\t\t//\t\tSystem.out.println( \"\\t number of test ham messages is: \" + test_listing_ham.length );\r\n\t\t//\t\tSystem.out.println( \"\\t number of test spam messages is: \" + test_listing_spam.length );\r\n\r\n\r\n\t\t//\t\tmetrics\r\n\t\tint true_positives = 0; //spam classified as spam\r\n\t\tint true_negatives = 0; //ham classified as ham\r\n\t\tint false_positives = 0; //ham ... as spam\r\n\t\tint false_negatives = 0; //spam... as ham\r\n\r\n\t\t// Test starts\r\n\t\t// The ham mail\r\n\t\tfor ( int i = 0; i < test_listing_ham.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( test_listing_ham[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\t//\t\t\tgw:\r\n\t\t\tdouble p_msg_ham_log = 0.0;\r\n\t\t\tdouble p_msg_spam_log = 0.0;\r\n\r\n\t\t\tp_msg_ham_log += p_ham_log;\r\n\t\t\tp_msg_spam_log += p_spam_log;\r\n\t\t\t//\t\t\tgw:\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\t\t\t\t\tword = word.toLowerCase();\r\n\r\n\t\t\t\t\tif ( !word.equals(\"\") ) { // if string isn't empty\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\r\n\t\t\t\t\t\tif(vocab_stat.containsKey(word)){\r\n\t\t\t\t\t\t\tWordStat iws = vocab_stat.get(word); \r\n\t\t\t\t\t\t\tdouble ip_w_given_ham_log = iws.p_w_given_ham_log;\r\n\t\t\t\t\t\t\tdouble ip_w_given_spam_log = iws.p_w_given_spam_log;\r\n\r\n\t\t\t\t\t\t\tp_msg_ham_log += ip_w_given_ham_log ;\r\n\t\t\t\t\t\t\tp_msg_spam_log += ip_w_given_spam_log ;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\r\n\t\t\tif (p_msg_spam_log > p_msg_ham_log) false_positives ++;\r\n\t\t\telse true_negatives ++;\r\n\t\t}\r\n\r\n\r\n\t\t// The spam mail\r\n\t\tfor ( int i = 0; i < test_listing_spam.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( test_listing_spam[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\t//\t\t\tgw:\r\n\t\t\tdouble p_msg_ham_log = 0.0;\r\n\t\t\tdouble p_msg_spam_log = 0.0;\r\n\r\n\t\t\tp_msg_ham_log += p_ham_log;\r\n\t\t\tp_msg_spam_log += p_spam_log;\r\n\t\t\t//\t\t\tgw:\t\t\t\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\t\t\t\t\tword = word.toLowerCase();\r\n\r\n\t\t\t\t\tif ( ! word.equals(\"\") ) {\t\r\n\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\r\n\t\t\t\t\t\tif(vocab_stat.containsKey(word)){\r\n\t\t\t\t\t\t\tWordStat iws = vocab_stat.get(word); \r\n\t\t\t\t\t\t\tdouble ip_w_given_ham_log = iws.p_w_given_ham_log;\r\n\t\t\t\t\t\t\tdouble ip_w_given_spam_log = iws.p_w_given_spam_log;\r\n\r\n\t\t\t\t\t\t\tp_msg_ham_log += ip_w_given_ham_log ;\r\n\t\t\t\t\t\t\tp_msg_spam_log += ip_w_given_spam_log ;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t\tif (p_msg_spam_log > p_msg_ham_log) true_positives ++;\r\n\t\t\telse false_negatives ++;\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Result 2: \");\r\n\t\tSystem.out.println(\"Lower-case\\t\\ttrue spam\\ttrue ham\");\r\n\t\tSystem.out.println(\"Classified spam:\\t\"+true_positives+\"\\t\\t\"+false_positives);\r\n\t\tSystem.out.println(\"Classified ham: \\t\"+false_negatives+\"\\t\\t\"+ true_negatives);\r\n\t\tSystem.out.println(\"\");\r\n\r\n\t\t\t}", "public static int countWords(String text) throws UIMAException { \n JCas jCas = JCasFactory.createJCas();\n jCas.setDocumentText(text);\n jCas.setDocumentLanguage(\"en\");\n initEngines();\n\n runPipeline(jCas, segmenter); \n \n int cnt = 0; \n for (Token tok : select(jCas, Token.class)) {\n String token = tok.getCoveredText();\n if (token.matches(\"\\\\p{Alpha}*\")) cnt++;\n }\n \n return cnt;\n }", "public void run() {\n\n /**\n * Replace all delimiters with single space so that words can be\n * tokenized with space as delimiter.\n */\n for (int x : delimiters) {\n text = text.replace((char) x, ' ');\n }\n\n StringTokenizer tokenizer = new StringTokenizer(text, \" \");\n boolean findCompoundWords = PrefsHelper.isFindCompoundWordsEnabled();\n ArrayList<String> ufl = new ArrayList<String>();\n for (; tokenizer.hasMoreTokens();) {\n String word = tokenizer.nextToken().trim();\n boolean endsWithPunc = word.matches(\".*[,.!?;]\");\n \n // Remove punctuation marks from both ends\n String prevWord = null;\n while (!word.equals(prevWord)) {\n prevWord = word;\n word = removePunctuation(word);\n }\n \n // Check spelling in word lists\n boolean found = checkSpelling(word);\n if (findCompoundWords) {\n if (!found) {\n ufl.add(word);\n if (endsWithPunc) pushErrorToListener(ufl);\n } else {\n pushErrorToListener(ufl);\n }\n } else {\n if (!found) listener.addWord(word);\n }\n }\n pushErrorToListener(ufl);\n }", "void findAllWords() {\n\t\tScanner in = new Scanner(textEditor.getText());\n\t\tint head = 0;\n\t\twhile (in.hasNext()) {\n\t\t\tString value = in.next();\n\t\t\tif (value.equals(findWord)) {\n\t\t\t\tint tail = value.length();\n\t\t\t\tfinder.add(new WordPosition(head, tail + head +1));\n\t\t\t}\n\t\t\thead += (value.length()+1);\n\t\t}\n\t\tin.close();\n\t}", "private void verbos(String texto, ArrayList<String> listaVerbos){\n\t Document doc = new Document(texto);\n\t for (Sentence sent : doc.sentences()) { \n//\t \tSystem.out.println(\"sent.length() \"+sent.length());\n\t for(int i=0; i < sent.length(); i++) {\n\t \t//adicionando o verbo a lista dos identificados\n\t\t \tString temp = sent.posTag(i);\n\t\t if(temp.compareTo(\"VB\") == 0) {\n//\t\t \tSystem.out.println(\"O verbo eh \" + sent.word(i));\n\t\t\t listaVerbos.add(sent.word(i));\n\t\t }\n\t\t else {\n//\t\t \tSystem.out.println(\"Não verbo \" + sent.word(i));\n\t\t }\n\t }\n\t }\n \tSystem.out.println(\"Os verbos sao:\");\n \tSystem.out.println(listaVerbos);\n\n\t}", "public void searchConc(String s) {\n\t \tscan = new Scanner(System.in);\n\t \t\n\n\t\t \twhile (array[findPos(s)] == null) {\n\t\t \t\tSystem.out.println(\"Word not found. Please try again or enter another word.\");\n\t\t \t\ts = scan.nextLine();\n\t\t \t}\n\t\t \t\n\t\t \tSystem.out.print(array[findPos(s)].element.getContent() + \" occurs \" + array[findPos(s)].element.getLines().getListSize() + \" times, in lines: \");\n\t\t \tarray[findPos(s)].element.getLines().printList();\n\t\t \tSystem.out.println(\"Please enter another word to search for: \");\n\t \t\n\t }", "public static void main(String[] args) throws FileNotFoundException {\n\n Scanner readFile = new Scanner(new File(\"sentences.txt\"));\n \n //Boolean to make sure parameters fit the finalized tokens\n boolean okay = true; \n \n while (readFile.hasNext()) {\n Stemmer s = new Stemmer();\n String token = readFile.next();\n okay = true;\n \n //Section to ensure no numerics\n if (token.contains(\"1\") || token.contains(\"2\"))\n okay = false;\n else if (token.contains(\"3\")||token.contains(\"4\"))\n okay = false;\n else if (token.contains(\"5\")||token.contains(\"6\"))\n okay = false;\n else if (token.contains(\"7\")||token.contains(\"8\"))\n okay = false;\n else if (token.contains(\"9\")||token.contains(\"0\"))\n okay = false;\n else {\n \n //remove characters\n token = token.replace(\"\\,\", \" \");\n token = token.replace(\"\\.\", \" \");\n token = token.replace(\"\\\"\", \" \");\n token = token.replace(\"\\(\", \" \");\n token = token.replace(\"\\)\", \" \");\n token = token.replace(\"'s\", \" \");\n token = token.trim();\n token = token.toLowerCase();\n }\n \n //Giant hard coded section to remove numerics\n if (token.compareTo(\"a\")==0)\n okay=false;\n if (token.compareTo(\"able\")==0)\n okay=false;\n if (token.compareTo(\"about\")==0)\n okay=false;\n if (token.compareTo(\"across\")==0)\n okay=false;\n if (token.compareTo(\"after\")==0)\n okay=false;\n if (token.compareTo(\"all\")==0)\n okay=false;\n if (token.compareTo(\"almost\")==0)\n okay=false;\n if (token.compareTo(\"also\")==0)\n okay=false;\n if (token.compareTo(\"am\")==0)\n okay=false;\n if (token.compareTo(\"among\")==0)\n okay=false;\n if (token.compareTo(\"an\")==0)\n okay=false;\n if (token.compareTo(\"and\")==0)\n okay=false;\n if (token.compareTo(\"any\")==0)\n okay=false;\n if (token.compareTo(\"are\")==0)\n okay=false;\n if (token.compareTo(\"as\")==0)\n okay=false;\n if (token.compareTo(\"at\")==0)\n okay=false;\n if (token.compareTo(\"be\")==0)\n okay=false;\n if (token.compareTo(\"because\")==0)\n okay=false;\n if (token.compareTo(\"been\")==0)\n okay=false;\n if (token.compareTo(\"but\")==0)\n okay=false;\n if (token.compareTo(\"by\")==0)\n okay=false;\n if (token.compareTo(\"can\")==0)\n okay=false;\n if (token.compareTo(\"cannot\")==0)\n okay=false;\n if (token.compareTo(\"could\")==0)\n okay=false;\n if (token.compareTo(\"dear\")==0)\n okay=false;\n if (token.compareTo(\"did\")==0)\n okay=false;\n if (token.compareTo(\"do\")==0)\n okay=false;\n if (token.compareTo(\"does\")==0)\n okay=false;\n if (token.compareTo(\"either\")==0)\n okay=false;\n if (token.compareTo(\"else\")==0)\n okay=false;\n if (token.compareTo(\"ever\")==0)\n okay=false;\n if (token.compareTo(\"every\")==0)\n okay=false;\n if (token.compareTo(\"for\")==0)\n okay=false;\n if (token.compareTo(\"from\")==0)\n okay=false;\n if (token.compareTo(\"get\")==0)\n okay=false;\n if (token.compareTo(\"got\")==0)\n okay=false;\n if (token.compareTo(\"had\")==0)\n okay=false;\n if (token.compareTo(\"has\")==0)\n okay=false;\n if (token.compareTo(\"have\")==0)\n okay=false;\n if (token.compareTo(\"he\")==0)\n okay=false;\n if (token.compareTo(\"her\")==0)\n okay=false;\n if (token.compareTo(\"hers\")==0)\n okay=false;\n if (token.compareTo(\"him\")==0)\n okay=false;\n if (token.compareTo(\"his\")==0)\n okay=false;\n if (token.compareTo(\"how\")==0)\n okay=false;\n if (token.compareTo(\"however\")==0)\n okay=false;\n if (token.compareTo(\"i\")==0)\n okay=false;\n if (token.compareTo(\"if\")==0)\n okay=false;\n if (token.compareTo(\"in\")==0)\n okay=false;\n if (token.compareTo(\"into\")==0)\n okay=false;\n if (token.compareTo(\"is\")==0)\n okay=false;\n if (token.compareTo(\"it\")==0)\n okay=false;\n if (token.compareTo(\"its\")==0)\n okay=false;\n if (token.compareTo(\"just\")==0)\n okay=false;\n if (token.compareTo(\"least\")==0)\n okay=false;\n if (token.compareTo(\"let\")==0)\n okay=false;\n if (token.compareTo(\"like\")==0)\n okay=false;\n if (token.compareTo(\"likely\")==0)\n okay=false;\n if (token.compareTo(\"may\")==0)\n okay=false;\n if (token.compareTo(\"me\")==0)\n okay=false;\n if (token.compareTo(\"might\")==0)\n okay=false;\n if (token.compareTo(\"most\")==0)\n okay=false;\n if (token.compareTo(\"must\")==0)\n okay=false;\n if (token.compareTo(\"my\")==0)\n okay=false;\n if (token.compareTo(\"neither\")==0)\n okay=false;\n if (token.compareTo(\"no\")==0)\n okay=false;\n if (token.compareTo(\"nor\")==0)\n okay=false;\n if (token.compareTo(\"not\")==0)\n okay=false;\n if (token.compareTo(\"of\")==0)\n okay=false;\n if (token.compareTo(\"off\")==0)\n okay=false;\n if (token.compareTo(\"often\")==0)\n okay=false;\n if (token.compareTo(\"on\")==0)\n okay=false;\n if (token.compareTo(\"only\")==0)\n okay=false;\n if (token.compareTo(\"or\")==0)\n okay=false;\n if (token.compareTo(\"other\")==0)\n okay=false;\n if (token.compareTo(\"our\")==0)\n okay=false;\n if (token.compareTo(\"own\")==0)\n okay=false;\n if (token.compareTo(\"rather\")==0)\n okay=false;\n if (token.compareTo(\"said\")==0)\n okay=false;\n if (token.compareTo(\"say\")==0)\n okay=false;\n if (token.compareTo(\"says\")==0)\n okay=false;\n if (token.compareTo(\"she\")==0)\n okay=false;\n if (token.compareTo(\"should\")==0)\n okay=false;\n if (token.compareTo(\"since\")==0)\n okay=false;\n if (token.compareTo(\"so\")==0)\n okay=false;\n if (token.compareTo(\"some\")==0)\n okay=false;\n if (token.compareTo(\"than\")==0)\n okay=false;\n if (token.compareTo(\"that\")==0)\n okay=false;\n if (token.compareTo(\"the\")==0)\n okay=false;\n if (token.compareTo(\"their\")==0)\n okay=false;\n if (token.compareTo(\"them\")==0)\n okay=false;\n if (token.compareTo(\"then\")==0)\n okay=false;\n if (token.compareTo(\"there\")==0)\n okay=false;\n if (token.compareTo(\"these\")==0)\n okay=false;\n if (token.compareTo(\"they\")==0)\n okay=false;\n if (token.compareTo(\"this\")==0)\n okay=false;\n if (token.compareTo(\"tis\")==0)\n okay=false;\n if (token.compareTo(\"to\")==0)\n okay=false;\n if (token.compareTo(\"too\")==0)\n okay=false;\n if (token.compareTo(\"twas\")==0)\n okay=false;\n if (token.compareTo(\"us\")==0)\n okay=false;\n if (token.compareTo(\"wants\")==0)\n okay=false;\n if (token.compareTo(\"was\")==0)\n okay=false;\n if (token.compareTo(\"we\")==0)\n okay=false;\n if (token.compareTo(\"were\")==0)\n okay=false;\n if (token.compareTo(\"what\")==0)\n okay=false;\n if (token.compareTo(\"when\")==0)\n okay=false;\n if (token.compareTo(\"where\")==0)\n okay=false;\n if (token.compareTo(\"which\")==0)\n okay=false;\n if (token.compareTo(\"while\")==0)\n okay=false;\n if (token.compareTo(\"who\")==0)\n okay=false;\n if (token.compareTo(\"whom\")==0)\n okay=false;\n if (token.compareTo(\"why\")==0)\n okay=false;\n if (token.compareTo(\"will\")==0)\n okay=false;\n if (token.compareTo(\"with\")==0)\n okay=false;\n if (token.compareTo(\"would\")==0)\n okay=false;\n if (token.compareTo(\"yet\")==0)\n okay=false;\n if (token.compareTo(\"you\")==0)\n okay=false;\n if (token.compareTo(\"your\")==0)\n okay=false;\n \n //Stemming process\n if(okay){\n s.add(token.toCharArray(),token.length());\n s.stem();\n token = s.toString();\n }\n \n //to make sure there are no duplicates\n if (tokenList.contains(token))\n okay = false;\n \n //Finalizing tokens\n if (okay)\n tokenList.add(token);\n \n\n }\n //System.out.println(i);\n System.out.println(tokenList.size());\n System.out.println(tokenList);\n readFile.close();\n \n Scanner readFile2 = new Scanner(new File(\"sentences.txt\"));\n \n \n //intializing TDMatrix\n int[][] tdm = new int[46][tokenList.size()];\n int i = 0;\n int j = 0;\n \n while (i<46){\n j=0;\n while (j < tokenList.size()){\n tdm[i][j]=0;\n j++;\n }\n i++;\n }\n \n String str;\n i=0;\n while (readFile2.hasNextLine()) {\n str=readFile2.nextLine();\n \n j=0;\n while (j<tokenList.size()){\n while ((str.contains(tokenList.get(j)))){\n tdm[i][j]++;\n str = str.replaceFirst(tokenList.get(j), \"***\");\n }\n j++;\n }\n \n i++;\n }\n \n i=0;\n while (i<46){\n j=0;\n while (j<tokenList.size()){\n System.out.print(tdm[i][j] + \" \");\n j++;\n }\n System.out.println(\"\");\n i++;\n }\n \n readFile.close();\n }", "public void searchWordToGroup(String title, String word, String groupIns) throws IOException {\r\n\t\tString line;\r\n\t\tBufferedReader in;\r\n\t\tint paragraphs = 1;\r\n\t\tint sentences = 1;\r\n\t\tfound = 0;\r\n\t\ttry {\r\n\t\t\tstatementP = SqlCon.getConnection().prepareStatement(SqlCon.PATH_ACORDING_TITLE);\r\n\t\t\tstatementP.setString(1, title);\r\n\t\t\trs = statementP.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tString path = rs.getString(\"filePath\");\r\n\t\t\t\tin = new BufferedReader(new FileReader(path));\r\n\t\t\t\tline = in.readLine();\r\n\t\t\t\twhile (line != null) {\r\n\t\t\t\t\tif (line.equals(\"\")) {\r\n\t\t\t\t\t\tparagraphs++;\r\n\t\t\t\t\t\tsentences = 1;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tString[] sentenceList = line.split(\"[!?.:]+\");\r\n\t\t\t\t\t\tfor (int i = 0; i < sentenceList.length; i++) {\r\n\t\t\t\t\t\t\tif (sentenceList[i].contains(word)) {\r\n\t\t\t\t\t\t\t\tint p = paragraphs;\r\n\t\t\t\t\t\t\t\tint s = sentences;\r\n\t\t\t\t\t\t\t\tint is =0;\r\n\t\t\t\t\t\t\t\tinsertTable.insertwordFunc(groupIns, word, title, p, s, is);\r\n\t\t\t\t\t\t\t\tfound = 1;\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\tsentences++;\r\n\t\t\t\t\tline = in.readLine();\r\n\t\t\t\t}\r\n\t\t\t\tparagraphs = 1;\r\n\t\t\t\tsentences = 1;\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private static List<String> getCandidates(String w, Set<String> words) {\n List<String> result = new LinkedList<>();\n for (int i = 0; i < w.length(); i++) {\n char[] chars = w.toCharArray();\n for (char ch = 'A'; ch <= 'Z'; ch++) {\n chars[i] = ch;\n String candidate = new String(chars);\n if (words.contains(candidate)) {\n result.add(candidate);\n }\n }\n }\n return result;\n }", "public static List<String> getWords(String text)\n\t{\n\t\tString lower = text.toLowerCase();\n\t\tString noPunct = lower.replaceAll(\"\\\\W\", \" \");\n\t\tString noNum = noPunct.replaceAll(\"[0-9]\", \" \");\n\t\tList<String> words = Arrays.asList(noNum.split(\"\\\\s+\"));\n\t\treturn words;\n\t}", "public String capitalCaseToSnakeCase(String text) {\n String textArray[] = text.split(\"(?=\\\\p{Upper})\");\n String capitalcaseToSnakeCase = \"\";\n for (String word: textArray) {\n if(!word.equals(\"\"))\n capitalcaseToSnakeCase += \"_\" + word.toLowerCase();\n }\n capitalcaseToSnakeCase = \"categorias\" + capitalcaseToSnakeCase;\n return capitalcaseToSnakeCase;\n }", "private boolean containsNonCommonWord(String[] text, int startIndex, int endIndex) {\n boolean result = false;\n for (int i = startIndex; i <= endIndex; i++) {\n if (!commonWords.contains(BaselineModel.normalizeToken(text[i])))\n result = true;\n }\n\n return result;\n }", "public static void classifyWithAllWords(String[] args) \r\n\t\t\tthrows IOException\r\n\t\t\t{\n\t\tFile dir_location = new File( args[0] ); \r\n\r\n\t\t// Listing of the directory (should contain 2 subdirectories: ham/ and spam/)\r\n\t\tFile[] dir_listing = new File[0];\r\n\r\n\t\t// Check if the cmd line arg is a directory and list it\r\n\t\tif ( dir_location.isDirectory() )\r\n\t\t{\r\n\t\t\tdir_listing = dir_location.listFiles();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println( \"- Error: cmd line arg not a directory.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t// Listings of the two sub-directories (ham/ and spam/)\r\n\t\tFile[] listing_ham = new File[0];\r\n\t\tFile[] listing_spam = new File[0];\r\n\r\n\t\t// Check that there are 2 sub-directories\r\n\t\tboolean hamFound = false; boolean spamFound = false;\r\n\t\tfor (int i=0; i<dir_listing.length; i++) {\r\n\t\t\tif (dir_listing[i].getName().equals(\"ham\")) { listing_ham = dir_listing[i].listFiles(); hamFound = true;}\r\n\t\t\telse if (dir_listing[i].getName().equals(\"spam\")) { listing_spam = dir_listing[i].listFiles(); spamFound = true;}\r\n\t\t}\r\n\t\tif (!hamFound || !spamFound) {\r\n\t\t\tSystem.out.println( \"- Error: specified directory does not contain ham and spam subdirectories.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t// Print out the number of messages in ham and in spam\r\n\t\t//System.out.println( \"\\t number of ham messages is: \" + listing_ham.length );\r\n\t\t//System.out.println( \"\\t number of spam messages is: \" + listing_spam.length );\r\n\r\n\t\t//******************************\r\n\t\t// Create a hash table for the vocabulary (word searching is very fast in a hash table)\r\n\t\tHashtable<String,Multiple_Counter> vocab = new Hashtable<String,Multiple_Counter>();\r\n\t\tMultiple_Counter old_cnt = new Multiple_Counter();\r\n\r\n\t\t//\t\tgw\r\n\t\tHashtable<String,WordStat> vocab_stat = new Hashtable<String,WordStat>();\r\n\r\n\t\tint nWordsHam = 0;\r\n\t\tint nWordsSpam = 0;\r\n\r\n\t\t// Read the e-mail messages\r\n\t\t// The ham mail\r\n\t\tfor ( int i = 0; i < listing_ham.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( listing_ham[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tif ( !word.equals(\"\") ) { // if string isn't empty\r\n\t\t\t\t\t\tnWordsHam++;\r\n\t\t\t\t\t\tif ( vocab.containsKey(word) )\t\t\t\t// check if word exists already in the vocabulary\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\told_cnt = vocab.get(word);\t// get the counter from the hashtable\r\n\t\t\t\t\t\t\told_cnt.counterHam ++;\t\t\t// and increment it\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, old_cnt);\r\n\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = vocab_stat.get(word);\r\n\t\t\t\t\t\t\tws.counterHam++;\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tis this necessary?\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tMultiple_Counter fresh_cnt = new Multiple_Counter();\r\n\t\t\t\t\t\t\tfresh_cnt.counterHam = 1;\r\n\t\t\t\t\t\t\tfresh_cnt.counterSpam = 0;\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, fresh_cnt);\t\t\t// put the new word with its new counter into the hashtable\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = new WordStat();\r\n\t\t\t\t\t\t\tws.counterHam = 1;\r\n\t\t\t\t\t\t\tws.counterSpam = 0;\r\n\t\t\t\t\t\t\tws.p_w_given_ham_log = 0.0 ; //init\r\n\t\t\t\t\t\t\tws.p_w_given_spam_log = 0.0; //init\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t}\r\n\t\t// The spam mail\r\n\t\tfor ( int i = 0; i < listing_spam.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( listing_spam[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tif ( ! word.equals(\"\") ) {\t\r\n\t\t\t\t\t\tnWordsSpam ++;\r\n\t\t\t\t\t\tif ( vocab.containsKey(word) )\t\t\t\t// check if word exists already in the vocabulary\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\told_cnt = vocab.get(word);\t// get the counter from the hashtable\r\n\t\t\t\t\t\t\told_cnt.counterSpam ++;\t\t\t// and increment it\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, old_cnt);\r\n\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = vocab_stat.get(word);\r\n\t\t\t\t\t\t\tws.counterSpam++;\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tis this necessary?\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tMultiple_Counter fresh_cnt = new Multiple_Counter();\r\n\t\t\t\t\t\t\tfresh_cnt.counterHam = 0;\r\n\t\t\t\t\t\t\tfresh_cnt.counterSpam = 1;\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, fresh_cnt);\t\t\t// put the new word with its new counter into the hashtable\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = new WordStat();\r\n\t\t\t\t\t\t\tws.counterHam = 0;\r\n\t\t\t\t\t\t\tws.counterSpam = 1;\r\n\t\t\t\t\t\t\tws.p_w_given_ham_log = 0.0 ; //init\r\n\t\t\t\t\t\t\tws.p_w_given_spam_log = 0.0; //init\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t}\r\n\r\n\t\t// Print out the hash table\r\n\t\t//\t\tfor (Enumeration<String> e = vocab.keys() ; e.hasMoreElements() ;)\r\n\t\t//\t\t{\t\r\n\t\t//\t\t\tString word;\r\n\t\t//\r\n\t\t//\t\t\tword = e.nextElement();\r\n\t\t//\t\t\told_cnt = vocab.get(word);\r\n\t\t//\r\n\t\t//\t\t\tSystem.out.println( word + \" | in ham: \" + old_cnt.counterHam + \r\n\t\t//\t\t\t\t\t\" in spam: \" + old_cnt.counterSpam);\r\n\t\t//\t\t}\r\n\r\n\t\t// Now all students must continue from here\r\n\t\t// Prior probabilities must be computed from the number of ham and spam messages\r\n\t\t// Conditional probabilities must be computed for every unique word\r\n\t\t// add-1 smoothing must be implemented\r\n\t\t// Probabilities must be stored as log probabilities (log likelihoods).\r\n\t\t// Bayes rule must be applied on new messages, followed by argmax classification (using log probabilities)\r\n\t\t// Errors must be computed on the test set and a confusion matrix must be generated\r\n\r\n\t\t// prior prob\r\n\t\tint nMessagesHam = listing_ham.length;\r\n\r\n\t\tint nMessagesSpam = listing_spam.length;\r\n\r\n\t\tint nMessagesTotal = nMessagesHam + nMessagesSpam;\r\n\r\n\t\tif(nMessagesHam == 0 || nMessagesSpam ==0)\r\n\t\t\tSystem.out.println(\"Zero ham or spam messages\");\r\n\r\n\t\tdouble p_ham_log = Math.log((nMessagesHam* 1.0)/(nMessagesTotal));\r\n\t\tdouble p_spam_log = Math.log((nMessagesSpam* 1.0)/(nMessagesTotal));\r\n\r\n\t\tIterator it = vocab_stat.entrySet().iterator();\r\n\t\tWordStat ws = null;\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap.Entry pairs = (Map.Entry) it.next();\r\n\t\t\tString is = (String) pairs.getKey();\r\n\t\t\tws = (WordStat) pairs.getValue();\r\n\r\n\t\t\tws.counterHam ++;\r\n\t\t\tws.counterSpam ++;\r\n\t\t\tnWordsHam ++;\r\n\t\t\tnWordsSpam ++;\r\n\t\t}\r\n\r\n\t\t//System.out.println(\"nWordsHam = \" +nWordsHam);\r\n\t\t//System.out.println(\"nWordsSpam = \" + nWordsSpam);\r\n\r\n\t\t//\t\tgw:\r\n\t\tit = vocab_stat.entrySet().iterator();\r\n\t\tws = null; \r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap.Entry pairs = (Map.Entry) it.next();\r\n\t\t\tString is = (String) pairs.getKey();\r\n\t\t\tws = (WordStat) pairs.getValue();\r\n\r\n\t\t\tws.p_w_given_ham_log = Math.log(ws.counterHam *1.0 / nWordsHam);\r\n\t\t\tws.p_w_given_spam_log = Math.log(ws.counterSpam *1.0 / nWordsSpam);\r\n\t\t\t//vocab_stat.put(is,ws);\r\n\t\t}\r\n\t\t//\t\tTODO: further confirm arg index\r\n\t\t//test sets\r\n\t\tFile test_dir_location = new File( args[1] ); \r\n\r\n\t\t//\t\tTODO: verify below works\r\n\t\t// Listing of the directory (should contain 2 subdirectories: ham/ and spam/)\r\n\t\tFile[] test_dir_listing = new File[0];\r\n\r\n\r\n\t\t// Check if the cmd line arg is a directory and list it\r\n\t\tif ( test_dir_location.isDirectory() )\r\n\t\t{\r\n\t\t\ttest_dir_listing = test_dir_location.listFiles();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println( \"- Error: cmd line arg not a directory.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t//\t\tTODO: verify File[0]\r\n\t\t// Listings of the two sub-directories (ham/ and spam/)\r\n\t\tFile[] test_listing_ham = new File[0];\r\n\t\tFile[] test_listing_spam = new File[0];\r\n\r\n\t\t// Check that there are 2 sub-directories\r\n\t\tboolean test_hamFound = false; boolean test_spamFound = false;\r\n\t\tfor (int i=0; i<test_dir_listing.length; i++) {\r\n\t\t\tif (test_dir_listing[i].getName().equals(\"ham\")) { test_listing_ham = test_dir_listing[i].listFiles(); test_hamFound = true;}\r\n\t\t\telse if (test_dir_listing[i].getName().equals(\"spam\")) { test_listing_spam = test_dir_listing[i].listFiles(); test_spamFound = true;}\r\n\t\t}\r\n\t\tif (!test_hamFound || !test_spamFound) {\r\n\t\t\tSystem.out.println( \"- Error: specified test directory does not contain ham and spam subdirectories.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t//\t\t// Print out the number of messages in ham and in spam\r\n\t\t//\t\tSystem.out.println( \"\\t number of test ham messages is: \" + test_listing_ham.length );\r\n\t\t//\t\tSystem.out.println( \"\\t number of test spam messages is: \" + test_listing_spam.length );\r\n\r\n\r\n\t\t//\t\tmetrics\r\n\t\tint true_positives = 0; //spam classified as spam\r\n\t\tint true_negatives = 0; //ham classified as ham\r\n\t\tint false_positives = 0; //ham ... as spam\r\n\t\tint false_negatives = 0; //spam... as ham\r\n\r\n\t\t// Test starts\r\n\t\t// The ham mail\r\n\t\tfor ( int i = 0; i < test_listing_ham.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( test_listing_ham[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\t//\t\t\tgw:\r\n\t\t\tdouble p_msg_ham_log = 0.0;\r\n\t\t\tdouble p_msg_spam_log = 0.0;\r\n\r\n\t\t\tp_msg_ham_log += p_ham_log;\r\n\t\t\tp_msg_spam_log += p_spam_log;\r\n\t\t\t//\t\t\tgw:\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tif ( !word.equals(\"\") ) { // if string isn't empty\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\r\n\t\t\t\t\t\tif(vocab_stat.containsKey(word)){\r\n\t\t\t\t\t\t\tWordStat iws = vocab_stat.get(word); \r\n\t\t\t\t\t\t\tdouble ip_w_given_ham_log = iws.p_w_given_ham_log;\r\n\t\t\t\t\t\t\tdouble ip_w_given_spam_log = iws.p_w_given_spam_log;\r\n\r\n\t\t\t\t\t\t\tp_msg_ham_log += ip_w_given_ham_log ;\r\n\t\t\t\t\t\t\tp_msg_spam_log += ip_w_given_spam_log ;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\r\n\t\t\tif (p_msg_spam_log > p_msg_ham_log) false_positives ++;\r\n\t\t\telse true_negatives ++;\r\n\t\t}\r\n\r\n\r\n\t\t// The spam mail\r\n\t\tfor ( int i = 0; i < test_listing_spam.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( test_listing_spam[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\t//\t\t\tgw:\r\n\t\t\tdouble p_msg_ham_log = 0.0;\r\n\t\t\tdouble p_msg_spam_log = 0.0;\r\n\r\n\t\t\tp_msg_ham_log += p_ham_log;\r\n\t\t\tp_msg_spam_log += p_spam_log;\r\n\t\t\t//\t\t\tgw:\t\t\t\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tif ( ! word.equals(\"\") ) {\t\r\n\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\r\n\t\t\t\t\t\tif(vocab_stat.containsKey(word)){\r\n\t\t\t\t\t\t\tWordStat iws = vocab_stat.get(word); \r\n\t\t\t\t\t\t\tdouble ip_w_given_ham_log = iws.p_w_given_ham_log;\r\n\t\t\t\t\t\t\tdouble ip_w_given_spam_log = iws.p_w_given_spam_log;\r\n\r\n\t\t\t\t\t\t\tp_msg_ham_log += ip_w_given_ham_log ;\r\n\t\t\t\t\t\t\tp_msg_spam_log += ip_w_given_spam_log ;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t\tif (p_msg_spam_log > p_msg_ham_log) true_positives ++;\r\n\t\t\telse false_negatives ++;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Result 1:\");\r\n\t\tSystem.out.println(\"All_Words\\t\\ttrue spam\\ttrue ham\");\r\n\t\tSystem.out.println(\"Classified spam:\\t\"+true_positives+\"\\t\\t\"+false_positives);\r\n\t\tSystem.out.println(\"Classified ham: \\t\"+false_negatives+\"\\t\\t\"+ true_negatives);\r\n\t\tSystem.out.println(\"\");\r\n\r\n\r\n\t\t\t}", "@Override\n public void run() {\n long beginTime = System.currentTimeMillis();\n String[] words = text.split(\" \");\n long endTime = System.currentTimeMillis();\n System.out.printf(\"Regex time: %d;\\n\", endTime - beginTime);\n int count = 0;\n beginTime = System.currentTimeMillis();\n for (int i = 0; i < text.length(); i++) {\n char c = text.charAt(i);\n if (c == ' ' || c == '.' || c == '!' || c == '?') {\n count++;\n }\n }\n endTime = System.currentTimeMillis();\n System.out.printf(\"For time: %d;\\n\", endTime - beginTime);\n System.out.printf(\"Words: %d;\\n\", words.length);\n System.out.printf(\"Count word: %d;\\n\", count);\n }", "static Set<NLMeaning> extractMeanings(NLText nlText) {\n\t\tSet<NLMeaning> meanings = new HashSet();\n\t\t\n\t\tList<NLSentence> sentences = nlText.getSentences();\n\t\tNLSentence firstSentence = sentences.iterator().next();\n\t\tList<NLToken> tokens = firstSentence.getTokens();\n\t\tList<NLMultiWord> multiWords = firstSentence.getMultiWords();\n\t\tList<NLNamedEntity> namedEntities = firstSentence.getNamedEntities();\n\t\t\n\t\t// Add meanings of all tokens that are not part of multiwords or NEs\n\t\tIterator<NLToken> itToken = tokens.iterator();\n\t\twhile (itToken.hasNext()) {\n\t\t\tSet<NLMeaning> tokenMeanings = getTokenMeanings(itToken.next());\n\t\t\tif (tokenMeanings != null) {\n\t\t\t\tmeanings.addAll(tokenMeanings);\t\t\t\n\t\t\t}\n//\t\t\tNLToken token = itToken.next();\n//\t\t\tboolean hasMultiWords = token.getMultiWords() != null && !token.getMultiWords().isEmpty();\n//\t\t\tboolean hasNamedEntities = token.getNamedEntities() != null && !token.getNamedEntities().isEmpty();\n//\t\t\tif (!hasMultiWords && !hasNamedEntities) {\n//\t\t\t\tif (token.getMeanings() == null || token.getMeanings().isEmpty()) {\n//\t\t\t\t\t// This is a hack to handle a bug where the set of meanings\n//\t\t\t\t\t// is empty but there is a selected meaning.\n//\t\t\t\t\t\n//\t\t\t\t\tNLMeaning selectedMeaning = token.getSelectedMeaning();\n//\t\t\t\t\tif (selectedMeaning != null) {\n//\t\t\t\t\t\tmeanings.add(selectedMeaning);\n//\t\t\t\t\t}\n//\t\t\t\t} else {\n//\t\t\t\t\tmeanings.addAll(token.getMeanings());\n//\t\t\t\t}\n//\t\t\t}\n\t\t}\n\t\t\n\t\t// Add meanings of multiwords and NEs\n\t\tIterator<NLMultiWord> itMultiWord = multiWords.iterator();\n\t\twhile (itMultiWord.hasNext()) {\n\t\t\tNLMultiWord multiWord = itMultiWord.next();\n\t\t\tmeanings.addAll(multiWord.getMeanings());\n\t\t}\n\t\tIterator<NLNamedEntity> itNamedEntity = namedEntities.iterator();\n\t\twhile (itNamedEntity.hasNext()) {\n\t\t\tNLNamedEntity namedEntity = itNamedEntity.next();\n\t\t\tmeanings.addAll(namedEntity.getMeanings());\n\t\t}\n\t\t\n\t\treturn meanings;\n\t}", "private boolean lookupSentiments(Sentence sent) {\n if (selectCovered(NGram.class, sent).size() > 0)\n return true;\n return false;\n }", "private static Stream<String> createBadWordsDetectingStream(String text, \n List<String> badWords) {\n\t \treturn Arrays.stream(text.split(\" \")).filter(el -> !badWords.contains(el)).distinct().sorted().collect(Collectors.toList()).stream();\n\t }", "@Test\r\n public void testToBeOrNotToBe() throws IOException {\r\n System.out.println(\"testing 'To be or not to be' variations\");\r\n String[] sentences = new String[]{\r\n \"to be or not to be\", // correct sentence\r\n \"to ben or not to be\",\r\n \"ro be ot not to be\",\r\n \"to be or nod to bee\"};\r\n\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n System.out.println(String.format(\"Input \\\"%0$s\\\" returned \\\"%1$s\\\"\", s, output));\r\n collector.checkThat(\"input sentence: \" + s + \". \", \"to be or not to be\", IsEqual.equalTo(output));\r\n }\r\n }", "@Test\r\n public void testSentencesFromFile() throws IOException {\r\n System.out.print(\"Testing all sentences from file\");\r\n int countCorrect = 0;\r\n int countTestedSentences = 0;\r\n\r\n for (ArrayList<String> sentences : testSentences) {\r\n String correctSentence = sentences.get(0);\r\n System.out.println(\"testing '\" + correctSentence + \"' variations\");\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n int countSub = 0;\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n countSub += correctSentence.equals(output) ? 1 : 0;\r\n System.out.println(String.format(\"Input \\\"%1$s\\\" returned \\\"%2$s\\\", equal: %3$b\", s, output, correctSentence.equals(output)));\r\n collector.checkThat(\"input sentence: \" + s + \". \", output, IsEqual.equalTo(correctSentence));\r\n countTestedSentences++;\r\n }\r\n System.out.println(String.format(\"Correct answers for '%3$s': (%1$2d/%2$2d)\", countSub, sentences.size(), correctSentence));\r\n System.out.println();\r\n countCorrect += countSub;\r\n }\r\n\r\n System.out.println(String.format(\"Correct answers in total: (%1$2d/%2$2d)\", countCorrect, countTestedSentences));\r\n System.out.println();\r\n }", "public static List<List<String>> getLinesAsSentences(String text) {\n\t\tif (sb == null) {\n\t\t\tsb = new StringBuilder();\n\t\t}\n\t\tchar[] chars;\n\t\tchars = text.toCharArray();\n\t\tList<List<String>> lines = new ArrayList<List<String>>();\n\t\tList<String> words = new ArrayList<String>();\n\t\twords.add(\"<s>\");\n\t\tfor (int i=0; i<chars.length; i++) {\n\t\t\tif (chars[i] == '\\n' || chars[i] == '\\r') {\n\t\t\t\tif (sb.length() > 0) {\n//\t\t\t\t\tSystem.out.println(\"Adding word: \"+sb.toString());\n\t\t\t\t\twords.add(sb.toString());\n\t\t\t\t}\n\t\t\t\tif (words.size() > 1) {\n//\t\t\t\t\tSystem.out.println(\"Adding line: \"+words);\n\t\t\t\t\twords.add(\"</s>\");\n\t\t\t\t\tlines.add(words);\n\t\t\t\t}\n\t\t\t\twords = new ArrayList<String>();\n\t\t\t\twords.add(\"<s>\");\n\t\t\t\tsb.setLength(0);\n\t\t\t} else if (chars[i] == ' ') {\n\t\t\t\tif (sb.length() > 0) {\n\t\t\t\t\twords.add(sb.toString());\n\t\t\t\t}\n\t\t\t\tsb.setLength(0);\n\t\t\t} else {\n\t\t\t\tsb.append(chars[i]);\n\t\t\t}\n\t\t}\n\t\tif (sb.length() > 0) {\n\t\t\tif (sb.length() > 0) {\n\t\t\t\twords.add(sb.toString());\n\t\t\t}\n\t\t\tsb.setLength(0);\n\t\t}\n\t\tif (words.size() > 1) {\n//\t\t\tSystem.out.println(\"Adding line: \"+words);\n\t\t\twords.add(\"</s>\");\n\t\t\tlines.add(words);\n\t\t}\n\t\tsb.setLength(0);\n\t\treturn lines;\n\t}", "List<Integer> wordFinder(String text, String word) {\n\n List<Integer> indexes = new ArrayList<Integer>();\n String wordProper = \" \" + word + \" \";\n\n int index = 0;\n\n while (index != -1) {\n\n index = text.indexOf(wordProper, index);\n\n if (index != -1) {\n indexes.add(index);\n index++;\n }\n }\n\n return indexes;\n }", "@Test\n void cleanText02() {\n String responseCasing = \"CAPS\";\n String[] responseCasingClean = {\"caps\"};\n List<String> cleaned = preprocessor.cleanText(responseCasing);\n assertArrayEquals(responseCasingClean, cleaned.toArray());\n }", "@Override\n\tprotected Map<Object, Object> rawTextParse(CharSequence text) {\n\n\t\tStanfordCoreNLP pipeline = null;\n\t\ttry {\n\t\t\tpipeline = pipelines.take();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tAnnotation document = new Annotation(text.toString());\n\t\tpipeline.annotate(document);\n\t\tMap<Object, Object> sentencesMap = new LinkedHashMap<Object, Object>();//maintain sentence order\n\t\tint id = 0;\n\t\tList<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n\n\t\tfor (CoreMap sentence : sentences) {\n\t\t\tStringBuilder processedText = new StringBuilder();\n\t\t\tfor (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\n\t\t\t\tString word = token.get(CoreAnnotations.TextAnnotation.class);\n\t\t\t\tString lemma = token.get(CoreAnnotations.LemmaAnnotation.class);\n\t\t\t\tString pos = token.get(CoreAnnotations.PartOfSpeechAnnotation.class);\n\t\t\t\t//todo this should really happen after parsing is done, because using lemmas might confuse the parser\n\t\t\t\tif (config().isUseLowercaseEntries()) {\n\t\t\t\t\tword = word.toLowerCase();\n\t\t\t\t\tlemma = lemma.toLowerCase();\n\t\t\t\t}\n\t\t\t\tif (config().isUseLemma()) {\n\t\t\t\t\tword = lemma;\n\t\t\t\t}\n\t\t\t\tprocessedText.append(word).append(POS_DELIMITER).append(lemma).append(POS_DELIMITER).append(pos).append(TOKEN_DELIM);\n //inserts a TOKEN_DELIM at the end too\n\t\t\t}\n\t\t\tsentencesMap.put(id, processedText.toString().trim());//remove the single trailing space\n\t\t\tid++;\n\t\t}\n\t\ttry {\n\t\t\tpipelines.put(pipeline);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn sentencesMap;\n\t}", "@Override\n\tpublic void process(JCas aJCas) throws AnalysisEngineProcessException {\n\t\tString text = aJCas.getDocumentText();\n\n\t\t// create an empty Annotation just with the given text\n\t\tAnnotation document = new Annotation(text);\n//\t\tAnnotation document = new Annotation(\"Barack Obama was born in Hawaii. He is the president. Obama was elected in 2008.\");\n\n\t\t// run all Annotators on this text\n\t\tpipeline.annotate(document); \n\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class);\n\t\t HelperDataStructures hds = new HelperDataStructures();\n\n\t\t\n\t\t//SPnew language-specific settings:\n\t\t//SPnew subject tags of the parser\n\t\t HashSet<String> subjTag = new HashSet<String>(); \n\t\t HashSet<String> dirObjTag = new HashSet<String>(); \n\t\t //subordinate conjunction tags\n\t\t HashSet<String> compTag = new HashSet<String>(); \n\t\t //pronoun tags\n\t\t HashSet<String> pronTag = new HashSet<String>(); \n\t\t \n\t\t HashSet<String> passSubjTag = new HashSet<String>();\n\t\t HashSet<String> apposTag = new HashSet<String>(); \n\t\t HashSet<String> verbComplementTag = new HashSet<String>(); \n\t\t HashSet<String> infVerbTag = new HashSet<String>(); \n\t\t HashSet<String> relclauseTag = new HashSet<String>(); \n\t\t HashSet<String> aclauseTag = new HashSet<String>(); \n\t\t \n\t\t HashSet<String> compLemma = new HashSet<String>(); \n\t\t HashSet<String> coordLemma = new HashSet<String>(); \n\t\t HashSet<String> directQuoteIntro = new HashSet<String>(); \n\t\t HashSet<String> indirectQuoteIntroChunkValue = new HashSet<String>();\n\t\t \n//\t\t HashSet<String> finiteVerbTag = new HashSet<String>();\n\t\t \n\n\t\t //OPEN ISSUES PROBLEMS:\n\t\t //the subject - verb relation finding does not account for several specific cases: \n\t\t //opinion verbs with passive subjects as opinion holder are not accounted for,\n\t\t //what is needed is a marker in the lex files like PASSSUBJ\n\t\t //ex: Obama is worried/Merkel is concerned\n\t\t //Many of the poorer countries are concerned that the reduction in structural funds and farm subsidies may be detrimental in their attempts to fulfill the Copenhagen Criteria.\n\t\t //Some of the more well off EU states are also worried about the possible effects a sudden influx of cheap labor may have on their economies. Others are afraid that regional aid may be diverted away from those who currently benefit to the new, poorer countries that join in 2004 and beyond. \n\t\t// Does not account for infinitival constructions, here again a marker is needed to specify\n\t\t //subject versus object equi\n\t\t\t//Christian Noyer was reported to have said that it is ok.\n\t\t\t//Reuters has reported Christian Noyer to have said that it is ok.\n\t\t //Obama is likely to have said.. \n\t\t //Several opinion holder- opinion verb pairs in one sentence are not accounted for, right now the first pair is taken.\n\t\t //what is needed is to run through all dependencies. For inderect quotes the xcomp value of the embedded verb points to the \n\t\t //opinion verb. For direct quotes the offsets closest to thwe quote are relevant.\n\t\t //a specific treatment of inverted subjects is necessary then. Right now the\n\t\t //strategy relies on the fact that after the first subj/dirobj - verb pair the\n\t\t //search is interrupted. Thus, if the direct object precedes the subject, it is taken as subject.\n\t\t // this is the case in incorrectly analysed inverted subjeects as: said Zwickel on Monday\n\t\t //coordination of subject not accounted for:employers and many economists\n\t\t //several subject-opinion verbs:\n\t\t //Zwickel has called the hours discrepancy between east and west a \"fairness gap,\" but employers and many economists point out that many eastern operations have a much lower productivity than their western counterparts.\n\t\t if (language.equals(\"en\")){\n \t subjTag.add(\"nsubj\");\n \t subjTag.add(\"xsubj\");\n \t subjTag.add(\"nmod:agent\");\n \t \n \t dirObjTag.add(\"dobj\"); //for inverted subject: \" \" said IG metall boss Klaus Zwickel on Monday morning.\n \t \t\t\t\t\t\t//works only with break DEPENDENCYSEARCH, otherwise \"Monday\" is nsubj \n \t \t\t\t\t\t\t//for infinitival subject of object equi: Reuters reports Obama to have said\n \tpassSubjTag.add(\"nsubjpass\");\n \tapposTag.add(\"appos\");\n \trelclauseTag.add(\"acl:relcl\");\n \taclauseTag.add(\"acl\");\n \t compTag.add(\"mark\");\n \t pronTag.add(\"prp\");\n \thds.pronTag.add(\"prp\");\n \tcompLemma.add(\"that\");\n \tcoordLemma.add(\"and\");\n \tverbComplementTag.add(\"ccomp\");\n \tverbComplementTag.add(\"parataxis\");\n\n \tinfVerbTag.add(\"xcomp\"); //Reuters reported Merkel to have said\n \tinfVerbTag.add(\"advcl\");\n \tdirectQuoteIntro.add(\":\");\n \tindirectQuoteIntroChunkValue.add(\"SBAR\");\n \thds.objectEqui.add(\"report\");\n \thds.objectEqui.add(\"quote\");\n \thds.potentialIndirectQuoteTrigger.add(\"say\");\n// \thds.objectEqui.add(\"confirm\");\n// \thds.subjectEqui.add(\"promise\");\n// \thds.subjectEqui.add(\"quote\");\n// \thds.subjectEqui.add(\"confirm\");\n }\n\t\t \n\t\t boolean containsSubordinateConjunction = false;\n\t\t\n\t\t \n\t\tfor (CoreMap sentence : sentences) {\n//\t\t\tSystem.out.println(\"PREPROCESSING..\");\n\t\t\t\tSentenceAnnotation sentenceAnn = new SentenceAnnotation(aJCas);\n\t\t\t\t\n\t\t\t\tint beginSentence = sentence.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endSentence = sentence.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(sentence.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tsentenceAnn.setBegin(beginSentence);\n\t\t\t\tsentenceAnn.setEnd(endSentence);\n\t\t\t\tsentenceAnn.addToIndexes();\n\t\t\t\t\n\t\t\t\t//SP Map offsets to NER\n\t\t\t\tList<NamedEntity> ners = JCasUtil.selectCovered(aJCas, //SPnew tut\n\t\t\t\t\t\tNamedEntity.class, sentenceAnn);\n\t\t\t\tfor (NamedEntity ne : ners){\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.jcasType.toString());\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.getCoveredText().toString());\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.jcasType.casTypeCode);\n\t\t\t\t\t//Person is 71, Location is 213, Organization is 68 geht anders besser siehe unten\n\t\t\t\t\tint nerStart = ne\n\t\t\t\t\t\t\t.getBegin();\n\t\t\t\t\tint nerEnd = ne.getEnd();\n//\t\t\t\t\tSystem.out.println(\"NER: \" + ne.getCoveredText() + \" \" + nerStart + \"-\" + nerEnd ); \n\t\t\t\t\tString offsetNer = \"\" + nerStart + \"-\" + nerEnd;\n\t\t\t\t\thds.offsetToNer.put(offsetNer, ne.getCoveredText());\n//\t\t\t\t\tNer.add(offsetNer);\n\t\t\t\t\thds.Ner.add(offsetNer);\n//\t\t\t\t\tSystem.out.println(\"NER: TYPE \" +ne.getValue().toString());\n\t\t\t\t\tif (ne.getValue().equals(\"PERSON\")){\n\t\t\t\t\t\thds.NerPerson.add(offsetNer);\n\t\t\t\t\t}\n\t\t\t\t\telse if (ne.getValue().equals(\"ORGANIZATION\")){\n\t\t\t\t\t\thds.NerOrganization.add(offsetNer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//DBpediaLink info: map offsets to links\n\t\t\t\tList<DBpediaResource> dbpeds = JCasUtil.selectCovered(aJCas, //SPnew tut\n\t\t\t\t\t\tDBpediaResource.class, sentenceAnn);\n\t\t\t\tfor (DBpediaResource dbped : dbpeds){\n//\t\t\t\t\t\n//\t\t\t\t\tint dbStart = dbped\n//\t\t\t\t\t\t\t.getBegin();\n//\t\t\t\t\tint dbEnd = dbped.getEnd();\n\t\t\t\t\t// not found if dbpedia offsets are wrongly outside than sentences\n//\t\t\t\t\tSystem.out.println(\"DBPED SENT: \" + sentenceAnn.getBegin()+ \"-\" + sentenceAnn.getEnd() ); \n//\t\t\t\t\tString offsetDB = \"\" + dbStart + \"-\" + dbEnd;\n//\t\t\t\t\thds.labelToDBpediaLink.put(dbped.getLabel(), dbped.getUri());\n//\t\t\t\t\tSystem.out.println(\"NOW DBPED: \" + dbped.getLabel() + \"URI: \" + dbped.getUri() ); \n\t\t\t\t\thds.dbpediaSurfaceFormToDBpediaLink.put(dbped.getCoveredText(), dbped.getUri());\n//\t\t\t\t\tSystem.out.println(\"NOW DBPED: \" + dbped.getCoveredText() + \"URI: \" + dbped.getUri() ); \n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//SP Map offsets to lemma of opinion verb/noun; parser does not provide lemma\n\t\t\t\t for (CoreLabel token: sentence.get(TokensAnnotation.class)) {\n//\t\t\t\t\t System.out.println(\"LEMMA \" + token.lemma().toString());\n\t\t\t\t\t int beginTok = token.beginPosition();\n\t\t\t\t\t int endTok = token.endPosition();\n\t\t\t\t\t String offsets = \"\" + beginTok + \"-\" + endTok;\n\t\t\t\t\t hds.offsetToLemma.put(offsets, token.lemma().toString());\n\t\t\t\t\t \n\t\t\t\t\t \t if (opinion_verbs.contains(token.lemma().toString())){\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionVerb.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t hds.OpinionExpression.add(offsets);\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionExpression.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t \n//\t\t\t \t System.out.println(\"offsetToLemmaOfOpinionVerb \" + token.lemma().toString());\n\t\t\t\t\t \t }\n\t\t\t\t\t \t if (passive_opinion_verbs.contains(token.lemma().toString())){\n\t\t\t\t\t\t\t hds.offsetToLemmaOfPassiveOpinionVerb.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t hds.OpinionExpression.add(offsets);\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionExpression.put(offsets, token.lemma().toString());\n//\t\t\t \t System.out.println(\"offsetToLemmaOfPassiveOpinionVerb \" + token.lemma().toString());\n\t\t\t\t\t \t }\n\n\t\t\t\t } \n\n\t\t\t//SPnew parser\n\t\t\tTree tree = sentence.get(TreeAnnotation.class);\n\t\t\tTreebankLanguagePack tlp = new PennTreebankLanguagePack();\n\t\t\tGrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory();\n\t\t\tGrammaticalStructure gs = gsf.newGrammaticalStructure(tree);\n\t\t\tCollection<TypedDependency> td = gs.typedDependenciesCollapsed();\n\n\t\t\t \n//\t\t\tSystem.out.println(\"TYPEDdep\" + td);\n\t\t\t\n\t\t\tObject[] list = td.toArray();\n//\t\t\tSystem.out.println(list.length);\n\t\t\tTypedDependency typedDependency;\nDEPENDENCYSEARCH: for (Object object : list) {\n\t\t\ttypedDependency = (TypedDependency) object;\n//\t\t\tSystem.out.println(\"DEP \" + typedDependency.dep().toString()+ \n//\t\t\t\t\t\" GOV \" + typedDependency.gov().toString()+ \n//\t\t\t\" :: \"+ \" RELN \"+typedDependency.reln().toString());\n\t\t\tString pos = null;\n String[] elements;\n String verbCand = null;\n int beginVerbCand = -5;\n\t\t\tint endVerbCand = -5;\n\t\t\tString offsetVerbCand = null;\n\n if (compTag.contains(typedDependency.reln().toString())) {\n \tcontainsSubordinateConjunction = true;\n// \tSystem.out.println(\"subordConj \" + typedDependency.dep().toString().toLowerCase());\n }\n \n else if (subjTag.contains(typedDependency.reln().toString())){\n \thds.predicateToSubjectChainHead.clear();\n \thds.subjectToPredicateChainHead.clear();\n \t\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n//\t\t\t\tSystem.out.println(\"VERBCand \" + verbCand + offsetVerbCand);\n//\t\t\t\tfor (HashMap.Entry<String, String> entry : hds.offsetToLemma.entrySet()) {\n//\t\t\t\t String key = entry.getKey();\n//\t\t\t\t Object value = entry.getValue();\n//\t\t\t\t System.out.println(\"OFFSET \" + key + \" LEMMA \" + value);\n//\t\t\t\t // FOR LOOP\n//\t\t\t\t}\n//\t\t\t\tif (hds.offsetToLemma.containsKey(offsetVerbCand)){\n//\t\t\t\t\tString verbCandLemma = hds.offsetToLemma.get(offsetVerbCand);\n//\t\t\t\t\tif (hds.objectEqui.contains(verbCandLemma) || hds.subjectEqui.contains(verbCandLemma)){\n//\t\t\t\t\t\tSystem.out.println(\"SUBJCHAIN BEGIN verbCand \" + verbCand);\n//\t\t\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t\tSystem.out.println(\"SUBJCHAINHEAD1\");\n\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\tSystem.out.println(\"verbCand \" + verbCand);\n\t\t\t\t//hack for subj after obj said Zwickel (obj) on Monday morning (subj)\n\t\t\t\tif (language.equals(\"en\") \n\t\t\t\t\t\t&& hds.predicateToObject.containsKey(offsetVerbCand)\n\t\t\t\t\t\t){\n// \t\tSystem.out.println(\"CONTINUE DEP\");\n \t\tcontinue DEPENDENCYSEARCH;\n \t}\n\t\t\t\telse {\n\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n\t\t\t\t}\n }\n //Merkel is concerned\n else if (passSubjTag.contains(typedDependency.reln().toString())){\n \t//Merkel was reported\n \t//Merkel was concerned\n \t//Merkel was quoted\n \thds.predicateToSubjectChainHead.clear();\n \thds.subjectToPredicateChainHead.clear();\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n//\t\t\t\tSystem.out.println(\"VERBCand \" + verbCand + offsetVerbCand);\n//\t\t\t\tif (hds.offsetToLemma.containsKey(offsetVerbCand)){\n//\t\t\t\t\tString verbCandLemma = hds.offsetToLemma.get(offsetVerbCand);\n////\t\t\t\t\tSystem.out.println(\"LEMMA verbCand \" + verbCandLemma);\n//\t\t\t\t\tif (hds.objectEqui.contains(verbCandLemma) || hds.subjectEqui.contains(verbCandLemma)){\n//\t\t\t\t\t\tSystem.out.println(\"SUBJCHAIN BEGIN verbCand \" + verbCand);\n//\t\t\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\t\t}\n//\t\t\t\t}\n \t\n \tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n// \tSystem.out.println(\"SUBJCHAINHEAD2\");\n \t//Merkel is concerned\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfPassiveOpinionVerb,\n \t\t\thds);\n }\n //Meanwhile, the ECB's vice-president, Christian Noyer, was reported at the start of the week to have said that the bank's future interest-rate moves\n// would depend on the behavior of wage negotiators as well as the pace of the economic recovery.\n\n else if (apposTag.contains(typedDependency.reln().toString())){\n \t\n \tString subjCand = typedDependency.gov().toString().toLowerCase();\n \tint beginSubjCand = typedDependency.gov().beginPosition();\n \tint endSubjCand = typedDependency.gov().endPosition();\n \tString offsetSubjCand = \"\" + beginSubjCand + \"-\" + endSubjCand;\n \tString appo = typedDependency.dep().toString().toLowerCase();\n\t\t\t\tint beginAppo = typedDependency.dep().beginPosition();\n\t\t\t\tint endAppo = typedDependency.dep().endPosition();\n\t\t\t\tString offsetAppo = \"\" + beginAppo + \"-\" + endAppo;\n\t\t\t\t\n// \tSystem.out.println(\"APPOSITION1 \" + subjCand + \"::\"+ appo + \":\" + offsetSubjCand + \" \" + offsetAppo);\n \thds.subjectToApposition.put(offsetSubjCand, offsetAppo);\n }\n else if (relclauseTag.contains(typedDependency.reln().toString())){\n \tString subjCand = typedDependency.gov().toString().toLowerCase();\n \tint beginSubjCand = typedDependency.gov().beginPosition();\n \tint endSubjCand = typedDependency.gov().endPosition();\n \tString offsetSubjCand = \"\" + beginSubjCand + \"-\" + endSubjCand;\n \tverbCand = typedDependency.dep().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.dep().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.dep().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n\t\t\t\tString subjCandPos = null;\n\t\t\t\tif (hds.predicateToSubject.containsKey(offsetVerbCand)){\n\t\t\t\t\t\n\t\t\t\t\tif (subjCand.matches(\".+?/.+?\")) { \n\t\t\t\t\t\telements = subjCand.split(\"/\");\n\t\t\t\t\t\tsubjCand = elements[0];\n\t\t\t\t\t\tsubjCandPos = elements[1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tString del = hds.predicateToSubject.get(offsetVerbCand);\n\t\t\t\t\thds.predicateToSubject.remove(offsetVerbCand);\n\t\t\t\t\thds.subjectToPredicate.remove(del);\n\t\t\t\t\thds.normalPredicateToSubject.remove(offsetVerbCand);\n\t\t\t\t\thds.subjectToNormalPredicate.remove(del);\n//\t\t\t\t\tSystem.out.println(\"REMOVE RELPRO \" + verbCand + \"/\" + hds.offsetToLemma.get(del));\n\t\t\t\t\thds.predicateToSubject.put(offsetVerbCand, offsetSubjCand);\n\t\t\t\t\thds.subjectToPredicate.put( offsetSubjCand, offsetVerbCand);\n\t\t\t\t\thds.normalPredicateToSubject.put(offsetVerbCand, offsetSubjCand);\n\t\t\t\t\thds.subjectToNormalPredicate.put( offsetSubjCand, offsetVerbCand);\n//\t\t\t\t\tSystem.out.println(\"RELCLAUSE \" + subjCand + \"::\" + \":\" + verbCand);\n\t\t\t\t\thds.offsetToSubjectHead.put(offsetSubjCand,subjCand);\n\t\t\t\t\thds.SubjectHead.add(offsetSubjCand);\n\t\t\t\t\t\n\t\t\t\t\tif (subjCandPos != null && hds.pronTag.contains(subjCandPos)){\n\t\t\t\t\t\thds.PronominalSubject.add(offsetSubjCand);\n\t\t\t\t\t}\n\t\t\t\t}\n \t\n \t\n }\n \n else if (dirObjTag.contains(typedDependency.reln().toString())\n \t\t){\n \tstoreRelations(typedDependency, hds.predicateToObject, hds.ObjectToPredicate, hds);\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n\t\t\t\t\n\t\t\t\tString objCand = typedDependency.dep().toString().toLowerCase();\n \tint beginObjCand = typedDependency.dep().beginPosition();\n \tint endObjCand = typedDependency.dep().endPosition();\n \tString offsetObjCand = \"\" + beginObjCand + \"-\" + endObjCand;\n \tString objCandPos;\n \tif (objCand.matches(\".+?/.+?\")) { \n\t\t\t\t\telements = objCand.split(\"/\");\n\t\t\t\t\tobjCand = elements[0];\n\t\t\t\t\tobjCandPos = elements[1];\n//\t\t\t\t\tSystem.out.println(\"PRON OBJ \" + objCandPos);\n\t\t\t\t\tif (pronTag.contains(objCandPos)){\n\t\t\t\t\thds.PronominalSubject.add(offsetObjCand);\n\t\t\t\t\t}\n\t\t\t\t\t}\n// \tSystem.out.println(\"DIROBJ STORE ONLY\");\n \t//told Obama\n \t//said IG metall boss Klaus Zwickel\n \t// problem: pointing DO\n \t//explains David Gems, pointing out the genetically manipulated species.\n \t if (language.equals(\"en\") \n \t\t\t\t\t\t&& !hds.normalPredicateToSubject.containsKey(offsetVerbCand)\n \t\t\t\t\t\t){\n// \t\t System.out.println(\"INVERSE SUBJ HACK ENGLISH PREDTOOBJ\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t }\n }\n //was reported to have said\n else if (infVerbTag.contains(typedDependency.reln().toString())){\n \tstoreRelations(typedDependency, hds.mainToInfinitiveVerb, hds.infinitiveToMainVerb, hds);\n// \tSystem.out.println(\"MAIN-INF\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t\n }\n else if (aclauseTag.contains(typedDependency.reln().toString())){\n \tstoreRelations(typedDependency, hds.nounToInfinitiveVerb, hds.infinitiveVerbToNoun, hds);\n// \tSystem.out.println(\"NOUN-INF\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t\n }\n \n \n\n\t\t\t}\n\t\t\t\n//\t\t\tSemanticGraph dependencies = sentence.get(CollapsedCCProcessedDependenciesAnnotation.class);\n//\t\t\tSystem.out.println(\"SEM-DEP \" + dependencies);\t\n\t\t}\n\t\t\n\n\t\tMap<Integer, edu.stanford.nlp.dcoref.CorefChain> corefChains = document.get(CorefChainAnnotation.class);\n\t\t \n\t\t if (corefChains == null) { return; }\n\t\t //SPCOPY\n\t\t for (Entry<Integer, edu.stanford.nlp.dcoref.CorefChain> entry: corefChains.entrySet()) {\n//\t\t System.out.println(\"Chain \" + entry.getKey() + \" \");\n\t\t \tint chain = entry.getKey();\n\t\t String repMenNer = null;\n\t\t String repMen = null;\n\t\t String offsetRepMenNer = null;\n\n\t\t List<IaiCorefAnnotation> listCorefAnnotation = new ArrayList<IaiCorefAnnotation>();\n\t\t \n\t\t for (CorefMention m : entry.getValue().getMentionsInTextualOrder()) {\n\t\t \tboolean corefMentionContainsNer = false;\n\t\t \tboolean repMenContainsNer = false;\n\n//\t\t \n\n\t\t\t\t// We need to subtract one since the indices count from 1 but the Lists start from 0\n\t\t \tList<CoreLabel> tokens = sentences.get(m.sentNum - 1).get(TokensAnnotation.class);\n\t\t // We subtract two for end: one for 0-based indexing, and one because we want last token of mention not one following.\n//\t\t System.out.println(\" \" + m + \", i.e., 0-based character offsets [\" + tokens.get(m.startIndex - 1).beginPosition() +\n//\t\t \", \" + tokens.get(m.endIndex - 2).endPosition() + \")\");\n\t\t \n\t\t int beginCoref = tokens.get(m.startIndex - 1).beginPosition();\n\t\t\t\t int endCoref = tokens.get(m.endIndex - 2).endPosition();\n\t\t\t\t String offsetCorefMention = \"\" + beginCoref + \"-\" + endCoref;\n\t\t\t\t String corefMention = m.mentionSpan;\n\n\t\t\t\t CorefMention RepresentativeMention = entry.getValue().getRepresentativeMention();\n\t\t\t\t repMen = RepresentativeMention.mentionSpan;\n\t\t\t\t List<CoreLabel> repMenTokens = sentences.get(RepresentativeMention.sentNum - 1).get(TokensAnnotation.class);\n//\t\t\t\t System.out.println(\"REPMEN ANNO \" + \"\\\"\" + repMen + \"\\\"\" + \" is representative mention\" +\n// \", i.e., 0-based character offsets [\" + repMenTokens.get(RepresentativeMention.startIndex - 1).beginPosition() +\n//\t\t \", \" + repMenTokens.get(RepresentativeMention.endIndex - 2).endPosition() + \")\");\n\t\t\t\t int beginRepMen = repMenTokens.get(RepresentativeMention.startIndex - 1).beginPosition();\n\t\t\t\t int endRepMen = repMenTokens.get(RepresentativeMention.endIndex - 2).endPosition();\n\t\t\t\t String offsetRepMen = \"\" + beginRepMen + \"-\" + endRepMen;\n\t\t \t \n\t\t\t\t//Determine repMenNer that consists of largest NER (Merkel) to (Angela Merkel)\n\t\t\t\t //and \"Chancellor \"Angela Merkel\" to \"Angela Merkel\"\n\t\t \t //Further reduction to NER as in \"Chancellor Angela Merkel\" to \"Angela Merkel\" is\n\t\t\t\t //done in determineBestSubject. There, Chunk information and subjectHead info is available.\n\t\t\t\t //Chunk info and subjectHead info is used to distinguish \"Chancellor Angela Merkel\" to \"Angela Merkel\"\n\t\t\t\t //from \"The enemies of Angela Merkel\" which is not reduced to \"Angela Merkel\"\n\t\t\t\t //Problem solved: The corefMentions of a particular chain do not necessarily have the same RepMenNer (RepMen) \n\t\t\t\t // any more: Chancellor Angela Merkel repMenNer Chancellor Angela Merkel , then Angela Merkel has RepMenNer Angela Merkel\n\t\t\t\t if (offsetRepMenNer != null && hds.Ner.contains(offsetRepMenNer)){\n//\t\t\t\t\t System.out.println(\"NEWNer.contains(offsetRepMenNer)\");\n\t\t\t\t }\n\t\t\t\t else if (offsetRepMen != null && hds.Ner.contains(offsetRepMen)){\n\t\t\t\t\t repMenNer = repMen;\n\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\tSystem.out.println(\"NEWNer.contains(offsetRepMen)\");\n\t\t\t\t }\n\t\t\t\t else if (offsetCorefMention != null && hds.Ner.contains(offsetCorefMention)){\n\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\tSystem.out.println(\"Ner.contains(offsetCorefMention)\");\n\t\t\t\t\t}\n\t\t\t\t else {\n\t\t\t\t\t corefMentionContainsNer = offsetsContainAnnotation(offsetCorefMention,hds.Ner);\n\t\t\t\t\t repMenContainsNer = offsetsContainAnnotation(offsetRepMen,hds.Ner);\n//\t\t\t\t\t System.out.println(\"ELSE Ner.contains(offsetCorefMention)\");\n\t\t\t\t }\n\t\t\t\t //Determine repMenNer that contains NER\n\t\t\t\t\tif (repMenNer == null){\n\t\t\t\t\t\tif (corefMentionContainsNer){\n\t\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT1\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (repMenContainsNer){\n\t\t\t\t\t\t\trepMenNer = repMen;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT2\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//no NER:\n\t\t\t\t\t\t//Pronoun -> repMen is repMenNer\n\t\t\t\t\t\telse if (hds.PronominalSubject.contains(offsetCorefMention) && repMen != null){\n\t\t\t\t\t\t\trepMenNer = repMen;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT3\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t//other no NER: corefMention is repMenNer because it is closer to original\n\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\tSystem.out.println(\"DEFAULT4\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t \n \t IaiCorefAnnotation corefAnnotation = new IaiCorefAnnotation(aJCas);\n\t\t\t\n\t\t\t\t\t\n\n\n\t\t\t\t\tcorefAnnotation.setBegin(beginCoref);\n\t\t\t\t\tcorefAnnotation.setEnd(endCoref);\n\t\t\t\t\tcorefAnnotation.setCorefMention(corefMention);\n\t\t\t\t\tcorefAnnotation.setCorefChain(chain);\n\t\t\t\t\t//done below\n//\t\t\t\t\tcorefAnnotation.setRepresentativeMention(repMenNer);\n//\t\t\t\t\tcorefAnnotation.addToIndexes(); \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tlistCorefAnnotation.add(corefAnnotation);\n\t\t\t\t\t\n//\t\t\t\t\tdone below:\n//\t\t\t\t\t offsetToRepMen.put(offsetCorefMention, repMenNer);\n//\t\t\t\t\t RepMen.add(offsetCorefMention);\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t }//end coref mention\n//\t\t System.out.println(\"END Chain \" + chain );\n//\t\t System.out.println(listCorefAnnotation.size());\n\t\t String offsetCorefMention = null;\n\t\t for (int i = 0; i < listCorefAnnotation.size(); i++) {\n\t\t \tIaiCorefAnnotation corefAnnotation = listCorefAnnotation.get(i);\n\t\t \tcorefAnnotation.setRepresentativeMention(repMenNer);\n\t\t \tcorefAnnotation.addToIndexes();\n\t\t \toffsetCorefMention = \"\" + corefAnnotation.getBegin() + \"-\" + corefAnnotation.getEnd();\n\t\t\t\t\thds.offsetToRepMen.put(offsetCorefMention, repMenNer);\n\t\t\t\t\thds.RepMen.add(offsetCorefMention);\n\t\t\t\t\t//COREF\n//\t\t\t\t\tSystem.out.println(\"Chain \" + corefAnnotation.getCorefChain());\n//\t\t\t\t\tSystem.out.println(\"corefMention \" + corefAnnotation.getCorefMention() + offsetCorefMention);\n//\t\t\t\t\tSystem.out.println(\"repMenNer \" + repMenNer);\n\t\t }\n\t\t } //end chains\n\n\n//\t\t System.out.println(\"NOW quote finder\");\n\n\n\t\t\n\t\t///* quote finder: begin find quote relation and quotee\n\t\t// direct quotes\n\t\t\n\t\t\n\t\tString quotee_left = null;\n\t\tString quotee_right = null; \n\t\t\n\t\tString representative_quotee_left = null;\n\t\tString representative_quotee_right = null; \n\t\t\n\t\tString quote_relation_left = null;\n\t\tString quote_relation_right = null;\n\t\t\n\t\tString quoteType = null;\n\t\tint quoteeReliability = 5;\n\t\tint quoteeReliability_left = 5;\n\t\tint quoteeReliability_right = 5;\n\t\tint quotee_end = -5;\n\t\tint quotee_begin = -5;\n\t\t\n\t\tboolean quoteeBeforeQuote = false;\n\n\n\t\n\t\t\n\t\t// these are all the quotes in this document\n\t\tList<CoreMap> quotes = document.get(QuotationsAnnotation.class);\n\t\tfor (CoreMap quote : quotes) {\n\t\t\tif (quote.get(TokensAnnotation.class).size() > 5) {\n\t\t\t\tQuoteAnnotation annotation = new QuoteAnnotation(aJCas);\n\n\t\t\t\tint beginQuote = quote.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endQuote = quote.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(quote.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tannotation.setBegin(beginQuote);\n\t\t\t\tannotation.setEnd(endQuote);\n\t\t\t\tannotation.addToIndexes();\n//\t\t\t}\n//\t\t}\n//\t\t\n//\t\tList<Q> newQuotes = document.get(QuotationsAnnotation.class);\t\t\n//\t\tfor (CoreMap annotation : newQuotes) {\n//\t\t\t\tif (1==1){\n//\t\t\t\tRe-initialize markup variables since they are also used for indirect quotes\n\t\t\t\tquotee_left = null;\n\t\t\t\tquotee_right = null; \n\t\t\t\t\n\t\t\t\trepresentative_quotee_left = null;\n\t\t\t\trepresentative_quotee_right = null;\n\t\t\t\t\n\t\t\t\tquote_relation_left = null;\n\t\t\t\tquote_relation_right = null;\n\t\t\t\tquoteeReliability = 5;\n\t\t\t\tquoteeReliability_left = 5;\n\t\t\t\tquoteeReliability_right = 5;\n\t\t\t\tquotee_end = -5;\n\t\t\t\tquotee_begin = -5;\n\t\t\t\tquoteType = \"direct\";\n\t\t\t\tquoteeBeforeQuote = false;\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> directQuoteTokens = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\tToken.class, annotation);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> followTokens = JCasUtil.selectFollowing(aJCas,\n\t\t\t\t\t\tToken.class, annotation, 1);\n\t\t\t\t\n \n//\t\t\t\tfor (Token aFollowToken: followTokens){\n//\t\t\t\t\t List<Chunk> chunks = JCasUtil.selectCovering(aJCas,\n//\t\t\t\t\tChunk.class, aFollowToken);\n \n//direct quote quotee right:\n\t\t\t\t\n\t for (Token aFollow2Token: followTokens){\n\t\t\t\t\t List<SentenceAnnotation> sentencesFollowQuote = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t SentenceAnnotation.class, aFollow2Token);\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t for (SentenceAnnotation sentenceFollowsQuote: sentencesFollowQuote){\n\t\t\t\t\t\t List<Chunk> chunks = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\tChunk.class, sentenceFollowsQuote);\n//\t\t\tSystem.out.println(\"DIRECT QUOTE RIGHT\");\n\t\t\tString[] quote_annotation_result = determine_quotee_and_quote_relation(\"RIGHT\", \n\t\t\t\t\tchunks, hds, annotation);\n\t\t\tif (quote_annotation_result.length>=4){\n\t\t\t quotee_right = quote_annotation_result[0];\n\t\t\t representative_quotee_right = quote_annotation_result[1];\n\t\t\t quote_relation_right = quote_annotation_result[2];\n\t\t\t try {\n\t\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t quoteeReliability_right = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t //Will Throw exception!\n\t\t\t //do something! anything to handle the exception.\n\t\t\t\tquoteeReliability = -5;\n\t\t\t\tquoteeReliability_right = -5;\n\t\t\t\t}\t\t\t\t\t \n\t\t\t }\n//\t\t\tSystem.out.println(\"DIRECT QUOTE RIGHT RESULT quotee \" + quotee_right + \" representative_quotee \" + representative_quotee_right\n//\t\t\t\t\t+ \" quote_relation \" + quote_relation_right);\n\t\t \n\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t \n }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> precedingTokens = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t\t\tToken.class, annotation, 1);\n for (Token aPrecedingToken: precedingTokens){ \n \t\n \tif (directQuoteIntro.contains(aPrecedingToken.getLemma().getValue().toString()) \n \t\t\t|| compLemma.contains(aPrecedingToken.getLemma().getValue().toString())) {\n// \t\tSystem.out.println(\"Hello, World lemma found\" + aPrecedingToken.getLemma().getValue());\n \t\tquoteeBeforeQuote = true;\n \t}\n \t\tList <NamedEntity> namedEntities = null;\n \t\tList <Token> tokens = null;\n \t\tList<Chunk> chunks = null;\n \t\t\n\t\t\t\t List<Sentence> precedingSentences = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t \t\tSentence.class, aPrecedingToken, 1);\n\t\t\t\t \n\t\t\t\t\t\tif (precedingSentences.isEmpty()){\n\t\t\t\t\t\t\tList<Sentence> firstSentence;\n\t\t\t\t \tfirstSentence = JCasUtil.selectCovering(aJCas,\n\t\t\t\t \t\tSentence.class, aPrecedingToken);\n\n\t\t\t\t \tfor (Sentence aSentence: firstSentence){\n\t\t\t\t \t\t\n\n\t\t\t\t\t\t\t\tchunks = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\t\tChunk.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t \t\tnamedEntities = JCasUtil.selectCovered(aJCas,\n\t \t \t\tNamedEntity.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\t\t\t\t \t\ttokens = JCasUtil.selectCovered(aJCas,\n\t\t\t\t \t\t\t\tToken.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\t\t\t\t \t\n\t\t\t\t \t}\n\t\t\t\t\t\t}\n\t\t\t\t else {\t\n\t\t\t\t \tfor (Sentence aSentence: precedingSentences){\n//\t\t\t\t \t\tSystem.out.println(\"Hello, World sentence\" + aSentence);\n\t\t\t\t \t\tchunks = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tChunk.class, aSentence, aPrecedingToken);\n\t\t\t\t \t\tnamedEntities = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tNamedEntity.class, aSentence, aPrecedingToken);\n\t\t\t\t \t\ttokens = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tToken.class, aSentence, aPrecedingToken);\n\t\t\t\t \t}\n\t\t\t\t }\n \t\n//\t\t\t\t \n//\t\t\t\t\t\tSystem.out.println(\"DIRECT QUOTE LEFT\");\n\t\t\t\t\t\tString[] quote_annotation_direct_left = determine_quotee_and_quote_relation(\"LEFT\", chunks,\n\t\t\t\t\t\t\t\t hds, annotation\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t );\n//\t\t\t\t\t\tSystem.out.println(\"QUOTE ANNOTATION \" + quote_annotation_direct_left.length);\t\t\n\t\tif (quote_annotation_direct_left.length>=4){\n//\t\t\tSystem.out.println(\"QUOTE ANNOTATION UPDATE \" + quote_annotation_direct_left[0] +\n//\t\t\t\t\t\" \" + quote_annotation_direct_left[1] + \" \" +\n//\t\t\t\t\tquote_annotation_direct_left[2]);\n\t\t quotee_left = quote_annotation_direct_left[0];\n\t\t representative_quotee_left = quote_annotation_direct_left[1];\n\t\t quote_relation_left = quote_annotation_direct_left[2];\n\t\t try {\n\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_direct_left[3]);\n\t\t\t quoteeReliability_left = Integer.parseInt(quote_annotation_direct_left[3]);\n\t\t\t} catch (NumberFormatException e) {\n\t\t //Will Throw exception!\n\t\t //do something! anything to handle the exception.\n\t\t\tquoteeReliability = -5;\n\t\t\tquoteeReliability_left = -5;\n\t\t\t}\t\t\t\t\t \n\t\t }\n//\t\tSystem.out.println(\"DIRECT QUOTE LEFT RESULT quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left\n//\t\t\t\t+ \" quote_relation \" + quote_relation_left);\n\t\t//no subject - predicate quotee quote_relation, quote introduced with colon: \n\t\tif (quotee_left == null && quote_relation_left == null && representative_quotee_left == null \n\t\t&& directQuoteIntro.contains(aPrecedingToken.getLemma().getValue().toString())){\n//\t\t\tSystem.out.println(\"NER DIRECT QUOTE LEFT COLON\");\n\t\t\tString quoteeCandOffset = null; \n\t\t\tString quoteeCandText = null;\n\t\t if (namedEntities.size() == 1){\n \t \tfor (NamedEntity ne : namedEntities){\n// \t \t\tSystem.out.println(\"ONE NER \" + ne.getCoveredText());\n \t \t\tquoteeCandText = ne.getCoveredText();\n\t\t\t\t\tquote_relation_left = aPrecedingToken.getLemma().getValue().toString();\n\t\t\t\t\tquotee_end = ne.getEnd();\n\t\t\t\t\tquotee_begin = ne.getBegin();\n\t\t\t\t\tquoteeCandOffset = \"\" + quotee_begin + \"-\" + quotee_end;\n\t\t\t\t\tquoteeReliability = 1;\n\t\t\t\t\tquoteeReliability_left = 1;\n \t }\n \t }\n \t else if (namedEntities.size() > 1) {\n \t \tint count = 0;\n \t \tString quotee_cand = null;\n// \t \tSystem.out.println(\"Hello, World ELSE SEVERAL NER\");\n \t \tfor (NamedEntity ner : namedEntities){\n// \t \t\tSystem.out.println(\"Hello, World NER TYPE\" + ner.getValue());\n \t \t\tif (ner.getValue().equals(\"PERSON\")){\n \t \t\t\tcount = count + 1;\n \t \t\t\tquotee_cand = ner.getCoveredText();\n \t \t\t\tquotee_end = ner.getEnd();\n \t \t\t\tquotee_begin = ner.getBegin();\n \t \t\t\tquoteeCandOffset = \"\" + quotee_begin + \"-\" + quotee_end;\n \t \t\t\t\n// \t \t\t\tSystem.out.println(\"Hello, World FOUND PERSON\" + quotee_cand);\n \t \t\t}\n \t \t}\n \t \tif (count == 1){ // there is exactly one NER.PERSON\n// \t \t\tSystem.out.println(\"ONE PERSON, SEVERAL NER \" + quotee_cand);\n \t \t\t\tquoteeCandText = quotee_cand;\n\t\t\t\t\t\tquote_relation_left = aPrecedingToken.getLemma().getValue().toString();\n\t\t\t\t\t\tquoteeReliability = 3;\n\t\t\t\t\t\tquoteeReliability_left = 3;\n \t \t}\n \t }\n\t\t if(quoteeCandOffset != null && quoteeCandText != null ){\n//\t\t \t quotee_left = quoteeCandText;\n\t\t \t String result [] = determineBestRepMenSubject(\n\t\t \t\t\t quoteeCandOffset,quoteeCandOffset, quoteeCandText, hds);\n\t\t \t if (result.length>=2){\n\t\t \t\t quotee_left = result [0];\n\t\t \t\t representative_quotee_left = result [1];\n//\t\t \t System.out.println(\"RESULT2 NER quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left);\n\t\t \t }\n\t\t }\n\t\t}\n }\n\t\t\n \n\n\t\t\t\t\n\t\t\t\tif (quotee_left != null && quotee_right != null){\n//\t\t\t\t\tSystem.out.println(\"TWO QUOTEES\");\n\t\t\t\t\t\n\t\t\t\t\tif (directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\".\") \n\t\t\t\t\t\t|| \tdirectQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"!\")\n\t\t\t\t\t\t|| directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"?\")\n\t\t\t\t\t\t\t){\n//\t\t\t\t\t\tSystem.out.println(\"PUNCT \" + quotee_left + quote_relation_left + quoteeReliability_left);\n\t\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\n\t\t\t\t\t}\n\t\t\t\t\telse if (directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\",\")){\n//\t\t\t\t\t\tSystem.out.println(\"COMMA \" + quotee_right + \" \" + quote_relation_right + \" \" + quoteeReliability_right);\n\t\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t\t}\n\t\t\t\t\telse if (!directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\".\")\n\t\t\t\t\t\t\t&& !directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"!\")\n\t\t\t\t\t\t\t&& !directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"?\")\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t){\n//\t\t\t\t\t\tSystem.out.println(\"NO PUNCT \" + quotee_right + \" \" + quote_relation_right + \" \" + quoteeReliability_right);\n\t\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n//\t\t\t\t\t\tSystem.out.println(\"UNCLEAR LEFT RIGHT \" + quotee_left + quote_relation_left + quote + quotee_right + quote_relation_right);\n\t\t\t\t\tannotation.setQuotee(\"<unclear>\");\n\t\t\t\t\tannotation.setQuoteRelation(\"<unclear>\");\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (quoteeBeforeQuote == true){\n\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t}\n\t\t\t\telse if (quotee_left != null){\n//\t\t\t\t\tSystem.out.println(\"QUOTEE LEFT\" + quotee_left + quote_relation_left + quoteeReliability_left);\n\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t}\n\t\t\t\telse if (quotee_right != null){\n//\t\t\t\t\tSystem.out.println(\"QUOTEE RIGHT FOUND\" + quotee_right + \" QUOTE RELATION \" + quote_relation_right + \":\" + quoteeReliability_right);\n\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t}\n\t\t\t\telse if (quote_relation_left != null ){\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n//\t\t\t\t\tSystem.out.println(\"NO QUOTEE FOUND\" + quote + quote_relation_left + quote_relation_right);\n\t\t\t\t}\n\t\t\t\telse if (quote_relation_right != null){\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t}\n\t\t\t\telse if (quoteType != null){\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n//\t\t\t\t\tSystem.out.println(\"Hello, World NO QUOTEE and NO QUOTE RELATION FOUND\" + quote);\n\t\t\t\t}\n\t\t\t\tif (annotation.getRepresentativeQuoteeMention() != null){\n//\t\t\t\t\tSystem.out.println(\"NOW!!\" + annotation.getRepresentativeQuoteeMention());\n\t\t\t\t\tif (hds.dbpediaSurfaceFormToDBpediaLink.containsKey(annotation.getRepresentativeQuoteeMention())){\n\t\t\t\t\t\tannotation.setQuoteeDBpediaUri(hds.dbpediaSurfaceFormToDBpediaLink.get(annotation.getRepresentativeQuoteeMention()));\n//\t\t\t\t\t\tSystem.out.println(\"DBPRED FOUND\" + annotation.getRepresentativeQuoteeMention() + \" URI: \" + annotation.getQuoteeDBpediaUri());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} //for direct quote\n\t\t\n\t\t// annotate indirect quotes: opinion verb + 'that' ... until end of sentence: said that ...\n\n//\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class); //already instantiated above\nINDIRECTQUOTE:\t\tfor (CoreMap sentence : sentences) {\n//\t\t\tif (sentence.get(TokensAnnotation.class).size() > 5) { \n\t\t\t\tSentenceAnnotation sentenceAnn = new SentenceAnnotation(aJCas);\n\t\t\t\t\n\t\t\t\tint beginSentence = sentence.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endSentence = sentence.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(sentence.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tsentenceAnn.setBegin(beginSentence);\n\t\t\t\tsentenceAnn.setEnd(endSentence);\n//\t\t\t\tsentenceAnn.addToIndexes();\n\t\t\t\t\n\t\t\t\tQuoteAnnotation indirectQuote = new QuoteAnnotation(aJCas);\n\t \tint indirectQuoteBegin = -5;\n\t\t\t\tint indirectQuoteEnd = -5;\n\t\t\t\tboolean subsequentDirectQuoteInstance = false;\n\t\t\t\t\n\t\t\t\tList<Chunk> chunksIQ = JCasUtil.selectCovered(aJCas,\n\t\t\t\tChunk.class, sentenceAnn);\n\t\t\t\tList<Chunk> chunksBeforeIndirectQuote = null;\n\t\t\t\t\n\t\t\t\tint index = 0;\nINDIRECTCHUNK:\tfor (Chunk aChunk : chunksIQ) {\n\t\t\t\t\tindex++;\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"INDIRECT QUOTE CHUNK VALUE \" + aChunk.getChunkValue().toString());\n//\t\t\t\t\tif (aChunk.getChunkValue().equals(\"SBAR\")) {\n\t\t\t\t\tif(indirectQuoteIntroChunkValue.contains(aChunk.getChunkValue())){\n//\t\t\t\t\t\tSystem.out.println(\"INDIRECT QUOTE INDEX \" + \"\" + index);\n\t\t\t\t\t\t\n\t\t\t\t\t\tList<Token> tokensSbar = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\tToken.class, aChunk);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (Token aTokenSbar : tokensSbar){\n//\t\t\t\t\t\t\tString that = \"that\";\n\t\t\t\t\t\t\tif (compLemma.contains(aTokenSbar.getLemma().getCoveredText())){\n\t\t\t\t\t\t// VP test: does that clause contain VP?\n//\t\t\t\t\t\t\t\tSystem.out.println(\"TOK1\" + aTokenSbar.getLemma().getCoveredText());\n//\t\t\t \tQuoteAnnotation indirectQuote = new QuoteAnnotation(aJCas);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t indirectQuoteBegin = aChunk.getEnd() + 1;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t chunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//NEW\n//\t\t\t\t\t\t\t\tif (LANGUAGE == \"en\")\n\t\t\t\t\t\t\t\tList<Token> precedingSbarTokens = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t\t\t\t\t\t\tToken.class, aChunk, 1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor (Token aPrecedingSbarToken: precedingSbarTokens){ \n//\t\t\t\t\t\t\t\t\tSystem.out.println(\"TOK2\" + aPrecedingSbarToken.getLemma().getCoveredText());\n\t\t\t\t \tif (coordLemma.contains(aPrecedingSbarToken.getLemma().getValue().toString())){\n//\t\t\t\t \t\tSystem.out.println(\"TOKK\" + aPrecedingSbarToken.getLemma().getCoveredText());\n\t\t\t\t \t\tchunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t \t\tint k = 0;\n\t\t\t\t \tSAY:\tfor (Chunk chunkBeforeAndThat : chunksBeforeIndirectQuote){\n//\t\t\t\t \t\t\txxxx\n\t\t\t\t \t\tk++;\n\t\t\t\t \t\t\tif (chunkBeforeAndThat.getChunkValue().equals(\"VP\")){\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t\tList<Token> tokensInVp = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToken.class, chunkBeforeAndThat);\n\t\t\t\t\t\t\t\t\t\t\t\tfor (Token aTokenInVp : tokensInVp){\n//\t\t\t\t\t\t\t\t\t\t\t\t\tString and;\n//\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"TOKK\" + aTokenInVp.getLemma().getCoveredText());\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (aTokenInVp.getLemma().getValue().equals(\"say\")){\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SAY OLD\" + indirectQuoteBegin + \":\" + sentenceAnn.getCoveredText());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchunksBeforeIndirectQuote = chunksIQ.subList(0, k);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindirectQuoteBegin = chunksBeforeIndirectQuote.get(chunksBeforeIndirectQuote.size()-1).getEnd()+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SAY NEW\" + indirectQuoteBegin + \":\" );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak SAY;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t}\n\t\t\t\t \t\t\n\t\t\t\t \t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tList<QuoteAnnotation> coveringDirectQuoteChunk = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t\t\t\tQuoteAnnotation.class, aChunk);\n\t\t\t\t\t\t\t\tif (coveringDirectQuoteChunk.isEmpty()){\n//\t\t\t\t\t\t\t\t indirectQuoteBegin = aChunk.getEnd() + 1;\n\t\t\t\t\t\t\t\t indirectQuote.setBegin(indirectQuoteBegin);\n//\t\t\t\t\t\t\t\t chunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t\t\t\t\t indirectQuoteEnd = sentenceAnn.getEnd();\n\t\t\t\t\t\t\t\t indirectQuote.setEnd(indirectQuoteEnd);\n\t\t\t\t\t\t\t\t indirectQuote.addToIndexes();\n\t\t\t\t\t\t\t\t subsequentDirectQuoteInstance = false;\n//\t\t\t\t\t\t\t\t System.out.println(\"SUBSEQUENT FALSE\");\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t List<Token> followTokens = JCasUtil.selectFollowing(aJCas,\n\t\t\t\t\t\t\t\t\t\t\tToken.class, indirectQuote, 1);\n\t\t\t\t\t\t\t\t for (Token aFollow3Token: followTokens){\n\t\t\t\t\t\t\t\t\t List<QuoteAnnotation> subsequentDirectQuotes = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t\t\t\t\tQuoteAnnotation.class,aFollow3Token);\n\t\t\t\t\t\t\t\t\t if (!subsequentDirectQuotes.isEmpty()){\n\t\t\t\t\t\t\t\t\t\t for (QuoteAnnotation subsequentDirectQuote: subsequentDirectQuotes){\n\t\t\t\t\t\t\t\t\t\t\t if (subsequentDirectQuote.getRepresentativeQuoteeMention() != null\n\t\t\t\t\t\t\t\t\t\t\t\t && subsequentDirectQuote.getRepresentativeQuoteeMention().equals(\"<unclear>\")){\n//\t\t\t\t\t\t\t\t\t\t\t System.out.println(\"SUBSEQUENT FOUND\"); \n\t\t\t\t\t\t\t\t\t\t\t hds.subsequentDirectQuote = subsequentDirectQuote;\n\t\t\t\t\t\t\t\t\t\t\t subsequentDirectQuoteInstance = true;\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t break INDIRECTCHUNK;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\n\t\t\t\t}\n\t\t\t\t\tif (indirectQuoteBegin >= 0 && indirectQuoteEnd >= 0){\n//\t\t\t\t\t\tList<QuoteAnnotation> coveringDirectQuote = JCasUtil.selectCovering(aJCas,\n//\t\t\t\t\t\t\t\tQuoteAnnotation.class, indirectQuote);\n//\t\t\t\t\t\tif (coveringDirectQuote.isEmpty()){\n////\t\t\t\t\t\t\t\n//\t\t\t\t\t\tindirectQuote.addToIndexes();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse {\n//\t\t\t\t\t\t\t//indirect quote is covered by direct quote and therefore discarded\n//\t\t\t\t\t\t\tcontinue INDIRECTQUOTE;\n//\t\t\t\t\t\t}\n\t\t\t\t\tList<QuoteAnnotation> coveredDirectQuotes = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\tQuoteAnnotation.class, indirectQuote);\n\t\t\t\t\tfor (QuoteAnnotation coveredDirectQuote : coveredDirectQuotes){\n//\t\t\t\t\t\tSystem.out.println(\"Hello, World covered direct quote\" + coveredDirectQuote.getCoveredText());\n\t\t\t\t\t\t//delete coveredDirectQuoteIndex\n\t\t\t\t\t\tcoveredDirectQuote.removeFromIndexes();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//no indirect quote in sentence\n\t\t\t\t\t\tcontinue INDIRECTQUOTE;\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n//\t\t\t\t\t\tRe-initialize markup variables since they are also used for direct quotes\n\t\t\t\t\t\tquotee_left = null;\n\t\t\t\t\t\tquotee_right = null; \n\t\t\t\t\t\t\n\t\t\t\t\t\trepresentative_quotee_left = null;\n\t\t\t\t\t\trepresentative_quotee_right = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tquote_relation_left = null;\n\t\t\t\t\t\tquote_relation_right = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tquoteType = \"indirect\";\n\t\t\t\t\t\tquoteeReliability = 5;\n\t\t\t\t\t\tquoteeReliability_left = 5;\n\t\t\t\t\t\tquoteeReliability_right = 5;\n\t\t\t\t\t\tquotee_end = -5;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\tif (chunksBeforeIndirectQuote != null){\n//\t\t\t\t\t\t\tSystem.out.println(\"chunksBeforeIndirectQuote FOUND!! \");\n\t\t\t\t\t\t\tString[] quote_annotation_result = determine_quotee_and_quote_relation(\"LEFT\", chunksBeforeIndirectQuote,\n\t\t\t\t\t\t\t\t\t hds, indirectQuote\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t );\n\t\t\tif (quote_annotation_result.length>=4){\n\t\t\t quotee_left = quote_annotation_result[0];\n\t\t\t representative_quotee_left = quote_annotation_result[1];\n\t\t\t quote_relation_left = quote_annotation_result[2];\n//\t\t\t System.out.println(\"INDIRECT QUOTE LEFT RESULT quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left\n//\t\t\t\t\t + \" QUOTE RELATION \" + quote_relation_left);\n\t\t\t try {\n\t\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t quoteeReliability_left = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tquoteeReliability = -5;\n\t\t\t\tquoteeReliability_left = -5;\n\t\t\t\t}\t\t\t\t\t \n\t\t\t }\n\t\t\t\n\t\t\t}\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (quotee_left != null){\n\t\t\t\t\t\t\tindirectQuote.setQuotee(quotee_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n\t\t\t\t\t\t\tindirectQuote.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\t\t\tindirectQuote.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//indirect quote followed by direct quote:\n\t\t\t\t\t\t\t//the quotee and quote relation of the indirect quote are copied to the direct quote \n\t\t\t\t\t\t\t//Genetic researcher Otmar Wiestler hopes that the government's strict controls on genetic research \n\t\t\t\t\t\t\t//will be relaxed with the advent of the new ethics commission. \n\t\t\t\t\t\t\t//\"For one thing the government urgently needs advice, because of course it's such an extremely \n\t\t\t\t\t\t\t//complex field. And one of the reasons Chancellor Schröder formed this new commission was without \n\t\t\t\t\t\t\t//a doubt to create his own group of advisors.\"\n\n\t\t\t\t\t\t\tif (subsequentDirectQuoteInstance == true\n\t\t\t\t\t\t\t\t&&\thds.subsequentDirectQuote.getRepresentativeQuoteeMention().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t&& \thds.subsequentDirectQuote.getQuotee().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t&& \thds.subsequentDirectQuote.getQuoteRelation().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t\t){\n//\t\t\t\t\t\t\t\tSystem.out.println(\"SUBSEQUENT UNCLEAR DIR QUOTE FOUND!!\"); \n\t\t\t\t\t\t\t\tint begin = hds.subsequentDirectQuote.getBegin();\n\t\t\t\t\t\t\t\tint end = hds.subsequentDirectQuote.getEnd();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuotee(quotee_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteType(\"direct\");\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteeReliability(quoteeReliability_left + 2);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.addToIndexes();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\tSystem.out.println(\"Hello, World INDIRECT QUOTE \" + quotee_left + quote_relation_left + quoteeReliability);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (quote_relation_left != null){\n\t\t\t\t\t\t\tindirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\telse if (quoteType != null){\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n//\t\t\t\t\t\t\tSystem.out.println(\"Hello, World INDIRECT QUOTE NOT FOUND\" + quote_relation_left);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (indirectQuote.getRepresentativeQuoteeMention() != null){\n//\t\t\t\t\t\t\tSystem.out.println(\"NOW!!\" + indirectQuote.getRepresentativeQuoteeMention());\n\t\t\t\t\t\t\tif (hds.dbpediaSurfaceFormToDBpediaLink.containsKey(indirectQuote.getRepresentativeQuoteeMention())){\n\t\t\t\t\t\t\t\tindirectQuote.setQuoteeDBpediaUri(hds.dbpediaSurfaceFormToDBpediaLink.get(indirectQuote.getRepresentativeQuoteeMention()));\n//\t\t\t\t\t\t\t\tSystem.out.println(\"DBPEDIA \" + indirectQuote.getRepresentativeQuoteeMention() + \" URI: \" + hds.dbpediaSurfaceFormToDBpediaLink.get(indirectQuote.getRepresentativeQuoteeMention()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t }\n//\t\t\t} //for chunk\n//\t\t\t\tsay without that\n//\t\t\t}\t\t\n\t\t} //Core map sentences indirect quotes\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void checkCapitalization(List<Token> token)\r\n\t{\r\n\t\tfor(Token tk : token)\r\n\t\t{\r\n\t\t\t//checks for capitalized word\r\n\t\t\tif(tk.getName().matches(\"[A-Z][a-z]+\"))\r\n\t\t\t{\r\n\t\t\t\ttk.getFeatures().setLexicalType(String.valueOf(Lexical.CAPITAL));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//checks for all caps word\r\n\t\t\tif(tk.getName().matches(\"^[A-Z]{2,}$\")) \r\n\t\t\t{\r\n\t\t\t\ttk.getFeatures().setLexicalType(String.valueOf(Lexical.ALLCAPS));\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "public String getSentencesWithTerms(String paragraph, Collection<String> terms, boolean lemmatised) {\n String result = \"\";\n\n // Create an empty Annotation just with the given text\n document = new Annotation(paragraph);\n // Run Annotators on this text\n pipeline.annotate(document);\n\n // Use map to track sentences so that a sentence is not returned twice\n sentences = new HashMap();\n int key = 0;\n for (CoreMap coreMap : document.get(CoreAnnotations.SentencesAnnotation.class)) {\n sentences.put(key, coreMap.toString());\n key++;\n }\n\n Set keySet = sentences.keySet();\n Set<Integer> returnedSet = new HashSet();\n Iterator keyIterator = keySet.iterator();\n // These are all the sentences in this document\n while (keyIterator.hasNext()) {\n int id = (int) keyIterator.next();\n String content = sentences.get(id);\n // This is the current sentence\n String thisSentence = content;\n // Select sentence if it contains any of the terms and is not already returned\n for (String t : terms) {\n if (!returnedSet.contains(id)) { // ensure sentence not already used\n String label = lemmatise(t.toLowerCase().replaceAll(\"\\\\s+\", \" \").trim());\n if (StringUtils.contains(lemmatise(thisSentence.toLowerCase()).replaceAll(\"\\\\s+\", \" \"), label)\n || StringUtils.contains(lemmatise(StringOps.stripAllParentheses(thisSentence.toLowerCase())).replaceAll(\"\\\\s+\", \" \"), label)) { // lookup lemmatised strings\n result = result + \" \" + thisSentence.trim(); // Concatenate new sentence\n returnedSet.add(id);\n }\n }\n }\n }\n\n if (null != result && lemmatised) {\n result = lemmatise(result);\n }\n\n return result;\n }", "private Spannable applyWordMarkup(String text) {\n SpannableStringBuilder ssb = new SpannableStringBuilder();\n int languageCodeStart = 0;\n int untranslatedStart = 0;\n\n int textLength = text.length();\n for (int i = 0; i < textLength; i++) {\n char c = text.charAt(i);\n if (c == '.') {\n if (++i < textLength) {\n c = text.charAt(i);\n if (c == '.') {\n ssb.append(c);\n } else if (c == 'c') {\n languageCodeStart = ssb.length();\n } else if (c == 'C') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.language_code_tag),\n languageCodeStart, ssb.length(), 0);\n languageCodeStart = ssb.length();\n } else if (c == 'u') {\n untranslatedStart = ssb.length();\n } else if (c == 'U') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.untranslated_word),\n untranslatedStart, ssb.length(), 0);\n untranslatedStart = ssb.length();\n } else if (c == '0') {\n Resources res = getResources();\n ssb.append(res.getString(R.string.no_translations));\n }\n }\n } else\n ssb.append(c);\n }\n\n return ssb;\n }", "public boolean detectCapitalI(String word) {\n\t\tif (word == null || word.length() <= 1) return true;\n\t\tint numUpper = 0;\n\t\tchar[] w = word.toCharArray();\n\t\tfor (char c: w) {\n\t\t\tif (Character.isUpperCase(c)) numUpper++;\n\t\t}\n\t\tif (numUpper == 1 && Character.isUpperCase(w[0])) return true; // case 3\n\t\treturn numUpper == 0 || numUpper == w.length; // case 1 or 2\n\t}", "public static void main (String [] args) {\n WordCount wordCount2 = new WordCount();\r\n \r\n int count = 0;\r\n //creates an new scanner\r\n Scanner input = new Scanner(System.in);\r\n //gets the sentence and splits it at the spaces into an array\r\n String sentence = getSentence (input);\r\n String [] words = sentence.split(\" \");\r\n //parsing through the array and changes the counter\r\n for (int i = 0; i < words.length; i++){\r\n if (words[i].charAt(0) == 'a' || words[i].charAt(0) == 'A') {\r\n count = wordCount2.decrementCounter(count);\r\n } else {\r\n count = wordCount2.incrementCounter(count);\r\n }\r\n \r\n \r\n }\r\n //outputs the results \r\n System.out.println (\"There are \" + count + \" words in this sentence.\"); \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }", "@Override\n protected List<Term> segSentence(char[] sentence)\n {\n WordNet wordNetAll = new WordNet(sentence);\n ////////////////生成词网////////////////////\n generateWordNet(wordNetAll);\n ///////////////生成词图////////////////////\n// System.out.println(\"构图:\" + (System.currentTimeMillis() - start));\n if (HanLP.Config.DEBUG)\n {\n System.out.printf(\"粗分词网:\\n%s\\n\", wordNetAll);\n }\n// start = System.currentTimeMillis();\n List<Vertex> vertexList = viterbi(wordNetAll);\n// System.out.println(\"最短路:\" + (System.currentTimeMillis() - start));\n\n if (config.useCustomDictionary)\n {\n if (config.indexMode > 0)\n combineByCustomDictionary(vertexList, this.dat, wordNetAll);\n else combineByCustomDictionary(vertexList, this.dat);\n }\n\n if (HanLP.Config.DEBUG)\n {\n System.out.println(\"粗分结果\" + convert(vertexList, false));\n }\n\n // 数字识别\n if (config.numberQuantifierRecognize)\n {\n mergeNumberQuantifier(vertexList, wordNetAll, config);\n }\n\n // 实体命名识别\n if (config.ner)\n {\n WordNet wordNetOptimum = new WordNet(sentence, vertexList);\n int preSize = wordNetOptimum.size();\n if (config.nameRecognize)\n {\n PersonRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.translatedNameRecognize)\n {\n TranslatedPersonRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.japaneseNameRecognize)\n {\n JapanesePersonRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.placeRecognize)\n {\n PlaceRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.organizationRecognize)\n {\n // 层叠隐马模型——生成输出作为下一级隐马输入\n wordNetOptimum.clean();\n vertexList = viterbi(wordNetOptimum);\n wordNetOptimum.clear();\n wordNetOptimum.addAll(vertexList);\n preSize = wordNetOptimum.size();\n OrganizationRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (wordNetOptimum.size() != preSize)\n {\n vertexList = viterbi(wordNetOptimum);\n if (HanLP.Config.DEBUG)\n {\n System.out.printf(\"细分词网:\\n%s\\n\", wordNetOptimum);\n }\n }\n }\n\n // 如果是索引模式则全切分\n if (config.indexMode > 0)\n {\n return decorateResultForIndexMode(vertexList, wordNetAll);\n }\n\n // 是否标注词性\n if (config.speechTagging)\n {\n speechTagging(vertexList);\n }\n\n return convert(vertexList, config.offset);\n }", "public static boolean[] getCases(String in) {\n boolean[] cs = new boolean[in.length()];\n for (int s = 0; s < in.length(); s++) {\n cs[s] = Character.isUpperCase(in.charAt(s));\n }\n return cs;\n }", "public static double daleChall(String text){\n\t\tint complexWords = 0;\n\t\tint wordCount = 0;\n\t\tint sentenceCount = 0;\n\t\tDocument doc = new Document(text);\n\t\tfor(Sentence sent : doc.sentences()) {\n\t\t\tsentenceCount++;\n\t\t\tfor(String word : sent.words()) {\n\t\t\t\tif(word!=\".\" && word!= \",\" && word!=\";\" && word!=\":\") {\n\t\t\t\t\n\t\t\t\t\twordCount++;\n\t\t\t\tif(!binarySearch(word)) {\n\t\t\t\t\tcomplexWords++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\treturn daleChallCalculator(complexWords, wordCount, sentenceCount);\n\t}", "public static void main(String[] args) {\n String textString = \"Hello, world! I am program.\";\n\n\n// System.out.println(Arrays.toString(\"a;b;c;d\".split(\"(?=;)\")));\n// String[] split = \"a;b;c;d\".split(\"(?=\\\\p{Punct}\\s?)|\\s\");\n /*String[] split = \"a;b;c;d\".split(\"(?=\\\\p{Punct}\\s?)\");\n System.out.println(Arrays.toString(split));*/\n// String[] split1 = \"Hello, world!\".split(\"(?=\\\\p{Punct}\\s?)|\\s\");\n /*String[] split1 = \"Hello, world!\".split(\"(?=(\\\\p{Punct}\\s?))\");\n System.out.println(Arrays.toString(split1));*/\n// System.out.println(Arrays.toString(\"a;b;c;d\".split(\"((?<=;)|(?=;))\")));\n\n// String[] sentenceElementStrings = sentenceString.split(\"(?=\\\\p{Punct}\\s?)|\\s\");\n// System.out.println(\"Hello world! \\\\I am program.\");\n Text text = new Text(textString);\n\n System.out.println(\"Original text:\\n\" + text);\n\n text.swapFirstAndLastWordsInSentences();\n\n System.out.println(\"Text after swapping:\\n\" + text);\n }", "public String getCandidateSentences(HashMap<String, String> tripleDataMap) {\n String subUri = tripleDataMap.get(\"subUri\");\n String objUri = tripleDataMap.get(\"objUri\");\n String subLabel = tripleDataMap.get(\"subLabel\");\n String objLabel = tripleDataMap.get(\"objLabel\");\n\n String[] subArticleSentences = getSentencesOfArticle(getArticleForURI(subUri));\n String[] objArticleSentences = getSentencesOfArticle(getArticleForURI(objUri));\n String sentencesCollectedFromSubjArticle = null;\n String sentencesCollectedFromObjArticle = null;\n String sentence = null;\n if (subArticleSentences != null)\n sentencesCollectedFromSubjArticle = getSentencesHavingLabels(subLabel, objLabel, subArticleSentences);\n\n if (objArticleSentences != null)\n sentencesCollectedFromObjArticle = getSentencesHavingLabels(subLabel, objLabel, objArticleSentences);\n\n if (sentencesCollectedFromSubjArticle != null && sentencesCollectedFromObjArticle != null) {\n if (sentencesCollectedFromSubjArticle.length() <= sentencesCollectedFromObjArticle.length())\n sentence = sentencesCollectedFromSubjArticle;\n else\n sentence = sentencesCollectedFromObjArticle;\n } else if (sentencesCollectedFromSubjArticle != null) {\n sentence = sentencesCollectedFromSubjArticle;\n } else {\n sentence = sentencesCollectedFromObjArticle;\n }\n return sentence;\n }", "public List<String> GetSentenceFocusWords() {\r\n\t\tList<String> indxList = new ArrayList<String>();\r\n\t\t\r\n\t\tfor(int i = 0; i < m_questPos.size(); i++) {\r\n\t\t\tif(m_questPos.get(i).contains(\"NN\")){\r\n\t\t\t\tindxList.add(this.m_questWords.get(i));\r\n\t\t\t}\t\r\n\t\t\telse if(m_questPos.get(i).contains(\"JJ\")){\r\n\t\t\t\tindxList.add(this.m_questWords.get(i));\r\n\t\t\t}\r\n\t\t\telse if(m_questPos.get(i).contains(\"VB\")) {\r\n\t\t\t\tindxList.add(this.m_questWords.get(i));\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t//System.out.println(m_questPos.get(i));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn indxList;\r\n\t}", "private int numEnglishWords(String str) {\n int numWords = 0;\n String[] strings = str.split(\" \");\n for (String word : strings) {\n if (english.contains(word)) {\n numWords ++;\n }\n }\n return numWords;\n }", "public ArrayList<String> determineSearchedWords(String userCommand) {\n\t\tif (userCommand == null || userCommand.equals(\"\")) {\n\t\t\tlogger.log(Level.WARNING, Global.MESSAGE_ILLEGAL_ARGUMENTS);\n\t\t\treturn null;\n\t\t}\n\n\t\tString userCommandWithoutCommandType = removeCommandType(userCommand);\n\n\t\tArrayList<String> searchedWords = new ArrayList<String>();\n\t\tPattern pattern = Pattern.compile(\"[^\\\\s\\\"']+|\\\"([^\\\"]*)\\\"\");\n\t\tMatcher matcher = pattern.matcher(userCommandWithoutCommandType);\n\n\t\twhile (matcher.find()) {\n\t\t\tif (matcher.group(1) != null) {\n\t\t\t\tsearchedWords.add(matcher.group(1)); // Phrase in double quotes\n\t\t\t} else {\n\t\t\t\tsearchedWords.add(matcher.group()); // Single word\n\t\t\t}\n\t\t}\n\t\treturn searchedWords;\n\t}", "public static ArrayList<String> getWordsInString(String s) {\r\n\t\t// Search words in text\r\n\t\tString[] split = s.replace('-', ' ').split(\" \");\r\n\t\tArrayList<String> words = new ArrayList<String>(split.length);\r\n\t\t// Remove punctuation\r\n\t\tfor(String str : split) {\r\n\t\t\tif(str.isEmpty()) continue;\r\n\t\t\tStringBuilder wordBuilder = new StringBuilder();\r\n\t\t\tfor(int j = 0; j < str.length(); j++) {\r\n\t\t\t\tchar c = str.charAt(j);\r\n\t\t\t\tif(c >= 'A' && c <= 'Z') c = (char) (c + 'a' - 'A');\r\n\t\t\t\tif((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9')) {\r\n\t\t\t\t\twordBuilder.append(c);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twords.add(wordBuilder.toString());\r\n\t\t}\r\n\t\treturn words;\r\n\t}", "@Test\n\tvoid runRegExFoundText_LegalCase() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"S(a|r|g)*on\";\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\tArrayList<MatchResponse> response = a.search(\"books/babylon.txt\");\n\t\t\tassertEquals(30, response.size());\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tactualScore += 10;\n\t}", "public List<? extends HasWord> defaultTestSentence()\n/* */ {\n/* 472 */ return Sentence.toSentence(new String[] { \"w\", \"lm\", \"tfd\", \"mElwmAt\", \"En\", \"ADrAr\", \"Aw\", \"DHAyA\", \"HtY\", \"AlAn\", \".\" });\n/* */ }", "protected abstract String[] tokenizeImpl(String text);", "public void processNER(ArrayList<Sentence> listofSentences,\r\n\t\t\tString path) throws FileNotFoundException {\r\n\r\n\t\tScanner sc = new Scanner(new File(path));\r\n\t\twhile (sc.hasNext()) {\r\n\t\t\tString properNoun = sc.nextLine();\r\n\t\t\tfor (Sentence sentence : listofSentences) {\r\n\t\t\t\tMap<String, Integer> tokenMap = sentence.tokenMap;\r\n\t\t\t\tint index = properNoun.indexOf(\" \");\r\n\t\t\t\tif (index > 0) {\r\n\t\t\t\t\tString[] nameParts = properNoun.split(\" \");\r\n\t\t\t\t\tboolean isPresent = false;\r\n\t\t\t\t\tfor (String name : nameParts) {\r\n\t\t\t\t\t\tif (tokenMap.containsKey(name))\r\n\t\t\t\t\t\t\tisPresent = true;\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tisPresent = 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}\r\n\t\t\t\t\tif (isPresent) {\r\n\t\t\t\t\t\tfor (String name : nameParts) {\r\n\t\t\t\t\t\t\tint count = tokenMap.get(name);\r\n\t\t\t\t\t\t\tif (count == 1)\r\n\t\t\t\t\t\t\t\ttokenMap.remove(name);\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\ttokenMap.put(name, count - 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttokenMap.put(properNoun, 1);\r\n\t\t\t\t\t\tsentence.namedEntities.add(properNoun);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (tokenMap.containsKey(properNoun))\r\n\t\t\t\t\tsentence.namedEntities.add(properNoun);\r\n\t\t\t}\r\n\t\t}\r\n\t\tsc.close();\r\n\t}", "public String[][] findSuggestions(String w) {\n ArrayList<String> suggestions = new ArrayList<>();\n String word = w.toLowerCase();\n // parse through the word - changing one letter in the word\n for (int i = 0; i < word.length(); i++) {\n // go through each possible character difference\n for (int j = 0; j < Node.NUM_VALID_CHARS; j++) {\n // get the character that will change in the word\n Character c = (char) ((j < 26) ? j + 'a' : '\\'');\n \n // if the selected character is not the same as the character to change - avoids getting the same word as a suggestion\n if (c != word.charAt(i)) {\n // change the character in the word\n String check = word.substring(0, i) + c.toString() + ((i + 1 < word.length()) ? word.substring(i + 1, word.length()) : \"\");\n\n // if the chenged word is in the dictionary, add it to the list of suggestions\n if (this.checkDictionary(check)) {\n suggestions.add(check);\n }\n }\n }\n }\n \n // parse through the word - adding one letter to the word\n for (int i = 0; i < word.length(); i++) {\n // if the loop is not on the last charcater\n if (i < word.length() - 1) {\n // check words with one character added between current element and next element\n for (int j = 0; j < Node.NUM_VALID_CHARS; j++) {\n Character c = (char) ((j < 26) ? j + 'a' : '\\'');\n\n // add the character to the word\n String check = word.substring(0, i) + c.toString() + ((i < word.length()) ? word.substring(i, word.length()) : \"\");\n\n // if the new word is in the dictionary, add it to the list of suggestions\n if (this.checkDictionary(check)) {\n suggestions.add(check);\n }\n }\n }\n // if the loop is on the last character\n else {\n // check the words with one character added to the end of the word\n for (int j = 0; j < Node.NUM_VALID_CHARS; j++) {\n Character c = (char) ((j < 26) ? j + 'a' : '\\'');\n\n // add the character to the word\n String check = word + c;\n\n // if the new word is in the dictionary, add it to the list of suggestions\n if (this.checkDictionary(check)) {\n suggestions.add(check);\n }\n }\n }\n }\n \n // parse through the word - removing one letter from the word\n for (int i = 0; i < word.length(); i++) {\n // remove the chracter at the selected index from the word\n String check = word.substring(0, i) + ((i + 1 < word.length()) ? word.substring(i + 1, word.length()) : \"\");\n\n // if the chenged word is in the dictionary, add it to the list of suggestions\n if (this.checkDictionary(check)) {\n suggestions.add(check);\n }\n }\n \n String[][] rtn = new String[suggestions.size()][1];\n for (int i = 0, n = suggestions.size(); i < n; i++) {\n rtn[i][0] = suggestions.get(i);\n }\n \n return rtn;\n }", "public Iterable<String> getAllValidWords(BoggleBoard board) {\n m = board.rows();\n n = board.cols();\n graph = new char[m][n];\n marked = new boolean[m][n];\n for (int i = 0; i < m; ++i) {\n for (int j = 0; j < n; ++j) {\n graph[i][j] = board.getLetter(i, j);\n }\n }\n\n words = new HashSet<String>();\n for (int i = 0; i < m; ++i) {\n for (int j = 0; j < n; ++j) {\n dfs(i, j, \"\");\n }\n }\n return words;\n }", "public void run(){\n\t\ttry{\n\t\t\t// lock text up to the end of sentence\n\t\t\tstartScan();\n\t\t\tfor(int i=0;i<sentences.length;i++)\n\t\t\t\tprocessSentence(parseSentence(sentences[i]));\n\t\t}catch(Exception ex){\n\t\t\tex.printStackTrace();\t\n\t\t}finally {\n\t\t\ttry{\n\t\t\t\tstopScan();\n\t\t\t}catch(Exception ex){\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public static List<Sentence> parseDesc(String desc){\n\t\ttry{\n\t\t\tif(sentenceDetector == null)\n\t\t\t\tsentenceDetector = new SentenceDetectorME(new SentenceModel(new FileInputStream(\"en-sent.bin\")));\n\t\t\tif(tokenizer == null)\n\t\t\t\ttokenizer = new TokenizerME(new TokenizerModel(new FileInputStream(\"en-token.bin\")));\n\t\t\tif(tagger == null)\n\t\t\t\ttagger = new POSTaggerME(new POSModel(new FileInputStream(\"en-pos-maxent.bin\")));\n\t\t\tif(chunker == null)\n\t\t\t\tchunker = new ChunkerME(new ChunkerModel(new FileInputStream(\"en-chunker.bin\")));\n\t\t} catch(InvalidFormatException ex) {\n\t\t\tex.printStackTrace();\n\t\t} catch(FileNotFoundException ex){\n\t\t\tex.printStackTrace();\n\t\t} catch(IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tList<Sentence> sentenceList = new LinkedList();\n\t\tString[] sentences = sentenceDetector.sentDetect(desc);\t\t\n\t\tfor(String s : sentences) {\n\t\t\tString[] tokens = tokenizer.tokenize(s);\n\t\t\tString[] posTags = tagger.tag(tokens);\n\t\t\tString[] chunks = chunker.chunk(tokens, posTags);\n\t\t\tList<String> ner = new LinkedList();\n\t\t\tList<String> lemma = new ArrayList();\n\t\t\tfor(String str : tokens) {\n\t\t\t\tlemma.add(str.toLowerCase());\n\t\t\t\tner.add(\"O\"); //assume everything is an object\n\t\t\t}\n\t\t\t\n\t\t\tSentence sentence = new Sentence (Arrays.asList(tokens), lemma, Arrays.asList(posTags), Arrays.asList(chunks), ner, s);\n\t\t\tsentenceList.add(sentence);\n\t\t}\n\t\t\n\t\treturn sentenceList;\n\t}", "public Collection<ConceptLabel> processSentence(Sentence sentence, List messages) {\n\t\t// long time = System.currentTimeMillis();\n\t\t// search in lexicon\n\t\tList<Concept> keys = lookupConcepts(sentence);\n\t\t\t\n\t\t// filter out overlapping numbers\n\t\tfilterNumbers(keys);\n\t\tfilterOverlap(keys);\t\t\t\n\t\t\n\t\t// take out concepts that overlap with new concepts\n\t\tList<ReportConcept> reparsedConcepts = new ArrayList<ReportConcept>();\n\t\tfor (ReportConcept c : concepts) {\n\t\t\t// if existing concept intersects this sentence\n\t\t\tif (intersects(c,sentence.getSpan())) {\n\t\t\t\treparsedConcepts.add(c);\n\t\t\t}\n\t\t}\n\n\t\t// take out concepts that will be reparsed anyway\n\t\tconcepts.removeAll(reparsedConcepts);\n\n\t\t// process phrase\n\t\tList<ConceptLabel> labels = new ArrayList<ConceptLabel>();\n\n\t\tfor (Concept concept : keys) {\n\t\t\t// create new labels\n\t\t\tCollection<ConceptLabel> lbl = createConceptLabels(concept,sentence.getCharOffset());\n\t\t\tlabels.addAll(lbl);\n\n\t\t\t// get entry or create it\n\t\t\tReportConcept entry = createReportConcept(concept);\n\t\t\tentry.addLabels(lbl);\n\n\t\t\t// add to all concepts\n\t\t\tconcepts.add(entry);\n\t\t\t// negatedConcepts.remove(entry);\n\n\t\t\t// process numbers\n\t\t\tfor (ConceptLabel l : lbl)\n\t\t\t\tprocessNumericValues(entry, l);\n\t\t}\n\n\t\t// take care of negation\n\t\tnegex.clear();\n\t\tnegex.process(sentence, keys);\n\t\tlabels.addAll(processNegation(negex, messages));\n\n\t\t// backup concepts so that concepts that were merged outside of parsed\n\t\t// sentence could be removed after processing\n\t\tList<ReportConcept> backup = new ArrayList<ReportConcept>(concepts);\n\t\tbackup.removeAll(reparsedConcepts);\n\t\t\n\t\t// compact concepts to more specific constructs\n\t\tprocessConcepts(concepts);\n\t\n\t\t// at this point we can potentially have a situation where\n\t\t// one concept from this sentence subsumed another from the previous or next \n\t\t// sentence\n\t\tfor(ReportConcept c: backup){\n\t\t\tif(!concepts.contains(c))\n\t\t\t\tremovedConcepts.add(c);\n\t\t}\n\t\t\n\t\t// remove dangling digits and units, cause they are likely to be junk\n\t\tremoveDanglingAttributes();\t\t\n\t\t\n\t\t// now that we may have reparsed some concepts, lets\n\t\t// see if we can retain some of the old data\n\t\tfor (ReportConcept rc : reparsedConcepts) {\n\t\t\t// reparsed concept is in the list, then retain its data, if not\n\t\t\t// then it should be removed\n\t\t\tReportConcept nc = TextHelper.get(concepts, rc);\n\t\t\tif (nc != null) {\n\t\t\t\tnc.setConceptEntry(rc.getConceptEntry());\n\t\t\t} else {\n\t\t\t\tremovedConcepts.add(rc);\n\t\t\t}\n\t\t}\n\n\t\t// negate concepts and proces numbers\n\t\tfor (ReportConcept e : negatedConcepts) {\n\t\t\tReportConcept n = TextHelper.get(concepts, e);\n\t\t\tif (n != null) {\n\t\t\t\tn.setNegation(e.getNegation());\n\t\t\t}\n\t\t}\n\n\t\t// clear negation\n\t\tnegatedConcepts.clear();\n\n\t\t// do eggs\n\t\tEggs.processText(sentence.getOriginalString());\n\t\n\t\t// sync to interface\n\t\tsync();\n\t\t\n\t\treturn labels;\n\t}", "private ArrayList<String> matchingWords(String word){\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tfor(int i=0; i<words.size();i++){\n\t\t\tif(oneCharOff(word,words.get(i))){\n\t\t\t\tlist.add(words.get(i));\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}" ]
[ "0.6483987", "0.64814967", "0.6447754", "0.64288735", "0.6331939", "0.6311955", "0.6253976", "0.6115077", "0.6099947", "0.6085342", "0.6073895", "0.6050363", "0.59663254", "0.5939897", "0.5902931", "0.58798546", "0.5819634", "0.5781347", "0.5752038", "0.5730723", "0.57258594", "0.5645436", "0.56454015", "0.5645021", "0.56440145", "0.56018215", "0.56002307", "0.5553964", "0.5497705", "0.54605126", "0.54415554", "0.5433225", "0.54274213", "0.54239494", "0.54168385", "0.5414931", "0.5409299", "0.540364", "0.53805006", "0.53785336", "0.5377628", "0.53676796", "0.53672004", "0.53639466", "0.53615934", "0.53600776", "0.5322767", "0.5309265", "0.528612", "0.52735543", "0.52734405", "0.52611965", "0.525584", "0.52519715", "0.5246317", "0.5238072", "0.52373034", "0.52306753", "0.52241635", "0.5219586", "0.5212955", "0.52049506", "0.5203309", "0.51948184", "0.51927656", "0.51925385", "0.5180025", "0.517373", "0.51734054", "0.5172031", "0.51717347", "0.5159497", "0.51547", "0.51447725", "0.5143111", "0.5137998", "0.51359147", "0.51320803", "0.51278794", "0.5115039", "0.5114264", "0.5112974", "0.51097876", "0.51047325", "0.50949883", "0.5087044", "0.50703", "0.506771", "0.5065213", "0.50609595", "0.5056672", "0.5055022", "0.50255436", "0.5024846", "0.5010711", "0.5007367", "0.50036985", "0.49961212", "0.49928546", "0.49907428" ]
0.6410676
4
This function recognizes all Named Entities present in each sentence comparing with the named entities list(NER.txt).
public void processNER(ArrayList<Sentence> listofSentences, String path) throws FileNotFoundException { Scanner sc = new Scanner(new File(path)); while (sc.hasNext()) { String properNoun = sc.nextLine(); for (Sentence sentence : listofSentences) { Map<String, Integer> tokenMap = sentence.tokenMap; int index = properNoun.indexOf(" "); if (index > 0) { String[] nameParts = properNoun.split(" "); boolean isPresent = false; for (String name : nameParts) { if (tokenMap.containsKey(name)) isPresent = true; else { isPresent = false; break; } } if (isPresent) { for (String name : nameParts) { int count = tokenMap.get(name); if (count == 1) tokenMap.remove(name); else tokenMap.put(name, count - 1); } tokenMap.put(properNoun, 1); sentence.namedEntities.add(properNoun); } } else if (tokenMap.containsKey(properNoun)) sentence.namedEntities.add(properNoun); } } sc.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void parseEntities() {\n // See: https://github.com/twitter/twitter-text/tree/master/java\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractCashtagsWithIndices(getText()));\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractHashtagsWithIndices(getText()));\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractMentionedScreennamesWithIndices(getText()));\n }", "private void evaluateNamedEntities(String sentence, ResolutionMode resolutionMode,\n\t\t\tList<String> expectedSurfaceList, List<String> expectedTypeNames,\n \t\t\tList<Double> expectedProbList) throws Exception {\n\n List<NamedEntityType> expectedTypeList = new ArrayList<NamedEntityType>();\n for (String name : expectedTypeNames) {\n expectedTypeList.add(NamedEntityType.valueOf(name));\n }\n\n\t\t// Check that Sentence is not empty\n\t\tassertTrue(\"Extracting String: \",\n\t\t\t\tsentence != null && sentence.length() > 0);\n\n\t\tDocument doc = TextToSciXML.textToSciXML(sentence);\n\t\tIProcessingDocument procDoc = ProcessingDocumentFactory.getInstance()\n\t\t\t\t.makeTokenisedDocument(Tokeniser.getDefaultInstance(), doc);\n\t\t// Check that ProcDoc is not empty\n\t\tassertTrue(procDoc != null);\n\n\t\tList<NamedEntity> neList = recogniser.findNamedEntities(\n\t\t\t\tprocDoc.getTokenSequences(), resolutionMode);\n\t\t// Check that neList is not empty\n\t\tassertTrue(neList != null);\n\n\t\tList<String> actualSurfaceList = new ArrayList<String>();\n\t\tList<Object> actualProbList = new ArrayList<Object>();\n\t\tList<NamedEntityType> actualTypeList = new ArrayList<NamedEntityType>();\n\t\tfor (NamedEntity namedEntity : neList) {\n\t\t\t// Using a count to differentiate between duplicates in a list\n\t\t\tint count = 1;\n\t\t\tString surface = namedEntity.getSurface();\n\t\t\twhile (actualSurfaceList.contains(surface + \"_\"\n\t\t\t\t\t+ String.valueOf(count)))\n\t\t\t\tcount++;\n\n\t\t\tsurface = surface + \"_\" + String.valueOf(count);\n\t\t\tactualSurfaceList.add(surface);\n\t\t\tactualTypeList.add(namedEntity.getType());\n\t\t\tactualProbList.add(namedEntity.getConfidence());\n\n\t\t\t// Check if NamedEntity Surface is in the expectedSurfaceList\n\t\t\tassertTrue(surface + \" is a false positive \",\n\t\t\t\t\texpectedSurfaceList.contains(surface));\n\n\t\t\tif (expectedSurfaceList.contains(surface)) {\n\t\t\t\tint index = expectedSurfaceList.indexOf(surface);\n\t\t\t\tassertEquals(\"Type for \" + namedEntity.getSurface(),\n\t\t\t\t\t\texpectedTypeList.get(index), namedEntity.getType());\n\t\t\t\tif (!NamedEntityType.ONTOLOGY.isInstance(namedEntity.getType())\n && !NamedEntityType.LOCANTPREFIX.isInstance(namedEntity.getType())) {\n\t\t\t\t\tassertEquals(\n\t\t\t\t\t\t\t\"Probability for \" + namedEntity.getSurface(),\n\t\t\t\t\t\t\texpectedProbList.get(index),\n\t\t\t\t\t\t\t(Double) namedEntity.getConfidence(), 1E-15);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\tfor (String string : expectedSurfaceList) {\n\t\t\tassertTrue(string + \" is a false negative \",\n\t\t\t\t\tactualSurfaceList.contains(string));\n\t\t}\n\n\t}", "static Set<NLMeaning> extractMeanings(NLText nlText) {\n\t\tSet<NLMeaning> meanings = new HashSet();\n\t\t\n\t\tList<NLSentence> sentences = nlText.getSentences();\n\t\tNLSentence firstSentence = sentences.iterator().next();\n\t\tList<NLToken> tokens = firstSentence.getTokens();\n\t\tList<NLMultiWord> multiWords = firstSentence.getMultiWords();\n\t\tList<NLNamedEntity> namedEntities = firstSentence.getNamedEntities();\n\t\t\n\t\t// Add meanings of all tokens that are not part of multiwords or NEs\n\t\tIterator<NLToken> itToken = tokens.iterator();\n\t\twhile (itToken.hasNext()) {\n\t\t\tSet<NLMeaning> tokenMeanings = getTokenMeanings(itToken.next());\n\t\t\tif (tokenMeanings != null) {\n\t\t\t\tmeanings.addAll(tokenMeanings);\t\t\t\n\t\t\t}\n//\t\t\tNLToken token = itToken.next();\n//\t\t\tboolean hasMultiWords = token.getMultiWords() != null && !token.getMultiWords().isEmpty();\n//\t\t\tboolean hasNamedEntities = token.getNamedEntities() != null && !token.getNamedEntities().isEmpty();\n//\t\t\tif (!hasMultiWords && !hasNamedEntities) {\n//\t\t\t\tif (token.getMeanings() == null || token.getMeanings().isEmpty()) {\n//\t\t\t\t\t// This is a hack to handle a bug where the set of meanings\n//\t\t\t\t\t// is empty but there is a selected meaning.\n//\t\t\t\t\t\n//\t\t\t\t\tNLMeaning selectedMeaning = token.getSelectedMeaning();\n//\t\t\t\t\tif (selectedMeaning != null) {\n//\t\t\t\t\t\tmeanings.add(selectedMeaning);\n//\t\t\t\t\t}\n//\t\t\t\t} else {\n//\t\t\t\t\tmeanings.addAll(token.getMeanings());\n//\t\t\t\t}\n//\t\t\t}\n\t\t}\n\t\t\n\t\t// Add meanings of multiwords and NEs\n\t\tIterator<NLMultiWord> itMultiWord = multiWords.iterator();\n\t\twhile (itMultiWord.hasNext()) {\n\t\t\tNLMultiWord multiWord = itMultiWord.next();\n\t\t\tmeanings.addAll(multiWord.getMeanings());\n\t\t}\n\t\tIterator<NLNamedEntity> itNamedEntity = namedEntities.iterator();\n\t\twhile (itNamedEntity.hasNext()) {\n\t\t\tNLNamedEntity namedEntity = itNamedEntity.next();\n\t\t\tmeanings.addAll(namedEntity.getMeanings());\n\t\t}\n\t\t\n\t\treturn meanings;\n\t}", "public boolean hasNamedEntity(String text)\n\t{\n\t\t//run Stanford NLP on the text\n\t\tsnlp.process(text);\n\t\t\n\t\t//check to see if the text has any named entities\n\t\treturn rec.hasNamedEntity(snlp.getSentences());\n\t}", "public Map<String, Object> getIE(String text, FallBackListBased pd) {\n\t\ttext = text.replaceAll(\" � \", \", \");\n\t\ttext = text.replaceAll(\"'s \", \" \");\n\t\ttext = text.replaceAll(\"'s\", \"\");\n\t\ttext = text.replaceAll(\"�s \", \" \");\n\t\ttext = text.replaceAll(\"�s \", \" \");\n\t\ttext = text.replaceAll(\"\\\\?\", \"\");\n\t\ttext = text.replaceAll(\":\", \"\");\n\t\tMap<String, Object> entities_map = new TreeMap<String, Object>();\n\t\tMap<String, Object> extractedEntities = new TreeMap<String, Object>();\n\t\tList<TreeMap<String, String>> entities = new ArrayList<TreeMap<String, String>>();\n\t\tList<TreeMap<String, String>> intents= new ArrayList<TreeMap<String, String>>();\n\t\tSet<String> intentsList=new HashSet<String>();\n\t\tSet<String> entitiesList=new HashSet<String>();\n\t\t\n\t\tString input = text;\n\t\t// text=text.replaceAll(\" \", \" \");\n\t\tSpan spanSentences[] = pd.sentenceDetector.sentPosDetect(input);\n\t\tint sentenceId = 1;\n\t\tTreeMap<String, String> intents_map = new TreeMap<String, String>();\n\t\tDouble entites_highest_cofidence = 0.0;\n\t\tDouble intents_highest_cofidence = 0.0;\n\t\tfor (Span sentence : spanSentences) {\n\t\t\tArrayList<PhraseTemplate> phrases = pd.GetPhrases(sentence\n\t\t\t\t\t.getCoveredText(input).toString(), sentenceId++);\n\t\t\t\n\t\t\tfor (PhraseTemplate svo : phrases) {\n\t\t\t\tString key = svo.phrase;\n\t\t\t\tkey = key.replaceAll(\" is \", \"\");\n\t\t\t\tkey = key.replaceAll(\"What \", \"\");\n\t\t\t\tkey = key.replaceAll(\"what \", \"\");\n\t\t\t\tkey = key.replaceAll(\" the \", \"\");\n\n\t\t\t\tif (key.length() > 1) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString resolvedEntity = lss.resolveEntity(key\n\t\t\t\t\t\t\t\t.toLowerCase().trim().toString(),\n\t\t\t\t\t\t\t\t\"entitesIndex\");\n\t\t\t\t\t\tString tokens[] = resolvedEntity.split(\"__\");\n//\t\t\t\t\t\tSystem.out.println(resolvedEntity+\" :: \"+key);\n\t\t\t\t\t\tif (tokens.length < 2)\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"entity\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim())>0.9)\n\t\t\t\t\t\t\tentitiesList.add(tokens[5].trim());\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"entity\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim()) > entites_highest_cofidence) {\n\t\t\t\t\t\t\tentities_map.clear();\n\t\t\t\t\t\t\tentities_map.put(\"Entity\", key.trim());\n\t\t\t\t\t\t\tentities_map.put(\"MappedEntity\", tokens[4].trim());\n\t\t\t\t\t\t\tentities_map.put(\"EntityConfidenceScore\", tokens[5].trim());\n\t\t\t\t\t\t\tentities_map.put(\"MappedEntityType\", tokens[2].trim());\n\t\t\t\t\t\t\tentites_highest_cofidence = Double\n\t\t\t\t\t\t\t\t\t.parseDouble(tokens[5].trim());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"intent\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim())>0.9)\n\t\t\t\t\t\t\tintentsList.add(tokens[5].trim());\n\t\t\t\t\t\tif (tokens[1].trim().startsWith(\"intent\")\n\t\t\t\t\t\t\t\t&& Double.parseDouble(tokens[5].trim()) > intents_highest_cofidence) {\n\t\t\t\t\t\t\tintents_map.clear();\n\t\t\t\t\t\t\tintents_map.put(\"Id\", tokens[0].trim());\n\t\t\t\t\t\t\tintents_map.put(\"Extracted Entity\", key.trim());\n\t\t\t\t\t\t\tintents_map.put(\"Mapped Entity\", tokens[4].trim());\n\t\t\t\t\t\t\tintents_map.put(\"Confidence\", tokens[5].trim());\n\t\t\t\t\t\t\tintents_map.put(\"Class\", tokens[1].trim());\n\t\t\t\t\t\t\tintents_highest_cofidence = Double\n\t\t\t\t\t\t\t\t\t.parseDouble(tokens[5].trim());\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tentities_map.put(\"Intent\", intents_map.get(\"Extracted Entity\"));\n\t\tentities_map.put(\"MappedIntent\", intents_map.get(\"Mapped Entity\"));\n\t\tentities_map.put(\"IntentConfidenceScore\", intents_map.get(\"Confidence\"));\n\n\t\treturn entities_map;\n\t}", "@Before\n\tpublic void setUp() throws Exception {\n\t\tList<Paragraph> paragraphs = new ArrayList<Paragraph>();\n\t\tList<Paragraph> paragraphsWithNoSentences = new ArrayList<Paragraph>();\n\t\t\n\t\tScanner sc = null, sc1 = null;\n\t\ttry {\n\t\t\tsc = new Scanner(new File(\"testsearchtext.txt\"));\n\t\t\tsc1 = new Scanner(new File(\"testsearchentity.txt\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsc.useDelimiter(\"[.]\");\n\t\tsc1.useDelimiter(\"[|]\");\n\t\t\n\t\tList<Sentence> sentences = new ArrayList<Sentence>();\n\t\tint sCount = 0;\n\t\tint pCount = 0;\n\t\twhile(sc.hasNext()){\n\t\t\tString temp = sc.next().trim();\n\n\t\t\tif(sCount > 0 && (sCount%10 == 0 || !sc.hasNext())){\n\t\t\t\tParagraph p = new Paragraph(pCount);\n\t\t\t\tparagraphsWithNoSentences.add(p);\n\t\t\t\t\n\t\t\t\tp = new Paragraph(pCount);\n\t\t\t\tp.setSentences(sentences);\n\t\t\t\tparagraphs.add(p);\n\t\t\t\tpCount++;\n\t\t\t\t\n\t\t\t\tsentences = new ArrayList<Sentence>();\n\t\t\t}\n\t\t\t\n\t\t\tif(!temp.equals(\"\"))\n\t\t\t\tsentences.add(new Sentence((sCount%10), temp));\n\t\t\t\n\t\t\tsCount++;\n\t\t}\n\t\t\n\t\tList<Entity> entities = new ArrayList<Entity>();\n\t\tint currType = -1; \n\t\twhile(sc1.hasNext()){\n\t\t\tString temp = sc1.next().trim();\n\t\t\tif(temp.equals(\"place\")){currType = Entity.PLACE;} else\n\t\t\tif(temp.equals(\"url\")){currType = Entity.URL;} else\n\t\t\tif(temp.equals(\"email\")){currType = Entity.EMAIL;} else\n\t\t\tif(temp.equals(\"address\")){currType = Entity.ADDRESS;} \n\t\t\telse{\n\t\t\t\tentities.add(new Entity(currType, temp));\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSource s = new Source(\"testsearchtext.txt\", \"testsearchtext.txt\");\n\t\tpt1 = new ProcessedText(s, paragraphs, null); \n\t\t\n\t\ts = new Source(\"testsearchtext1.txt\", \"testsearchtext1.txt\");\n\t\tpt2 = new ProcessedText(s, paragraphsWithNoSentences, null); \n\t\t\n\t\tpt3 = new ProcessedText();\n\t\tpt3.setParagraphs(paragraphs);\n\t\t\n\t\tpt4 = new ProcessedText();\n\t\ts = new Source(\"testsearchtext2.txt\", \"testsearchtext2.txt\");\n\t\tpt4.setMetadata(s);\n\t\t\n\t\ts = new Source(\"testsearchtext3.txt\", \"testsearchtext3.txt\");\n\t\tpt5 = new ProcessedText(s, paragraphs, entities); \n\t\t\n\t\ts = new Source(\"testsearchtext4.txt\", \"testsearchtext4.txt\");\n\t\tpt6 = new ProcessedText(s, null, entities); \n\t}", "public static List<ExtractedEntity> extractEntities(String text){\n\t\tList<ExtractedEntity> extractedConcepts = new ArrayList<ExtractedEntity>();\n\t\tZemanta zem = new Zemanta(ZEMAMTA_API_KEY);\t\n\t\tZemantaResult zemResult = zem.suggest(text);\n\t\tString cid = zemResult.rid;\n\t\tfor(Link link : zemResult.markup.links){\n\t\t\tString term = link.anchor;\n\t\t\tfor(Target target : link.targets){\n\t\t\t\tif(target.url != null && target.url.startsWith(\"http://en.wikipedia.org/wiki/\")){\n\t\t\t\t\tExtractedEntity entity = new AlchemyAnnotator().new ExtractedEntity();\n\t\t\t\t\tentity.name = target.title;\n\t\t\t\t\tentity.type = target.type.name();\n\t\t\t\t\tentity.uri = target.url.replace(\"http://en.wikipedia.org/wiki/\", \"http://dbpedia.org/resource/\");\n\t\t\t\t\tentity.score = new Float(link.confidence).doubleValue();\n\t\t\t\t\tentity.text = link.anchor;\n\t\t\t\t\textractedConcepts.add(entity);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn extractedConcepts;\n\t}", "public String extractNamedEntities(String pInputLine,\n NamedEntityOwner pMyNamedEntityOwner) {\n \n MyNamedEntityOwner = pMyNamedEntityOwner;\n \n PreviouslyExtractedNEs1 = MyNamedEntityOwner.getNumberOfNamedEntities();\n String result = MyRegexBasicNeExtractor\n .replaceRegexBasicNamedEntities(pInputLine, MyNamedEntityOwner);\n result = MyOrganizationBasicNeExtractor\n .replaceOrganizationBasicNamedEntities(result, MyNamedEntityOwner,\n NeDictionary);\n result = MyPlaceBasicNeExtractor\n .replacePlaceBasicNamedEntities(result, MyNamedEntityOwner,\n NeDictionary);\n PreviouslyExtractedNEs2 = MyNamedEntityOwner.getNumberOfNamedEntities();\n result = MyPersonNameBasicNeExtractor\n .replacePersonNameBasicNamedEntities(result, MyNamedEntityOwner,\n NeDictionary);\n if (ExtractProfessions && PreviouslyExtractedNEs2 < MyNamedEntityOwner\n .getNumberOfNamedEntities()) {\n result = MyProfessionBasicNeExtractor\n .replaceProfessionBasicNamedEntities(result, MyNamedEntityOwner,\n NeDictionary);\n }\n if (ExtractStreetNes) {\n result = MyStreetBasicNeExtractor\n .replaceStreetBasicNamedEntities(result, MyNamedEntityOwner,\n NeDictionary);\n }\n if (ExtractCompositeNes && (MyNamedEntityOwner.getNumberOfNamedEntities()\n - PreviouslyExtractedNEs1) > 0) {\n result = MyCompositeNeExtractor.replaceCompositeNamedEntities(result,\n MyNamedEntityOwner);\n }\n \n return result;\n \n }", "public void loadEntities (File entitiesFile){\n BufferedReader br = null;\n int lineNum = 0;\n try {\n String term;\n br = new BufferedReader(new FileReader(entitiesFile));\n String line = \"\";\n while ((line = (br.readLine())) != null) {\n lineNum++;\n if (!line.contains(\"--noEntities--\")) {\n String docId = line.substring(0, line.indexOf(\":\"));\n String [] entitiesStr = line.split(\"; \");\n if (entitiesStr.length > 0){\n entitiesStr[0] = entitiesStr[0].substring(line.indexOf(\":\") + 2);\n }\n HashMap <String, Integer> entitiesInfo = new HashMap<>();\n for (int i = 0; i < entitiesStr.length ; i++){\n String [] entitiesRankStr = entitiesStr[i].split(\" - \");\n if (entitiesRankStr.length < 2){\n System.out.println(lineNum + \" \" + entitiesRankStr[0]);\n }\n entitiesInfo.put(entitiesRankStr[0], Integer.parseInt(entitiesRankStr[1]));\n }\n entities.put(docId, entitiesInfo);\n }\n }\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public ArrayList<String> makeSentences(String text) {\n \t\t/*\n \t\t * Quick check so we're not trying to split up an empty\n \t\t * String. This only happens right before the user types\n \t\t * at the end of a document and we don't have anything to\n \t\t * split, so return.\n \t\t */\n \t\tif (text.equals(\"\")) {\n \t\t\tArrayList<String> sents = new ArrayList<String>();\n \t\t\tsents.add(\"\");\n \t\t\treturn sents;\n \t\t}\n \t\t\n \t\t/**\n \t\t * Because the eosTracker isn't initialized until the TaggedDocument is,\n \t\t * it won't be ready until near the end of DocumentProcessor, in which\n \t\t * case we want to set it to the correct\n \t\t */\n \t\tthis.eosTracker = main.editorDriver.taggedDoc.eosTracker;\n \t\tthis.editorDriver = main.editorDriver;\n \t\t\n \t\tArrayList<String> sents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES);\n \t\tArrayList<String> finalSents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES);\n \t\tboolean mergeNext = false;\n \t\tboolean mergeWithLast = false;\n \t\tboolean forceNoMerge = false;\n \t\tint currentStart = 1;\n \t\tint currentStop = 0;\n \t\tString temp;\n \n \t\t/**\n \t\t * replace unicode format characters that will ruin the regular\n \t\t * expressions (because non-printable characters in the document still\n \t\t * take up indices, but you won't know they're there untill you\n \t\t * \"arrow\" though the document and have to hit the same arrow twice to\n \t\t * move past a certain point. Note that we must use \"Cf\" rather than\n \t\t * \"C\". If we use \"C\" or \"Cc\" (which includes control characters), we\n \t\t * remove our newline characters and this screws up the document. \"Cf\"\n \t\t * is \"other, format\". \"Cc\" is \"other, control\". Using \"C\" will match\n \t\t * both of them.\n \t\t */\n \t\ttext = text.replaceAll(\"\\u201C\",\"\\\"\");\n \t\ttext = text.replaceAll(\"\\u201D\",\"\\\"\");\n \t\ttext = text.replaceAll(\"\\\\p{Cf}\",\"\");\n \n \t\tint lenText = text.length();\n \t\tint index = 0;\n \t\tint buffer = editorDriver.sentIndices[0];\n \t\tString safeString = \"\";\n \t\tMatcher abbreviationFinder = ABBREVIATIONS_PATTERN.matcher(text);\n \t\t\n \t\t//================ SEARCHING FOR ABBREVIATIONS ================\n \t\twhile (index < lenText-1 && abbreviationFinder.find(index)) {\n \t\t\tindex = abbreviationFinder.start();\n \t\t\t\n \t\t\ttry {\n \t\t\t\tint abbrevLength = index;\n \t\t\t\twhile (text.charAt(abbrevLength) != ' ') {\n \t\t\t\t\tabbrevLength--;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (ABBREVIATIONS.contains(text.substring(abbrevLength+1, index+1))) {\n \t\t\t\t\teosTracker.setIgnore(index+buffer, true);\n \t\t\t\t}\n \t\t\t} catch (Exception e) {}\n \t\t\t\n \t\t\tindex++;\n \t\t}\t\t\n \t\t\n \t\tMatcher sent = EOS_chars.matcher(text);\n \t\tboolean foundEOS = sent.find(currentStart); // xxx TODO xxx take this EOS character, and if not in quotes, swap it for a permanent replacement, and create and add an EOS to the calling TaggedDocument's eosTracker.\n \t\t\n \t\t/*\n \t\t * We want to check and make sure that the EOS character (if one was found) is not supposed to be ignored. If it is, we will act like we did not\n \t\t * find it. If there are multiple sentences with multiple EOS characters passed it will go through each to check, foundEOS will only be true if\n \t\t * an EOS exists in \"text\" that would normally be an EOS character and is not set to be ignored.\n \t\t */\n \t\t\n \t\tindex = 0;\n \t\tif (foundEOS) {\t\n \t\t\ttry {\n \t\t\t\twhile (index < lenText-1 && sent.find(index)) {\n \t\t\t\t\tindex = sent.start();\n \t\t\t\t\tif (!eosTracker.sentenceEndAtIndex(index+buffer)) {\n \t\t\t\t\t\tfoundEOS = false;\n \t\t\t\t\t} else {\n \t\t\t\t\t\tfoundEOS = true;\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\tindex++;\n \t\t\t\t}\n \t\t\t} catch (IllegalStateException e) {}\n \t\t}\n \t\t//We need to reset the Matcher for the code below\n \t\tsent = EOS_chars.matcher(text);\n \t\tsent.find(currentStart);\n \t\t\n \t\tMatcher sentEnd;\n \t\tMatcher citationFinder;\n \t\tboolean hasCitation = false;\n \t\tint charNum = 0;\n \t\tint lenTemp = 0;\n \t\tint lastQuoteAt = 0;\n \t\tint lastParenAt = 0;\n \t\tboolean foundQuote = false;\n \t\tboolean foundParentheses = false;\n \t\tboolean isSentence;\n \t\tboolean foundAtLeastOneEOS = foundEOS;\n \t\t\n \t\t/**\n \t\t * Needed otherwise when the user has text like below:\n \t\t * \t\tThis is my sentence one. This is \"My sentence?\" two. This is the last sentence.\n \t\t * and they begin to delete the EOS character as such:\n \t\t * \t\tThis is my sentence one. This is \"My sentence?\" two This is the last sentence.\n \t\t * Everything gets screwed up. This is because the operations below operate as expected only when there actually is an EOS character\n \t\t * at the end of the text, it expects it there in order to function properly. Now usually if there is no EOS character at the end it wouldn't\n \t\t * matter since the while loop and !foundAtLeastOneEOS conditional are executed properly, BUT as you can see the quotes, or more notably the EOS character inside\n \t\t * the quotes, triggers this initial test and thus the operation breaks. This is here just to make sure that does not happen.\n \t\t */\n \t\tString trimmedText = text.trim();\n \t\tint trimmedTextLength = trimmedText.length();\n \n \t\t//We want to make sure that if there is an EOS character at the end that it is not supposed to be ignored\n \t\tboolean EOSAtSentenceEnd = true;\n \t\tif (trimmedTextLength != 0) {\n \t\t\tEOSAtSentenceEnd = EOS.contains(trimmedText.substring(trimmedTextLength-1, trimmedTextLength)) && eosTracker.sentenceEndAtIndex(editorDriver.sentIndices[1]-1);\n \t\t} else {\n \t\t\tEOSAtSentenceEnd = false;\n \t\t}\n \t\t\n \t\t//Needed so that if we are deleting abbreviations like \"Ph.D.\" this is not triggered.\n \t\tif (!EOSAtSentenceEnd && (editorDriver.taggedDoc.watchForEOS == -1))\n \t\t\tEOSAtSentenceEnd = true;\n \n \t\twhile (foundEOS == true) {\n \t\t\tcurrentStop = sent.end();\n \t\t\t\n \t\t\t//We want to make sure currentStop skips over ignored EOS characters and stops only when we hit a true EOS character\n \t\t\ttry {\n \t\t\t\twhile (!eosTracker.sentenceEndAtIndex(currentStop+buffer-1) && currentStop != lenText) {\n \t\t\t\t\tsent.find(currentStop+1);\n \t\t\t\t\tcurrentStop = sent.end();\n \t\t\t\t}\n \t\t\t} catch (Exception e) {}\n \n \t\t\ttemp = text.substring(currentStart-1,currentStop);\n \t\t\tlenTemp = temp.length();\n \t\t\tlastQuoteAt = 0;\n \t\t\tlastParenAt = 0;\n \t\t\tfoundQuote = false;\n \t\t\tfoundParentheses = false;\n \t\t\t\n \t\t\tfor(charNum = 0; charNum < lenTemp; charNum++){\n \t\t\t\tif (temp.charAt(charNum) == '\\\"') {\n \t\t\t\t\tlastQuoteAt = charNum;\n \t\t\t\t\t\n \t\t\t\t\tif (foundQuote == true)\n \t\t\t\t\t\tfoundQuote = false;\n \t\t\t\t\telse\n \t\t\t\t\t\tfoundQuote = true;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (temp.charAt(charNum) == '(') {\n \t\t\t\t\tlastParenAt = charNum;\n \t\t\t\t\t\n \t\t\t\t\tif (foundParentheses)\n \t\t\t\t\t\tfoundParentheses = false;\n \t\t\t\t\telse\n \t\t\t\t\t\tfoundParentheses = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (foundQuote == true && ((temp.indexOf(\"\\\"\",lastQuoteAt+1)) == -1)) { // then we found an EOS character that shouldn't split a sentence because it's within an open quote.\n \t\t\t\tif ((currentStop = text.indexOf(\"\\\"\",currentStart +lastQuoteAt+1)) == -1) {\n \t\t\t\t\tcurrentStop = text.length(); // if we can't find a closing quote in the rest of the input text, then we assume the author forgot to put a closing quote, and act like it's at the end of the input text.\n \t\t\t\t}\n \t\t\t\telse{\n \t\t\t\t\tcurrentStop +=1;\n \t\t\t\t\tmergeNext=true;// the EOS character we are looking for is not in this section of text (section being defined as a substring of 'text' between two EOS characters.)\n \t\t\t\t}\n \t\t\t}\n \t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\n \t\t\tif (foundParentheses && ((temp.indexOf(\")\", lastParenAt+1)) == -1)) {\n \t\t\t\tif ((currentStop = text.indexOf(\")\", currentStart + lastParenAt + 1)) == -1)\n \t\t\t\t\tcurrentStop = text.length();\n \t\t\t\telse {\n \t\t\t\t\tcurrentStop += 1;\n \t\t\t\t\tmergeNext = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \n \t\t\tif (foundQuote) {\n \t\t\t\tsentEnd = SENTENCE_QUOTE.matcher(text);\t\n \t\t\t\tisSentence = sentEnd.find(currentStop-2); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).)\n \n \t\t\t\tif (isSentence == true) { // If it seems that the text looks like this: He said, \"Hello.\" Then she said, \"Hi.\" \n \t\t\t\t\t// Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, \"Hello.\")\n \t\t\t\t\tcurrentStop = text.indexOf(\"\\\"\",sentEnd.start())+1;\n \t\t\t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\t\tforceNoMerge = true;\n \t\t\t\t\tmergeNext = false;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (foundParentheses) {\n \t\t\t\tsentEnd = SENTENCE_PARENTHESES.matcher(text);\n \t\t\t\tisSentence = sentEnd.find(currentStop-2);\n \t\t\t\t\n \t\t\t\tif (isSentence == true) {\n \t\t\t\t\tcurrentStop = text.indexOf(\")\", sentEnd.start()) + 1;\n \t\t\t\t\tsafeString = text.substring(currentStart-1, currentStop);\n \t\t\t\t\tforceNoMerge = true;\n \t\t\t\t\tmergeNext = false;\n \t\t\t\t}\n \t\t\t}\n \n \t\t\t// now check to see if there is a CITATION after the sentence (doesn't just apply to quotes due to paraphrasing)\n \t\t\t// The rule -- at least as of now -- is if after the EOS mark there is a set of parenthesis containing either one word (name) or a name and numbers (name 123) || (123 name) || (123-456 name) || (name 123-456) || etc..\n \t\t\tcitationFinder = CITATION.matcher(text.substring(currentStop));\t\n \t\t\thasCitation = citationFinder.find(); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).)\n \t\t\t\n \t\t\tif (hasCitation == true) { // If it seems that the text looks like this: He said, \"Hello.\" Then she said, \"Hi.\" \n \t\t\t\t// Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, \"Hello.\")\n \t\t\t\tcurrentStop = text.indexOf(\")\",citationFinder.start()+currentStop)+1;\n \t\t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\tmergeNext = false;\n \t\t\t}\t\n \t\t\t\n \t\t\tif (mergeWithLast) {\n \t\t\t\tmergeWithLast=false;\n \t\t\t\tString prev=sents.remove(sents.size()-1);\n \t\t\t\tsafeString=prev+safeString;\n \t\t\t}\n \t\t\t\n \t\t\tif (mergeNext && !forceNoMerge) {//makes the merge happen on the next pass through\n \t\t\t\tmergeNext=false;\n \t\t\t\tmergeWithLast=true;\n \t\t\t} else {\n \t\t\t\tforceNoMerge = false;\n \t\t\t\tfinalSents.add(safeString);\n \t\t\t}\n \t\t\n \t\t\tsents.add(safeString);\n \t\t\t\n \t\t\t//// xxx xxx xxx return the safeString_subbedEOS too!!!!\n \t\t\tif (currentStart < 0 || currentStop < 0) {\n \t\t\t\tLogger.logln(NAME+\"Something went really wrong making sentence tokens.\", LogOut.STDERR);\n \t\t\t\tErrorHandler.fatalProcessingError(null);\n \t\t\t}\n \n \t\t\tcurrentStart = currentStop+1;\n \t\t\tif (currentStart >= lenText) {\n \t\t\t\tfoundEOS = false;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tfoundEOS = sent.find(currentStart);\n \t\t}\n \n \t\tif (!foundAtLeastOneEOS || !EOSAtSentenceEnd) {\n \t\t\tArrayList<String> wrapper = new ArrayList<String>(1);\n \t\t\twrapper.add(text);\n \t\t\treturn wrapper;\n \t\t}\n \t\t\n \t\treturn finalSents;\n \t}", "private List<EntityAnnotation> sciGraphAnnotate(String text) throws AnnotationException\n {\n List<EntityAnnotation> entities;\n try {\n StringReader reader = new StringReader(text);\n EntityFormatConfiguration.Builder builder = new EntityFormatConfiguration.Builder(reader);\n builder.includeCategories(CATEGORIES);\n builder.longestOnly(false);\n builder.includeAbbreviations(false);\n builder.includeAncronyms(false);\n builder.includeNumbers(false);\n entities = wrapper.annotate(builder.get());\n } catch (IOException e) {\n throw new AnnotationException(e.getMessage());\n }\n return entities;\n }", "public static void main(String[] args) throws FileNotFoundException {\n\n Scanner readFile = new Scanner(new File(\"sentences.txt\"));\n \n //Boolean to make sure parameters fit the finalized tokens\n boolean okay = true; \n \n while (readFile.hasNext()) {\n Stemmer s = new Stemmer();\n String token = readFile.next();\n okay = true;\n \n //Section to ensure no numerics\n if (token.contains(\"1\") || token.contains(\"2\"))\n okay = false;\n else if (token.contains(\"3\")||token.contains(\"4\"))\n okay = false;\n else if (token.contains(\"5\")||token.contains(\"6\"))\n okay = false;\n else if (token.contains(\"7\")||token.contains(\"8\"))\n okay = false;\n else if (token.contains(\"9\")||token.contains(\"0\"))\n okay = false;\n else {\n \n //remove characters\n token = token.replace(\"\\,\", \" \");\n token = token.replace(\"\\.\", \" \");\n token = token.replace(\"\\\"\", \" \");\n token = token.replace(\"\\(\", \" \");\n token = token.replace(\"\\)\", \" \");\n token = token.replace(\"'s\", \" \");\n token = token.trim();\n token = token.toLowerCase();\n }\n \n //Giant hard coded section to remove numerics\n if (token.compareTo(\"a\")==0)\n okay=false;\n if (token.compareTo(\"able\")==0)\n okay=false;\n if (token.compareTo(\"about\")==0)\n okay=false;\n if (token.compareTo(\"across\")==0)\n okay=false;\n if (token.compareTo(\"after\")==0)\n okay=false;\n if (token.compareTo(\"all\")==0)\n okay=false;\n if (token.compareTo(\"almost\")==0)\n okay=false;\n if (token.compareTo(\"also\")==0)\n okay=false;\n if (token.compareTo(\"am\")==0)\n okay=false;\n if (token.compareTo(\"among\")==0)\n okay=false;\n if (token.compareTo(\"an\")==0)\n okay=false;\n if (token.compareTo(\"and\")==0)\n okay=false;\n if (token.compareTo(\"any\")==0)\n okay=false;\n if (token.compareTo(\"are\")==0)\n okay=false;\n if (token.compareTo(\"as\")==0)\n okay=false;\n if (token.compareTo(\"at\")==0)\n okay=false;\n if (token.compareTo(\"be\")==0)\n okay=false;\n if (token.compareTo(\"because\")==0)\n okay=false;\n if (token.compareTo(\"been\")==0)\n okay=false;\n if (token.compareTo(\"but\")==0)\n okay=false;\n if (token.compareTo(\"by\")==0)\n okay=false;\n if (token.compareTo(\"can\")==0)\n okay=false;\n if (token.compareTo(\"cannot\")==0)\n okay=false;\n if (token.compareTo(\"could\")==0)\n okay=false;\n if (token.compareTo(\"dear\")==0)\n okay=false;\n if (token.compareTo(\"did\")==0)\n okay=false;\n if (token.compareTo(\"do\")==0)\n okay=false;\n if (token.compareTo(\"does\")==0)\n okay=false;\n if (token.compareTo(\"either\")==0)\n okay=false;\n if (token.compareTo(\"else\")==0)\n okay=false;\n if (token.compareTo(\"ever\")==0)\n okay=false;\n if (token.compareTo(\"every\")==0)\n okay=false;\n if (token.compareTo(\"for\")==0)\n okay=false;\n if (token.compareTo(\"from\")==0)\n okay=false;\n if (token.compareTo(\"get\")==0)\n okay=false;\n if (token.compareTo(\"got\")==0)\n okay=false;\n if (token.compareTo(\"had\")==0)\n okay=false;\n if (token.compareTo(\"has\")==0)\n okay=false;\n if (token.compareTo(\"have\")==0)\n okay=false;\n if (token.compareTo(\"he\")==0)\n okay=false;\n if (token.compareTo(\"her\")==0)\n okay=false;\n if (token.compareTo(\"hers\")==0)\n okay=false;\n if (token.compareTo(\"him\")==0)\n okay=false;\n if (token.compareTo(\"his\")==0)\n okay=false;\n if (token.compareTo(\"how\")==0)\n okay=false;\n if (token.compareTo(\"however\")==0)\n okay=false;\n if (token.compareTo(\"i\")==0)\n okay=false;\n if (token.compareTo(\"if\")==0)\n okay=false;\n if (token.compareTo(\"in\")==0)\n okay=false;\n if (token.compareTo(\"into\")==0)\n okay=false;\n if (token.compareTo(\"is\")==0)\n okay=false;\n if (token.compareTo(\"it\")==0)\n okay=false;\n if (token.compareTo(\"its\")==0)\n okay=false;\n if (token.compareTo(\"just\")==0)\n okay=false;\n if (token.compareTo(\"least\")==0)\n okay=false;\n if (token.compareTo(\"let\")==0)\n okay=false;\n if (token.compareTo(\"like\")==0)\n okay=false;\n if (token.compareTo(\"likely\")==0)\n okay=false;\n if (token.compareTo(\"may\")==0)\n okay=false;\n if (token.compareTo(\"me\")==0)\n okay=false;\n if (token.compareTo(\"might\")==0)\n okay=false;\n if (token.compareTo(\"most\")==0)\n okay=false;\n if (token.compareTo(\"must\")==0)\n okay=false;\n if (token.compareTo(\"my\")==0)\n okay=false;\n if (token.compareTo(\"neither\")==0)\n okay=false;\n if (token.compareTo(\"no\")==0)\n okay=false;\n if (token.compareTo(\"nor\")==0)\n okay=false;\n if (token.compareTo(\"not\")==0)\n okay=false;\n if (token.compareTo(\"of\")==0)\n okay=false;\n if (token.compareTo(\"off\")==0)\n okay=false;\n if (token.compareTo(\"often\")==0)\n okay=false;\n if (token.compareTo(\"on\")==0)\n okay=false;\n if (token.compareTo(\"only\")==0)\n okay=false;\n if (token.compareTo(\"or\")==0)\n okay=false;\n if (token.compareTo(\"other\")==0)\n okay=false;\n if (token.compareTo(\"our\")==0)\n okay=false;\n if (token.compareTo(\"own\")==0)\n okay=false;\n if (token.compareTo(\"rather\")==0)\n okay=false;\n if (token.compareTo(\"said\")==0)\n okay=false;\n if (token.compareTo(\"say\")==0)\n okay=false;\n if (token.compareTo(\"says\")==0)\n okay=false;\n if (token.compareTo(\"she\")==0)\n okay=false;\n if (token.compareTo(\"should\")==0)\n okay=false;\n if (token.compareTo(\"since\")==0)\n okay=false;\n if (token.compareTo(\"so\")==0)\n okay=false;\n if (token.compareTo(\"some\")==0)\n okay=false;\n if (token.compareTo(\"than\")==0)\n okay=false;\n if (token.compareTo(\"that\")==0)\n okay=false;\n if (token.compareTo(\"the\")==0)\n okay=false;\n if (token.compareTo(\"their\")==0)\n okay=false;\n if (token.compareTo(\"them\")==0)\n okay=false;\n if (token.compareTo(\"then\")==0)\n okay=false;\n if (token.compareTo(\"there\")==0)\n okay=false;\n if (token.compareTo(\"these\")==0)\n okay=false;\n if (token.compareTo(\"they\")==0)\n okay=false;\n if (token.compareTo(\"this\")==0)\n okay=false;\n if (token.compareTo(\"tis\")==0)\n okay=false;\n if (token.compareTo(\"to\")==0)\n okay=false;\n if (token.compareTo(\"too\")==0)\n okay=false;\n if (token.compareTo(\"twas\")==0)\n okay=false;\n if (token.compareTo(\"us\")==0)\n okay=false;\n if (token.compareTo(\"wants\")==0)\n okay=false;\n if (token.compareTo(\"was\")==0)\n okay=false;\n if (token.compareTo(\"we\")==0)\n okay=false;\n if (token.compareTo(\"were\")==0)\n okay=false;\n if (token.compareTo(\"what\")==0)\n okay=false;\n if (token.compareTo(\"when\")==0)\n okay=false;\n if (token.compareTo(\"where\")==0)\n okay=false;\n if (token.compareTo(\"which\")==0)\n okay=false;\n if (token.compareTo(\"while\")==0)\n okay=false;\n if (token.compareTo(\"who\")==0)\n okay=false;\n if (token.compareTo(\"whom\")==0)\n okay=false;\n if (token.compareTo(\"why\")==0)\n okay=false;\n if (token.compareTo(\"will\")==0)\n okay=false;\n if (token.compareTo(\"with\")==0)\n okay=false;\n if (token.compareTo(\"would\")==0)\n okay=false;\n if (token.compareTo(\"yet\")==0)\n okay=false;\n if (token.compareTo(\"you\")==0)\n okay=false;\n if (token.compareTo(\"your\")==0)\n okay=false;\n \n //Stemming process\n if(okay){\n s.add(token.toCharArray(),token.length());\n s.stem();\n token = s.toString();\n }\n \n //to make sure there are no duplicates\n if (tokenList.contains(token))\n okay = false;\n \n //Finalizing tokens\n if (okay)\n tokenList.add(token);\n \n\n }\n //System.out.println(i);\n System.out.println(tokenList.size());\n System.out.println(tokenList);\n readFile.close();\n \n Scanner readFile2 = new Scanner(new File(\"sentences.txt\"));\n \n \n //intializing TDMatrix\n int[][] tdm = new int[46][tokenList.size()];\n int i = 0;\n int j = 0;\n \n while (i<46){\n j=0;\n while (j < tokenList.size()){\n tdm[i][j]=0;\n j++;\n }\n i++;\n }\n \n String str;\n i=0;\n while (readFile2.hasNextLine()) {\n str=readFile2.nextLine();\n \n j=0;\n while (j<tokenList.size()){\n while ((str.contains(tokenList.get(j)))){\n tdm[i][j]++;\n str = str.replaceFirst(tokenList.get(j), \"***\");\n }\n j++;\n }\n \n i++;\n }\n \n i=0;\n while (i<46){\n j=0;\n while (j<tokenList.size()){\n System.out.print(tdm[i][j] + \" \");\n j++;\n }\n System.out.println(\"\");\n i++;\n }\n \n readFile.close();\n }", "@Override\n public BatchDetectEntitiesResult batchDetectEntities(BatchDetectEntitiesRequest request) {\n request = beforeClientExecution(request);\n return executeBatchDetectEntities(request);\n }", "public static HashMultimap<Word, EntityMention> getWord2Entities(JCas aJCas) {\n HashMultimap<Word, EntityMention> word2EntityMentions = HashMultimap.create();\n for (EntityMention em : UimaConvenience.getAnnotationList(aJCas, EntityMention.class)) {\n List<Word> coveredWords = JCasUtil.selectCovered(Word.class, em);\n for (Word coveredWord : coveredWords) {\n word2EntityMentions.put(coveredWord, em);\n }\n }\n return word2EntityMentions;\n }", "private Map<String, Map<String,Integer>> openNLPParse(String text) {\n\t\tMap<String, Map<String,Integer>> result = new HashMap<String, Map<String,Integer>>();\n\t\tString path = \"\";\n\t\t\n\t\tfor (String type : this.entityTypes) {\n\t\t\tpath = \"en-ner-\" + type.toLowerCase() + \".bin\";\n\t\t\tthis.nlp = new OpenNLPNameFinder(type, path);\n\t\t\tMap<String,Integer> entities = nlp.recogniseWithCounts(text);\n\t\t\tresult.put(type, entities);\n\t\t}\n\n\t\treturn result;\n\t}", "public List<String> getRelatedWords(String word) throws IOException {\n List<String> result = new ArrayList<String>();\n IDictionary dict = new Dictionary(new File(WORDNET_LOCATION));\n try {\n dict.open();\n IStemmer stemmer = new WordnetStemmer(dict);\n for (POS pos : EnumSet.of(POS.ADJECTIVE, POS.ADVERB, POS.NOUN, POS.VERB)) {\n List<String> resultForPos = new ArrayList<String>();\n List<String> stems = new ArrayList<String>();\n stems.add(word);\n for (String stem : stemmer.findStems(word, pos)) {\n if (!stems.contains(stem))\n stems.add(stem);\n }\n for (String stem : stems) {\n if (!resultForPos.contains(stem)) {\n resultForPos.add(stem);\n IIndexWord idxWord = dict.getIndexWord(stem, pos);\n if (idxWord == null) continue;\n List<IWordID> wordIDs = idxWord.getWordIDs();\n if (wordIDs == null) continue;\n IWordID wordID = wordIDs.get(0);\n IWord iword = dict.getWord(wordID);\n \n ISynset synonyms = iword.getSynset();\n List<IWord> iRelatedWords = synonyms.getWords();\n if (iRelatedWords != null) {\n for (IWord iRelatedWord : iRelatedWords) {\n String relatedWord = iRelatedWord.getLemma();\n if (!resultForPos.contains(relatedWord))\n resultForPos.add(relatedWord);\n }\n }\n \n List<ISynsetID> hypernymIDs = synonyms.getRelatedSynsets();\n if (hypernymIDs != null) {\n for (ISynsetID relatedSynsetID : hypernymIDs) {\n ISynset relatedSynset = dict.getSynset(relatedSynsetID);\n if (relatedSynset != null) {\n iRelatedWords = relatedSynset.getWords();\n if (iRelatedWords != null) {\n for (IWord iRelatedWord : iRelatedWords) {\n String relatedWord = iRelatedWord.getLemma();\n if (!resultForPos.contains(relatedWord))\n resultForPos.add(relatedWord);\n }\n }\n }\n }\n }\n }\n }\n for (String relatedWord : resultForPos) {\n if (relatedWord.length() > 3\n && !relatedWord.contains(\"-\")\n && !result.contains(relatedWord)) {\n // TODO: Hack alert!\n // The - check is to prevent lucene from interpreting hyphenated words as negative search terms\n // Fix!\n result.add(relatedWord);\n }\n }\n }\n } finally {\n dict.close();\n }\n return result;\n }", "void searchByName(String name) {\n\t\tint i=0;\n\t\t\tfor (Entity entity : Processing.nodeSet) {\n\t\t\t\t\n\t\t\t\t/* if Entity is person */\n\t\t\t\tif(entity instanceof Person) {\n\t\t\t\t\tPerson person=(Person)entity;\n\t\t\t\t\tif(person.getName().equalsIgnoreCase(name)){\n\t\t\t\t\tSystem.out.println(\"the person details are :\");\n\t\t\t\t\tSystem.out.println(\" name : \" + person.getName());\n\t\t\t\t\tSystem.out.println(\" phone : \" + person.getPhone());\n\t\t\t\t\tSystem.out.println(\" email : \" + person.getEmail());\n\t\t\t\t\tSystem.out.println(\" school : \" + person.getSchool());\n\t\t\t\t\tSystem.out.println(\" college : \" + person.getCollege() + \"\\n\");\n\t\t\t\t\t\tfor(String interest:person.getInterests()){\n\t\t\t\t\t\t\tSystem.out.println(\" interest in : \" +interest + \"\\n\");\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\t/* If entity is organization */\n\t\t\t\telse {\n\t\t\t\t\tOrganization organization=(Organization)entity;\n\t\t\t\t\tif(organization.getName().equalsIgnoreCase(name)){\n\t\t\t\t\t\tSystem.out.println(\"the person details are :\");\n\t\t\t\t\t\tSystem.out.println(\" name : \" + organization.getName());\n\t\t\t\t\t\tSystem.out.println(\" phone : \" + organization.getPhone());\n\t\t\t\t\t\tSystem.out.println(\" email : \" + organization.getEmail());\n\t\t\t\t\t\tfor(String interest:organization.getCourses()){\n\t\t\t\t\t\t\tSystem.out.println(\" courses are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(String interest:organization.getFaculty()){\n\t\t\t\t\t\t\tSystem.out.println(\" Faculties are : \" +interest + \"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(String interest:organization.getPlacements()){\n\t\t\t\t\t\t\tSystem.out.println(\" Placements are : \" +interest + \"\\n\");\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\ti++;\n\t\t\t}\n\t\t\tif(i>=Processing.nodeSet.size()) {//if no such name exist\n\t\t\t\tSystem.out.println(name+\" does not exist\");\n\t\t\t}\n\t}", "@Test\n public void testNamedEntityRecognitionWithoutCounterNeuron() {\n Model m = new Model(null, 1); // number of threads\n\n Neuron forenameCategory = m.createNeuron(\"C-forename\");\n Neuron surnameCategory = m.createNeuron(\"C-surname\");\n Neuron suppressingN = m.createNeuron(\"SUPPR\");\n\n\n // The word input neurons which do not yet possess a relational id.\n HashMap<String, Neuron> inputNeurons = new HashMap<>();\n\n String[] words = new String[] {\n \"mr.\", \"jackson\", \"cook\", \"was\", \"born\", \"in\", \"new\", \"york\"\n };\n for(String word: words) {\n Neuron in = m.createNeuron(\"W-\" + word);\n\n inputNeurons.put(word, in);\n }\n\n // The entity neurons represent the concrete meanings of the input words.\n // The helper function 'initAndNeuron' computes the required bias for a\n // conjunction of the inputs.\n Neuron cookSurnameEntity = m.initNeuron(\n m.createNeuron(\"E-cook (surname)\"),\n 3.0, // adjusts the bias\n new Input() // Requires the word to be recognized\n .setNeuron(inputNeurons.get(\"cook\"))\n .setWeight(10.0f)\n // This input requires the input activation to have an\n // activation value of at least 0.9\n .setBiasDelta(0.9)\n .setRelativeRid(0) // references the current word\n .setRecurrent(false)\n .setRangeMatch(EQUALS)\n .setRangeOutput(true),\n new Input() // The previous word needs to be a forename\n .setNeuron(forenameCategory)\n .setWeight(10.0f)\n .setBiasDelta(0.9)\n .setRelativeRid(-1) // references the previous word\n .setRecurrent(true) // this input is a positive feedback loop\n .setRangeMatch(NONE)\n .setRangeOutput(false),\n\n // This neuron may be suppressed by the E-cook (profession) neuron, but there is no\n // self suppression taking place even though 'E-cook (surname)' is also contained\n // in the suppressingN.\n new Input()\n .setNeuron(suppressingN)\n .setWeight(-20.0f)\n .setBiasDelta(1.0)\n .setRecurrent(true) // this input is a negative feedback loop\n .setRangeMatch(CONTAINS)\n );\n\n Neuron cookProfessionEntity = m.initNeuron(\n m.createNeuron(\"E-cook (profession)\"),\n 3.0,\n new Input()\n .setNeuron(inputNeurons.get(\"cook\"))\n .setWeight(15.0f)\n .setBiasDelta(0.9)\n .setRecurrent(false)\n .setRangeMatch(EQUALS)\n .setRangeOutput(true),\n new Input()\n .setNeuron(suppressingN)\n .setWeight(-20.0f)\n .setBiasDelta(1.0)\n .setRecurrent(true)\n .setRangeMatch(CONTAINS)\n );\n\n Neuron jacksonForenameEntity = m.initNeuron(\n m.createNeuron(\"E-jackson (forename)\"),\n 3.0,\n new Input()\n .setNeuron(inputNeurons.get(\"jackson\"))\n .setWeight(10.0f)\n .setBiasDelta(0.9)\n .setRelativeRid(0)\n .setRecurrent(false)\n .setRangeMatch(EQUALS)\n .setRangeOutput(true),\n new Input()\n .setNeuron(surnameCategory)\n .setWeight(10.0f)\n .setBiasDelta(0.9)\n .setRelativeRid(1)\n .setRecurrent(true)\n .setRangeMatch(NONE),\n new Input()\n .setNeuron(suppressingN)\n .setWeight(-20.0f)\n .setBiasDelta(1.0)\n .setRecurrent(true)\n .setRangeMatch(CONTAINED_IN)\n );\n\n Neuron jacksonCityEntity = m.initNeuron(\n m.createNeuron(\"E-jackson (city)\"),\n 3.0,\n new Input()\n .setNeuron(inputNeurons.get(\"jackson\"))\n .setWeight(12.0f)\n .setBiasDelta(0.9)\n .setRecurrent(false)\n .setRangeMatch(EQUALS)\n .setRangeOutput(true),\n new Input()\n .setNeuron(suppressingN)\n .setWeight(-20.0f)\n .setBiasDelta(1.0)\n .setRecurrent(true)\n .setRangeMatch(CONTAINED_IN)\n );\n\n m.initNeuron(\n forenameCategory,\n 0.0,\n new Input() // In this example there is only one forename considered.\n .setNeuron(jacksonForenameEntity)\n .setWeight(10.0f)\n .setBiasDelta(0.0)\n .setRelativeRid(0)\n .setRangeMatch(EQUALS)\n .setRangeOutput(true)\n );\n m.initNeuron(\n surnameCategory,\n -0.001,\n new Input()\n .setNeuron(cookSurnameEntity)\n .setWeight(10.0f)\n .setBiasDelta(0.0)\n .setRelativeRid(0)\n .setRangeMatch(EQUALS)\n .setRangeOutput(true)\n );\n\n m.initNeuron(\n suppressingN,\n -0.001,\n new Input().setNeuron(cookProfessionEntity)\n .setWeight(10.0f)\n .setBiasDelta(0.0)\n .setRangeMatch(EQUALS)\n .setRangeOutput(true),\n new Input()\n .setNeuron(cookSurnameEntity)\n .setWeight(10.0f)\n .setBiasDelta(0.0)\n .setRangeMatch(EQUALS)\n .setRangeOutput(true),\n new Input()\n .setNeuron(jacksonCityEntity)\n .setWeight(10.0f)\n .setBiasDelta(0.0)\n .setRangeMatch(EQUALS)\n .setRangeOutput(true),\n new Input()\n .setNeuron(jacksonForenameEntity)\n .setWeight(10.0f)\n .setBiasDelta(0.0)\n .setRangeMatch(EQUALS)\n .setRangeOutput(true)\n );\n\n\n // Now that the model is complete, start processing an actual text.\n Document doc = m.createDocument(\"mr. jackson cook was born in new york \");\n\n int i = 0;\n int wordPos = 0;\n for(String w: doc.getContent().split(\" \")) {\n int j = i + w.length();\n\n // Feed the individual words as inputs into the network.\n inputNeurons.get(w).addInput(doc, i, j, wordPos);\n i = j + 1;\n wordPos++;\n }\n\n // Search for the best interpretation of this text.\n doc.process();\n\n System.out.println(doc.neuronActivationsToString(true, false, true));\n System.out.println();\n\n System.out.println(\"Final Interpretation: \" + doc.bestInterpretation.toString());\n System.out.println();\n\n System.out.println(\"Activations of the Surname Category:\");\n for(Activation act: surnameCategory.getFinalActivations(doc)) {\n System.out.print(act.key.r + \" \");\n System.out.print(act.key.rid + \" \");\n System.out.print(act.key.o + \" \");\n System.out.print(act.key.n.neuron.get().label + \" \");\n System.out.print(act.finalState.value);\n }\n\n doc.clearActivations();\n }", "public List<String> tag(List<String> text) {\n\n\t\t// Create a data container for a sentence\n\n\t\tString[] s = new String[text.size() + 1];\n\t\ts[0] = \"root\";\n\t\tfor (int j = 0; j < text.size(); j++)\n\t\t\ts[j + 1] = text.get(j);\n\t\ti.init(s);\n\t\t// System.out.println(EuroLangTwokenizer.tokenize(text));\n\n\t\t// lemmatizing\n\n\t\t// System.out.println(\"\\nReading the model of the lemmatizer\");\n\t\t// Tool lemmatizer = new\n\t\t// Lemmatizer(\"resources.spanish/CoNLL2009-ST-Spanish-ALL.anna-3.3.lemmatizer.model\");\n\t\t// // create a lemmatizer\n\n\t\t// System.out.println(\"Applying the lemmatizer\");\n\t\t// lemmatizer.apply(i);\n\n\t\t// System.out.print(i.toString());\n\t\t// System.out.print(\"Lemmata: \"); for (String l : i.plemmas)\n\t\t// System.out.print(l+\" \"); System.out.println();\n\n\t\t// morphologic tagging\n\n\t\t// System.out.println(\"\\nReading the model of the morphologic tagger\");\n\t\t// is2.mtag.Tagger morphTagger = new\n\t\t// is2.mtag.Tagger(\"resources.spanish/CoNLL2009-ST-Spanish-ALL.anna-3.3.morphtagger.model\");\n\n\t\t// System.out.println(\"\\nApplying the morpholoigc tagger\");\n\t\t// morphTagger.apply(i);\n\n\t\t// System.out.print(i.toString());\n\t\t// System.out.print(\"Morph: \"); for (String f : i.pfeats)\n\t\t// System.out.print(f+\" \"); System.out.println();\n\n\t\t// part-of-speech tagging\n\n\t\t// System.out.println(\"\\nReading the model of the part-of-speech tagger\");\n\n//\t\tSystem.out.println(\"Applying the part-of-speech tagger\");\n\t\ttagger.apply(i);\n\t\tList<String> tags = new ArrayList<String>(i.ppos.length - 1);\n\t\tfor (int j = 1; j < i.ppos.length; j++)\n\t\t\ttags.add(i.ppos[j]);\n\t\treturn tags;\n\t\t// System.out.println(\"Part-of-Speech tags: \");\n\t\t// for (String p : i.ppos)\n\t\t// System.out.print(p + \" \");\n\t\t// System.out.println();\n\n\t\t// parsing\n\n\t\t// System.out.println(\"\\nReading the model of the dependency parser\");\n\t\t// Tool parser = new Parser(\"models/prs-spa.model\");\n\n\t\t// System.out.println(\"\\nApplying the parser\");\n\t\t// parser.apply(i);\n\n\t\t// System.out.println(i.toString());\n\n\t\t// write the result to a file\n\n\t\t// CONLLWriter09 writer = new\n\t\t// is2.io.CONLLWriter09(\"example-out.txt\");\n\n\t\t// writer.write(i, CONLLWriter09.NO_ROOT);\n\t\t// writer.finishWriting();\n\n\t}", "public static void main(String[] args) {\n\t\tString text = \"\\\"undifferentiated's thyroid carcinomas were carried out with antisera against calcitonin, calcitonin-gene related peptide (CGRP), somatostatin, and also thyroglobulin, using the PAP method. \";\n\t\ttext = text.replace('\\\"', ' ');\n\t\t\n\t\tStringUtil su = new StringUtil();\n\t\t\n\t\t// Extracting...\n\t\tString text2 = new String(text);\n\t\tEnvironmentVariable.setMoaraHome(\"./\");\n\t\tGeneRecognition gr = new GeneRecognition();\n\t\tArrayList<GeneMention> gms = gr.extract(MentionConstant.MODEL_BC2,text);\n\t\t// Listing mentions...\n\t\tSystem.out.println(\"Start\\tEnd\\tMention\");\n\t\tfor (int i=0; i<gms.size(); i++) {\n\t\t\tGeneMention gm = gms.get(i);\n\t\t\tSystem.out.println(gm.Start() + \"\\t\" + gm.End() + \"\\t\" + gm.Text());\n\t\t\t//System.out.println(text2.substring(gm.Start(), gm.End()));\n\t\t\tSystem.out.println(su.getTokenByPosition(text,gm.Start(),gm.End()).trim());\n\t\t}\n\t\tif (true){\n\t\t\treturn;\n\t\t}\n\t\t// Normalizing mentions...\n\t\tOrganism yeast = new Organism(Constant.ORGANISM_YEAST);\n\t\tOrganism human = new Organism(Constant.ORGANISM_HUMAN);\n\t\tExactMatchingNormalization gn = new ExactMatchingNormalization(human);\n\t\tgms = gn.normalize(text,gms);\n\t\t// Listing normalized identifiers...\n\t\t\n\t\tSystem.out.println(\"\\nStart\\tEnd\\t#Pred\\tMention\");\n\t\tfor (int i=0; i<gms.size(); i++) {\n\t\t\tGeneMention gm = gms.get(i);\n\t\t\tif (gm.GeneIds().size()>0) {\n\t\t\t\tSystem.out.println(gm.Start() + \"\\t\" + gm.End() + \"\\t\" + gm.GeneIds().size() + \n\t\t\t\t\t\"\\t\" + su.getTokenByPosition(text,gm.Start(),gm.End()).trim());\n\t\t\t\tfor (int j=0; j<gm.GeneIds().size(); j++) {\n\t\t\t\t\tGenePrediction gp = gm.GeneIds().get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\" + gp.GeneId() + \" \" + gp.OriginalSynonym() + \" \" + gp.ScoreDisambig());\n\t\t\t\t\tSystem.out.println((gm.GeneId().GeneId().equals(gp.GeneId())?\" (*)\":\"\"));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public String[] prepareText(String text) {\n\n Properties props = new Properties();\n\n props.put(\"annotators\", \"tokenize, ssplit, pos, lemma, ner\");\n StanfordCoreNLP pipeline = new StanfordCoreNLP(props);\n\n //apply\n Annotation document = new Annotation(text);\n pipeline.annotate(document);\n\n List<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n\n ArrayList<String> result = new ArrayList<>();\n\n for (CoreMap sentence : sentences) {\n\n for (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\n // this is the text of the token\n String word = token.get(CoreAnnotations.LemmaAnnotation.class);\n // this is the POS tag of the token\n String pos = token.get(PartOfSpeechAnnotation.class);\n // this is the NER label of the token\n String ne = token.get(CoreAnnotations.NamedEntityTagAnnotation.class);\n\n if (!StringUtils.isStopWord(word)) {\n result.add(word);\n }\n\n }\n\n }\n String[] result_ar = new String[result.size()];\n\n return result.toArray(result_ar);\n }", "@Test\n public void testNamedEntityRecognitionWithCounterNeuron() {\n Model m = new Model(null, 1); // number of threads\n\n Neuron forenameCategory = m.createNeuron(\"C-forename\");\n Neuron surnameCategory = m.createNeuron(\"C-surname\");\n Neuron suppressingN = m.createNeuron(\"SUPPR\");\n\n // The following three neurons are used to assign each word activation\n // a relational id (rid). Here, the relational id specifies the\n // word position within the sentence.\n Neuron spaceN = m.createNeuron(\"SPACE\");\n Neuron startSignal = m.createNeuron(\"START-SIGNAL\");\n Neuron ctNeuron = m.initCounterNeuron(m.createNeuron(\"RID Counter\"),\n spaceN, // clock signal\n false, // direction of the clock signal (range end counts)\n startSignal, // start signal\n true, // direction of the start signal (range begin counts)\n false // direction of the counting neuron\n );\n // initCounterNeuron is just a convenience method which creates an ordinary neuron\n // with some input synapses.\n\n\n // The word input neurons which do not yet possess a relational id.\n HashMap<String, Neuron> inputNeurons = new HashMap<>();\n\n // The word input neurons with a relational id.\n HashMap<String, Neuron> relNeurons = new HashMap<>();\n\n\n String[] words = new String[] {\n \"mr.\", \"jackson\", \"cook\", \"was\", \"born\", \"in\", \"new\", \"york\"\n };\n for(String word: words) {\n Neuron in = m.createNeuron(\"W-\" + word);\n Neuron rn = m.initRelationalNeuron(\n m.createNeuron(\"WR-\" + word),\n ctNeuron, // RID Counting neuron\n in, // Input neuron\n false // Direction of the input neuron\n );\n\n inputNeurons.put(word, in);\n relNeurons.put(word, rn);\n }\n\n // The entity neurons represent the concrete meanings of the input words.\n // The helper function 'initAndNeuron' computes the required bias for a\n // conjunction of the inputs.\n Neuron cookSurnameEntity = m.initNeuron(\n m.createNeuron(\"E-cook (surname)\"),\n 3, // adjusts the bias\n new Input() // Requires the word to be recognized\n .setNeuron(relNeurons.get(\"cook\"))\n .setWeight(10.0f)\n // This input requires the input activation to have an\n // activation value of at least 0.9\n .setBiasDelta(0.9)\n .setRelativeRid(0) // references the current word\n .setRecurrent(false)\n .setRangeMatch(EQUALS)\n .setRangeOutput(true),\n new Input() // The previous word needs to be a forename\n .setNeuron(forenameCategory)\n .setWeight(10.0f)\n .setBiasDelta(0.9)\n .setRelativeRid(-1) // references the previous word\n .setRecurrent(true) // this input is a positive feedback loop\n .setRangeMatch(NONE),\n\n // This neuron may be suppressed by the E-cook (profession) neuron, but there is no\n // self suppression taking place even though 'E-cook (surname)' is also contained\n // in the suppressingN.\n new Input()\n .setNeuron(suppressingN)\n .setWeight(-20.0f)\n .setBiasDelta(1.0)\n .setRecurrent(true) // this input is a negative feedback loop\n .setRangeMatch(CONTAINS)\n );\n\n Neuron cookProfessionEntity = m.initNeuron(\n m.createNeuron(\"E-cook (profession)\"),\n 3,\n new Input()\n .setNeuron(relNeurons.get(\"cook\"))\n .setWeight(15.0f)\n .setBiasDelta(0.9)\n .setRecurrent(false)\n .setRangeMatch(EQUALS)\n .setRangeOutput(true),\n new Input()\n .setNeuron(suppressingN)\n .setWeight(-20.0f)\n .setBiasDelta(1.0)\n .setRecurrent(true)\n .setRangeMatch(CONTAINS)\n );\n\n Neuron jacksonForenameEntity = m.initNeuron(\n m.createNeuron(\"E-jackson (forename)\"),\n 3,\n new Input()\n .setNeuron(relNeurons.get(\"jackson\"))\n .setWeight(10.0f)\n .setBiasDelta(0.9)\n .setRelativeRid(0)\n .setRecurrent(false)\n .setRangeMatch(EQUALS)\n .setRangeOutput(true),\n new Input()\n .setNeuron(surnameCategory)\n .setWeight(10.0f)\n .setBiasDelta(0.9)\n .setRelativeRid(1)\n .setRecurrent(true)\n .setRangeMatch(NONE),\n new Input()\n .setNeuron(suppressingN)\n .setWeight(-20.0f)\n .setBiasDelta(1.0)\n .setRecurrent(true)\n .setRangeMatch(CONTAINED_IN)\n );\n\n Neuron jacksonCityEntity = m.initNeuron(\n m.createNeuron(\"E-jackson (city)\"),\n 3,\n new Input()\n .setNeuron(relNeurons.get(\"jackson\"))\n .setWeight(12.0f)\n .setBiasDelta(0.9)\n .setRecurrent(false)\n .setRangeMatch(EQUALS)\n .setRangeOutput(true),\n new Input()\n .setNeuron(suppressingN)\n .setWeight(-20.0f)\n .setBiasDelta(1.0)\n .setRecurrent(true)\n .setRangeMatch(CONTAINED_IN)\n );\n\n m.initNeuron(forenameCategory,\n -0.001,\n new Input() // In this example there is only one forename considered.\n .setNeuron(jacksonForenameEntity)\n .setWeight(10.0f)\n .setBiasDelta(0.0)\n .setRelativeRid(0)\n .setRangeMatch(EQUALS)\n .setRangeOutput(true)\n );\n m.initNeuron(surnameCategory,\n -0.001,\n new Input()\n .setNeuron(cookSurnameEntity)\n .setWeight(10.0f)\n .setBiasDelta(0.0)\n .setRelativeRid(0)\n .setRangeMatch(EQUALS)\n .setRangeOutput(true)\n );\n\n m.initNeuron(suppressingN,\n -0.001,\n new Input()\n .setNeuron(cookProfessionEntity)\n .setWeight(10.0f)\n .setBiasDelta(0.0)\n .setRangeMatch(EQUALS)\n .setRangeOutput(true),\n new Input()\n .setNeuron(cookSurnameEntity)\n .setWeight(10.0f)\n .setBiasDelta(0.0)\n .setRangeMatch(EQUALS)\n .setRangeOutput(true),\n new Input()\n .setNeuron(jacksonCityEntity)\n .setWeight(10.0f)\n .setBiasDelta(0.0)\n .setRangeMatch(EQUALS)\n .setRangeOutput(true),\n new Input()\n .setNeuron(jacksonForenameEntity)\n .setWeight(10.0f)\n .setBiasDelta(0.0)\n .setRangeMatch(EQUALS)\n .setRangeOutput(true)\n );\n\n\n // Now that the model is complete, start processing an actual text.\n Document doc = m.createDocument(\"mr. jackson cook was born in new york \", 0);\n\n // The start signal is used as a starting point for relational id counter.\n startSignal.addInput(doc, 0, 1, 0); // iteration, begin, end, relational id\n\n int i = 0;\n for(String w: doc.getContent().split(\" \")) {\n int j = i + w.length();\n // The space is used as a clock signal to increase the relational id.\n spaceN.addInput(doc, j, j + 1);\n\n // Feed the individual words as inputs into the network.\n inputNeurons.get(w).addInput(doc, i, j);\n i = j + 1;\n }\n\n // Search for the best interpretation of this text.\n doc.process();\n\n System.out.println(doc.neuronActivationsToString(true, false, true));\n System.out.println();\n\n System.out.println(\"Selected Option: \" + doc.bestInterpretation.toString());\n System.out.println();\n\n System.out.println(\"Activations of the Surname Category:\");\n for(Activation act: surnameCategory.getFinalActivations(doc)) {\n System.out.print(act.key.r + \" \");\n System.out.print(act.key.rid + \" \");\n System.out.print(act.key.o + \" \");\n System.out.print(act.key.n.neuron.get().label + \" \");\n System.out.print(act.finalState.value);\n }\n\n doc.clearActivations();\n }", "private boolean lookupSentiments(Sentence sent) {\n if (selectCovered(NGram.class, sent).size() > 0)\n return true;\n return false;\n }", "@Override\n\tprotected Map<Object, Object> rawTextParse(CharSequence text) {\n\n\t\tStanfordCoreNLP pipeline = null;\n\t\ttry {\n\t\t\tpipeline = pipelines.take();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tAnnotation document = new Annotation(text.toString());\n\t\tpipeline.annotate(document);\n\t\tMap<Object, Object> sentencesMap = new LinkedHashMap<Object, Object>();//maintain sentence order\n\t\tint id = 0;\n\t\tList<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n\n\t\tfor (CoreMap sentence : sentences) {\n\t\t\tStringBuilder processedText = new StringBuilder();\n\t\t\tfor (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\n\t\t\t\tString word = token.get(CoreAnnotations.TextAnnotation.class);\n\t\t\t\tString lemma = token.get(CoreAnnotations.LemmaAnnotation.class);\n\t\t\t\tString pos = token.get(CoreAnnotations.PartOfSpeechAnnotation.class);\n\t\t\t\t//todo this should really happen after parsing is done, because using lemmas might confuse the parser\n\t\t\t\tif (config().isUseLowercaseEntries()) {\n\t\t\t\t\tword = word.toLowerCase();\n\t\t\t\t\tlemma = lemma.toLowerCase();\n\t\t\t\t}\n\t\t\t\tif (config().isUseLemma()) {\n\t\t\t\t\tword = lemma;\n\t\t\t\t}\n\t\t\t\tprocessedText.append(word).append(POS_DELIMITER).append(lemma).append(POS_DELIMITER).append(pos).append(TOKEN_DELIM);\n //inserts a TOKEN_DELIM at the end too\n\t\t\t}\n\t\t\tsentencesMap.put(id, processedText.toString().trim());//remove the single trailing space\n\t\t\tid++;\n\t\t}\n\t\ttry {\n\t\t\tpipelines.put(pipeline);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn sentencesMap;\n\t}", "static ArrayList<String> tag(ArrayList<String> rawWords){\n\t\tArrayList<String> outSentence = new ArrayList<String>();\n\t\t//String[][] chart = new String[rawWords.size()][rawWords.size()];\n\t\tfor(int i = 0; i<rawWords.size(); i++){\n\t\t\tString[] entry = rawWords.get(i).split(\"\\\\s+\");\n\t\t\tString word = entry[0];\n\t\t\tString pos = entry[1];\n\t\t\tSystem.out.println(word);\n\t\t\tif((pos.equals(\"NNP\")||word.equals(\"tomorrow\"))&&rawWords.get(i-1).split(\"\\\\s+\")[0].equals(\"due\")){\n\t\t\t\tint beginning = i;\n\t\t\t\tint ending = i;\n\t\t\t\tint j = i+1;\n\t\t\t\tboolean endingFound = false;\n\t\t\t\twhile(!endingFound){\n\t\t\t\t\tString next=rawWords.get(j).split(\"\\\\s\")[1];\n\t\t\t\t\tif(next.equals(\"NN\")||next.equals(\"NNP\")||next.equals(\"NNS\")||next.equals(\"NNPS\")||next.equals(\"CD\")){\n\t\t\t\t\t\tending++;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tendingFound = true;\n\t\t\t\t}\n\t\t\t\twhile(beginning<outSentence.size()){\n\t\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\t}\n\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\tfor(int index = beginning+1; index<=ending; index++){\n\t\t\t\t\tnounGroupLine = rawWords.get(index).split(\"\\\\s+\")[0]+\"\\tI-NP\";\n\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t}\n\t\t\t\ti=ending;\n\t\t\t}\n\t\t\telse if (pos.equals(\"CD\")){\n\t\t\t\tint beginning = i;\n\t\t\t\tint ending = i;\n\t\t\t\tboolean beginningFound = false;\n\t\t\t\tboolean endingFound = false;\n\t\t\t\tint j = i+1;\n\t\t\t\twhile(!endingFound){\n\t\t\t\t\tif((rawWords.get(j).split(\"\\\\s\")[1].equals(\"CC\")&&rawWords.get(j-1).split(\"\\\\s\")[1].equals(\"CD\")&&rawWords.get(j+1).split(\"\\\\s\")[1].equals(\"CD\"))||rawWords.get(j).split(\"\\\\s\")[1].equals(\"NN\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"NNS\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"NNP\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"NNPS\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"CD\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"CD\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"%\")){\n\t\t\t\t\t\tending++;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tendingFound = true;\n\t\t\t\t}\n\t\t\t\tj = i-1;\n\t\t\t\twhile(!beginningFound){\n\t\t\t\t\tif(rawWords.get(j).split(\"\\\\s\")[0].equals(\"to\")&&rawWords.get(j-1).split(\"\\\\s\")[0].equals(\"up\")){\n\t\t\t\t\t\tbeginning-=2;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if(rawWords.get(j).split(\"\\\\s\")[1].equals(\"#\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"PRP$\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"JJ\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"JJR\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"JJS\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"$\")){\n\t\t\t\t\t\tj--;\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t}\n\t\t\t\t\telse if(rawWords.get(j).split(\"\\\\s\")[1].equals(\"POS\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"DT\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"approximately\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"around\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"almost\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"about\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if (rawWords.get(j).split(\"\\\\s\")[0].equals(\"as\")&&(rawWords.get(j-1).split(\"\\\\s\")[0].equals(\"many\")||rawWords.get(j-1).split(\"\\\\s\")[0].equals(\"much\"))&&rawWords.get(j-2).split(\"\\\\s\")[0].equals(\"as\")){\n\t\t\t\t\t\tbeginning-=3;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\n\t\t\t\t\telse if (rawWords.get(j).split(\"\\\\s\")[1].equals(\"VBN\")&&j>0&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"PRP$\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"RB\"))){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if (rawWords.get(j).split(\"\\\\s\")[1].equals(\"VBN\")&&j>1&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\",\")&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"PRP$\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"RB\")))){\n\t\t\t\t\t\tbeginning-=2;\n\t\t\t\t\t\tj-=2;\n\t\t\t\t\t}\n\t\t\t\t\telse if((rawWords.get(j).split(\"\\\\s\")[1].equals(\"RBR\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"not\"))&&rawWords.get(j+1).split(\"\\\\s+\")[1].equals(\"JJ\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse{\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\n\t\t\t\t\twhile(beginning<outSentence.size()){\n\t\t\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\t\t}\n\t\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t\tfor(int index = beginning+1; index<=ending; index++){\n\t\t\t\t\t\tnounGroupLine = rawWords.get(index).split(\"\\\\s+\")[0]+\"\\tI-NP\";\n\t\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t\t}\n\t\t\t\t\ti=ending;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*else if(pos.equals(\"CD\")&&rawWords.get(i-1).split(\"\\\\s+\")[0].equals(\"$\")&&rawWords.get(i-2).split(\"\\\\s+\")[1].equals(\"IN\")){\n\t\t\t\tint beginning=i;\n\t\t\t\tint ending = i;\n\t\t\t\tint j=i+1;\n\t\t\t\tboolean endingFound = false;\n\t\t\t\twhile(!endingFound){\n\t\t\t\t\tString next=rawWords.get(j).split(\"\\\\s\")[1];\n\t\t\t\t\tif(next.equals(\"CD\")){\n\t\t\t\t\t\tending++;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tendingFound = true;\n\t\t\t\t}\n\t\t\t\tboolean beginningFound = false;\n\t\t\t\tj = i-1;\n\t\t\t\twhile(!beginningFound){\n\t\t\t\t\tString prior=rawWords.get(j).split(\"\\\\s\")[1];\n\t\t\t\t\tString priorWord = rawWords.get(j).split(\"\\\\s\")[0];\n\t\t\t\t\tif(prior.equals(\"$\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if (rawWords.get(j).split(\"\\\\s+\")[0].equals(\"as\")&&rawWords.get(j-1).split(\"\\\\s+\")[0].equals(\"much\")&&rawWords.get(j-2).split(\"\\\\s+\")[0].equals(\"as\")){\n\t\t\t\t\t\tbeginning -=3;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t\tj -=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if (prior.equals(\"IN\")){\n\t\t\t\t\t\tbeginning --;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\telse\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t}\n\t\t\t\twhile(beginning<outSentence.size()){\n\t\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\t}\n\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\tfor(int index = beginning+1; index<=ending; index++){\n\t\t\t\t\tnounGroupLine = rawWords.get(index).split(\"\\\\s+\")[0]+\"\\tI-NP\";\n\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t}\n\t\t\t\ti=ending;\n\t\t\t}*/\n\t\t\t//else if(pos.equals(arg0))\n\t\t\telse if(pos.equals(\"PRP\")||pos.equals(\"WP\")||word.equals(\"those\")||pos.equals(\"WDT\")){\n\t\t\t\tint beginning = i;\n\t\t\t\t//int ending = i;\n\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t}\n\t\t\telse if(word.equals(\"anywhere\")&&rawWords.get(i+1).split(\"\\\\s+\")[0].equals(\"else\")){\n\t\t\t\toutSentence.add(\"anywhere\\tB-NP\");\n\t\t\t\toutSentence.add(\"else\\tI-NP\");\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t/*else if (word.equals(\"same\")&&rawWords.get(i-1).split(\"\\\\s\")[0].equals(\"the\")){\n\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\tString nounGroupLine = \"the\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\tnounGroupLine = \"same\\tI-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t}*/\n\t\t\telse if(pos.equals(\"NN\")||pos.equals(\"NNS\")||pos.equals(\"NNP\")||pos.equals(\"NNPS\")||pos.equals(\"CD\")/*||pos.equals(\"PRP\")*/||pos.equals(\"EX\")||word.equals(\"counseling\")||word.equals(\"Counseling\")){\n\t\t\t\tint beginning = i;\n\t\t\t\tint ending = i;\n\t\t\t\tboolean endFound = false;\n\t\t\t\tint j = i+1;\n\t\t\t\twhile(!endFound){\n\t\t\t\t\tString next=rawWords.get(j).split(\"\\\\s\")[1];\n\t\t\t\t\tif(next.equals(\"NN\")||next.equals(\"NNS\")||next.equals(\"NNP\")||next.equals(\"NNPS\")||next.equals(\"CD\")||(next.equals(\"CC\")&&rawWords.get(j-1).split(\"\\\\s\")[1].equals(rawWords.get(j+1).split(\"\\\\s\")[1]))){\n\t\t\t\t\t\tending++;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tendFound = true;\n\t\t\t\t}\n\t\t\t\tboolean beginningFound = false;\n\t\t\t\tj = i-1;\n\t\t\t\twhile(!beginningFound){\n\t\t\t\t\tString[] pArray = rawWords.get(j).split(\"\\\\s+\");\n\t\t\t\t\tString prior = pArray[1];\n\t\t\t\t\tif(j>2 &&prior.equals(rawWords.get(j-2).split(\"\\\\s+\")[1])&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"CC\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\",\"))){\n\t\t\t\t\t\tbeginning-=2;\n\t\t\t\t\t\tj-=2;\n\t\t\t\t\t}\n\t\t\t\t\telse if(prior.equals(\"JJ\")||prior.equals(\"JJR\")||prior.equals(\"JJS\")||prior.equals(\"PRP$\")||prior.equals(\"RBS\")||prior.equals(\"$\")||prior.equals(\"RB\")||prior.equals(\"NNP\")||prior.equals(\"NNPS\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if (prior.equals(\"VBN\")&&j>1&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\",\")&&(rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"PRP$\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"RB\")))){\n\t\t\t\t\t\tbeginning-=2;\n\t\t\t\t\t\tj-=2;\n\t\t\t\t\t}\n\t\t\t\t\telse if (prior.equals(\"VBN\")&&j>0&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"PRP$\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"RB\"))){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if (prior.equals(\"VBG\")&&j>0&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"PRP$\"))){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if((prior.equals(\"RBR\")||pArray[0].equals(\"not\"))&&rawWords.get(j+1).split(\"\\\\s+\")[1].equals(\"JJ\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if((pArray[0].equals(\"Buying\")||pArray[0].equals(\"buying\"))&&rawWords.get(j+1).split(\"\\\\s+\")[0].equals(\"income\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if(pArray[0].equals(\"counseling\")||pArray[0].equals(\"Counseling\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t\tif(rawWords.get(j).split(\"\\\\s+\")[1].equals(\"NN\")){\n\t\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\t\tj--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse if (prior.equals(\"DT\")||prior.equals(\"POS\")){\n\t\t\t\t\t\t//j--;\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tif(!rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"DT\"))\n\t\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t}\n\t\t\t\twhile(beginning<outSentence.size()){\n\t\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\t}\n\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\tfor(int index = beginning+1; index<=ending; index++){\n\t\t\t\t\tnounGroupLine = rawWords.get(index).split(\"\\\\s+\")[0]+\"\\tI-NP\";\n\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t}\n\t\t\t\ti=ending;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tString outLine = word+\"\\tO\";\n\t\t\t\toutSentence.add(outLine);\n\t\t\t}\n\t\t}\n\t\toutSentence.remove(0);\n\t\toutSentence.remove(outSentence.size()-1);\n\t\toutSentence.add(\"\");\n\t\treturn outSentence;\n\t}", "@Test\n void adjectivesCommonList() {\n //boolean flag = false;\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day good; glad @JeremyKappell is standing up against bad #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing real Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB worst(Via NEWS 8 WROC)\");\n ArrayList<String> adj = np.adjectives(sentences);\n for (String common : np.getCommonWords()) {\n assertFalse(adj.contains(common));\n }\n }", "public static List<Sentence> parseDesc(String desc){\n\t\ttry{\n\t\t\tif(sentenceDetector == null)\n\t\t\t\tsentenceDetector = new SentenceDetectorME(new SentenceModel(new FileInputStream(\"en-sent.bin\")));\n\t\t\tif(tokenizer == null)\n\t\t\t\ttokenizer = new TokenizerME(new TokenizerModel(new FileInputStream(\"en-token.bin\")));\n\t\t\tif(tagger == null)\n\t\t\t\ttagger = new POSTaggerME(new POSModel(new FileInputStream(\"en-pos-maxent.bin\")));\n\t\t\tif(chunker == null)\n\t\t\t\tchunker = new ChunkerME(new ChunkerModel(new FileInputStream(\"en-chunker.bin\")));\n\t\t} catch(InvalidFormatException ex) {\n\t\t\tex.printStackTrace();\n\t\t} catch(FileNotFoundException ex){\n\t\t\tex.printStackTrace();\n\t\t} catch(IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tList<Sentence> sentenceList = new LinkedList();\n\t\tString[] sentences = sentenceDetector.sentDetect(desc);\t\t\n\t\tfor(String s : sentences) {\n\t\t\tString[] tokens = tokenizer.tokenize(s);\n\t\t\tString[] posTags = tagger.tag(tokens);\n\t\t\tString[] chunks = chunker.chunk(tokens, posTags);\n\t\t\tList<String> ner = new LinkedList();\n\t\t\tList<String> lemma = new ArrayList();\n\t\t\tfor(String str : tokens) {\n\t\t\t\tlemma.add(str.toLowerCase());\n\t\t\t\tner.add(\"O\"); //assume everything is an object\n\t\t\t}\n\t\t\t\n\t\t\tSentence sentence = new Sentence (Arrays.asList(tokens), lemma, Arrays.asList(posTags), Arrays.asList(chunks), ner, s);\n\t\t\tsentenceList.add(sentence);\n\t\t}\n\t\t\n\t\treturn sentenceList;\n\t}", "public List<String> getAllSentences(String input) {\n List<String> output = new ArrayList();\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // All the sentences in this document\n List<CoreMap> docSentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n for (CoreMap sentence : docSentences) {\n // traverse words in the current sentence\n output.add(sentence.toString());\n }\n\n return output;\n }", "private static String lookForSentenceWhichContains(String[] words, String documentPath) throws IOException {\r\n\r\n File document = new File(documentPath);\r\n\r\n if (!document.exists()) throw new FileNotFoundException(\"File located at \"+documentPath+\" doesn't exist.\\n\");\r\n\r\n FileReader r = new FileReader(document);\r\n BufferedReader br = new BufferedReader(r);\r\n\r\n String line;\r\n String documentText = \"\";\r\n while ( (line=br.readLine()) != null) {\r\n documentText += line;\r\n }\r\n\r\n documentText = Jsoup.parse(documentText).text();\r\n\r\n String[] listOfSentences = documentText.split(\"\\\\.\");\r\n HashMap<String,String> originalToNormalized = new HashMap<>();\r\n String original;\r\n\r\n for (String sentence: listOfSentences){\r\n\r\n original = sentence;\r\n\r\n sentence = sentence.toLowerCase();\r\n sentence = StringUtils.stripAccents(sentence);\r\n sentence = sentence.replaceAll(\"[^a-z0-9-._\\\\n]\", \" \");\r\n\r\n originalToNormalized.put(original,sentence);\r\n }\r\n\r\n int matches, maxMatches = 0;\r\n String output = \"\";\r\n\r\n for (Map.Entry<String,String> sentence: originalToNormalized.entrySet()){\r\n\r\n matches = 0;\r\n\r\n for (String word: words){\r\n if (sentence.getValue().contains(word)) matches++;\r\n }\r\n\r\n if (matches == words.length) return sentence.getKey();\r\n if (matches > maxMatches){\r\n maxMatches = matches;\r\n output = sentence.getKey();\r\n }\r\n }\r\n\r\n return output;\r\n\r\n }", "public String[] detectPOSTags(String[] tokens) throws IOException {\n\t\ttry (InputStream modelIn = new FileInputStream(\"en-pos-maxent.bin\")) {\r\n\r\n\t\t\t// Initialize POS tagger tool\r\n\t\t\tPOSTaggerME myCategorizer = new POSTaggerME(new POSModel(modelIn));\r\n\r\n\t\t\t// Tag sentence.\r\n\t\t\tString[] posTokens = myCategorizer.tag(tokens);\r\n\t\t\tSystem.out.println(\"POS Tags : \" + Arrays.stream(posTokens).collect(Collectors.joining(\" | \")));\r\n\r\n\t\t\treturn posTokens;\r\n\r\n\t\t}\r\n\t}", "static void allDocumentAnalyzer() throws IOException {\n\t\tFile allFiles = new File(\".\"); // current directory\n\t\tFile[] files = allFiles.listFiles(); // file array\n\n\t\t// recurse through all documents\n\t\tfor (File doc : files) {\n\t\t\t// other files we don't need\n\t\t\tif (doc.getName().contains(\".java\") || doc.getName().contains(\"words\") || doc.getName().contains(\"names\")\n\t\t\t\t\t|| doc.getName().contains(\"phrases\") || doc.getName().contains(\".class\")\n\t\t\t\t\t|| doc.getName().contains(\"Data\") || doc.getName().contains(\".sh\") || doc.isDirectory()\n\t\t\t\t\t|| !doc.getName().contains(\".txt\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString name = doc.getName();\n\t\t\tSystem.out.println(name);\n\t\t\tname = name.substring(0, name.length() - 11);\n\t\t\tSystem.out.println(name);\n\n\t\t\tif (!names.contains(name)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// make readers\n\t\t\tFileReader fr = new FileReader(doc);\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\n\t\t\t// phrase list\n\t\t\tArrayList<String> words = new ArrayList<String>();\n\n\t\t\t// retrieve all text, trim, refine and add to phrase list\n\t\t\tString nextLine = br.readLine();\n\t\t\twhile (nextLine != null) {\n\t\t\t\tnextLine = nextLine.replace(\"\\n\", \" \");\n\t\t\t\tnextLine = nextLine.trim();\n\n\t\t\t\tif (nextLine.contains(\"no experience listed\")) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tString[] lineArray = nextLine.split(\"\\\\s+\");\n\n\t\t\t\t// recurse through every word to find phrases\n\t\t\t\tfor (int i = 0; i < lineArray.length - 1; i++) {\n\t\t\t\t\t// get the current word and refine\n\t\t\t\t\tString currentWord = lineArray[i];\n\n\t\t\t\t\tcurrentWord = currentWord.trim();\n\t\t\t\t\tcurrentWord = refineWord(currentWord);\n\n\t\t\t\t\tif (currentWord.equals(\"\") || currentWord.isEmpty()) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\twords.add(currentWord);\n\t\t\t\t}\n\t\t\t\tnextLine = br.readLine();\n\t\t\t}\n\n\t\t\tbr.close();\n\n\t\t\t// continue if empty\n\t\t\tif (words.size() == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// otherwise, increment number of files in corpus\n\t\t\tsize++;\n\n\t\t\t// updating the phrase count map for tf\n\t\t\tString fileName = doc.getName();\n\t\t\tphraseCountMap.put(fileName, words.size());\n\n\t\t\t// recurse through every word\n\t\t\tfor (String word : words) {\n\t\t\t\t// get map from string to freq\n\t\t\t\tHashMap<String, Integer> textFreqMap = wordFreqMap.get(fileName);\n\n\t\t\t\t// if it's null, make one\n\t\t\t\tif (textFreqMap == null) {\n\t\t\t\t\ttextFreqMap = new HashMap<String, Integer>();\n\t\t\t\t\t// make freq as 1\n\t\t\t\t\ttextFreqMap.put(word, 1);\n\t\t\t\t\t// put that in wordFreq\n\t\t\t\t\twordFreqMap.put(fileName, textFreqMap);\n\t\t\t\t} else {\n\t\t\t\t\t// otherwise, get the current num\n\t\t\t\t\tInteger currentFreq = textFreqMap.get(word);\n\n\t\t\t\t\t// if it's null,\n\t\t\t\t\tif (currentFreq == null) {\n\t\t\t\t\t\t// the frequency is just 0\n\t\t\t\t\t\tcurrentFreq = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t// increment the frequency\n\t\t\t\t\tcurrentFreq++;\n\n\t\t\t\t\t// put it in the textFreqMap\n\t\t\t\t\ttextFreqMap.put(word, currentFreq);\n\n\t\t\t\t\t// put that in the wordFreqMap\n\t\t\t\t\twordFreqMap.put(fileName, textFreqMap);\n\t\t\t\t}\n\n\t\t\t\t// add this to record (map from phrases to docs with that\n\t\t\t\t// phrase)\n\t\t\t\tinvertedMap.addValue(word, doc);\n\t\t\t}\n\t\t}\n\t}", "@GetMapping(\"cause/{name}\")\n public ResponseEntity<?> getCauseByName(@PathVariable String name) {\n ResponseEntity responseEntity;\n\n String search=\"\";\n\n StanfordCoreNLP stanfordCoreNLP = Pipeline.getPipeline();\n\n CoreDocument coreDocument = new CoreDocument(name);\n\n stanfordCoreNLP.annotate(coreDocument);\n\n List<CoreLabel> coreLabelList = coreDocument.tokens();\n\n\n for(CoreLabel coreLabel : coreLabelList) {\n\n String pos = coreLabel.get(CoreAnnotations.PartOfSpeechAnnotation.class);\n if(pos.equals(\"NN\") || pos.equals(\"NNP\") || pos.equals(\"NNPS\")) {\n System.out.println(coreLabel.originalText());\n search = search.concat(\" \"+coreLabel.originalText());\n }\n }\n search = search.trim();\n try {\n List<Cause> causeList=service.getCauseByName(search);\n responseEntity = new ResponseEntity<List<Cause>>(causeList, HttpStatus.OK);\n } catch (Exception ex) {\n responseEntity = new ResponseEntity<String>(ex.getMessage(), HttpStatus.CONFLICT);\n ex.printStackTrace();\n }\n return responseEntity;\n }", "public List<String> findRelatedTokens(final String dimensionName) throws ENEQueryException {\n\n final List<String> tokens = new ArrayList<String>();\n final ENEQuery query = new ENEQuery();\n query.setDimSearchTerms(dimensionName);\n query.setNavERecSearchComputeAlternativePhrasings(true);\n final ENEQueryResults results = this.search(query);\n final DimensionSearchResult dimensionSearchResult = results.getDimensionSearch();\n final DimensionSearchResultGroupList dimensionSearchResultGroupList =\n dimensionSearchResult.getResults();\n for (final Object dimensionSearchResultGroupElement : dimensionSearchResultGroupList) {\n final DimensionSearchResultGroup dimensionSearchResultGroup =\n (DimensionSearchResultGroup) dimensionSearchResultGroupElement;\n final DimValList roots = dimensionSearchResultGroup.getRoots();\n if (roots.size() != 0) {\n final StringBuilder token = new StringBuilder();\n final DimVal root = (DimVal) roots.get(0);\n if (!\"product.category\".equalsIgnoreCase(root.getDimensionName())) {\n token.append(root.getDimensionName());\n token.append(\"> \");\n }\n for (int i = 0; i < dimensionSearchResultGroup.size(); i++) {\n final DimLocationList dimLocationList =\n (DimLocationList) dimensionSearchResultGroup.get(i);\n for (final Object dimLocationElement : dimLocationList) {\n final DimLocation dimLocation = (DimLocation) dimLocationElement;\n final DimValList ancestors = dimLocation.getAncestors();\n for (final Object dimValElement : ancestors) {\n final DimVal dimVal = (DimVal) dimValElement;\n token.append(dimVal.getName());\n token.append(\"> \");\n }\n final DimVal dimVal = dimLocation.getDimValue();\n token.append(dimVal.getName());\n token.append(\"\\n\");\n }\n }\n tokens.add(token.toString());\n }\n }\n return tokens;\n }", "public static void textQueries(List<String> sentences, List<String> queries) {\n // Write your code here\n for(String q: queries){\n boolean a = false;\n int i=0;\n for(String s: sentences){\n if(Arrays.asList(s.split(\" \")).containsAll(Arrays.asList(q.split(\" \")))){\n System.out.print(i+\" \");\n a = true;\n }\n i++;\n }\n if(!a)\n System.out.println(-1);\n else\n System.out.println(\"\");\n }\n \n }", "public void test() throws IOException, SQLException\r\n\t{\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(new File(\"src/result.txt\")));\r\n\t\tList<String> sents = new ArrayList<>();\r\n\t\tBufferedReader br = new BufferedReader(new FileReader(new File(\"src/test_tmp_col.txt\")));\r\n\t\tString line = \"\";\r\n\t\tString wordseq = \"\";\r\n\t\tList<List<String>> tokens_list = new ArrayList<>();\r\n\t\tList<String> tokens = new ArrayList<>();\r\n\t\twhile((line=br.readLine())!=null)\r\n\t\t{\r\n\t\t\tif(line.trim().length()==0)\r\n\t\t\t{\r\n\t\t\t\tsents.add(wordseq);\r\n\t\t\t\ttokens_list.add(tokens);\r\n\t\t\t\twordseq = \"\";\r\n\t\t\t\ttokens = new ArrayList<>();\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\tString word = line.split(\"#\")[0];\r\n\t\t\t\twordseq += word;\r\n\t\t\t\ttokens.add(word);\r\n\t\t\t}\r\n\t\t}\r\n\t\tbr.close();\r\n\t\tfor(String sent : sents)\r\n\t\t{\r\n\t\t\tString newsURL = null;\r\n\t\t\tString imgAddress = null;\r\n\t\t\tString newsID = null;\r\n\t\t\tString saveTime = null;\r\n\t\t\tString newsTitle = null;\r\n\t\t\tString placeEntity = null;\r\n\t\t\tboolean isSummary = false;\r\n\t\t\tPair<String, LabelItem> result = extractbysentence(newsURL, imgAddress, newsID, saveTime, newsTitle, sent, placeEntity, isSummary);\r\n\t\t\t\r\n\t\t\tif(result!=null)\r\n\t\t\t{\r\n\t\t\t\r\n//\t\t\t\tSystem.out.print(result.getSecond().eventType+\"\\n\");\r\n\t\t\t\tbw.write(sent+'\\t'+result.getSecond().triggerWord+\"\\t\"+result.getSecond().sourceActor+'\\t'+result.getSecond().targetActor+\"\\n\");\r\n\t\t\t\t\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\tbw.write(sent+'\\n');\r\n\t\t\t}\r\n\t\t}\r\n\t\tbw.close();\r\n\t\t\r\n\t}", "public static void extractGroups(CoNLLPart part) {\n\t\tHashMap<String, Integer> chainMap = EMUtil.formChainMap(part\n\t\t\t\t.getChains());\n\t\tArrayList<Mention> allMentions = EMUtil.extractMention(part);\n\t\tCollections.sort(allMentions);\n\t\tEMUtil.assignNE(allMentions, part.getNameEntities());\n\t\tfor (int i = 0; i < allMentions.size(); i++) {\n\t\t\tMention m = allMentions.get(i);\n\n\t\t\tif (m.gram == EMUtil.Grammatic.subject && m.start == m.end\n\t\t\t\t\t&& part.getWord(m.end).posTag.equals(\"PN\")) {\n\t\t\t}\n\n\t\t\tif (m.gram == EMUtil.Grammatic.subject\n\t\t\t\t\t&& EMUtil.pronouns.contains(m.extent)\n\t\t\t// && chainMap.containsKey(m.toName())\n\t\t\t) {\n\t\t\t\tArrayList<Mention> ants = new ArrayList<Mention>();\n\t\t\t\tint corefCount = 0;\n\t\t\t\tfor (int j = i - 1; j >= 0; j--) {\n\t\t\t\t\tMention ant = allMentions.get(j);\n\t\t\t\t\tants.add(ant);\n\t\t\t\t\tant.MI = Context.calMI(ant, m);\n\t\t\t\t\tboolean coref = isCoref(chainMap, m, ant);\n\t\t\t\t\tif (coref) {\n\t\t\t\t\t\tcorefCount++;\n\t\t\t\t\t}\n\t\t\t\t\tif (m.s.getSentenceIdx() - ant.s.getSentenceIdx() > 2) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tCollections.sort(ants);\n\t\t\t\tCollections.reverse(ants);\n\n\t\t\t\tif (corefCount == 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (Mention ant : ants) {\n\t\t\t\t\tant.isBest = false;\n\t\t\t\t}\n\n\t\t\t\tApplyEM.findBest(m, ants);\n\n\t\t\t\tif (ants.size() > maxAnts) {\n\t\t\t\t\tmaxAnts = ants.size();\n\t\t\t\t}\n\t\t\t\tString origPro = m.extent;\n\n\t\t\t\tString ext = m.extent;\n\t\t\t\tif (map.containsKey(ext)) {\n\t\t\t\t\tmap.put(ext, map.get(ext) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tmap.put(ext, 1);\n\t\t\t\t}\n\t\t\t\tStringBuilder ysb = new StringBuilder();\n\t\t\t\tfor (int h = 0; h < EMUtil.pronounList.size(); h++) {\n\t\t\t\t\tm.extent = EMUtil.pronounList.get(h);\n\t\t\t\t\tgenerateInstance(part, chainMap, m, ants,\n\t\t\t\t\t\t\tcorefCount, origPro, h, ysb);\n\t\t\t\t}\n\t\t\t\tfor (int k = ants.size() * EMUtil.pronounList.size(); k < 840; k++) {\n\t\t\t\t\tysb.append(\"@ 0 NOCLASS 1 # \");\n\t\t\t\t}\n\t\t\t\tyasmet10.add(ysb.toString());\n\t\t\t\tm.extent = origPro;\n\t\t\t}\n\t\t}\n\t}", "public static void main(String pOptions[]) {\n \n String parameterDirectory = \"[ENTER DEBUGGING DIRECORY]\";\n NamedEntityExtractorParameter neParameter =\n new NamedEntityExtractorParameter(\n parameterDirectory + \"ForenamesDE.txt\",\n parameterDirectory + \"SurnamesDE.txt\",\n parameterDirectory + \"SurnameSuffixesDE_HeinsUndPartner21.txt\",\n parameterDirectory + \"MiddleInitialsDE_HeinsUndPartner21.txt\",\n parameterDirectory + \"TitlesDE_HeinsUndPartner21.txt\",\n parameterDirectory + \"PlacesDE.txt\",\n parameterDirectory + \"OrganizationsStartDE_HeinsUndPartner21.txt\",\n parameterDirectory + \"OrganizationsEndDE_HeinsUndPartner21.txt\",\n parameterDirectory + \"CompositeNE_HeinsUndPartner21.txt\",\n parameterDirectory + \"RegexNE_HeinsUndPartner21.txt\",\n parameterDirectory + \"NameAffixesDE_HeinsUndPartner21.txt\",\n parameterDirectory + \"PlaceAffixesDE_HeinsUndPartner21.txt\",\n parameterDirectory + \"OrganizationsAffixesDE_HeinsUndPartner21.txt\",\n parameterDirectory + \"OrganizationsDE_HeinsUndPartner21.tokenized.txt\",\n \"TestMetaDataAttribute\", false,\n parameterDirectory + \"PlaceIndicatorsDE_HeinsUndPartner21.txt\",\n false, null,\n parameterDirectory + \"PersonNameIndicatorsDE_HeinsUndPartner21.txt\",\n parameterDirectory + \"ProfessionsDE_HeinsUndPartner21.txt\", true,\n parameterDirectory + \"StreetExceptionsDE.txt\",\n parameterDirectory + \"StreetSuffixesDE_HeinsUndPartner21.txt\",\n \"([A-Z][A-Za-z\\\\-\\\\.]*)\",\n \"([0-9\\\\-]{1,4}[a-zA-Z]?|[a-zA-Z\\\\-\\\\/]?|[Nn][Rr][\\\\.]?)\",\n \"(.*-$|^Die.*|^Der.*|^Das.*|[\\\\p{Alpha}]*ring$|.*\\\\/$)\", 2, \n \"([0-9\\\\.]{2,}|^<<.*)\");\n \n NamedEntityExtractor21 neExtractor = new NamedEntityExtractor21(\n neParameter);\n neExtractor.addTempOrganizationName(\"DiE Test ABC GmbH\");\n TestNamedEntityOwner neOwner = new TestNamedEntityOwner();\n \n for (int i = 0; i < neOwner.getNumberOfProcessedTextUnits(); i++) {\n neOwner.replaceProcessedTextUnitFromString(i,\n neExtractor.extractNamedEntities(neOwner\n .getInputTextUnitAsString(i), neOwner));\n }\n System.out.println(neOwner.toString());\n \n }", "public String recognizeAuthorSentence(String sentence) \n\t{\n\t\tLanguageModelInterface langM;\n\t\tCollection<LanguageModelInterface> authbis;\n\t\tIterator<LanguageModelInterface> it;\n\t\tDouble prob = 0.0;\n\t\tString author_recognized = UNKNOWN_AUTHOR;\n\n\t\tfor(int i = 0; i < this.authorLangModelsMap.size(); i++)\n\t\t{\n\t\t\tauthbis = this.authorLangModelsMap.get(authors.get(i)).values();\n\t\t\tit = authbis.iterator();\n\t\t\t//System.out.println(authors.get(i));\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tlangM = (NaiveLanguageModel) it.next();\n\t\t\t\t//System.out.println(langM.getSentenceProb(sentence));\n\t\t\t\t//System.out.println(authors.get(i));\n\t\t\t\t\n\t\t\t\tif(prob < langM.getSentenceProb(sentence))\n\t\t\t\t{\n\t\t\t\t\tprob = langM.getSentenceProb(sentence);\n\t\t\t\t\tauthor_recognized = authors.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn author_recognized;\n\t}", "public static void main(String[] args){\n \tString tempStringLine;\n\n\t\t /* SCANNING IN THE SENTENCE */\n // create a queue called sentenceQueue to temporary store each line of the text file as a String.\n MyLinkedList sentenceList = new MyLinkedList();\n\n // integer which keeps track of the index position for each new sentence string addition.\n int listCount = 0;\n\n // create a new file by opening a text file.\n File file2 = new File(\"testEmail2.txt\");\n try {\n\n \t// create a new scanner 'sc' for the newly allocated file.\n Scanner sc = new Scanner(file2);\n\n // while there are still lines within the file, continue.\n while (sc.hasNextLine()) {\n\n \t// save each line within the file to the String 'tempStringLine'.\n \ttempStringLine = sc.nextLine();\n\n \t// create a new BreakIterator called 'sentenceIterator' to break the 'tempStringLine' into sentences.\n BreakIterator sentenceIterator = BreakIterator.getSentenceInstance();\n\n // Set a new text string 'tempStringLine' to be scanned.\n sentenceIterator.setText(tempStringLine);\n\n // save the first index boundary in the integer 'start'.\n // The iterator's current position is set to the first text boundary.\n int start = sentenceIterator.first();\n\n // save the boundary following the current boundary in the integer 'end'.\n for(int end = sentenceIterator.next();\n\n \t// while the end integer does not equal 'BreakIterator.DONE' or the end of the boundary.\n \tend != BreakIterator.DONE;\n\n \t// set the start integer equal to the end integer. Set the end integer equal to the next boundary.\n \tstart = end, end = sentenceIterator.next()){\n\n \t// create a substring of tempStringLine of the start and end boundsries, which are just Strings of\n \t// each sentence.\n \tsentenceList.add(listCount,tempStringLine.substring(start, end));\n\n \t// add to the count.\n \tlistCount++;\n }\n }\n\n // close the scanner 'sc'.\n sc.close(); \n\n // if the file could not be opened, throw a FileNotFoundException.\n }catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n\t\tsentenceProcessor one = new sentenceProcessor(sentenceList);\n\t\tString[] names = one.findNames();\n System.out.println(\"Speaker \" + names[0]);\n System.out.println(\"Subject \" + names[1]);\n\t}", "public Set<String> getSentences(String input) {\n Set<String> output = new HashSet();\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // All the sentences in this document\n List<CoreMap> docSentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n for (CoreMap sentence : docSentences) {\n // traverse words in the current sentence\n output.add(sentence.toString());\n }\n\n return output;\n }", "public static void partOfSpeech(List<Token> tokenList)\r\n\t{\r\n\t\tString[] article = {\"a\", \"an\", \"the\"};\r\n\t\tString[] conjunction = {\"and\", \"but\", \"or\", \"nor\", \"for\", \"so\", \"yet\"};\r\n\r\n\t\tfor(Token tk : tokenList)\r\n\t\t{\t\r\n\t\t\tif (Arrays.asList(article).contains(tk.getName())) {\r\n\t\t\t\ttk.getFeatures().setPartOfSpeech(String.valueOf(PartOfSpeech.ARTICLE));\r\n\t\t\t}\r\n\t\t\telse if (Arrays.asList(conjunction).contains(tk.getName())) {\r\n\t\t\t\ttk.getFeatures().setPartOfSpeech(String.valueOf(PartOfSpeech.CONJUNCTION));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (tk.getName().contains(\".\"))\r\n\t\t\t{\r\n\t\t\t\t// FeatureSet set = new FeatureSet();\r\n\t\t\t\ttk.getFeatures().setPartOfSpeech(String.valueOf(PartOfSpeech.PERIOD));\r\n\t\t\t}\r\n\r\n\t\t\telse if (tk.getName().contains(\",\"))\r\n\t\t\t{\r\n\t\t\t\t// FeatureSet set = new FeatureSet();\r\n\t\t\t\ttk.getFeatures().setPartOfSpeech(String.valueOf(PartOfSpeech.COMMA));\r\n\t\t\t}\r\n\r\n\t\t\telse if(tk.getName().contains(\"-\"))\r\n\t\t\t{\r\n\t\t\t\t// FeatureSet set = new FeatureSet();\r\n\t\t\t\ttk.getFeatures().setPartOfSpeech(String.valueOf(PartOfSpeech.HYPHEN));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ttk.getFeatures().setPartOfSpeech(String.valueOf(PartOfSpeech.OTHER));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public ArrayList<Relation> extractRelations(LexicalizedParser lp) {\n\t\tBreakIterator iterator = BreakIterator.getSentenceInstance(Locale.US);\n\t\titerator.setText(body);\n\t\tint start = iterator.first();\n\t\tint sentenceCounter = 0;\n\t\tfor (int end = iterator.next();\n\t\t\t\tend != BreakIterator.DONE;\n\t\t\t\tstart = end, end = iterator.next()) {\n\t\t\tsentenceCounter++;\n\t\t\t/* list of NP in the sentence */\n\t\t\tArrayList<Tree> NPList;\n\t\t\t/* two NP will be used to extract relations */\n\t\t\tTree e1, e2;\n\t\t\tint e1Index, e2Index;\n\t\t\t\n\t\t\t// parse sentence\n\t\t\tString sentence = body.substring(start,end);\n\t\t\tString nerSentence = Processor.ner.runNER(sentence);\n\t\t\tString taggedSentence = Processor.tagger.tagSentence(sentence);\n\t\t\tTree parse = lp.apply(sentence);\n\t\t\t\n\t\t\t// generateNPList\n\t\t\tNPList = generateNPList(parse);\n\n\t\t\t// walk through NP list, select all e1 & e2 paris and construct relations\n\t\t\tif (NPList.size() < 2) \n\t\t\t\tcontinue;\n\t\t\tfor (e1Index = 0; e1Index < NPList.size() - 1; ++e1Index) {\n\t\t\t\tfor (e2Index = e1Index + 1; e2Index < NPList.size(); ++e2Index) {\n\t\t\t\t\tTree NP1 = NPList.get(e1Index);\n\t\t\t\t\tTree NP2 = NPList.get(e2Index);\n\t\t\t\t\t/* If enable export flag is set, then processor is in mode of\n\t\t\t\t\t * reading in predicated labeling file and export records into DB\n\t\t\t\t\t * Otherwise, processor is in mode of labeling itself using set of\n\t\t\t\t\t * rules and output the result to file for training.\n\t\t\t\t\t */\n\t\t\t\t\tboolean mode = !Processor.enableExport;\n\t\t\t\t\trelations.add(new Relation(url, NP1, NP2, sentence, taggedSentence, nerSentence, \n\t\t\t\t\t\t\tparse, (e2Index - e1Index), mode));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"There're \" + sentenceCounter + \" number of sentences in article \" + url);\n\t\treturn relations;\n\t}", "private void consumeEntity(boolean inAttribute) throws SAXException,\n IOException {\n clearStrBuf();\n appendStrBuf('&');\n /*\n * This section defines how to consume an entity. This definition is\n * used when parsing entities in text and in attributes.\n * \n * The behaviour depends on the identity of the next character (the one\n * immediately after the U+0026 AMPERSAND character):\n */\n char c = read();\n switch (c) {\n case ' ':\n case '\\t':\n case '\\n':\n case '\\u000B':\n case '\\u000C':\n case '<':\n case '&':\n case '\\u0000':\n /*\n * U+0009 CHARACTER TABULATION U+000A LINE FEED (LF) U+000B LINE\n * TABULATION U+000C FORM FEED (FF) U+0020 SPACE U+003C\n * LESS-THAN SIGN U+0026 AMPERSAND EOF Not an entity. No\n * characters are consumed, and nothing is returned. (This is\n * not an error, either.)\n */\n if (inAttribute) {\n appendStrBufToLongStrBuf();\n } else {\n emitStrBuf();\n }\n unread(c);\n return;\n case '#':\n /*\n * U+0023 NUMBER SIGN (#) Consume the U+0023 NUMBER SIGN.\n */\n appendStrBuf('#');\n consumeNCR(inAttribute);\n return;\n default:\n unread(c);\n int entCol = -1;\n int lo = 0;\n int hi = (Entities.NAMES.length - 1);\n int candidate = -1;\n int strBufMark = 0;\n outer: for (;;) {\n entCol++;\n c = read();\n /*\n * Anything else Consume the maximum number of characters\n * possible, with the consumed characters case-sensitively\n * matching one of the identifiers in the first column of\n * the entities table.\n */\n hiloop: for (;;) {\n if (hi == -1) {\n break;\n }\n if (entCol == Entities.NAMES[hi].length()) {\n break hiloop;\n }\n if (entCol > Entities.NAMES[hi].length()) {\n break outer;\n } else if (c < Entities.NAMES[hi].charAt(entCol)) {\n hi--;\n } else {\n break hiloop;\n }\n }\n \n loloop: for (;;) {\n if (hi < lo) {\n break outer;\n }\n if (entCol == Entities.NAMES[lo].length()) {\n candidate = lo;\n strBufMark = strBufLen;\n lo++;\n } else if (entCol > Entities.NAMES[lo].length()) {\n break outer;\n } else if (c > Entities.NAMES[lo].charAt(entCol)) {\n lo++;\n } else {\n break loloop;\n }\n }\n if (hi < lo) {\n break outer;\n }\n appendStrBuf(c);\n }\n unread(c);\n // TODO warn about apos (IE) and TRADE (Opera)\n if (candidate == -1) {\n /* If no match can be made, then this is a parse error. */\n err(\"Text after \\u201C&\\u201D did not match an entity name.\");\n /*\n * No characters are consumed, and nothing is returned.\n */\n if (inAttribute) {\n appendStrBufToLongStrBuf();\n } else {\n emitStrBuf();\n }\n return;\n } else {\n if (!Entities.NAMES[candidate].endsWith(\";\")) {\n /*\n * If the last character matched is not a U+003B\n * SEMICOLON (;), there is a parse error.\n */\n err(\"Entity reference was not terminated by a semicolon.\");\n if (inAttribute) {\n /*\n * If the entity is being consumed as part of an\n * attribute, and the last character matched is not\n * a U+003B SEMICOLON (;),\n */\n if (strBufMark == strBufLen) {\n c = read();\n unread(c);\n } else {\n c = strBuf[strBufMark];\n }\n if ((c >= '0' && c <= '9')\n || (c >= 'A' && c <= 'Z')\n || (c >= 'a' && c <= 'z')) {\n /*\n * and the next character is in the range U+0030\n * DIGIT ZERO to U+0039 DIGIT NINE, U+0041 LATIN\n * CAPITAL LETTER A to U+005A LATIN CAPITAL\n * LETTER Z, or U+0061 LATIN SMALL LETTER A to\n * U+007A LATIN SMALL LETTER Z, then, for\n * historical reasons, all the characters that\n * were matched after the U+0026 AMPERSAND (&)\n * must be unconsumed, and nothing is returned.\n */\n appendStrBufToLongStrBuf();\n return;\n }\n }\n }\n \n /*\n * Otherwise, return a character token for the character\n * corresponding to the entity name (as given by the second\n * column of the entities table).\n */\n char[] val = Entities.VALUES[candidate];\n emitOrAppend(val, inAttribute);\n // this is so complicated!\n if (strBufMark < strBufLen) {\n if (inAttribute) {\n for (int i = strBufMark; i < strBufLen; i++) {\n appendLongStrBuf(strBuf[i]);\n }\n } else {\n tokenHandler.characters(strBuf, strBufMark,\n strBufLen - strBufMark);\n }\n }\n return;\n /*\n * If the markup contains I'm &notit; I tell you, the entity\n * is parsed as \"not\", as in, I'm ¬it; I tell you. But if\n * the markup was I'm &notin; I tell you, the entity would\n * be parsed as \"notin;\", resulting in I'm ∉ I tell you.\n */\n }\n \n }\n }", "private static void iterateInput(){\n boolean isReadingKnowledgeBase = false;\n boolean isReadingProveStatements = false;\n\n String[] kb = readInput().split(\"\\\\r?\\\\n\");\n for(String sentence : kb){\n if(sentence.contains(\"Knowledge Base:\")){\n isReadingKnowledgeBase = true;\n isReadingProveStatements = false;\n } else if(sentence.contains(\"Prove the following sentences by refutation:\")){\n isReadingKnowledgeBase = false;\n isReadingProveStatements = true;\n } else {\n if(isReadingKnowledgeBase && !sentence.isEmpty()) {\n knowledgeBase.add(evalSentence(sentence));\n } else if(isReadingProveStatements && !sentence.isEmpty()){\n proveStatements.add(evalSentence(sentence));\n }\n }\n }\n }", "public Map<Sentence, NavigableSet<Integer>> findInSentences (String words,\n DialogueConstraints constraints)\n {\n\n Map<Sentence, NavigableSet<Integer>> matches = new LinkedHashMap<> ();\n\n for (Paragraph p : this.paragraphs)\n {\n\n matches.putAll (p.findInSentences (words,\n constraints));\n\n }\n\n return matches;\n\n }", "public ArrayList getAttributeList() {\n nounList = new ArrayList();\n attributeLists = new ArrayList();\n ArrayList adjAtt = new ArrayList();\n int separator = 0;\n List<Tree> leaves;\n String phraseNotation = \"NP([<NNS|NN|NNP]![<JJ|VBG])!$VP\";// !<VBG\";//@\" + phrase + \"! << @\" + phrase;\n\n TregexPattern VBpattern = TregexPattern.compile(phraseNotation);\n TregexMatcher matcher = VBpattern.matcher(sTree);\n\n while (matcher.findNextMatchingNode()) {\n Tree match = matcher.getMatch();\n Tree[] innerChild = match.children();\n int adjectiveExist = 0;\n String adj = \"\";\n String attribute = \"\";\n String b = \"\";\n\n if (innerChild.length > 1) {\n int count = 1;\n\n for (Tree inChild : innerChild) {\n if (inChild.value().equals(\"CC\") || inChild.value().equals(\",\")) {\n separator = 1;\n }\n if ((inChild.value().equals(\"JJ\")) || (inChild.value().equals(\"VBG\"))) {\n adjectiveExist++;\n leaves = inChild.getLeaves();\n adj = leaves.get(0).toString();\n if (designEleList.contains(adj)) {\n adj = \"\";\n }\n }\n if ((inChild.value().equals(\"NN\")) || (inChild.value().equals(\"NNS\")) || (inChild.value().equals(\"NNP\"))) {\n leaves = inChild.getLeaves(); //leaves correspond to the tokens\n if (count == 1) {\n if (adjectiveExist == 1) {\n attribute = adj + \" \" + leaves.get(0).yieldWords().get(0).word();\n } else {\n attribute = leaves.get(0).yieldWords().get(0).word();\n }\n if (!designEleList.contains(attribute)) {\n String identifiedWord = attribute;\n if (!identifiedWord.contains(\"_\")) {\n attributeLists.add(morphology.stem(identifiedWord));\n } else {\n attributeLists.add(identifiedWord);\n }\n }\n\n } else if (count >= 2 && separator == 0) {\n if (!attribute.contains(\"_\")) {\n\n attributeLists.remove(morphology.stem(attribute));\n attributeLists.remove(attribute);\n } else {\n attributeLists.remove(attribute);\n }\n\n attribute += \" \" + (leaves.get(0).yieldWords()).get(0).word();\n attributeLists.add(attribute);\n } else if (count >= 2 && separator == 1) {\n attribute = (leaves.get(0).yieldWords()).get(0).word();\n if (!attribute.contains(\"_\")) {\n attributeLists.add(morphology.stem(attribute));\n } else {\n attributeLists.add(attribute);\n }\n separator = 0;\n }\n count++;\n }\n }\n } else {\n for (Tree inChild : innerChild) {\n if ((inChild.value().equals(\"NN\")) || (inChild.value().equals(\"NNS\"))) {\n leaves = inChild.getLeaves(); //leaves correspond to the tokens\n String identifiedWord = ((leaves.get(0).yieldWords()).get(0).word());\n if (!identifiedWord.contains(\"_\")) {\n attributeLists.add(morphology.stem(identifiedWord));\n } else {\n attributeLists.add(identifiedWord);\n }\n }\n }\n }\n }\n adjAtt = getAdjectiveAttribute();\n if (!adjAtt.isEmpty()) {\n String att = \"\";\n for (int i = 0; i < adjAtt.size(); i++) {\n att = adjAtt.get(i).toString();\n if (!att.isEmpty() || !att.equals(\"\") || !(att.equals(\" \"))) {\n attributeLists.add(att.trim());\n }\n }\n }\n\n System.out.println(\"ATTRIBUTE LIST :\" + attributeLists);\n return attributeLists;\n\n }", "private void processArticle(String rawArticleText, Article article, Context context) throws IOException, InterruptedException {\n if (!rawArticleText.trim().isEmpty()) {\n String[] splitSentences = rawArticleText.split(\"\\\\.\\\\s\");\n PriorityQueue<Sentence> sortedSentences = new PriorityQueue<>();\n\n for (int sentenceIndex = 0; sentenceIndex < splitSentences.length; sentenceIndex++) {\n String rawSentence = splitSentences[sentenceIndex];\n Double sentenceTfIdf = getSentenceTfIdf(rawSentence, article);\n sortedSentences.add(new Sentence(sentenceTfIdf, rawSentence, sentenceIndex));\n }\n\n String summary = topOrderedSentences(sortedSentences);\n context.write(new IntWritable(article.id), new Text(summary));\n }\n }", "@Test\r\n public void testSentencesFromFile() throws IOException {\r\n System.out.print(\"Testing all sentences from file\");\r\n int countCorrect = 0;\r\n int countTestedSentences = 0;\r\n\r\n for (ArrayList<String> sentences : testSentences) {\r\n String correctSentence = sentences.get(0);\r\n System.out.println(\"testing '\" + correctSentence + \"' variations\");\r\n CorpusReader cr = new CorpusReader();\r\n ConfusionMatrixReader cmr = new ConfusionMatrixReader();\r\n SpellCorrector sc = new SpellCorrector(cr, cmr);\r\n int countSub = 0;\r\n for (String s : sentences) {\r\n String output = sc.correctPhrase(s);\r\n countSub += correctSentence.equals(output) ? 1 : 0;\r\n System.out.println(String.format(\"Input \\\"%1$s\\\" returned \\\"%2$s\\\", equal: %3$b\", s, output, correctSentence.equals(output)));\r\n collector.checkThat(\"input sentence: \" + s + \". \", output, IsEqual.equalTo(correctSentence));\r\n countTestedSentences++;\r\n }\r\n System.out.println(String.format(\"Correct answers for '%3$s': (%1$2d/%2$2d)\", countSub, sentences.size(), correctSentence));\r\n System.out.println();\r\n countCorrect += countSub;\r\n }\r\n\r\n System.out.println(String.format(\"Correct answers in total: (%1$2d/%2$2d)\", countCorrect, countTestedSentences));\r\n System.out.println();\r\n }", "public static Set<Word> allWords(List<Sentence> sentences) {\n//\t\tSystem.out.println(sentences);\n\t\t/* IMPLEMENT THIS METHOD! */\n\t\tSet<Word> words = new HashSet<>();\n\t\tList<Word> wordsList = new ArrayList<>();\t//use list to manipulate information\n\t\t\n\t\tif (sentences == null || sentences.isEmpty()) {//if the list is empty, method returns an empty set.\n\t\t return words;\t\n\t\t}\n\t\t\n\t\tfor(Sentence sentence : sentences) {\n//\t\t System.out.println(\"Sentence examined \" + sentence.getText());\n\t\t if (sentence != null) {\n\t\t \tString[] tokens = sentence.getText().toLowerCase().split(\"[\\\\p{Punct}\\\\s]+\");//regex to split line by punctuation and white space\n\t\t \tfor (String token : tokens) {\n//\t\t \t\tSystem.out.println(\"token: \" + token);\n\t\t \t\tif(token.matches(\"[a-zA-Z0-9]+\")) {\n\t\t \t\t\tWord word = new Word(token);\n//\t\t \t\t\tint index = wordsList.indexOf(word);//if the word doesn't exist it'll show as -1 \n\t\t \t\t\tif (wordsList.contains(word)) {//word is already in the list\n//\t\t \t\t\t\tSystem.out.println(\"already in the list: \" + word.getText());\n//\t\t \t\t\t\tSystem.out.println(\"This word exists \" + token + \". Score increased by \" + sentence.getScore());\n\t\t \t\t\t\twordsList.get(wordsList.indexOf(word)).increaseTotal(sentence.getScore());\n\t\t \t\t\t} else {//new word\t\n\t\t \t\t\t\tword.increaseTotal(sentence.getScore());\n\t\t \t\t\t\twordsList.add(word);\n////\t\t\t\t \tSystem.out.println(token + \" added for the score of \" + sentence.getScore());\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\t\twords = new HashSet<Word> (wordsList);\n\t\t\n\t\t//test - for the same text - object is the same\n//\t\tArrayList<String> e = new ArrayList<>();\n//\t\tString ex1 = \"test1\";\n//\t\tString ex2 = \"test1\";\n//\t\tString ex3 = \"test1\";\n//\t\te.add(ex1);\n//\t\te.add(ex2);\n//\t\te.add(ex3);\n//\t\tfor (String f : e) {\n//\t\t\tWord word = new Word(f);\n//\t\t\tSystem.out.println(word);\n//\t\t}\n\t\t//end of test\n\t\treturn words;\n\t}", "static TreeSet<Noun> parseNouns(Scanner data, int declension){\n\t\tassert(declension != Values.INDEX_ENDINGS_DECLENSION_THIRD && declension != Values.INDEX_ENDINGS_DECLENSION_THIRD_I_N && declension != Values.INDEX_ENDINGS_DECLENSION_THIRD_I_N); //there's a separate function for these guys.\n\t\tArrayList<String[]> raw = parseDataToArray(data);\n\t\tTreeSet<Noun> output = new TreeSet<Noun>();\n\n\t\tfor(String[] current : raw){ //iterate over each line from the original file.\n\n\t\t\tif(current.length != Values.NOUN_DATA_ARRAY_LENGTH_CORRECT){\n\t\t\t\tSystem.err.println(\"Error parsing a line.\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//System.out.println(\"Raw: \" + Arrays.toString(current));\n\n\t\t\t//current[] contains a split based on tabs. Generally {chapter, nom/gen/gender, definition}.\n\n\t\t\tint chapter = 0;\n\t\t\tString nominative = null;\n\t\t\tString genitive = null;\n\t\t\tchar gender = '-';\n\t\t\tArrayList<String> definitions = new ArrayList<String>();\n\n\t\t\t//Values.betterStringArrayPrint(current);\n\n\t\t\ttry{ //try to read a noun, assuming that the chapter IS specified\n\t\t\t\tchapter = Integer.parseInt(current[0]);\n\t\t\t\tnominative = current[1].split(\", \")[0];\n\t\t\t\tgenitive = current[1].split(\", \")[1];\n\t\t\t\tgender = current[1].split(\", \")[2].charAt(0);\n\t\t\t\tList<String> tempDefinitions = Arrays.asList(current[2].split(\",|;\")); //definitions\n\t\t\t\tdefinitions.addAll(tempDefinitions);\n\t\t\t} catch(NumberFormatException e){ //can happen if a chapter isn't specified. Read the noun from a null chapter.\n\t\t\t\tchapter = Values.CHAPTER_VOID;\n\t\t\t\tnominative = current[1].split(\", \")[0];\n\t\t\t\tgenitive = current[1].split(\", \")[1];\n\t\t\t\tgender = current[1].split(\", \")[2].charAt(0);\n\t\t\t\tList<String> tempDefinitions = Arrays.asList(current[2].split(\",|;\")); //definitions\n\t\t\t\tdefinitions.addAll(tempDefinitions);\n\t\t\t} catch(Exception e){\n\t\t\t\tSystem.err.println(\"Could not read a line!\");\n\t\t\t\tcontinue; //We can't make a noun out of the botrked line.\n\t\t\t}\n\t\t\tint genderIndex = Values.getGenderIndex(gender);\n\t\t\ttrimAll(definitions);\n\t\t\tNoun currentNoun = new Noun(nominative, genitive, chapter, genderIndex, declension, definitions);\n\t\t\tSystem.out.println(\"Added: \" + currentNoun);\n\t\t\toutput.add(currentNoun);\n\t\t}\n\n\t\treturn output;\n\t}", "public synchronized void process() \n\t{\n\t\t// for each word in a line, tally-up its frequency.\n\t\t// do sentence-segmentation first.\n\t\tCopyOnWriteArrayList<String> result = textProcessor.sentenceSegmementation(content.get());\n\t\t\n\t\t// then do tokenize each word and count the terms.\n\t\ttextProcessor.tokenizeAndCount(result);\n\t}", "static TreeSet<Noun> parse3rdNouns(Scanner data){\n\n\t\tint declension = 3;\n\t\tArrayList<String[]> raw = parseDataToArray(data);\n\t\tTreeSet<Noun> output = new TreeSet<Noun>();\n\n\t\tfor(String[] current : raw){ //iterate over each line from the original file.\n\n\t\t\tif(current.length != Values.NOUN_DATA_ARRAY_LENGTH_CORRECT){\n\t\t\t\tSystem.err.println(\"Error parsing a line.\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//System.out.println(\"Raw: \" + Arrays.toString(current));\n\n\t\t\t//current[] contains a split based on tabs. Generally {chapter, nom/gen/gender, definition}.\n\n\t\t\tint chapter = 0;\n\t\t\tString nominative = null;\n\t\t\tString genitive = null;\n\t\t\tchar gender = '-';\n\t\t\tArrayList<String> definitions = new ArrayList<String>();\n\n\t\t\t//Values.betterStringArrayPrint(current);\n\t\t\ttry{\n\t\t\t\ttry{ //try to read a noun, assuming that the chapter IS specified\n\t\t\t\t\tchapter = Integer.parseInt(current[0]);\n\t\t\t\t\tnominative = current[1].split(\", \")[0];\n\t\t\t\t\tgenitive = current[1].split(\", \")[1];\n\t\t\t\t\tgender = current[1].split(\", \")[2].charAt(0);\n\t\t\t\t\tList<String> tempDefinitions = Arrays.asList(current[2].split(\",|;\")); //definitions\n\t\t\t\t\tdefinitions.addAll(tempDefinitions);\n\t\t\t\t\tdeclension = Values.INDEX_ENDINGS_DECLENSION_THIRD;\n\t\t\t\t\t//System.out.println(\"No i-stem\");\n\t\t\t\t} catch(NumberFormatException e){ //I-Stem.\n\t\t\t\t\tchapter = Integer.parseInt(current[0].substring(0, 2));\n\t\t\t\t\tnominative = current[1].split(\", \")[0];\n\t\t\t\t\tgenitive = current[1].split(\", \")[1];\n\t\t\t\t\tgender = current[1].split(\", \")[2].charAt(0);\n\t\t\t\t\tList<String> tempDefinitions = Arrays.asList(current[2].split(\",|;\")); //definitions\n\t\t\t\t\tdefinitions.addAll(tempDefinitions);\n\t\t\t\t\tdeclension = Values.INDEX_ENDINGS_DECLENSION_THIRD_I;\n\t\t\t\t\t//System.out.println(\"i-stem\");\n\t\t\t\t}\n\t\t\t} catch(Exception e){\n\t\t\t\tSystem.err.println(\"Could not read a line!\");\n\t\t\t\tcontinue; //We can't make a noun out of the botrked line.\n\t\t\t}\n\t\t\tint genderIndex = Values.getGenderIndex(gender);\n\t\t\ttrimAll(definitions);\n\t\t\tNoun currentNoun = new Noun(nominative, genitive, chapter, genderIndex, declension, definitions);\n\t\t\tSystem.out.println(\"Added: \" + currentNoun);\n\t\t\toutput.add(currentNoun);\n\t\t}\n\n\t\treturn output;\n\t}", "public void getParsed(String text) {\n\t\tAnnotation document = new Annotation(text);\n\n\t\t// run all Annotators on this text\n\t\tpipeline.annotate(document);\n\t\tsentences = document.get(SentencesAnnotation.class);\n\t\tsentIt = sentences.iterator();\n\t}", "private Interpretations interpretNamesOfNLQuestion(\n String nlQuestion, int maxNumOfInterpretations, SuggestionParams params)\n throws SolrGrammarSuggester.GrammarLookupFailure, SolrNameSuggester.NameLookupFailed {\n\n Map<String, WordType> wordTypes = new HashMap<>();\n List<Interpretation> namesInterpretations = new ArrayList<>();\n\n String[] words = nlQuestion.split(\"\\\\s+\");\n\n boolean anyKnownName = false;\n\n // Find all names with their corresponding types in the question.\n // Add type and names to the hashmap names.\n for (String word : words) {\n\n //grammar word\n boolean isGrammarWord = grammarSuggester.checkIfGrammarWord(word);\n if (isGrammarWord) {\n wordTypes.put(word, WordType.Grammar);\n continue;\n }\n\n //check if the word can be interpreted as name\n List<NameResult> nameResults = nameSuggester.suggestNameResolution(word);\n\n //unknown word\n if (nameResults.isEmpty()) {\n wordTypes.put(word, WordType.Unknown);\n continue;\n }\n else { //name\n wordTypes.put(word, WordType.Name);\n anyKnownName = true;\n\n namesInterpretations = updateInterpretations(namesInterpretations,\n nameResults, word, maxNumOfInterpretations);\n }\n }\n\n avoidNameDuplicates(namesInterpretations, params);\n\n //there was no known names -> return one \"empty\" template\n if (!anyKnownName) {\n namesInterpretations.add(new Interpretation(new ArrayList<NameResult>()));\n }\n\n return new Interpretations(namesInterpretations, wordTypes);\n }", "public Set<NounPhrase> getEntities(String type){\n\t\tif(type.equals(\"S\") || type.equals(\"s\"))\n\t\t\treturn this.subjectSet;\n\t\telse if(type.equals(\"O\") || type.equals(\"o\"))\n\t\t\treturn this.objectSet;\n\t\telse\n\t\t\treturn null;\n\t}", "public Map<String, String> partsOfSpeech(String input) {\n Map<String, String> output = new HashMap();\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // traverse words in the document\n document.get(CoreAnnotations.TokensAnnotation.class).stream().forEach((token) -> {\n // this is the text of the token\n String word = token.get(CoreAnnotations.TextAnnotation.class);\n // this is the POS tag of the token\n String pos = token.get(CoreAnnotations.PartOfSpeechAnnotation.class);\n output.put(word, pos);\n });\n\n return output;\n }", "public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }", "public static void main(String[] args) throws IOException \r\n\t{\r\n\t\tString s1 = \"THE SALVADORAN GOVERNMENT TODAY DEPLORED THE DISAPPEARANCE OF SOCIAL DEMOCRATIC LEADER HECTOR OQUELI COLINDRES THIS MORNING IN GUATEMALA.\";\r\n\t\tString soln = classifier.classifyToString(s1);\r\n\t\tSystem.out.println(soln);\r\n\t\tNER n = new NER();\r\n\t\tn.getPersons(s1);\r\n\t\tSystem.out.println(\"\\n\");\r\n\t\tn.getOrgs(s1);\r\n\t\tSystem.out.println(\"\\n\");\r\n\t\tn.getLocations(s1);\r\n\t}", "public static String getAllSentences(String username) {\r\n\t\t\r\n\t\tSentence s = null;\r\n\t\t\r\n\t\t// Gets all the sentences\r\n\t\tResponse res= ServicesLocator.getCentric1Connection().path(\"sentence\").request().accept(MediaType.APPLICATION_JSON).get();\r\n\t\t\r\n\t\t// Checks the response code and prints the text\r\n\t\tif(res.getStatus()==Response.Status.OK.getStatusCode()) {\r\n\t\t\ts=res.readEntity(Sentence.class);\r\n\t\t\treturn s.getText();\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn \"An unexpected error occured\";\r\n\t\t}\r\n\t}", "List<FraseEntidade> getPhrasesByAuthorName(String name);", "@Override\n\tpublic void process(JCas aJCas) throws AnalysisEngineProcessException {\n\t\tString text = aJCas.getDocumentText();\n\n\t\t// create an empty Annotation just with the given text\n\t\tAnnotation document = new Annotation(text);\n//\t\tAnnotation document = new Annotation(\"Barack Obama was born in Hawaii. He is the president. Obama was elected in 2008.\");\n\n\t\t// run all Annotators on this text\n\t\tpipeline.annotate(document); \n\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class);\n\t\t HelperDataStructures hds = new HelperDataStructures();\n\n\t\t\n\t\t//SPnew language-specific settings:\n\t\t//SPnew subject tags of the parser\n\t\t HashSet<String> subjTag = new HashSet<String>(); \n\t\t HashSet<String> dirObjTag = new HashSet<String>(); \n\t\t //subordinate conjunction tags\n\t\t HashSet<String> compTag = new HashSet<String>(); \n\t\t //pronoun tags\n\t\t HashSet<String> pronTag = new HashSet<String>(); \n\t\t \n\t\t HashSet<String> passSubjTag = new HashSet<String>();\n\t\t HashSet<String> apposTag = new HashSet<String>(); \n\t\t HashSet<String> verbComplementTag = new HashSet<String>(); \n\t\t HashSet<String> infVerbTag = new HashSet<String>(); \n\t\t HashSet<String> relclauseTag = new HashSet<String>(); \n\t\t HashSet<String> aclauseTag = new HashSet<String>(); \n\t\t \n\t\t HashSet<String> compLemma = new HashSet<String>(); \n\t\t HashSet<String> coordLemma = new HashSet<String>(); \n\t\t HashSet<String> directQuoteIntro = new HashSet<String>(); \n\t\t HashSet<String> indirectQuoteIntroChunkValue = new HashSet<String>();\n\t\t \n//\t\t HashSet<String> finiteVerbTag = new HashSet<String>();\n\t\t \n\n\t\t //OPEN ISSUES PROBLEMS:\n\t\t //the subject - verb relation finding does not account for several specific cases: \n\t\t //opinion verbs with passive subjects as opinion holder are not accounted for,\n\t\t //what is needed is a marker in the lex files like PASSSUBJ\n\t\t //ex: Obama is worried/Merkel is concerned\n\t\t //Many of the poorer countries are concerned that the reduction in structural funds and farm subsidies may be detrimental in their attempts to fulfill the Copenhagen Criteria.\n\t\t //Some of the more well off EU states are also worried about the possible effects a sudden influx of cheap labor may have on their economies. Others are afraid that regional aid may be diverted away from those who currently benefit to the new, poorer countries that join in 2004 and beyond. \n\t\t// Does not account for infinitival constructions, here again a marker is needed to specify\n\t\t //subject versus object equi\n\t\t\t//Christian Noyer was reported to have said that it is ok.\n\t\t\t//Reuters has reported Christian Noyer to have said that it is ok.\n\t\t //Obama is likely to have said.. \n\t\t //Several opinion holder- opinion verb pairs in one sentence are not accounted for, right now the first pair is taken.\n\t\t //what is needed is to run through all dependencies. For inderect quotes the xcomp value of the embedded verb points to the \n\t\t //opinion verb. For direct quotes the offsets closest to thwe quote are relevant.\n\t\t //a specific treatment of inverted subjects is necessary then. Right now the\n\t\t //strategy relies on the fact that after the first subj/dirobj - verb pair the\n\t\t //search is interrupted. Thus, if the direct object precedes the subject, it is taken as subject.\n\t\t // this is the case in incorrectly analysed inverted subjeects as: said Zwickel on Monday\n\t\t //coordination of subject not accounted for:employers and many economists\n\t\t //several subject-opinion verbs:\n\t\t //Zwickel has called the hours discrepancy between east and west a \"fairness gap,\" but employers and many economists point out that many eastern operations have a much lower productivity than their western counterparts.\n\t\t if (language.equals(\"en\")){\n \t subjTag.add(\"nsubj\");\n \t subjTag.add(\"xsubj\");\n \t subjTag.add(\"nmod:agent\");\n \t \n \t dirObjTag.add(\"dobj\"); //for inverted subject: \" \" said IG metall boss Klaus Zwickel on Monday morning.\n \t \t\t\t\t\t\t//works only with break DEPENDENCYSEARCH, otherwise \"Monday\" is nsubj \n \t \t\t\t\t\t\t//for infinitival subject of object equi: Reuters reports Obama to have said\n \tpassSubjTag.add(\"nsubjpass\");\n \tapposTag.add(\"appos\");\n \trelclauseTag.add(\"acl:relcl\");\n \taclauseTag.add(\"acl\");\n \t compTag.add(\"mark\");\n \t pronTag.add(\"prp\");\n \thds.pronTag.add(\"prp\");\n \tcompLemma.add(\"that\");\n \tcoordLemma.add(\"and\");\n \tverbComplementTag.add(\"ccomp\");\n \tverbComplementTag.add(\"parataxis\");\n\n \tinfVerbTag.add(\"xcomp\"); //Reuters reported Merkel to have said\n \tinfVerbTag.add(\"advcl\");\n \tdirectQuoteIntro.add(\":\");\n \tindirectQuoteIntroChunkValue.add(\"SBAR\");\n \thds.objectEqui.add(\"report\");\n \thds.objectEqui.add(\"quote\");\n \thds.potentialIndirectQuoteTrigger.add(\"say\");\n// \thds.objectEqui.add(\"confirm\");\n// \thds.subjectEqui.add(\"promise\");\n// \thds.subjectEqui.add(\"quote\");\n// \thds.subjectEqui.add(\"confirm\");\n }\n\t\t \n\t\t boolean containsSubordinateConjunction = false;\n\t\t\n\t\t \n\t\tfor (CoreMap sentence : sentences) {\n//\t\t\tSystem.out.println(\"PREPROCESSING..\");\n\t\t\t\tSentenceAnnotation sentenceAnn = new SentenceAnnotation(aJCas);\n\t\t\t\t\n\t\t\t\tint beginSentence = sentence.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endSentence = sentence.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(sentence.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tsentenceAnn.setBegin(beginSentence);\n\t\t\t\tsentenceAnn.setEnd(endSentence);\n\t\t\t\tsentenceAnn.addToIndexes();\n\t\t\t\t\n\t\t\t\t//SP Map offsets to NER\n\t\t\t\tList<NamedEntity> ners = JCasUtil.selectCovered(aJCas, //SPnew tut\n\t\t\t\t\t\tNamedEntity.class, sentenceAnn);\n\t\t\t\tfor (NamedEntity ne : ners){\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.jcasType.toString());\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.getCoveredText().toString());\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.jcasType.casTypeCode);\n\t\t\t\t\t//Person is 71, Location is 213, Organization is 68 geht anders besser siehe unten\n\t\t\t\t\tint nerStart = ne\n\t\t\t\t\t\t\t.getBegin();\n\t\t\t\t\tint nerEnd = ne.getEnd();\n//\t\t\t\t\tSystem.out.println(\"NER: \" + ne.getCoveredText() + \" \" + nerStart + \"-\" + nerEnd ); \n\t\t\t\t\tString offsetNer = \"\" + nerStart + \"-\" + nerEnd;\n\t\t\t\t\thds.offsetToNer.put(offsetNer, ne.getCoveredText());\n//\t\t\t\t\tNer.add(offsetNer);\n\t\t\t\t\thds.Ner.add(offsetNer);\n//\t\t\t\t\tSystem.out.println(\"NER: TYPE \" +ne.getValue().toString());\n\t\t\t\t\tif (ne.getValue().equals(\"PERSON\")){\n\t\t\t\t\t\thds.NerPerson.add(offsetNer);\n\t\t\t\t\t}\n\t\t\t\t\telse if (ne.getValue().equals(\"ORGANIZATION\")){\n\t\t\t\t\t\thds.NerOrganization.add(offsetNer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//DBpediaLink info: map offsets to links\n\t\t\t\tList<DBpediaResource> dbpeds = JCasUtil.selectCovered(aJCas, //SPnew tut\n\t\t\t\t\t\tDBpediaResource.class, sentenceAnn);\n\t\t\t\tfor (DBpediaResource dbped : dbpeds){\n//\t\t\t\t\t\n//\t\t\t\t\tint dbStart = dbped\n//\t\t\t\t\t\t\t.getBegin();\n//\t\t\t\t\tint dbEnd = dbped.getEnd();\n\t\t\t\t\t// not found if dbpedia offsets are wrongly outside than sentences\n//\t\t\t\t\tSystem.out.println(\"DBPED SENT: \" + sentenceAnn.getBegin()+ \"-\" + sentenceAnn.getEnd() ); \n//\t\t\t\t\tString offsetDB = \"\" + dbStart + \"-\" + dbEnd;\n//\t\t\t\t\thds.labelToDBpediaLink.put(dbped.getLabel(), dbped.getUri());\n//\t\t\t\t\tSystem.out.println(\"NOW DBPED: \" + dbped.getLabel() + \"URI: \" + dbped.getUri() ); \n\t\t\t\t\thds.dbpediaSurfaceFormToDBpediaLink.put(dbped.getCoveredText(), dbped.getUri());\n//\t\t\t\t\tSystem.out.println(\"NOW DBPED: \" + dbped.getCoveredText() + \"URI: \" + dbped.getUri() ); \n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//SP Map offsets to lemma of opinion verb/noun; parser does not provide lemma\n\t\t\t\t for (CoreLabel token: sentence.get(TokensAnnotation.class)) {\n//\t\t\t\t\t System.out.println(\"LEMMA \" + token.lemma().toString());\n\t\t\t\t\t int beginTok = token.beginPosition();\n\t\t\t\t\t int endTok = token.endPosition();\n\t\t\t\t\t String offsets = \"\" + beginTok + \"-\" + endTok;\n\t\t\t\t\t hds.offsetToLemma.put(offsets, token.lemma().toString());\n\t\t\t\t\t \n\t\t\t\t\t \t if (opinion_verbs.contains(token.lemma().toString())){\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionVerb.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t hds.OpinionExpression.add(offsets);\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionExpression.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t \n//\t\t\t \t System.out.println(\"offsetToLemmaOfOpinionVerb \" + token.lemma().toString());\n\t\t\t\t\t \t }\n\t\t\t\t\t \t if (passive_opinion_verbs.contains(token.lemma().toString())){\n\t\t\t\t\t\t\t hds.offsetToLemmaOfPassiveOpinionVerb.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t hds.OpinionExpression.add(offsets);\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionExpression.put(offsets, token.lemma().toString());\n//\t\t\t \t System.out.println(\"offsetToLemmaOfPassiveOpinionVerb \" + token.lemma().toString());\n\t\t\t\t\t \t }\n\n\t\t\t\t } \n\n\t\t\t//SPnew parser\n\t\t\tTree tree = sentence.get(TreeAnnotation.class);\n\t\t\tTreebankLanguagePack tlp = new PennTreebankLanguagePack();\n\t\t\tGrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory();\n\t\t\tGrammaticalStructure gs = gsf.newGrammaticalStructure(tree);\n\t\t\tCollection<TypedDependency> td = gs.typedDependenciesCollapsed();\n\n\t\t\t \n//\t\t\tSystem.out.println(\"TYPEDdep\" + td);\n\t\t\t\n\t\t\tObject[] list = td.toArray();\n//\t\t\tSystem.out.println(list.length);\n\t\t\tTypedDependency typedDependency;\nDEPENDENCYSEARCH: for (Object object : list) {\n\t\t\ttypedDependency = (TypedDependency) object;\n//\t\t\tSystem.out.println(\"DEP \" + typedDependency.dep().toString()+ \n//\t\t\t\t\t\" GOV \" + typedDependency.gov().toString()+ \n//\t\t\t\" :: \"+ \" RELN \"+typedDependency.reln().toString());\n\t\t\tString pos = null;\n String[] elements;\n String verbCand = null;\n int beginVerbCand = -5;\n\t\t\tint endVerbCand = -5;\n\t\t\tString offsetVerbCand = null;\n\n if (compTag.contains(typedDependency.reln().toString())) {\n \tcontainsSubordinateConjunction = true;\n// \tSystem.out.println(\"subordConj \" + typedDependency.dep().toString().toLowerCase());\n }\n \n else if (subjTag.contains(typedDependency.reln().toString())){\n \thds.predicateToSubjectChainHead.clear();\n \thds.subjectToPredicateChainHead.clear();\n \t\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n//\t\t\t\tSystem.out.println(\"VERBCand \" + verbCand + offsetVerbCand);\n//\t\t\t\tfor (HashMap.Entry<String, String> entry : hds.offsetToLemma.entrySet()) {\n//\t\t\t\t String key = entry.getKey();\n//\t\t\t\t Object value = entry.getValue();\n//\t\t\t\t System.out.println(\"OFFSET \" + key + \" LEMMA \" + value);\n//\t\t\t\t // FOR LOOP\n//\t\t\t\t}\n//\t\t\t\tif (hds.offsetToLemma.containsKey(offsetVerbCand)){\n//\t\t\t\t\tString verbCandLemma = hds.offsetToLemma.get(offsetVerbCand);\n//\t\t\t\t\tif (hds.objectEqui.contains(verbCandLemma) || hds.subjectEqui.contains(verbCandLemma)){\n//\t\t\t\t\t\tSystem.out.println(\"SUBJCHAIN BEGIN verbCand \" + verbCand);\n//\t\t\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t\tSystem.out.println(\"SUBJCHAINHEAD1\");\n\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\tSystem.out.println(\"verbCand \" + verbCand);\n\t\t\t\t//hack for subj after obj said Zwickel (obj) on Monday morning (subj)\n\t\t\t\tif (language.equals(\"en\") \n\t\t\t\t\t\t&& hds.predicateToObject.containsKey(offsetVerbCand)\n\t\t\t\t\t\t){\n// \t\tSystem.out.println(\"CONTINUE DEP\");\n \t\tcontinue DEPENDENCYSEARCH;\n \t}\n\t\t\t\telse {\n\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n\t\t\t\t}\n }\n //Merkel is concerned\n else if (passSubjTag.contains(typedDependency.reln().toString())){\n \t//Merkel was reported\n \t//Merkel was concerned\n \t//Merkel was quoted\n \thds.predicateToSubjectChainHead.clear();\n \thds.subjectToPredicateChainHead.clear();\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n//\t\t\t\tSystem.out.println(\"VERBCand \" + verbCand + offsetVerbCand);\n//\t\t\t\tif (hds.offsetToLemma.containsKey(offsetVerbCand)){\n//\t\t\t\t\tString verbCandLemma = hds.offsetToLemma.get(offsetVerbCand);\n////\t\t\t\t\tSystem.out.println(\"LEMMA verbCand \" + verbCandLemma);\n//\t\t\t\t\tif (hds.objectEqui.contains(verbCandLemma) || hds.subjectEqui.contains(verbCandLemma)){\n//\t\t\t\t\t\tSystem.out.println(\"SUBJCHAIN BEGIN verbCand \" + verbCand);\n//\t\t\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\t\t}\n//\t\t\t\t}\n \t\n \tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n// \tSystem.out.println(\"SUBJCHAINHEAD2\");\n \t//Merkel is concerned\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfPassiveOpinionVerb,\n \t\t\thds);\n }\n //Meanwhile, the ECB's vice-president, Christian Noyer, was reported at the start of the week to have said that the bank's future interest-rate moves\n// would depend on the behavior of wage negotiators as well as the pace of the economic recovery.\n\n else if (apposTag.contains(typedDependency.reln().toString())){\n \t\n \tString subjCand = typedDependency.gov().toString().toLowerCase();\n \tint beginSubjCand = typedDependency.gov().beginPosition();\n \tint endSubjCand = typedDependency.gov().endPosition();\n \tString offsetSubjCand = \"\" + beginSubjCand + \"-\" + endSubjCand;\n \tString appo = typedDependency.dep().toString().toLowerCase();\n\t\t\t\tint beginAppo = typedDependency.dep().beginPosition();\n\t\t\t\tint endAppo = typedDependency.dep().endPosition();\n\t\t\t\tString offsetAppo = \"\" + beginAppo + \"-\" + endAppo;\n\t\t\t\t\n// \tSystem.out.println(\"APPOSITION1 \" + subjCand + \"::\"+ appo + \":\" + offsetSubjCand + \" \" + offsetAppo);\n \thds.subjectToApposition.put(offsetSubjCand, offsetAppo);\n }\n else if (relclauseTag.contains(typedDependency.reln().toString())){\n \tString subjCand = typedDependency.gov().toString().toLowerCase();\n \tint beginSubjCand = typedDependency.gov().beginPosition();\n \tint endSubjCand = typedDependency.gov().endPosition();\n \tString offsetSubjCand = \"\" + beginSubjCand + \"-\" + endSubjCand;\n \tverbCand = typedDependency.dep().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.dep().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.dep().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n\t\t\t\tString subjCandPos = null;\n\t\t\t\tif (hds.predicateToSubject.containsKey(offsetVerbCand)){\n\t\t\t\t\t\n\t\t\t\t\tif (subjCand.matches(\".+?/.+?\")) { \n\t\t\t\t\t\telements = subjCand.split(\"/\");\n\t\t\t\t\t\tsubjCand = elements[0];\n\t\t\t\t\t\tsubjCandPos = elements[1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tString del = hds.predicateToSubject.get(offsetVerbCand);\n\t\t\t\t\thds.predicateToSubject.remove(offsetVerbCand);\n\t\t\t\t\thds.subjectToPredicate.remove(del);\n\t\t\t\t\thds.normalPredicateToSubject.remove(offsetVerbCand);\n\t\t\t\t\thds.subjectToNormalPredicate.remove(del);\n//\t\t\t\t\tSystem.out.println(\"REMOVE RELPRO \" + verbCand + \"/\" + hds.offsetToLemma.get(del));\n\t\t\t\t\thds.predicateToSubject.put(offsetVerbCand, offsetSubjCand);\n\t\t\t\t\thds.subjectToPredicate.put( offsetSubjCand, offsetVerbCand);\n\t\t\t\t\thds.normalPredicateToSubject.put(offsetVerbCand, offsetSubjCand);\n\t\t\t\t\thds.subjectToNormalPredicate.put( offsetSubjCand, offsetVerbCand);\n//\t\t\t\t\tSystem.out.println(\"RELCLAUSE \" + subjCand + \"::\" + \":\" + verbCand);\n\t\t\t\t\thds.offsetToSubjectHead.put(offsetSubjCand,subjCand);\n\t\t\t\t\thds.SubjectHead.add(offsetSubjCand);\n\t\t\t\t\t\n\t\t\t\t\tif (subjCandPos != null && hds.pronTag.contains(subjCandPos)){\n\t\t\t\t\t\thds.PronominalSubject.add(offsetSubjCand);\n\t\t\t\t\t}\n\t\t\t\t}\n \t\n \t\n }\n \n else if (dirObjTag.contains(typedDependency.reln().toString())\n \t\t){\n \tstoreRelations(typedDependency, hds.predicateToObject, hds.ObjectToPredicate, hds);\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n\t\t\t\t\n\t\t\t\tString objCand = typedDependency.dep().toString().toLowerCase();\n \tint beginObjCand = typedDependency.dep().beginPosition();\n \tint endObjCand = typedDependency.dep().endPosition();\n \tString offsetObjCand = \"\" + beginObjCand + \"-\" + endObjCand;\n \tString objCandPos;\n \tif (objCand.matches(\".+?/.+?\")) { \n\t\t\t\t\telements = objCand.split(\"/\");\n\t\t\t\t\tobjCand = elements[0];\n\t\t\t\t\tobjCandPos = elements[1];\n//\t\t\t\t\tSystem.out.println(\"PRON OBJ \" + objCandPos);\n\t\t\t\t\tif (pronTag.contains(objCandPos)){\n\t\t\t\t\thds.PronominalSubject.add(offsetObjCand);\n\t\t\t\t\t}\n\t\t\t\t\t}\n// \tSystem.out.println(\"DIROBJ STORE ONLY\");\n \t//told Obama\n \t//said IG metall boss Klaus Zwickel\n \t// problem: pointing DO\n \t//explains David Gems, pointing out the genetically manipulated species.\n \t if (language.equals(\"en\") \n \t\t\t\t\t\t&& !hds.normalPredicateToSubject.containsKey(offsetVerbCand)\n \t\t\t\t\t\t){\n// \t\t System.out.println(\"INVERSE SUBJ HACK ENGLISH PREDTOOBJ\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t }\n }\n //was reported to have said\n else if (infVerbTag.contains(typedDependency.reln().toString())){\n \tstoreRelations(typedDependency, hds.mainToInfinitiveVerb, hds.infinitiveToMainVerb, hds);\n// \tSystem.out.println(\"MAIN-INF\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t\n }\n else if (aclauseTag.contains(typedDependency.reln().toString())){\n \tstoreRelations(typedDependency, hds.nounToInfinitiveVerb, hds.infinitiveVerbToNoun, hds);\n// \tSystem.out.println(\"NOUN-INF\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t\n }\n \n \n\n\t\t\t}\n\t\t\t\n//\t\t\tSemanticGraph dependencies = sentence.get(CollapsedCCProcessedDependenciesAnnotation.class);\n//\t\t\tSystem.out.println(\"SEM-DEP \" + dependencies);\t\n\t\t}\n\t\t\n\n\t\tMap<Integer, edu.stanford.nlp.dcoref.CorefChain> corefChains = document.get(CorefChainAnnotation.class);\n\t\t \n\t\t if (corefChains == null) { return; }\n\t\t //SPCOPY\n\t\t for (Entry<Integer, edu.stanford.nlp.dcoref.CorefChain> entry: corefChains.entrySet()) {\n//\t\t System.out.println(\"Chain \" + entry.getKey() + \" \");\n\t\t \tint chain = entry.getKey();\n\t\t String repMenNer = null;\n\t\t String repMen = null;\n\t\t String offsetRepMenNer = null;\n\n\t\t List<IaiCorefAnnotation> listCorefAnnotation = new ArrayList<IaiCorefAnnotation>();\n\t\t \n\t\t for (CorefMention m : entry.getValue().getMentionsInTextualOrder()) {\n\t\t \tboolean corefMentionContainsNer = false;\n\t\t \tboolean repMenContainsNer = false;\n\n//\t\t \n\n\t\t\t\t// We need to subtract one since the indices count from 1 but the Lists start from 0\n\t\t \tList<CoreLabel> tokens = sentences.get(m.sentNum - 1).get(TokensAnnotation.class);\n\t\t // We subtract two for end: one for 0-based indexing, and one because we want last token of mention not one following.\n//\t\t System.out.println(\" \" + m + \", i.e., 0-based character offsets [\" + tokens.get(m.startIndex - 1).beginPosition() +\n//\t\t \", \" + tokens.get(m.endIndex - 2).endPosition() + \")\");\n\t\t \n\t\t int beginCoref = tokens.get(m.startIndex - 1).beginPosition();\n\t\t\t\t int endCoref = tokens.get(m.endIndex - 2).endPosition();\n\t\t\t\t String offsetCorefMention = \"\" + beginCoref + \"-\" + endCoref;\n\t\t\t\t String corefMention = m.mentionSpan;\n\n\t\t\t\t CorefMention RepresentativeMention = entry.getValue().getRepresentativeMention();\n\t\t\t\t repMen = RepresentativeMention.mentionSpan;\n\t\t\t\t List<CoreLabel> repMenTokens = sentences.get(RepresentativeMention.sentNum - 1).get(TokensAnnotation.class);\n//\t\t\t\t System.out.println(\"REPMEN ANNO \" + \"\\\"\" + repMen + \"\\\"\" + \" is representative mention\" +\n// \", i.e., 0-based character offsets [\" + repMenTokens.get(RepresentativeMention.startIndex - 1).beginPosition() +\n//\t\t \", \" + repMenTokens.get(RepresentativeMention.endIndex - 2).endPosition() + \")\");\n\t\t\t\t int beginRepMen = repMenTokens.get(RepresentativeMention.startIndex - 1).beginPosition();\n\t\t\t\t int endRepMen = repMenTokens.get(RepresentativeMention.endIndex - 2).endPosition();\n\t\t\t\t String offsetRepMen = \"\" + beginRepMen + \"-\" + endRepMen;\n\t\t \t \n\t\t\t\t//Determine repMenNer that consists of largest NER (Merkel) to (Angela Merkel)\n\t\t\t\t //and \"Chancellor \"Angela Merkel\" to \"Angela Merkel\"\n\t\t \t //Further reduction to NER as in \"Chancellor Angela Merkel\" to \"Angela Merkel\" is\n\t\t\t\t //done in determineBestSubject. There, Chunk information and subjectHead info is available.\n\t\t\t\t //Chunk info and subjectHead info is used to distinguish \"Chancellor Angela Merkel\" to \"Angela Merkel\"\n\t\t\t\t //from \"The enemies of Angela Merkel\" which is not reduced to \"Angela Merkel\"\n\t\t\t\t //Problem solved: The corefMentions of a particular chain do not necessarily have the same RepMenNer (RepMen) \n\t\t\t\t // any more: Chancellor Angela Merkel repMenNer Chancellor Angela Merkel , then Angela Merkel has RepMenNer Angela Merkel\n\t\t\t\t if (offsetRepMenNer != null && hds.Ner.contains(offsetRepMenNer)){\n//\t\t\t\t\t System.out.println(\"NEWNer.contains(offsetRepMenNer)\");\n\t\t\t\t }\n\t\t\t\t else if (offsetRepMen != null && hds.Ner.contains(offsetRepMen)){\n\t\t\t\t\t repMenNer = repMen;\n\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\tSystem.out.println(\"NEWNer.contains(offsetRepMen)\");\n\t\t\t\t }\n\t\t\t\t else if (offsetCorefMention != null && hds.Ner.contains(offsetCorefMention)){\n\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\tSystem.out.println(\"Ner.contains(offsetCorefMention)\");\n\t\t\t\t\t}\n\t\t\t\t else {\n\t\t\t\t\t corefMentionContainsNer = offsetsContainAnnotation(offsetCorefMention,hds.Ner);\n\t\t\t\t\t repMenContainsNer = offsetsContainAnnotation(offsetRepMen,hds.Ner);\n//\t\t\t\t\t System.out.println(\"ELSE Ner.contains(offsetCorefMention)\");\n\t\t\t\t }\n\t\t\t\t //Determine repMenNer that contains NER\n\t\t\t\t\tif (repMenNer == null){\n\t\t\t\t\t\tif (corefMentionContainsNer){\n\t\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT1\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (repMenContainsNer){\n\t\t\t\t\t\t\trepMenNer = repMen;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT2\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//no NER:\n\t\t\t\t\t\t//Pronoun -> repMen is repMenNer\n\t\t\t\t\t\telse if (hds.PronominalSubject.contains(offsetCorefMention) && repMen != null){\n\t\t\t\t\t\t\trepMenNer = repMen;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT3\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t//other no NER: corefMention is repMenNer because it is closer to original\n\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\tSystem.out.println(\"DEFAULT4\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t \n \t IaiCorefAnnotation corefAnnotation = new IaiCorefAnnotation(aJCas);\n\t\t\t\n\t\t\t\t\t\n\n\n\t\t\t\t\tcorefAnnotation.setBegin(beginCoref);\n\t\t\t\t\tcorefAnnotation.setEnd(endCoref);\n\t\t\t\t\tcorefAnnotation.setCorefMention(corefMention);\n\t\t\t\t\tcorefAnnotation.setCorefChain(chain);\n\t\t\t\t\t//done below\n//\t\t\t\t\tcorefAnnotation.setRepresentativeMention(repMenNer);\n//\t\t\t\t\tcorefAnnotation.addToIndexes(); \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tlistCorefAnnotation.add(corefAnnotation);\n\t\t\t\t\t\n//\t\t\t\t\tdone below:\n//\t\t\t\t\t offsetToRepMen.put(offsetCorefMention, repMenNer);\n//\t\t\t\t\t RepMen.add(offsetCorefMention);\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t }//end coref mention\n//\t\t System.out.println(\"END Chain \" + chain );\n//\t\t System.out.println(listCorefAnnotation.size());\n\t\t String offsetCorefMention = null;\n\t\t for (int i = 0; i < listCorefAnnotation.size(); i++) {\n\t\t \tIaiCorefAnnotation corefAnnotation = listCorefAnnotation.get(i);\n\t\t \tcorefAnnotation.setRepresentativeMention(repMenNer);\n\t\t \tcorefAnnotation.addToIndexes();\n\t\t \toffsetCorefMention = \"\" + corefAnnotation.getBegin() + \"-\" + corefAnnotation.getEnd();\n\t\t\t\t\thds.offsetToRepMen.put(offsetCorefMention, repMenNer);\n\t\t\t\t\thds.RepMen.add(offsetCorefMention);\n\t\t\t\t\t//COREF\n//\t\t\t\t\tSystem.out.println(\"Chain \" + corefAnnotation.getCorefChain());\n//\t\t\t\t\tSystem.out.println(\"corefMention \" + corefAnnotation.getCorefMention() + offsetCorefMention);\n//\t\t\t\t\tSystem.out.println(\"repMenNer \" + repMenNer);\n\t\t }\n\t\t } //end chains\n\n\n//\t\t System.out.println(\"NOW quote finder\");\n\n\n\t\t\n\t\t///* quote finder: begin find quote relation and quotee\n\t\t// direct quotes\n\t\t\n\t\t\n\t\tString quotee_left = null;\n\t\tString quotee_right = null; \n\t\t\n\t\tString representative_quotee_left = null;\n\t\tString representative_quotee_right = null; \n\t\t\n\t\tString quote_relation_left = null;\n\t\tString quote_relation_right = null;\n\t\t\n\t\tString quoteType = null;\n\t\tint quoteeReliability = 5;\n\t\tint quoteeReliability_left = 5;\n\t\tint quoteeReliability_right = 5;\n\t\tint quotee_end = -5;\n\t\tint quotee_begin = -5;\n\t\t\n\t\tboolean quoteeBeforeQuote = false;\n\n\n\t\n\t\t\n\t\t// these are all the quotes in this document\n\t\tList<CoreMap> quotes = document.get(QuotationsAnnotation.class);\n\t\tfor (CoreMap quote : quotes) {\n\t\t\tif (quote.get(TokensAnnotation.class).size() > 5) {\n\t\t\t\tQuoteAnnotation annotation = new QuoteAnnotation(aJCas);\n\n\t\t\t\tint beginQuote = quote.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endQuote = quote.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(quote.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tannotation.setBegin(beginQuote);\n\t\t\t\tannotation.setEnd(endQuote);\n\t\t\t\tannotation.addToIndexes();\n//\t\t\t}\n//\t\t}\n//\t\t\n//\t\tList<Q> newQuotes = document.get(QuotationsAnnotation.class);\t\t\n//\t\tfor (CoreMap annotation : newQuotes) {\n//\t\t\t\tif (1==1){\n//\t\t\t\tRe-initialize markup variables since they are also used for indirect quotes\n\t\t\t\tquotee_left = null;\n\t\t\t\tquotee_right = null; \n\t\t\t\t\n\t\t\t\trepresentative_quotee_left = null;\n\t\t\t\trepresentative_quotee_right = null;\n\t\t\t\t\n\t\t\t\tquote_relation_left = null;\n\t\t\t\tquote_relation_right = null;\n\t\t\t\tquoteeReliability = 5;\n\t\t\t\tquoteeReliability_left = 5;\n\t\t\t\tquoteeReliability_right = 5;\n\t\t\t\tquotee_end = -5;\n\t\t\t\tquotee_begin = -5;\n\t\t\t\tquoteType = \"direct\";\n\t\t\t\tquoteeBeforeQuote = false;\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> directQuoteTokens = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\tToken.class, annotation);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> followTokens = JCasUtil.selectFollowing(aJCas,\n\t\t\t\t\t\tToken.class, annotation, 1);\n\t\t\t\t\n \n//\t\t\t\tfor (Token aFollowToken: followTokens){\n//\t\t\t\t\t List<Chunk> chunks = JCasUtil.selectCovering(aJCas,\n//\t\t\t\t\tChunk.class, aFollowToken);\n \n//direct quote quotee right:\n\t\t\t\t\n\t for (Token aFollow2Token: followTokens){\n\t\t\t\t\t List<SentenceAnnotation> sentencesFollowQuote = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t SentenceAnnotation.class, aFollow2Token);\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t for (SentenceAnnotation sentenceFollowsQuote: sentencesFollowQuote){\n\t\t\t\t\t\t List<Chunk> chunks = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\tChunk.class, sentenceFollowsQuote);\n//\t\t\tSystem.out.println(\"DIRECT QUOTE RIGHT\");\n\t\t\tString[] quote_annotation_result = determine_quotee_and_quote_relation(\"RIGHT\", \n\t\t\t\t\tchunks, hds, annotation);\n\t\t\tif (quote_annotation_result.length>=4){\n\t\t\t quotee_right = quote_annotation_result[0];\n\t\t\t representative_quotee_right = quote_annotation_result[1];\n\t\t\t quote_relation_right = quote_annotation_result[2];\n\t\t\t try {\n\t\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t quoteeReliability_right = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t //Will Throw exception!\n\t\t\t //do something! anything to handle the exception.\n\t\t\t\tquoteeReliability = -5;\n\t\t\t\tquoteeReliability_right = -5;\n\t\t\t\t}\t\t\t\t\t \n\t\t\t }\n//\t\t\tSystem.out.println(\"DIRECT QUOTE RIGHT RESULT quotee \" + quotee_right + \" representative_quotee \" + representative_quotee_right\n//\t\t\t\t\t+ \" quote_relation \" + quote_relation_right);\n\t\t \n\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t \n }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> precedingTokens = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t\t\tToken.class, annotation, 1);\n for (Token aPrecedingToken: precedingTokens){ \n \t\n \tif (directQuoteIntro.contains(aPrecedingToken.getLemma().getValue().toString()) \n \t\t\t|| compLemma.contains(aPrecedingToken.getLemma().getValue().toString())) {\n// \t\tSystem.out.println(\"Hello, World lemma found\" + aPrecedingToken.getLemma().getValue());\n \t\tquoteeBeforeQuote = true;\n \t}\n \t\tList <NamedEntity> namedEntities = null;\n \t\tList <Token> tokens = null;\n \t\tList<Chunk> chunks = null;\n \t\t\n\t\t\t\t List<Sentence> precedingSentences = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t \t\tSentence.class, aPrecedingToken, 1);\n\t\t\t\t \n\t\t\t\t\t\tif (precedingSentences.isEmpty()){\n\t\t\t\t\t\t\tList<Sentence> firstSentence;\n\t\t\t\t \tfirstSentence = JCasUtil.selectCovering(aJCas,\n\t\t\t\t \t\tSentence.class, aPrecedingToken);\n\n\t\t\t\t \tfor (Sentence aSentence: firstSentence){\n\t\t\t\t \t\t\n\n\t\t\t\t\t\t\t\tchunks = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\t\tChunk.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t \t\tnamedEntities = JCasUtil.selectCovered(aJCas,\n\t \t \t\tNamedEntity.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\t\t\t\t \t\ttokens = JCasUtil.selectCovered(aJCas,\n\t\t\t\t \t\t\t\tToken.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\t\t\t\t \t\n\t\t\t\t \t}\n\t\t\t\t\t\t}\n\t\t\t\t else {\t\n\t\t\t\t \tfor (Sentence aSentence: precedingSentences){\n//\t\t\t\t \t\tSystem.out.println(\"Hello, World sentence\" + aSentence);\n\t\t\t\t \t\tchunks = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tChunk.class, aSentence, aPrecedingToken);\n\t\t\t\t \t\tnamedEntities = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tNamedEntity.class, aSentence, aPrecedingToken);\n\t\t\t\t \t\ttokens = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tToken.class, aSentence, aPrecedingToken);\n\t\t\t\t \t}\n\t\t\t\t }\n \t\n//\t\t\t\t \n//\t\t\t\t\t\tSystem.out.println(\"DIRECT QUOTE LEFT\");\n\t\t\t\t\t\tString[] quote_annotation_direct_left = determine_quotee_and_quote_relation(\"LEFT\", chunks,\n\t\t\t\t\t\t\t\t hds, annotation\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t );\n//\t\t\t\t\t\tSystem.out.println(\"QUOTE ANNOTATION \" + quote_annotation_direct_left.length);\t\t\n\t\tif (quote_annotation_direct_left.length>=4){\n//\t\t\tSystem.out.println(\"QUOTE ANNOTATION UPDATE \" + quote_annotation_direct_left[0] +\n//\t\t\t\t\t\" \" + quote_annotation_direct_left[1] + \" \" +\n//\t\t\t\t\tquote_annotation_direct_left[2]);\n\t\t quotee_left = quote_annotation_direct_left[0];\n\t\t representative_quotee_left = quote_annotation_direct_left[1];\n\t\t quote_relation_left = quote_annotation_direct_left[2];\n\t\t try {\n\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_direct_left[3]);\n\t\t\t quoteeReliability_left = Integer.parseInt(quote_annotation_direct_left[3]);\n\t\t\t} catch (NumberFormatException e) {\n\t\t //Will Throw exception!\n\t\t //do something! anything to handle the exception.\n\t\t\tquoteeReliability = -5;\n\t\t\tquoteeReliability_left = -5;\n\t\t\t}\t\t\t\t\t \n\t\t }\n//\t\tSystem.out.println(\"DIRECT QUOTE LEFT RESULT quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left\n//\t\t\t\t+ \" quote_relation \" + quote_relation_left);\n\t\t//no subject - predicate quotee quote_relation, quote introduced with colon: \n\t\tif (quotee_left == null && quote_relation_left == null && representative_quotee_left == null \n\t\t&& directQuoteIntro.contains(aPrecedingToken.getLemma().getValue().toString())){\n//\t\t\tSystem.out.println(\"NER DIRECT QUOTE LEFT COLON\");\n\t\t\tString quoteeCandOffset = null; \n\t\t\tString quoteeCandText = null;\n\t\t if (namedEntities.size() == 1){\n \t \tfor (NamedEntity ne : namedEntities){\n// \t \t\tSystem.out.println(\"ONE NER \" + ne.getCoveredText());\n \t \t\tquoteeCandText = ne.getCoveredText();\n\t\t\t\t\tquote_relation_left = aPrecedingToken.getLemma().getValue().toString();\n\t\t\t\t\tquotee_end = ne.getEnd();\n\t\t\t\t\tquotee_begin = ne.getBegin();\n\t\t\t\t\tquoteeCandOffset = \"\" + quotee_begin + \"-\" + quotee_end;\n\t\t\t\t\tquoteeReliability = 1;\n\t\t\t\t\tquoteeReliability_left = 1;\n \t }\n \t }\n \t else if (namedEntities.size() > 1) {\n \t \tint count = 0;\n \t \tString quotee_cand = null;\n// \t \tSystem.out.println(\"Hello, World ELSE SEVERAL NER\");\n \t \tfor (NamedEntity ner : namedEntities){\n// \t \t\tSystem.out.println(\"Hello, World NER TYPE\" + ner.getValue());\n \t \t\tif (ner.getValue().equals(\"PERSON\")){\n \t \t\t\tcount = count + 1;\n \t \t\t\tquotee_cand = ner.getCoveredText();\n \t \t\t\tquotee_end = ner.getEnd();\n \t \t\t\tquotee_begin = ner.getBegin();\n \t \t\t\tquoteeCandOffset = \"\" + quotee_begin + \"-\" + quotee_end;\n \t \t\t\t\n// \t \t\t\tSystem.out.println(\"Hello, World FOUND PERSON\" + quotee_cand);\n \t \t\t}\n \t \t}\n \t \tif (count == 1){ // there is exactly one NER.PERSON\n// \t \t\tSystem.out.println(\"ONE PERSON, SEVERAL NER \" + quotee_cand);\n \t \t\t\tquoteeCandText = quotee_cand;\n\t\t\t\t\t\tquote_relation_left = aPrecedingToken.getLemma().getValue().toString();\n\t\t\t\t\t\tquoteeReliability = 3;\n\t\t\t\t\t\tquoteeReliability_left = 3;\n \t \t}\n \t }\n\t\t if(quoteeCandOffset != null && quoteeCandText != null ){\n//\t\t \t quotee_left = quoteeCandText;\n\t\t \t String result [] = determineBestRepMenSubject(\n\t\t \t\t\t quoteeCandOffset,quoteeCandOffset, quoteeCandText, hds);\n\t\t \t if (result.length>=2){\n\t\t \t\t quotee_left = result [0];\n\t\t \t\t representative_quotee_left = result [1];\n//\t\t \t System.out.println(\"RESULT2 NER quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left);\n\t\t \t }\n\t\t }\n\t\t}\n }\n\t\t\n \n\n\t\t\t\t\n\t\t\t\tif (quotee_left != null && quotee_right != null){\n//\t\t\t\t\tSystem.out.println(\"TWO QUOTEES\");\n\t\t\t\t\t\n\t\t\t\t\tif (directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\".\") \n\t\t\t\t\t\t|| \tdirectQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"!\")\n\t\t\t\t\t\t|| directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"?\")\n\t\t\t\t\t\t\t){\n//\t\t\t\t\t\tSystem.out.println(\"PUNCT \" + quotee_left + quote_relation_left + quoteeReliability_left);\n\t\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\n\t\t\t\t\t}\n\t\t\t\t\telse if (directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\",\")){\n//\t\t\t\t\t\tSystem.out.println(\"COMMA \" + quotee_right + \" \" + quote_relation_right + \" \" + quoteeReliability_right);\n\t\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t\t}\n\t\t\t\t\telse if (!directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\".\")\n\t\t\t\t\t\t\t&& !directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"!\")\n\t\t\t\t\t\t\t&& !directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"?\")\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t){\n//\t\t\t\t\t\tSystem.out.println(\"NO PUNCT \" + quotee_right + \" \" + quote_relation_right + \" \" + quoteeReliability_right);\n\t\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n//\t\t\t\t\t\tSystem.out.println(\"UNCLEAR LEFT RIGHT \" + quotee_left + quote_relation_left + quote + quotee_right + quote_relation_right);\n\t\t\t\t\tannotation.setQuotee(\"<unclear>\");\n\t\t\t\t\tannotation.setQuoteRelation(\"<unclear>\");\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (quoteeBeforeQuote == true){\n\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t}\n\t\t\t\telse if (quotee_left != null){\n//\t\t\t\t\tSystem.out.println(\"QUOTEE LEFT\" + quotee_left + quote_relation_left + quoteeReliability_left);\n\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t}\n\t\t\t\telse if (quotee_right != null){\n//\t\t\t\t\tSystem.out.println(\"QUOTEE RIGHT FOUND\" + quotee_right + \" QUOTE RELATION \" + quote_relation_right + \":\" + quoteeReliability_right);\n\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t}\n\t\t\t\telse if (quote_relation_left != null ){\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n//\t\t\t\t\tSystem.out.println(\"NO QUOTEE FOUND\" + quote + quote_relation_left + quote_relation_right);\n\t\t\t\t}\n\t\t\t\telse if (quote_relation_right != null){\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t}\n\t\t\t\telse if (quoteType != null){\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n//\t\t\t\t\tSystem.out.println(\"Hello, World NO QUOTEE and NO QUOTE RELATION FOUND\" + quote);\n\t\t\t\t}\n\t\t\t\tif (annotation.getRepresentativeQuoteeMention() != null){\n//\t\t\t\t\tSystem.out.println(\"NOW!!\" + annotation.getRepresentativeQuoteeMention());\n\t\t\t\t\tif (hds.dbpediaSurfaceFormToDBpediaLink.containsKey(annotation.getRepresentativeQuoteeMention())){\n\t\t\t\t\t\tannotation.setQuoteeDBpediaUri(hds.dbpediaSurfaceFormToDBpediaLink.get(annotation.getRepresentativeQuoteeMention()));\n//\t\t\t\t\t\tSystem.out.println(\"DBPRED FOUND\" + annotation.getRepresentativeQuoteeMention() + \" URI: \" + annotation.getQuoteeDBpediaUri());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} //for direct quote\n\t\t\n\t\t// annotate indirect quotes: opinion verb + 'that' ... until end of sentence: said that ...\n\n//\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class); //already instantiated above\nINDIRECTQUOTE:\t\tfor (CoreMap sentence : sentences) {\n//\t\t\tif (sentence.get(TokensAnnotation.class).size() > 5) { \n\t\t\t\tSentenceAnnotation sentenceAnn = new SentenceAnnotation(aJCas);\n\t\t\t\t\n\t\t\t\tint beginSentence = sentence.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endSentence = sentence.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(sentence.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tsentenceAnn.setBegin(beginSentence);\n\t\t\t\tsentenceAnn.setEnd(endSentence);\n//\t\t\t\tsentenceAnn.addToIndexes();\n\t\t\t\t\n\t\t\t\tQuoteAnnotation indirectQuote = new QuoteAnnotation(aJCas);\n\t \tint indirectQuoteBegin = -5;\n\t\t\t\tint indirectQuoteEnd = -5;\n\t\t\t\tboolean subsequentDirectQuoteInstance = false;\n\t\t\t\t\n\t\t\t\tList<Chunk> chunksIQ = JCasUtil.selectCovered(aJCas,\n\t\t\t\tChunk.class, sentenceAnn);\n\t\t\t\tList<Chunk> chunksBeforeIndirectQuote = null;\n\t\t\t\t\n\t\t\t\tint index = 0;\nINDIRECTCHUNK:\tfor (Chunk aChunk : chunksIQ) {\n\t\t\t\t\tindex++;\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"INDIRECT QUOTE CHUNK VALUE \" + aChunk.getChunkValue().toString());\n//\t\t\t\t\tif (aChunk.getChunkValue().equals(\"SBAR\")) {\n\t\t\t\t\tif(indirectQuoteIntroChunkValue.contains(aChunk.getChunkValue())){\n//\t\t\t\t\t\tSystem.out.println(\"INDIRECT QUOTE INDEX \" + \"\" + index);\n\t\t\t\t\t\t\n\t\t\t\t\t\tList<Token> tokensSbar = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\tToken.class, aChunk);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (Token aTokenSbar : tokensSbar){\n//\t\t\t\t\t\t\tString that = \"that\";\n\t\t\t\t\t\t\tif (compLemma.contains(aTokenSbar.getLemma().getCoveredText())){\n\t\t\t\t\t\t// VP test: does that clause contain VP?\n//\t\t\t\t\t\t\t\tSystem.out.println(\"TOK1\" + aTokenSbar.getLemma().getCoveredText());\n//\t\t\t \tQuoteAnnotation indirectQuote = new QuoteAnnotation(aJCas);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t indirectQuoteBegin = aChunk.getEnd() + 1;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t chunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//NEW\n//\t\t\t\t\t\t\t\tif (LANGUAGE == \"en\")\n\t\t\t\t\t\t\t\tList<Token> precedingSbarTokens = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t\t\t\t\t\t\tToken.class, aChunk, 1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor (Token aPrecedingSbarToken: precedingSbarTokens){ \n//\t\t\t\t\t\t\t\t\tSystem.out.println(\"TOK2\" + aPrecedingSbarToken.getLemma().getCoveredText());\n\t\t\t\t \tif (coordLemma.contains(aPrecedingSbarToken.getLemma().getValue().toString())){\n//\t\t\t\t \t\tSystem.out.println(\"TOKK\" + aPrecedingSbarToken.getLemma().getCoveredText());\n\t\t\t\t \t\tchunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t \t\tint k = 0;\n\t\t\t\t \tSAY:\tfor (Chunk chunkBeforeAndThat : chunksBeforeIndirectQuote){\n//\t\t\t\t \t\t\txxxx\n\t\t\t\t \t\tk++;\n\t\t\t\t \t\t\tif (chunkBeforeAndThat.getChunkValue().equals(\"VP\")){\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t\tList<Token> tokensInVp = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToken.class, chunkBeforeAndThat);\n\t\t\t\t\t\t\t\t\t\t\t\tfor (Token aTokenInVp : tokensInVp){\n//\t\t\t\t\t\t\t\t\t\t\t\t\tString and;\n//\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"TOKK\" + aTokenInVp.getLemma().getCoveredText());\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (aTokenInVp.getLemma().getValue().equals(\"say\")){\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SAY OLD\" + indirectQuoteBegin + \":\" + sentenceAnn.getCoveredText());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchunksBeforeIndirectQuote = chunksIQ.subList(0, k);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindirectQuoteBegin = chunksBeforeIndirectQuote.get(chunksBeforeIndirectQuote.size()-1).getEnd()+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SAY NEW\" + indirectQuoteBegin + \":\" );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak SAY;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t}\n\t\t\t\t \t\t\n\t\t\t\t \t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tList<QuoteAnnotation> coveringDirectQuoteChunk = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t\t\t\tQuoteAnnotation.class, aChunk);\n\t\t\t\t\t\t\t\tif (coveringDirectQuoteChunk.isEmpty()){\n//\t\t\t\t\t\t\t\t indirectQuoteBegin = aChunk.getEnd() + 1;\n\t\t\t\t\t\t\t\t indirectQuote.setBegin(indirectQuoteBegin);\n//\t\t\t\t\t\t\t\t chunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t\t\t\t\t indirectQuoteEnd = sentenceAnn.getEnd();\n\t\t\t\t\t\t\t\t indirectQuote.setEnd(indirectQuoteEnd);\n\t\t\t\t\t\t\t\t indirectQuote.addToIndexes();\n\t\t\t\t\t\t\t\t subsequentDirectQuoteInstance = false;\n//\t\t\t\t\t\t\t\t System.out.println(\"SUBSEQUENT FALSE\");\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t List<Token> followTokens = JCasUtil.selectFollowing(aJCas,\n\t\t\t\t\t\t\t\t\t\t\tToken.class, indirectQuote, 1);\n\t\t\t\t\t\t\t\t for (Token aFollow3Token: followTokens){\n\t\t\t\t\t\t\t\t\t List<QuoteAnnotation> subsequentDirectQuotes = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t\t\t\t\tQuoteAnnotation.class,aFollow3Token);\n\t\t\t\t\t\t\t\t\t if (!subsequentDirectQuotes.isEmpty()){\n\t\t\t\t\t\t\t\t\t\t for (QuoteAnnotation subsequentDirectQuote: subsequentDirectQuotes){\n\t\t\t\t\t\t\t\t\t\t\t if (subsequentDirectQuote.getRepresentativeQuoteeMention() != null\n\t\t\t\t\t\t\t\t\t\t\t\t && subsequentDirectQuote.getRepresentativeQuoteeMention().equals(\"<unclear>\")){\n//\t\t\t\t\t\t\t\t\t\t\t System.out.println(\"SUBSEQUENT FOUND\"); \n\t\t\t\t\t\t\t\t\t\t\t hds.subsequentDirectQuote = subsequentDirectQuote;\n\t\t\t\t\t\t\t\t\t\t\t subsequentDirectQuoteInstance = true;\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t break INDIRECTCHUNK;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\n\t\t\t\t}\n\t\t\t\t\tif (indirectQuoteBegin >= 0 && indirectQuoteEnd >= 0){\n//\t\t\t\t\t\tList<QuoteAnnotation> coveringDirectQuote = JCasUtil.selectCovering(aJCas,\n//\t\t\t\t\t\t\t\tQuoteAnnotation.class, indirectQuote);\n//\t\t\t\t\t\tif (coveringDirectQuote.isEmpty()){\n////\t\t\t\t\t\t\t\n//\t\t\t\t\t\tindirectQuote.addToIndexes();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse {\n//\t\t\t\t\t\t\t//indirect quote is covered by direct quote and therefore discarded\n//\t\t\t\t\t\t\tcontinue INDIRECTQUOTE;\n//\t\t\t\t\t\t}\n\t\t\t\t\tList<QuoteAnnotation> coveredDirectQuotes = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\tQuoteAnnotation.class, indirectQuote);\n\t\t\t\t\tfor (QuoteAnnotation coveredDirectQuote : coveredDirectQuotes){\n//\t\t\t\t\t\tSystem.out.println(\"Hello, World covered direct quote\" + coveredDirectQuote.getCoveredText());\n\t\t\t\t\t\t//delete coveredDirectQuoteIndex\n\t\t\t\t\t\tcoveredDirectQuote.removeFromIndexes();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//no indirect quote in sentence\n\t\t\t\t\t\tcontinue INDIRECTQUOTE;\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n//\t\t\t\t\t\tRe-initialize markup variables since they are also used for direct quotes\n\t\t\t\t\t\tquotee_left = null;\n\t\t\t\t\t\tquotee_right = null; \n\t\t\t\t\t\t\n\t\t\t\t\t\trepresentative_quotee_left = null;\n\t\t\t\t\t\trepresentative_quotee_right = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tquote_relation_left = null;\n\t\t\t\t\t\tquote_relation_right = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tquoteType = \"indirect\";\n\t\t\t\t\t\tquoteeReliability = 5;\n\t\t\t\t\t\tquoteeReliability_left = 5;\n\t\t\t\t\t\tquoteeReliability_right = 5;\n\t\t\t\t\t\tquotee_end = -5;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\tif (chunksBeforeIndirectQuote != null){\n//\t\t\t\t\t\t\tSystem.out.println(\"chunksBeforeIndirectQuote FOUND!! \");\n\t\t\t\t\t\t\tString[] quote_annotation_result = determine_quotee_and_quote_relation(\"LEFT\", chunksBeforeIndirectQuote,\n\t\t\t\t\t\t\t\t\t hds, indirectQuote\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t );\n\t\t\tif (quote_annotation_result.length>=4){\n\t\t\t quotee_left = quote_annotation_result[0];\n\t\t\t representative_quotee_left = quote_annotation_result[1];\n\t\t\t quote_relation_left = quote_annotation_result[2];\n//\t\t\t System.out.println(\"INDIRECT QUOTE LEFT RESULT quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left\n//\t\t\t\t\t + \" QUOTE RELATION \" + quote_relation_left);\n\t\t\t try {\n\t\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t quoteeReliability_left = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tquoteeReliability = -5;\n\t\t\t\tquoteeReliability_left = -5;\n\t\t\t\t}\t\t\t\t\t \n\t\t\t }\n\t\t\t\n\t\t\t}\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (quotee_left != null){\n\t\t\t\t\t\t\tindirectQuote.setQuotee(quotee_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n\t\t\t\t\t\t\tindirectQuote.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\t\t\tindirectQuote.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//indirect quote followed by direct quote:\n\t\t\t\t\t\t\t//the quotee and quote relation of the indirect quote are copied to the direct quote \n\t\t\t\t\t\t\t//Genetic researcher Otmar Wiestler hopes that the government's strict controls on genetic research \n\t\t\t\t\t\t\t//will be relaxed with the advent of the new ethics commission. \n\t\t\t\t\t\t\t//\"For one thing the government urgently needs advice, because of course it's such an extremely \n\t\t\t\t\t\t\t//complex field. And one of the reasons Chancellor Schröder formed this new commission was without \n\t\t\t\t\t\t\t//a doubt to create his own group of advisors.\"\n\n\t\t\t\t\t\t\tif (subsequentDirectQuoteInstance == true\n\t\t\t\t\t\t\t\t&&\thds.subsequentDirectQuote.getRepresentativeQuoteeMention().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t&& \thds.subsequentDirectQuote.getQuotee().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t&& \thds.subsequentDirectQuote.getQuoteRelation().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t\t){\n//\t\t\t\t\t\t\t\tSystem.out.println(\"SUBSEQUENT UNCLEAR DIR QUOTE FOUND!!\"); \n\t\t\t\t\t\t\t\tint begin = hds.subsequentDirectQuote.getBegin();\n\t\t\t\t\t\t\t\tint end = hds.subsequentDirectQuote.getEnd();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuotee(quotee_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteType(\"direct\");\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteeReliability(quoteeReliability_left + 2);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.addToIndexes();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\tSystem.out.println(\"Hello, World INDIRECT QUOTE \" + quotee_left + quote_relation_left + quoteeReliability);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (quote_relation_left != null){\n\t\t\t\t\t\t\tindirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\telse if (quoteType != null){\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n//\t\t\t\t\t\t\tSystem.out.println(\"Hello, World INDIRECT QUOTE NOT FOUND\" + quote_relation_left);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (indirectQuote.getRepresentativeQuoteeMention() != null){\n//\t\t\t\t\t\t\tSystem.out.println(\"NOW!!\" + indirectQuote.getRepresentativeQuoteeMention());\n\t\t\t\t\t\t\tif (hds.dbpediaSurfaceFormToDBpediaLink.containsKey(indirectQuote.getRepresentativeQuoteeMention())){\n\t\t\t\t\t\t\t\tindirectQuote.setQuoteeDBpediaUri(hds.dbpediaSurfaceFormToDBpediaLink.get(indirectQuote.getRepresentativeQuoteeMention()));\n//\t\t\t\t\t\t\t\tSystem.out.println(\"DBPEDIA \" + indirectQuote.getRepresentativeQuoteeMention() + \" URI: \" + hds.dbpediaSurfaceFormToDBpediaLink.get(indirectQuote.getRepresentativeQuoteeMention()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t }\n//\t\t\t} //for chunk\n//\t\t\t\tsay without that\n//\t\t\t}\t\t\n\t\t} //Core map sentences indirect quotes\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static List<NLText> processTexts(List<String> texts) {\n// IProtocolClient api = ProtocolFactory.getHttpClient(Locale.ENGLISH, \"ui.disi.unitn.it\", 8092);\n LOG.warn(\"TODO - USING HARDCODED ENGLISH when creating sweb client in processTexts\");\n IProtocolClient api = ProtocolFactory.getHttpClient(Locale.ENGLISH);\n\t\tPipelineClient pipelineClient = new PipelineClient(api);\n NLPInput input = new NLPInput();\n input.setText(texts);\n //input.setNlpParameters(params);\n\n// NLText[] result = pipelineClient.run(\"KeywordTextPipeline\", input, 1l);\n NLText[] result = pipelineClient.run(\"ODHPipeline\", input, 1l);\n \n\t\treturn Arrays.asList(result);\n\t}", "public static ArrayList<String> sentenceTokenizer(String filename) throws FileNotFoundException{\n \n ArrayList<String> sentenceList = new ArrayList<String>();\n \n Scanner sc = new Scanner(new File(filename));\n \n String token;\n String sentence = \"\";\n while(sc.hasNext()){\n \n token = sc.next();\n sentence += \" \" + token + \" \";\n \n if(!sc.hasNext()){\n sentenceList.add(sentence.trim());\n break;\n }\n \n if(token.endsWith(\".\")){\n sentence = sentence.trim();\n sentenceList.add(sentence);\n sentence = \"\";\n }\n \n }\n \n sc.close();\n \n return sentenceList;\n \n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\tString modelFilePath = \"java//opennlpmodels//en-sent.bin\";\n\t\tInputStream modelIn = new FileInputStream(modelFilePath);\n\n\t\ttry {\n\t\t SentenceModel model = new SentenceModel(modelIn);\n\t\t SentenceDetectorME sentenceDetector = new SentenceDetectorME(model);\n\t\t String sentences[] = sentenceDetector.sentDetect(\" First sentence. Second B.S. U.S. sentence. \");\n\t\t \n\t\t for (String sent : sentences ) {\n\t\t\t System.out.println(sent);\n\t\t }\n\t\t \n\t\t}\n\t\tcatch (IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t if (modelIn != null) {\n\t\t try {\n\t\t modelIn.close();\n\t\t }\n\t\t catch (IOException e) {\n\t\t }\n\t\t }\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tString[] testSentence = new String[]{\r\n\t\t\t\t\"西三旗硅谷先锋小区半地下室出租,便宜可合租硅谷工信处女干事每月经过下属科室都要亲口交代24口交换机等技术性器件的安装工作\",\r\n\t\t\t\t\"这是一个伸手不见五指的黑夜。我叫孙悟空,我爱北京,我爱Python和C++。\",\r\n\t\t\t \"我不喜欢日本和服。\",\r\n\t\t\t \"雷猴回归人间。\",\r\n\t\t\t \"工信处女干事每月经过下属科室都要亲口交代24口交换机等技术性器件的安装工作\",\r\n\t\t\t \"我需要廉租房\",\r\n\t\t\t \"永和服装饰品有限公司\",\r\n\t\t\t \"我爱北京天安门\",\r\n\t\t\t \"abc\",\r\n\t\t\t \"隐马尔可夫\",\r\n\t\t\t \"雷猴是个好网站\",\r\n\t\t\t \"“Microsoft”一词由“MICROcomputer(微型计算机)”和“SOFTware(软件)”两部分组成\",\r\n\t\t\t \"草泥马和欺实马是今年的流行词汇\",\r\n\t\t\t \"伊藤洋华堂总府店\",\r\n\t\t\t \"中国科学院计算技术研究所\",\r\n\t\t\t \"罗密欧与朱丽叶\",\r\n\t\t\t \"我购买了道具和服装\",\r\n\t\t\t \"PS: 我觉得开源有一个好处,就是能够敦促自己不断改进,避免敞帚自珍\",\r\n\t\t\t \"湖北省石首市\",\r\n\t\t\t \"湖北省十堰市\",\r\n\t\t\t \"总经理完成了这件事情\",\r\n\t\t\t \"电脑修好了\",\r\n\t\t\t \"做好了这件事情就一了百了了\",\r\n\t\t\t \"人们审美的观点是不同的\",\r\n\t\t\t \"我们买了一个美的空调\",\r\n\t\t\t \"线程初始化时我们要注意\",\r\n\t\t\t \"一个分子是由好多原子组织成的\",\r\n\t\t\t \"祝你马到功成\",\r\n\t\t\t \"他掉进了无底洞里\",\r\n\t\t\t \"中国的首都是北京\",\r\n\t\t\t \"孙君意\",\r\n\t\t\t \"外交部发言人马朝旭\",\r\n\t\t\t \"领导人会议和第四届东亚峰会\",\r\n\t\t\t \"在过去的这五年\",\r\n\t\t\t \"还需要很长的路要走\",\r\n\t\t\t \"60周年首都阅兵\",\r\n\t\t\t \"你好人们审美的观点是不同的\",\r\n\t\t\t \"买水果然后去世博园\",\r\n\t\t\t \"但是后来我才知道你是对的\",\r\n\t\t\t \"存在即合理\",\r\n\t\t\t \"的的的的的在的的的的就以和和和\",\r\n\t\t\t \"I love你,不以为耻,反以为rong\",\r\n\t\t\t \"hello你好人们审美的观点是不同的\",\r\n\t\t\t \"很好但主要是基于网页形式\",\r\n\t\t\t \"hello你好人们审美的观点是不同的\",\r\n\t\t\t \"为什么我不能拥有想要的生活\",\r\n\t\t\t \"后来我才\",\r\n\t\t\t \"此次来中国是为了\",\r\n\t\t\t \"使用了它就可以解决一些问题\",\r\n\t\t\t \",使用了它就可以解决一些问题\",\r\n\t\t\t \"其实使用了它就可以解决一些问题\",\r\n\t\t\t \"好人使用了它就可以解决一些问题\",\r\n\t\t\t \"是因为和国家\",\r\n\t\t\t \"老年搜索还支持\",\r\n\t\t\t \"干脆就把那部蒙人的闲法给废了拉倒!RT @laoshipukong : 27日,全国人大常委会第三次审议侵权责任法草案,删除了有关医疗损害责任“举证倒置”的规定。在医患纠纷中本已处于弱势地位的消费者由此将陷入万劫不复的境地。 \",\r\n\t\t\t \"他说的确实在理\",\r\n\t\t\t \"长春市长春节讲话\",\r\n\t\t\t \"结婚的和尚未结婚的\",\r\n\t\t\t \"结合成分子时\",\r\n\t\t\t \"旅游和服务是最好的\",\r\n\t\t\t \"这件事情的确是我的错\",\r\n\t\t\t \"供大家参考指正\",\r\n\t\t\t \"哈尔滨政府公布塌桥原因\",\r\n\t\t\t \"我在机场入口处\",\r\n\t\t\t \"邢永臣摄影报道\",\r\n\t\t\t \"BP神经网络如何训练才能在分类时增加区分度?\",\r\n\t\t\t \"南京市长江大桥\",\r\n\t\t\t \"应一些使用者的建议,也为了便于利用NiuTrans用于SMT研究\",\r\n\t\t\t \"长春市长春药店\",\r\n\t\t\t \"邓颖超生前最喜欢的衣服\",\r\n\t\t\t \"胡锦涛是热爱世界和平的政治局常委\",\r\n\t\t\t \"程序员祝海林和朱会震是在孙健的左面和右面, 范凯在最右面.再往左是李松洪\",\r\n\t\t\t \"一次性交多少钱\",\r\n\t\t\t \"两块五一套,三块八一斤,四块七一本,五块六一条\",\r\n\t\t\t \"小和尚留了一个像大和尚一样的和尚头\",\r\n\t\t\t \"我是中华人民共和国公民;我爸爸是共和党党员; 地铁和平门站\",\r\n\t\t\t \"张晓梅去人民医院做了个B超然后去买了件T恤\",\r\n\t\t\t \"AT&T是一件不错的公司,给你发offer了吗?\",\r\n\t\t\t \"C++和c#是什么关系?11+122=133,是吗?PI=3.14159\",\r\n\t\t\t \"你认识那个和主席握手的的哥吗?他开一辆黑色的士。\",\r\n\t\t\t \"枪杆子中出政权\",\r\n\t\t\t \"张三风同学走上了不归路\",\r\n\t\t\t \"阿Q腰间挂着BB机手里拿着大哥大,说:我一般吃饭不AA制的。\",\r\n\t\t\t \"在1号店能买到小S和大S八卦的书,还有3D电视。\"\r\n\r\n\t\t};\r\n\t\t\r\n\t\tSegment app = new Segment();\r\n\t\t\r\n\t\tfor(String sentence : testSentence)\r\n\t\t\tSystem.out.println(app.cut(sentence));\r\n\t}", "public void populateParserInfo(CoreMap sentence, List<Tokens> tokenList) {\n\n \t//System.out.println(\"StanfordDateTimeExtractor.populateParserInfo() \" + sentence);\n\t\t//System.out.println(\"StanfordDateTimeExtractor.populateParserInfo() \" + tokenList);\n tokenCount = 1;\n for (CoreLabel token: sentence.get(TokensAnnotation.class)) {\n String namedEntity = token.get(NamedEntityTagAnnotation.class);\n if ((DATE_ENTITIES.contains(namedEntity)) || ((MEASURE_ENTITIES.contains(namedEntity)) &&\n (token.get(PartOfSpeechAnnotation.class).equals(\"CD\") || token.get(PartOfSpeechAnnotation.class).equals(\"JJ\")))\n || (namedEntity.equals(\"DURATION\") && token.get(PartOfSpeechAnnotation.class).equals(\"CD\"))) {\n Tokens tokens = new Tokens();\n tokens.setId(tokenCount);\n tokens.setWord(token.get(TextAnnotation.class));\n tokens.setNer(token.get(NamedEntityTagAnnotation.class));\n tokens.setNormalizedNer(token.get(NormalizedNamedEntityTagAnnotation.class));\n tokens.setCharBegin(token.get(BeginIndexAnnotation.class));\n tokens.setCharEnd(token.get(EndIndexAnnotation.class));\n tokens.setPos(token.get(PartOfSpeechAnnotation.class));\n tokens.setLemma(token.get(LemmaAnnotation.class));\n tokenList.add(tokens);\n }\n tokenCount++;\n }\n dependencies = (sentence.get(CollapsedDependenciesAnnotation.class));\n if (dependencies != null)\n \tdependencyList = (StringUtils.split(dependencies.toList(), \"\\n\"));\n }", "public ArrayList<Relation> extractRelations(LexicalizedParser lp) {\n \t\tBreakIterator iterator = BreakIterator.getSentenceInstance(Locale.US);\n \t\titerator.setText(body);\n \t\tint start = iterator.first();\n \t\tfor (int end = iterator.next();\n \t\t\t\tend != BreakIterator.DONE;\n \t\t\t\tstart = end, end = iterator.next()) {\n \t\t\t/* list of NP in the sentence */\n \t\t\tArrayList<Tree> NPList;\n \t\t\t/* two NP will be used to extract relations */\n \t\t\tTree e1, e2;\n \t\t\tint e1Index, e2Index;\n \t\t\t\n \t\t\t// parse sentence\n\t\t\tString sentence = \"Jaguar, the luxury auto maker sold 1,214 cars in the U.S.A. when Tom sat on the chair\";\n//\t\t\tString sentence = body.substring(start,end);\n \t\t\tString nerSentence = Processor.ner.runNER(sentence);\n \t\t\tString taggedSentence = Processor.tagger.tagSentence(sentence);\n \t\t\tTree parse = lp.apply(sentence);\n \t\t\t\n \t\t\t// generateNPList\n \t\t\tNPList = generateNPList(parse);\n \n \t\t\t// walk through NP list, select all e1 & e2 paris and construct relations\n \t\t\tif (NPList.size() < 2) \n \t\t\t\tcontinue;\n \t\t\tfor (e1Index = 0; e1Index < NPList.size() - 1; ++e1Index) {\n \t\t\t\tfor (e2Index = e1Index + 1; e2Index < NPList.size(); ++e2Index) {\n \t\t\t\t\tTree NP1 = NPList.get(e1Index);\n \t\t\t\t\tTree NP2 = NPList.get(e2Index);\n \t\t\t\t\t// we only compare NPs that have same depth\n \t\t\t\t\tif (NP1.depth() != NP2.depth()) \n \t\t\t\t\t\tcontinue;\n \t\t\t\t\trelations.add(new Relation(url, NP1, NP2, sentence, taggedSentence, nerSentence, \n \t\t\t\t\t\t\tparse, (e2Index - e1Index), true));\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\treturn relations;\n \t}", "boolean getContainEntities();", "private void processContentEn() {\n if (this.content == null || this.content.equals(\"\")) {\r\n _logger.error(\"{} - The sentence is null or empty\", this.traceId);\r\n }\r\n\r\n // process input using ltp(Segmentation, POS, DP, SRL)\r\n this.nlp = new NLP(this.content, this.traceId, this.setting);\r\n }", "@Override\n protected List<Term> segSentence(char[] sentence)\n {\n WordNet wordNetAll = new WordNet(sentence);\n ////////////////生成词网////////////////////\n generateWordNet(wordNetAll);\n ///////////////生成词图////////////////////\n// System.out.println(\"构图:\" + (System.currentTimeMillis() - start));\n if (HanLP.Config.DEBUG)\n {\n System.out.printf(\"粗分词网:\\n%s\\n\", wordNetAll);\n }\n// start = System.currentTimeMillis();\n List<Vertex> vertexList = viterbi(wordNetAll);\n// System.out.println(\"最短路:\" + (System.currentTimeMillis() - start));\n\n if (config.useCustomDictionary)\n {\n if (config.indexMode > 0)\n combineByCustomDictionary(vertexList, this.dat, wordNetAll);\n else combineByCustomDictionary(vertexList, this.dat);\n }\n\n if (HanLP.Config.DEBUG)\n {\n System.out.println(\"粗分结果\" + convert(vertexList, false));\n }\n\n // 数字识别\n if (config.numberQuantifierRecognize)\n {\n mergeNumberQuantifier(vertexList, wordNetAll, config);\n }\n\n // 实体命名识别\n if (config.ner)\n {\n WordNet wordNetOptimum = new WordNet(sentence, vertexList);\n int preSize = wordNetOptimum.size();\n if (config.nameRecognize)\n {\n PersonRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.translatedNameRecognize)\n {\n TranslatedPersonRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.japaneseNameRecognize)\n {\n JapanesePersonRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.placeRecognize)\n {\n PlaceRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.organizationRecognize)\n {\n // 层叠隐马模型——生成输出作为下一级隐马输入\n wordNetOptimum.clean();\n vertexList = viterbi(wordNetOptimum);\n wordNetOptimum.clear();\n wordNetOptimum.addAll(vertexList);\n preSize = wordNetOptimum.size();\n OrganizationRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (wordNetOptimum.size() != preSize)\n {\n vertexList = viterbi(wordNetOptimum);\n if (HanLP.Config.DEBUG)\n {\n System.out.printf(\"细分词网:\\n%s\\n\", wordNetOptimum);\n }\n }\n }\n\n // 如果是索引模式则全切分\n if (config.indexMode > 0)\n {\n return decorateResultForIndexMode(vertexList, wordNetAll);\n }\n\n // 是否标注词性\n if (config.speechTagging)\n {\n speechTagging(vertexList);\n }\n\n return convert(vertexList, config.offset);\n }", "private void openNlpSentSplitter(String source) throws InvalidFormatException, IOException {\n\t\tString paragraph = \"Hi. How are you? This is Mike. This is Elvis A. A cat in the hat. The type strain is KOPRI 21160T (= KCTC 23670T= JCM 18092T), isolated from a soil sample collected near the King Sejong Station on King George Island, Antarctica. The DNA G+ C content of the type strain is 30.0 mol%.\";\r\n\r\n\t\tInputStream modelIn = new FileInputStream(source);\r\n\r\n\t\ttry {\r\n\t\t // SentenceModel model = new SentenceModel(modelIn);\r\n\t\t\t// InputStream is = new FileInputStream(myConfiguration.getOpenNLPTokenizerDir());\r\n\t\t\t\r\n\t\t\tSentenceModel model = new SentenceModel(modelIn);\r\n\t\t\tSentenceDetectorME sdetector = new SentenceDetectorME(model);\r\n\t\t\tString sentences[] = sdetector.sentDetect(paragraph);\r\n\t\t\tfor ( int i = 0; i < sentences.length; i++ ) {\r\n\t\t\t\tSystem.out.println(sentences[i]);\r\n\t\t\t}\r\n\t\t\tmodelIn.close();\t\t \r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t if (modelIn != null) {\r\n\t\t try {\r\n\t\t modelIn.close();\r\n\t\t }\r\n\t\t catch (IOException e) {\r\n\t\t }\r\n\t\t }\r\n\t\t}\r\n\t}", "private int checkAllEntityAnnotations(MGraph g) {\n Iterator<Triple> entityAnnotationIterator = g.filter(null,\n RDF_TYPE, ENHANCER_ENTITYANNOTATION);\n int entityAnnotationCount = 0;\n while (entityAnnotationIterator.hasNext()) {\n UriRef entityAnnotation = (UriRef) entityAnnotationIterator.next().getSubject();\n // test if selected Text is added\n checkEntityAnnotation(g, entityAnnotation);\n entityAnnotationCount++;\n }\n return entityAnnotationCount;\n }", "public void readText(String filename) throws IOException{\n\t\t\n\t\tif(sentences == null){\n\t\t\tsentences = new ArrayList<Sentence>();\n\t\t}\n\t\t\n\t\t//read from file\n\t\tFileInputStream inputStream = new FileInputStream(filename);\n\t\tDataInputStream stream = new DataInputStream(inputStream);\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(stream));\n\t\tString line;\n\t\twhile((line = reader.readLine()) != null){\n\t\t\tsentences.add(new Sentence(line));\n\t\t}\n\t\treader.close();\n\t\tstream.close();\n\t\tinputStream.close();\n\t\t\n\t\t\n\t}", "private void verbos(String texto, ArrayList<String> listaVerbos){\n\t Document doc = new Document(texto);\n\t for (Sentence sent : doc.sentences()) { \n//\t \tSystem.out.println(\"sent.length() \"+sent.length());\n\t for(int i=0; i < sent.length(); i++) {\n\t \t//adicionando o verbo a lista dos identificados\n\t\t \tString temp = sent.posTag(i);\n\t\t if(temp.compareTo(\"VB\") == 0) {\n//\t\t \tSystem.out.println(\"O verbo eh \" + sent.word(i));\n\t\t\t listaVerbos.add(sent.word(i));\n\t\t }\n\t\t else {\n//\t\t \tSystem.out.println(\"Não verbo \" + sent.word(i));\n\t\t }\n\t }\n\t }\n \tSystem.out.println(\"Os verbos sao:\");\n \tSystem.out.println(listaVerbos);\n\n\t}", "@Override\n\tpublic void accept(Visitor visitor) throws FileNotFoundException, IOException {\n\n\t\tfor (Element e : sentenceArrayLst) {\n\n\t\t\t((Element) e).accept(visitor);\n\t\t}\n\n\t}", "public Collection<ConceptLabel> processSentence(Sentence sentence, List messages) {\n\t\t// long time = System.currentTimeMillis();\n\t\t// search in lexicon\n\t\tList<Concept> keys = lookupConcepts(sentence);\n\t\t\t\n\t\t// filter out overlapping numbers\n\t\tfilterNumbers(keys);\n\t\tfilterOverlap(keys);\t\t\t\n\t\t\n\t\t// take out concepts that overlap with new concepts\n\t\tList<ReportConcept> reparsedConcepts = new ArrayList<ReportConcept>();\n\t\tfor (ReportConcept c : concepts) {\n\t\t\t// if existing concept intersects this sentence\n\t\t\tif (intersects(c,sentence.getSpan())) {\n\t\t\t\treparsedConcepts.add(c);\n\t\t\t}\n\t\t}\n\n\t\t// take out concepts that will be reparsed anyway\n\t\tconcepts.removeAll(reparsedConcepts);\n\n\t\t// process phrase\n\t\tList<ConceptLabel> labels = new ArrayList<ConceptLabel>();\n\n\t\tfor (Concept concept : keys) {\n\t\t\t// create new labels\n\t\t\tCollection<ConceptLabel> lbl = createConceptLabels(concept,sentence.getCharOffset());\n\t\t\tlabels.addAll(lbl);\n\n\t\t\t// get entry or create it\n\t\t\tReportConcept entry = createReportConcept(concept);\n\t\t\tentry.addLabels(lbl);\n\n\t\t\t// add to all concepts\n\t\t\tconcepts.add(entry);\n\t\t\t// negatedConcepts.remove(entry);\n\n\t\t\t// process numbers\n\t\t\tfor (ConceptLabel l : lbl)\n\t\t\t\tprocessNumericValues(entry, l);\n\t\t}\n\n\t\t// take care of negation\n\t\tnegex.clear();\n\t\tnegex.process(sentence, keys);\n\t\tlabels.addAll(processNegation(negex, messages));\n\n\t\t// backup concepts so that concepts that were merged outside of parsed\n\t\t// sentence could be removed after processing\n\t\tList<ReportConcept> backup = new ArrayList<ReportConcept>(concepts);\n\t\tbackup.removeAll(reparsedConcepts);\n\t\t\n\t\t// compact concepts to more specific constructs\n\t\tprocessConcepts(concepts);\n\t\n\t\t// at this point we can potentially have a situation where\n\t\t// one concept from this sentence subsumed another from the previous or next \n\t\t// sentence\n\t\tfor(ReportConcept c: backup){\n\t\t\tif(!concepts.contains(c))\n\t\t\t\tremovedConcepts.add(c);\n\t\t}\n\t\t\n\t\t// remove dangling digits and units, cause they are likely to be junk\n\t\tremoveDanglingAttributes();\t\t\n\t\t\n\t\t// now that we may have reparsed some concepts, lets\n\t\t// see if we can retain some of the old data\n\t\tfor (ReportConcept rc : reparsedConcepts) {\n\t\t\t// reparsed concept is in the list, then retain its data, if not\n\t\t\t// then it should be removed\n\t\t\tReportConcept nc = TextHelper.get(concepts, rc);\n\t\t\tif (nc != null) {\n\t\t\t\tnc.setConceptEntry(rc.getConceptEntry());\n\t\t\t} else {\n\t\t\t\tremovedConcepts.add(rc);\n\t\t\t}\n\t\t}\n\n\t\t// negate concepts and proces numbers\n\t\tfor (ReportConcept e : negatedConcepts) {\n\t\t\tReportConcept n = TextHelper.get(concepts, e);\n\t\t\tif (n != null) {\n\t\t\t\tn.setNegation(e.getNegation());\n\t\t\t}\n\t\t}\n\n\t\t// clear negation\n\t\tnegatedConcepts.clear();\n\n\t\t// do eggs\n\t\tEggs.processText(sentence.getOriginalString());\n\t\n\t\t// sync to interface\n\t\tsync();\n\t\t\n\t\treturn labels;\n\t}", "private int[] searchNamedEntity(String namedEntity, String name) {\n int[] result = null;\n if (namedEntity.toLowerCase().contains(name.toLowerCase()) && name.length() != 0) {\n result = new int[2];\n int begin = namedEntity.indexOf(name);\n int end = begin + name.length();\n \n result[0] = begin;\n result[1] = end;\n \n // Check to make sure results are valid\n if (begin < 0 || end < 0 || end < begin) {\n return null;\n }\n }\n \n return result;\n }", "@Override\n\tpublic List<String> getAllAuditedEntitiesNames() {\n\t\tif (this.allAuditedEntititesNames != null) {\n\t\t\t// return this.allAuditedEntititesNames;\n\t\t}\n\t\t//\n\t\tList<String> result = new ArrayList<>();\n\t\tSet<EntityType<?>> entities = entityManager.getMetamodel().getEntities();\n\t\tfor (EntityType<?> entityType : entities) {\n\t\t\tif (entityType.getJavaType() == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// get entities methods and search annotation Audited in fields.\n\t\t\tif (getAuditedField(entityType.getJavaType().getDeclaredFields())) {\n\t\t\t\tresult.add(entityType.getJavaType().getCanonicalName());\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//\n\t\t\t// TODO: add some better get of all class annotations\n\t\t\tAnnotation[] annotations = null;\n\t\t\ttry {\n\t\t\t\tannotations = entityType.getJavaType().newInstance().getClass().getAnnotations();\n\t\t\t} catch (InstantiationException | IllegalAccessException e) {\n\t\t\t\t// class is not accessible\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// entity can be annotated for all class\n\t\t\tif (getAuditedAnnotation(annotations)) {\n\t\t\t\tresult.add(entityType.getJavaType().getCanonicalName());\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\t// sort entities by name\n\t\tCollections.sort(result);\n\t\t//\n\t\tthis.allAuditedEntititesNames = result;\n\t\treturn result;\n\t}", "public List<String> getCandidates(LinkedList<Token> pSentence);", "public List<List<TaggedWord>> getsTaggedSentences(String input) {\n List<List<HasWord>> sentences = MaxentTagger.tokenizeText(new StringReader(input));\n return mxntg.process(sentences);\n }", "public static void checkFirstNames(List<Token> tokenList) {\r\n\t\tfor (Token t : tokenList) {\r\n\t\t\tif (t.getName().matches(\"\\\\w\")) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tIterator<String> it = WordLists.commonFirstNames().iterator();\r\n\t\t\t\r\n\t\t\twhile(it.hasNext()) {\r\n\t\t\t\tString name = it.next();\r\n\t\t\t\t\r\n\t\t\t\tif (name.toLowerCase().contains(t.getName().toLowerCase())) {\r\n\t\t\t\t\t//Do not mark as first name if it's an article or conjunction\r\n\t\t\t\t\tif(t.getFeatures().getPartOfSpeech() == null\r\n\t\t\t\t\t\t\t|| t.getFeatures().getPartOfSpeech().equals(String.valueOf(PartOfSpeech.ARTICLE)) \r\n\t\t\t\t\t\t\t|| t.getFeatures().getPartOfSpeech().equals(String.valueOf(PartOfSpeech.CONJUNCTION))) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tt.getFeatures().setCommonFirstName(true);\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\tit = WordLists.firstNames().iterator();\r\n\t\t\t\r\n\t\t\twhile(it.hasNext()) {\r\n\t\t\t\tString name = it.next();\r\n\t\t\t\t\r\n\t\t\t\tif(name.toLowerCase().equalsIgnoreCase(t.getName().toLowerCase())) {\r\n\t\t\t\t\t//Do not mark as first name if it's an article or conjunction\r\n\t\t\t\t\tif(t.getFeatures().getPartOfSpeech() == null\r\n\t\t\t\t\t\t\t|| t.getFeatures().getPartOfSpeech().equals(String.valueOf(PartOfSpeech.ARTICLE)) \r\n\t\t\t\t\t\t\t|| t.getFeatures().getPartOfSpeech().equals(String.valueOf(PartOfSpeech.CONJUNCTION))) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tt.getFeatures().setFirstName(true);\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "public static HashMap<String, String> simplifiedTags(List<List<TaggedWord>> taggedList) {\n HashMap<String, String> simplePOSTagged = new HashMap<>();\n for (List<TaggedWord> tags : taggedList) { // iterate over list\n for (TaggedWord taggedWord : tags) {//for each word in the sentence\n String word = taggedWord.toString().replaceFirst(\"/\\\\w+\", \"\");\n if (taggedWord.tag().equals(\"NN\") | taggedWord.tag().equals(\"NNS\") |\n taggedWord.tag().equals(\"NNP\") | taggedWord.tag().equals(\"NNPS\")) {\n simplePOSTagged.put(word, \"noun\");\n } else if (taggedWord.tag().equals(\"MD\") | taggedWord.tag().equals(\"VB\") |\n taggedWord.tag().equals(\"VBD\") | taggedWord.tag().equals(\"VBG\") |\n taggedWord.tag().equals(\"VBN\") | taggedWord.tag().equals(\"VBP\")\n | taggedWord.tag().equals(\"VBZ\")) {\n simplePOSTagged.put(word, \"verb\");\n } else if (taggedWord.tag().equals(\"JJ\") | taggedWord.tag().equals(\"JJR\") |\n taggedWord.tag().equals(\"JJS\")) {\n simplePOSTagged.put(word, \"adj\");\n } else if (taggedWord.tag().equals(\"PRP\") | taggedWord.tag().equals(\"PRP$\")) {\n simplePOSTagged.put(word, \"pron\");\n } else if (taggedWord.tag().equals(\"RB\") | taggedWord.tag().equals(\"RBR\") |\n taggedWord.tag().equals(\"RBS\")) {\n simplePOSTagged.put(word, \"adv\");\n } else if (taggedWord.tag().equals(\"CD\") | taggedWord.tag().equals(\"LS\")) {\n simplePOSTagged.put(word, \"num\");\n } else if (taggedWord.tag().equals(\"WDT\") | taggedWord.tag().equals(\"WP\") |\n taggedWord.tag().equals(\"WP$\") | taggedWord.tag().equals(\"WRB\")) {\n simplePOSTagged.put(word, \"wh\");\n } else if (taggedWord.tag().equals(\"DT\") | taggedWord.tag().equals(\"PDT\")) {\n simplePOSTagged.put(word, \"det\");\n } else if (taggedWord.tag().equals(\"CC\") | taggedWord.tag().equals(\"IN\")) {\n simplePOSTagged.put(word, \"prepconj\");\n } else {\n simplePOSTagged.put(word, \"other\");\n }\n }\n }\n return simplePOSTagged;\n }", "private static boolean isArticle(String gender, AnalyzedTokenReadings[] tokens, int from, int to) {\n if(gender.isEmpty()) {\n return false;\n }\n String sSub = \"(SUB|EIG):.*\" + gender +\".*\";\n String sAdj = \"(ZAL|PRP:|KON:|ADV:|ADJ:PRD:|(ADJ|PA[12]|PRO:(POS|DEM|IND)):.*\" + gender +\").*\";\n for (int i = from + 1; i < to; i++ ) {\n if(tokens[i].matchesPosTagRegex(sSub) || tokens[i].isPosTagUnknown()) {\n return true;\n }\n if((tokens[i].hasPosTagStartingWith(\"ART\")) || !tokens[i].matchesPosTagRegex(sAdj)) {\n if(isArticleWithoutSub(gender, tokens, i)) {\n return true;\n }\n int skipTo = skipToSub(gender, tokens, i, to);\n if(skipTo > 0) {\n i = skipTo;\n } else {\n return false;\n }\n }\n }\n if(to < tokens.length && isArticleWithoutSub(gender, tokens, to)) {\n return true;\n }\n return false;\n }", "static Set<String> runAlchemy(String string) throws IOException, JSONException {\n\t\t\t\t\tSet<String> tagValues = new HashSet<String>();\n\t\t URL yahoo = new URL(\"http://access.alchemyapi.com/calls/text/TextGetRankedNamedEntities?apikey=b1dfe1b117afb5396431a53cfc10527ed9e6f522&text='\"+string+\"'&outputMode=json\");\n\t\t URLConnection yc = yahoo.openConnection();\n\t\t BufferedReader in = new BufferedReader(\n\t\t new InputStreamReader(\n\t\t yc.getInputStream()));\n\n\n\t\t String inputLine=\"\";\n\t\t String input=\"\";\n\n\t\t while ((inputLine = in.readLine()) != null)\n\t\t {\n\t\t \tinput+=\"\" + inputLine;\n\t\t \t System.out.println(inputLine);\n\t\t }\n\t\t \n\t\t JSONObject jObject = new JSONObject(input);\n\t\t JSONArray jArray = jObject.getJSONArray(\"entities\");\n\t\t for (int i = 0; i < jArray.length(); i++) {\n\t\t JSONObject jObj = jArray.getJSONObject(i);\n\t\t // System.out.println(i + \" title : \" + jObj.getString(\"title\"));\n\t\t System.out.println(jObj.getString(\"relevance\"));\n\t\t double relevance= Double.parseDouble(jObj.getString(\"relevance\"));\n\t\t JSONObject disambiguated = jObj.optJSONObject(\"disambiguated\");\n\t\t if(disambiguated!=null)\n\t\t \t tagValues.add(disambiguated.optString(\"dbpedia\")+\"~\" + relevance);\n\t\t \t \n\t\t \n\t\t // tagValues.add(jObj.getString(\"relevance\"));\n\t\t }\n\t\t in.close();\n\t\t \n\t\t\t\treturn tagValues;\n\t\t\t\t}", "private void addEntityViews(TextAnnotation ta, ACEDocumentAnnotation docAnnotation, File file) {\n SpanLabelView entityView =\n new SpanLabelView(ViewNames.MENTION_ACE,\n ACEReader.class.getCanonicalName(), ta, 1.0f, true);\n CoreferenceView corefHeadView =\n new CoreferenceView(ViewNames.COREF_HEAD, ACEReader.class.getCanonicalName(), ta,\n 1.0f);\n CoreferenceView corefExtentView =\n new CoreferenceView(ViewNames.COREF_EXTENT, ACEReader.class.getCanonicalName(), ta,\n 1.0f);\n\n for (ACEEntity entity : docAnnotation.entityList) {\n List<Constituent> corefMentions = new ArrayList<>(docAnnotation.entityList.size());\n List<Constituent> corefMentionHeads = new ArrayList<>(docAnnotation.entityList.size());\n\n for (ACEEntityMention entityMention : entity.entityMentionList) {\n int extentStartTokenId =\n ta.getTokenIdFromCharacterOffset(entityMention.extentStart);\n int extentEndTokenId = ta.getTokenIdFromCharacterOffset(entityMention.extentEnd);\n\n if (extentStartTokenId < 0 || extentEndTokenId < 0\n || extentStartTokenId > extentEndTokenId + 1) {\n logger.error(\"Incorrect Extent Token Span for mention - \" + entity.id + \" \"\n + entityMention.id);\n continue;\n }\n\n Constituent extentConstituent =\n new Constituent(entity.type, ViewNames.MENTION_ACE, ta, extentStartTokenId, extentEndTokenId + 1);\n extentConstituent.addAttribute(EntityTypeAttribute, entity.type);\n extentConstituent.addAttribute(EntityIDAttribute, entity.id);\n extentConstituent.addAttribute(EntityMentionIDAttribute, entityMention.id);\n extentConstituent.addAttribute(EntityMentionTypeAttribute, entityMention.type);\n extentConstituent.addAttribute(EntityClassAttribute, entity.classEntity);\n\n String entitySubType = (entity.subtype != null) ? entity.subtype : entity.type;\n extentConstituent.addAttribute(EntitySubtypeAttribute, entitySubType);\n\n if (entityMention.ldcType != null) {\n extentConstituent.addAttribute(EntityMentionLDCTypeAttribute, entityMention.ldcType);\n }\n\n // ACE Annotation have character offsets inclusive of start/end.\n // Converting them to a one-after-then-end.\n extentConstituent.addAttribute(EntityHeadStartCharOffset, entityMention.headStart + \"\");\n extentConstituent.addAttribute(EntityHeadEndCharOffset, entityMention.headEnd + 1 + \"\");\n\n entityView.addConstituent(extentConstituent);\n\n Constituent corefExtentConstituent =\n extentConstituent.cloneForNewViewWithDestinationLabel(\n ViewNames.COREF_EXTENT, entity.id);\n corefMentions.add(corefExtentConstituent);\n\n Constituent corefHeadConstituent =\n getEntityHeadForConstituent(corefExtentConstituent, ta,\n ViewNames.COREF_HEAD);\n if (corefHeadConstituent != null) {\n corefMentionHeads.add(corefHeadConstituent);\n }\n }\n\n // Picking the longest mention as the canonical mention\n // as we do not get this information is not present in the dataset.\n Constituent canonicalMention = null;\n double[] scores = new double[corefMentions.size()];\n for (int i = 0; i < corefMentions.size(); i++) {\n Constituent cons = corefMentions.get(i);\n scores[i] = cons.getConstituentScore();\n\n if (canonicalMention == null\n || canonicalMention.getSurfaceForm().length() < cons.getSurfaceForm().length()) {\n canonicalMention = cons;\n }\n }\n\n if (corefMentions.size() > 0) {\n corefExtentView.addCorefEdges(canonicalMention, corefMentions, scores);\n } else {\n logger.error(\"No Entity Mentions found for a given entity - \" + entity.id);\n }\n\n // Processing Coref Head Constituents\n // Picking the longest mention as the canonical mention\n // as we do not get this information is not present in the dataset.\n canonicalMention = null;\n scores = new double[corefMentionHeads.size()];\n for (int i = 0; i < corefMentionHeads.size(); i++) {\n Constituent cons = corefMentionHeads.get(i);\n scores[i] = cons.getConstituentScore();\n\n if (canonicalMention == null\n || canonicalMention.getSurfaceForm().length() < cons.getSurfaceForm().length()) {\n canonicalMention = cons;\n }\n }\n\n if (corefMentionHeads.size() > 0) {\n corefHeadView.addCorefEdges(canonicalMention, corefMentionHeads, scores);\n } else {\n logger.error(\"No Entity Mentions found for a given entity - \" + entity.id);\n }\n }\n\n ta.addView(ViewNames.MENTION_ACE, entityView);\n ta.addView(ViewNames.COREF_HEAD, corefHeadView);\n ta.addView(ViewNames.COREF_EXTENT, corefExtentView);\n }", "@Test\n public void term_tag() throws AtlasBaseException {\n SearchParameters params = new SearchParameters();\n params.setTermName(SALES_TERM+\"@\"+SALES_GLOSSARY);\n params.setClassification(METRIC_CLASSIFICATION);\n\n List<AtlasEntityHeader> entityHeaders = discoveryService.searchWithParameters(params).getEntities();\n\n Assert.assertTrue(CollectionUtils.isNotEmpty(entityHeaders));\n for(AtlasEntityHeader e : entityHeaders){\n System.out.println(e.toString());\n }\n assertEquals(entityHeaders.size(), 4);\n }", "public void Tokenizer(String s) throws FileNotFoundException\r\n {\nInputStream modelIn = new FileInputStream(\"C:/OpenNLP_models/en-token.bin\"); \r\n\t \r\n // InputStream modelIn=getClass().getResourceAsStream(\"en-token.bin\");\r\n try {\r\n TokenizerModel model = new TokenizerModel(modelIn);\r\n TokenizerME tokenizer = new TokenizerME(model);\r\n String tokens[] = tokenizer.tokenize(s);\r\n \r\n for(int i=0; i<tokens.length;i++)\r\n {\r\n System.out.println(tokens[i]);\r\n }\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n finally {\r\n if (modelIn != null) {\r\n try {\r\n modelIn.close();\r\n }\r\n catch (IOException e) {\r\n }\r\n } \r\n } \r\n }", "public void getNounPhrases(Parse p) {\n if (p.getType().equals(\"NN\") || p.getType().equals(\"NNS\") || p.getType().equals(\"NNP\") \n || p.getType().equals(\"NNPS\")) {\n nounPhrases.add(p.getCoveredText()); //extracting the noun parse\n }\n \n if (p.getType().equals(\"VB\") || p.getType().equals(\"VBP\") || p.getType().equals(\"VBG\")|| \n p.getType().equals(\"VBD\") || p.getType().equals(\"VBN\")) {\n \n verbPhrases.add(p.getCoveredText()); //extracting the verb parse\n }\n \n for (Parse child : p.getChildren()) {\n getNounPhrases(child);\n }\n}", "public String extractRelevantSentences(String paragraph, Collection<String> terms, boolean lemmatised, int maxSentenceLength) {\n String result = \"\";\n boolean checkSentenceLength = (maxSentenceLength != -1);\n\n // Create an empty Annotation just with the given text\n document = new Annotation(paragraph);\n // Run Annotators on this text\n pipeline.annotate(document);\n\n // Use map to track sentences so that a sentence is not returned twice\n sentences = new HashMap();\n int key = 0;\n for (CoreMap coreMap : document.get(CoreAnnotations.SentencesAnnotation.class)) {\n String string = coreMap.toString();\n if (checkSentenceLength)// if checking sentences, skip is sentence is long\n if (StringOps.getWordLength(string) > maxSentenceLength)\n continue;\n sentences.put(key, coreMap.toString());\n key++;\n }\n\n Set keySet = sentences.keySet();\n Set<Integer> returnedSet = new HashSet();\n Iterator keyIterator = keySet.iterator();\n // These are all the sentences in this document\n while (keyIterator.hasNext()) {\n int id = (int) keyIterator.next();\n String content = sentences.get(id);\n // This is the current sentence\n String thisSentence = content;\n // Select sentence if it contains any of the terms and is not already returned\n for (String t : terms) {\n if (!returnedSet.contains(id)) { // ensure sentence not already used\n String label = StringOps.stemSentence(t, true);\n if (StringUtils.contains(StringOps.stemSentence(thisSentence, false), label)\n || StringUtils.contains(StringOps.stemSentence(StringOps.stripAllParentheses(thisSentence), false), label)) { // lookup stemmed strings\n result = result + \" \" + thisSentence.trim(); // Concatenate new sentence\n returnedSet.add(id);\n }\n }\n }\n }\n\n if (lemmatised && null != result) {\n result = lemmatise(result);\n }\n\n return result;\n }", "List<String> tokenize2(String doc) {\n String stemmed = StanfordLemmatizer.stemText(doc);\n List<String> res = new ArrayList<String>();\n\n for (String s : stemmed.split(\"[\\\\p{Punct}\\\\s]+\"))\n res.add(s);\n return res;\n }", "@Test\n public void main() throws IOException {\n currentArticle = null;\n\n for(String line: FileUtils.readLines(new File(\"D:\\\\projects\\\\вёрстка томов ИИ\\\\9 том\\\\термины.txt\"))) {\n\n Matcher matcher = compile(\"\\\\|([^\\\\|]+)\\\\|\\\\s[–\\\\-—]\\\\s(.+)\").matcher(line);\n if (matcher.find()) {\n if (currentArticle != null) {\n saveItem();\n currentArticle = null;\n }\n String term = matcher.group(1);\n String body = matcher.group(2);\n if(body.indexOf(\"см. \") != 0) {\n currentArticle = new Article(term, body);\n } /*else {\n String alias = body.replace(\"см. \", \"\").replace(\"«\", \"\").replace(\"»\", \"\").replace(\".\", \"\");\n saveAliases(alias, term);\n }*/\n } else if (currentArticle != null) {\n currentArticle.setContent(currentArticle.getContent() + \"<br/>\"+line);\n }\n }\n if (currentArticle != null) {\n saveItem();\n }\n }", "public ArrayList getClassList() {\n nounList = new ArrayList();\n attributeLists = new ArrayList();\n int adjectiveExist = 0;\n int adjectiveNoun = 0;\n String adj = \"\";\n String storingClass = \"\";\n HashSet classWithAttr = new HashSet();\n storingClassWithAttr = new HashMap<String, HashSet>();\n\n List<Tree> leaves;\n String phraseNotation = \"(NP([<NNS|NN|NNP]$VP))\";//@\" + phrase + \"! << @\" + phrase;\n\n /*For the single Tree */\n TregexPattern VBpattern = TregexPattern.compile(phraseNotation);\n TregexMatcher matcher = VBpattern.matcher(sTree);\n String tempClass = \"\";\n\n while (matcher.findNextMatchingNode()) {\n Tree match = matcher.getMatch();\n Tree[] innerChild = match.children();\n adjectiveExist = 0;\n adjectiveNoun = 0;\n int separator = 0;\n\n if (innerChild.length > 1) {\n int count = 1;\n int loopCount = 1;\n for (Tree inChild : innerChild) {\n if (inChild.value().equals(\"CC\")) {\n separator = 1;\n }\n if ((inChild.value().equals(\"JJ\")) || (inChild.value().equals(\"VBG\"))) {\n adjectiveExist++;\n leaves = inChild.getLeaves();\n adj = leaves.get(0).yieldWords().get(0).word();\n if (dictionaryForClassList.contains(adj)) {\n adj = \"\";\n }\n }\n //if adjective exist store the classes and attributes separately\n if (adjectiveExist == 1) {\n storeClassesAndAttributesWhenAdjectiveExistToIdentifyClasses(inChild, adjectiveNoun, adj);\n } else {\n //storeClassesAndAttributesWhenAdjectiveNotExistToIdentifyClasses(inChild, loopCount, innerChild, separator, tempClass, count);\n if ((inChild.value().equals(\"NN\")) || (inChild.value().equals(\"NNS\") || (inChild.value().equals(\"NNP\")))) {\n leaves = inChild.getLeaves(); //leaves correspond to the tokens\n if (separator == 0) {\n if (loopCount == innerChild.length) {\n String identifiedWord = ((leaves.get(0).yieldWords()).get(0).word());\n String word = \"\";\n word = stemmingForAWord(identifiedWord);\n if (!dictionaryForClassList.contains(word)) {\n nounList.remove(tempClass);\n nounList.add(word);\n attributeLists.add(tempClass);\n \n }\n\n } else if (count == 1) {\n String identifiedWord = ((leaves.get(0).yieldWords()).get(0).word());\n /*if the identified word is having underscore skips the stemming part . ex: user_id*/\n String word = stemmingForAWord(identifiedWord);\n nounList.add(word);\n tempClass = word;\n storingClass = word;\n\n } else {\n /*if the identified word is having underscore skips the stemming part . ex: user_id*/\n if (tempClass.contains(\"_\")) {\n nounList.remove(tempClass);\n } else {\n nounList.remove(morphology.stem(tempClass));\n nounList.remove(tempClass);\n }\n String identifiedWord = ((leaves.get(0).yieldWords()).get(0).word());\n\n tempClass += \" \" + identifiedWord;\n nounList.add(tempClass);\n storingClass = tempClass;\n }\n\n count++;\n } else {\n String identifiedWord = ((leaves.get(0).yieldWords()).get(0).word());\n /*if the identified word is having underscore skips the stemming part . ex: user_id*/\n String word = stemmingForAWord(identifiedWord);\n nounList.add(word);\n tempClass = word;\n storingClass = word;\n }\n }\n\n }\n loopCount++;\n }\n } else {\n for (Tree inChild : innerChild) {\n if ((inChild.value().equals(\"NN\")) || (inChild.value().equals(\"NNS\")) || (inChild.value().equals(\"NNP\"))) {\n leaves = inChild.getLeaves(); //leaves correspond to the tokens\n String identifiedWord = ((leaves.get(0).yieldWords()).get(0).word());\n if (!identifiedWord.contains(\"_\")) {\n nounList.add(morphology.stem(identifiedWord));\n } else {\n nounList.add(identifiedWord);\n }\n }\n if (inChild.value().equals(\"JJ\")) {\n //leaves correspond to the tokens\n leaves = inChild.getLeaves();\n nounList.add(((leaves.get(0).yieldWords()).get(0).word()));\n }\n }\n }\n }\n System.out.println(\"NOUN LIST :\" + nounList);\n return nounList;\n }", "@Override\n public void process(JCas jCas) throws AnalysisEngineProcessException {\n JCas viewJCas = jCas;\n if (!view.equals(VIEW_SYSTEM)) {\n try {\n viewJCas = jCas.getView(view);\n } catch (CASException e) {// just rethrow\n throw new AnalysisEngineProcessException(e);\n }\n }\n\n Collection<de.julielab.jules.types.Sentence> sentences = select(\n viewJCas, de.julielab.jules.types.Sentence.class);\n\n for (de.julielab.jules.types.Sentence julesSentence : sentences) {\n int sentence_start = julesSentence.getBegin();\n\n if (julesSentence.getCoveredText().length() > 0) {\n\n try {\n Sentence sentence = new Sentence(\n julesSentence.getCoveredText());\n bannerTokenizer.tokenize(sentence);\n crfTagger.tag(sentence);// error\n if (postProcessor != null)\n postProcessor.postProcess(sentence);\n\n for (Mention mention : sentence.getMentions()) {\n\n int startChar = mention.getStartChar() + sentence_start;\n int endChar = mention.getEndChar() + sentence_start;\n // LOG.debug(\"found NE:\" + mention.getText() + \" \" +\n // startChar\n // + \":\" + endChar);\n Protein prot = new Protein(viewJCas, startChar, endChar);\n prot.setName(mention.getText());\n prot.setTextualRepresentation(\"⊂PROT⊃\");\n prot.addToIndexes();\n }\n\n } catch (Throwable t) {\n // not sure why, but this happens sometimes after some time\n int docId = getHeaderIntDocId(viewJCas);\n LOG.warn(\"Banner exception at docId {}, skipping. {}\",\n docId, StringUtils.print(t));\n try {\n GarbageCollectorAnnotator.runGC();\n loadTagger(); // reload\n } catch (Exception e) {\n throw new AnalysisEngineProcessException(e);\n }\n }\n }\n }\n }", "public String getCandidateSentences(HashMap<String, String> tripleDataMap) {\n String subUri = tripleDataMap.get(\"subUri\");\n String objUri = tripleDataMap.get(\"objUri\");\n String subLabel = tripleDataMap.get(\"subLabel\");\n String objLabel = tripleDataMap.get(\"objLabel\");\n\n String[] subArticleSentences = getSentencesOfArticle(getArticleForURI(subUri));\n String[] objArticleSentences = getSentencesOfArticle(getArticleForURI(objUri));\n String sentencesCollectedFromSubjArticle = null;\n String sentencesCollectedFromObjArticle = null;\n String sentence = null;\n if (subArticleSentences != null)\n sentencesCollectedFromSubjArticle = getSentencesHavingLabels(subLabel, objLabel, subArticleSentences);\n\n if (objArticleSentences != null)\n sentencesCollectedFromObjArticle = getSentencesHavingLabels(subLabel, objLabel, objArticleSentences);\n\n if (sentencesCollectedFromSubjArticle != null && sentencesCollectedFromObjArticle != null) {\n if (sentencesCollectedFromSubjArticle.length() <= sentencesCollectedFromObjArticle.length())\n sentence = sentencesCollectedFromSubjArticle;\n else\n sentence = sentencesCollectedFromObjArticle;\n } else if (sentencesCollectedFromSubjArticle != null) {\n sentence = sentencesCollectedFromSubjArticle;\n } else {\n sentence = sentencesCollectedFromObjArticle;\n }\n return sentence;\n }", "@Override\n protected String doInBackground(String... strings) {\n\n String text = strings[0];\n\n// Parse[] parses = NLP.getParse(context, text);\n// StringBuffer sb = new StringBuffer();\n// if (parses != null) {\n// for (Parse parse : parses) {\n// parse.show(sb);\n// }\n// }\n\n // get tokens\n String[] results = NLP.getTokens(context, text);\n\n// String[] partsOfSpeech = NLP.getPartsOfSpeech(context, results);\n// if (partsOfSpeech != null) {\n// for (String string : partsOfSpeech) {\n// Timber.e(string);\n// }\n// }\n\n Span[] names = NLP.getNames(context, results);\n if (names != null && names.length > 0) {\n Timber.e(\"Size: %d\", names.length);\n for (Span name : names) {\n Timber.e(name.getType());\n if (name.getType().equalsIgnoreCase(\"person\")) {\n Timber.e(\"Start: %d, End: %d\", name.getStart(), name.getEnd());\n String fullName = \"\";\n for (int i = name.getStart(); i < name.getEnd(); i++) {\n if (results != null) {\n fullName += results[i] + \" \";\n }\n }\n return fullName;\n }\n }\n } else {\n Timber.e(\"names is null\");\n }\n\n return null;\n }", "public ArrayList<Sentence> sentenceDetector(BreakIterator bi,\r\n\t\t\tString text) {\r\n\t\tArrayList<Sentence> sentences = new ArrayList<Sentence>();\r\n\t\tbi.setText(text);\r\n\r\n\t\tint lastIndex = bi.first();\r\n\t\twhile (lastIndex != BreakIterator.DONE) {\r\n\t\t\tint firstIndex = lastIndex;\r\n\t\t\tlastIndex = bi.next();\r\n\r\n\t\t\tif (lastIndex != BreakIterator.DONE) {\r\n\t\t\t\tSentence s = new Sentence(text.substring(firstIndex, lastIndex));\r\n\t\t\t\ts.tokenizeSentence();\r\n\t\t\t\tsentences.add(s);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sentences;\r\n\t}", "public static void checkLastNames(List<Token> tokenList) {\t\r\n\t\tfor (Token t : tokenList) {\r\n\t\t\tif (t.getName().matches(\"\\\\w\")) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tIterator<String> it = WordLists.commonLastNames().iterator();\r\n\t\t\t\r\n\t\t\twhile(it.hasNext()) {\r\n\t\t\t\tString name = it.next();\r\n\t\t\t\t\r\n\t\t\t\tif (name.toLowerCase().contains(t.getName().toLowerCase())) {\r\n\t\t\t\t\t//Do not mark as first name if it's an article or conjunction\r\n\t\t\t\t\tif(t.getFeatures().getPartOfSpeech() == null\r\n\t\t\t\t\t\t\t|| t.getFeatures().getPartOfSpeech().equals(String.valueOf(PartOfSpeech.ARTICLE)) \r\n\t\t\t\t\t\t\t|| t.getFeatures().getPartOfSpeech().equals(String.valueOf(PartOfSpeech.CONJUNCTION))) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tt.getFeatures().setCommonLastName(true);\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\tit = WordLists.lastNames().iterator();\r\n\t\t\t\r\n\t\t\twhile(it.hasNext()) {\r\n\t\t\t\tString name = it.next();\r\n\t\t\t\t\r\n\t\t\t\tif(name.toLowerCase().contains(t.getName().toLowerCase())) {\r\n\t\t\t\t\t//Do not mark as first name if it's an article or conjunction\r\n\t\t\t\t\tif(t.getFeatures().getPartOfSpeech() == null\r\n\t\t\t\t\t\t\t|| t.getFeatures().getPartOfSpeech().equals(String.valueOf(PartOfSpeech.ARTICLE)) \r\n\t\t\t\t\t\t\t|| t.getFeatures().getPartOfSpeech().equals(String.valueOf(PartOfSpeech.CONJUNCTION))) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tt.getFeatures().setLastName(true);\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "public List<String> getFillTextFillNamedEntities() {\n return fetchMultipleValues(\"de.saschafeldmann.adesso.master.thesis.detection.filltext.fill.named.entities\");\n }", "public static void main(final String[] args)\r\n {\r\n // Set the path to the data files\r\n Dictionary.initialize(\"c:/Program Files/WordNet/2.1/dict\");\r\n \r\n // Get an instance of the Dictionary object\r\n Dictionary dict = Dictionary.getInstance();\r\n \r\n // Declare a filter for all terms starting with \"car\", ignoring case\r\n TermFilter filter = new WildcardFilter(\"car*\", true);\r\n \r\n // Get an iterator to the list of nouns\r\n Iterator<IndexTerm> iter = \r\n dict.getIndexTermIterator(PartOfSpeech.NOUN, 1, filter);\r\n \r\n // Go over the list items\r\n while (iter.hasNext())\r\n {\r\n // Get the next object\r\n IndexTerm term = iter.next();\r\n \r\n // Write out the object\r\n System.out.println(term.toString());\r\n \r\n // Write out the unique pointers for this term\r\n int nNumPtrs = term.getPointerCount();\r\n if (nNumPtrs > 0)\r\n {\r\n // Print out the number of pointers\r\n System.out.println(\"\\nThis term has \" + Integer.toString(nNumPtrs) +\r\n \" pointers\");\r\n \r\n // Print out all of the pointers\r\n String[] ptrs = term.getPointers();\r\n for (int i = 0; i < nNumPtrs; ++i)\r\n {\r\n String p = Pointer.getPointerDescription(term.getPartOfSpeech(), ptrs[i]);\r\n System.out.println(ptrs[i] + \": \" + p);\r\n }\r\n }\r\n \r\n // Get the definitions for this term\r\n int nNumSynsets = term.getSynsetCount();\r\n if (nNumSynsets > 0)\r\n {\r\n // Print out the number of synsets\r\n System.out.println(\"\\nThis term has \" + Integer.toString(nNumSynsets) +\r\n \" synsets\");\r\n \r\n // Print out all of the synsets\r\n Synset[] synsets = term.getSynsets();\r\n for (int i = 0; i < nNumSynsets; ++i)\r\n {\r\n System.out.println(synsets[i].toString());\r\n }\r\n }\r\n }\r\n \r\n System.out.println(\"Demo processing finished.\");\r\n }", "public static void classifyWithAllWords(String[] args) \r\n\t\t\tthrows IOException\r\n\t\t\t{\n\t\tFile dir_location = new File( args[0] ); \r\n\r\n\t\t// Listing of the directory (should contain 2 subdirectories: ham/ and spam/)\r\n\t\tFile[] dir_listing = new File[0];\r\n\r\n\t\t// Check if the cmd line arg is a directory and list it\r\n\t\tif ( dir_location.isDirectory() )\r\n\t\t{\r\n\t\t\tdir_listing = dir_location.listFiles();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println( \"- Error: cmd line arg not a directory.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t// Listings of the two sub-directories (ham/ and spam/)\r\n\t\tFile[] listing_ham = new File[0];\r\n\t\tFile[] listing_spam = new File[0];\r\n\r\n\t\t// Check that there are 2 sub-directories\r\n\t\tboolean hamFound = false; boolean spamFound = false;\r\n\t\tfor (int i=0; i<dir_listing.length; i++) {\r\n\t\t\tif (dir_listing[i].getName().equals(\"ham\")) { listing_ham = dir_listing[i].listFiles(); hamFound = true;}\r\n\t\t\telse if (dir_listing[i].getName().equals(\"spam\")) { listing_spam = dir_listing[i].listFiles(); spamFound = true;}\r\n\t\t}\r\n\t\tif (!hamFound || !spamFound) {\r\n\t\t\tSystem.out.println( \"- Error: specified directory does not contain ham and spam subdirectories.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t// Print out the number of messages in ham and in spam\r\n\t\t//System.out.println( \"\\t number of ham messages is: \" + listing_ham.length );\r\n\t\t//System.out.println( \"\\t number of spam messages is: \" + listing_spam.length );\r\n\r\n\t\t//******************************\r\n\t\t// Create a hash table for the vocabulary (word searching is very fast in a hash table)\r\n\t\tHashtable<String,Multiple_Counter> vocab = new Hashtable<String,Multiple_Counter>();\r\n\t\tMultiple_Counter old_cnt = new Multiple_Counter();\r\n\r\n\t\t//\t\tgw\r\n\t\tHashtable<String,WordStat> vocab_stat = new Hashtable<String,WordStat>();\r\n\r\n\t\tint nWordsHam = 0;\r\n\t\tint nWordsSpam = 0;\r\n\r\n\t\t// Read the e-mail messages\r\n\t\t// The ham mail\r\n\t\tfor ( int i = 0; i < listing_ham.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( listing_ham[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tif ( !word.equals(\"\") ) { // if string isn't empty\r\n\t\t\t\t\t\tnWordsHam++;\r\n\t\t\t\t\t\tif ( vocab.containsKey(word) )\t\t\t\t// check if word exists already in the vocabulary\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\told_cnt = vocab.get(word);\t// get the counter from the hashtable\r\n\t\t\t\t\t\t\told_cnt.counterHam ++;\t\t\t// and increment it\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, old_cnt);\r\n\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = vocab_stat.get(word);\r\n\t\t\t\t\t\t\tws.counterHam++;\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tis this necessary?\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tMultiple_Counter fresh_cnt = new Multiple_Counter();\r\n\t\t\t\t\t\t\tfresh_cnt.counterHam = 1;\r\n\t\t\t\t\t\t\tfresh_cnt.counterSpam = 0;\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, fresh_cnt);\t\t\t// put the new word with its new counter into the hashtable\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = new WordStat();\r\n\t\t\t\t\t\t\tws.counterHam = 1;\r\n\t\t\t\t\t\t\tws.counterSpam = 0;\r\n\t\t\t\t\t\t\tws.p_w_given_ham_log = 0.0 ; //init\r\n\t\t\t\t\t\t\tws.p_w_given_spam_log = 0.0; //init\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t}\r\n\t\t// The spam mail\r\n\t\tfor ( int i = 0; i < listing_spam.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( listing_spam[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tif ( ! word.equals(\"\") ) {\t\r\n\t\t\t\t\t\tnWordsSpam ++;\r\n\t\t\t\t\t\tif ( vocab.containsKey(word) )\t\t\t\t// check if word exists already in the vocabulary\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\told_cnt = vocab.get(word);\t// get the counter from the hashtable\r\n\t\t\t\t\t\t\told_cnt.counterSpam ++;\t\t\t// and increment it\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, old_cnt);\r\n\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = vocab_stat.get(word);\r\n\t\t\t\t\t\t\tws.counterSpam++;\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tis this necessary?\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tMultiple_Counter fresh_cnt = new Multiple_Counter();\r\n\t\t\t\t\t\t\tfresh_cnt.counterHam = 0;\r\n\t\t\t\t\t\t\tfresh_cnt.counterSpam = 1;\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, fresh_cnt);\t\t\t// put the new word with its new counter into the hashtable\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = new WordStat();\r\n\t\t\t\t\t\t\tws.counterHam = 0;\r\n\t\t\t\t\t\t\tws.counterSpam = 1;\r\n\t\t\t\t\t\t\tws.p_w_given_ham_log = 0.0 ; //init\r\n\t\t\t\t\t\t\tws.p_w_given_spam_log = 0.0; //init\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t}\r\n\r\n\t\t// Print out the hash table\r\n\t\t//\t\tfor (Enumeration<String> e = vocab.keys() ; e.hasMoreElements() ;)\r\n\t\t//\t\t{\t\r\n\t\t//\t\t\tString word;\r\n\t\t//\r\n\t\t//\t\t\tword = e.nextElement();\r\n\t\t//\t\t\told_cnt = vocab.get(word);\r\n\t\t//\r\n\t\t//\t\t\tSystem.out.println( word + \" | in ham: \" + old_cnt.counterHam + \r\n\t\t//\t\t\t\t\t\" in spam: \" + old_cnt.counterSpam);\r\n\t\t//\t\t}\r\n\r\n\t\t// Now all students must continue from here\r\n\t\t// Prior probabilities must be computed from the number of ham and spam messages\r\n\t\t// Conditional probabilities must be computed for every unique word\r\n\t\t// add-1 smoothing must be implemented\r\n\t\t// Probabilities must be stored as log probabilities (log likelihoods).\r\n\t\t// Bayes rule must be applied on new messages, followed by argmax classification (using log probabilities)\r\n\t\t// Errors must be computed on the test set and a confusion matrix must be generated\r\n\r\n\t\t// prior prob\r\n\t\tint nMessagesHam = listing_ham.length;\r\n\r\n\t\tint nMessagesSpam = listing_spam.length;\r\n\r\n\t\tint nMessagesTotal = nMessagesHam + nMessagesSpam;\r\n\r\n\t\tif(nMessagesHam == 0 || nMessagesSpam ==0)\r\n\t\t\tSystem.out.println(\"Zero ham or spam messages\");\r\n\r\n\t\tdouble p_ham_log = Math.log((nMessagesHam* 1.0)/(nMessagesTotal));\r\n\t\tdouble p_spam_log = Math.log((nMessagesSpam* 1.0)/(nMessagesTotal));\r\n\r\n\t\tIterator it = vocab_stat.entrySet().iterator();\r\n\t\tWordStat ws = null;\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap.Entry pairs = (Map.Entry) it.next();\r\n\t\t\tString is = (String) pairs.getKey();\r\n\t\t\tws = (WordStat) pairs.getValue();\r\n\r\n\t\t\tws.counterHam ++;\r\n\t\t\tws.counterSpam ++;\r\n\t\t\tnWordsHam ++;\r\n\t\t\tnWordsSpam ++;\r\n\t\t}\r\n\r\n\t\t//System.out.println(\"nWordsHam = \" +nWordsHam);\r\n\t\t//System.out.println(\"nWordsSpam = \" + nWordsSpam);\r\n\r\n\t\t//\t\tgw:\r\n\t\tit = vocab_stat.entrySet().iterator();\r\n\t\tws = null; \r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap.Entry pairs = (Map.Entry) it.next();\r\n\t\t\tString is = (String) pairs.getKey();\r\n\t\t\tws = (WordStat) pairs.getValue();\r\n\r\n\t\t\tws.p_w_given_ham_log = Math.log(ws.counterHam *1.0 / nWordsHam);\r\n\t\t\tws.p_w_given_spam_log = Math.log(ws.counterSpam *1.0 / nWordsSpam);\r\n\t\t\t//vocab_stat.put(is,ws);\r\n\t\t}\r\n\t\t//\t\tTODO: further confirm arg index\r\n\t\t//test sets\r\n\t\tFile test_dir_location = new File( args[1] ); \r\n\r\n\t\t//\t\tTODO: verify below works\r\n\t\t// Listing of the directory (should contain 2 subdirectories: ham/ and spam/)\r\n\t\tFile[] test_dir_listing = new File[0];\r\n\r\n\r\n\t\t// Check if the cmd line arg is a directory and list it\r\n\t\tif ( test_dir_location.isDirectory() )\r\n\t\t{\r\n\t\t\ttest_dir_listing = test_dir_location.listFiles();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println( \"- Error: cmd line arg not a directory.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t//\t\tTODO: verify File[0]\r\n\t\t// Listings of the two sub-directories (ham/ and spam/)\r\n\t\tFile[] test_listing_ham = new File[0];\r\n\t\tFile[] test_listing_spam = new File[0];\r\n\r\n\t\t// Check that there are 2 sub-directories\r\n\t\tboolean test_hamFound = false; boolean test_spamFound = false;\r\n\t\tfor (int i=0; i<test_dir_listing.length; i++) {\r\n\t\t\tif (test_dir_listing[i].getName().equals(\"ham\")) { test_listing_ham = test_dir_listing[i].listFiles(); test_hamFound = true;}\r\n\t\t\telse if (test_dir_listing[i].getName().equals(\"spam\")) { test_listing_spam = test_dir_listing[i].listFiles(); test_spamFound = true;}\r\n\t\t}\r\n\t\tif (!test_hamFound || !test_spamFound) {\r\n\t\t\tSystem.out.println( \"- Error: specified test directory does not contain ham and spam subdirectories.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t//\t\t// Print out the number of messages in ham and in spam\r\n\t\t//\t\tSystem.out.println( \"\\t number of test ham messages is: \" + test_listing_ham.length );\r\n\t\t//\t\tSystem.out.println( \"\\t number of test spam messages is: \" + test_listing_spam.length );\r\n\r\n\r\n\t\t//\t\tmetrics\r\n\t\tint true_positives = 0; //spam classified as spam\r\n\t\tint true_negatives = 0; //ham classified as ham\r\n\t\tint false_positives = 0; //ham ... as spam\r\n\t\tint false_negatives = 0; //spam... as ham\r\n\r\n\t\t// Test starts\r\n\t\t// The ham mail\r\n\t\tfor ( int i = 0; i < test_listing_ham.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( test_listing_ham[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\t//\t\t\tgw:\r\n\t\t\tdouble p_msg_ham_log = 0.0;\r\n\t\t\tdouble p_msg_spam_log = 0.0;\r\n\r\n\t\t\tp_msg_ham_log += p_ham_log;\r\n\t\t\tp_msg_spam_log += p_spam_log;\r\n\t\t\t//\t\t\tgw:\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tif ( !word.equals(\"\") ) { // if string isn't empty\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\r\n\t\t\t\t\t\tif(vocab_stat.containsKey(word)){\r\n\t\t\t\t\t\t\tWordStat iws = vocab_stat.get(word); \r\n\t\t\t\t\t\t\tdouble ip_w_given_ham_log = iws.p_w_given_ham_log;\r\n\t\t\t\t\t\t\tdouble ip_w_given_spam_log = iws.p_w_given_spam_log;\r\n\r\n\t\t\t\t\t\t\tp_msg_ham_log += ip_w_given_ham_log ;\r\n\t\t\t\t\t\t\tp_msg_spam_log += ip_w_given_spam_log ;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\r\n\t\t\tif (p_msg_spam_log > p_msg_ham_log) false_positives ++;\r\n\t\t\telse true_negatives ++;\r\n\t\t}\r\n\r\n\r\n\t\t// The spam mail\r\n\t\tfor ( int i = 0; i < test_listing_spam.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( test_listing_spam[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\t//\t\t\tgw:\r\n\t\t\tdouble p_msg_ham_log = 0.0;\r\n\t\t\tdouble p_msg_spam_log = 0.0;\r\n\r\n\t\t\tp_msg_ham_log += p_ham_log;\r\n\t\t\tp_msg_spam_log += p_spam_log;\r\n\t\t\t//\t\t\tgw:\t\t\t\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tif ( ! word.equals(\"\") ) {\t\r\n\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\r\n\t\t\t\t\t\tif(vocab_stat.containsKey(word)){\r\n\t\t\t\t\t\t\tWordStat iws = vocab_stat.get(word); \r\n\t\t\t\t\t\t\tdouble ip_w_given_ham_log = iws.p_w_given_ham_log;\r\n\t\t\t\t\t\t\tdouble ip_w_given_spam_log = iws.p_w_given_spam_log;\r\n\r\n\t\t\t\t\t\t\tp_msg_ham_log += ip_w_given_ham_log ;\r\n\t\t\t\t\t\t\tp_msg_spam_log += ip_w_given_spam_log ;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t\tif (p_msg_spam_log > p_msg_ham_log) true_positives ++;\r\n\t\t\telse false_negatives ++;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Result 1:\");\r\n\t\tSystem.out.println(\"All_Words\\t\\ttrue spam\\ttrue ham\");\r\n\t\tSystem.out.println(\"Classified spam:\\t\"+true_positives+\"\\t\\t\"+false_positives);\r\n\t\tSystem.out.println(\"Classified ham: \\t\"+false_negatives+\"\\t\\t\"+ true_negatives);\r\n\t\tSystem.out.println(\"\");\r\n\r\n\r\n\t\t\t}" ]
[ "0.6542218", "0.65076256", "0.615281", "0.61223346", "0.6088909", "0.59227693", "0.58138764", "0.57853985", "0.566433", "0.5657016", "0.5625843", "0.5601119", "0.55779254", "0.5556276", "0.5555386", "0.54968804", "0.54887503", "0.54182076", "0.5406389", "0.5396856", "0.53572285", "0.53254163", "0.53108096", "0.52473015", "0.52461344", "0.5245701", "0.5230472", "0.52276427", "0.5226042", "0.52151793", "0.5209131", "0.51911724", "0.51714534", "0.5155455", "0.51503795", "0.51143247", "0.5108168", "0.50913924", "0.5087328", "0.5061712", "0.5056102", "0.50534266", "0.5050165", "0.50450003", "0.5041554", "0.50276923", "0.50275767", "0.5011457", "0.5010771", "0.5001087", "0.49878192", "0.49274892", "0.49217135", "0.49120024", "0.49005085", "0.48996863", "0.4897135", "0.4879159", "0.48785707", "0.48776296", "0.4876159", "0.48759264", "0.48742834", "0.48735252", "0.48732984", "0.4870009", "0.48610926", "0.48602676", "0.48557264", "0.48545653", "0.48539945", "0.4851171", "0.48187622", "0.4817273", "0.48172557", "0.4814174", "0.47974604", "0.4797316", "0.47969207", "0.47938028", "0.47877306", "0.47871578", "0.4770584", "0.4768012", "0.47630554", "0.47526875", "0.47487497", "0.47291932", "0.4720614", "0.470612", "0.47061107", "0.47044313", "0.4701094", "0.4697843", "0.469599", "0.46913484", "0.4687386", "0.46865457", "0.46819967", "0.46745986" ]
0.7048185
0
This function prints all the sentences,tokens in the sentences and named entities in the sentences.
public void printLists(ArrayList<Sentence> listofSentences) { for (Sentence sentence : listofSentences) { System.out .println("----------------------------------------------------"); System.out.println("Program 1: Identified Sentences" + sentence.sentence); System.out.println("Program 1: Identified Tokens" + sentence.tokenMap); System.out.println("Program 2: Identified Named Entities" + sentence.namedEntities); System.out .println("----------------------------------------------------"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static private void printSentenceTokens( final String documentId, final Iterable<String> tokenizedSentences ) {\n System.out.println( \"=========================== \" + documentId + \" ===========================\" );\n for ( String tokenizedSentence : tokenizedSentences ) {\n System.out.println( tokenizedSentence );\n }\n }", "public static void printSentenceList(ArrayList<ArrayList<ArrayList<String>>> allSentences) {\n\t\tIterator itr = allSentences.iterator();\n\t\twhile (itr.hasNext()) {\n\t\t\tArrayList<String> sentenceList = (ArrayList<String>) itr.next();\n\t\t\tIterator itr2 = sentenceList.iterator();\n\t\t\tSystem.out.println(sentenceList); \n\t\t}\n\t}", "void print() {\r\n\t\tOperations.print(lexemes, tokens);\r\n\t}", "public static void main(String[] args){\n SentenceParser sp = new SentenceParser (\"Peas and carrots and potatoes.\");\n System.out.println(sp);\n //then print your results\n \n\n }", "public void print() {\n\t\tfor(String subj : subjects) {\n\t\t\tSystem.out.println(subj);\n\t\t}\n\t\tSystem.out.println(\"==========\");\n\t\t\n\t\tfor(StudentMarks ssm : studMarks) {\n\t\t\tSystem.out.println(ssm.student);\n\t\t\tfor(Byte m : ssm.marks) {\n\t\t\t\tSystem.out.print(m + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tScanner console = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter a sentence: \");\n\t\tsentence = console.nextLine();\n\n\t\tSystem.out.println(getBlankPositions());\n\t\tSystem.out.println(countWords());\n\t\tString[] wordArr = getWords();\n\n\t\t// print wordArr in the proper format\n\t\tSystem.out.print(\"{\");\n\t\tfor (int i =0 ; i < wordArr.length; i++) {\n\t\t\tSystem.out.print(wordArr[i]);\n\t\t\tif (i < wordArr.length - 1)\tSystem.out.print(\",\");\n\t\t}\n\t\tSystem.out.println(\"}\");\n\t}", "public void printAll(){\n\t\tSystem.out.println(\"Single hits: \" + sin);\n\t\tSystem.out.println(\"Double hits: \" + doub);\n\t\tSystem.out.println(\"Triple hits: \" + trip);\n\t\tSystem.out.println(\"Homerun: \" + home);\n\t\tSystem.out.println(\"Times at bat: \" + atbat);\n\t\tSystem.out.println(\"Total hits: \" + hits);\n\t\tSystem.out.println(\"Baseball average: \" + average);\n\t}", "private void debugRenderTextInfos() {\n\t\tdebugRenderEntityTextInfosList(layerNegOneEntities);\n\t\tdebugRenderEntityTextInfosList(layerZeroEntities);\n\t\tdebugRenderEntityTextInfosList(layerOneEntities);\n\t}", "public void showAllWords() {//out\n System.out.println(\"No\\t|English\\t|Vietnamese\");\n ArrayList<Word> fullDictionary = dictionaryManagement.getDictionary().getWords();\n for (int i = 0; i < fullDictionary.size(); i++) {\n String aWord = String.valueOf(i + 1) + \"\\t|\" + fullDictionary.get(i).getWordTarget()\n + \"\\t|\" + fullDictionary.get(i).getWordExplain();\n System.out.println(aWord);\n }\n }", "private void printSeparation(){\n\t\tfor (int i = 0; i < 50; i++) {\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "private void printSampleData() {\n\n System.out.println(\"Sentences: \" + sentenceList.size());\n System.out.println(\"Words before cleanup: \" + map.size());\n }", "public void printAst(){\n explore(ctx);\n }", "@Override\n public String toString() {\n if (restOfSentence instanceof WordNode) {\n return word + \" \" + restOfSentence.toString();\n } else if (restOfSentence instanceof EmptyNode) {\n return word + \".\" + restOfSentence.toString();\n } else {\n return word + restOfSentence.toString();\n }\n }", "public void printTokens() {\n for (int i = 0; i < tokens.size(); i++) {\n System.out.print(tokens.get(i).getValue());\n if (i + 1 < tokens.size()) {\n System.out.print(\", \");\n }\n }\n System.out.println();\n }", "public void sentence(){\n \n System.out.println(\"Your first boyfriend's name was \" + getName() + \".\\n\");\n }", "public void printDogs(){\n System.out.println(\"Here are the dogs in the shelter:\");\n for(Dog d : dogs){\n d.printInfo();\n }\n }", "public void printToken(){\r\n System.out.println(\"Kind: \" + kind + \" , Lexeme: \" + lexeme);\r\n }", "public void print(int indent) {\n \tfor (WordList words : wordLists) {\n for (int j = 0; j < indent; j++) System.out.print(\" \");\n System.out.print(\"synon: \");\n words.print(indent);\n }\n }", "public List<String> getAllSentences(String input) {\n List<String> output = new ArrayList();\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // All the sentences in this document\n List<CoreMap> docSentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n for (CoreMap sentence : docSentences) {\n // traverse words in the current sentence\n output.add(sentence.toString());\n }\n\n return output;\n }", "public void print()\n {\n System.out.println(\"Course: \" + title + \" \" + codeNumber);\n \n module1.print();\n module2.print();\n module3.print();\n module4.print();\n \n System.out.println(\"Final mark: \" + finalMark + \".\");\n }", "public static void main(String[] args) {\n String words = \"coding:java:selenium:python\";\n String[] splitWords = words.split(\":\");\n System.out.println(Arrays.toString(splitWords));\n System.out.println(\"Length of Array - \" +splitWords.length);\n\n for (String each:splitWords) {\n System.out.println(each);\n\n }\n // How many words in your sentence\n // Most popular interview questions\n // 0 1 2 3 4 5\n String sentence = \"Productive study is makes you motivated\";\n String[] wordsInSentence = sentence.split(\" \");\n System.out.println(\"First words: \" +wordsInSentence[0]);\n System.out.println(\"First words: \" +sentence.split(\" \")[5]);\n System.out.println(\"Number of words in sentence: \" + wordsInSentence.length);\n\n // print all words in separate line\n for (String each:wordsInSentence) {\n System.out.println(each);\n }\n\n\n\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\tList<Paragraph> paragraphs = new ArrayList<Paragraph>();\n\t\tList<Paragraph> paragraphsWithNoSentences = new ArrayList<Paragraph>();\n\t\t\n\t\tScanner sc = null, sc1 = null;\n\t\ttry {\n\t\t\tsc = new Scanner(new File(\"testsearchtext.txt\"));\n\t\t\tsc1 = new Scanner(new File(\"testsearchentity.txt\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsc.useDelimiter(\"[.]\");\n\t\tsc1.useDelimiter(\"[|]\");\n\t\t\n\t\tList<Sentence> sentences = new ArrayList<Sentence>();\n\t\tint sCount = 0;\n\t\tint pCount = 0;\n\t\twhile(sc.hasNext()){\n\t\t\tString temp = sc.next().trim();\n\n\t\t\tif(sCount > 0 && (sCount%10 == 0 || !sc.hasNext())){\n\t\t\t\tParagraph p = new Paragraph(pCount);\n\t\t\t\tparagraphsWithNoSentences.add(p);\n\t\t\t\t\n\t\t\t\tp = new Paragraph(pCount);\n\t\t\t\tp.setSentences(sentences);\n\t\t\t\tparagraphs.add(p);\n\t\t\t\tpCount++;\n\t\t\t\t\n\t\t\t\tsentences = new ArrayList<Sentence>();\n\t\t\t}\n\t\t\t\n\t\t\tif(!temp.equals(\"\"))\n\t\t\t\tsentences.add(new Sentence((sCount%10), temp));\n\t\t\t\n\t\t\tsCount++;\n\t\t}\n\t\t\n\t\tList<Entity> entities = new ArrayList<Entity>();\n\t\tint currType = -1; \n\t\twhile(sc1.hasNext()){\n\t\t\tString temp = sc1.next().trim();\n\t\t\tif(temp.equals(\"place\")){currType = Entity.PLACE;} else\n\t\t\tif(temp.equals(\"url\")){currType = Entity.URL;} else\n\t\t\tif(temp.equals(\"email\")){currType = Entity.EMAIL;} else\n\t\t\tif(temp.equals(\"address\")){currType = Entity.ADDRESS;} \n\t\t\telse{\n\t\t\t\tentities.add(new Entity(currType, temp));\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSource s = new Source(\"testsearchtext.txt\", \"testsearchtext.txt\");\n\t\tpt1 = new ProcessedText(s, paragraphs, null); \n\t\t\n\t\ts = new Source(\"testsearchtext1.txt\", \"testsearchtext1.txt\");\n\t\tpt2 = new ProcessedText(s, paragraphsWithNoSentences, null); \n\t\t\n\t\tpt3 = new ProcessedText();\n\t\tpt3.setParagraphs(paragraphs);\n\t\t\n\t\tpt4 = new ProcessedText();\n\t\ts = new Source(\"testsearchtext2.txt\", \"testsearchtext2.txt\");\n\t\tpt4.setMetadata(s);\n\t\t\n\t\ts = new Source(\"testsearchtext3.txt\", \"testsearchtext3.txt\");\n\t\tpt5 = new ProcessedText(s, paragraphs, entities); \n\t\t\n\t\ts = new Source(\"testsearchtext4.txt\", \"testsearchtext4.txt\");\n\t\tpt6 = new ProcessedText(s, null, entities); \n\t}", "public void printStudents()\n {\n for(Student s : students)\n System.out.println(s);\n }", "public void printOut(){\n\t\tSystem.out.println(\"iD: \" + this.getiD());\n\t\tSystem.out.println(\"Titel: \" + this.getTitel());\n\t\tSystem.out.println(\"Produktionsland: \" + this.getProduktionsLand());\n\t\tSystem.out.println(\"Filmlaenge: \" + this.getFilmLaenge());\n\t\tSystem.out.println(\"Originalsprache: \" + this.getOriginalSprache());\n\t\tSystem.out.println(\"Erscheinungsjahr: \" + this.getErscheinungsJahr());\n\t\tSystem.out.println(\"Altersfreigabe: \" + this.getAltersFreigabe());\n\t\tif(this.kameraHauptperson != null) {\n\t\t\tSystem.out.println( \"Kameraperson: \" + this.getKameraHauptperson().toString() );\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println( \"Keine Kameraperson vorhanden \");\n\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tif ( this.listFilmGenre != null) {\n\t\t\tfor( FilmGenre filmGenre: this.listFilmGenre ){\n\t\t\t\tSystem.out.println(\"Filmgenre: \" + filmGenre);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Person darsteller: this.listDarsteller ){\n\t\t\tSystem.out.println(\"Darsteller: \" + darsteller);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Person synchronSpr: this.listSynchronsprecher ){\n\t\t\tSystem.out.println(\"synchro: \" + synchronSpr);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Person regi: this.listRegisseure ){\n\t\t\tSystem.out.println(\"regi: \" + regi);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Musikstueck mstk: this.listMusickstuecke ){\n\t\t\tSystem.out.println(\"Musikstueck: \" + mstk);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tSystem.out.println(\"Datentraeger: \" + this.getDatentraeger());\n\t\tSystem.out.println(\"----------------------------\");\n\t}", "public void print() {\n for (int i=0; i<lines.size(); i++)\n {\n System.out.println(lines.get(i));\n }\n }", "public static void main(String[] args) {\n\t\tStringTokenizer strToken = new StringTokenizer(\"Hello, my name is Vitaly\", \", \", true);\n\t\twhile(strToken.hasMoreElements()){\n\t\t\tSystem.out.println(\"\\\"\" + strToken.nextToken() + \"\\\"\");\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\tstrToken = new StringTokenizer(\"Hello, my name is Vitali\", \", \", false);\n\t\twhile(strToken.hasMoreElements()){\n\t\t\tSystem.out.println(\"\\\"\" + strToken.nextToken() + \"\\\"\");\n\t\t}\n\t}", "public static String getAllSentences(String username) {\r\n\t\t\r\n\t\tSentence s = null;\r\n\t\t\r\n\t\t// Gets all the sentences\r\n\t\tResponse res= ServicesLocator.getCentric1Connection().path(\"sentence\").request().accept(MediaType.APPLICATION_JSON).get();\r\n\t\t\r\n\t\t// Checks the response code and prints the text\r\n\t\tif(res.getStatus()==Response.Status.OK.getStatusCode()) {\r\n\t\t\ts=res.readEntity(Sentence.class);\r\n\t\t\treturn s.getText();\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn \"An unexpected error occured\";\r\n\t\t}\r\n\t}", "public void printStudentInfo(){\r\n System.out.println(\"Name: \" + getName());\r\n System.out.println(\"Student Id: \" + getId());\r\n printMarks();\r\n System.out.println(\"\\nAverage \" + getAverage() + \"%\");\r\n printNumberOfCoursesInEachLetterGradeCategory();\r\n }", "public void print() {\n\t\tSystem.out.println(word0 + \" \" + word1 + \" \" + similarity);\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\n Scanner readFile = new Scanner(new File(\"sentences.txt\"));\n \n //Boolean to make sure parameters fit the finalized tokens\n boolean okay = true; \n \n while (readFile.hasNext()) {\n Stemmer s = new Stemmer();\n String token = readFile.next();\n okay = true;\n \n //Section to ensure no numerics\n if (token.contains(\"1\") || token.contains(\"2\"))\n okay = false;\n else if (token.contains(\"3\")||token.contains(\"4\"))\n okay = false;\n else if (token.contains(\"5\")||token.contains(\"6\"))\n okay = false;\n else if (token.contains(\"7\")||token.contains(\"8\"))\n okay = false;\n else if (token.contains(\"9\")||token.contains(\"0\"))\n okay = false;\n else {\n \n //remove characters\n token = token.replace(\"\\,\", \" \");\n token = token.replace(\"\\.\", \" \");\n token = token.replace(\"\\\"\", \" \");\n token = token.replace(\"\\(\", \" \");\n token = token.replace(\"\\)\", \" \");\n token = token.replace(\"'s\", \" \");\n token = token.trim();\n token = token.toLowerCase();\n }\n \n //Giant hard coded section to remove numerics\n if (token.compareTo(\"a\")==0)\n okay=false;\n if (token.compareTo(\"able\")==0)\n okay=false;\n if (token.compareTo(\"about\")==0)\n okay=false;\n if (token.compareTo(\"across\")==0)\n okay=false;\n if (token.compareTo(\"after\")==0)\n okay=false;\n if (token.compareTo(\"all\")==0)\n okay=false;\n if (token.compareTo(\"almost\")==0)\n okay=false;\n if (token.compareTo(\"also\")==0)\n okay=false;\n if (token.compareTo(\"am\")==0)\n okay=false;\n if (token.compareTo(\"among\")==0)\n okay=false;\n if (token.compareTo(\"an\")==0)\n okay=false;\n if (token.compareTo(\"and\")==0)\n okay=false;\n if (token.compareTo(\"any\")==0)\n okay=false;\n if (token.compareTo(\"are\")==0)\n okay=false;\n if (token.compareTo(\"as\")==0)\n okay=false;\n if (token.compareTo(\"at\")==0)\n okay=false;\n if (token.compareTo(\"be\")==0)\n okay=false;\n if (token.compareTo(\"because\")==0)\n okay=false;\n if (token.compareTo(\"been\")==0)\n okay=false;\n if (token.compareTo(\"but\")==0)\n okay=false;\n if (token.compareTo(\"by\")==0)\n okay=false;\n if (token.compareTo(\"can\")==0)\n okay=false;\n if (token.compareTo(\"cannot\")==0)\n okay=false;\n if (token.compareTo(\"could\")==0)\n okay=false;\n if (token.compareTo(\"dear\")==0)\n okay=false;\n if (token.compareTo(\"did\")==0)\n okay=false;\n if (token.compareTo(\"do\")==0)\n okay=false;\n if (token.compareTo(\"does\")==0)\n okay=false;\n if (token.compareTo(\"either\")==0)\n okay=false;\n if (token.compareTo(\"else\")==0)\n okay=false;\n if (token.compareTo(\"ever\")==0)\n okay=false;\n if (token.compareTo(\"every\")==0)\n okay=false;\n if (token.compareTo(\"for\")==0)\n okay=false;\n if (token.compareTo(\"from\")==0)\n okay=false;\n if (token.compareTo(\"get\")==0)\n okay=false;\n if (token.compareTo(\"got\")==0)\n okay=false;\n if (token.compareTo(\"had\")==0)\n okay=false;\n if (token.compareTo(\"has\")==0)\n okay=false;\n if (token.compareTo(\"have\")==0)\n okay=false;\n if (token.compareTo(\"he\")==0)\n okay=false;\n if (token.compareTo(\"her\")==0)\n okay=false;\n if (token.compareTo(\"hers\")==0)\n okay=false;\n if (token.compareTo(\"him\")==0)\n okay=false;\n if (token.compareTo(\"his\")==0)\n okay=false;\n if (token.compareTo(\"how\")==0)\n okay=false;\n if (token.compareTo(\"however\")==0)\n okay=false;\n if (token.compareTo(\"i\")==0)\n okay=false;\n if (token.compareTo(\"if\")==0)\n okay=false;\n if (token.compareTo(\"in\")==0)\n okay=false;\n if (token.compareTo(\"into\")==0)\n okay=false;\n if (token.compareTo(\"is\")==0)\n okay=false;\n if (token.compareTo(\"it\")==0)\n okay=false;\n if (token.compareTo(\"its\")==0)\n okay=false;\n if (token.compareTo(\"just\")==0)\n okay=false;\n if (token.compareTo(\"least\")==0)\n okay=false;\n if (token.compareTo(\"let\")==0)\n okay=false;\n if (token.compareTo(\"like\")==0)\n okay=false;\n if (token.compareTo(\"likely\")==0)\n okay=false;\n if (token.compareTo(\"may\")==0)\n okay=false;\n if (token.compareTo(\"me\")==0)\n okay=false;\n if (token.compareTo(\"might\")==0)\n okay=false;\n if (token.compareTo(\"most\")==0)\n okay=false;\n if (token.compareTo(\"must\")==0)\n okay=false;\n if (token.compareTo(\"my\")==0)\n okay=false;\n if (token.compareTo(\"neither\")==0)\n okay=false;\n if (token.compareTo(\"no\")==0)\n okay=false;\n if (token.compareTo(\"nor\")==0)\n okay=false;\n if (token.compareTo(\"not\")==0)\n okay=false;\n if (token.compareTo(\"of\")==0)\n okay=false;\n if (token.compareTo(\"off\")==0)\n okay=false;\n if (token.compareTo(\"often\")==0)\n okay=false;\n if (token.compareTo(\"on\")==0)\n okay=false;\n if (token.compareTo(\"only\")==0)\n okay=false;\n if (token.compareTo(\"or\")==0)\n okay=false;\n if (token.compareTo(\"other\")==0)\n okay=false;\n if (token.compareTo(\"our\")==0)\n okay=false;\n if (token.compareTo(\"own\")==0)\n okay=false;\n if (token.compareTo(\"rather\")==0)\n okay=false;\n if (token.compareTo(\"said\")==0)\n okay=false;\n if (token.compareTo(\"say\")==0)\n okay=false;\n if (token.compareTo(\"says\")==0)\n okay=false;\n if (token.compareTo(\"she\")==0)\n okay=false;\n if (token.compareTo(\"should\")==0)\n okay=false;\n if (token.compareTo(\"since\")==0)\n okay=false;\n if (token.compareTo(\"so\")==0)\n okay=false;\n if (token.compareTo(\"some\")==0)\n okay=false;\n if (token.compareTo(\"than\")==0)\n okay=false;\n if (token.compareTo(\"that\")==0)\n okay=false;\n if (token.compareTo(\"the\")==0)\n okay=false;\n if (token.compareTo(\"their\")==0)\n okay=false;\n if (token.compareTo(\"them\")==0)\n okay=false;\n if (token.compareTo(\"then\")==0)\n okay=false;\n if (token.compareTo(\"there\")==0)\n okay=false;\n if (token.compareTo(\"these\")==0)\n okay=false;\n if (token.compareTo(\"they\")==0)\n okay=false;\n if (token.compareTo(\"this\")==0)\n okay=false;\n if (token.compareTo(\"tis\")==0)\n okay=false;\n if (token.compareTo(\"to\")==0)\n okay=false;\n if (token.compareTo(\"too\")==0)\n okay=false;\n if (token.compareTo(\"twas\")==0)\n okay=false;\n if (token.compareTo(\"us\")==0)\n okay=false;\n if (token.compareTo(\"wants\")==0)\n okay=false;\n if (token.compareTo(\"was\")==0)\n okay=false;\n if (token.compareTo(\"we\")==0)\n okay=false;\n if (token.compareTo(\"were\")==0)\n okay=false;\n if (token.compareTo(\"what\")==0)\n okay=false;\n if (token.compareTo(\"when\")==0)\n okay=false;\n if (token.compareTo(\"where\")==0)\n okay=false;\n if (token.compareTo(\"which\")==0)\n okay=false;\n if (token.compareTo(\"while\")==0)\n okay=false;\n if (token.compareTo(\"who\")==0)\n okay=false;\n if (token.compareTo(\"whom\")==0)\n okay=false;\n if (token.compareTo(\"why\")==0)\n okay=false;\n if (token.compareTo(\"will\")==0)\n okay=false;\n if (token.compareTo(\"with\")==0)\n okay=false;\n if (token.compareTo(\"would\")==0)\n okay=false;\n if (token.compareTo(\"yet\")==0)\n okay=false;\n if (token.compareTo(\"you\")==0)\n okay=false;\n if (token.compareTo(\"your\")==0)\n okay=false;\n \n //Stemming process\n if(okay){\n s.add(token.toCharArray(),token.length());\n s.stem();\n token = s.toString();\n }\n \n //to make sure there are no duplicates\n if (tokenList.contains(token))\n okay = false;\n \n //Finalizing tokens\n if (okay)\n tokenList.add(token);\n \n\n }\n //System.out.println(i);\n System.out.println(tokenList.size());\n System.out.println(tokenList);\n readFile.close();\n \n Scanner readFile2 = new Scanner(new File(\"sentences.txt\"));\n \n \n //intializing TDMatrix\n int[][] tdm = new int[46][tokenList.size()];\n int i = 0;\n int j = 0;\n \n while (i<46){\n j=0;\n while (j < tokenList.size()){\n tdm[i][j]=0;\n j++;\n }\n i++;\n }\n \n String str;\n i=0;\n while (readFile2.hasNextLine()) {\n str=readFile2.nextLine();\n \n j=0;\n while (j<tokenList.size()){\n while ((str.contains(tokenList.get(j)))){\n tdm[i][j]++;\n str = str.replaceFirst(tokenList.get(j), \"***\");\n }\n j++;\n }\n \n i++;\n }\n \n i=0;\n while (i<46){\n j=0;\n while (j<tokenList.size()){\n System.out.print(tdm[i][j] + \" \");\n j++;\n }\n System.out.println(\"\");\n i++;\n }\n \n readFile.close();\n }", "public String printSummary(){\n String ans=\"\";\n for(Sentence sentence : contentSummary){\n //tv_output.setText(sentence.value);\n ans+=sentence.value + \".\";\n }\n return ans;\n }", "void printData()\n\t{\n\t\tint totalNumberofComments = comments.size();\n\t\tint videoHappyCommentCount = 0;\n\t\tint videoSadCommentCount = 0;\n\n\t\tfor (String comment : comments)\n\t\t{\n\t\t\tint sadWordsInComment = retrieveNumberOfSadKeywords(comment);\n\t\t\tint happyWordsInComment = retrieveNumberOfHappyKeywords(comment);\n\t\t\tString generalSentiment = null;\n\n\t\t\tgeneralSentiment = (sadWordsInComment >= happyWordsInComment) ? \"sad\"\n\t\t\t\t\t: \"happy\";\n\t\t\tSystem.out.println(\"_________________________________________________________________\");\n\t\t\tSystem.out.println(comment);\n\t\t\tSystem.out.println(\"From a sample size of \" + totalNumberofComments\n\t\t\t\t\t+ \" persons, \" + \"\\n\" + \"This sentence is mostly \"\n\t\t\t\t\t+ generalSentiment);\n\t\t\tSystem.out.println(\"It contained \" + happyWordsInComment\n\t\t\t\t\t+ \" happy keywords and \" + sadWordsInComment\n\t\t\t\t\t+ \" sad keywords\");\n\t\t\tSystem.out.println(\"_________________________________________________________________\");\n\t\t\tif (generalSentiment.equalsIgnoreCase(\"sad\"))\n\t\t\t{\n\t\t\t\tif(sadWordsInComment > 0)\n\t\t\t\t{\n\t\t\t\t\tvideoSadCommentCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (generalSentiment.equalsIgnoreCase(\"happy\"))\n\t\t\t{\n\t\t\t\tif(happyWordsInComment > 0)\n\t\t\t\t{\n\t\t\t\t\tvideoHappyCommentCount++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tString videoFeelingCommentary = \"\";\n\t\tif(videoHappyCommentCount > videoSadCommentCount)\n\t\t{\n\t\t\tvideoFeelingCommentary = \"The general feelings towards this video were happy\";\n\t\t}\n\t\telse if(videoHappyCommentCount < videoSadCommentCount)\n\t\t{\n\t\t\tvideoFeelingCommentary = \"The general feelings towards this video were sad\";\n\t\t}\n\t\telse if(videoHappyCommentCount == videoSadCommentCount)\n\t\t{\n\t\t\tvideoFeelingCommentary = \"The general feelings towards this video were neutral\";\n\t\t}\n\t\t\n\t\tSystem.out.println(videoFeelingCommentary);\n\n\t}", "public void printTags() {\n String results = \"First 10 tags: \";\n for(int i = 0; i < 10; i++) {\n results += \"\\n\" + tags.get(i);\n }\n tagText.setText(results);\n }", "public void print() {\n\t\tint i = 1;\n\t\tfor (String s: g.keySet()) {\n\t\t\tSystem.out.print(\"Element: \" + i++ + \" \" + s + \" --> \");\n\t\t\tfor (String k: g.get(s)) {\n\t\t\t\tSystem.out.print(k + \" ### \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "void print() {\t\r\n\t\tIterator<Elemento> e = t.iterator();\r\n\t\twhile(e.hasNext())\r\n\t\t\te.next().print();\r\n\t}", "private void echo(Node n) {\n\t outputIndentation();\n\t int type = n.getNodeType();\n\n\t switch (type) {\n\t case Node.ATTRIBUTE_NODE:\n\t out.print(\"ATTR:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.CDATA_SECTION_NODE:\n\t out.print(\"CDATA:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.COMMENT_NODE:\n\t out.print(\"COMM:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.DOCUMENT_FRAGMENT_NODE:\n\t out.print(\"DOC_FRAG:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.DOCUMENT_NODE:\n\t out.print(\"DOC:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.DOCUMENT_TYPE_NODE:\n\t out.print(\"DOC_TYPE:\");\n\t printlnCommon(n);\n\t NamedNodeMap nodeMap = ((DocumentType)n).getEntities();\n\t indent += 2;\n\t for (int i = 0; i < nodeMap.getLength(); i++) {\n\t Entity entity = (Entity)nodeMap.item(i);\n\t echo(entity);\n\t }\n\t indent -= 2;\n\t break;\n\n\t case Node.ELEMENT_NODE:\n\t out.print(\"ELEM:\");\n\t printlnCommon(n);\n\n\t NamedNodeMap atts = n.getAttributes();\n\t indent += 2;\n\t for (int i = 0; i < atts.getLength(); i++) {\n\t Node att = atts.item(i);\n\t echo(att);\n\t }\n\t indent -= 2;\n\t break;\n\n\t case Node.ENTITY_NODE:\n\t out.print(\"ENT:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.ENTITY_REFERENCE_NODE:\n\t out.print(\"ENT_REF:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.NOTATION_NODE:\n\t out.print(\"NOTATION:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.PROCESSING_INSTRUCTION_NODE:\n\t out.print(\"PROC_INST:\");\n\t printlnCommon(n);\n\t break;\n\n\t case Node.TEXT_NODE:\n\t out.print(\"TEXT:\");\n\t printlnCommon(n);\n\t break;\n\n\t default:\n\t out.print(\"UNSUPPORTED NODE: \" + type);\n\t printlnCommon(n);\n\t break;\n\t }\n\n\t indent++;\n\t for (Node child = n.getFirstChild(); child != null;\n\t child = child.getNextSibling()) {\n\t echo(child);\n\t }\n\t indent--;\n\t}", "public void display() {\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tString str = vname + \" => \";\r\n\t\t\tVertex vtx = vces.get(vname);\r\n\r\n\t\t\tArrayList<String> nbrnames = new ArrayList<>(vtx.nbrs.keySet());\r\n\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\tstr += nbrname + \"[\" + vtx.nbrs.get(nbrname) + \"], \";\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(str + \".\");\r\n\t\t}\r\n\t}", "public void print()\n {\n System.out.println(name + \"\\n\");\n for(int iterator = 0; iterator < bookList.size() ; iterator++)\n {\n System.out.println((iterator+1) +\". \" + bookList.get(iterator).getTitle()+\" by \" +bookList.get(iterator).getAuthor()); \n }\n }", "public static void print(ArrayList<String> lexeme, ArrayList<String> token) {\r\n\t\tString Lexes = \"Lexemes\";\r\n\t\tString Tokens = \"Tokens\";\r\n\t\tString divider = \"**************************************\";\r\n\t\tSystem.out.printf(\"%-15s %-15s %n\", Lexes, Tokens);\r\n\t\tSystem.out.println(divider);\r\n\t\tfor (int i = 0; i < lexeme.size(); i++) {\r\n\t\t\tSystem.out.printf(\"%-15s %-15s %n\", lexeme.get(i), token.get(i));\r\n\t\t}\r\n\t\tSystem.out.println(divider);\r\n\t}", "public void print()\r\n\t\t{\r\n\t\tSystem.out.println(\"AETInteractions object\");\r\n\t\tSystem.out.println(\"Input interactions\");\r\n\t\t// stampa le interazioni di input\r\n\t\tif (getInIn() != null) getInIn().print();\r\n\t\tSystem.out.println(\"Output interactions\");\r\n\t\t// stampa le interazioni di output\r\n\t\tif (getOuIn() != null) getOuIn().print();\r\n\t\t}", "public void printTerm(){\n\n // print fac node\n this.fac.printFac();\n\n // check selection\n if (this.selection == 2) {\n\n // print \"*\"\n System.out.print(\" * \");\n\n // print term node\n this.term.printTerm();\n\n }\n\n }", "public void printRoutine()\n\t{\n\t\tfor (String name: vertices.keySet())\n\t\t{\n\t\t\tString value = vertices.get(name).toString();\n\t\t\tSystem.out.println(value);\n\t\t}\n\t}", "public static void printIndications() {\n\t\tSystem.out.println(\"\\n\" + \"Usage :\"\n\t\t\t\t+ \"\\n\\t\" + \"java -jar <jar-file> nodeScopeDirectoryPath windowSize\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"nodeScopeDirectoryPath is the path of the directory where the tagged corpus is located\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"windowSize is the size of the sliding window; it must be an integer (usually 2)\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"Other input parameters\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"the file containing the candidates terms must be located at src/main/resources/concepts/candidates.txt\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"the file containing the reference terms must be located at src/main/resources/concepts/reference_samples.txt\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"the file containing the stopwords must be located at src/main/resources/stopwords/stopwords_users.txt\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"Output parameters\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"nodeScopeDirectoryPath/output/pat_context.json\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"nodeScopeDirectoryPath/output/med_context.json\"\n\t\t\t\t+ \"\\n\\t\\t\" + \"nodeScopeDirectoryPath/output/frequency.json\"\n\t\t\t\t+ \"\\n\"\n\t\t\t\t);\n\t}", "public void printLiterature() {\n //print all books in articles\n if (books.size() != 0) {\n System.out.println(\"Books: \");\n for (Book b : books) {\n System.out.print(\"\\nName: \" + b.getName() + \", Author: \" + b.getAuthor()\n + \", Publishing House: \" + b.getPublishingHouse() + \", Publishing Year: \"\n + b.getPublishingYear());\n }\n } else {\n System.out.println(\"0 books in articles!\");\n }\n\n //print all journals in articles\n if (journals.size() != 0) {\n System.out.println(\"\\n\\nJournals: \");\n for (Journal j : journals) {\n System.out.print(\"\\nName: \" + j.getName() + \", Subjects: \" + j.getSubjects()\n + \", Publishing date: \" + j.getPublishingDate());\n }\n } else {\n System.out.println(\"0 journals in articles!\");\n }\n\n //print all yearbooks in articles\n if (yearbooks.size() != 0) {\n System.out.println(\"\\n\\nYearbooks: \");\n for (Yearbook y : yearbooks) {\n System.out.print(\"\\nName: \" + y.getName() + \", Subjects: \" + y.getSubjects()\n + \", Publishing House: \" + y.getPublishingHouse() + \", Publishing Year: \"\n + y.getPublishingYear());\n }\n } else {\n System.out.println(\"0 yearbooks in articles!\");\n }\n }", "public void disp(){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"------------------------------------------- \");\r\n\t\t\tSystem.out.println(\"Feature Model \");\r\n\t\t\tSystem.out.println(\"------------------------------------------- \");\r\n\t\t\tSystem.out.println(\"The mandatory feature:\");\r\n\t\t\tfor(int i = 0; i < this.mandatoryFeatures.size(); i++ ){\r\n\t\t\t\tthis.mandatoryFeatures.get(i).disp();\r\n\t\t\t}//for\r\n\t\t\tSystem.out.println(\"Optional features:\");\r\n\t\t\tfor(int i = 0; i < this.optionalFeatures.size(); i++ ){\r\n\t\t\t\tthis.optionalFeatures.get(i).disp();\r\n\t\t\t}//for\r\n\t\t\tfor(int i = 0; i < this.alternativeFeatureGroup.size(); i++ ){\r\n\t\t\t\tSystem.out.println(\"Alternative features:\");\r\n\t\t\t\tfor(int j = 0; j < alternativeFeatureGroup.get(i).getFeatures().size(); j++ ){\r\n\t\t\t\t\talternativeFeatureGroup.get(i).getFeatures().get(j).disp();\r\n\t\t\t\t}//for\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < this.orFeatureGroup.size(); i++ ){\r\n\t\t\t\tSystem.out.println(\"Or features:\");\r\n\t\t\t\tfor(int j = 0; j < orFeatureGroup.get(i).getFeatures().size(); j++ ){\r\n\t\t\t\t\torFeatureGroup.get(i).getFeatures().get(j).disp();\r\n\t\t\t\t}//for\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Constraints:\");\r\n\t\t\tfor(int i = 0; i < this.constraints.size(); i++ ){\r\n\t\t\t\tthis.constraints.get(i).disp();\r\n\t\t\t}//for\r\n\t\t}", "private void print( org.antlr.v4.tool.Grammar grammar, ParseTree tree, String indentStep, String indent )\n {\n if ( tree != null )\n {\n Object payload = tree.getPayload();\n if ( payload instanceof InterpreterRuleContext )\n {\n String ruleName = grammar.getRule( ((InterpreterRuleContext) payload).getRuleIndex() ).name;\n System.out.println( indent + ruleName );\n }\n else\n {\n System.out.println( indent + \"\\\"\" + tree.getText() + \"\\\"\" );\n }\n for ( int i = 0; i <= tree.getChildCount(); i++ )\n {\n print( grammar, tree.getChild( i ), indentStep, indent + indentStep );\n }\n }\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tString[] testSentence = new String[]{\r\n\t\t\t\t\"西三旗硅谷先锋小区半地下室出租,便宜可合租硅谷工信处女干事每月经过下属科室都要亲口交代24口交换机等技术性器件的安装工作\",\r\n\t\t\t\t\"这是一个伸手不见五指的黑夜。我叫孙悟空,我爱北京,我爱Python和C++。\",\r\n\t\t\t \"我不喜欢日本和服。\",\r\n\t\t\t \"雷猴回归人间。\",\r\n\t\t\t \"工信处女干事每月经过下属科室都要亲口交代24口交换机等技术性器件的安装工作\",\r\n\t\t\t \"我需要廉租房\",\r\n\t\t\t \"永和服装饰品有限公司\",\r\n\t\t\t \"我爱北京天安门\",\r\n\t\t\t \"abc\",\r\n\t\t\t \"隐马尔可夫\",\r\n\t\t\t \"雷猴是个好网站\",\r\n\t\t\t \"“Microsoft”一词由“MICROcomputer(微型计算机)”和“SOFTware(软件)”两部分组成\",\r\n\t\t\t \"草泥马和欺实马是今年的流行词汇\",\r\n\t\t\t \"伊藤洋华堂总府店\",\r\n\t\t\t \"中国科学院计算技术研究所\",\r\n\t\t\t \"罗密欧与朱丽叶\",\r\n\t\t\t \"我购买了道具和服装\",\r\n\t\t\t \"PS: 我觉得开源有一个好处,就是能够敦促自己不断改进,避免敞帚自珍\",\r\n\t\t\t \"湖北省石首市\",\r\n\t\t\t \"湖北省十堰市\",\r\n\t\t\t \"总经理完成了这件事情\",\r\n\t\t\t \"电脑修好了\",\r\n\t\t\t \"做好了这件事情就一了百了了\",\r\n\t\t\t \"人们审美的观点是不同的\",\r\n\t\t\t \"我们买了一个美的空调\",\r\n\t\t\t \"线程初始化时我们要注意\",\r\n\t\t\t \"一个分子是由好多原子组织成的\",\r\n\t\t\t \"祝你马到功成\",\r\n\t\t\t \"他掉进了无底洞里\",\r\n\t\t\t \"中国的首都是北京\",\r\n\t\t\t \"孙君意\",\r\n\t\t\t \"外交部发言人马朝旭\",\r\n\t\t\t \"领导人会议和第四届东亚峰会\",\r\n\t\t\t \"在过去的这五年\",\r\n\t\t\t \"还需要很长的路要走\",\r\n\t\t\t \"60周年首都阅兵\",\r\n\t\t\t \"你好人们审美的观点是不同的\",\r\n\t\t\t \"买水果然后去世博园\",\r\n\t\t\t \"但是后来我才知道你是对的\",\r\n\t\t\t \"存在即合理\",\r\n\t\t\t \"的的的的的在的的的的就以和和和\",\r\n\t\t\t \"I love你,不以为耻,反以为rong\",\r\n\t\t\t \"hello你好人们审美的观点是不同的\",\r\n\t\t\t \"很好但主要是基于网页形式\",\r\n\t\t\t \"hello你好人们审美的观点是不同的\",\r\n\t\t\t \"为什么我不能拥有想要的生活\",\r\n\t\t\t \"后来我才\",\r\n\t\t\t \"此次来中国是为了\",\r\n\t\t\t \"使用了它就可以解决一些问题\",\r\n\t\t\t \",使用了它就可以解决一些问题\",\r\n\t\t\t \"其实使用了它就可以解决一些问题\",\r\n\t\t\t \"好人使用了它就可以解决一些问题\",\r\n\t\t\t \"是因为和国家\",\r\n\t\t\t \"老年搜索还支持\",\r\n\t\t\t \"干脆就把那部蒙人的闲法给废了拉倒!RT @laoshipukong : 27日,全国人大常委会第三次审议侵权责任法草案,删除了有关医疗损害责任“举证倒置”的规定。在医患纠纷中本已处于弱势地位的消费者由此将陷入万劫不复的境地。 \",\r\n\t\t\t \"他说的确实在理\",\r\n\t\t\t \"长春市长春节讲话\",\r\n\t\t\t \"结婚的和尚未结婚的\",\r\n\t\t\t \"结合成分子时\",\r\n\t\t\t \"旅游和服务是最好的\",\r\n\t\t\t \"这件事情的确是我的错\",\r\n\t\t\t \"供大家参考指正\",\r\n\t\t\t \"哈尔滨政府公布塌桥原因\",\r\n\t\t\t \"我在机场入口处\",\r\n\t\t\t \"邢永臣摄影报道\",\r\n\t\t\t \"BP神经网络如何训练才能在分类时增加区分度?\",\r\n\t\t\t \"南京市长江大桥\",\r\n\t\t\t \"应一些使用者的建议,也为了便于利用NiuTrans用于SMT研究\",\r\n\t\t\t \"长春市长春药店\",\r\n\t\t\t \"邓颖超生前最喜欢的衣服\",\r\n\t\t\t \"胡锦涛是热爱世界和平的政治局常委\",\r\n\t\t\t \"程序员祝海林和朱会震是在孙健的左面和右面, 范凯在最右面.再往左是李松洪\",\r\n\t\t\t \"一次性交多少钱\",\r\n\t\t\t \"两块五一套,三块八一斤,四块七一本,五块六一条\",\r\n\t\t\t \"小和尚留了一个像大和尚一样的和尚头\",\r\n\t\t\t \"我是中华人民共和国公民;我爸爸是共和党党员; 地铁和平门站\",\r\n\t\t\t \"张晓梅去人民医院做了个B超然后去买了件T恤\",\r\n\t\t\t \"AT&T是一件不错的公司,给你发offer了吗?\",\r\n\t\t\t \"C++和c#是什么关系?11+122=133,是吗?PI=3.14159\",\r\n\t\t\t \"你认识那个和主席握手的的哥吗?他开一辆黑色的士。\",\r\n\t\t\t \"枪杆子中出政权\",\r\n\t\t\t \"张三风同学走上了不归路\",\r\n\t\t\t \"阿Q腰间挂着BB机手里拿着大哥大,说:我一般吃饭不AA制的。\",\r\n\t\t\t \"在1号店能买到小S和大S八卦的书,还有3D电视。\"\r\n\r\n\t\t};\r\n\t\t\r\n\t\tSegment app = new Segment();\r\n\t\t\r\n\t\tfor(String sentence : testSentence)\r\n\t\t\tSystem.out.println(app.cut(sentence));\r\n\t}", "public void print() {\n System.out.println(\"Person of name \" + name);\n }", "public void tree()\n\t{\n\t\tIterable<Position<FileElement>> toPrint = fileSystem.PreOrder();\n\t\tfor (Position<FileElement> p : toPrint)\n\t\t{\n\t\t\tint depth = fileSystem.getDepth(p);\n\t\t\tfor (int i = 0; i < depth; i++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tSystem.out.println(p.getValue());\n\t\t}\n\t}", "public void printSpayedOrNeutered(){\n System.out.println(\"Spayed or Neutered Dogs:\");\n ArrayList<Dog> dogsSpayedOrNeutered = dogsSpayedOrNeutered();\n for(Dog d : dogsSpayedOrNeutered){\n d.printInfo();\n }\n }", "public ArrayList<String> makeSentences(String text) {\n \t\t/*\n \t\t * Quick check so we're not trying to split up an empty\n \t\t * String. This only happens right before the user types\n \t\t * at the end of a document and we don't have anything to\n \t\t * split, so return.\n \t\t */\n \t\tif (text.equals(\"\")) {\n \t\t\tArrayList<String> sents = new ArrayList<String>();\n \t\t\tsents.add(\"\");\n \t\t\treturn sents;\n \t\t}\n \t\t\n \t\t/**\n \t\t * Because the eosTracker isn't initialized until the TaggedDocument is,\n \t\t * it won't be ready until near the end of DocumentProcessor, in which\n \t\t * case we want to set it to the correct\n \t\t */\n \t\tthis.eosTracker = main.editorDriver.taggedDoc.eosTracker;\n \t\tthis.editorDriver = main.editorDriver;\n \t\t\n \t\tArrayList<String> sents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES);\n \t\tArrayList<String> finalSents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES);\n \t\tboolean mergeNext = false;\n \t\tboolean mergeWithLast = false;\n \t\tboolean forceNoMerge = false;\n \t\tint currentStart = 1;\n \t\tint currentStop = 0;\n \t\tString temp;\n \n \t\t/**\n \t\t * replace unicode format characters that will ruin the regular\n \t\t * expressions (because non-printable characters in the document still\n \t\t * take up indices, but you won't know they're there untill you\n \t\t * \"arrow\" though the document and have to hit the same arrow twice to\n \t\t * move past a certain point. Note that we must use \"Cf\" rather than\n \t\t * \"C\". If we use \"C\" or \"Cc\" (which includes control characters), we\n \t\t * remove our newline characters and this screws up the document. \"Cf\"\n \t\t * is \"other, format\". \"Cc\" is \"other, control\". Using \"C\" will match\n \t\t * both of them.\n \t\t */\n \t\ttext = text.replaceAll(\"\\u201C\",\"\\\"\");\n \t\ttext = text.replaceAll(\"\\u201D\",\"\\\"\");\n \t\ttext = text.replaceAll(\"\\\\p{Cf}\",\"\");\n \n \t\tint lenText = text.length();\n \t\tint index = 0;\n \t\tint buffer = editorDriver.sentIndices[0];\n \t\tString safeString = \"\";\n \t\tMatcher abbreviationFinder = ABBREVIATIONS_PATTERN.matcher(text);\n \t\t\n \t\t//================ SEARCHING FOR ABBREVIATIONS ================\n \t\twhile (index < lenText-1 && abbreviationFinder.find(index)) {\n \t\t\tindex = abbreviationFinder.start();\n \t\t\t\n \t\t\ttry {\n \t\t\t\tint abbrevLength = index;\n \t\t\t\twhile (text.charAt(abbrevLength) != ' ') {\n \t\t\t\t\tabbrevLength--;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (ABBREVIATIONS.contains(text.substring(abbrevLength+1, index+1))) {\n \t\t\t\t\teosTracker.setIgnore(index+buffer, true);\n \t\t\t\t}\n \t\t\t} catch (Exception e) {}\n \t\t\t\n \t\t\tindex++;\n \t\t}\t\t\n \t\t\n \t\tMatcher sent = EOS_chars.matcher(text);\n \t\tboolean foundEOS = sent.find(currentStart); // xxx TODO xxx take this EOS character, and if not in quotes, swap it for a permanent replacement, and create and add an EOS to the calling TaggedDocument's eosTracker.\n \t\t\n \t\t/*\n \t\t * We want to check and make sure that the EOS character (if one was found) is not supposed to be ignored. If it is, we will act like we did not\n \t\t * find it. If there are multiple sentences with multiple EOS characters passed it will go through each to check, foundEOS will only be true if\n \t\t * an EOS exists in \"text\" that would normally be an EOS character and is not set to be ignored.\n \t\t */\n \t\t\n \t\tindex = 0;\n \t\tif (foundEOS) {\t\n \t\t\ttry {\n \t\t\t\twhile (index < lenText-1 && sent.find(index)) {\n \t\t\t\t\tindex = sent.start();\n \t\t\t\t\tif (!eosTracker.sentenceEndAtIndex(index+buffer)) {\n \t\t\t\t\t\tfoundEOS = false;\n \t\t\t\t\t} else {\n \t\t\t\t\t\tfoundEOS = true;\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\tindex++;\n \t\t\t\t}\n \t\t\t} catch (IllegalStateException e) {}\n \t\t}\n \t\t//We need to reset the Matcher for the code below\n \t\tsent = EOS_chars.matcher(text);\n \t\tsent.find(currentStart);\n \t\t\n \t\tMatcher sentEnd;\n \t\tMatcher citationFinder;\n \t\tboolean hasCitation = false;\n \t\tint charNum = 0;\n \t\tint lenTemp = 0;\n \t\tint lastQuoteAt = 0;\n \t\tint lastParenAt = 0;\n \t\tboolean foundQuote = false;\n \t\tboolean foundParentheses = false;\n \t\tboolean isSentence;\n \t\tboolean foundAtLeastOneEOS = foundEOS;\n \t\t\n \t\t/**\n \t\t * Needed otherwise when the user has text like below:\n \t\t * \t\tThis is my sentence one. This is \"My sentence?\" two. This is the last sentence.\n \t\t * and they begin to delete the EOS character as such:\n \t\t * \t\tThis is my sentence one. This is \"My sentence?\" two This is the last sentence.\n \t\t * Everything gets screwed up. This is because the operations below operate as expected only when there actually is an EOS character\n \t\t * at the end of the text, it expects it there in order to function properly. Now usually if there is no EOS character at the end it wouldn't\n \t\t * matter since the while loop and !foundAtLeastOneEOS conditional are executed properly, BUT as you can see the quotes, or more notably the EOS character inside\n \t\t * the quotes, triggers this initial test and thus the operation breaks. This is here just to make sure that does not happen.\n \t\t */\n \t\tString trimmedText = text.trim();\n \t\tint trimmedTextLength = trimmedText.length();\n \n \t\t//We want to make sure that if there is an EOS character at the end that it is not supposed to be ignored\n \t\tboolean EOSAtSentenceEnd = true;\n \t\tif (trimmedTextLength != 0) {\n \t\t\tEOSAtSentenceEnd = EOS.contains(trimmedText.substring(trimmedTextLength-1, trimmedTextLength)) && eosTracker.sentenceEndAtIndex(editorDriver.sentIndices[1]-1);\n \t\t} else {\n \t\t\tEOSAtSentenceEnd = false;\n \t\t}\n \t\t\n \t\t//Needed so that if we are deleting abbreviations like \"Ph.D.\" this is not triggered.\n \t\tif (!EOSAtSentenceEnd && (editorDriver.taggedDoc.watchForEOS == -1))\n \t\t\tEOSAtSentenceEnd = true;\n \n \t\twhile (foundEOS == true) {\n \t\t\tcurrentStop = sent.end();\n \t\t\t\n \t\t\t//We want to make sure currentStop skips over ignored EOS characters and stops only when we hit a true EOS character\n \t\t\ttry {\n \t\t\t\twhile (!eosTracker.sentenceEndAtIndex(currentStop+buffer-1) && currentStop != lenText) {\n \t\t\t\t\tsent.find(currentStop+1);\n \t\t\t\t\tcurrentStop = sent.end();\n \t\t\t\t}\n \t\t\t} catch (Exception e) {}\n \n \t\t\ttemp = text.substring(currentStart-1,currentStop);\n \t\t\tlenTemp = temp.length();\n \t\t\tlastQuoteAt = 0;\n \t\t\tlastParenAt = 0;\n \t\t\tfoundQuote = false;\n \t\t\tfoundParentheses = false;\n \t\t\t\n \t\t\tfor(charNum = 0; charNum < lenTemp; charNum++){\n \t\t\t\tif (temp.charAt(charNum) == '\\\"') {\n \t\t\t\t\tlastQuoteAt = charNum;\n \t\t\t\t\t\n \t\t\t\t\tif (foundQuote == true)\n \t\t\t\t\t\tfoundQuote = false;\n \t\t\t\t\telse\n \t\t\t\t\t\tfoundQuote = true;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (temp.charAt(charNum) == '(') {\n \t\t\t\t\tlastParenAt = charNum;\n \t\t\t\t\t\n \t\t\t\t\tif (foundParentheses)\n \t\t\t\t\t\tfoundParentheses = false;\n \t\t\t\t\telse\n \t\t\t\t\t\tfoundParentheses = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (foundQuote == true && ((temp.indexOf(\"\\\"\",lastQuoteAt+1)) == -1)) { // then we found an EOS character that shouldn't split a sentence because it's within an open quote.\n \t\t\t\tif ((currentStop = text.indexOf(\"\\\"\",currentStart +lastQuoteAt+1)) == -1) {\n \t\t\t\t\tcurrentStop = text.length(); // if we can't find a closing quote in the rest of the input text, then we assume the author forgot to put a closing quote, and act like it's at the end of the input text.\n \t\t\t\t}\n \t\t\t\telse{\n \t\t\t\t\tcurrentStop +=1;\n \t\t\t\t\tmergeNext=true;// the EOS character we are looking for is not in this section of text (section being defined as a substring of 'text' between two EOS characters.)\n \t\t\t\t}\n \t\t\t}\n \t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\n \t\t\tif (foundParentheses && ((temp.indexOf(\")\", lastParenAt+1)) == -1)) {\n \t\t\t\tif ((currentStop = text.indexOf(\")\", currentStart + lastParenAt + 1)) == -1)\n \t\t\t\t\tcurrentStop = text.length();\n \t\t\t\telse {\n \t\t\t\t\tcurrentStop += 1;\n \t\t\t\t\tmergeNext = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \n \t\t\tif (foundQuote) {\n \t\t\t\tsentEnd = SENTENCE_QUOTE.matcher(text);\t\n \t\t\t\tisSentence = sentEnd.find(currentStop-2); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).)\n \n \t\t\t\tif (isSentence == true) { // If it seems that the text looks like this: He said, \"Hello.\" Then she said, \"Hi.\" \n \t\t\t\t\t// Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, \"Hello.\")\n \t\t\t\t\tcurrentStop = text.indexOf(\"\\\"\",sentEnd.start())+1;\n \t\t\t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\t\tforceNoMerge = true;\n \t\t\t\t\tmergeNext = false;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (foundParentheses) {\n \t\t\t\tsentEnd = SENTENCE_PARENTHESES.matcher(text);\n \t\t\t\tisSentence = sentEnd.find(currentStop-2);\n \t\t\t\t\n \t\t\t\tif (isSentence == true) {\n \t\t\t\t\tcurrentStop = text.indexOf(\")\", sentEnd.start()) + 1;\n \t\t\t\t\tsafeString = text.substring(currentStart-1, currentStop);\n \t\t\t\t\tforceNoMerge = true;\n \t\t\t\t\tmergeNext = false;\n \t\t\t\t}\n \t\t\t}\n \n \t\t\t// now check to see if there is a CITATION after the sentence (doesn't just apply to quotes due to paraphrasing)\n \t\t\t// The rule -- at least as of now -- is if after the EOS mark there is a set of parenthesis containing either one word (name) or a name and numbers (name 123) || (123 name) || (123-456 name) || (name 123-456) || etc..\n \t\t\tcitationFinder = CITATION.matcher(text.substring(currentStop));\t\n \t\t\thasCitation = citationFinder.find(); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).)\n \t\t\t\n \t\t\tif (hasCitation == true) { // If it seems that the text looks like this: He said, \"Hello.\" Then she said, \"Hi.\" \n \t\t\t\t// Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, \"Hello.\")\n \t\t\t\tcurrentStop = text.indexOf(\")\",citationFinder.start()+currentStop)+1;\n \t\t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\tmergeNext = false;\n \t\t\t}\t\n \t\t\t\n \t\t\tif (mergeWithLast) {\n \t\t\t\tmergeWithLast=false;\n \t\t\t\tString prev=sents.remove(sents.size()-1);\n \t\t\t\tsafeString=prev+safeString;\n \t\t\t}\n \t\t\t\n \t\t\tif (mergeNext && !forceNoMerge) {//makes the merge happen on the next pass through\n \t\t\t\tmergeNext=false;\n \t\t\t\tmergeWithLast=true;\n \t\t\t} else {\n \t\t\t\tforceNoMerge = false;\n \t\t\t\tfinalSents.add(safeString);\n \t\t\t}\n \t\t\n \t\t\tsents.add(safeString);\n \t\t\t\n \t\t\t//// xxx xxx xxx return the safeString_subbedEOS too!!!!\n \t\t\tif (currentStart < 0 || currentStop < 0) {\n \t\t\t\tLogger.logln(NAME+\"Something went really wrong making sentence tokens.\", LogOut.STDERR);\n \t\t\t\tErrorHandler.fatalProcessingError(null);\n \t\t\t}\n \n \t\t\tcurrentStart = currentStop+1;\n \t\t\tif (currentStart >= lenText) {\n \t\t\t\tfoundEOS = false;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tfoundEOS = sent.find(currentStart);\n \t\t}\n \n \t\tif (!foundAtLeastOneEOS || !EOSAtSentenceEnd) {\n \t\t\tArrayList<String> wrapper = new ArrayList<String>(1);\n \t\t\twrapper.add(text);\n \t\t\treturn wrapper;\n \t\t}\n \t\t\n \t\treturn finalSents;\n \t}", "public static void main(String[] args) {\n\r\n\t\tWord word = new Word(\"Look,\");\r\n\t\tWord word2 = new Word(\" I was \");\r\n\t\tWord word3 = new Word(\"gonna go \");\r\n\t\tWord word4 = new Word(\"easy on\");\r\n\t\tWord word5 = new Word(\" you and \");\r\n\r\n\t\tSentence sent = new Sentence();\r\n\r\n\t\tsent.add(word);\r\n\t\tsent.add(word2);\r\n\t\tsent.add(word3);\r\n\t\tsent.add(word4);\r\n\t\tsent.add(word5);\r\n\r\n\t\tSystem.out.println(\"--------------\");\r\n\r\n\t\tText text = new Text(sent.sh());\r\n//\t\t\r\n//\t\ttext.headline(\"dfgsdsd\");\r\n//\t\t\r\n//\t\ttext.add(\"efwefw\");\r\n//\t\t\r\n//\t\tSystem.out.println(text.displayAll());\r\n\r\n\t\tLogic lg = new Logic(text.getText());\r\n\r\n\t\tlg.headline(\"fdsfdf\");\r\n\t\tlg.add(\"sfasfas\");\r\n\r\n\t\tSystem.out.println(lg.displayAll());\r\n\r\n\t}", "public void Print()\r\n {\r\n \t//A for loop that will cycle \"NumTimes\" times.\r\n \tfor (int I = 0; I < NumTimes; I++)\r\n \t\t//Printing out the \"Word\".\r\n \t\tSystem.out.println (Word);\r\n \t\r\n \t//Skipping a line between the data sets.\r\n \tSystem.out.println ();\r\n }", "@Override\n\tpublic void print() {\n\t\tSystem.out.print(\"\\nMSc. student:\\n\");\n\t\tsuper.print();\n\t}", "@Override\n\tpublic void print() {\n\t\tsuper.print();\n\t\tSystem.out.println(subjects);\n\t}", "private void print() {\n printInputMessage();\n printFrequencyTable();\n printCodeTable();\n printEncodedMessage();\n }", "public void display() {\n \n //Print the features representation\n System.out.println(\"\\nDENSE REPRESENTATION\\n\");\n \n //Print the header\n System.out.print(\"ID\\t\");\n for (short i = 0 ; i < dimension; i++) {\n System.out.format(\"%s\\t\\t\", i);\n }\n System.out.println();\n \n //Print all the instances\n for (Entry<String, Integer> entry : mapOfInstances.entrySet()) {\n System.out.format(\"%s\\t\", entry.getKey());\n for (int i = 0; i < vectorDimension(); i++) {\n //System.out.println(allFeatures.get(entry.getValue())[i]);\n System.out.format(\"%f\\t\", allValues.get(entry.getValue())[i]); \n }\n System.out.println();\n }\n }", "public void PrintMe() {\n\t\t/* AST NODE TYPE = AST EXP NIL */\n\t\t/**********************************/\n\t\tSystem.out.print(\"AST NODE: EXP_EXP\\n\");\n\n\t\t/*****************************/\n\t\t/* RECURSIVELY PRINT exp ... */\n\t\t/*****************************/\n\t\tif (exp != null) exp.PrintMe();\n\n\t\t/*********************************/\n\t\t/* Print to AST GRAPHIZ DOT file */\n\t\t/*********************************/\n\t\tAST_GRAPHVIZ.getInstance().logNode(\n\t\t\tSerialNumber,\n \"(exp)\");\n \n\t\t/****************************************/\n\t\t/* PRINT Edges to AST GRAPHVIZ DOT file */\n\t\t/****************************************/\n\t\tAST_GRAPHVIZ.getInstance().logEdge(SerialNumber, exp.SerialNumber);\n\n\t}", "@Override\n\tpublic void printStudent() {\n\t\tSystem.out.print(\"학번\\t국어\\t영어\\t수학\\n\");\n\t\tSystem.out.println(\"=\".repeat(60));\n\t\tint nSize = scoreList.size();\n\t\tfor(int i = 0 ; i < nSize ; i++) {\n\t\t\tScoreVO vo = new ScoreVO();\n\t\t\tSystem.out.print(vo.getNum() + \"\\t\");\n\t\t\tSystem.out.print(vo.getKor() + \"\\t\");\n\t\t\tSystem.out.print(vo.getEng() + \"\\t\");\n\t\t\tSystem.out.print(vo.getMath() + \"\\n\");\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "public void print()\n/* */ {\n/* 226 */ boolean emptyTarget = true;\n/* 227 */ Iterator it; if ((this.subjects != null) && (this.subjects.size() > 0)) {\n/* 228 */ System.out.println(\"\\nSubjects ---->\");\n/* 229 */ emptyTarget = false;\n/* 230 */ for (it = this.subjects.iterator(); it.hasNext();)\n/* 231 */ ((MatchList)it.next()).print();\n/* */ }\n/* 234 */ if ((this.resources != null) && (this.resources.size() > 0)) {\n/* 235 */ System.out.println((emptyTarget ? \"\\n\" : \"\") + \"Resources ---->\");\n/* 236 */ emptyTarget = false;\n/* 237 */ for (it = this.resources.iterator(); it.hasNext();)\n/* 238 */ ((MatchList)it.next()).print();\n/* */ }\n/* 241 */ if ((this.actions != null) && (this.actions.size() > 0)) {\n/* 242 */ System.out.println((emptyTarget ? \"\\n\" : \"\") + \"Actions ---->\");\n/* 243 */ emptyTarget = false;\n/* 244 */ for (it = this.actions.iterator(); it.hasNext();)\n/* 245 */ ((MatchList)it.next()).print();\n/* */ }\n/* 248 */ if ((this.environments != null) && (this.environments.size() > 0)) {\n/* 249 */ System.out.println((emptyTarget ? \"\\n\" : \"\") + \"Environments ---->\");\n/* 250 */ emptyTarget = false;\n/* 251 */ for (it = this.environments.iterator(); it.hasNext();) {\n/* 252 */ ((MatchList)it.next()).print();\n/* */ }\n/* */ }\n/* 255 */ if (emptyTarget) System.out.print(\"EMPTY\");\n/* */ }", "public void printString()\r\n\t\t{\r\n\t\t\tTreeNode previousTreeNode = null; //holds the previous node\r\n\t\t\tTreeNode currentTreeNode = null; //holds current node\r\n\r\n\t\t\tData currentData = head; //start at the head of our data which is a linked list\r\n\t\t\twhile (currentData != null) //while the currentData is not null\r\n\t\t\t{\r\n\t\t\t\tcurrentTreeNode = currentData.getLT(); //get the Less Than tree\r\n\t\t\t\tif (currentTreeNode != previousTreeNode)\r\n\t\t\t\t\tcurrentTreeNode.printString(); //print the Less Than tree\r\n\t\t\t\tpreviousTreeNode = currentTreeNode;\r\n\r\n\t\t\t\tcurrentData.getWord(); //get the current word\r\n\t\t\t\tSystem.out.printf(\"%-20s\", currentData.getWord()); //print the current word\r\n\t\t\t\tArrayList locations = currentData.getLocations(); //get the word's locations in the file\r\n\t\t\t\tfor (int i = 0; i < locations.size(); i++) //print all of those\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.printf(\" (%s,%s)\", ((Point) locations.get(i)).x, ((Point) locations.get(i)).y);\r\n\t\t\t\t\tif ((((i + 1) % 8) == 0) && ((i + 1) != locations.size())) //only print 8 items per line\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.printf(\"\\n%-20s\", \"\\\"\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(); //print a newline\r\n\r\n\t\t\t\tcurrentTreeNode = currentData.getGT(); //get the Greater Than tree\r\n\t\t\t\tif (currentTreeNode != previousTreeNode)\r\n\t\t\t\t\tcurrentTreeNode.printString(); //print the Greater Than tree\r\n\t\t\t\tpreviousTreeNode = currentTreeNode;\r\n\t\t\t\tcurrentData = currentData.nextData();\r\n\t\t\t}\r\n\t\t}", "public void printVertices() {\r\n\t\tfor (int i = 0; i < vertices.size(); i++)\r\n\t\t\tSystem.out.print(vertices.get(i).label);\r\n\t}", "public String printStory() {\r\n\t\tString output = \"\";\r\n\t\tboolean start = true;\r\n\t\tArrayList<String> list = null;\r\n\t\ttry {\r\n\t\t\tlist = load();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Load has failed.\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfor (String str : list) {\r\n\t\t\tif (start == true) { // if this is the first line passed in\r\n\t\t\t\toutput = output + str;\r\n\t\t\t\tstart = false;\r\n\t\t\t} else {\r\n\t\t\t\toutput = output + \" \" + str;\r\n\t\t\t\t// add this after the first story line has been passed in\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn output;\r\n\t}", "public static void printResults() {\n System.out.println(\" Results: \");\n Crawler.getKeyWordsHits().forEach((keyWord, hitsNumber) -> System.out.println(keyWord + \" : \" + hitsNumber + \";\"));\n System.out.println(\" Total hits: \" + Crawler.getTotalHits());\n\n }", "public void print()\r\n {\n if (getOccupants().length != 0)\r\n {\r\n \t// will use the print method in the person class\r\n getOccupants()[0].print();\r\n }\r\n else if (this.explored)\r\n {\r\n System.out.print(\"[ H ]\");\r\n }\r\n else\r\n {\r\n System.out.print(\"[ ]\");\r\n }\r\n\r\n }", "public void printList() {\n System.out.println(\"Disciplina \" + horario);\n System.out.println(\"Professor: \" + professor + \" sala: \" + sala);\n System.out.println(\"Lista de Estudantes:\");\n Iterator i = estudantes.iterator();\n while(i.hasNext()) {\n Estudante student = (Estudante)i.next();\n student.print();\n }\n System.out.println(\"Número de estudantes: \" + numberOfStudents());\n }", "public void print() {\r\n\t\tint size = list.size();\r\n\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"┌───────────────────────────┐\");\r\n\t\tSystem.out.println(\"│ \t\t\t성적 출력 \t\t │\");\r\n\t\tSystem.out.println(\"└───────────────────────────┘\");\r\n\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\r\n\t\t\tExam exam = list.get(i);\r\n\t\t\tint kor = exam.getKor();\r\n\t\t\tint eng = exam.getEng();\r\n\t\t\tint math = exam.getMath();\r\n\r\n\t\t\tint total = exam.total();// kor + eng + math;\r\n\t\t\tfloat avg = exam.avg();// total / 3.0f;\r\n\t\t\tSystem.out.printf(\"성적%d > 국어:%d, 영어:%d, 수학:%d\", i + 1, kor, eng, math);\r\n\t\t\tonPrint(exam);\r\n\t\t\tSystem.out.printf(\"총점:%d, 평균:%.4f\\n\", total, avg);\r\n\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"─────────────────────────────\");\r\n\r\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\t\tString modelFilePath = \"java//opennlpmodels//en-sent.bin\";\n\t\tInputStream modelIn = new FileInputStream(modelFilePath);\n\n\t\ttry {\n\t\t SentenceModel model = new SentenceModel(modelIn);\n\t\t SentenceDetectorME sentenceDetector = new SentenceDetectorME(model);\n\t\t String sentences[] = sentenceDetector.sentDetect(\" First sentence. Second B.S. U.S. sentence. \");\n\t\t \n\t\t for (String sent : sentences ) {\n\t\t\t System.out.println(sent);\n\t\t }\n\t\t \n\t\t}\n\t\tcatch (IOException e) {\n\t\t e.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t if (modelIn != null) {\n\t\t try {\n\t\t modelIn.close();\n\t\t }\n\t\t catch (IOException e) {\n\t\t }\n\t\t }\n\t\t}\n\t}", "public void displayTags() {\n System.out.println (\"tags = \" + tags);\n }", "@Test\n public void printAllWords() {\n // TODO\n }", "public static void printStudentInfo() {\n\t\tfor (Student student : StudentList)\n\t\t\tSystem.out.println(\"Name: \" + student.getName() + \" Matric Number: \" + student.getMatricNo() + \" Degree:\"\n\t\t\t\t\t+ student.getDegree());\n\t}", "private static void debug()\r\n\t{\r\n\t\tSystem.out.println(\"Keywords:\");\r\n\t\tfor(String word : keywords)\r\n\t\t{\r\n\t\t\tSystem.out.println(word);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"-----------------\");\r\n\t\tSystem.out.println();\r\n\t\tSharedLink.debugLinks();\r\n\t\t\r\n\t\tSystem.out.println(\"-----------------\");\r\n\t\tSystem.out.println();\r\n\t\tSharedPage.debugPages();\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t}", "public void printQuestions()\r\n\t{\r\n\t\tfor(int i = 0; i < questions.size(); i++)\r\n\t\t{\r\n\t\t\tString q = questions.get(i).toString();\r\n\t\t\tSystem.out.println( (i+1) + \". \" + q);\r\n\t\t}\r\n\t}", "static private void printDot(DecisionTree tree) {\n\tSystem.out.println((new DecisionTreeToDot(tree)).produce());\n }", "static private void printDot(DecisionTree tree) {\n\tSystem.out.println((new DecisionTreeToDot(tree)).produce());\n }", "public static void printMeny(){\n\t\tSystem.out.println(\"1. Registrer en person\");\n\t\tSystem.out.println(\"2. Print personen\");\n\t}", "public void print() {\r\n\t\tSystem.out.print(getUID());\r\n\t\tSystem.out.print(getTITLE());\r\n\t\tSystem.out.print(getNOOFCOPIES());\r\n\t}", "public void print()\r\n\t{\r\n\t\tSystem.out.println(\"Method name: \" + name);\r\n\t\tSystem.out.println(\"Return type: \" + returnType);\r\n\t\tSystem.out.println(\"Modifiers: \" + modifiers);\r\n\r\n\t\tif(exceptions != null)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Exceptions: \" + exceptions[0]);\r\n\t\t\tfor(int i = 1; i < exceptions.length; i++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\", \" + exceptions[i]);\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Exceptions: none\");\r\n\t\t}\r\n\r\n\t\tif(parameters != null)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Parameters: \" + parameters[0]);\r\n\t\t\tfor(int i = 1; i < parameters.length; i++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\", \" + parameters[i]);\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Parameters: none\");\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t}", "public void print() {\n System.out.println(\"Nome: \" + nome);\n System.out.println(\"Telefone: \" + telefone);\n }", "public void printAllStages() {\n printIndex();\n printRemoval();\n }", "public void printAll() {\r\n\t\t\t\t\r\n\t\tSystem.out.println(\"################\");\r\n\t\tSystem.out.println(\"Filename:\" +getFileName());\r\n\t\tSystem.out.println(\"Creation Date:\" +getCreationDate());\r\n\t\tSystem.out.println(\"Genre:\" +getGenre());\r\n\t\tSystem.out.println(\"Month:\" +getMonth());\r\n\t\tSystem.out.println(\"Plot:\" +getPlot());\r\n\t\tSystem.out.println(\"New Folder Name:\" + getNewFolder());\r\n\t\tSystem.out.println(\"New Thumbnail File Name:\" +getNewThumbnailName());\r\n\t\tSystem.out.println(\"New File Name:\" +getNewFilename());\r\n\t\tSystem.out.println(\"Season:\" +getSeason());\r\n\t\tSystem.out.println(\"Episode:\" +getEpisode());\r\n\t\tSystem.out.println(\"Selected:\" +getSelectEdit());\r\n\t\tSystem.out.println(\"Title:\" +getTitle());\r\n\t\tSystem.out.println(\"Year:\" +getYear());\r\n\t\tSystem.out.println(\"Remarks:\" +getRemarks());\r\n\t\tSystem.out.println(\"################\");\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public void printInfo(){\n\t\tSystem.out.println(\"id : \" + id + \" label : \" + label);\n\t\tSystem.out.println(\"vms : \" );\n\t\tfor(VirtualMachine v : vms){\n\t\t\tv.printInfo();\n\t\t}\n\t}", "public void printStringsInLexicoOrder() {\n\t\t// ***** method code to be added in this class *****\n\t\t// now we just have a dummy method that prints a message.\n\n\t\tTreeNode node = root;\n\t\t\n\t\tprintStringsInLexicoOrder(node);\n\t}", "public void printAll(){\n for (Triangle triangle : triangles) {\n System.out.println(triangle.toString());\n }\n for (Circle circle : circles) {\n System.out.println(circle.toString());\n }\n for (Rectangle rectangle : rectangles) {\n System.out.println(rectangle.toString());\n }\n }", "public void print() {\n\t\tint l = 0;\n\t\tSystem.out.println();\n\t\tfor (int v = 0; v < vertexList.length; v++) {\n\t\t\tSystem.out.print(vertexList[v].id);\n\t\t\tfor (Neighbor nbr = vertexList[v].adjList; nbr != null; nbr = nbr.next) {\n\t\t\t\tSystem.out.print(\" -> \" + vertexList[nbr.vertexNumber].id + \"(\"\n\t\t\t\t\t\t+ nbr.weight + \")\");\n\t\t\t\tl++;\n\t\t\t}\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}\n\t\tSystem.out.println(\"Number of edges = \" + l / 2);\n\t}", "public void printWord(){\n\t\tint length = word.length;\n\t\tfor(int i = 0; i < length; i++){\n\t\t\tSystem.out.print(word[i]);\n\t\t}\n\t}", "public void PrintMe()\r\n\t{\r\n\t\t/*************************************************/\r\n\t\t/* AST NODE TYPE = AST NODE FUNCTION DECLARATION */\r\n\t\t/*************************************************/\r\n\t\tSystem.out.format(\"CALL(%s)\\nWITH:\\n\",funcName);\r\n\r\n\t\t/***************************************/\r\n\t\t/* RECURSIVELY PRINT params + body ... */\r\n\t\t/***************************************/\r\n\t\tif (params != null) params.PrintMe();\r\n\t\t\r\n\t\t/***************************************/\r\n\t\t/* PRINT Node to AST GRAPHVIZ DOT file */\r\n\t\t/***************************************/\r\n\t\tAST_GRAPHVIZ.getInstance().logNode(\r\n\t\t\tSerialNumber,\r\n\t\t\tString.format(\"CALL(%s)\\nWITH\",funcName));\r\n\t\t\r\n\t\t/****************************************/\r\n\t\t/* PRINT Edges to AST GRAPHVIZ DOT file */\r\n\t\t/****************************************/\r\n\t\tif (params != null) AST_GRAPHVIZ.getInstance().logEdge(SerialNumber,params.SerialNumber);\t\t\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic void print() {\r\n\t\tSystem.out.println(\"** Metadata **\");\r\n\t\tfor (final Map<String, Object> m : _data) {\r\n\t\t\tSystem.out.println(\" + ALBUM\");\r\n\t\t\tfor (final String key : m.keySet()) {\r\n\t\t\t\tfinal Object o = m.get(key);\r\n\r\n\t\t\t\t// Most stuff is string, we can just dump that out.\r\n\t\t\t\tif (o instanceof String) {\r\n\t\t\t\t\tSystem.out.println(\" + \" + key + \": \" + (String) o);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (o instanceof ArrayList) {\r\n\t\t\t\t\tSystem.out.println(\" + \" + key + \":\");\r\n\t\t\t\t\tfor (final Object oo : (ArrayList<GracenoteMetadataOET>) o) {\r\n\t\t\t\t\t\tif (oo instanceof GracenoteMetadataOET) {\r\n\t\t\t\t\t\t\tfinal GracenoteMetadataOET oet = (GracenoteMetadataOET) oo;\r\n\t\t\t\t\t\t\toet.print();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void dumpTokens(PrintWriter pw, boolean dumpAll) {\n if (!this.mTokenMap.isEmpty()) {\n pw.println(\" Display #\" + this.mDisplayId);\n for (WindowToken token : this.mTokenMap.values()) {\n pw.print(\" \");\n pw.print(token);\n if (dumpAll) {\n pw.println(':');\n token.dump(pw, \" \", dumpAll);\n } else {\n pw.println();\n }\n }\n if (!this.mOpeningApps.isEmpty() || !this.mClosingApps.isEmpty() || !this.mChangingApps.isEmpty()) {\n pw.println();\n if (this.mOpeningApps.size() > 0) {\n pw.print(\" mOpeningApps=\");\n pw.println(this.mOpeningApps);\n }\n if (this.mClosingApps.size() > 0) {\n pw.print(\" mClosingApps=\");\n pw.println(this.mClosingApps);\n }\n if (this.mChangingApps.size() > 0) {\n pw.print(\" mChangingApps=\");\n pw.println(this.mChangingApps);\n }\n }\n this.mUnknownAppVisibilityController.dump(pw, \" \");\n }\n }", "public void printLaptops(){\n\t\tSystem.out.println(\"Root is: \"+vertices.get(root));\n\t\tSystem.out.println(\"Edges: \");\n\t\tfor(int i=0;i<parent.length;i++){\n\t\t\tif(parent[i] != -1){\n\t\t\t\tSystem.out.print(\"(\"+vertices.get(parent[i])+\", \"+\n\t\t\tvertices.get(i)+\") \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t\t}", "public void PrintMe()\n {\n /************************************/\n /* AST NODE TYPE = DEC CLASSDEC AST NODE */\n /************************************/\n System.out.print(\"AST NODE DEC CLASSDEC\\n\");\n\n /*****************************/\n /* RECURSIVELY PRINT classDec ... */\n /*****************************/\n if (dataMembers != null) dataMembers.PrintMe();\n if (methods != null) methods.PrintMe();\n\n /*********************************/\n /* Print to AST GRAPHIZ DOT file */\n /*********************************/\n if (parentName!=null)\n {\n AST_GRAPHVIZ.getInstance().logNode(SerialNumber, String.format(\"CLASS %s EXTENDS %s\",idName,parentName));\n }\n else{\n AST_GRAPHVIZ.getInstance().logNode(SerialNumber, String.format(\"CLASS %s\",idName));\n }\n /****************************************/\n /* PRINT Edges to AST GRAPHVIZ DOT file */\n /****************************************/\n\n if (dataMembers != null) AST_GRAPHVIZ.getInstance().logEdge(SerialNumber, dataMembers.SerialNumber);\n if (methods != null) AST_GRAPHVIZ.getInstance().logEdge(SerialNumber, methods.SerialNumber);\n }", "@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}", "void printToConsole() {\n\t\tSystem.out.println(\"PROVIDER DIRECTORY:\");\n\t\tfor (int i = 0; i < services.size(); i++) {\n\t\t\tString service = services.get(i).getServiceName() + \" (\" + services.get(i).getServiceNumber() + \") for $\" + services.get(i).getServiceFee();\n\t\t\tSystem.out.println(\"\\t\" + service);\n\t\t}\n\t}", "public void printAll() {\n\t\tSystem.out.println(mainPot);\n\t\tcurrentPlayer.printHandAndPocket();\n\t\tcurrentPlayer.printCombos();\n\t\topponentPlayer.printCombos();\n\t\tSystem.out.println();\n\t}", "public void printStrings()\n\t{\n\t\tfor(String s : strings)\n\t\t{\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}", "private String topOrderedSentences(PriorityQueue<Sentence> sortedSentences) {\n StringBuilder summarySentences = new StringBuilder();\n\n List<Sentence> orderedSentences = new ArrayList<>();\n int limit = Math.min(3, sortedSentences.size());\n for (int i = 0; i < limit; i++) {\n Sentence topNthSentence = sortedSentences.poll();\n orderedSentences.add(topNthSentence);\n }\n\n // Sort sentences by order they appeared in the article, and restore punctuation\n orderedSentences.sort(new IndexComparator());\n for (Sentence s: orderedSentences) {\n summarySentences.append(s.getSentence());\n summarySentences.append(\". \");\n }\n\n return summarySentences.toString();\n }", "void printGraph() {\n System.out.println(\n \"All vertices in the graph are presented below.\\n\" +\n \"Their individual edges presented after a tab. \\n\" +\n \"-------\");\n\n for (Map.Entry<Vertex, LinkedList<Vertex>> entry : verticesAndTheirEdges.entrySet()) {\n LinkedList<Vertex> adj = entry.getValue();\n System.out.println(\"Vertex: \" + entry.getKey().getName());\n for (Vertex v : adj) {\n System.out.println(\" \" + v.getName());\n }\n }\n }", "public void PrintMe()\r\n\t{\r\n\t\t/********************************/\r\n\t\t/* AST NODE TYPE = AST EXP METHOD */\r\n\t\t/********************************/\r\n\t\tSystem.out.format(\"EXP\\nMETHOD\\n\");\r\n\r\n\t\t/*************************************/\r\n\t\t/* RECURSIVELY PRINT HEAD + TAIL ... */\r\n\t\t/*************************************/\r\n\t\tif (var != null) var.PrintMe();\r\n\r\n\t\t/**********************************/\r\n\t\t/* PRINT to AST GRAPHVIZ DOT file */\r\n\t\t/**********************************/\r\n\t\tAST_GRAPHVIZ.getInstance().logNode(\r\n\t\t\tSerialNumber,\r\n\t\t\tString.format(\"EXP\\nMETHOD\\n\"));\r\n\t\t\r\n\t\t/****************************************/\r\n\t\t/* PRINT Edges to AST GRAPHVIZ DOT file */\r\n\t\t/****************************************/\r\n\t\tif (var != null) AST_GRAPHVIZ.getInstance().logEdge(SerialNumber,var.SerialNumber);\r\n\t}", "@Override\r\n\tpublic void showClassmate() {\n\t\tSystem.out.println(\"你的同学有: \"+classmateRelations);\r\n\t}", "void print() {\n for (int i = 0; i < 8; i--) {\n System.out.print(\" \");\n for (int j = 0; j < 8; j++) {\n System.out.print(_pieces[i][j].textName());\n }\n System.out.print(\"\\n\");\n }\n }" ]
[ "0.7171602", "0.65769994", "0.6526442", "0.6368096", "0.61527157", "0.58954597", "0.5768429", "0.57364446", "0.5733557", "0.5666427", "0.56084394", "0.55933297", "0.55860627", "0.5583607", "0.55759585", "0.55728626", "0.5519069", "0.5510952", "0.549863", "0.5484161", "0.5471032", "0.5462116", "0.5459094", "0.5443689", "0.5442543", "0.54361683", "0.54243773", "0.54041284", "0.5398719", "0.5377784", "0.5374345", "0.53687006", "0.53675544", "0.5367207", "0.5365751", "0.53656995", "0.53551394", "0.5350985", "0.5344158", "0.53372306", "0.531527", "0.53073275", "0.5304068", "0.5295973", "0.5294901", "0.5283008", "0.5277556", "0.5273121", "0.5272059", "0.52637565", "0.52594286", "0.5254759", "0.52526873", "0.52403736", "0.5237351", "0.5228188", "0.52276254", "0.5220121", "0.52189213", "0.52175456", "0.52113587", "0.520592", "0.520378", "0.5190201", "0.5190112", "0.5190112", "0.5184593", "0.51784635", "0.51778567", "0.5173581", "0.51628315", "0.51623297", "0.51583904", "0.5158202", "0.5158202", "0.5157368", "0.5148495", "0.5144499", "0.5141696", "0.5139965", "0.5136189", "0.51308703", "0.51252276", "0.51224786", "0.51194453", "0.5117418", "0.5111506", "0.5110958", "0.5109129", "0.5103409", "0.5102891", "0.5098483", "0.50912255", "0.50890505", "0.50881004", "0.50836855", "0.5083146", "0.50794214", "0.50763947", "0.50762504" ]
0.71326756
1
An anonymous inner class implementation of FilenameFilter
public static void main(String[] args) { File directory1=new File("./src/main/java"); String[] fileNames = directory1.list(new java.io.FilenameFilter() { @Override public boolean accept(File dir, String name) { return name.endsWith(".java"); } }); System.out.println(Arrays.asList(fileNames)); //Lambda expression implementing FilenameFilter File directory2 = new File("./src/main/java"); String[] names1 = directory2.list((dir, name) -> name.endsWith(".java")); System.out.println(Arrays.asList(names1)); //Lambda expression with explicit data types File directory3 = new File("./src/main/java"); String[] names2 = directory3.list((File dir, String name) -> name.endsWith(".java")); System.out.println(Arrays.asList(names2)); //A block lambda File directory4 = new File("./src/main/java"); String[] names3 = directory4.list((File dir, String name) -> { return name.endsWith(".java"); }); System.out.println(Arrays.asList(names3)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected FileExtensionFilter()\n\t{\n\t}", "public FileFilter() {\n this.filterExpression = \"\";\n }", "public abstract String filterFileName(final String fileName);", "File(String fileName)\n {\n this.fileNameToFilterBy = fileName;\n }", "public FileFilter(String expression) {\n this.filterExpression = expression;\n }", "interface Filter {\r\n public boolean apply(Filter file);\r\n}", "protected FilenameFilter createFileNameFilter(String fileExtension) {\n return new FilenameFilter() {\n @Override\n public boolean accept(File dir, String name) {\n return name.endsWith(fileExtension);\n }\n };\n }", "public abstract boolean doFilter(File file);", "public interface FileFilter {\n\t\n\t/**\n\t * Metoda provjerava zadovoljava li file zadani implementirani filter, ovisno o razredu.\n\t * \n\t * @param f file nad kojim se provjerava \n\t * @return true ili false, ovisno o uspjesnosti provjere\n\t */\n\tpublic boolean accepts(File f);\n\n}", "public DirectoryFileFilter() {\n\t\tthis(true);\n\t}", "public SimpleFileFilter() {\n\n this(null, false);\n }", "public FileListFilter(String name, String extension) {\n this.name = name;\n this.extension = extension;\n }", "public javax.swing.filechooser.FileFilter getFileFilter();", "public static interface FileFilter extends Serializable {\n\n /**\n * Tells whether the file shall be accepted, i.e. not filtered out.\n *\n * @param fileStatus describes the file of interest\n * @return whether the file shall pass the filter\n */\n boolean accept(FileStatus fileStatus);\n\n }", "public CollectingFileToucher(String[] args)\n {\n super(args);\n mFiles = new ArrayList<File>();\n mFileFilter = new JavaSoftFileToucher(args);\n/*\n {\n public boolean accept(File inFile)\n {\n return true;\n }\n };\n*/\n }", "public static void main(String[] args) {\n final FilenameFilter filter = new FilenameFilter() {\n @Override\n public boolean accept(File dir, String name) {\n return name.toLowerCase().endsWith(\".txt\");\n }\n };\n\n //use a lambda\n final FilenameFilter filterLambda1 = (File dir, String name) -> { return name.toLowerCase().endsWith(\".txt\");};\n\n //also you can not use the types anymore, let the compiler figure them out\n final FilenameFilter filterLambda2 = (dir, name) -> { return name.toLowerCase().endsWith(\".txt\"); };\n\n //lose the return and {}\n final FilenameFilter filterLambda3 = (dir, name) -> !dir.isDirectory()&&name.toLowerCase().endsWith(\".txt\");\n\n File homeDir = new File(System.getProperty(\"user.home\"));\n String[] files = homeDir.list(filterLambda3);\n for(String file:files){\n System.out.println(file);\n }\n\n }", "public WildcardFilenameFilter( String wildcard ) {\n\t\tpattern = Pattern.compile( wildcardAsRegex( wildcard ) );\n\t\tsetAcceptDirectories( true );\n\t}", "public interface FileObjectFilter {\n\n /** constant representing answer &quot;do not traverse the folder&quot; */\n public static final int DO_NOT_TRAVERSE = 0;\n /** constant representing answer &quot;traverse the folder&quot; */\n public static final int TRAVERSE = 1;\n /**\n * constant representing answer &quot;traverse the folder and all its direct\n * and indirect children (both files and subfolders)&quot;\n */\n public static final int TRAVERSE_ALL_SUBFOLDERS = 2;\n\n /**\n * Answers a question whether a given file should be searched.\n * The file must be a plain file (not folder).\n *\n * @return <code>true</code> if the given file should be searched;\n * <code>false</code> if not\n * @exception java.lang.IllegalArgumentException\n * if the passed <code>FileObject</code> is a folder\n */\n public boolean searchFile(FileObject file)\n throws IllegalArgumentException;\n\n /**\n * Answers a questions whether a given folder should be traversed\n * (its contents searched).\n * The passed argument must be a folder.\n *\n * @return one of constants {@link #DO_NOT_TRAVERSE},\n * {@link #TRAVERSE},\n * {@link #TRAVERSE_ALL_SUBFOLDERS};\n * if <code>TRAVERSE_ALL_SUBFOLDERS</code> is returned,\n * this filter will not be applied on the folder's children\n * (both direct and indirect, both files and folders)\n * @exception java.lang.IllegalArgumentException\n * if the passed <code>FileObject</code> is not a folder\n */\n public int traverseFolder(FileObject folder)\n throws IllegalArgumentException;\n\n}", "public OrFileFilter()\n {\n // Nothing to do\n }", "static public FileFilter nullFilter() {\n return new FileFilter();\n }", "protected FilterImpl() {\n this(SparkUtils.ALL_PATHS);\n }", "public abstract void filter();", "@Override\n\t\t\tpublic boolean accept(File f) {\n\t\t\t\treturn (f.getName().toUpperCase().indexOf(finalRegEx)>=0 &&\n\t\t\t\t\t\tsupportedFilesFilter.accept(f));\n\t\t\t}", "public void setExtensionFilter(FileNameExtensionFilter extensionFilter) {\r\n\t\tthis.extensionFilter = extensionFilter;\r\n\t}", "public void selectFileType(String filter) {\n selectFileType(filter, getComparator());\n }", "public AXLFileFilter(String extension) {\n\t this(extension,null);\n }", "java.lang.String getFilter();", "public interface FileProcessor extends FileFilter\n{\n\t/**\n\t * Do something with the file.\n\t * \n\t * @param file\n\t * @return Success of processing. It may not be an error not to succeed.\n\t * @throws IOException\n\t */\n\tpublic boolean process(File file) throws IOException;\n}", "CompiledFilter() {\n }", "public DotFileEnumerator(String filePath, boolean filter)\n {\n String[] tempArr = new File(filePath).list();\n\n if (filter)\n filterStrings(tempArr);\n }", "String getFilter();", "@SuppressWarnings(\"unused\")\n\tprivate Filter() {\n\n\t}", "public Filter () {\n\t\tsuper();\n\t}", "public AXLFileFilter(String[] filters) {\n\t this(filters, null);\n }", "private static FilenameFilter createFilter(final List<Pattern> patterns) {\n return new FilenameFilter() {\n \n @Override\n public boolean accept(File dir, String name) {\n for (Pattern p : patterns) {\n if (p.matcher(name).matches()) {\n return true;\n }\n }\n return false;\n }\n };\n }", "protected FilenameFilter getDAOFileNameFilter() {\r\n\t\treturn daoFileFilter_;\r\n\t}", "@SuppressLint(\"DefaultLocale\")\n\t\t@Override\n\t\tpublic boolean accept(File dir, String filename) {\n\t\t return filename.toLowerCase().endsWith(ext.toLowerCase());\n\t\t}", "public JSPFileFilter(String extension) {\n\t this.filters = new Hashtable();\n\t /**\n\t * Inserting curli braces to avoid PMD violation named IfStmtsMustUseBraces.\n\t * by Prakash. 10-05-2007. \n\t */\n\t\tif(extension!=null) { addExtension(extension); }\n\t\t/*\n\t\t * End of modification.\n\t\t */\n\t }", "@Override\n public boolean filterFile(File file) {\n\n // we will just return the opposite of our composed filter decides\n return (!filter.filterFile(file));\n }", "public FileFilter(FieldFilter[] fieldFilters) {\n this.filterExpression = makeExpression(fieldFilters);\n }", "BuildFilter defaultFilter();", "@Override\n public Iterable<File> list(File storageDirectory, FilenameFilter filter) {\n\treturn null;\n }", "public GlobFilenameFilter(String regex) {\n super(__CACHE, __MATCHER, regex);\n }", "@Override\r\n public boolean accept(File dir, String name){\r\n if(name.toLowerCase().endsWith(\".jpg\")){\r\n return false;\r\n }\r\n return true;\r\n }", "public FileExtensionFilter\n (\n \tString extensions[] ,\n \tString description\n )\n {\n\t\tsetExtensions( extensions );\n\t\tsetDescription( description );\n\t}", "Filter getFilter();", "Predicate<File> pass();", "public SimpleFileFilter(final String aPattern,\n final boolean aCaseSensitive) {\n\n setPattern(aPattern, aCaseSensitive);\n }", "public Filter() {\n }", "public SystemModel2FileFilter(final Configuration configuration, final IProjectContext projectContext) {\n\t\tsuper(configuration, projectContext);\n\n\t\tthis.outputFnHTML = configuration.getPathProperty(CONFIG_PROPERTY_NAME_HTML_OUTPUT_FN);\n\t}", "private FileUtil() {}", "private File[] filter(File[] inputList, String beginning, String ending) {\n\t\t// in case no filtering is neccessary\n\t\tif ((beginning == null) && (ending == null))\n\t\t\treturn inputList;\n\t\tjava.util.List<File> result = new ArrayList<File>();\n\t\tfor (int i = 0; i < inputList.length; i++) {\n\t\t\tif (beginning == null) {\n\t\t\t\tif (inputList[i].getName().endsWith(ending))\n\t\t\t\t\tresult.add(inputList[i]);\n\t\t\t} else if (ending == null) {\n\t\t\t\tif (inputList[i].getName().startsWith(beginning))\n\t\t\t\t\tresult.add(inputList[i]);\n\t\t\t} else if ((inputList[i].getName().startsWith(beginning))\n\t\t\t\t\t&& (inputList[i].getName().endsWith(ending))) {\n\t\t\t\tresult.add(inputList[i]);\n\t\t\t}\n\t\t}\n\t\tFile[] retval = result.toArray(new File[result.size()]);\n\t\tjava.util.Arrays.sort(retval);\n\t\treturn retval;\n\t}", "@Override\n public List runFilter(String filter) {\n return runFilter(\"\", filter);\n }", "public FileExtensionFilter\n\t(\n\t\tString extension ,\n\t\tString description\n\t)\n\t{\n\t\tsetDescription( description );\n\t\tsetExtensions( new String[]{ extension } );\n\t}", "protected DirectoryFilter(String description) {\r\n super(description);\r\n }", "@Override\n public void onTextChanged(CharSequence cs, int arg1, int arg2, int arg3) {\n FilesActivity.this.directoryList.getFilter().filter(cs);\n }", "public FileNameExtensionFilter getExtensionFilter() {\r\n\t\treturn extensionFilter;\r\n\t}", "public InvertFilter(String name)\n {\n super(name);\n }", "public abstract String getDefaultFilter ();", "private void adaptFilter(FileDialog fileOpenDialog, String[] extensions) {\r\n\t\tif (!GDE.IS_WINDOWS) { // Apples MAC OS seams to reply with case insensitive file names\r\n\t\t\tVector<String> tmpExt = new Vector<String>();\r\n\t\t\tfor (String extension : extensions) {\r\n\t\t\t\tif (!extension.equals(GDE.FILE_ENDING_STAR_STAR)) {\r\n\t\t\t\t\ttmpExt.add(extension); // lower case is default\r\n\t\t\t\t\ttmpExt.add(extension.toUpperCase());\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\ttmpExt.add(GDE.FILE_ENDING_STAR);\r\n\t\t\t}\r\n\t\t\textensions = tmpExt.toArray(new String[1]);\r\n\t\t}\r\n\t\tfileOpenDialog.setFilterExtensions(extensions);\r\n\t\tfileOpenDialog.setFilterNames(getExtensionDescription(extensions));\r\n\t}", "public FilterChooser() {\n\n \tsuper();\n \tchooser = new JFileChooser();\n \tthis.setupListeners();\n \t\n \n }", "public void removeFiles(String filter)\n {\n for (String s : fileList) {\n if (!s.contains(filter)) {\n fileList.remove(s);\n }\n }\n }", "public List<String> getFileFilters() {\n/* 420 */ List<String> retval = null;\n/* 421 */ COSBase filters = this.stream.getDictionaryObject(COSName.F_FILTER);\n/* 422 */ if (filters instanceof COSName) {\n/* */ \n/* 424 */ COSName name = (COSName)filters;\n/* 425 */ retval = new COSArrayList<String>(name.getName(), (COSBase)name, (COSDictionary)this.stream, COSName.F_FILTER);\n/* */ \n/* */ }\n/* 428 */ else if (filters instanceof COSArray) {\n/* */ \n/* */ \n/* 431 */ retval = COSArrayList.convertCOSNameCOSArrayToList((COSArray)filters);\n/* */ } \n/* 433 */ return retval;\n/* */ }", "public interface DiffFilter {\n\n\t/**\n\t * Determine whether to accept a diff on this file for further processing.\n\t * \n\t * @param diffEntryPath The path to the file being diffed\n\t * @return True if the file should pass the filter, false if it should be filtered out.\n\t */\n\tboolean accept(String diffEntryPath);\n}", "String getFilterName();", "public abstract Filter<T> filter();", "public GlobFilenameFilter(String regex, int options) {\n super(__CACHE, __MATCHER, regex, options);\n }", "void setFilter(String filter);", "public RegexFileFilter(Pattern pattern) {\n/* 104 */ if (pattern == null) {\n/* 105 */ throw new IllegalArgumentException(\"Pattern is missing\");\n/* */ }\n/* */ \n/* 108 */ this.pattern = pattern;\n/* */ }", "public String getFilter();", "@Override\n public boolean accept(File f) {\n return f.getName().endsWith(FILE_EXTENSION);\n }", "static FileHelper.NameFilter createNameFilterEquals(@NonNull final String name) {\n return displayName -> displayName.equalsIgnoreCase(name);\n }", "@Override\n\t\t\t\t\tpublic boolean accept(File f) {\n\t\t\t\t\t\tif (f.isDirectory()) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tString filename = f.getName().toLowerCase();\n\t\t\t\t\t\t\treturn filename.endsWith(\".pr1\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "public void fileChooserOpener(){\r\n fileChooser = new FileChooser();\r\n fileChooser.getExtensionFilters().addAll( \r\n new FileChooser.ExtensionFilter(\"PDF Files\",\"*.pdf\")\r\n// new FileChooser.ExtensionFilter(\"All Files\",\"*.*\") \r\n// new FileChooser.ExtensionFilter(\"Excel Files\",\"*.xslx\") \r\n// new FileChooser.ExtensionFilter(\"Text Files\",\"*.txt\"),\r\n// new FileChooser.ExtensionFilter(\"Word Files\",\"*.docx\"),\r\n// new FileChooser.ExtensionFilter(\"Image Files\",\"*.png\",\"*.jpg\",\"*.gif\"),\r\n// new FileChooser.ExtensionFilter(\"Audio Files\",\"*.wav\",\"*.mp3\",\"*.mp4\",\"*.acc\") \r\n \r\n ); \r\n }", "private FileUtil() {\n \t\tsuper();\n \t}", "public RegexFileFilter(String pattern, IOCase caseSensitivity) {\n/* 73 */ if (pattern == null) {\n/* 74 */ throw new IllegalArgumentException(\"Pattern is missing\");\n/* */ }\n/* 76 */ int flags = 0;\n/* 77 */ if (caseSensitivity != null && !caseSensitivity.isCaseSensitive()) {\n/* 78 */ flags = 2;\n/* */ }\n/* 80 */ this.pattern = Pattern.compile(pattern, flags);\n/* */ }", "@Override\n\tpublic String dofilter(String str) {\n\t\tfor(Filter f : filters){\n\t\t\tstr = f.dofilter(str);\n\t\t}\t\t\n\t\treturn str;\n\t}", "public interface Filter {\n\n}", "public OrFileFilter addFilter (FileFilter filter)\n {\n filters.add (filter);\n return this;\n }", "void filterChanged(String filter) {\n if (filter.isEmpty()) {\n treeView.setRoot(rootTreeItem);\n } else {\n TreeItem<FilePath> filteredRoot = createTreeRoot();\n filter(rootTreeItem, filter, filteredRoot);\n treeView.setRoot(filteredRoot);\n }\n }", "boolean accept(String filename);", "@Override\n\tpublic void filterChange() {\n\t\t\n\t}", "@Override\r\n\tpublic boolean accept(File dir, String name) {\n\t\treturn name.toLowerCase().endsWith(\".txt\");\r\n\t}", "void setSupportedFilesFilter(FileFilter supportedFilesFilter) {\n\t\tthis.supportedFilesFilter = supportedFilesFilter;\n\t}", "@Override\r\n\t\tpublic boolean accept(File dir, String name) {\n\t\t\treturn indexFilenames.contains(name.toLowerCase());\r\n\t\t}", "@Override\n\t\t\tpublic boolean accept(File f) {\n\t\t\t\tif (f.isDirectory()) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tString filename = f.getName().toLowerCase();\n\t\t\t\t\treturn filename.endsWith(\".pr1\");\n\t\t\t\t}\n\t\t\t}", "FileExtensions (String type, String ext) {\n this.filter = new ExtensionFilter(type, ext);\n }", "public RegexFileFilter(String pattern, int flags) {\n/* 91 */ if (pattern == null) {\n/* 92 */ throw new IllegalArgumentException(\"Pattern is missing\");\n/* */ }\n/* 94 */ this.pattern = Pattern.compile(pattern, flags);\n/* */ }", "void setFilter(Filter f);", "public AXLFileFilter(String[] filters, String description) {\n\t this();\n\t for (int i = 0; i < filters.length; i++) {\n\t // add filters one by one\n\t addExtension(filters[i]);\n\t }\n \t if(description!=null) setDescription(description);\n }", "public static Enumeration applyFilter(String sFileSpec, boolean fRecurse)\n {\n // determine what the file filter is:\n // (1) the path or name of a file (e.g. \"Replace.java\")\n // (2) a path (implied *.*)\n // (3) a path and a filter (e.g. \"\\*.java\")\n // (4) a filter (e.g. \"*.java\")\n String sFilter = \"*\";\n String sDir = sFileSpec;\n File dir;\n\n // file spec may be a complete dir specification\n dir = new File(sDir).getAbsoluteFile();\n if (!dir.isDirectory())\n {\n // parse the file specification into a dir and a filter\n int of = sFileSpec.lastIndexOf(File.separatorChar);\n if (of < 0)\n {\n sDir = \"\";\n sFilter = sFileSpec;\n }\n else\n {\n sDir = sFileSpec.substring(0, ++of);\n sFilter = sFileSpec.substring(of);\n }\n\n // test the parsed directory name by itself\n dir = new File(sDir).getAbsoluteFile();\n if (!dir.isDirectory())\n {\n return null;\n }\n }\n\n // check filter, and determine if it denotes\n // (1) a specific file\n // (2) all files\n // (3) a subset (filtered set) of files\n Stack stackDirs = new Stack();\n FileFilter filter;\n\n if (sFilter.length() < 1)\n {\n sFilter = \"*\";\n }\n\n if (sFilter.indexOf('*') < 0 && sFilter.indexOf('?') < 0)\n {\n if (fRecurse)\n {\n // even though we are looking for a specific file, we still\n // have to recurse through sub-dirs\n filter = new ExactFilter(stackDirs, fRecurse, sFilter);\n }\n else\n {\n File file = new File(dir, sFilter);\n if (file.isFile() && file.exists())\n {\n return new SimpleEnumerator(new File[] {file});\n }\n else\n {\n return NullImplementation.getEnumeration();\n }\n }\n }\n else if (sFilter.equals(\"*\"))\n {\n filter = new AllFilter(stackDirs, fRecurse);\n }\n else\n {\n filter = new PatternFilter(stackDirs, fRecurse, sFilter);\n }\n\n stackDirs.push(dir);\n return applyFilter(stackDirs, filter);\n }", "@Override\n public boolean accept(File f) {\n if (f.isDirectory()) {\n return true;\n } else {\n for (ExtensionFileFilter filter : filters) {\n if (filter.accept(f)) {\n return true;\n }\n }\n }\n return false;\n }", "public Filter (Filter filter) {\n this.name = filter.name;\n this.type = filter.type;\n this.pred = new FilterPred(filter.pred);\n this.enabled = filter.enabled;\n }", "public boolean accept(File directory, String filname) {\n return filname.endsWith(extension); \r\n }", "public VCFFilterHeaderLine(final String name) {\n super(\"FILTER\", name, name);\n }", "@Override\n public final boolean accept(File dir, String name) {\n return pattern.matcher(name).find();\n }", "public LogFilter() {}", "public interface FileTypeFilterable {\n void setAllowedFileTypes(String... fileTypes);\n}", "@Override\n protected FilterClassLoader.Filter getExtensionParentClassLoaderFilter() {\n return new FilterClassLoader.Filter() {\n @Override\n public boolean acceptResource(String resource) {\n return ALLOWED_RESOURCES.contains(resource);\n }\n\n @Override\n public boolean acceptPackage(String packageName) {\n return ALLOWED_PACKAGES.contains(packageName);\n }\n };\n }", "public ValidatorFilter() {\n\n\t}" ]
[ "0.783007", "0.7560401", "0.7368576", "0.71568286", "0.7031571", "0.6964623", "0.68685347", "0.67998916", "0.6692023", "0.65861183", "0.65599203", "0.64409876", "0.64323354", "0.6323142", "0.6268264", "0.62483233", "0.62091875", "0.6175015", "0.6136132", "0.61297077", "0.6112042", "0.6087626", "0.60501605", "0.6048356", "0.59796107", "0.59718853", "0.59433717", "0.5933304", "0.58732426", "0.5866255", "0.585354", "0.58523804", "0.58481264", "0.58471024", "0.5846106", "0.58403456", "0.5814632", "0.57935804", "0.5785184", "0.57744706", "0.57720906", "0.57431453", "0.5722002", "0.5720543", "0.57118106", "0.56989276", "0.5693186", "0.56547725", "0.56509537", "0.56469065", "0.5645225", "0.5639146", "0.5606637", "0.55964696", "0.55898035", "0.55828494", "0.556534", "0.5550244", "0.5543526", "0.5531105", "0.5529686", "0.5523223", "0.5521592", "0.5488545", "0.54845726", "0.5482183", "0.5470694", "0.54672134", "0.5465797", "0.54625475", "0.54426795", "0.5432993", "0.54176265", "0.5409521", "0.53942466", "0.538642", "0.53787416", "0.5366693", "0.5354668", "0.53539217", "0.5345776", "0.53420407", "0.5341817", "0.5318741", "0.53076744", "0.52991337", "0.52987844", "0.5294485", "0.5293659", "0.52910656", "0.5274004", "0.5270797", "0.5242653", "0.52390236", "0.52329975", "0.5230818", "0.5230556", "0.52289283", "0.5225023", "0.5223649" ]
0.56256616
52
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.discussion_home, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.72473437", "0.7202402", "0.71960324", "0.7177793", "0.7108265", "0.7040525", "0.70388484", "0.70126176", "0.70101976", "0.6981143", "0.69461405", "0.694", "0.69346833", "0.69183874", "0.69183874", "0.6891571", "0.6884306", "0.68758994", "0.687534", "0.68627334", "0.68627334", "0.68627334", "0.68627334", "0.6853258", "0.6847784", "0.6820167", "0.68177783", "0.68134266", "0.68132955", "0.68132955", "0.6806282", "0.68011856", "0.6798178", "0.67916524", "0.67897713", "0.6788724", "0.6783952", "0.6759952", "0.6757919", "0.6748738", "0.67445415", "0.67445415", "0.6741439", "0.67401767", "0.6726359", "0.6724678", "0.6723058", "0.6723058", "0.6721303", "0.67123276", "0.670777", "0.67050874", "0.670039", "0.66992784", "0.6697299", "0.6695259", "0.6686728", "0.668404", "0.668404", "0.6683142", "0.668091", "0.66799283", "0.6677784", "0.6669004", "0.66677624", "0.66630834", "0.66577506", "0.66577506", "0.66577506", "0.6656902", "0.66553235", "0.66553235", "0.66553235", "0.66530025", "0.66522014", "0.6650771", "0.66497517", "0.6647805", "0.66470283", "0.66469866", "0.6646818", "0.6645723", "0.66454786", "0.66439635", "0.66434425", "0.6642393", "0.6639529", "0.6635146", "0.6634077", "0.6632954", "0.66327274", "0.66327274", "0.66327274", "0.66297686", "0.66288346", "0.66275346", "0.66271275", "0.6625066", "0.6621276", "0.6619167", "0.6619167" ]
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 == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n 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.7905288", "0.7806507", "0.7767581", "0.7728288", "0.76327986", "0.7622734", "0.75856835", "0.7531844", "0.74890584", "0.74584335", "0.74584335", "0.7439769", "0.7422939", "0.7404292", "0.7392902", "0.7388083", "0.73805684", "0.7371689", "0.7363277", "0.73572534", "0.7346885", "0.7342883", "0.73314273", "0.73297995", "0.73268855", "0.73201936", "0.73177755", "0.73149055", "0.73053724", "0.73053724", "0.730291", "0.7299442", "0.7294618", "0.72880965", "0.7284496", "0.728212", "0.72798574", "0.72611254", "0.72611254", "0.72611254", "0.7260998", "0.7260716", "0.72512007", "0.72250247", "0.7220824", "0.721851", "0.72057116", "0.7201987", "0.72011137", "0.7194394", "0.7186605", "0.7178953", "0.7169934", "0.71687484", "0.71550834", "0.7154791", "0.7137151", "0.71361125", "0.71361125", "0.7130695", "0.7130134", "0.7125464", "0.71246445", "0.7124545", "0.7123362", "0.71184117", "0.71183425", "0.71183425", "0.71183425", "0.71183425", "0.71182", "0.7117654", "0.7116174", "0.71136016", "0.71110356", "0.71100533", "0.71068156", "0.7101081", "0.7099488", "0.7096844", "0.7094867", "0.7094867", "0.708774", "0.70838696", "0.7082184", "0.7081503", "0.7074928", "0.7069543", "0.70631075", "0.7061777", "0.70614165", "0.7052532", "0.70387715", "0.70387715", "0.703725", "0.70366216", "0.70366216", "0.7033842", "0.703188", "0.7030853", "0.70202804" ]
0.0
-1
Handle navigation view item clicks here.
@SuppressWarnings("StatementWithEmptyBody") @Override public boolean onNavigationItemSelected(MenuItem item) { Intent intent; switch(item.getItemId()){ case R.id.nav_home: finish(); intent = new Intent(this, NavigationActivity.class); startActivity(intent); return true; case R.id.nav_calendar: finish(); intent = new Intent(this, EventHome.class); startActivity(intent); return true; case R.id.nav_discussion: return true; case R.id.nav_settings: intent = new Intent(this, SettingsActivity.class); startActivity(intent); return true; case R.id.nav_app_blocker: intent = new Intent(this, AppBlockingActivity.class); startActivity(intent); return true; } DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); drawer.closeDrawer(GravityCompat.START); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }", "void onDialogNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) {\n itemInterface.OnItemClickedListener(tracks, getAdapterPosition());\n }", "@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }", "@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }", "@Override\n public void onClick(View view) {\n listener.menuButtonClicked(view.getId());\n }", "@Override\r\n\tpublic boolean onNavigationItemSelected(int itemPosition, long itemId) {\n\t\tLog.d(\"SomeTag\", \"Get click event at position: \" + itemPosition);\r\n\t\tswitch (itemPosition) {\r\n\t\tcase 1:\r\n\t\t\tIntent i = new Intent();\r\n\t\t\ti.setClass(getApplicationContext(), MainActivity.class);\r\n\t\t\tstartActivity(i);\r\n\t\t\t//return true;\r\n\t\t\tbreak;\r\n\t\tcase 2 :\r\n\t\t\tIntent intent = new Intent(this,WhiteListActivity.class);\r\n\t\t\tstartActivity(intent);\r\n\t\t\t//return true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n String name = navDrawerItems.get(position).getListItemName();\n // call a helper method to perform a corresponding action\n performActionOnNavDrawerItem(name);\n }", "@Override\n\tpublic void rightNavClick() {\n\t\t\n\t}", "@Override\n public void OnItemClick(int position) {\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (itemClicked != null)\n\t\t\t\t\titemClicked.OnItemClicked((BusinessType)item.getTag(), item);\n\t\t\t}", "@Override\n public void onClick(View view) {\n clickListener.onItemClicked(getBindingAdapterPosition());\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\thandleClick(position);\n\t\t\t}", "@Override\n public void onItemClicked(int itemPosition, Object dataObject) {\n }", "@Override\n public void onItemClick(int pos) {\n }", "@Override\n public void onClick(View v) {\n if (listener != null)\n listener.onItemClick(itemView, getPosition());\n }", "private void handleNavClick(View view) {\n final String label = ((TextView) view).getText().toString();\n if (\"Logout\".equals(label)) {\n logout();\n }\n if (\"Profile\".equals(label)) {\n final Intent intent = new Intent(this, ViewProfileActivity.class);\n startActivity(intent);\n }\n if (\"Search\".equals(label)){\n final Intent intent = new Intent(this, SearchActivity.class);\n startActivity(intent);\n }\n if (\"Home\".equals(label)) {\n final Intent intent = new Intent(this, HomeActivity.class);\n startActivity(intent);\n }\n }", "void onMenuItemClicked();", "@Override\n public void onClick(View view) {\n\n switch (view.getId()) {\n case R.id.tvSomeText:\n listener.sendDataToActivity(\"MainActivity: TextView clicked\");\n break;\n\n case -1:\n listener.sendDataToActivity(\"MainActivity: ItemView clicked\");\n break;\n }\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\tMainActivity sct = (MainActivity) act;\n\t\t\t\t\t\t\t\t\tsct.onItemClick(posit2, 11);\n\t\t\t\t\t\t\t\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t\t\t}", "@Override\n public void onClick(View v) {\n listener.onItemClick(v, position);\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\n\t}", "@Override\n public void onItemClick(View view, String data) {\n }", "abstract public void onSingleItemClick(View view);", "@Override\n public void onClick(View v) {\n this.itemClickListener.onItemClick(v, getLayoutPosition());\n }", "@Override\n public void itemClick(int pos) {\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {\n TextView textView = (TextView)view;\n switch(textView.getText().toString()){\n case \"NavBar\":\n Intent nav = new Intent(this, NavDrawerActivity.class);\n startActivity(nav);\n break;\n }\n\n //Toast.makeText(MainActivity.this,\"Go to \" + textView.getText().toString() + \" page.\",Toast.LENGTH_LONG).show();\n }", "@Override\r\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\r\n\t}", "@Override\n\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\tlong arg3) {\n\t\t\t\n\t\t}", "@Override\n public void onItemClick(Nson parent, View view, int position) {\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\t\t\t\t\tlong arg3) {\n\t\t\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void onClick(View view) {\n int position = getAdapterPosition();\n\n // Check if listener!=null bcz it is not guarantee that we'll call setOnItemClickListener\n // RecyclerView.NO_POSITION - Constant for -1, so that we don't click item at Invalid position (safety measure)\n if (listener != null && position != RecyclerView.NO_POSITION) {\n //listener.onItemClick(notes.get(position)); - used in RecyclerView.Adapter\n listener.onItemClick(getItem(position)); // getting data from superclass\n }\n }", "@Override\n public void onClick(View v) {\n itemClickListener.itemClicked(movieId, v);\n }", "@Override\n\t\tpublic void onClick(View view) {\n\t\t\tif (iOnItemClickListener != null) {\n\t\t\t\tiOnItemClickListener.onItemClick(view, null, getAdapterPosition());\n\t\t\t}\n\t\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}", "public void onItemClick(View view, int position);", "@Override\n public void onClick(View v) {\n if (mListener != null){\n mListener.onItemClick(itemView, getLayoutPosition());\n }\n }", "@Override\n public void onItemClick(int position) {\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\titemClickListener.Callback(itemInfo);\n\t\n\t\t\t}", "@Override\n public void onItemClick(View view, int position) {\n }", "@Override\n public void onItemClick(View view, int position) {\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t}", "@Override\n public void onItemOfListClicked(Object o) {\n UserProfileFragmentDirections.ActionUserProfileFragmentToEventProfileFragment action = UserProfileFragmentDirections.actionUserProfileFragmentToEventProfileFragment((MyEvent) o);\n navController.navigate(action);\n }", "@Override\n public void onClick(View view) {\n if(mFrom.equals(NetConstants.BOOKMARK_IN_TAB)) {\n IntentUtil.openDetailActivity(holder.itemView.getContext(), NetConstants.G_BOOKMARK_DEFAULT,\n bean.getArticleUrl(), position, bean.getArticleId());\n }\n else {\n IntentUtil.openDetailActivity(holder.itemView.getContext(), mFrom,\n bean.getArticleUrl(), position, bean.getArticleId());\n }\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_ds_note) {\n // Handle the camera action\n } else if (id == R.id.nav_ds_todo) {\n\n } else if (id == R.id.nav_ql_the) {\n\n } else if (id == R.id.nav_tuychinh) {\n Intent intent = new Intent(this, CustomActivity.class);\n startActivity(intent);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\t\t\t\t\t\tint position, long id) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}", "@Override\n public void onItemClick(View view, ListItem obj, int position) {\n }", "@Override\n\tpublic void onItemClick(Object o, int position) {\n\n\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}", "void onLinkClicked(@Nullable ContentId itemId);", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:\n Intent homeIntent = new Intent(this, MainActivity.class);\n startActivity(homeIntent);\n break;\n case R.id.send_email:\n Intent mailIntent = new Intent(this, ContactActivity.class);\n startActivity(mailIntent);\n break;\n case R.id.send_failure_ticket:\n Intent ticketIntent = new Intent(this, TicketActivity.class);\n startActivity(ticketIntent);\n break;\n case R.id.position:\n Intent positionIntent = new Intent(this, LocationActivity.class);\n startActivity(positionIntent);\n break;\n case R.id.author:\n UrlRedirect urlRed = new UrlRedirect(this.getApplicationContext(),getString(R.string.linkedinDeveloper));\n urlRed.redirect();\n break;\n default:\n break;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout_main_activity);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@SuppressWarnings(\"ConstantConditions\")\n public void onItemClicked(@NonNull Item item) {\n getView().openDetail(item);\n }", "void onItemClick(View view, int position);", "@Override\n public void onClick(View v) {\n startNavigation();\n }", "void onItemClick(int position);", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_logs) {\n startActivity(new Intent(this, LogView.class));\n } else if (id == R.id.nav_signOut) {\n signOut();\n }\n\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onClick(View v) {\n if(listener!=null & getLayoutPosition()!=0)\n listener.onItemClick(itemView, getLayoutPosition());\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\tlong id) {\n\t\tpresenter.onItemClicked(position);\n\t}", "@Override\n public void onClick(View view) {\n listener.onMenuButtonSelected(view.getId());\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\tHashMap<String, Object> item = (HashMap<String, Object>) arg0\n\t\t\t\t\t\t.getAdapter().getItem(arg2);\n\n\t\t\t\tIntent intent = new Intent(ViewActivity.this,\n\t\t\t\t\t\tContentActivity.class);\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.putString(\"_id\", item.get(\"_id\").toString());\n\t\t\t\tbundle.putString(\"_CityEventID\", item.get(\"_CityEventID\")\n\t\t\t\t\t\t.toString());\n\t\t\t\tbundle.putString(\"_type\", String.valueOf(_type));\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onClick(View view) {\n Navigation.findNavController(view).navigate(R.id.addEventFragment);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Log.w(TAG , \"POSITION : \" + position);\n\n itemClick(position);\n }", "void clickItem(int uid);", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_categories) {\n Intent intent = new Intent(getApplicationContext(), CategoryActivity.class);\n startActivity(intent, compat.toBundle());\n newsHere.setSourceActivity(\"search\");\n newsHere.setTargetActivity(\"category\");\n\n } else if (id == R.id.nav_top_headlines) {\n newsHere.setSourceActivity(\"search\");\n newsHere.setTargetActivity(\"home\");\n Intent intent = new Intent(getApplicationContext(), HomeActivity.class);\n startActivity(intent, compat.toBundle());\n } else if (id == R.id.nav_search) {\n // Do nothing\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onItemClick(View view, int position) {\n\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_orders) {\n\n Intent orderStatusIntent = new Intent(Home.this , OrderStatus.class);\n startActivity(orderStatusIntent);\n\n } else if (id == R.id.nav_banner) {\n\n Intent bannerIntent = new Intent(Home.this , BannerActivity.class);\n startActivity(bannerIntent);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n }", "public void onItemClick(View view, int position) {\n\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}", "@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\r\n\t\t\t\t\tlong arg3) {\n\r\n\t\t\t}", "void onClick(View item, View widget, int position, int which);", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n\n\n }", "@Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case R.id.nav_home:\n break;\n\n case R.id.nav_favourites:\n\n if (User.getInstance().getUser() == null) {\n Intent intent = new Intent(getApplicationContext(), LoginActivity.class);\n startActivity(intent);\n }\n\n Intent intent = new Intent(getApplicationContext(), PlaceItemListActivity.class);\n startActivity(intent);\n\n break;\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tonRgtRgtMenuClick(v);\n\t\t\t}", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_camera) {\n // Handle the camera action\n } else if (id == R.id.nav_gallery) {\n Toast.makeText(this, \"gallery is clicked!\", Toast.LENGTH_LONG).show();\n\n } else if (id == R.id.nav_slideshow) {\n\n } else if (id == R.id.nav_manage) {\n\n } else if (id == R.id.nav_share) {\n\n } else if (id == R.id.nav_send) {\n\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "public void menuClicked(MenuItem menuItemSelected);", "@Override\n public void onItemClick(int position) {\n }", "@Override\n public void onItemClick(int position) {\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_my_account) {\n startActivity(new Intent(this, MyAccountActivity.class));\n } else if (id == R.id.nav_message_inbox) {\n startActivity(new Intent(this, MessageInboxActivity.class));\n } else if (id == R.id.nav_view_offers) {\n //Do Nothing\n } else if (id == R.id.nav_create_listing) {\n startActivity(new Intent(this, CreateListingActivity.class));\n } else if (id == R.id.nav_view_listings) {\n startActivity(new Intent(this, ViewListingsActivity.class));\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\r\n\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\t\tint position, long id) {\n\t\t\t\t}" ]
[ "0.7882029", "0.7235578", "0.6987005", "0.69458413", "0.6917864", "0.6917864", "0.6883472", "0.6875181", "0.68681556", "0.6766498", "0.67418456", "0.67207", "0.6716157", "0.6713947", "0.6698189", "0.66980195", "0.66793925", "0.66624063", "0.66595167", "0.6646381", "0.6641224", "0.66243863", "0.6624042", "0.66207093", "0.6602551", "0.6602231", "0.6599443", "0.65987265", "0.65935796", "0.6585869", "0.658491", "0.65811735", "0.65765643", "0.65751576", "0.65694076", "0.6561757", "0.65582377", "0.65581614", "0.6552827", "0.6552827", "0.6549224", "0.65389794", "0.65345114", "0.65337104", "0.652419", "0.652419", "0.6522521", "0.652146", "0.6521068", "0.6519354", "0.65165275", "0.65159816", "0.65028816", "0.6498054", "0.6498054", "0.64969087", "0.64937705", "0.6488544", "0.64867324", "0.64866185", "0.64865905", "0.6484047", "0.6481108", "0.6474686", "0.64628965", "0.64551884", "0.6446893", "0.64436555", "0.64436555", "0.64436555", "0.64436555", "0.64436555", "0.64386237", "0.643595", "0.64356565", "0.64329195", "0.6432562", "0.6429554", "0.64255124", "0.64255124", "0.64121485", "0.64102405", "0.64095175", "0.64095175", "0.64094734", "0.640727", "0.64060104", "0.6397359", "0.6392996", "0.63921124", "0.63899696", "0.63885015", "0.63885015", "0.63873845", "0.6368818", "0.6368818", "0.63643163", "0.63643163", "0.63643163", "0.6358884" ]
0.640229
87
Takes user to create a new thread
public void goToNewThread(View view){ Intent intent = new Intent(this, newThreadActivity.class); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createThread() {\n }", "ThreadStart createThreadStart();", "@Override\n protected Thread createThread(final Runnable runnable, final String name) {\n return new Thread(runnable, Thread.currentThread().getName() + \"-exec\");\n }", "NewThread (String threadname) {\r\n name = threadname;\r\n t = new Thread(this, name); // Constructor de un nuevo thread\r\n System.out.println(\"Nuevo hilo: \" +t);\r\n t.start(); // Aquí comienza el hilo\r\n }", "public IThread createThread() throws IllegalWriteException, BBException;", "@Override\n\t\t\tpublic Thread newThread(final Runnable r) {\n\t\t\t\tint id = threadNumber.getAndIncrement();\n\t\t\t\tString threadName = leftPad(String.valueOf(id), 2, \"0\");\n\t\t\t\tThread th = new Thread(r);\n\t\t\t\tth.setName(threadName);\n\t\t\t\tth.setDaemon(false);\n\t\t\t\treturn th;\n\t\t\t}", "public static void main(String[] args) {\n CreateRunnable createRunnable = new CreateRunnable();\n Thread thread = new Thread(createRunnable);\n thread.start();\n }", "@Override\n\tpublic Thread newThread(Runnable r) {\n\t\t\n\t\tThread th = new Thread(r,\" custum Thread\");\n\t\treturn th;\n\t}", "@Override\r\n public Thread newThread(Runnable r) {\n Thread t = new Thread(r, \"example-runner\");\r\n t.setDaemon(true);\r\n return t;\r\n }", "public void startThread(VirtualThread newThread) {\n\t\tlog.debug(\"**** CREATING A THREAD? ****\");\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//REPLY GUI\n\t\t\t\tgui.onEvent(className, XNode.NEW_USER_CREATED, null);\n\t\t\t}", "private Thread createThreadFor(Agent ag) {\n ProcessData data = getDataFor(ag);\n\n data.thread = new Thread(threadGroup, ag);\n data.thread.setPriority(THREAD_PRIORITY);\n\n return data.thread;\n }", "void startThread();", "@Override\r\n\tpublic Thread newThread(Runnable arg0) {\n\t\treturn null;\r\n\t}", "private static void ThreadCreationOldWay() {\r\n\t\tThread t1 = new Thread(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tSystem.out.println(\"This is a runnable method done in old fashion < 1.8\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tt1.start();\r\n\t}", "public static JSqVM sq_newthread(JSqVM friend, int initialStackSize) throws JSquirrelException {\r\n\t\tlong handle = sq_newthread_native(friend.m_nativeHandle, initialStackSize);\r\n\t\tif (handle == 0)\r\n\t\t\tthrow new JSquirrelException(\"Could not create a new thread.\");\r\n\t\treturn new JSqVM(handle);\r\n\t}", "private VirtualThread createThread(String threadName) {\n\t\tJavaObjectReference threadObj = new JavaObjectReference(new LazyClassfile(\"java/lang/Thread\"));\n\t\t\n\t\t// TODO: We should invoke constructors here...\n\t\tthreadObj.setValueOfField(\"priority\", new JavaInteger(1));\n\t\tthreadObj.setValueOfField(\"name\", JavaArray.str2char(vm,threadName));\n\t\tthreadObj.setValueOfField(\"group\", new JavaObjectReference(bcl.load(\"java/lang/ThreadGroup\")));\n\t\t\n\t\tmainThread = new VirtualThread(vm, rda, threadName, threadObj);\n\t\tthreadAreas.add(mainThread);\n\t\treturn mainThread;\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(mThread==null){\n\t\t\t\t\tmThread=new Thread(runnable);\n\t\t\t\t\tmThread.start();\n\t\t\t\t}else{\n\t\t\t\t\tToast.makeText(getApplication(), getApplication().getString(R.string.thread_started), Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\t\t}", "private void initThread(String user, String pass){\n AutomatedClient c = new AutomatedClient(user, pass);\n Thread t = new Thread(c);\n threads.put(user, t);\n clients.put(user, c);\n t.start();\n }", "public Thread getThread(int type, String name, Runnable r);", "@Override\n // Thread creation\n // Run method from the Runnable class.\n public void run() {\n p.println(\"Current thread = \" + Thread.currentThread().getName());\n // Shows when a task is being executed concurrently with another thread,\n // then puts the thread to bed (I like saying that)\n try {\n p.println(\"Doing a task during : \" + name);\n Thread.currentThread().sleep(time);\n }\n // Exception for when a thread is interrupted.\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "private Thread createThread() {\n return new Thread(this::_loadCatalog, \"CDS Hooks Catalog Retrieval\"\n );\n }", "public static void main(String[] args) {\n Thread thread = new Thread(\"New Thread\") {\n public void run(){\n System.out.println(\"run by: \" + getName());\n }\n };\n\n thread.start();\n System.out.println(thread.getName());\n\n }", "protected Thread createPlayerThread()\n\t{\n\t\treturn new Thread(this, \"Audio player thread\");\t\n\t}", "public void startNewThread(String title, String message) {\n\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\".//*[@ng-click='jumpToReply()']\")));\n\t\tdriver.findElement(By.xpath(\".//*[@ng-click='jumpToReply()']\")).click();\n\t}", "private static void createThreadUsingAnonymousInnerClass() {\n\t\tRunnable rn = new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\"My Anonymous Inner Class thread is executed.\");\n\t\t\t}\n\t\t};\n\n\t\tThread th = new Thread(rn);\n\t\tth.start();\n\t}", "public Thread addPerson(int sourceFloor, int destinationFloor) {\r\n\r\n /**\r\n * Important to add code here to make a\r\n * new thread that runs your person-runnable\r\n * \r\n * Also return the Thread object for your person\r\n * so that it can be reaped in the testSuite\r\n * (you don't have to join() yourself)\r\n */\r\n\r\n Thread thread = new Thread(new Person(sourceFloor, destinationFloor));\r\n thread.start();\r\n\r\n incrementNumberOfPeopleWaitingAtFloor(sourceFloor);\r\n \r\n\r\n return thread;\r\n }", "public abstract AbstractSctlThreadEntry addThread();", "NetThread(){}", "private void startRunnableThread() {\n customRunnable = new CustomRunnable();\n customThread = new CustomThread(customRunnable);\n customRunnable.setTag(customThread.tag);\n customThread.start();\n\n }", "public Thread getThread();", "private void newListener() {\n (new Thread(this)).start();\n }", "public TicketBoothClient()\n {\n Thread myThread = new Thread(this);\n myThread.start();\n }", "public static void main(String[] args) {\n\t\tThread t1 = Thread.currentThread();\n\t\t\n\t\t// Get the thread group of the main thread \n\t\tThreadGroup tg1 = t1.getThreadGroup();\n\t\t\n\t\tSystem.out.println(\"Current thread's name: \" + t1.getName());\n\t\tSystem.out.println(\"Current thread's group name: \" + tg1.getName());\n\t\t\n\t\t// Creates a new thread. Its thread group is the same that of the main thread.\n\t\tThread t2 = new Thread(\"my new thread\");\n\n\t\tThreadGroup tg2 = t2.getThreadGroup();\n\t\tSystem.out.println(\"New thread's name: \" + t2.getName());\n\t\tSystem.out.println(\"New thread's group name: \" + tg2.getName());\n\t}", "public JanelaThread() {\n initComponents();\n }", "default CompletableFuture<ServerThreadChannel> createThread(ChannelType channelType, String name,\n AutoArchiveDuration autoArchiveDuration,\n Boolean inviteable) {\n return createThread(channelType, name, autoArchiveDuration.asInt(), inviteable);\n }", "@Override\n public void onClick(View v) {\n new TerminalThread(etInput.getText().toString(), 2).start();\n }", "public static void main(String[] args) {\n\t\tMyThread mt = new MyThread();\n\t\t// We can assign a name\n\t\tmt.setName(\"Thread 1\");\n\t\tmt.start();\n\t\t\n\t\tMyThreads2 mt2 = new MyThreads2();\n\t\tThread t = new Thread(mt2);\n\t\t\n\t\t//New Thread\n\t\tThread t2 = new Thread(mt2);\n\t\tThread t3 = new Thread(mt2); \n\t\tt.setName(\"Thread 2\");\n\t\tt2.setName(\"Thread 3\");\n\t\tt3.setName(\"Thread 4\");\n\t\tt.start();\n\t\tt2.start();\n\t\tt3.start();\n\t\t\n\t}", "public static void main(String[] args) {\n\t\n System.out.println(ANSI_Black+\"Hello from Main thread\");\n\tThread extendThread = new ThreadExtendsExample();\n\textendThread.setName(\"ThreadByExtends1~\");\n\textendThread.start();\n\t\n\t//java.lang.IllegalThreadStateException, same thread cannot be started again\n\t//extendThread.start();\n\tThread extendThread2 = new ThreadExtendsExample();\n\textendThread2.setName(\"ThreadByExtends2~\");\n\textendThread2.start();\n\t\n\t\n\t\n\tThreadImplExample implThread = new ThreadImplExample();\n\timplThread.run();\n\t\n\t\n\tThread runnableThread = new Thread(new ThreadImplExample());\n\trunnableThread.start();\n\t\n\t\n\t\n\tSystem.out.println(ANSI_Black+\"Hello Again from Main thread\");\n\t\n}", "private void startNormalThread() {\n customThread = new CustomThread();\n customThread.start();\n }", "private void startThread()\n {\n if (workerThread == null || !workerThread.isLooping())\n {\n workerThread = new LiveViewThread(this);\n workerThread.start();\n }\n }", "public void setThread(Thread t);", "public JavaHandlerThread(String name) {\n mThread = new HandlerThread(name);\n }", "public static void runNewDaemon(String name, Runnable r) {\n\t\tThread t = new Thread(r);\n\t\tif(!name.isEmpty()) {\n\t\t\tt.setName(name);\n\t\t\tlog.debug(\"Launching Thread \\\"\" +name+ \"\\\"\");\n\t\t}\n\t\tt.setDaemon(true);\n\t\tt.start();\n\t}", "default CompletableFuture<ServerThreadChannel> createThread(ChannelType channelType, String name,\n AutoArchiveDuration autoArchiveDuration) {\n return createThread(channelType, name, autoArchiveDuration.asInt(), null);\n }", "default CompletableFuture<ServerThreadChannel> createThread(ChannelType channelType, String name,\n Integer autoArchiveDuration) {\n return createThread(channelType, name, autoArchiveDuration, null);\n }", "public static void main(String[] args) {\n Thread thread=new Thread(new MyRunnable(),\"firstThread\");\n thread.start();\n System.out.println(thread.getName());\n }", "public void toThread() {\n\t\t// TODO Auto-generated method stub\n\t\tnew Thread(this).start();\n\t\tclient.start();\n\t}", "public void start ()\n {\n Thread th = new Thread (this);\n // start this thread\n th.start ();\n\n }", "public IMThread(String threadName, Integer urlid, ArrayList<String> keys){\n this.name = threadName;\n this.selectedUrlId = urlid;\n this.keyArrayList = keys;\n /*t = new Thread(this,name);\n t.start();*/\n}", "public static void main(String[] args) {\n\t\tThreadTest test= new ThreadTest();\n\t\ttest.start();\n\t\t\n\t\t// creating thread by implementing Runnable interface\n\t\tRunnable runnable = new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\" Creating thread by implement Runnable Interface\");\n\t\t\t}\n\t\t};\n\t\t\t\n\t\tThread test2 = new Thread(runnable);\n\t\ttest2.start();\n\t\t\n\t\t// Runnable is a Functional Interface which having only one abstract method\n\t\tRunnable functionalInterface = ()-> System.out.println(\" creating thread using lembda expression\");\n\t\tThread test3 = new Thread(functionalInterface);\n\t\ttest3.start();\n\t\t\n\n\n\t\t\n\t}", "void threadAdded(String threadId);", "private void launchPongManagerThread() {\n \t\tPongManager pongManager = new PongManager(this, listenAddress);\n \t\tfinal Thread t = this.listenChannel.getThreadFactory().newThread(pongManager);\n \t\tt.setName(\"Pong Server Manager\");\n \t\tt.start();\n \t}", "default CompletableFuture<ServerThreadChannel> createThread(ChannelType channelType, String name,\n Integer autoArchiveDuration,\n Boolean inviteable) {\n return new ServerThreadChannelBuilder(this, channelType, name)\n .setAutoArchiveDuration(autoArchiveDuration)\n .setInvitableFlag(inviteable).create();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tnew Thread(new Runnable() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tmFaceManager.createPerson(\"hello\", \"first_group\");\n\t\t\t\t\t\tmResult = mFaceManager.getmResult();\n\t\t\t\t\t}\n\t\t\t\t}).start();\n\t\t\t}", "public void startThread(){\n\t\trunning = true;\n\t\tthread = new Thread(this);\n\t\tthread.start();\n\t}", "public Thread startThread() {\n Thread thread = createThread();\n thread.start();\n return thread;\n }", "public static void main(String args[ ]){\r\nMythread rt = new Mythread(); /* main thread created the runnable object*/\r\nThread t = new Thread(rt); /*main thread creates child thread and passed the runnable object*/\r\nt.start();\r\nfor(int i=0; i<10; i++){\r\nSystem.out.println(\"Main Thread\");\r\n}\r\n}", "@RequestMapping(value = \"/threads\",\n method = RequestMethod.POST,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n @ResponseStatus(HttpStatus.CREATED)\n @ApiOperation(value = \"Create a new thread\")\n public Thread create(@RequestBody Thread thread) throws KalipoException {\n log.debug(\"REST request to save Thread : {}\", thread);\n\n if (thread.getId() == null) {\n return threadService.create(thread);\n } else {\n return threadService.update(thread);\n }\n }", "private void startThreads() {\n Listener listener = new Listener();\n Thread listenerThread = new Thread(listener);\n\n listenerThread.start();\n }", "tut65(int numero){\n\t\tthis.numero=numero; //me guardo un numero\n\t\t\n\t\tThread thread = new Thread(this); //Pasarle como parametro la clase runnable\n\t\tthread.start();\n\t}", "public void newTask() {\r\n\r\n todoTaskGui(\"Create\", null);\r\n }", "public void start() {\n thread = new Thread(this);\n thread.start();\n System.out.println(\"---\\t Ober \" + naam + \" is gestart.\");\n }", "public MainThread()\n {\n super();\n setPriority(1);\n setId(0x55); \n }", "public static void main(String[] args) {\n Employee emp=new Employee();\n emp.start();\n Student stu=new Student();\n Thread t1=new Thread(stu);\n t1.start();\n\t}", "public QueryThread(User u) {\n \tuser = u;\n }", "private static void createThreadUsingLambdaExpressions() {\n\t\tRunnable r = () -> {System.out.println(\"Lambda Expression thread is executed.\");};\n\t\tThread t = new Thread(r);\n\t\tt.start();\n\t}", "public void startThread() {\n\t\tif (this.serverConnectorUsed <= Byte.MAX_VALUE) {\n\t\t\tthis.serverConnectorUsed++;\n\t\t\tLOG.info(\"Running new thread. Now pool is \"+Integer.toString(MAX_THREADS-this.serverConnectorUsed)+\" / \"+Integer.toString(MAX_THREADS));\n\t\t}\n\t}", "public ThreadNameWithRunnable(String name, int n) {\n\t\t// Give a name to the thread\n\t\tt = new Thread(this, name);\n\n\t\t// sleepTime\n\t\tsleepTime = n;\n\n\t\t// Start the thread\n\t\tt.start();\n\t}", "public static void main(String[] args) {\r\n int n = getUserInput(); \r\n ConwayView view = new ConwayView(n);\r\n ConwayModel model = new ConwayModel(n);\r\n ConwayController controller = new ConwayController(n , model, view);\r\n view.setVisible(true);\r\n controller.initializeGame();\r\n\t\tstartThreads(controller, n);\r\n }", "public void startThread(View view) {\n //startNormalThread();\n startRunnableThread();\n }", "private void start() {\r\n\t\tif (running)\r\n\t\t\treturn;\r\n\t\trunning = true;\r\n\t\tthread = new Thread(this);//creates threat to run program on\r\n\t\tthread.start();\r\n\t}", "public void add() {\n\t\tthis.inferior.addThread(this);\n\t\tthis.manager.addThread(this);\n\t\tstate.addChangeListener((oldState, newState, pair) -> {\n\t\t\tmanager.event(() -> manager.listenersEvent.fire.threadStateChanged(this, newState,\n\t\t\t\tpair.cause, pair.reason), \"threadState\");\n\t\t});\n\t}", "public static void main(String[] args) {\n Reasoning newReasoning = new Reasoning();\n newReasoning.start();\n TeamTC1 teamTC1 = new TeamTC1();\n Thread myTeam = new Thread(teamTC1);\n myTeam.setName(\"team v8\");\n myTeam.start();\n }", "private void start(){\n isRunning = true;\n thread = new Thread(this);\n thread.start();\n }", "public abstract Thread startSession();", "private void go() {\n\n new Thread(this).start();\n }", "protected void createContents() throws UnknownHostException, IOException, InterruptedException {\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tshlUser = new Shell();\r\n\t\tshlUser.setSize(450, 464);\r\n\t\tshlUser.setText(\"QQ聊天室\\r\\n\");\r\n\t\t\r\n\t\ttext = new Text(shlUser, SWT.BORDER);\r\n\t\ttext.setEnabled(false);\r\n\t\ttext.setBounds(0, 52, 424, 187);\r\n\t\t\r\n\t\t\r\n\t\ttext_1 = new Text(shlUser, SWT.BORDER);\t\t\r\n\t\ttext_1.setBounds(23, 263, 274, 23);\r\n\t\t\r\n\t\tButton button = new Button(shlUser, SWT.CENTER);\r\n\t\tbutton.setText(\"发送\");\r\n\t\tbutton.setBounds(321, 257, 80, 27);\r\n\t\t\r\n\t\ttext_2 = new Text(shlUser, SWT.BORDER);\r\n\t\ttext_2.setText(\"abc\");\r\n\t\ttext_2.setBounds(61, 7, 91, 23);\r\n\t\t\r\n\t\tLabel lblNewLabel = new Label(shlUser, SWT.NONE);\r\n\t\tlblNewLabel.setBounds(0, 10, 51, 17);\r\n\t\tlblNewLabel.setText(\"昵称:\");\r\n\t\t\r\n\t\tButton btnNewButton = new Button(shlUser, SWT.NONE);\r\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tnew Thread() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t// 连接服务器\r\n\t\t\t\t\t\t\t\tsocket = new Socket(\"127.0.0.1\", 8888);\r\n\t\t\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t\t\t// 如果连不上服务器,说明服务器未启动,则启动服务器\r\n\t\t\t\t\t\t\t\tserver = new ServerSocket(8888);\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"服务器启动完成,监听端口:8888\");\r\n\t\t\t\t\t\t\t\tsocket = server.accept();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t\t * 注意:所有在自定义线程中修改图形控件属性,\r\n\t\t\t\t\t\t\t * 都必须使用 shell.getDisplay().asyncExec() 方法\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\tshlUser.getDisplay().asyncExec(new Runnable() {\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tMessageBox mb = new MessageBox(shlUser,SWT.OK);\r\n\t\t\t\t\t\t\t\t\tmb.setText(\"系统提示\");\r\n\t\t\t\t\t\t\t\t\tmb.setMessage(\"连接成功!现在你可以开始聊天了!\");\r\n\t\t\t\t\t\t\t\t\tmb.open();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\ttalker = new Talker(socket, new MsgListener() {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void onMessage(String msg) {\r\n\t\t\t\t\t\t\t\t\t// 收到消息时,将消息更新到多行文本框\r\n\t\t\t\t\t\t\t\t\tshlUser.getDisplay().asyncExec(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\ttext.setText(text.getText() + msg + \"\\r\\n\");\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void onConnect(InetAddress addr) {\r\n\t\t\t\t\t\t\t\t\t// 连接成功时,显示对方IP\r\n\t\t\t\t\t\t\t\t\tshlUser.getDisplay().asyncExec(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\tlblNewLabel.setText(\"好友IP:\" + addr.getHostAddress());\r\n\t\t\t\t\t\t\t\t\t\t\ttext.setEnabled(true);\r\n\t\t\t\t\t\t\t\t\t\t\tbutton.setEnabled(true);\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\t} catch (IOException e) {\r\n\t\t\t\t\t\t\tthrow new RuntimeException(e);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}.start();\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\ttMsg = new Text(shlUser, SWT.BORDER);\r\n\t\ttMsg.setEnabled(false);\r\n\t\ttMsg.setBounds(10, 364, 414, 26);\r\n\r\n\t\t\r\n\t\tbtnNewButton.setBounds(324, 7, 80, 27);\r\n\t\tbtnNewButton.setText(\"连接服务器\");\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (tMsg.getText().trim().isEmpty() == false) {\r\n\t\t\t\t\t\tString msg = talker.send(text_2.getText(), tMsg.getText());\r\n\t\t\t\t\t\ttext.setText(text.getText() + msg + \"\\r\\n\");\r\n\t\t\t\t\t\ttMsg.setText(\"\");\r\n\t\t\t\t\t\t// 设置焦点\r\n\t\t\t\t\t\ttMsg.setFocus();\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t}", "public static void main(String[] arg) throws Throwable {\n\t\t(new File(LOCATION)).mkdir();\n\t\tJavaClient client = new JavaClient();\n\t\texecutor = Executors.newCachedThreadPool();\n\t\twhile(count<NUM_USERS){\t\t\t\n\t\t\texecutor.execute(new Thread(client));\n\t\t}\n\t\t\n\t}", "public void actionPerformed(ActionEvent e)\n {\n // check thread is really finished\n if (testThread != null)\n logger.log(Level.INFO, \"testThread.isAlive()==\" + testThread.isAlive());\n else\n logger.log(Level.INFO, \"testThread==null\");\n\n // create Thread from Runnable (WorkTask)\n testThread = new Thread(new WorkerTask(null));\n // make sure thread will be killed if app is unexpectedly killed\n testThread.setDaemon(true);\n testThread.start();\n }", "public void start(){\r\n\t\tnew Thread(\r\n\t new Runnable() {\r\n\t public void run() {\r\n\t \twhile(true){\r\n\t \t\t try {\r\n\t \t Thread.sleep(200);\r\n\t \t } catch (Exception e) {\r\n\t \t e.printStackTrace();\r\n\t \t }\r\n\t \t // Functions.DEBUG(\r\n\t \t // \"child thread \" + new Date(System.currentTimeMillis()));\r\n\t \t repaint();\r\n\t \t}\r\n\t }\r\n\t }).start();\r\n\t}", "@FXML\n final void btnNewGamePress() {\n new Thread(() -> sceneHandler.setActiveScene(GameScene.GAME_TYPE_SELECT)).start();\n }", "public MetaAgent(String name)\n {\n this.name = name;\n Thread td = new Thread(new Runnable()\n {\n @Override\n public void run()\n {\n while (true)\n {\n try\n {\n msgHandler(take());\n } catch (InterruptedException e)\n {\n e.printStackTrace();\n System.out.println(\"Probably not possible to get this error.\");\n }\n }\n }\n });\n td.start();\n }", "netthread(String url,Handler h) {\n this.urlstring = url;\n this.ntthrd_handler = h;//指定activity\n }", "private void addThread(SSLSocket socket)\n {\n if(pop < clist.length)\n {\n for(ServerThread srv : clist)\n {\n if(srv == null)\n {\n //make a new thread to run data through to new client\n srv = new ServerThread(this, socket);\n \n try\n {\n //start up the thread\n srv.open();\n start();\n \n //set everything up here (increment pop count, keep track of thread)\n clist[pop] = srv;\n pop++;\n break;\n }\n catch(IOException e)\n {\n System.out.println(\"Cannot open new thread\");\n }\n \n \n }\n \n }\n System.out.println(\"New Connection: \" + socket);\n\n }\n else\n {\n System.out.println(\"Sorry, server full at \" + pop);\n }\n }", "public void start() {\n\t\tmyThread = new Thread(this); myThread.start();\n\t}", "@Override\n public void run() {\n while (!stopWork) {\n try {\n Thread.sleep(5000);\n User u = new User();\n SystemManager.addToAllUsers(u);\n System.out.println(\"New User created account.\");\n executor.submit(u);\n } catch (InterruptedException ex) {\n Logger.getLogger(Daemon.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public static void main(String[] args) {\n \r\n Runnable doCreateAndShowGUI = new Runnable() {\r\n public void run() {\r\n createAndShowGUI();\r\n }\r\n };\r\n SwingUtilities.invokeLater(doCreateAndShowGUI);\r\n }", "@FXML\r\n\tpublic void clsTeacherMain() {\r\n\t\tMyThread a = new MyThread(RequestType.LOGOUT, IndexList.LOGOUT,\r\n\t\t\t\tMsgFromServer.getDataListByIndex(IndexList.LOGIN));\r\n\t\ta.start();\r\n\t\ttry {\r\n\t\t\ta.join();\r\n\t\t} catch (InterruptedException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tconnectionmain.showLogin();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void run() {\n User user = userFactory.create();\n queue.add(user);\n }", "public void startThread(){\n String message = \"Connecting to RescueNet...Please Wait\";\n showProgressDialog(message);\n connectionThread = new ConnectionThread(mwifiAdmin, handlerMain);\n connectionThread.start();\n }", "public static void spielstart() {\n\n\t\tThread thread = new Thread() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tgameboard = new GameFrame();\n\n\t\t\t}\n\t\t};\n\n\t\tthread.start();\n\n\t}", "public DisplayThread(AccountDisplay accountDisplay, String name, List<String> pastMessages) {\n this.accountDisplay = accountDisplay;\n threadName = name;\n\n history = new GridPane();\n history.getStyleClass().add(\"message-thread\");\n populateHistory(pastMessages);\n thread = new BorderPane();\n thread.setTop(new Text(name));\n thread.getStyleClass().add(\"thread-header\");\n //https://stackoverflow.com/questions/13156896/javafx-auto-scroll-down-scrollpane\n ScrollPane scrollPane = new ScrollPane(history);\n scrollPane.vvalueProperty().bind(history.heightProperty());\n thread.setCenter(scrollPane);\n setUpOutbox();\n }", "public void start () {\r\n // Declaras un hilo\r\n Thread th = new Thread (this);\r\n // Empieza el hilo\r\n th.start ();\r\n }", "public static void main(String[] args) {\n \n Runnable executable = new Runnable() {\n public void run() {\n finestrabenvinguda finestrabenvinguda2 = new finestrabenvinguda();\n finestrabenvinguda2.setVisible(true);\n }\n };\n \n Thread tarea = new Thread(executable);\n tarea.start();\n }", "public static void main(String[] args) {\n\t\tThread t = new Thread(new MyRunnable1());// 新建状态\n\t\tt.start();// 就绪状态\n\t\ttry {\n\t\t\tt.sleep(5000);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tnew MyRunnable1().setStop();// 线程停止\n\t}", "public static void main(String[] args) {\n\r\n System.out.println(Thread.currentThread().getName());\r\n System.out.println(Thread.currentThread().getId());\r\n\r\n MyFirstThread helloThread1 = new MyFirstThread();\r\n MyFirstThread helloThread2 = new MyFirstThread();\r\n helloThread1.start();\r\n helloThread2.start();\r\n\r\n\r\n }", "private void startBackgroundThread() {\n mThread = new HandlerThread(getString(R.string.app_name));\n mThread.start();\n Timber.d(\"Background thread started successfully\");\n mHandler = new Handler(mThread.getLooper());\n }", "void start() {\n\tsleepThread = new Thread(this);\n\tsleepThread.start();\n }", "public static void initCommunicationClientThread(){\r\n new CommunicationClientThread();\r\n }" ]
[ "0.7933865", "0.7025495", "0.6972341", "0.67661905", "0.67608786", "0.66807926", "0.66427124", "0.6612596", "0.6547119", "0.65282047", "0.6447171", "0.6442953", "0.6398694", "0.6386863", "0.63799024", "0.63003004", "0.6293518", "0.606281", "0.6034572", "0.6024343", "0.6018281", "0.5971813", "0.59663886", "0.59443945", "0.59305876", "0.592546", "0.5918576", "0.5906529", "0.58985287", "0.5858791", "0.5845844", "0.584206", "0.5832864", "0.5823483", "0.58006525", "0.57998717", "0.5796334", "0.5765101", "0.57603616", "0.5754064", "0.57478887", "0.57420915", "0.5740566", "0.5729363", "0.5728651", "0.57227653", "0.57143253", "0.571314", "0.57080126", "0.5701846", "0.5695367", "0.56806034", "0.56799585", "0.5654823", "0.5648677", "0.564089", "0.56371105", "0.56339085", "0.5623481", "0.5620135", "0.561402", "0.56087613", "0.5602216", "0.55950713", "0.55877763", "0.557444", "0.5566733", "0.55570096", "0.5556832", "0.5553978", "0.5551186", "0.55484074", "0.5547421", "0.55336297", "0.5518018", "0.55164325", "0.5511771", "0.55066246", "0.55042094", "0.5489953", "0.5488458", "0.54872465", "0.548149", "0.54647195", "0.5461795", "0.5457853", "0.54575413", "0.54427916", "0.5442662", "0.5438939", "0.542837", "0.542517", "0.54244494", "0.54236513", "0.5414573", "0.54098105", "0.54077053", "0.5403636", "0.53842205", "0.53837717" ]
0.61801136
17
public Pedido findByNome(String pedido); public Optional findById(Long id);
@Query("select p from Pedido p where p.desc =?1") public Pedido buscarPedidoPorDescricao(String desc);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Optional<ItemPedido> findOne(Long id);", "@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)\n\t\tpublic ResponseEntity<Optional<Pedido>> find(@PathVariable Integer id) {\n\t\t\tOptional<Pedido> obj = service.find(id);\n\t\t\treturn ResponseEntity.ok().body(obj);\n\t\t}", "public Optional<Persona> findById(Long id);", "Optional<Palestra> findByNomePalestra(String nome);", "@Override\r\n\tOptional<Product> findById(String id);", "@Query(value = \"SELECT * FROM produtos WHERE prd_id = ?\", nativeQuery = true)\r\n public ProdutosModel findOneById (Integer id);", "public Optional<User> findById(Integer id);", "Optional<Order> findById(Long orderId);", "Optional<Consulta> findOne(Long id);", "@Override\r\n public Optional<Product> findbyId(Long id) {\r\n return productRepository.findById(id);\r\n }", "Optional<ParaUserDTO> findOne(Long id);", "@Override\n\tpublic Optional<Opcion> findById(Integer id) throws Exception {\n\t\treturn opcionRepository.findById(id);\n\t}", "Optional<Person> findOne(Long id);", "Optional<User> findById(long id);", "@Query(value = \"SELECT * FROM produtos WHERE prd_nome = ?\", nativeQuery = true)\r\n public ProdutosModel findOneByNome (String nome);", "@Override\n public Optional<T> findById(ID id) {\n T entity = getSession().get(this.getPersistentClass(), id);\n return Optional.ofNullable(entity);\n }", "Optional<T> findOne(K id);", "SeminarioDTO findOne(Long id);", "@Override\n\tpublic Pedido findOne(Long arg0) {\n\t\treturn null;\n\t}", "Optional<T> getEntityById(ID_TYPE id);", "Optional<T> find(long id);", "@Override\n\tpublic Optional<Product> findById(Long id) {\n\t\t return productRepository.findById(id);\n\t}", "Optional<Partner> findById(Long id);", "public Optional<Cliente>obtenerId(Long id){\n return clienteRepositori.findById(id);\n }", "Optional<NegozioDTO> findOne(Long id);", "@Override\n\tpublic Optional<Dispositivo> getById(int id) {\n\t\treturn dispositivoDao.findById(id);\n\t}", "Empleado findById(Integer id);", "Usuario findById(long id);", "Optional<Partner> findByIdAndName(Long id, String name);", "@Transactional(readOnly = true)\n public Optional<UsuarioEncuesta> findOne(Long id) {\n log.debug(\"Request to get UsuarioEncuesta : {}\", id);\n return usuarioEncuestaRepository.findById(id);\n }", "@Transactional(readOnly=true)\n\t@Override\n\tpublic Optional<Paradero> findById(Integer id) throws Exception {\n\t\treturn paraderoRespository.findById(id);\n\t}", "Optional<VitalDTO> findOne(Long id);", "@Override\n @Transactional(readOnly = true)\n public Paciente getById(String id) {\n Optional<Paciente> pacienteContainer = this.pacienteRepository.findById(id);\n if(pacienteContainer.isPresent()){\n return pacienteContainer.get();\n }\n return null;\n }", "Optional<ServiceUserDTO> findOne(Long id);", "Optional<User> findUserById(Long id);", "Optional<Fotografia> findOne(Long id);", "@Override\n\t@Transactional\n\tpublic Optional<DetalleCarrito> findById(Integer id) throws Exception {\n\t\treturn detalleCarritoRepository.findById(id);\n\t}", "public Optional<PessoaDto> encontrar(Long id) {\n\t\tOptional<Pessoa> pessoa = dao.encontrar(id);\n\t\treturn Optional.of(toPessoaDTO(pessoa.get()));\n\t}", "@Transactional(readOnly = true)\n\t@Override\n\tpublic Optional<Persona> findById(Integer id) throws Exception {\n\t\treturn personaRepository.findById(id);\n\t}", "@Override\n @Transactional(readOnly = true)\n public Optional<Avistamiento> findOne(Long id) {\n log.debug(\"Request to get Avistamiento : {}\", id);\n return avistamientoRepository.findOneWithEagerRelationships(id);\n }", "@Override\n\tpublic T findById(Class<T> entidade, Long id) throws Exception {\n\t\treturn null;\n\t}", "Optional<Restaurante> findFirstByNomeContaining(String nome);", "public Optional<CategoriaUsuario> findid(Long id){\n return categoriaUsuarioRepository.findById(id);\n }", "@Override\n @Transactional(readOnly = true)\n public Optional<OrdreDTO> findOne(Long id) {\n log.debug(\"Request to get Ordre : {}\", id);\n return ordreRepository.findById(id)\n .map(ordreMapper::toDto);\n }", "VehiculoEntity findByPlaca(String placa);", "T findOne(I id);", "@Override\n\tpublic Optional<Fournisseur> findById(int id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Optional<Comprobante> findById(Integer id) throws Exception {\n\t\treturn comproRepository.findById(id);\n\t}", "BeanPedido getPedido(UUID idPedido);", "Department findById(long id);", "@Transactional(readOnly = true)\n public Optional<PizzaOrder> findOne(Long id) {\n log.debug(\"Request to get PizzaOrder : {}\", id);\n return pizzaOrderRepository.findById(id);\n }", "Optional<User> findById(Long userId);", "T findById(Integer id);", "@GetMapping(\"/{id}\") // método http enviado para a nossa api\n\tpublic ResponseEntity<Postagem> GetById(@PathVariable long id) { // método pegar por id //Pathvariabe: caminho da variável da url\n\t\treturn repositoty.findById(id) // esse método pode devolver tanto postagem, quanto um not found caso o objeto não exista ou exista um erro na requisição\n\t\t\t\t.map(resp -> ResponseEntity.ok(resp)) // caso capture resposta positiva, devolver como recurso na requisição\n\t\t\t\t.orElse(ResponseEntity.notFound().build()); // caso n tiver dados \n\t\t//assim que for feita alguma requisição do tipo get em \"/postagens\", e se passar um atributo, no caso o id, vai ser acessado este método que irá capturar qual é a variável que estamos recebendo dentro do @pathvariable, assim, retornando a interface injetada com @autowired\n\t}", "@Transactional(readOnly = true)\n public Optional<Fonction> findOne(Long id) {\n log.debug(\"Request to get Fonction : {}\", id);\n return fonctionRepository.findById(id);\n }", "T findOne(Long id);", "@Transactional(readOnly = true)\n public Optional<SolicitacaoExameDTO> findOne(Long id) {\n log.debug(\"Request to get SolicitacaoExame : {}\", id);\n return solicitacaoExameRepository.findById(id)\n .map(solicitacaoExameMapper::toDto);\n }", "@Query(value = \"SELECT * FROM proveedor WHERE id=:id\", nativeQuery = true)\n public Proveedor obtenerPorId(@Param(\"id\") int id);", "CapituloDTO findOne(Long id);", "Optional<TypeBonDTO> findOne(Long id);", "Optional<CheckoutProduct> findById(int id);", "Optional<Company> findOneById(String id);", "Optional<CardDTO> findOne(String id);", "Optional<Person> findByPersonId(String personId);", "Optional<SygTypeServiceDTO> findOne(Long id);", "@GraphQLQuery(name = \"food\")\n public Optional<Food> getFoodById(@GraphQLArgument(name = \"id\") Long id) {\n return foodRepository.findById(id);\n }", "@Override\n\tpublic Optional<MedioPago> findbyid(Integer id) {\n\t\treturn null;\n\t}", "@Transactional(readOnly = true)\n public Optional<HarnaisDTO> findOne(Long id) {\n log.debug(\"Request to get Harnais : {}\", id);\n return harnaisRepository.findById(id)\n .map(harnaisMapper::toDto);\n }", "Optional<MovieCinema> findById(Long id);", "Repository findById(Integer id);", "@Override\n public AlunoDTO findOne(String id) {\n log.debug(\"Request to get Aluno : {}\", id);\n Aluno aluno = alunoRepository.findOne(id);\n return alunoMapper.toDto(aluno);\n }", "Optional<ShipmentInfoPODDTO> findOne(Long id);", "@GetMapping(\"/{idDinheiro}\")\n public Dinheiro findById(@PathVariable Long idDinheiro){\n return dinheiroRepository.findById(idDinheiro).get();\n }", "Optional<UsersDTO> findOne(Long id);", "@Override\r\n\t@Transactional(readOnly=true)\r\n\tpublic Orden findById(Long id) {\n\t\treturn ordenRepository.findById(id).orElse(null);\r\n\t}", "@Override\n\tpublic SeguUsuario findById(Long id) {\n\t\treturn usuarioDao.findById(id).orElse(null);\n\t}", "@Override\n\tpublic Optional<Cliente> findById(int id) throws Exception {\n\t\treturn clienteRepository.findById(id);\n\t}", "@Transactional(readOnly = true)\n public Optional<KohnegiDTO> findOne(Long id) {\n log.debug(\"Request to get Kohnegi : {}\", id);\n return kohnegiRepository.findById(id)\n .map(kohnegiMapper::toDto);\n }", "@Override\n\tpublic ResponseEntity<?> findOne(Long id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic PI findById(Long id) throws NotFoundException {\n\t\treturn null;\n\t}", "public Data findById(Object id);", "Optional<EtatOperation> findOne(Long id);", "@GetMapping(\"/mapeamentos/{id}\")\n @Timed\n public ResponseEntity<Mapeamento> getMapeamento(@PathVariable Long id) {\n log.debug(\"REST request to get Mapeamento : {}\", id);\n Mapeamento mapeamento = mapeamentoRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(mapeamento));\n }", "@Override\n @Transactional(readOnly = true)\n public Optional<PomocniMaterijal> findOne(Long id) {\n log.debug(\"Request to get PomocniMaterijal : {}\", id);\n return pomocniMaterijalRepository.findById(id);\n }", "@Override\n Optional<Complaint> findById(Integer id);", "@Repository\r\npublic interface DepartmentRepository extends JpaRepository<Department, Integer>\r\n{\r\n\t\r\n\t/**\r\n\t * utilise la methode findById du CrudRepository en utilisant le nom du service comme parametre\r\n\t * \r\n\t * @param nameDepartment\r\n\t * @return une service\r\n\t */\r\n\t\r\n\tpublic Department findByNameDepartment(String nameDepartment);\r\n\r\n\tpublic Department findByIdDepartment(Integer idDepartment);\r\n\t\r\n}", "public abstract T findOne(int id);", "Optional<RequestOtherNiazsanjiDTO> findOne(Long id);", "Optional<Asignatura> findAsignaturaById(AsignaturaId id);", "Corretor findOne(Long id);", "@GetMapping(value = \"/{id}\")\n\tpublic ResponseEntity<Response<PedidoDto>> listarPorId(@PathVariable(\"id\") Long id) {\n\t\tlog.info(\"Buscando pedido por ID: {}\", id);\n\t\tResponse<PedidoDto> response = new Response<PedidoDto>();\n\t\tOptional<Pedido> pedido = this.pedidoService.buscarPorId(id);\n\n\t\tif (!pedido.isPresent()) {\n\t\t\tlog.info(\"Pedido não encontrado para o ID: {}\", id);\n\t\t\tresponse.getErrors().add(\"Pedido não encontrado para o id \" + id);\n\t\t\treturn ResponseEntity.badRequest().body(response);\n\t\t}\n\n\t\tresponse.setData(pedidoService.converterPedidoDto(pedido.get()));\n\t\treturn ResponseEntity.ok(response);\n\t}", "public Optional<Employee> getEmployee(Long id){\n return employeeRepository.findById(id);\n }", "Optional<User> findUser(int id) throws ServiceException;", "public Pessoa find(Long id){\n\t\treturn db.findOne(id);\n\t}", "@Override\n @Transactional(readOnly = true)\n public Optional<Kontrachent> findOne(Long id) {\n log.debug(\"Request to get Kontrachent : {}\", id);\n return kontrachentRepository.findById(id);\n }", "Optional<Expert> findOne(Long id);", "Optional<Lancamento> buscarPorId(Long id);", "public Service findById(int theId);", "public Paciente obtenerPorId(long id) {\n return pacienteRepository.findById(id);\n }", "@GetMapping(\"/pets/{id}\")\n public ResponseEntity<Pet> getPet(@PathVariable Long id) {\n log.debug(\"REST request to get Pet : {}\", id);\n Optional<Pet> pet = petService.findOne(id);\n return ResponseUtil.wrapOrNotFound(pet);\n }", "@GetMapping(\"/procesadors/{id}\")\n @Timed\n public ResponseEntity<Procesador> getProcesador(@PathVariable Long id) {\n log.debug(\"REST request to get Procesador : {}\", id);\n Procesador procesador = procesadorRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(procesador));\n }" ]
[ "0.7905731", "0.77748054", "0.76325095", "0.72882247", "0.71620226", "0.7121431", "0.7020709", "0.70140785", "0.6999703", "0.6957633", "0.69224846", "0.69187313", "0.6903613", "0.6898698", "0.68622524", "0.6862138", "0.68556744", "0.6849662", "0.68488973", "0.6847523", "0.6786136", "0.67851305", "0.6782713", "0.6769464", "0.67694414", "0.67693627", "0.67690086", "0.67516184", "0.6729857", "0.67173463", "0.67067844", "0.67043823", "0.66778326", "0.6664539", "0.6644377", "0.66381323", "0.663124", "0.66190416", "0.66133523", "0.6597147", "0.6584214", "0.6583849", "0.65809774", "0.65748197", "0.65705407", "0.6557359", "0.6548685", "0.65393513", "0.6504847", "0.64988863", "0.64974344", "0.64945346", "0.6491641", "0.6490507", "0.64860845", "0.647805", "0.6468723", "0.6466452", "0.6457872", "0.64566594", "0.6455616", "0.6444912", "0.6438804", "0.64331394", "0.64247453", "0.6424596", "0.64234346", "0.64182186", "0.6411275", "0.640076", "0.64007366", "0.6393198", "0.63927305", "0.6373433", "0.6368731", "0.63663113", "0.6350357", "0.6342602", "0.63391095", "0.63274705", "0.6325207", "0.6324893", "0.6323496", "0.6322763", "0.6321909", "0.63186055", "0.63151735", "0.63131845", "0.63103694", "0.63096136", "0.63078576", "0.6307736", "0.63024044", "0.6299912", "0.62991244", "0.6298059", "0.6293832", "0.62883854", "0.62872696", "0.6279935", "0.62737435" ]
0.0
-1
Created by peacewong on 2019/11/2.
public interface ReadJob { Map<String, Object> getSharedNodesInfo(); String getSharedKey(String value); void setSharedNodesInfo(Map<String, Object> sharedNodesInfo); String[] getShareNodeIds(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "public final void mo51373a() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo38117a() {\n }", "@Override\n void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "Petunia() {\r\n\t\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void init() {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "public void mo4359a() {\n }", "private Rekenhulp()\n\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\tpublic void init() {\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n public void init() {}", "private void init() {\n\n\t}", "private UsineJoueur() {}", "public Pitonyak_09_02() {\r\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void gored() {\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 public void init() {\n\n }", "@Override\n public void init() {\n\n }", "public void mo6081a() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "private void m50366E() {\n }", "@Override\n public void initialize() { \n }", "@Override\n protected void init() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "private void kk12() {\n\n\t}", "private void strin() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tpublic void ligar() {\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}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "private TMCourse() {\n\t}", "Consumable() {\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n public int getSize() {\n return 1;\n }" ]
[ "0.6087627", "0.5952069", "0.57108444", "0.57072514", "0.5703574", "0.5703574", "0.5646247", "0.5633668", "0.56295717", "0.55712676", "0.55635065", "0.5555443", "0.55430204", "0.5538536", "0.5533521", "0.551799", "0.55156606", "0.54828197", "0.54815274", "0.5476918", "0.54609334", "0.54426986", "0.54375947", "0.5432668", "0.54232144", "0.54224235", "0.541414", "0.5410018", "0.5409151", "0.5401345", "0.539127", "0.53691196", "0.53691196", "0.53691196", "0.53691196", "0.53691196", "0.53691196", "0.5349404", "0.53481835", "0.5343736", "0.53415996", "0.53415996", "0.53415996", "0.53415996", "0.53415996", "0.5338197", "0.53378356", "0.5336074", "0.5336074", "0.53338933", "0.53098696", "0.53019005", "0.53011334", "0.5298833", "0.52982515", "0.5294349", "0.52857405", "0.5284834", "0.527922", "0.52787566", "0.52787566", "0.52787566", "0.52787566", "0.52787566", "0.52787566", "0.52787566", "0.52776545", "0.5268836", "0.5268836", "0.5268836", "0.5261778", "0.5261778", "0.5250515", "0.5246551", "0.5241831", "0.5241831", "0.52376807", "0.52175814", "0.5209665", "0.5208673", "0.5208673", "0.5208673", "0.5208661", "0.5204195", "0.5201319", "0.51961344", "0.5190492", "0.5190492", "0.5190492", "0.5190374", "0.5189861", "0.5182227", "0.5179666", "0.5179666", "0.5179666", "0.51738185", "0.51729196", "0.51686", "0.51671654", "0.51623213", "0.51576453" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { configGlobals(); configView(inflater, container); configRecycler(); unbinder = ButterKnife.bind(this, view); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
JsonDeserializer objectJsonDeserializer = new JsonDeserializer(Object.class, false); objectJsonDeserializer.addTrustedPackages("");
@Bean public ConsumerFactory<String, String> consumerFactory() { return new DefaultKafkaConsumerFactory<>( kafkaProperties.buildConsumerProperties(), new StringDeserializer(), new StringDeserializer() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private JsonApiEnvelopeDeserializer() {\n super(JsonApiEnvelope.class);\n }", "public abstract Object deserialize(Object object);", "public void deserialize() {\n\t\t\n\t}", "T deserialize(JsonObject json, DynamicDeserializerFactory deserializerFactory) throws ClassNotFoundException;", "T fromJson(Object source);", "public JsonUtil() {\r\n this.jsonSerializer = new JSONSerializer().transform(new ExcludeTransformer(), void.class).exclude(\"*.class\");\r\n }", "public JsonField() {\n }", "protected Object readResolve()\n/* */ {\n/* 353 */ return new JsonFactory(this, this._objectCodec);\n/* */ }", "@SuppressWarnings(\"unchecked\")\n @Override\n public JsonDeserializer<Object> getContentDeserializer() {\n return (JsonDeserializer<Object>) _valueDeserializer;\n }", "Object decodeObject(Object value);", "public interface RandomDeserializer<T> {\n\n /**\n * This is where all the magic happens, given a json part (only the useful part of the json for the specific deserializer) the deserializer is able to create the required object.\n *\n * @author andreahuang\n *\n */\n T deserialize(JsonObject json, DynamicDeserializerFactory deserializerFactory) throws ClassNotFoundException;\n}", "private JsonUtils() {}", "private JSON() {\n\t}", "public interface JSONDeserializer<T> {\n\t\n\t/**\n\t * Deserialize a json string\n\t * @param json object to deserialize\n\t * @return JSON representation as {@link JsonObject}\n\t */\n\tJsonObject deserialise(String json);\n\t\n\t/**\n\t * Unmarshall 'meta' section of the response\n\t * @param meta section represented as {@link JsonObject}\n\t * @return object of generic type T\n\t */\n\tT unmarshallMeta(JsonObject meta);\n\t\n\t/**\n\t * Unmarshall 'response' section of the response\n\t * @param response section represented as {@link JsonObject}\n\t * @return list of objects of generic type T\n\t */\n\tCollection<T> unmarshallResponse(JsonObject response);\n\n}", "public void test_Expose() {\n JsonIterator.deserialize(new GsonCompatibilityMode.Builder().build(),\n \"{\\\"field-1\\\":\\\"hello\\\"}\", TestObject2.class);\n Gson gson = new GsonBuilder()\n .excludeFieldsWithoutExposeAnnotation()\n .create();\n TestObject2 obj = gson.fromJson(\"{\\\"field1\\\":\\\"hello\\\"}\", TestObject2.class);\n assertNull(obj.field1);\n GsonCompatibilityMode config = new GsonCompatibilityMode.Builder()\n .excludeFieldsWithoutExposeAnnotation()\n .build();\n obj = JsonIterator.deserialize(config,\n \"{\\\"field1\\\":\\\"hello\\\"}\", TestObject2.class);\n assertNull(obj.field1);\n }", "private JSONHelper() {\r\n\t\tsuper();\r\n\t}", "private DatasetJsonConversion() {}", "@Override\n public boolean isObject() {\n return false;\n }", "public ObjectMapper() {\n this.typeConverter = null;\n }", "Gson() {\n }", "private static Serde<VehiclePosition> getJsonSerde(){\n Map<String, Object> serdeProps = new HashMap<>();\n serdeProps.put(\"json.value.type\", VehiclePosition.class);\n final Serializer<VehiclePosition> vpSerializer = new KafkaJsonSerializer<>();\n vpSerializer.configure(serdeProps, false);\n \n final Deserializer<VehiclePosition> vpDeserializer = new KafkaJsonDeserializer<>();\n vpDeserializer.configure(serdeProps, false);\n return Serdes.serdeFrom(vpSerializer, vpDeserializer);\n }", "private void setupJsonAdapter(RestAdapter.Builder builder) {\n Gson gson = new GsonBuilder()\n .setExclusionStrategies(new ExclusionStrategy() {\n @Override\n public boolean shouldSkipField(FieldAttributes f) {\n return false;\n }\n\n @Override\n public boolean shouldSkipClass(Class<?> clazz) {\n return false;\n }\n })\n .excludeFieldsWithoutExposeAnnotation()\n .registerTypeAdapterFactory(new ItemTypeAdapterFactory())\n .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)\n .create();\n\n builder.setConverter(new GsonConverter(gson));\n }", "public interface ApiObject {\n\n String toJson();\n\n Object fromJson(JsonObject json);\n}", "public boolean supportsJsonType() {\n return false;\n }", "private JsonUtils() {\n\t\tsuper();\n\t}", "private JsonUtils() { }", "public ClaseJson() {\n }", "@Bean\n public MessageConverter jsonMessageConverter() {\n return new Jackson2JsonMessageConverter();\n }", "<T> T parseToObject(Object json, Class<T> classObject);", "String parseObjectToJson(Object obj);", "@JsonDeserialize(as = FactionLeaderboardImpl.class)\npublic interface FactionLeaderboard extends Leaderboard {\n}", "@Test\n public void readSystemObjectClassPrescription() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"Prescription\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return Prescription properly\", object.getClass(), actual.getClass());\n }", "@Override\n public void resolve(DeserializationContext ctxt) throws JsonMappingException {\n ((ResolvableDeserializer) defaultDeserializer).resolve(ctxt);\n }", "public void setSerializer(Object serializer);", "@Test\n\tpublic void deserializePrivateFieldsWithoutAnyGetterSetter() throws JsonProcessingException\n\t{\t\n\t\tString jsonToDeserialized = \"{\\r\\n\" + \n\t\t\t\t\" \\\"firstName\\\": \\\"Amod\\\",\\r\\n\" + \n\t\t\t\t\" \\\"lastName\\\" : \\\"Mahajan\\\"\\r\\n\" + \n\t\t\t\t\"}\\r\\n\" + \n\t\t\t\t\"\";\n\t\tObjectMapper objectMapper = new ObjectMapper();\n\t\tEmployee_PrivateFieldsWithoutAnyGetterSetterMethods employee_PrivateFieldsWithoutAnyGetterSetterMethods = \n\t\t\t\tobjectMapper.readValue(jsonToDeserialized, Employee_PrivateFieldsWithoutAnyGetterSetterMethods.class);\n\t\tSystem.out.println(employee_PrivateFieldsWithoutAnyGetterSetterMethods);\n\t\t\n\t}", "public interface JsonConverter {\n\n String toJson(Object o) throws IOException;\n\n String toJsonIgnoreException(Object o);\n\n <T> T fromJson(String json, Class<T> type) throws IOException;\n\n <T> T fromJson(String json, TypeData<T> typeData) throws IOException;\n\n <T> T convert(Object o, TypeData<T> typeData) throws IOException;\n}", "private SerializerFactory() {\r\n registerAvailableSerializers();\r\n }", "@Test\n public void readSystemObjectClassAppointmentRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"AppointmentRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return AppointmentRequest properly\", object.getClass(), actual.getClass());\n }", "@JsonDeserialize(as=InspectionImpl.class)\npublic interface Inspection {\n\n String getInspectionCode();\n void setInspectionCode(String inspectionCode);\n\n LocalDate getInspectionDate();\n void setInspectionDate(LocalDate inspectionDate);\n\n Boolean getPassedInspection();\n void setPassedInspection(Boolean passedInspection);\n\n String getDescription();\n void setDescription(String description);\n}", "@Bean\n public ObjectMapper objectMapper() {\n return new ObjectMapper();\n }", "@Test\n public void readSystemObjectClassDoctorFeedback() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"DoctorFeedback\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return DoctorFeedback properly\", object.getClass(), actual.getClass());\n }", "JSONConverter getDefaultConverter();", "public CheckResponseDeserializer() {\n this(null);\n }", "private <T> T convert(String json, Type resultObject) {\n\t\tGson gson = new GsonBuilder().create();\n\t\treturn gson.fromJson(json, resultObject);\n\t}", "public void setRawObject(final ISerializer serializer, final JsonObject json) {\n mSerializer = serializer;\n mRawObject = json;\n\n\n if (json.has(\"serviceConfigurationRecords\")) {\n final BaseDomainDnsRecordCollectionResponse response = new BaseDomainDnsRecordCollectionResponse();\n if (json.has(\"[email protected]\")) {\n response.nextLink = json.get(\"[email protected]\").getAsString();\n }\n\n final JsonObject[] sourceArray = serializer.deserializeObject(json.get(\"serviceConfigurationRecords\").toString(), JsonObject[].class);\n final DomainDnsRecord[] array = new DomainDnsRecord[sourceArray.length];\n for (int i = 0; i < sourceArray.length; i++) {\n array[i] = serializer.deserializeObject(sourceArray[i].toString(), DomainDnsRecord.class);\n array[i].setRawObject(serializer, sourceArray[i]);\n }\n response.value = Arrays.asList(array);\n serviceConfigurationRecords = new DomainDnsRecordCollectionPage(response, null);\n }\n\n if (json.has(\"verificationDnsRecords\")) {\n final BaseDomainDnsRecordCollectionResponse response = new BaseDomainDnsRecordCollectionResponse();\n if (json.has(\"[email protected]\")) {\n response.nextLink = json.get(\"[email protected]\").getAsString();\n }\n\n final JsonObject[] sourceArray = serializer.deserializeObject(json.get(\"verificationDnsRecords\").toString(), JsonObject[].class);\n final DomainDnsRecord[] array = new DomainDnsRecord[sourceArray.length];\n for (int i = 0; i < sourceArray.length; i++) {\n array[i] = serializer.deserializeObject(sourceArray[i].toString(), DomainDnsRecord.class);\n array[i].setRawObject(serializer, sourceArray[i]);\n }\n response.value = Arrays.asList(array);\n verificationDnsRecords = new DomainDnsRecordCollectionPage(response, null);\n }\n\n if (json.has(\"domainNameReferences\")) {\n final BaseDirectoryObjectCollectionResponse response = new BaseDirectoryObjectCollectionResponse();\n if (json.has(\"[email protected]\")) {\n response.nextLink = json.get(\"[email protected]\").getAsString();\n }\n\n final JsonObject[] sourceArray = serializer.deserializeObject(json.get(\"domainNameReferences\").toString(), JsonObject[].class);\n final DirectoryObject[] array = new DirectoryObject[sourceArray.length];\n for (int i = 0; i < sourceArray.length; i++) {\n array[i] = serializer.deserializeObject(sourceArray[i].toString(), DirectoryObject.class);\n array[i].setRawObject(serializer, sourceArray[i]);\n }\n response.value = Arrays.asList(array);\n domainNameReferences = new DirectoryObjectCollectionPage(response, null);\n }\n }", "public KafkaJsonSerializer() {\n\n }", "@Test\n public void readSystemObjectClassAppointment() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"Appointment\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return Appointment properly\", object.getClass(), actual.getClass());\n }", "public abstract Object toJson();", "public native Object parse( Object json );", "void decodeObject();", "@Test\n public void readSystemObjectClassAccDelRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"AccountDeletionRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return AccountDeletionRequest properly\", object.getClass(), actual.getClass());\n }", "@Override\n\tpublic <T extends BaseModel> T decodeContent(JSONObject object)\n\t{\n\t\treturn null;\n\t}", "public JacksonAdapter() {\n simpleMapper = initializeObjectMapper(new ObjectMapper());\n //\n xmlMapper = initializeObjectMapper(new XmlMapper());\n xmlMapper.configure(ToXmlGenerator.Feature.WRITE_XML_DECLARATION, true);\n xmlMapper.setDefaultUseWrapper(false);\n //\n ObjectMapper flatteningMapper = initializeObjectMapper(new ObjectMapper())\n .registerModule(FlatteningSerializer.getModule(simpleMapper()))\n .registerModule(FlatteningDeserializer.getModule(simpleMapper()));\n jsonMapper = initializeObjectMapper(new ObjectMapper())\n // Order matters: must register in reverse order of hierarchy\n .registerModule(AdditionalPropertiesSerializer.getModule(flatteningMapper))\n .registerModule(AdditionalPropertiesDeserializer.getModule(flatteningMapper))\n .registerModule(FlatteningSerializer.getModule(simpleMapper()))\n .registerModule(FlatteningDeserializer.getModule(simpleMapper())); }", "public interface Deserializer extends SerDe {\n\n /**\n * Deserialize an object out of a Writable blob. In most cases, the return\n * value of this function will be constant since the function will reuse the\n * returned object. If the client wants to keep a copy of the object, the\n * client needs to clone the returned deserialized value by calling\n * ObjectInspectorUtils.getStandardObject().\n *\n * @param blob\n * The Writable object containing a serialized object\n * @return A Java object representing the contents in the blob.\n */\n Object deserialize(Writable blob) throws SerDeException;\n\n /**\n * Get the object inspector that can be used to navigate through the internal\n * structure of the Object returned from deserialize(...).\n */\n ObjectInspector getObjectInspector() throws SerDeException;\n\n}", "@Override\n protected JsonUtil getJsonUtil() {\n return super.getJsonUtil();\n }", "private JsonUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "GistUser deserializeUserFromJson(String json);", "@Test\n public void testWithoutNewWarnings() {\n String request = \"{\\\"canRunOnFailed\\\":false,\\\"defaultEncoding\\\":\\\"\\\",\\\"failedTotalAll\\\":\\\"\\\",\\\"failedTotalHigh\\\":\\\"\\\",\\\"failedTotalLow\\\":\\\"\\\",\\\"failedTotalNormal\\\":\\\"\\\",\\\"healthy\\\":\\\"0\\\",\\\"pattern\\\":\\\"\\\",\\\"shouldDetectModules\\\":false,\\\"thresholdLimit\\\":\\\"low\\\",\\\"unHealthy\\\":\\\"50\\\",\\\"unstableTotalAll\\\":\\\"\\\",\\\"unstableTotalHigh\\\":\\\"\\\",\\\"unstableTotalLow\\\":\\\"\\\",\\\"unstableTotalNormal\\\":\\\"\\\"}\";\n\n JSONObject input = JSONObject.fromObject(request);\n JSONObject output = PluginDescriptor.convertHierarchicalFormData(input);\n\n assertEquals(\"Wrong JSON \", input, output);\n }", "TorrentJsonParser getJsonParser();", "public JsonArray() {\n }", "@Bean\n public GsonBuilderCustomizer typeAdapterRegistration() {\n return builder -> {\n builder.registerTypeAdapter(Date.class, new UnixEpochDateTypeAdapter());\n builder.registerTypeAdapterFactory(new MoneyTypeAdapterFactory());\n };\n }", "public interface JsonDeserializer {\n\n /**\n * Parses and deserializes a Gist object from the provided JSON text. This\n * Gist object does not contain all comments on said Gist, as obtaining a\n * given Gist's comments requires a completely separate Github API call.\n *\n * @param json JSON text to parse\n * @return Gist object with related attributes and objects\n */\n Gist deserializeGistFromJson(String json);\n\n /**\n * Parses and deserializes a List of Gist objects from the provided JSON\n * text. If there is an error with parsing the JSON, null is returned.\n *\n * @param json JSON text to parse\n * @return List of Gist objects\n */\n List<Gist> deserializeGistsFromJson(String json);\n\n /**\n * Parses and deserializes a GistComment object from the provided JSON text.\n *\n * @param json JSON text to parse\n * @return GistComment corresponding to some Gist\n */\n GistComment deserializeCommentFromJson(String json);\n\n /**\n * Parses and deserializes a List of GistComment objects from the provided\n * JSON text. If there is an error with parsing the JSON, null is returned.\n *\n * @param json JSON text to parse\n * @return List of GistComment objects\n */\n List<GistComment> deserializeCommentsFromJson(String json);\n\n /**\n * Parses and deserializes an expanded GistUser object from the provided\n * JSON text. This user contains all fields contained in the \"user\" objects\n * found in standard Gist JSON responses, in addition to more fields found\n * in User JSON responses. If certain fields are present, namely\n * \"private_gists\" and \"total_private_repos\", then this must be the\n * currently authenticated user.\n *\n * @param json JSON text to parse\n * @return GistUser corresponding to some Github user\n */\n GistUser deserializeUserFromJson(String json);\n\n}", "private static Gson gson() {\n return JsonUtils.buildGson(gb -> gb.registerTypeAdapter(Json.class, (JsonSerializer<Json>) (json, type, jsonSerializationContext) ->\n jsonParser.parse(json.value())\n ));\n }", "public JsonDeserializer<?> modifyDeserializer(DeserializationConfig config, BeanDescription beanDesc, JsonDeserializer<?> deserializer)\n/* */ {\n/* 90 */ return deserializer;\n/* */ }", "Object deserialize(Class objClass, InputStream stream) throws IOException;", "KlassModule() {\n addKeyDeserializer(Klass.class, new KlassDeserializer());\n }", "public JSONUtils() {\n\t\tsuper();\n\t}", "@Bean\n public MessageConverter messageConverter() {\n return new Jackson2JsonMessageConverter();\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "@Test\n public void verifyJsonBackWardCompatible() throws IOException, URISyntaxException, ParseException {\n\n ObjectMapper mapper = new ObjectMapper();\n\n String origJsonDataFile = UserTest.class.getSimpleName() + \"_noDesc.json\";\n String jsonData = ApiTestUtil.readJSONFile(origJsonDataFile);\n\n User u = mapper.readValue(jsonData, User.class);\n assertEquals( Integer.valueOf(56239), u.getId());\n\n String targetJson = mapper.writeValueAsString(u);\n JSONObject json = ApiTestUtil.convertJSONStr2Obj(targetJson);\n JSONObject expectedJson = ApiTestUtil.convertJSONStr2Obj(jsonData);\n\n ApiTestUtil.verifyJson((Map<String, Object>)json, (Map<String, Object>)expectedJson);\n\n }", "public JsonRequestSerializer() {\n this(JNC.GSON);\n }", "public void deserialize(JsonObject src);", "public JSONLoader() {}", "@JsonDeserialize(as=MetricFilterImpl.class)\npublic interface MetricFilter {\n public List<String> getAllowedInstanceIds();\n public void setAllowedInstanceIds(List<String> allowedInstanceIds);\n public List<String> getAllowedMetricNames();\n public void setAllowedMetricNames(List<String> allowedMetricNames);\n public boolean checkMetric(Metric metric);\n public void createAllowedInstanceIdsHashSet();\n public void createAllowedMetricNamesHashSet();\n public String toString();\n}", "public abstract void fromJson(JSONObject jsonObject);", "@Test\n public void readSystemObjectClassMedicineOrderRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"MedicineOrderRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return MedicineOrderRequest properly\", object.getClass(), actual.getClass());\n }", "public interface JsonBean {\n String toJson();\n void fromJson(String json) throws Exception;\n}", "@Override\r\n\tprotected Object readObject() throws IOException, SerializeException {\r\n\t\treturn AdvancedDeserializerUtil.readObject(super.readObject());\r\n\t}", "@Bean\n ObjectMapper objectMapper() {\n ObjectMapper objectMapper = new ObjectMapper();\n objectMapper.setSerializationInclusion(Include.NON_DEFAULT);\n return objectMapper;\n }", "UserModel()\n {/*Used for Gson*/}", "public interface JsonConverter {\n\n /**\n * Encode the given object in a compatible form for the event bus.\n *\n * @param value the value to encode\n * @return the encoded object\n */\n Object encodeObject(Object value);\n\n /**\n * Decode the given object encoded with the encodeObject method.\n *\n * @param value the value to decode\n * @return the decoded object\n */\n Object decodeObject(Object value);\n}", "@Test\n public void readSystemObjectClassAccCrRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"AccountCreationRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return AccountCreationRequest properly\", object.getClass(), actual.getClass());\n }", "public JSONUser(){\n\t}", "public abstract JsonElement serialize();", "@Test\n public void readSystemObjectClassMessage() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"Message\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return Message properly\", object.getClass(), actual.getClass());\n }", "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}", "public Object decode(Object obj) throws DecoderException {\n/* 341 */ if (obj == null)\n/* 342 */ return null; \n/* 343 */ if (obj instanceof byte[])\n/* 344 */ return decode((byte[])obj); \n/* 345 */ if (obj instanceof String) {\n/* 346 */ return decode((String)obj);\n/* */ }\n/* 348 */ throw new DecoderException(\"Objects of type \" + obj.getClass().getName() + \" cannot be URL decoded\");\n/* */ }", "Object defaultReplaceObject(Object obj) throws IOException {\n\t logger.log(Level.FINEST, \"Object in stream instance of: {0}\", obj.getClass());\n\t try {\n\t\tif (obj instanceof DynamicProxyCodebaseAccessor ){\n\t\t logger.log(Level.FINEST, \"Object in stream instance of DynamicProxyCodebaseAccessor\");\n\t\t obj = \n\t\t ProxySerializer.create(\n\t\t\t (DynamicProxyCodebaseAccessor) obj,\n\t\t\t aout.defaultLoader,\n\t\t\t aout.getObjectStreamContext()\n\t\t );\n\t\t} else if (obj instanceof ProxyAccessor ) {\n\t\t logger.log(Level.FINEST, \"Object in stream instance of ProxyAccessor\");\n\t\t obj = \n\t\t ProxySerializer.create(\n\t\t\t (ProxyAccessor) obj,\n\t\t\t aout.defaultLoader,\n\t\t\t aout.getObjectStreamContext()\n\t\t );\n\t\t}\n\t } catch (IOException e) {\n\t\tlogger.log(Level.FINE, \"Unable to create ProxyAccessorSerializer\", e);\n\t\tthrow e;\n\t }\n\t Class c = obj.getClass();\n\t Class s = serializers.get(c);\n\t if (c.isAnnotationPresent(AtomicSerial.class)){} // Ignore\n\t else if (c.isAnnotationPresent(AtomicExternal.class)){} // Ignore\n\t // REMIND: stateless objects, eg EmptySet?\n\t else if (s != null){\n\t\ttry {\n\t\t Constructor constructor = s.getDeclaredConstructor(c);\n\t\t obj = constructor.newInstance(obj);\n\t\t} catch (NoSuchMethodException ex) {\n\t\t logger.log(Level.FINE, \"Unable to contruct serializer\", ex);\n\t\t} catch (SecurityException ex) {\n\t\t logger.log(Level.FINE, \"Unable to contruct serializer\", ex);\n\t\t} catch (InstantiationException ex) {\n\t\t logger.log(Level.FINE, \"Unable to contruct serializer\", ex);\n\t\t} catch (IllegalAccessException ex) {\n\t\t logger.log(Level.FINE, \"Unable to contruct serializer\", ex);\n\t\t} catch (IllegalArgumentException ex) {\n\t\t logger.log(Level.FINE, \"Unable to contruct serializer\", ex);\n\t\t} catch (InvocationTargetException ex) {\n\t\t logger.log(Level.FINE, \"Unable to contruct serializer\", ex);\n\t\t}\n\t }\n\t else if (obj instanceof Map) obj = new MapSerializer((Map) obj);\n\t else if (obj instanceof Set) obj = new SetSerializer((Set) obj);\n\t else if (obj instanceof Collection) obj = new ListSerializer((Collection) obj);\n\t else if (obj instanceof Permission) obj = new PermissionSerializer((Permission) obj);\n\t else if (obj instanceof Throwable) obj = new ThrowableSerializer((Throwable) obj);\n\t logger.log(Level.FINEST, \"Returning object in stream instance of: {0}\", obj.getClass());\n\t return obj;\n\t}", "@Override\n public ModelSchema deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {\n\n ModelSchema result = new ModelSchema();\n JsonObject root = json.getAsJsonObject();\n\n String name = root.get(\"name\").getAsString();\n result.setName(name);\n\n String version = root.get(\"version\").getAsString();\n result.setVersion(version);\n\n JsonArray resources = root.get(\"resources\").getAsJsonArray();\n ResourceSchema[] resourceSchemas = new ResourceSchema[resources.size()];\n for(int i = 0; i < resources.size(); i++)\n {\n JsonElement resource = resources.get(i);\n resourceSchemas[i] = context.deserialize(resource, ResourceSchema.class);\n }\n result.setResources(resourceSchemas);\n\n JsonArray selectors = root.get(\"selectors\").getAsJsonArray();\n SelectorSchema[] selectorSchemas = new SelectorSchema[selectors.size()];\n for(int i = 0; i < selectors.size(); i++)\n {\n JsonElement selector = selectors.get(i);\n selectorSchemas[i] = context.deserialize(selector, SelectorSchema.class);\n }\n result.setSelectors(selectorSchemas);\n\n JsonArray links = root.get(\"links\").getAsJsonArray();\n LinkSchema[] linkSchemas = new LinkSchema[links.size()];\n for(int i = 0; i < links.size(); i++)\n {\n JsonElement link = links.get(i);\n linkSchemas[i] = context.deserialize(link, LinkSchema.class);\n }\n result.setLinks(linkSchemas);\n\n return result;\n }", "public OrderConfirmationDeserializer() {\n System.out.println(\"OrderConfirmationDeserializer created\");\n }", "private FieldDocument _fromJson (String json) {\n try {\n FieldDocument fd = this.mapper.readValue(json, FieldDocument.class);\n return fd;\n }\n catch (IOException e) {\n log.error(\"File json not found or unmappable: {}\",\n e.getLocalizedMessage());\n };\n return (FieldDocument) null;\n }", "public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {\n\n\n if (json.has(\"learningCourseActivities\")) {\n learningCourseActivities = serializer.deserializeObject(json.get(\"learningCourseActivities\"), com.microsoft.graph.requests.LearningCourseActivityCollectionPage.class);\n }\n\n if (json.has(\"learningProviders\")) {\n learningProviders = serializer.deserializeObject(json.get(\"learningProviders\"), com.microsoft.graph.requests.LearningProviderCollectionPage.class);\n }\n }", "@Bean\n public Jackson2ObjectMapperBuilderCustomizer customizeJson() {\n return builder -> {\n builder.serializerByType(EasyComposition.class, compositionSerializer);\n builder.serializerByType(EasyMeasure.class, measureSerializer);\n builder.serializerByType(EasyStaff.class, staffSerializer);\n builder.serializerByType(EasyVoice.class, voiceSerializer);\n builder.serializerByType(Environment.class, environmentSerializer);\n builder.serializerByType(Device.class, deviceSerializer);\n builder.serializerByType(Json.class, jsonSerializer);\n builder.serializerByType(Rational.class, rationalSerializer);\n builder.deserializerByType(Rational.class, rationalDeserializer);\n };\n }", "@Override\n public BitfinexModel deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException\n {\n JsonElement bitfinexModel = json.getAsJsonObject();\n\n /**\n * Deserialize the JsonElement as GSON\n */\n return new Gson().fromJson(bitfinexModel, BitfinexModel.class);\n }", "private AerospikeConverters() {}", "com.google.protobuf2.Any getObject();", "void decodeObjectArray();", "@Bean\n\tpublic ObjectMapper objectMapper() {\n\t\treturn new ObjectMapper()\n\t\t\t\t.registerModules(new ProblemModule(), new ConstraintViolationProblemModule());\n\t}", "public String toJsonfrmObject(Object object) {\n try {\n ObjectMapper mapper = new ObjectMapper();\n mapper.setDateFormat(simpleDateFormat);\n return mapper.writeValueAsString(object);\n } catch (IOException e) {\n logger.error(\"Invalid JSON!\", e);\n }\n return \"\";\n }", "@PostDeserialize\r\n\tprivate void deserializeHook() {\n\t\tfovx *= DEG2RAD;\r\n\t\tfovy *= DEG2RAD;\r\n\t}", "@Bean\n public ViewResolver jsonViewResolver() {\n return new JsonViewResolver();\n }" ]
[ "0.673362", "0.657392", "0.6293521", "0.6031134", "0.58961606", "0.5878918", "0.5868192", "0.58672476", "0.58507645", "0.57942724", "0.5759205", "0.57543457", "0.57124895", "0.5700934", "0.56865317", "0.56758595", "0.5673689", "0.5671799", "0.56690466", "0.56384474", "0.5624039", "0.5596727", "0.5595951", "0.5593227", "0.55711097", "0.5563511", "0.5528188", "0.54992574", "0.5498988", "0.54966617", "0.5490535", "0.547799", "0.54777664", "0.54704547", "0.5461777", "0.54288155", "0.5420946", "0.5416275", "0.54121953", "0.54112583", "0.54056466", "0.5393057", "0.53909004", "0.5386173", "0.53829426", "0.53761125", "0.53703946", "0.5364241", "0.53512454", "0.53284335", "0.5324929", "0.531442", "0.531038", "0.5307398", "0.5292301", "0.52731687", "0.5267822", "0.52668595", "0.52655315", "0.5261646", "0.5240921", "0.5223402", "0.52210766", "0.521246", "0.5207269", "0.5203001", "0.5189972", "0.51838076", "0.5175177", "0.5173813", "0.51728356", "0.51584256", "0.5156973", "0.5153713", "0.51479465", "0.51451254", "0.51312923", "0.51208097", "0.5111238", "0.5110894", "0.51081616", "0.5107322", "0.5095148", "0.50877", "0.5083583", "0.5081648", "0.5069452", "0.50677425", "0.5067187", "0.5064779", "0.50528705", "0.50477654", "0.5045271", "0.5035152", "0.50276536", "0.5024128", "0.5022507", "0.5020878", "0.50194365", "0.50162554", "0.5005641" ]
0.0
-1
/! Wireup the events from the UI to the presenter.
@Override public void addhandler(final ToDoPresenter.Display.EventHandler handler) { // The TodoMVC project template has a markup / style that is not compatible with the markup // generated by the GWT CheckBox control. For this reason, here we are using an InputElement // directly. As a result, we handle low-level DOM events rather than the GWT higher level // abstractions, e.g. ClickHandlers. A typical GWT application would not do this, however, // this nicely illustrates how you can develop GWT applications // that program directly against the DOM. final com.google.gwt.dom.client.Element clientToggleElement = toggleAll.cast(); DOM.sinkEvents(clientToggleElement, Event.ONCLICK); DOM.setEventListener(clientToggleElement, new EventListener() { @Override public void onBrowserEvent(Event event) { handler.markAllCompleted(toggleAll.isChecked()); } }); taskText.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(KeyUpEvent event) { if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) { handler.addTask(); } } }); clearCompleted.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { handler.clearCompletedTasks(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void onPresenter();", "@Override\n public void setupEventHandlers(ControllerInterface controller) {\n events = Optional.of(new Events.ForView(controller));\n }", "public interface DetailsPresenter {\n\n void init();\n\n void getEvents();\n}", "public abstract void setupMvpPresenter();", "private void initPresenter() {\n\n RequestQueue requestQueue = App.getInstance().getRequestQueue();\n CatsHttp catsHttp = new VolleyCatsHttp(requestQueue);\n\n CatsRepository catsRepository = new CatsRepository(catsHttp);\n\n presenter = new MainPresenter(catsRepository);\n presenter.bindView(this);\n }", "@Override\r\n\tprotected void initializePresenter() {\n\r\n\t}", "private void init() {\n //set view to presenter\n presenter.setView(this, service);\n\n setupView();\n }", "@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}", "public void setupUIListeners() {\n\t\tsetupEditTextListeners();\n\t\tsetupSeekBarsListeners();\n\t}", "public interface FormPresenterListener {\n void moveToLoginScreen();\n void moveToRegisterScreen();\n void moveToMapScreen(LoggedInUser user);\n void setButtonState();\n void showValidationError(String fieldName, boolean valid);\n void fetchLogin(View view);\n void fetchRegistration(View view);\n}", "void setupPresenter() {\n mPresenter = new leaguePresenter(this);\n ScheduleList.getInstance().setPresenter(mPresenter);\n }", "public abstract void initUiAndListener();", "@Override\r\n\tprotected void initEvents() {\n\t\t\r\n\t}", "public void runInUi(ElexisEvent ev){}", "private void bind()\n\t{\n\t\tthis.eventBus.addHandler(RefreshPageEvent.TYPE, new RefreshPageEventHandler()\n\t\t{\n\n\t\t\t@Override\n\t\t\tpublic void onRefreshPage(RefreshPageEvent event)\n\t\t\t{\n\t\t\t\tdataBindAccount();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tsetAchievementButtons();\n\t\t\n\t}", "public interface Reeve_presenter {\n void reSetPsw();\n}", "public interface IMainScreenPresenter {\n\n\n /**\n * Intercepts the onCreate callback in the Fragment/Activity lifecycle.\n */\n public void onCreate();\n\n /**\n * Intercepts the onResume callback in the Fragment/Activity lifecycle.\n */\n public void onResume();\n\n /**\n * Intercepts the onPause callback in the Fragment/Activity lifecycle.\n */\n public void onPause();\n\n /**\n * Intercepts the onStop callback in the Fragment/Activity lifecycle.\n */\n public void onStop();\n\n /**\n * Called when the button A is pressed.\n */\n public void onButtonAPressed();\n\n /**\n * Called when the button B is pressed.\n */\n public void onButtonBPressed();\n\n}", "protected void setupUI() {\n\n }", "private void setupUI(){\n this.setupTimerSchedule(controller, 0, 500);\n this.setupFocusable(); \n this.setupSensSlider();\n this.setupInitEnable();\n this.setupDebugger();\n }", "interface presenter {\n void requestDataFromServer();\n\n void onRefreshButtonClick();\n\n void onDestroy();\n }", "protected abstract void startMvpPresenter();", "private void setupMachinery() {\n\t\tthis.renderer = new IntermediateRenderer();\n\t\tthis.controllerModel = new ControllerModel();\n\t\t\n\t\t// connect the Renderer to the Hub\n\t\tthis.hub = new ControllerHub(this.controllerModel, this.renderer, this);\n\t\tthis.hub.addAtomContainer(ac);\n\t\t\n\t\t// connect mouse events from Panel to the Hub\n\t\tthis.mouseEventRelay = new SwingMouseEventRelay(this.hub);\n\t\tthis.addMouseListener(mouseEventRelay);\n\t}", "public interface MainPresenter {\n\tvoid onStartStateLoading();\n\n\tvoid onPresenterAttached(MainView mainView);\n\n\tvoid onPresenterDeattached();\n}", "interface ViewToPresenter extends Presenter<PresenterToView> {\n\n\n void onAddClicked();\n\n\n }", "private void configureViewPresenters(View inflatedView) {\n // Instantiate the Event Listener\n listener = new PresenterListener(this);\n actionToolbarPresenter = new ActionToolbarPresenter(inflatedView);\n actionToolbarPresenter.setListener(listener);\n actionToolbarPresenter.setBattery(sharedPrefs.getInt(BATTERY_RECEIVED, 0)); }", "public interface IMainPresenter extends IMVPPresenter <IMainView> {\n void requestMessages();\n void onRequestMessagesError(Throwable throwable);\n void onRequestMessagesSuccess(Collection<IMessage> messages);\n void onActivityResult(int requestCode, int resultCode, Intent data);\n}", "public void injectUIEvent(UI_EVENTS event) {\n handleEvent(event);\n }", "public interface SubjectPresenter extends mvpPresenter {\n\n @Override\n void onDateChange(Calendar c);\n}", "public interface inews_Main4_SetEvent {\n void main4_setView(View v, int p);\n}", "public interface INewsPresenter {\n void callResponce();\n}", "private void initializeEvents() {\r\n\t}", "public interface IGetEntryPresenter {\n\n /**\n * Method to load the entry presenter screen\n * \n * @param responseDTO An instance of GetEntryResponseDTO which contains\n * variables that determine the loading/handling of\n * entry canvas.\n */\n void load(GetEntryResponseDTO responseDTO);\n \n void rotateScreen(boolean isLandScape);\n\n /**\n * Unloads the view\n */\n void unLoad();\n\n /**\n * Method to remove a menu item from the view\n * \n * @param itemId Item Id of the menu item\n * @param itemName Item Name of the menu item\n */\n void removeMenuItem(int itemId, String itemName);\n\n /**\n * Method to rename the menu item. Method adds the item edit box to the view\n * \n * @param itemId Item Id of the menu item\n * @param itemName Item Name of the menu item\n */\n //#if KEYPAD\n //|JG| void renameMenuItem(int itemId, String itemName);\n //#endif\n\n /**\n * Method to change a menu item name\n * \n * @param itemId Item id of the menu item whose name needs to be changed\n * @param itemName New item name\n */\n void changeMenuItemName(String itemId, String itemName);\n\n /**\n * Method to load message box\n * @param type\n * <li> 1 - Smartpopup without any options that last for \n * predefined time </li>\n * <li> 2,3,5 - Message box with options menu </li>\n * <li> 4,6 - Notification window </li>\n * @param msg Message\n */\n// void loadMessageBox(byte type, String msg);\n\n /**\n * Method to select the last accessed menu item\n * \n * @param iName Item name to be selected\n */\n void selectLastAccessedItem(String itemId);\n\n /**\n * Method to copy the text to the text box\n * \n * @param txt Text to be copied\n */\n void copyTextToTextBox(String text,boolean isMaxSet);\n\n /**\n * Method to show notification. This function internally calls the the\n * handlesmartpopup with the type defined for notification window\n * \n * @param isGoTo Boolean to indicate whether the notification window should\n * have \"Goto\" option or not\n * \n * @param dmsg Notification message\n * \n * @param param String Array which consists of two elements\n * <li> Element 0 - To represents whether the notification\n * is raised for message arrival or scheduler invocation\n * </li>\n * <li> Element 1 - Gives you the message id incase of \n * message or sequence name in case of scheduler\n * <li>\n */\n// void showNotification(byte isGoto);\n \n void keyPressed(int keycode);\n \n void paintGameView(Graphics g);\n \n byte commandAction(byte priority);\n \n// void displayMessageSendSprite();\n \n boolean pointerPressed(int x, int y, boolean isPointed, boolean isReleased, boolean isPressed);\n\n// //CR 12318\n// public void updateChatNotification(String[] msg);\n\n //CR 12118\n //bug 14155\n //bug 14156\n void changeMenuItemName(String itemName, byte type, String msgPlus);\n\n //CR 14672, 14675\n void refreshList(String[] contacts, int[] contactId);\n\n void setImage(ByteArrayOutputStream byteArrayOutputStream); //CR 14694\n}", "public interface MainPresenter {\n String TAG = MainPresenter.class.getSimpleName();\n\n void onLocationChange();\n\n void onWeekdayChange();\n}", "@Inject\r\n\tpublic ProviderManagementPresenter(EventBus eventBus, MyView view,\r\n\t\t\tMyProxy proxy, DispatchAsync dispatcher) {\r\n\t\tsuper(eventBus, view, proxy);\r\n\t\tgetView().setUiHandlers(this);\r\n\t\t\r\n\t\t((RafViewLayout) getView().asWidget()).setViewPageName(getProxy().getNameToken());\r\n\t\tgetView().loadLogisticsProviderData(ProviderData.getLogisticsProviderData());\r\n\t\tthis.dispatcher = dispatcher;\r\n\t}", "@Override\n protected void initView() {\n getPresenter().getRxManager().on(C.EVENT_LOGIN, new Action1<Object>() {\n\n @Override\n public void call(Object o) {\n\n Log.e(TAG, \"call() called with: o = [\" + o.toString() + \"]\"+o.getClass());\n }\n });\n\n }", "@Override\n public void startingScreen(Home.ToHome presenter) {\n presenter.onScreenStarted();\n }", "public void initEventsAndProperties() {\r\n }", "@Override\r\n \tpublic void start(AcceptsOneWidget panel, EventBus eventBus) {\n \t\tpanel.setWidget(view);\t\t\r\n \t}", "private void doEvents() {\n\t\tapplyEvents(generateEvents());\t\t\n\t}", "public interface MainPresenter {\n void TellJoke();\n void showProgress();\n void hideProgress();\n}", "public interface GamesCalendarPresenter {\n\n void setView(GamesCalendarView view);\n}", "public interface Presenter {\n void onCreate();\n\n void onStart();\n\n void onStop();\n\n void pause();\n\n void attachView(View view);\n\n\n void attatchIncomingIntent(Intent intent);\n}", "@Override\r\n public void notifyEvent(ControllerEvent event) {\n \r\n }", "private void addEventHandlers()\n {\n DepartureBox self = this;\n\n departureTimeField.textProperty().addListener((observable, oldValue, newValue) -> {\n if (null != currentDeparture) {\n Change<Departure, String> change = new Change<>(currentDeparture, oldValue, newValue, \"departureTime\");\n self.execute(IEventListener.EVENT_CHANGE, change, \"depbox\");\n }\n });\n\n destinationField.textProperty().addListener((observable, oldValue, newValue) -> {\n if (null != currentDeparture) {\n Change<Departure, String> change = new Change<>(currentDeparture, oldValue, newValue, \"destination\");\n self.execute(IEventListener.EVENT_CHANGE, change, \"depbox\");\n }\n });\n }", "private void setupInteraction() {\n\n\t\ttxtPort.setOnKeyReleased(new EventHandler<KeyEvent>() {\n\t\t\tpublic void handle(KeyEvent e) {\n\t\t\t\tString port = txtPort.getText();\n\t\t\t\tif (!Pattern.matches(\"[0-9]+\", port)) {\n\t\t\t\t\ttxtPort.clear();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfinal DropShadow shadow = new DropShadow();\n\t\t// Adds shadows if mouse moves towards the button\n\t\tbtnLogin.addEventHandler(MouseEvent.MOUSE_ENTERED,\n\t\t\t\tnew EventHandler<MouseEvent>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handle(MouseEvent e) {\n\t\t\t\t\t\tbtnLogin.setEffect(shadow);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t// Removes shadows if mouse moves away from the button\n\t\tbtnLogin.addEventHandler(MouseEvent.MOUSE_EXITED,\n\t\t\t\tnew EventHandler<MouseEvent>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handle(MouseEvent e) {\n\t\t\t\t\t\tbtnLogin.setEffect(null);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\ttxtNickname.setOnKeyReleased(new EventHandler<KeyEvent>() {\n\n\t\t\t@Override\n\t\t\tpublic void handle(KeyEvent e) {\n\t\t\t\t// Login only possible when TxtNickname isn't empty\n\t\t\t\tString name = txtNickname.getText();\n\t\t\t\tname = name.trim();\n\t\t\t\tif (name != null && !name.isEmpty()) {\n\t\t\t\t\tbtnLogin.setDisable(false);\n\t\t\t\t\tif (e.getCode() == KeyCode.ENTER) {\n\t\t\t\t\t\tsetController();\n\t\t\t\t\t\ttryLogin();\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tbtnLogin.setDisable(true);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t});\n\t\tbtnLogin.setOnAction(new EventHandler<ActionEvent>() {\n\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tsetController();\n\t\t\t\ttryLogin();\n\t\t\t}\n\t\t});\n\t}", "public interface BasePresenter {\n// void start();\n\n\n\n\n}", "void installListeners() {\n\t\t\t// Listeners on this popup's table and scroll bar\n\t\t\tproposalTable.addListener(SWT.FocusOut, this);\n\t\t\tScrollBar scrollbar = proposalTable.getVerticalBar();\n\t\t\tif (scrollbar != null) {\n\t\t\t\tscrollbar.addListener(SWT.Selection, this);\n\t\t\t}\n\n\t\t\t// Listeners on this popup's shell\n\t\t\tgetShell().addListener(SWT.Deactivate, this);\n\t\t\tgetShell().addListener(SWT.Close, this);\n\n\t\t\t// Listeners on the target control\n\t\t\tcontrol.addListener(SWT.MouseDoubleClick, this);\n\t\t\tcontrol.addListener(SWT.MouseDown, this);\n\t\t\tcontrol.addListener(SWT.Dispose, this);\n\t\t\tcontrol.addListener(SWT.FocusOut, this);\n\t\t\t// Listeners on the target control's shell\n\t\t\tShell controlShell = control.getShell();\n\t\t\tcontrolShell.addListener(SWT.Move, this);\n\t\t\tcontrolShell.addListener(SWT.Resize, this);\n\t\t}", "protected void setupListeners() {\n\t\t\n\t\tloginBtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent click) {\n\t\t\t\tSession session = theController.validateUser(usernameField.getText(), passwordField.getText());\n\t\t\t\tif(session != null) {\n\t\t\t\t\ttheController.login();\n\t\t\t\t} else {\n\t\t\t\t\tlblInvalid.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnRegister.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent click) {\n\t\t\t\ttheController.register();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnGuide.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent click) {\n\t\t\t\ttheController.viewGuide();\n\t\t\t}\n\t\t});\n\t\t\n\t}", "@FXML\n private void handleManageEvents(ActionEvent event) {\n try {\n LOGGER.log(Level.INFO, \"Redirecting to EventManagement window.\");\n FXMLLoader loader = new FXMLLoader(getClass()\n .getResource(\"/reto2desktopclient/view/EventManagement.fxml\"));\n Parent root = (Parent) loader.load();\n //Getting window controller.\n EventManagementController controller = (loader.getController());\n controller.setStage(stage);\n //Initializing stage.\n controller.initStage(root);\n } catch (IOException ex) {\n LOGGER.log(Level.SEVERE, \"Could not switch to EventManagement window: {0}\", ex.getMessage());\n showErroAlert(\"Could not switch to Event Management window due to an\"\n + \" unexpected error, please try later.\");\n }\n }", "public void onOpenModule(Class<? extends BasePresenter<?, ? extends EventBus>> presenter) {\n\t\tIPresenterFactory pf = application.getPresenterFactory();\n\t\tthis.contentPresenter = pf.createPresenter(presenter);\n\t\tthis.view.setContent((Component) this.contentPresenter.getView());\n\t}", "private void setupEventHandlers() {\n myMap.addEventHandler(MapViewEvent.MAP_CLICKED, event -> {\n event.consume();\n final Coordinate newPosition = event.getCoordinate().normalize();\n latitude.setText(newPosition.getLatitude().toString());\n longitude.setText(newPosition.getLongitude().toString());\n\n this.markerClick.setPosition(newPosition);\n this.myMap.addMarker(this.markerClick);\n });\n }", "private void init()\n {\n // Add listeners to the view\n addEventListeners();\n addSelectionChangeListeners();\n\n // Add listeners to the model\n addBackgroundImageHandler();\n addFrameWidgetHandler();\n addWidgetShapeChangeHandler();\n\n project.addHandler(this,\n Project.DesignChange.class,\n new AlertHandler()\n {\n\n public void handleAlert(EventObject alert)\n {\n Project.DesignChange chg =\n (Project.DesignChange) alert;\n\n if ((! chg.isAdd) &&\n (chg.element == design))\n {\n closeOpenController();\n }\n }\n });\n\n design.addHandler(this,\n Design.FrameChange.class,\n new AlertHandler()\n {\n\n public void handleAlert(EventObject alert)\n {\n Design.FrameChange chg =\n (Design.FrameChange) alert;\n\n if ((! chg.isAdd) &&\n (chg.element == frame))\n {\n closeOpenController();\n }\n }\n });\n\n design.addHandler(this,\n Design.DeviceTypeChange.class,\n new AlertHandler()\n {\n\n public void handleAlert(EventObject alert)\n {\n Set<DeviceType> dts =\n design.getDeviceTypes();\n int deviceTypes =\n DeviceType.buildDeviceSet(dts);\n\n view.resetDeviceTypes(deviceTypes);\n }\n });\n\n // Add listeners to rename events on project and design\n frame.addHandler(this, NameChangeAlert.class, renameHandler);\n design.addHandler(this,\n NameChangeAlert.class,\n renameHandler);\n\n // Some items should always be enabled.\n // Should be the last call in the constructor\n setInitiallyEnabled(true);\n }", "public interface IEventCommentsPresenter {\n}", "public interface UsersPresenter {\n void getUsers();\n void onUserClicked(User user);\n\n}", "interface MainPresenter {\n}", "interface EventPresenter {\n void getEvents(long schoolId, long classId);\n\n void onDestroy();\n}", "public interface AdminFunctionsPresenter {\n interface View {\n void showPermissionDeniedMessage();\n\n void loadUserManagementPage();\n\n void loadOrganiserManagementPage();\n\n void loadFeedbackViewerPage();\n\n void loadNewEventsActivity();\n }\n\n void setView(View view);\n\n void onUserManagementSelected();\n\n void onOrganiserManagementSelected();\n\n void onFeedbackManagementSelected();\n\n void onEventManagementSelected();\n}", "public void setupEvent(AbstractController controller) {\n this.cylinderContainer.setOnMouseClicked(e -> controller.setSelectedPiece(this));\n }", "@Override\n protected void handleRequest( PlaceRequest request )\n {\n T presenter = getPresenter();\n preparePresenter( request, presenter );\n presenter.revealDisplay();\n }", "public void events(View v){\n }", "public interface MainPresenterInterface {\n\n void onCallOnResume();\n\n void onListReachBotton();\n\n void onCallRetry();\n}", "private void AddUIViewAndHandlers()\n\t{\n\t\t// Set view and autocomplete text\t\t\n\t\tSetViewAndAutoCompleteText(VIEW_ID_COMMAND);\n\t\tSetViewAndAutoCompleteText(VIEW_ID_KEY);\n\t\t\n\t\t// Set handler\n\t\tmCommandViewHandler = MakeViewHandler(VIEW_ID_COMMAND);\t\t\n\t\tmKeyViewHandler = MakeViewHandler(VIEW_ID_KEY);\n\t}", "@Override\n\tprotected void enter(ViewChangeEvent event, List<URIParameter> parameters) {\n\t\tthis.presenter.fillViewWithData();\n\t}", "public void createEvents(){\r\n\t\tbtnCurrent.addActionListener((ActionEvent e) -> JLabelDialog.run());\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n initViews(savedInstanceState);\n mPresenter = onLoadPresenter(savedInstanceState);\n if (mPresenter != null) {\n mPresenter.attachView(this);\n mPresenter.subscribe();\n }\n initEventAndData();\n }", "public interface ISignUpCredentialsPresenter {\n\n void init();\n\n void onClick(int viewId);\n}", "private void setUpVC() {\n\t\tinitializePackageModel();\n\t\tinitializeRootLayout();\n\t\tinitializeStepCountView();\n\t\tinitializeButtonToScanForBluetoothDevices();\n\t\tinitializeButtonToSendCommands();\n\t\taddAllViewsToRootLayout();\n\t\tinitializeUARTControlFragmentInterface();\n\t\tsetListenerOnLaunchScanForBluetoothDevices();\n\t\tsetListenerOnButtonToSendCommands();\n\t}", "public interface GetConfigPresenter extends Presenter<GetConfigView> {\n\n void getConfig(String shopId);\n\n void onReloadClick();\n\n}", "public PresenterRevealedEvent( Presenter presenter ) {\n this( presenter, true );\n }", "private void setupUi() {\n //Set title\n setTitle(R.string.send_mms);\n\n //Set numbers recycler view\n RecyclerView recyclerView = mBinding.ownNumbersList;\n recyclerView.setLayoutManager(new LinearLayoutManager(this));\n recyclerView.setHasFixedSize(true);\n\n NumbersAdapter numbersAdapter = new NumbersAdapter();\n numbersAdapter.watchSubscriptionIdData().observe(this, subscriptionId -> {\n mViewModel.setSubscriptionId(subscriptionId);\n });\n recyclerView.setAdapter(numbersAdapter);\n\n //Get data\n addToCompositeDisposable(mViewModel.getDeviceNumbersList());\n\n //Observe on data\n mViewModel.watchSimCardsList().observe(this, numbersAdapter::setData);\n }", "public interface UserInfoPresenterInter {\n void onUserInfoSUccess(UserInfoBean userInfoBean);\n}", "private void createEvents() {\n\t}", "private void populateUI(Event event){\n mTitle.setText(event.getTitle()); //sets title to event title\n mDescription.setText(event.getDescription());\n }", "private void initMVP() {\n mainPresenter = new MainPresenter(this, getActivity());\n }", "public interface MainScreenPresenter {\n}", "public void setupEvent(Controller controller) {\n this.cylinderContainer.setOnMouseClicked(e -> controller.setSelectedPiece(this));\n }", "private void setup(){\n getSupportActionBar().setTitle(\"Search Results\");\n\n ArrayList<TodoData> todos = this.getTodos();\n presenter = new SearchResultPresenter(this, todos);\n presenter.onCreate();\n }", "public interface NotificationsView extends IsWidget {\n\n void setPresenter(Presenter presenter);\n\n void displayNotifications(List<NotificationDTO> notificationDTOs);\n\n public interface Presenter {\n }\n\n}", "public interface MapsPresenter extends Presenter{\n\n public void setView(MapsView mapsView);\n\n public void setUpMap();\n\n public void signedIn(Bundle extras);\n\n public void markerClicked(String markerId);\n\n}", "@Override\n protected void initEventAndData() {\n }", "public interface RifaMainPresenter {\n void onCreate();\n void onDestroy();\n\n void getRifas();\n void saveFirma(Rifa rifa);\n void removeRifa(Rifa rifa);\n void onEventMainThread(RifaMainEvent event);\n\n RifaMainView getView();\n}", "public interface Presenter {\n\n void onStart();\n\n void onStop();\n\n void onPause();\n\n void attachView(View v);\n\n void attachIncomingArg(Bundle intent);\n\n void onCreate();\n\n void onDestroy();\n}", "@Override\n public void bindView() {\n this.addSearchBtnClickHandler();\n this.addAdvanceSearchBtnClickHandler();\n this.addSearchContentBoxClickHandler();\n }", "@Override\n\tpublic void setPresenter(Presenter listener) {\n\t\tthis.listener = listener;\n\t}", "@PostConstruct\n public void init() throws FlowException, VetoException {\n Flow klineFlow = new Flow(KlineController.class);\n Flow volFlow = new Flow(VOLLineController.class);\n Flow maFlow = new Flow(MALineController.class);\n\n\n KLineHandler = klineFlow.createHandler(context);\n VOLHandler = volFlow.createHandler(context);\n MaHandler = maFlow.createHandler(context);\n\n\n context.register(\"KLineHandler\", KLineHandler);\n context.register(\"VOLHandler\", VOLHandler);\n context.register(\"MaHandler\", MaHandler);\n //\n //drawer.setContent(LineHandler.start(new AnimatedFlowContainer(Duration.millis(320), ContainerAnimations.SWIPE_LEFT)));\n maPane = MaHandler.start();\n volPane = VOLHandler.start();\n klinePane = KLineHandler.start();\n gridPane.addRow(1,klinePane);\n\n\n\n\n System.out.println(\"form 1231212: \"+ from.getValue());\n\n\n //为每个toggle button添加监听方法\n KLinetoggle.setOnAction(event -> {\n try {\n handleKLinetoggle();\n } catch (FlowException e) {\n e.printStackTrace();\n }\n });\n MAtoggle.setOnAction(event -> {\n try {\n handleMAtoggle();\n } catch (FlowException e) {\n e.printStackTrace();\n } catch (VetoException e) {\n e.printStackTrace();\n }\n });\n VOLToggle.setOnAction(event -> {\n try {\n handleVOLtoggle();\n } catch (FlowException e) {\n e.printStackTrace();\n }\n });\n KDJToggle.setOnAction(event -> {\n try {\n handleKDJtoggle();\n } catch (FlowException e) {\n e.printStackTrace();\n }\n });\n\n //初始化界面用到的各种控件\n from.setDialogParent(root);\n to.setDialogParent(root);\n //为日期选择器加上可选范围的控制\n DatePickerUtil.initDatePicker(from,to);\n\n from.setValue(LocalDate.of(2014, 3, 1));\n to.setValue(LocalDate.of(2014, 3, 10));\n\n /**\n * 为起始时间增加监听器\n */\n from.setOnAction(event -> {\n handleTime();\n });\n\n /**\n * 为结束时间增加监听器\n */\n to.setOnAction(event -> {\n handleTime();\n });\n }", "private void eventhandler() {\n\r\n\t}", "public interface IListenerPresenter {\n void loadListen(Context context, boolean isFirst, String type, String page);\n\n void loadListen(Context context, boolean isFirst, String page);\n}", "public interface HomePagePresenter extends BasePresenter{\n interface View extends BaseView{\n\n /**\n * 展示已收藏的项目\n * @param collectionList 已收藏的项目\n */\n void onViewShowCollectionList(List<CollectionModel> collectionList);\n\n /**\n * 打开已收藏的项目\n * @param collectionItem\n */\n void onViewOpenColletionItem(CollectionModel collectionItem);\n }\n void presenterItemClicked(CollectionModel collectionModel);\n}", "private void setupUI() \n\t{\n\t\t\n\t\tthis.setLayout( new FormLayout() );\n\t\tmyInterfaceContainer = new Composite( this, SWT.NONE );\n\t\tmyInterfaceContainer.setLayoutData( FormDataMaker.makeFullFormData());\n\t\t\n\t\tsetupInterfaceContainer();\n\t}", "public void bind() {\n\t\tdisplay.reloadDatabase().addClickHandler(new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\treloadDatabase();\n\t\t\t}\n\t\t});\n\n\t\t// Ein Device auswählen\n\t\teventBus.addHandler(DeviceSelectionChangeEvent.TYPE,\n\t\t\t\tnew DeviceSelectionChangeEventHandler() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSelectionChange(\n\t\t\t\t\t\t\tDeviceSelectionChangeEvent event) {\n\t\t\t\t\t\tDevice selected = event.getDevice();\n\t\t\t\t\t\tif (selected != null) {\n\t\t\t\t\t\t\tdisplay.getLoadProfilePreViewChart()\n\t\t\t\t\t\t\t\t\t.removeAllSeries();\n\t\t\t\t\t\t\tdisplay.getLoadProfilePreViewChart().setTitle(\n\t\t\t\t\t\t\t\t\tnew ChartTitle().setText(\"Vorschau \"\n\t\t\t\t\t\t\t\t\t\t\t+ selected.getManufacturer() + \", \"\n\t\t\t\t\t\t\t\t\t\t\t+ selected.getName()), null);\n\t\t\t\t\t\t\tdisplay.getLoadProfilePreViewChart()\n\t\t\t\t\t\t\t\t\t.addSeries(\n\t\t\t\t\t\t\t\t\t\t\tarrayListToSeries(selected\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getLoadProfile()), true,\n\t\t\t\t\t\t\t\t\t\t\ttrue);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\n\t\tdisplay.getDeviceDataGrid().getSelectionModel()\n\t\t\t\t.addSelectionChangeHandler(new Handler() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSelectionChange(\n\t\t\t\t\t\t\tcom.google.gwt.view.client.SelectionChangeEvent event) {\n\t\t\t\t\t\t// Window.alert( \"fire onselectionchange\");\n\t\t\t\t\t\teventBus.fireEvent(new DeviceSelectionChangeEvent(\n\t\t\t\t\t\t\t\tdisplay.getSingleSelectionModel()\n\t\t\t\t\t\t\t\t\t\t.getSelectedObject()));\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\n\t\t// Event neues Device hinzufügen\n\t\teventBus.addHandler(AddDeviceEvent.TYPE, new AddDeviceEventHandler() {\n\t\t\tpublic void onAddDevice(AddDeviceEvent event) {\n\t\t\t\t//Device der CellList hinzufügen\n\t\t\t\tdisplay.getCellList().getList().add( event.getDevice());\n\t\t\t\t// Device dem SimulatorDevice hinzufügen\n\t\t\t\tdisplay.getSimulatorDevice().addDevice( event.getDevice());\n\t\t\t\t// Chart updaten mit neu berechnetem Lastprofil\n\t\t\t\tdisplay.getLoadProfileViewChart().removeAllSeries();\n\t\t\t\tdisplay.getLoadProfileViewChart().addSeries( display.getSimulatorDevice().getSimulatorLoadProfileAsSeries(), true, true);\n\t\t\t}\n\t\t});\n\n\t\tdisplay.addDevice().addDropHandler(new DropEventHandler() {\n\t\t\t@Override\n\t\t\tpublic void onDrop(DropEvent event) {\n\t\t\t\tDevice selected = event.getDraggableData();\n\t\t\t\tshowDeviceWindow( selected);\n\t\t\t}\n\t\t});\n\t\t\n\t\tdisplay.getRunButton().addClickHandler( new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick( ClickEvent event) {\n\t\t\t\tRunDialogPresenter runDialogPresenter = new RunDialogPresenter( eventBus, new RunDialogView());\n\t\t\t\tSimulatorDevice simulatorDevice = display.getSimulatorDevice();\n\t\t\t\trunDialogPresenter.go( simulatorDevice);\n\t\t\t}\n\t\t});\n\t\t\n\t\tdisplay.getResetButton().addClickHandler(new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tdisplay.getCellList().getList().clear();\n\t\t\t\tdisplay.getSimulatorDevice().clear();\n\t\t\t\tdisplay.getLoadProfileViewChart().removeAllSeries();\n\t\t\t\tdisplay.getLoadProfileViewChart().redraw();\n\t\t\t}\n\t\t});\n\t}", "protected void setupUI() {\n textView = (TextView) findViewById(R.id.textView);\n viewGradeButton = (Button) findViewById(R.id.viewAllBillsButton);\n viewDash = (Button) findViewById(R.id.viewDash);\n\n //Listen if the buttons is clicked\n viewGradeButton.setOnClickListener(onClickViewGradeButton);\n viewDash.setOnClickListener(onClickViewDash);\n\n }", "private void registerEvents() {\n createRoomBTN.addActionListener(actionEvent -> {\n chatController.createRoom(roomNameIF.getText());\n roomNameIF.setText(\"\");\n });\n\n backBTN.addActionListener(actionEvent -> {\n if (chatController.getJoinedRooms().size() > 0) chatView.renderChatPanel();\n });\n }", "public interface MainContract {\n interface MvpView {\n void showCreateActivity();\n void showActiveActivity();\n void showReadActivity();\n void showLoginForm();\n }\n\n interface Presenter {\n void handleCreateButtonClick(View view);\n void handleActiveButtonClick(View view);\n void handleReadButtonClick(View view);\n void handleLoginFormClick(View view);\n }\n}", "public WeatherPresenter(WeatherPresenterListener listener){\n this.mListener = listener;\n }", "public interface Presenter {\n void onCreate();\n\n void onStart();\n\n void onResume();\n\n void onPause();\n\n void onStop();\n\n void onDestroy();\n\n void onAttachView(BookView view);\n\n}", "private void handleUI() {\r\n // Start/stop camera\r\n btnCam.setOnAction(new EventHandler<ActionEvent>() {\r\n @Override\r\n public void handle(ActionEvent e) {\r\n if (!camRunning) {\r\n videoStream = new ClientVideoStream(imageView);\r\n videoThread = new Thread(videoStream);\r\n videoThread.start();\r\n new Thread(new Client(MsgType.START_VIDEO_STREAM)).start();\r\n btnCam.setText(\"Stop camera\");\r\n camRunning = true;\r\n }\r\n else {\r\n btnCam.setText(\"Stop camera\");\r\n try {\r\n videoStream.terminate();\r\n } catch (Exception ex) {\r\n System.out.println(\"Failed to stop camera\");\r\n }\r\n camRunning = false;\r\n }\r\n }\r\n });\r\n // Toggle man/auto\r\n btnManAut.setOnAction(new EventHandler<ActionEvent>() {\r\n @Override\r\n public void handle(ActionEvent e) {\r\n if (manualMode) {\r\n new Thread(new Client(MsgType.MANUAL)).start();\r\n btnManAut.setText(\"Manual\");\r\n }\r\n else {\r\n new Thread(new Client(MsgType.AUTO)).start();\r\n btnManAut.setText(\"Auto\");\r\n }\r\n manualMode = !manualMode;\r\n }\r\n });\r\n }", "public interface IWaitroomPresenter {\n\n // View -> Facade\n void changePlayerColor(int color);\n\n void leaveGame();\n\n void startGame();\n\n // Model -> View\n void updatePlayerList();\n\n boolean gameReady();\n\n void startGameResponse(String message);\n\n void leaveGameResponse(String message);\n\n void detachView();\n}", "private void controllersUI() {\n\t\tc.setLayout(null);\n\t\tc.setBackground(whiteColor);\n\t\t\n\t\tlbPullTitle.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlbPullTitle.setOpaque(true);\n\t\tlbPullTitle.setFont(new Font(\"Helvetica Neue\", Font.PLAIN, 18));\n\t\tlbPullTitle.setBounds(0, 0, 320, 52);\n\t\t\n\t\ttxtPulls.setFont(new Font(\"Helvetica Neue\", Font.PLAIN, 12));\n\t\ttxtPulls.setBounds(0, 52, 320, 420);\n\t\t\n\t\ttxtMsg.setBounds(10, 480, 230, 35);\n\t\tbtnMsg.setBounds(250, 476, 60, 40);\n\t\t\n\t\tc.add(txtPulls);\n\t\tc.add(lbPullTitle);\n\t\tc.add(btnMsg);\n\t\tc.add(txtMsg);\n\t\t\n\t\tbtnMsg.addActionListener(this);\n\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}" ]
[ "0.7445072", "0.679894", "0.671336", "0.6503667", "0.64522284", "0.6431115", "0.6407833", "0.64070654", "0.64070654", "0.63629293", "0.63304347", "0.6271766", "0.6225131", "0.61840194", "0.6175389", "0.6155178", "0.61434174", "0.6122334", "0.6100597", "0.60997593", "0.6052449", "0.6042214", "0.6041079", "0.60278136", "0.60257345", "0.6014444", "0.59815466", "0.5971906", "0.5937433", "0.59293485", "0.5925847", "0.592334", "0.59122616", "0.58803564", "0.5879986", "0.58566993", "0.5852084", "0.5841822", "0.58134997", "0.5793898", "0.57938504", "0.57912785", "0.5786746", "0.57849824", "0.5764667", "0.5756353", "0.5750672", "0.5750068", "0.57435495", "0.5741988", "0.5740782", "0.57352304", "0.573356", "0.5731504", "0.5729015", "0.57247007", "0.5723236", "0.5722311", "0.5719126", "0.5713895", "0.57116205", "0.57112265", "0.57103086", "0.5709825", "0.5706911", "0.5700627", "0.57002854", "0.5700019", "0.56972307", "0.56929183", "0.5687518", "0.56838787", "0.5677155", "0.5674269", "0.5667747", "0.5665269", "0.5663545", "0.56632984", "0.5662445", "0.56605726", "0.56552285", "0.5648286", "0.5640762", "0.5640235", "0.5639376", "0.5631855", "0.56203026", "0.5619399", "0.5615747", "0.56152594", "0.5611297", "0.5608988", "0.5607098", "0.5591525", "0.55833715", "0.5580808", "0.558022", "0.5574262", "0.55605173", "0.5555396", "0.5555396" ]
0.0
-1
release all tabs manager
public void actionPerformed(ActionEvent e){ loginTF.setText(""); passwordTF.setText(""); mainJTabbedPane.setSelectedIndex(0); mainJTabbedPane.setEnabledAt(1, false); mainJTabbedPane.setEnabledAt(2, false); mainJTabbedPane.setEnabledAt(3, false); mainJTabbedPane.setEnabledAt(4, false); mainJTabbedPane.setEnabledAt(5, false); mainJTabbedPane.setEnabledAt(6, false); mainJTabbedPane.setEnabledAt(7, false); logoutComponentsJPanel.setVisible(false); loginComponentsJPanel.setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void closeTab() {\n\t\tclose();\n\t\t\n\t\tfor(int i = 0; i < Main.gameTabs.getTabs().size(); i++) {\n\t\t\tif(Main.gameTabs.getTabs().get(i).getId().equals(hostName)) {\n\t\t\t\tMain.gameTabs.getTabs().remove(i);\n\t\t\t}\n\t\t}\n\t\tfor (int i=0; i<Main.gameHandler.size(); i++) {\n\t\t\tif(hostName.equals(Main.gameHandler.get(i).getHostName())) {\n\t\t\t\tMain.gameHandler.remove(i);\n\t\t\t}\n\t\t}\n\t}", "public void freeResources() {\n borderPane = null;\n }", "@Override\n\tpublic void removeAllTabs() {\n\t\t\n\t}", "public void onDestroy() {\n super.onDestroy();\n Bottomtabs.gps = false;\n Bottomtabs.type = \"\";\n }", "public void destroy()\n {\n if ( cacheManager == null )\n {\n return;\n }\n\n LOG.info( \"clearing all the caches\" );\n\n cacheManager.close();\n cacheManager = null;\n //cacheManager.clearAll();\n //cacheManager.shutdown();\n }", "void destroy() {\n \t\ttry {\r\n \t\t\tupKeep.stopRunning();\r\n \t\t} catch (InterruptedException e) {\r\n \t\t}\r\n \r\n \t\t// Kill all running processes.\r\n \t\tfor (MaximaProcess mp : pool) {\r\n \t\t\tmp.kill();\r\n \t\t}\r\n \t\tpool.clear();\r\n \r\n \t\t// Kill all used processes.\r\n \t\tfor (MaximaProcess mp : usedPool) {\r\n \t\t\tmp.kill();\r\n \t\t}\r\n \t\tusedPool.clear();\r\n \t}", "@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tgetActivity().getActionBar().removeAllTabs();\n\t\tmyContext.getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);\n\t}", "public void destroy() {\n mTabModelSelectorTabObserver.destroy();\n TabModelFilter tabModelFilter =\n mTabModelSelector.getTabModelFilterProvider().getTabModelFilter(false);\n if (tabModelFilter != null) {\n tabModelFilter.removeObserver(mTabModelObserver);\n }\n mTabModelSelector.removeObserver(mTabModelSelectorObserver);\n }", "public void freeAll()\n\t\t{\n\t\t\ts_cGameInstance = null; \n\t\t}", "public void finalize() {\n\n if (mBtManager != null) {\n //mBtManager.stop();\n mBtManager.setHandler(null);\n }\n mBtManager = null;\n mContext = null;\n mConnectionInfo = null;\n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t//destroy all running hardware/db etc.\n\t}", "public static void handleTabs() {\n ArrayList<String> allTabs = new ArrayList<String>(driver.getWindowHandles());\n // There will always be 2 tabs.\n driver.switchTo().window(allTabs.get(1));\n driver.close();\n driver.switchTo().window(allTabs.get(0));\n }", "private void releaseResources() {\n\t\tstopForeground(true);\n\t\taudioManager.unregisterRemoteControlClient(remoteControlClient);\n\t\taudioManager.unregisterMediaButtonEventReceiver(remoteReceiver);\n\t\t\n\t\tif (mediaPlayer != null){\n\t\t\tmediaPlayer.reset();\n\t\t\tmediaPlayer.release();\n\t\t\tmediaPlayer = null;\n\t\t}\n\t\t\n\t\tif (wifiLock.isHeld()) {\n\t\t\twifiLock.release();\n\t\t}\n\t}", "public void releaseChildren() {\n if (children != null) {\n unloadChildren();\n\n children.unload();\n children = null;\n }\n }", "public void destroyAll() {\n children.destroyAll();\n }", "public void removeAllTabs() {\n\t\tmTabLayout.removeAllViews();\n\t\tif (mTabSpinner != null) {\n\t\t\t((TabAdapter) mTabSpinner.getAdapter()).notifyDataSetChanged();\n\t\t}\n\t\tif (mAllowCollapse) {\n\t\t\trequestLayout();\n\t\t}\n\t}", "@Override\n\tpublic void releaseAllResources() {\n\t}", "void unregister() {\n for (Component comp : jTabbedPane1.getComponents()) {\n if (comp instanceof MiniTimelinePanel) {\n DiscoveryEventUtils.getDiscoveryEventBus().unregister(comp);\n }\n }\n }", "@Override\n public void onDestroy() {\n mPluginManager = null;\n \n super.onDestroy();\n }", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tSystem.gc();\r\n\t}", "public void destroyForAll() {\n super.destroyForAll();\n }", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy();", "@After\n\tpublic void cleanUp() {\n\t\tif (model != null) {\n\t\t\tmodel.release(true);\n\t\t\tloader.unloadAll();\n\t\t}\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t MainService.allActivity.remove(this);\n\t}", "public void onDestroy() {\n LinearLayout linearLayout = this.f15166b;\n if (linearLayout != null) {\n linearLayout.removeAllViews();\n }\n WebView webView = this.f15167c;\n if (webView != null) {\n webView.destroy();\n this.f15167c = null;\n }\n super.onDestroy();\n }", "public void cleanup();", "public void releaseCachedPages() {\n cache.removeAll();\n }", "@Override\n\tpublic void onDestroy() {\n\t\tquitAllFocus();\n\t\timg.setImageBitmap(null);\n\t\tclearMemory();\n\t\tsuper.onDestroy();\n\t\ttry {\n\t\t\t//GARBAGE COLLECTOR\n\t\t\tSystem.gc();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}", "@Override\n protected void onDestroy() {\n if (pager != null) {\n pager = null;\n }\n super.onDestroy();\n\n }", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tCleanup();\r\n\t}", "@Override\n public void cleanup() {\n if (this.cleanedUp) {\n throw new IllegalStateException(\"Tried cleanup already cleared swapchain!\");\n }\n\n if (this.swapchain != VK_NULL_HANDLE) {\n for (final var imageView : this.imageViews) {\n imageView.close();\n }\n\n vkDestroySwapchainKHR(this.deviceContext.getDeviceHandle(), this.swapchain, null);\n }\n this.cleanedUp = true;\n }", "@Override\n protected void tearDown() throws Exception\n {\n _mafct.release();\n _mafct = null;\n super.tearDown();\n }", "public void manageTabsAndWindows() throws Exception{\n\t\tfor(int i = 0; i <= 4; i++){\n\t\t\t((JavascriptExecutor) driver).executeScript(\"window.open();\");\n\t\t}\n\n\t\t//close all tabs open including parent tab\n\t\tfor (String winHandle : driver.getWindowHandles()) {\n\t\t driver.switchTo().window(winHandle);\n\t\t System.out.println(\"Found handle: \" + winHandle);\n\t\t driver.close();\n\t\t}\n\n\t\t\n\t}", "public void clear(){\n nameTab.getChildren().clear();\n tabContent.getChildren().clear();\n tabs.clear();\n }", "public void destroy(){\n\t\tIterator toolIterator = tools.iterator();\n\t\twhile(toolIterator.hasNext()){\n\t\t\tToolBridge tb = (ToolBridge) toolIterator.next();\n\t\t\ttb.terminate();\n\t\t}\n\n\t\tmultiplexingClientServer.stopRunning();\n\t}", "private void release() {\n\t\tinitialized = false;\n\t\tpause();\n\t\tsetOnCompletionListener(null);\n\t\tgetMp().release();\n\t\tmp = null;\n\t}", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tLog.d(\"maintab\", \"maintab_MainActivity------onDestroy\");\r\n\t}", "public void destroy() {\n \t\n }", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {}", "public void destroy() {}", "public void destroy() {\n destroyFingerprintSDK();\n //destroyDB();\n }", "public static void release() {\r\n for (int i = 0; i < players_.size(); i++) {\r\n MediaPlayer p = players_.valueAt(i);\r\n if (p != null) {\r\n if (p.isPlaying()) {\r\n p.stop();\r\n }\r\n p.release();\r\n }\r\n }\r\n players_.clear();\r\n currentMusic_ = INVALID_NUMBER;\r\n }", "public void destroy() {\n processeddatasetDataProvider_tier.close();\n filebranchDataProvider_search.close();\n storageelementDataProvider_search.close();\n runsDataProvider_search.close();\n primarydatasetDataProvider_saerch.close();\n datatierDataProvider_search.close();\n algorithmconfigDataProvider_search.close();\n }", "@Override\n protected void onDestroy() {\n super.onDestroy();\n realm.close();\n realm = null;\n }", "@Override\n protected void onDestroy() {\n super.onDestroy();\n cleanUp();\n }", "public void destroy() {\r\n\r\n\t}", "@Override\n public void onDestroy() {\n super.onDestroy();\n uiHelper.onDestroy();\n }", "public void destroy(){\n runner.destroy();\n }", "public void cleanup() {\n mParentLayout.removeView(mContainer);\n mControlsVisible.clear();\n }", "public void teardown() {\n for (App app : applications) {\n app.icon.setCallback(null);\n }\n\t}", "private void destroyTab(int tabindex) {\n\t\tif (tabindex != -1) {\n\t\t\tcontainer[tabindex] = null;\n\t\t\trecipientname[tabindex] = null;\n\t\t\trecipientname[tabindex] = null;\n\t\t\tchathistory[tabindex] = null;\n\t\t\tchatinput[tabindex] = null;\n\t\t}\n\t}", "public void release() {\r\n pageEL = null;\r\n params = null;\r\n super.release();\r\n }", "public void cleanup() {\r\n }", "@Override\n public void onDestroy() {\n nm.cancelAll(); \t\n \tsuper.onDestroy();\n \t\n }", "public void cleanup() {\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\tsuper.destroy();\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\tsuper.destroy();\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\tsuper.destroy();\r\n\t}", "public void unloadContent(AssetManager manager) {\n for (String asset : assets) {\n if (manager.isLoaded(asset)) {\n manager.unload(asset);\n }\n }\n }", "public void destroy() {\n this.bfc.cleanUp();\n }", "public final void cleanUp() {\n\t\tmgdmfunctions = null;\n\t\tmgdmlabels = null;\n\t\theap.finalize();\n\t\theap = null;\n\t\tSystem.gc();\n\t}", "public void destroy() {\r\n }", "public void onDestroy() {\n WhiteListActivity.super.onDestroy();\n try {\n getLoaderManager().destroyLoader(100);\n getContentResolver().unregisterContentObserver(this.j);\n } catch (Exception e2) {\n Log.e(\"WhiteListActivity\", e2.toString());\n }\n }", "public void unloadContent(AssetManager manager) {\n\t\tfor(String s : assets) {\n\t\t\tif (manager.isLoaded(s)) {\n\t\t\t\tmanager.unload(s);\n\t\t\t}\n\t\t}\n\t}", "public void release() {\n\t\tsuper.release();\r\n\t\tinnerContent = null;\r\n\t\tlabelHead = null;\r\n\t\tscroll = null;\r\n\t}", "public static void DrivingNavi_clean(){\n navInitManager = null;\n\n }", "public void destroy() {\n assert mNativeOfflinePageBridge != 0;\n nativeDestroy(mNativeOfflinePageBridge);\n mNativeOfflinePageBridge = 0;\n }", "public void destroy() {\n destroyIn(0);\n }", "void destroy() {\n destroyCache();\n }", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\t\r\n\t\tImemberApplication.getInstance().getLogonSuccessManager().removeLogonSuccessListener(this);\r\n\t\tImemberApplication.getInstance().getLoginSuccessManager().removeLoginSuccessListener(this);\r\n\t\t\r\n\t\tSystem.out.println(\"MyCardListActivity---------kill\");\r\n\t}", "public static void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "@Override\n protected void onDestroy() {\n mActivityGraph = null;\n super.onDestroy();\n }", "public void release() {\r\n super.release();\r\n this.page = null;\r\n }", "public void destroy() {\n\t\texcludeItem = null;\r\n\t\tloginPage=null;\r\n\t\tloaginAction=null;\r\n\t\tauthority = null;\r\n\t}", "@After\n\tpublic void tearDown() {\n\t\twindow.cleanUp();\n\t}" ]
[ "0.67070943", "0.6438363", "0.64290327", "0.6411278", "0.63592494", "0.63519835", "0.6318387", "0.6227381", "0.6217342", "0.61913735", "0.61769354", "0.61618304", "0.6159404", "0.6152667", "0.61509746", "0.61463785", "0.61230564", "0.6111581", "0.61053735", "0.60744435", "0.60606146", "0.6056332", "0.6056332", "0.6056332", "0.6056332", "0.6056332", "0.6056332", "0.6056332", "0.6056332", "0.60370415", "0.60116917", "0.59937036", "0.59843826", "0.5980298", "0.5979006", "0.5977473", "0.59766936", "0.59744924", "0.59689724", "0.5955593", "0.59457713", "0.59457517", "0.5940675", "0.59402025", "0.59370947", "0.5936312", "0.5936312", "0.5936312", "0.5936312", "0.59362406", "0.59362406", "0.59345305", "0.5930465", "0.59283036", "0.59256136", "0.5923594", "0.59202796", "0.59198767", "0.59084815", "0.59011245", "0.5895613", "0.58944416", "0.5891726", "0.5878036", "0.5873158", "0.58644", "0.5863289", "0.5863289", "0.5863289", "0.58626825", "0.58507055", "0.5849561", "0.58489925", "0.5846972", "0.58380747", "0.5834592", "0.58343333", "0.58320534", "0.58318216", "0.5831544", "0.58304733", "0.5826434", "0.5822953", "0.5822953", "0.5822953", "0.5822953", "0.5822953", "0.5822953", "0.5822953", "0.5822953", "0.5822953", "0.5822953", "0.5822953", "0.5822953", "0.5822953", "0.5822953", "0.5822953", "0.5820285", "0.58191067", "0.58134377", "0.5809432" ]
0.0
-1
function to view a customer by id or name
public void actionPerformed(ActionEvent e){ if(employees.size() >= 1){ try{ for(Employee employee: employees){ if(employee.getEmployeeId()== Integer.parseInt(empIdCombo.getSelectedItem().toString())){ empJTextArea.setText("Employee ID: "+employee.getEmployeeId() +"\n Name: " +employee.getEmployeeName() +"\n Access Level: " +employee.getAccess() +"\n Password: " +employee.getPassword() +"\n Salary: " +employee.getSalary()); empIdCombo.setSelectedIndex(0); return; } } }catch(NumberFormatException nfe){ JOptionPane.showMessageDialog(null, "Employee Id should be a number."); } }else{ JOptionPane.showMessageDialog(null, "No Employees Found"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCustomer(String custId);", "public Customer displayCustomer(int cid);", "@Override\n\tpublic Customer viewCustomer(int customerId) {\n\t\t// TODO Auto-generated method stub\n\t\tCustomer cust = repository.findById(customerId)\n\t\t\t\t.orElseThrow(() -> new EntityNotFoundException(\"Currently No Customer is available with this id\"));\n\t\treturn cust;\n\t}", "@GetMapping(\"/customer/{id}\")\r\n\tpublic Customer viewCustomerbyId(@PathVariable(\"id\") int customerId){\r\n\t\tif(custService.viewCustomerbyId(customerId)==null) {\r\n\t\t\tthrow new CustomerNotFoundException(\"Customer not found with this id\" +customerId);\r\n\t\t}\r\n\t\treturn custService.viewCustomerbyId(customerId);\r\n\t\t\r\n\t}", "@Override\n public JSONObject viewCustomerById(long id) {\n\n return in_salescustdao.viewSLCustomerByID(id);\n }", "String getCustomerNameById(int customerId);", "Customer getCustomerById(final Long id);", "Customer getCustomerById(int customerId);", "public Customer getCustomerByName(String customerName);", "@GetMapping(\"/customer/{id}\")\n\tpublic ResponseEntity<Object> getCustomerDetailed(@PathVariable(\"id\") Integer id, HttpServletRequest request){\n\t\tif(service.findByEmail(SessionManager.getInstance().getSessionEmail(request.getSession())) == null) {\n\t\t\tSessionManager.getInstance().delete(request.getSession());\n\t\t\treturn new ResponseEntity<>(HttpStatus.UNAUTHORIZED); \n\t\t}else {\n\t\t\tCustomer cus = cService.findById(id);\n\t\t\tif(cus == null) return new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t\tMappingJacksonValue mappedCustomer = new MappingJacksonValue(cus);\n\t\t\tmappedCustomer.setFilters(new SimpleFilterProvider().addFilter(Customer.FILTER, SimpleBeanPropertyFilter.serializeAll()));\n\t\t\treturn new ResponseEntity<>(mappedCustomer, HttpStatus.OK);\n\t\t}\n\t}", "@Override\n\tpublic Customer show(int id) {\n\t\t\n\t\tOptional<Customer> customerOpt = this.customerRepo.findById(id);\n\t\tif(customerOpt.isPresent()) {\n\t\t\tCustomer customer = customerOpt.get();\n\t\t\treturn customer;\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public JSONObject viewSLCustomerByID(long id) {\n\n return in_salescustdao.viewSLCustomerByID(id);\n }", "@GetMapping(\"/customers/{customer_id}\")\n\tpublic Customer getcustomer(@PathVariable(\"customer_id\") int customerid) {\n\t\tCustomer thecustomer=thecustomerService.getCustomer(customerid);\n\t\tif(thecustomer==null) {\n\t\t\tthrow new CustomerNotFoundException(\"Customer with id : \"+customerid+\" not found\");\n\t\t}\n\t\t\n\t\treturn thecustomer;\n\t}", "public static Customer getCustomer(int id_cust) {\n Connection c = connection();\n PreparedStatement stmt;\n int id = 0;\n String name = null;\n String email = null;\n String password = null;\n Customer customer = null;\n try {\n String sql = \"SELECT * FROM customer WHERE id=?;\";\n stmt = c.prepareStatement(sql);\n stmt.setInt(1, id_cust);\n ResultSet rs = stmt.executeQuery();\n while (rs.next()) {\n id = rs.getInt(\"id\");\n name = rs.getString(\"name\");\n email = rs.getString(\"email\");\n password = rs.getString(\"password\");\n }\n stmt.close();\n c.close();\n customer = new Customer(id, name, email, password);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return customer;\n }", "@GetMapping(\"/customer/{id}\")\n\tpublic ResponseEntity<Customer> getCustomerById(@PathVariable Long id) {\n\t\tCustomer customer = customerRepository.findById(id)\n\t\t\t\t.orElseThrow(() -> new ResourceNotFoundException(\"Customer not exist with id :\" + id));\n\t\treturn ResponseEntity.ok(customer);\n\t}", "@RequestMapping(value = \"/customer/{id}\",method=RequestMethod.GET)\n @ResponseStatus(HttpStatus.OK)\n public CustomerViewModel findCustomerById(@PathVariable(\"id\") int id){\n //create a customer View Model using the find method from the service layer\n CustomerViewModel customerViewModel = service.findCustomer(id);\n\n //if it does not exist, through an illegal argument exception\n if(customerViewModel == null){\n //throw new\n }\n\n //return the requested customer View Model\n return customerViewModel;\n }", "public static void viewCustomerInfo() {\n\t\tSystem.out.println(\"Please enter customer name\");\n\t\tString firstName=scan.nextLine();\n\t\tCustomer c=Bank.findCustomerByName(firstName);\n\t\tFind find=new Find();\n\t\tfind.viewCustomerDetails(c);\n\n\t\tSystem.out.println(\"Customer: \" + c.getFirstName() + \" \" + c.getLastName() + \" \"+ c.getUserName() + \" \"+ c.getPassword() \n\t\t+ \" \" + c.getDriverLicense() + \" \" + c.getAccountType() + \" \"+ c.getInitialDeposit() + \" \" + \"was viewed\");\n\t\tLogThis.LogIt(\"info\", c.getFirstName() + \" \" + c.getLastName()+ \" was viewed!\");\n\n\t\tSystem.out.println(\"Would you like to find another customer?\");\n\n\t\tSystem.out.println(\"\\t[y]es\");\n\t\tSystem.out.println(\"\\t[n]o\");\n\t\tSystem.out.println(\"\\t[l]og Out\");\n\n\n\t\tString option = scan.nextLine();\n\t\tswitch(option.toLowerCase()) {\n\t\tcase \"y\":\n\t\t\tviewCustomerInfo();\n\t\t\tbreak;\n\t\tcase \"n\":\n\t\t\tstartMenu();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Invalid input. Redirecting to main menu\");\n\t\t\tstartMenu();\n\n\t\t}\n\t}", "@PreAuthorize(\"hasRole('ROLE_ADMIN')\")\n\t@RequestMapping(value = \"/{id}\", method = RequestMethod.GET) \n\tpublic String show(@PathVariable(\"id\") Long id, Model uiModel) {\n\t\t\n\t\tCustomer customer = customerService.findById(id); \n\t\t\n\t\tuiModel.addAttribute(\"customer\", customer); \n\t\t\n\t\treturn \"customers/show\";\n\t\t}", "CustomerDTO getCustomerDetails(Long customerId,String userName) throws EOTException;", "@Override\n\tpublic Customer retrieveCustomer(Integer id) {\n\n\t\tCustomer customer = new Customer();\n\n\t\tfor (Customer cust : customers) {\n\t\t\tif (cust.getId() == id) {\n\t\t\t\tcustomer.setId(id);\n\t\t\t\tcustomer.setUsername(cust.getUsername());\n\t\t\t\tcustomer.setFirstName(cust.getFirstName());\n\t\t\t\tcustomer.setLastName(cust.getLastName());\n\t\t\t\tcustomer.setEmail(cust.getEmail());\n\t\t\t\tcustomer.setUserType(cust.getUserType());\n\t\t\t\tcustomer.setPassword(cust.getPassword());\n\t\t\t\tcustomer.setAddress(cust.getAddress());\n\t\t\t}\n\t\t}\n\t\tlogger.info(\"A GET call retrieved a customer: retrieveCustomer()\");\n\t\treturn customer;\n\t}", "Customer findById(Long id);", "@Override\n public CustomerDetails viewAccount(String user) {\n CustomerDetails details=customerRepository.findById(user).get(); \n log.debug(user);\n return details; \n\n }", "@GET\n\t@Path(\"get\")\n\tpublic Customer getCustomer(@QueryParam(\"id\") int id) {\n\t\treturn ManagerHelper.getCustomerManager().get(id);\n\n\t}", "@Override\r\n\tpublic Customer getCustomer(String custId) {\r\n\t\tOptional<Customer> optionalCustomer = null;\r\n\t\tCustomer customer = null;\r\n\t\toptionalCustomer = customerRepository.findById(custId);\r\n\t\tif (optionalCustomer.isPresent()) {\r\n\t\t\tcustomer = optionalCustomer.get();\r\n\t\t\treturn customer;\r\n\t\t} else {\r\n\t\t\tthrow new EntityNotFoundException(\"Customer With Id \" + custId + \" does Not Exist.\");\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic Customer getCustomer(int id) {\n\t\treturn sessionFactory.getCurrentSession().get(Customer.class, id);\n\t}", "@Override\n\tpublic Customer getCustomer(Integer id) {\n\t\treturn customerDao.findById(id);\n\t}", "public void retrieveACustomerWithID(long id) {\r\n\t\tSystem.out.println(\"\\nCustomer with id \" + id);\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\ttx.begin();\r\n\t\tCustomer2 customer = em.find(Customer2.class, id);\r\n\t\tif(customer == null){\r\n\t\t\tSystem.out.println(\"\\nNo such customer with id: \" + id);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tSystem.out.println(customer);\r\n\t\ttx.commit();\r\n\t\tem.close();\r\n\t}", "@RequestMapping(method = RequestMethod.GET, value = \"/{id}\")\n\t public ResponseEntity<Customer> getCustomerWithId(@PathVariable Long id) {\n\t return service.getCustomerWithId(id);\n\t }", "@GetMapping(\"/{id}\")\n public Customer getCustomer(@PathVariable long id){\n return customerRepository.findById(id);\n }", "public ResponseEntity<customer.controller.Customer> getCustomerById(Long id);", "public List<Customer> getCustomerByID() {\n Query query = em.createNamedQuery(\"Customer.findByCustomerId\")\r\n .setParameter(\"customerId\", custID);\r\n // return query result\r\n return query.getResultList();\r\n }", "@GetMapping(\"/{id}\")\n public String show(@PathVariable(\"id\") long id,\n Model model) {\n Customer customer = customerService.showCustomerById(id);\n model.addAttribute(CUSTOMER, customer);\n model.addAttribute(ACTUAL_ADDRESS, customer.getActualAddress());\n model.addAttribute(REGISTERED_ADDRESS, customer.getRegisteredAddress());\n return CUSTOMERS_CUSTOMER;\n }", "@GetMapping(\"/customers/{id}\")\n\tpublic ResponseEntity<Customer> getCustomerById(@PathVariable(value = \"id\") Long customerId)\n\t\tthrows ResourceNotFoundException {\n\t\tCustomer customer = customerRepository.findById(customerId)\n\t\t\t\t.orElseThrow(() -> new ResourceNotFoundException(\"Custumer not found for this id :: \" + customerId));\n\t\t\t\treturn ResponseEntity.ok().body(customer);\n\t}", "@GetMapping(\"/api/customer/{id}\")\n\tpublic ResponseEntity<CustomerDetails> getCustomerDetailsByID(@PathVariable(\"id\") long id) {\n\t\tCustomerDetails customerDetails = customerService.getCustomerDetailsByID(id);\n\t\treturn ResponseEntity.ok().body(customerDetails);\n\n\t}", "@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}", "public Customer findCustomerById(long id) throws DatabaseOperationException;", "public Customer getCustomer(String cID, ArrayList<Customer> customers) throws NotFoundException\r\n\t{\t\r\n\t\tCustomer cust = null;\r\n\t\tfor(int i=0; i<customers.size(); i++)\r\n\t\t{\r\n\t\t\tif(customers.get(i).getcID().equals(cID))\r\n\t\t\t\tcust = customers.get(i);\r\n\t\t}\r\n\t\t\r\n\t\tif(cust == null)\r\n\t\t\tthrow new NotFoundException(cID);\r\n\t\t\r\n\t\treturn cust;\t\t\r\n\t}", "Optional<String> findCustomerNameById(@Param(\"id\") Integer id);", "@RequestMapping(\"/myCustomers/{id}\")\n\tpublic String myCustomers(@PathVariable(\"id\") int id, Model m, Principal princpl) {\n\t\t\n\t\tAgentModel agentById = this.servimple.getAgentModelById(id);\n\t\tif(agentById.getPosition().equals(\"Active\")) {\n\t\t\t\n\t\tCustomerModel[] allCustomer = this.servimple.customerByAgent(id);\n\t\tterget = \"Customer Details\";\n\t\tm.addAttribute(\"mycustomr\", allCustomer);\n\t\tm.addAttribute(\"terget\", terget);\n\t\treturn \"Agent/CustomerByAgent\";\n\t\t}\n\t\t\n\t\telse {\n\t\t\tm.addAttribute(\"sorry\", \"Sorry! Your Id is Deactivated. To activate your id Plz Contact to Admin.\");\n\t\t\treturn \"Agent/agentPanel\";\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic CustomerData getCustomer(Long custId) {\n\t \n\t\tOptional<CustomerData> optionalCust = customerRepository.findById(custId);\n\t\t//Optional object use for check if a customer id is existing or not\n if(optionalCust.isPresent()) {\n return optionalCust.get(); //if customer id is exist then return a value\n }\n\t\treturn null;\n\t\t\n\t}", "java.lang.String getCustomerId();", "java.lang.String getCustomerId();", "String getCustomerID();", "@RequestMapping(\"/cars/{carId}/Customer/{id}\")//لما حطيت id لازم احط تحت باث فاريبل\r\n\t public CustomerDto FindCustomer(@PathVariable String id) {\r\n\t\treturn serviceUsers.getCustomer(id);\r\n\t }", "@Override\n\tpublic Iterable<Customer> displayCust() {\n\t\treturn customerRepository.findAll();\n\t}", "@Override\r\n\tpublic Customer getCustomerById(int id) {\n\t\treturn customerdao.getCustomerById(id);\r\n\t}", "@RequestMapping( value = CONTEXT_URL + \"/id/{id}\",\n method = RequestMethod.GET,\n produces = {MediaType.APPLICATION_JSON_VALUE} )\n public CustomerDTO getCustomer( @PathVariable String id )\n throws CustomerNotFoundException\n {\n final String methodName = \"getCustomer\";\n logMethodBegin( methodName, id );\n CustomerDTO customerDTO = this.customerEntityService\n .getCustomerDTO( UUIDUtil.uuid( id ));\n logMethodEnd( methodName, customerDTO );\n return customerDTO;\n }", "@Override\n\t@Transactional\n\tpublic Customer getCustomerbyId(int theid) {\n\n\t\tCustomer thecustomer = hibernateTemplate.get(Customer.class, theid);\n\n\t\treturn thecustomer;\n\t}", "public Customer getCustomer(int id) {\r\n\t\treturn manager.getCustomer(id);\r\n\t}", "@Override\n public Customer getCustomerById(Long id) {\n log.debug(\"Inside getCustomerById method\");\n return customerRepository.findById(id).orElseThrow(\n () -> new ResourceNotFoundException(\"No customer present with the id : \" + id));\n }", "@GetMapping(\"/customer/{id}\")\r\n public Customer getCustomerById(@PathVariable Long id) {\r\n // orElseThrow means it will attempt to unwrap the optional\r\n // if there's nothing there, it will throw an exception\r\n return customerRepository.findById(id).orElseThrow();\r\n }", "@GET\n\t@Path(\"/edit/{id}\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response getCustomerbyID(@PathParam(value = \"id\") int id)\n\t\t\tthrows RemoteException, MalformedURLException, NotBoundException, ClassNotFoundException, SQLException {\n\t\tDatabaseOption db = (DatabaseOption) Naming.lookup(\"rmi://\" + address + service);\n\n\t\t// Connect to database\n\t\tdb.Connect();\n\n\t\t// Get specific car by its unique id\n\t\tList<Object> rs = db.ReadCustomers(\"SELECT * FROM CUSTOMERS WHERE id=\" + id);\n\n\t\t// Connect to database\n\t\tdb.Close();\n\n\t\t// GSON import used to serialize and deserialize Java objects to JSON\n\t\tGson gson = new Gson();\n\n\t\t// Set to string\n\t\tString jsonResp = gson.toJson(rs);\n\n\t\t// Return webpage with json data from RMI\n\t\treturn Response.ok(jsonResp, MediaType.APPLICATION_JSON).build();\n\t}", "@RequestMapping(value = \"/ws/customers/{id}\", method = RequestMethod.GET)\n public @ResponseBody\n CustomerDto getCustomer(@PathVariable(\"id\") Long customerId) {\n logger.info(\"Tries to find customer by id={}\", customerId);\n\n return customerAssembler.assembly(getCustomerById(customerId));\n }", "public Customer getCustomerById(Integer id) throws DataNotFoundException {\n Optional<Customer> optionalCustomer = customerRepository.findById(id);\n if(optionalCustomer.isPresent())\n return optionalCustomer.get();\n else\n throw new DataNotFoundException(\"Customer with id: \" + id + \" not found\");\n }", "Customer getCustomer();", "@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 Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t//now retrieve/read from database using the primary key or id..\n\t\tCustomer theCustomer = currentSession.get(Customer.class,theId);\n\n\t\treturn theCustomer;\n\t}", "@Override\n\tpublic Customer getCustomer(long id) throws Exception {\n\t\tConnection con = pool.getConnection();\n\t\tCustomer customer = new Customer();\n\t\ttry {\n\t\t\tString getCustomer = String.format(\"select * from customer where id in('%d')\", id);\n\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(getCustomer);\n\n\t\t\tif (rs.next()) {\n\t\t\t\tcustomer.setId(id);\n\t\t\t\tcustomer.setCustName(rs.getString(\"Cust_Name\"));\n\t\t\t\tcustomer.setPassword(rs.getString(\"Password\"));\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"Customer \" + customer.getCustName() + \" ID: \" + customer.getId() + \" was retrived.\");\n\t\t\t} else {\n\t\t\t\tthrow new Exception(\"Customer with ID: \" + id + \" was not found in the DB.\");\n\t\t\t}\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 connection\");\n\t\t\t}\n\t\t}\n\t\treturn customer;\n\t}", "public Customer getCustomerById(Integer id) {\n\t\treturn (Customer) sessionFactory.getCurrentSession().createCriteria(Customer.class).add(Restrictions.eq(\"id\",id)).uniqueResult();\r\n\t}", "@SuppressWarnings(\"finally\")\n\tpublic Customer getCustomer(int cust_id) throws SQLException //final&complete IMPL\n\t{\n\t\tCustomer res=null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnection connection = openConnection();\n\t\t\tPreparedStatement queryStatement;\n\t\t\tResultSet queryResult;\n\t\t\t\n\t\t\tqueryStatement =connection.prepareStatement(\"select * from CUSTOMERS where customer_id=?;\");\n\t\t\tqueryStatement.setString(1, Integer.toString(cust_id));\n\t\t\tqueryResult = queryStatement.executeQuery();\n\t\t\t\n\t\t\tif(queryResult.next())\n\t\t\t{\n\t\t\t\tString cust_username=null, cust_password=null, user_email=null, user_PicURL=null;\n\t\t\t\tString cust_fname=null, cust_lname=null;\n\t\t\t\tboolean isCustomer = true;\n\t\t\t\t\n\t\t\t\tcust_fname = queryResult.getString(2);\n\t\t\t\tcust_lname = queryResult.getString(3);\n\t\t\t\tcust_username = queryResult.getString(4);\n\t\t\t\tcust_password = queryResult.getString(5);\n\t\t\t\tuser_email = queryResult.getString(6);\n\t\t\t\t\n\t\t\t\tres = new Customer((short)cust_id, cust_username, cust_password, cust_fname + cust_lname, user_email, user_PicURL, isCustomer, null, null);\n\t\t\t}\n\t\t}\t\n\t\tfinally\n\t\t{\n\t\t\tcloseConnection();\n\t\t\tif(res==null)\n\t\t\t\tthrow new SQLException(\"No customer user found for provided credantials!\");\n\t\t\telse\n\t\t\t\treturn res;\n\t\t}\n\t}", "@Override\n\tpublic List<Customer> searchCustomerByName(String name) throws BusinessException {\n\t\treturn customerViewAllDAO.searchCustomerByName(name);\n\t}", "com.google.ads.googleads.v6.resources.Customer getCustomer();", "io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer();", "@Override\n\tpublic Customer getCustomers(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// retrieve object from database using the ID\n\t\tCustomer theCustomer = currentSession.get(Customer.class, theId);\n\t\t\n\t\t// return the results\n\t\treturn theCustomer;\n\t}", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// now retrieve/read from database using the primary key\n\t\tCustomer theCustomer = currentSession.get(Customer.class, theId);\n\t\t\n\t\treturn theCustomer;\n\t}", "public Customer getCustomer(String id) {\n\t\tString firstName = \"\";\n//\t\tString lastName = \"\";\n//\t\tString address = \"\";\n//\t\tString creditCard = \"\";\n//\t\tString phone = \"\";\n//\t\tArrayList<Order> orders = new ArrayList<>();\n\t\tConnection connection = DBConnect.getDatabaseConnection();\n\t\t\n\t\ttry {\n\t\t\tStatement selectStatement = connection.createStatement();\n\t\t\t\n\t\t\tString selectQuery = \"SELECT * from Customer where CustomerID='\" + id +\"'\";\n\t\t\tResultSet resultSet = selectStatement.executeQuery(selectQuery);\n\t\t\tresultSet.next();\n\t\t\t\n\t\t\tfirstName = resultSet.getString(\"FName\");\n//\t\t\tlastName = resultSet.getString(\"lastName\");\n//\t\t\taddress = resultSet.getString(\"lastName\"); //TODO update this code: Address has it's own table . access AddressDAO object (use attribute line 21) \n//\t\t\tcreditCard = resultSet.getString(\"creditCard\"); //TODO same as Address. (attribute line 22) \n\n//\t\t\torders = orderDAO.getAllOrders(); //TODO fix me (make sure function returns something).\n\t\t\t\n\t\t}catch(SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t}finally {\n\t\t\tif(connection != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconnection.close();\n\t\t\t\t} catch (SQLException e) {}\n\t\t\t}\n\t\t}\n\t\t\n\t\tCustomer customer = new Customer();\n\t\tcustomer.setFirstName(firstName);\n//\t\tcustomer.setLastName(lastName);\n//\t\t//TODO customer.setAddress(address); update\n//\t\t//TODO customer.setCard(creditCard); update\n//\t\tcustomer.setOrders(orders);\n\t\t\n\t\treturn customer;\n\t}", "@Override\n\tpublic Customer read(int id) {\n\n\t\tString selectQuery = String.format(\"SELECT * FROM TB_Customer WHERE \" + COLUMN_NAME_ID + \" = %d\", id);\n\t\tCustomer customer = null;\n\n\t\ttry (Statement s = dbCon.createStatement()) {\n\t\t\tResultSet rS = s.executeQuery(selectQuery);\n\n\t\t\trS.next();\n\t\t\tcustomer = new Customer(rS.getInt(COLUMN_NAME_ID),\n\t\t\t\t\trS.getString(COLUMN_NAME_FIRST_NAME),\n\t\t\t\t\trS.getString(COLUMN_NAME_LAST_NAME),\n\t\t\t\t\trS.getString(COLUMN_NAME_EMAIL),\n\t\t\t\t\trS.getString(COLUMN_NAME_KNICKNAME),\n\t\t\t\t\trS.getDate(COLUMN_NAME_BIRTHDATE).toLocalDate(),\n\t\t\t\t\trS.getDouble(COLUMN_NAME_CREDITS));\n\n\t\t\trS.close();\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"An SQL error occured during reading of customer \" + id + \" : \" + e.getMessage());\n\t\t}\n\n\t\treturn customer;\n\t}", "public Customer getCustomerBy_id(ObjectId _id) {\n\t\treturn custRepo.findBy_id(_id);\n\t}", "public void retrieveAReadOnlyCustomerWithID(long id) {\r\n\t\tSystem.out.println(\"\\nRead Only Customer with id \" + id);\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tCustomer2 customer1 = em.find(Customer2.class, id);\r\n\t\tif(customer1 == null){\r\n\t\t\tSystem.out.println(\"\\nNo such customer with id: \" + id);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tSystem.out.println(customer1);\r\n\t\tcustomer1.setLastName(\"XXX\");\r\n\t\tSystem.out.println(customer1);\r\n\t\tSystem.out.println(\"Does persistent context have customer1? \" + em.contains(customer1));\r\n\t\t\r\n\t\t// Asagidaki satirlari actiginizda soyisim XXX olarak degistirilecektir.\r\n//\t\tEntityTransaction tx = em.getTransaction();\r\n//\t\ttx.begin();\r\n//\t\ttx.commit();\r\n\t\tem.close();\r\n\t\t\r\n\t\tEntityManager em2 = emf.createEntityManager();\r\n\t\tCustomer2 customer2 = em2.find(Customer2.class, id);\r\n\t\tSystem.out.println(customer2);\r\n\t\tem2.close();\t\t\r\n\t}", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// now retrieve/read from database using the primary key\n\t\tCustomer theCustomer = currentSession.get(Customer.class, theId);\n\n\t\treturn theCustomer;\n\t}", "public String queryCustomerInfo(int id, int customerID)\n throws RemoteException, DeadlockException;", "@Override\n public JSONObject viewSLCustomerByExecuticeID(String username) {\n\n return in_salescustdao.viewSLCustomerByExecutiveID(username);\n }", "public static Customer getCustomer(int _customerID) throws SQLException{\n ResultSet rs = ConnectionManager.selectAllColumns(\"Tbl_Customer_GroupNo\", \"CustomerID= \"+_customerID);\n if(rs.next()){\n Customer cus = new Customer(rs.getInt(\"CustomerId\"), rs.getString(\"FirstName\"), rs.getString(\"LastName\"), rs.getString(\"Address\"), rs.getString(\"Email\"), rs.getString(\"Phone\"));\n return cus;\n }else{\n return null;\n }\n }", "@Override\n public Customer getCustomer(Long userId) {\n Optional<Customer> customer = customerDao.getCustomer(userId);\n if (!customer.isPresent()) {\n logger.error(\"Customer with this id {} doesn't exist\", userId);\n }\n return customer.orElseThrow(ResourceNotFoundException::new);\n }", "public Response<CustomerResponseDto> viewCustomers(String customerId) {\n\t\tResponse<CustomerResponseDto> responseDto = new Response<>();\n\t\tOptional<Customer> getCustomer = customerRepo.findByCustomerId(customerId);\n\t\tif (!getCustomer.isPresent())\n\t\t\tthrow new NoDataFoundException(CustomerConstants.CUSTOMER_NOT_FOUND);\n\t\tCustomerResponseDto response = modelMapper.map(getCustomer.get(), CustomerResponseDto.class);\n\t\tresponseDto.setData(response);\n\t\tresponseDto.setError(false);\n\t\tresponseDto.setMessage(CustomerConstants.CUSTOMER_DETAILS);\n\t\tresponseDto.setStatus(HttpServletResponse.SC_OK);\n\t\treturn responseDto;\n\t}", "@Override\n public CustomerEntity getCustomerData(Long id) {\n return customerPersistencePort.getUser(id);\n }", "public Customer findById(Integer id) {\n\t\treturn customerDao.findById(id);\r\n\t}", "@Override\n\tpublic Customer getCustomer(int customerId) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\ttry {\n\t\t\t\n\t\t\tCustomer customer =session.get(Customer.class, customerId);\n\t\t return customer;\t\t\t\n\t\t}\n\t\tcatch(HibernateException exception){\n\t\t\texception.printStackTrace();\n\t\t}\n\t\treturn null;\n\t\t\n\t}", "@Override\n\n\t\tpublic List<Bill> viewBillsByCustomerId(String custId) {\n\t\t\tList<Bill> bills = billDao.findBillByCustomerId(custId);\n\t\t\tif(bills.size()==0) {\n\t\t\t\tthrow new BillNotFoundException(\"No bills with given customer id\");\n\t\t\t}\n\t\t\treturn bills;\n\t\t}", "public void lookupCustomer(String customerId) {\r\n customer = transaction.getCustomerInfo(customerId);\r\n }", "public Customer getCustomers(int customerId) {\n for(Customer customer:customers){\n if(customer.getId() == customerId){\n return customer;\n }\n }\n return null;\n }", "@Override\n public Personn findById(Integer idCustomer) {\n return manager.find(Personn.class,idCustomer );\n //return findByCriteria(criteria);\n }", "@Test\n\tpublic void readCustomerById() {\n\t\tString name = \"Leo\";\n\t\tString address = \"Auckland\";\n\t\tString telephoneNumber = \"021123728381\";\n\t\tICustomer customer = customerController.create(name, address, telephoneNumber);\n\t\tlong id = customer.getId();\n\t\tname = \"Mark\";\n\t\taddress = \"Auckland\";\n\t\ttelephoneNumber = \"0211616447\";\n\t\tcustomerController.create(name, address, telephoneNumber);\n\n\t\t// When\n\t\tICustomer cus = customerController.read(id);\n\n\t\t// Then\n\t\tAssert.assertEquals(customer, cus);\n\t}", "@Override\n\t@Transactional\n\tpublic Customer getCustomer(int theId) {\n\t\t;\n\t\treturn customerDAO.getCustomer(theId);\n\t}", "@Override\n public JSONObject viewSLCustomersByAdmin() {\n\n return in_salescustdao.viewSLCustomerByAdmin();\n }", "@RequestMapping(method = RequestMethod.GET, params = {\"name\"})\n\t public ResponseEntity<Collection<Customer>> findUserWithName(@RequestParam(value=\"name\") String name) {\n\t return service.findCustomerWithName(name);\n\t }", "@Override\n public JSONObject viewCustomerByFnExecutive(String username) {\n\n return in_salescustdao.viewSLCustomerByFnExecutor(username);\n }", "@Override\n\tpublic Customer findById(Long cust_id) throws Exception {\n\t\tList<Customer> lists = (List<Customer>) this.getHibernateTemplate().find(\"from Customer where cust_id = ?\",\n\t\t\t\tcust_id);\n\t\tgetHibernateTemplate().get(Customer.class, cust_id);\n\t\tif (lists.size() > 0) {\n\n\t\t\treturn lists.get(0);\n\t\t}\n\n\t\treturn null;\n\t}", "public Customer getFullCustomerDetail(String cid) throws CustomerNotFoundException {\r\n \ttry {\r\n\t return (Customer) this.entityManager.createQuery(\"select customer from Customer as customer left join fetch customer.calls where customer.cid=:cid\")\r\n\t .setParameter(\"cid\", cid)\r\n\t .getSingleResult();\r\n \t} catch (NoResultException e) {\r\n \t\tthrow new CustomerNotFoundException();\r\n \t}\r\n }", "@ApiOperation(value = \"Get a customer by id\", notes = \"\")\n @GetMapping(value = {\"/{customerId}\"}, produces = MediaType.APPLICATION_JSON_VALUE)\n @ResponseStatus(HttpStatus.OK)\n public CustomerDTO getCustomerById(@PathVariable Long customerId) {\n\n return customerService.getCustomerById(customerId);\n }", "@Override\n //Override method to the to-string for the concatenation of the customer name and ID\n public String toString() {\n return customerName + \" [\" + customerId + \"]\";\n }", "public Customer getSpecificCustomerByName(String name){\n Customer specificCustomer = null;\n\n try{\n // try and connect\n conn = DriverManager.getConnection(URL);\n\n // make sql query\n PreparedStatement preparedStatement =\n conn.prepareStatement(\"SELECT CustomerId, FirstName, LastName, Country, PostalCode, Phone, Email FROM Customer WHERE FirstName LIKE ? OR LastName LIKE ?\");\n preparedStatement.setString(1, name);\n // execute query\n ResultSet set = preparedStatement.executeQuery();\n\n while(set.next()){\n specificCustomer = new Customer(\n set.getString(\"CustomerId\"),\n set.getString(\"FirstName\"),\n set.getString(\"LastName\"),\n set.getString(\"Country\"),\n set.getString(\"PostalCode\"),\n set.getString(\"Phone\"),\n set.getString(\"Email\")\n );\n }\n }\n catch(Exception exception){\n System.out.println(exception.toString());\n }\n finally{\n try{\n conn.close();\n }\n catch (Exception exception){\n System.out.println(exception.toString());\n }\n }\n return specificCustomer;\n }", "@GetMapping(value = \"/showCustomers\")\n\tpublic String getAllCustomers(Model model) {\n\t\t// AllCustomers model attribute iterated over to display Customers in table on\n\t\t// JSP page\n\t\tmodel.addAttribute(\"AllCustomers\", customerService.getCustomers());\n\t\t// Returns showCustomers.jsp (see webapp/jsp folder)\n\t\treturn \"showCustomers\";\n\t}", "CustomerVisit selectByPrimaryKey(Integer id);", "@Override\r\n\tpublic Customer getCustomer(int customerID) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic MstCustomerDto getOne(String kdCustomer) {\n\t\tMstCustomerDto mstCustomerDto=new MstCustomerDto();\n\t\tMstCustomer mstCustomer = new MstCustomer();\n\t\tmstCustomer=mstCustomerDao.getOne(kdCustomer);\n\t\tmstCustomerDto = mapperFacade.map(mstCustomer, MstCustomerDto.class);\n\t\t\n\t\treturn mstCustomerDto;\n\t}", "public CustomerPurchase getById(Integer id) throws SQLException;", "@GetMapping(\"/customerdetails\")\n\tpublic String listOfCustomer(Model model) {\n\t\tList<Customer> customerDetails = customerService.findByIsEnable();\n\t\tmodel.addAttribute(\"customerDetails\", customerDetails);\n\t\treturn \"customer-details\";\n\t}", "@Override\n\tpublic List<Customer> getCustomerById(int customerid) {\n\t\treturn null;\n\t}", "public void listAllCustomers() {\n List<Customer> list = model.findAllCustomers();\n if(list != null){\n if(list.isEmpty())\n view.showMessage(not_found_error);\n else\n view.showTable(list);\n }\n else\n view.showMessage(retrieving_data_error); \n }", "public void showCustomerInvoices()\n\t{\n\t\ttry {\n\t\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/MundheElectronics1\",\"root\",\"vishakha\");\n\t\t\tString sql=\"select * from CustomerData order by Customer_Name asc\";\n\t\t\tps=con.prepareStatement(sql);\n\t\t\trs=ps.executeQuery();\n\t\t\ttblCustomer.setModel(DbUtils.resultSetToTableModel(rs));\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}" ]
[ "0.8112768", "0.78764266", "0.7649006", "0.76341236", "0.76312673", "0.7512647", "0.7429471", "0.73926246", "0.73782283", "0.73622465", "0.7284316", "0.7228286", "0.7133519", "0.7080263", "0.70632434", "0.7027587", "0.70037717", "0.6971586", "0.6948662", "0.69306904", "0.6921547", "0.69176286", "0.6908071", "0.6905435", "0.6900908", "0.68969107", "0.68751794", "0.68682474", "0.68101627", "0.67886263", "0.67867875", "0.67728764", "0.6771199", "0.6768691", "0.67502445", "0.67269117", "0.6696235", "0.66917914", "0.6689396", "0.66805637", "0.6674149", "0.6674149", "0.6640987", "0.66385573", "0.66377074", "0.6633471", "0.66292065", "0.6626493", "0.66257226", "0.66224045", "0.66212475", "0.6618938", "0.6618664", "0.6600605", "0.6597847", "0.6582731", "0.65307075", "0.6526691", "0.6524195", "0.6504803", "0.6500293", "0.65000576", "0.6490383", "0.64841807", "0.6479085", "0.6470955", "0.6469479", "0.64586854", "0.64489484", "0.6445837", "0.6442133", "0.64404726", "0.6436765", "0.643567", "0.6428274", "0.6424457", "0.64183646", "0.64128286", "0.6397644", "0.6396105", "0.63918334", "0.6386771", "0.63800323", "0.6374922", "0.63740396", "0.63734174", "0.6368565", "0.63563263", "0.63496983", "0.6347489", "0.6342253", "0.63384527", "0.6336037", "0.6332021", "0.6328676", "0.63282233", "0.6324082", "0.63055456", "0.6302259", "0.6302197", "0.62942535" ]
0.0
-1
view by employee name
public void actionPerformed(ActionEvent e){ if(employees.size() >= 1){ if(empNameCombo.getSelectedIndex() != 0){ for(Employee employee: employees){ if(employee.getEmployeeName().equalsIgnoreCase(empNameCombo.getSelectedItem().toString())){ empJTextArea.setText("Employee ID: "+employee.getEmployeeId() +"\n Name: " +employee.getEmployeeName() +"\n Access Level: " +employee.getAccess() +"\n Password: " +employee.getPassword() +"\n Salary: " +employee.getSalary()); empNameCombo.setSelectedIndex(0); return; } } }else{ JOptionPane.showMessageDialog(null, "Please Select a Valid Employee."); } }else{ JOptionPane.showMessageDialog(null, "No Employees Found"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Employeedetails getEmployeeDetailByName(String employeeId);", "@RequestMapping(value=\"empname/{name}\",method= RequestMethod.GET)\n\tpublic Employee empname(@PathVariable(\"name\") String name){\n\t\treturn this.service.findname(name);\n\t\t\n\t}", "@RequestMapping(method=RequestMethod.POST ,value=\"/searchemployee\")\n\tpublic ModelAndView getEmployee(@RequestParam int employee_id )\n\t{\n\t\tSystem.out.println(\"INSIDE search by eid\");\n\t\t\n\t\tEmployeeRegmodel erobj= ergserv.getEmployeeRecordFromDB(employee_id);\n\t\t\n\t\tModelAndView mv= new ModelAndView();\n\t\t\t\tif(erobj.getEmployee_fullname()!= null)\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"stinfo\", erobj);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"msg\", \"INVALID Employee ID\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tmv.setViewName(\"ShowEmployeeDetails.jsp\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn mv;\n\t}", "@RequestMapping(path = \"/employee/name/{name}\", method = RequestMethod.GET)\r\n\t@ResponseBody\r\n\tpublic List<Employee> findEmployeeByName(@PathVariable String name) {\r\n\t\treturn er.findEmployeeByName(name);\r\n\t}", "@RequestMapping(method=RequestMethod.POST ,value=\"/searchadminemployee\")\n\tpublic ModelAndView gettEmployee(@RequestParam int employee_id )\n\t{\n\t\tSystem.out.println(\"INSIDE search by eid\");\n\t\t\n\t\tEmployeeRegmodel erobj= ergserv.getEmployeeRecordFromDB(employee_id);\n\t\t\n\t\tModelAndView mv= new ModelAndView();\n\t\t\t\tif(erobj.getEmployee_fullname()!= null)\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"stinfo\", erobj);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmv.addObject(\"msg\", \"INVALID Employee ID\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tmv.setViewName(\"adminemployeedelete.jsp\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn mv;\n\t}", "java.lang.String getEmployeeName();", "public interface EmployeeQueryByDisplayNameView extends ViewObject {\n void query(String userName);\n}", "private void doViewAllEmployees() {\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"***Hors Management System:: System Administration:: View All Staffs\");\n\n List<Employee> employees = employeeControllerRemote.retrieveAllEmployees();\n\n employees.forEach((employee) -> {\n System.out.println(\"Employee ID: \" + employee.getEmployeeId() + \"First Name: \" + employee.getFirstName() + \"Last Name: \" + employee.getLastName() + \"Job Role: \" + employee.getJobRole().toString() + \"Username: \" + employee.getUserName() + \"Password: \" + employee.getPassword());\n });\n\n System.out.println(\"Press any key to continue...>\");\n sc.nextLine();\n }", "public String enameGet(String emp_id) throws Exception;", "public String getEmployeeName();", "@RequestMapping(\"/search\")\n public Collection<Employee> findByName(@RequestParam(\"name\") String name){\n return employeeService.findByName(name);\n }", "List<Employee> findByName(String name);", "@GET\n\t@Path(\"/search/{empName}\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response getByName(@PathParam(\"empName\") String name) {\n\t\tEmployeeFacade employeeFacade = new EmployeeFacade();\n\t\tGenericEntity<List<EmployeeVO>> generic = new GenericEntity<List<EmployeeVO>>(employeeFacade.findByName(name)) {};\n\t\treturn Response.status(200).header(\"Access-Control-Allow-Origin\", CorsFilter.DEFAULT_ALLOWED_ORIGINS).entity(generic).build();\n\t}", "List<Employee> findAllByName(String name);", "@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}", "@GetMapping(value = \"/search\")\n\tpublic String searchName(@RequestParam(name = \"fname\") String fname, Model model) {\n\t\tmodel.addAttribute(\"employees\", employeerepository.findByFnameIgnoreCaseContaining(fname));\n\t\treturn \"employeelist\";\n\t}", "@GetMapping(value=\"/searchEmpData/{fname}\")\n\tpublic List<Employee> getEmployeeByName(@PathVariable (value = \"fname\") String fname)\n\t{\n\t\treturn integrationClient.getEmployees(fname);\n\t}", "@RequestMapping(path = \"/employee\", method = RequestMethod.GET)\r\n\t@ResponseBody\r\n\tpublic List<Employee> displayEmployee() {\r\n\t\treturn er.findAll();\r\n\t}", "public ViewObjectImpl getEmployees() {\n return (ViewObjectImpl)findViewObject(\"Employees\");\n }", "private Employee findEmployee(String employeeName)\n {\n int index = -1;\n //nameJRadioButtonMenuItem.doClick();\n for(int i = 0; i < employees.size(); i++)\n {\n if(employeeName.equals(employees.get(i).getName()))\n index = i;\n }\n if(index >= 0)\n return employees.get(index);\n else\n return null;\n }", "public String getEmployeeMangerDetails(Employeedetails employeedetails);", "@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 String editEmploye(Employee emp){\n System.out.println(\"******* Edit employe ************\");\n System.out.println(emp.toString());\n employeeService.editEmployee(emp);\n sessionController.logInEmp();\n\n return \"/pages/childCareCenterDashboard.xhtml?faces-redirect=true\";\n }", "@RequestMapping(value = \"/employees\")\n\tpublic String getAllEmployess(@RequestParam String user,HttpServletRequest request,HttpServletResponse response,Model mv) throws JsonMappingException, JsonProcessingException\n\t{\n\t\tList<Employee> empList = RestCalls.getAllEmployees();\n\t\tmv.addAttribute(\"empList\",empList);\n\t\tmv.addAttribute(\"auth\", \"true\");\n\t\tmv.addAttribute(\"user\", user);\n\t\treturn \"employeedetails.jsp\";\n\t}", "public ViewObjectImpl getEmployeesView1() {\n return (ViewObjectImpl)findViewObject(\"EmployeesView1\");\n }", "@RequestMapping(value = \"/employee/{empId}\", method = RequestMethod.GET)\r\n\tpublic Employee getEmployeedetails(@PathVariable int empId) throws EmployeeMaintainceException {\r\n\t\ttry {\r\n\t\t\treturn eService.getEmployee(empId);\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new EmployeeMaintainceException(204, e.getMessage());\r\n\t\t}\r\n\t}", "@RequestMapping(\"/edit/{id}\")\n\tpublic String showEditEmployeePage(@PathVariable(name = \"id\") int id, Model model) {\n\t\tEmployees Employees = service.get(id);\n\t\tmodel.addAttribute(\"Employees\", Employees);\n\t\tList<Employees> Employeeslist = service.listAll();\n\t\tmodel.addAttribute(\"Employeeslist\", Employeeslist);\n\t\treturn \"Edit_Employees\";\n\t}", "private void getemp( String name,int id ) {\r\n\t\tSystem.out.println(\" name and id\"+name+\" \"+id);\r\n\t}", "public List<TRForm> viewFormforEmployee(int eid);", "public Employee viewInformation(int id) {\n\t\tEmployee employee = new Employee(); \n\t\ttry{ \n\n\t\t\tString sql = \"select * from employees where id = \"+id; \n\t\t\tConnection connection = DBConnectionUtil.getConnection();\n\t\t\tStatement statement = connection.createStatement();\n\t\t\tResultSet resultSet = statement.executeQuery(sql);\n\n\t\t\tresultSet.next();\n\t\t\temployee.setId(resultSet.getInt(\"employee_id\"));\n\t\t\temployee.setUsername(resultSet.getString(\"username\"));\n\t\t\temployee.setPassword(resultSet.getString(\"password\"));\n\t\t\temployee.setFirstName(resultSet.getString(\"first_name\"));\n\t\t\temployee.setLastName(resultSet.getString(\"last_name\"));\n\t\t\temployee.setEmail(resultSet.getString(\"email\"));\n\t\t\t\n\t\t\treturn employee;\n\t\t\t \n\t\t}catch(Exception e){System.out.println(e);} \n\t\treturn null; \t\t\n\t}", "public void listEmployees()\n\t{\n\t\tString str = \"Name\\tSurname\\tMail\\tPassword\\tBranchId\\tId\\n\";\n\t\t\n\t\tList<Employee> employees = this.company.getEmployees();\n\n\t\tfor(int i=0; i<employees.length(); i++)\n\t\t{\n\t\t\tstr += employees.get(i).getName() + \"\\t\" + employees.get(i).getSurname() + \"\\t\" + employees.get(i).getMail() + \"\\t\" + employees.get(i).getPassword() + \"\\t\\t\" + employees.get(i).getBranchId() + \"\\t\\t\" + employees.get(i).getId() + \"\\n\";\n\t\t}\n\n\t\tSystem.out.println(str);\n\n\t}", "List<EmployeeDTO> findByName(String name);", "@GetMapping(\"/employebyid/{empId}\")\n\t public ResponseEntity<Employee> getEmployeeById(@PathVariable int empId)\n\t {\n\t\tEmployee fetchedEmployee = employeeService.getEmployee(empId);\n\t\tif(fetchedEmployee.getEmpId()==0)\n\t\t{\n\t\t\tthrow new InvalidEmployeeException(\"No employee found with id= : \" + empId);\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn new ResponseEntity<Employee>(fetchedEmployee,HttpStatus.OK);\n\t\t}\n }", "public void getByIdemployee(int id){\n\t\tEmployeeDTO employee = getJerseyClient().resource(getBaseUrl() + \"/employee/\"+id).get(EmployeeDTO.class);\n\t\tSystem.out.println(\"Nombre: \"+employee.getName());\n\t\tSystem.out.println(\"Apellido: \"+employee.getSurname());\n\t\tSystem.out.println(\"Direccion: \"+employee.getAddress());\n\t\tSystem.out.println(\"RUC: \"+employee.getRUC());\n\t\tSystem.out.println(\"Telefono: \"+employee.getCellphone());\n\t}", "@GetMapping(\"/GetAllEmployees\")\r\n public List<Employee> viewAllEmployees() {\r\n return admin.viewAllEmployees();\r\n }", "@GetMapping(\"/employee\")\r\n\tpublic List<Employee> getAllEmployees()\r\n\t{\r\n\t\treturn empdao.findAll();\r\n\t}", "public void displayEmployees(){\n System.out.println(\"NAME --- SALARY --- AGE \");\n for (Employee employee : employees) {\n System.out.println(employee.getName() + \" \" + employee.getSalary() + \" \" + employee.getAge());\n }\n }", "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 }", "public static void showEmployee(RequestHandler handler, Employee e) {\n\t\tStringBuilder sb;\n\t\tsb = new StringBuilder();\n\t\tsb.append(\"\\n*****************************************\");\n\t\tsb.append(\"\\nEmployee ID: \" + e.getId());\n\t\tsb.append(\"\\n Name: \" + e.getName());\n\t\tsb.append(\"\\n Email: \" + e.getEmail());\n\t\tsb.append(\"\\n Department: \" + e.getDepartment());\n\t\tsb.append(\"\\n*****************************************\");\n\t\thandler.sendMessage(sb.toString());\n\t}", "@Override\r\n\tpublic User viewEmployee(int employeeId,String authToken) throws ManualException{\r\n\t\tfinal\tSession session=sessionFactory.openSession();\r\n\t\t\r\n\t\tUser user=null;;\r\n\t\t\r\n\t\t/* check for authToken of admin */\r\n\t\tsession.beginTransaction();\r\n\t\ttry{\r\n\t\t\tAuthTable authtable=session.get(AuthTable.class, authToken);\r\n\t\t\tUser userAdmin=session.get(User.class,authtable.getUser().getEmpId());\r\n\t\t\tif(userAdmin.getUsertype().equals(\"Admin\")){\r\n\t\r\n\t\t\t\tUser user2 = session.get(User.class, employeeId);\r\n\t\t\t\tif(user2!=null)\r\n\t\t\t\t\tuser=user2;\r\n\t\t\t\telse\r\n\t\t\t\t\tuser=null;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tuser=null;\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\tsession.getTransaction().commit();\r\n\t\t\tsession.close();\r\n\t\t\treturn user;\r\n\t\t}\r\n\t}", "@RequestMapping(\"/employee\")\n\tpublic List<Employee> getAllEmplyee() {\n\t\treturn service.getAllEmplyee();\n\t}", "@RequestMapping(value=\"/listEmployees\", method=RequestMethod.GET)\n /* Show list of employees */\n public String listEmployees(Model model) {\n \tList<Employee> employeeList = employeeservice.listAllEmployees();\n\n model.addAttribute(\"employees\", employeeList);\n\n return \"showListEmployees\";\n }", "@GetMapping(\"/employees\")\npublic List <Employee> findAlll(){\n\treturn employeeService.findAll();\n\t}", "public void getByPropertyemployee(String textToFind){\n\t\t// ejemplo buscar por propiedad direccion\n\t\tEmployeeResult employeeResult = getJerseyClient().resource(getBaseUrl() + \"/employee/search/\"+textToFind).get(EmployeeResult.class);\n\t\tfor (EmployeeDTO c : employeeResult.getEmployees()) {\n\t\t\tSystem.out.println(\"Nombre: \"+c.getName());\n\t\t\tSystem.out.println(\"Apellido: \"+c.getSurname());\n\t\t\tSystem.out.println(\"Direccion: \"+c.getAddress());\n\t\t\tSystem.out.println(\"RUC: \"+c.getRUC());\n\t\t\tSystem.out.println(\"Telefono: \"+c.getCellphone());\n\t\t}\n\t\t\n\t}", "@RequestMapping(value = \"/showProductGrn\", method = RequestMethod.GET)\n\t public ModelAndView showEmployee(ModelAndView model) \n\t {\n\t model.addObject(\"grnProduct\", new GrnProduct());\n\t \n\t model.setViewName(\"productgrn/createProductGrn\");\n\t \n\t\t\treturn model;\n\t }", "@RequestMapping(value = { \"/list\" }, method = RequestMethod.GET)\r\n public String listEmployees(ModelMap model) {\r\n \r\n List<Employee> employees = service.findAllEmployees();\r\n model.addAttribute(\"employees\", employees);\r\n return \"allemployees\";\r\n }", "@GetMapping(\"/employees\")\r\n\tpublic List<Employee> list() {\r\n\t return empService.listAll();\r\n\t}", "private void viewAll(HashMap<Integer, Employee> viewAllEmployee) {\r\n\t\tSet<Entry<String, String>> set = employee.entrySet();\r\n\t\tset.stream().forEach((element) -> System.out.println(element.getValue() + \" \" + element.getKey()));\r\n\t}", "List<Employee> allEmpInfo();", "@GetMapping(\"/employee/{id}\")\r\n\tpublic Employee get(@PathVariable Integer id) {\r\n\t \r\n\t Employee employee = empService.get(id);\r\n\t return employee;\r\n\t \r\n\t}", "@RequestMapping(path = \"/employee/{id}\", method = RequestMethod.GET)\r\n\t@ResponseBody\r\n\tpublic Optional<Employee> displayEmployeeById() {\r\n\t\treturn er.findById(1);\r\n\t}", "@GetMapping(\"/employee/{id}\")\r\n\tpublic ResponseEntity<Employee> getEmployeeById(@PathVariable Long id)\r\n\t{\r\n\t\tEmployee emp=empdao.findOne(id);\r\n\t\tif(emp == null)\r\n\t\t{\r\n\t\treturn ResponseEntity.notFound().build();\r\n\t\t}\r\n\t\treturn ResponseEntity.ok().body(emp);\r\n\t}", "@Transactional\n\t@Override\n\tpublic List<Employee> getByName(String name) {\n\t\treturn entityManager.createQuery(\"Select e from Employee e where e.name like ?0\", Employee.class)\n\t\t\t\t.setParameter(0, \"%\"+name+\"%\").getResultList();\n\t\t\n\t\t\n\t}", "public List<Employees> findAllByEmploymentTypeIdName(String Name);", "public static String getEmployeeName(String id){\n return \"select e_fname from employee where e_id = '\"+id+\"'\";\n }", "public static Entity getSpecificEmployee(Employee emp){\n\t\tif(emp == null){\n\t\t\treturn null;\n\t\t} \n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\t\tLong id = emp.getId();\n\t\tKey key = KeyFactory.createKey(\"Employee\", id);\n\t\ttry {\n\t\t\tEntity ent = datastore.get(key);\n\t\t\treturn ent;\n\t\t} catch (EntityNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "@ResponseBody\n\t@RequestMapping(\"/showFullNameLikeTom\")\n\tpublic String showFullNameLikeTom() {\n\n\t\tString html = \"\";\n//\t\tfor (Employee emp : employees) {\n//\t\t\thtml += emp + \"<br>\";\n//\t\t}\n\n\t\treturn html;\n\t}", "@Override\n\tpublic void getAllEmployee() {\n\t\t\n\t}", "public ViewObjectImpl getEmployeesForDepartment() {\n return (ViewObjectImpl)findViewObject(\"EmployeesForDepartment\");\n }", "public HashMap<Integer, Employee> viewAllEmployee() {\r\n\t\treturn employee1;\r\n\t}", "public void empdetails() {\r\n\t\tSystem.out.println(\"name : \"+ name);\r\n\t}", "@Override\n\tString searchEmployee(String snum) {\n\t\treturn null;\n\t}", "public Employee findEmployee(Long id);", "@RequestMapping(\"/book/{id}\")\n public String showEmployee(@PathVariable Long id, Model model){\n model.addAttribute(\"book\", bookService.getBookById(id));\n return \"bookshow\";\n }", "public ViewUsename(String tenDN) {\n \n initComponents();\n loadEmpDetail(tenDN);\n \n }", "Employee findById(int id);", "public String f9employee() throws Exception {\r\n\t\tString query = \"SELECT HRMS_EMP_OFFC.EMP_TOKEN, \"\r\n\t\t\t\t+ \"\tHRMS_EMP_OFFC.EMP_FNAME||' '||HRMS_EMP_OFFC.EMP_MNAME||' '||HRMS_EMP_OFFC.EMP_LNAME ,HRMS_EMP_OFFC.EMP_ID,\"\r\n\t\t\t\t+ \"\tHRMS_EMP_OFFC.EMP_DIV,NVL(DIV_NAME,' ') FROM HRMS_EMP_OFFC \"\r\n\t\t\t\t+ \"\tINNER JOIN HRMS_CENTER ON HRMS_CENTER.CENTER_ID = HRMS_EMP_OFFC.EMP_CENTER\"\r\n\t\t\t\t+ \"\tINNER JOIN HRMS_DIVISION ON (HRMS_DIVISION.DIV_ID = HRMS_EMP_OFFC.EMP_DIV)\";\r\n\t\t\t\tquery += getprofileQuery(bulkForm16);\r\n\t\t\t\tquery += \"\tORDER BY HRMS_EMP_OFFC.EMP_ID\";\r\n\r\n\t\tString[] headers = { getMessage(\"employee.id\"), getMessage(\"employee\") };\r\n\r\n\t\tString[] headerWidth = { \"30\", \"70\" };\r\n\r\n\t\tString[] fieldNames = { \"empToken\", \"empName\", \"empId\",\r\n\t\t\t\t\"divisionId\", \"divisionName\" };\r\n\r\n\t\tint[] columnIndex = { 0, 1, 2, 3, 4 };\r\n\r\n\t\tString submitFlag = \"false\";\r\n\r\n\t\tString submitToMethod = \"\";\r\n\t\tsetF9Window(query, headers, headerWidth, fieldNames, columnIndex,\r\n\t\t\t\tsubmitFlag, submitToMethod);\r\n\r\n\t\treturn \"f9page\";\r\n\t}", "EmployeeDetail getById(long identifier) throws DBException;", "@Transactional(readOnly = true)\r\n\tpublic Employee getEmployee(String dniEmployee) {\r\n\t\tdniEmployee = dniEmployee.trim();\r\n\t\treturn (Employee) em.createQuery(\"select e from Employee e where e.idemployee='\"+dniEmployee+\"'\").getResultList().get(0);\r\n\t}", "@GetMapping(\"/employee/{id}\")\n public Employee getEmployeeById(@PathVariable(value = \"id\") Integer id){\n\n Employee employee = employeeService.findEmployeeById(id);\n\n return employee;\n }", "public List<User> getAllEmployees(String companyShortName);", "public List<EmployeeEntity> getEmployeeDataByName(String name, StorageContext context)\n\t\t\tthrows PragmaticBookSelfException {\n\t\tList<EmployeeEntity> result = null;\n\t\ttry {\n\t\t\tSession hibernateSeesion = context.getHibernateSession();\n\t\t\tString retrieveEmployeebyNameQuery = \"FROM EmployeeEntity e WHERE e.fname LIKE :fname or e.lname LIKE :lname\";\n\t\t\tQuery query = hibernateSeesion.createQuery(retrieveEmployeebyNameQuery);\n\t\t\tquery.setParameter(\"fname\", name);\n\t\t\tquery.setParameter(\"lname\", name);\n\t\t\tresult = (List<EmployeeEntity>) query.list();\n\t\t} catch (HibernateException he) {\n\t\t\tthrow new PragmaticBookSelfException(he);\n\t\t}\n\t\treturn result;\n\t}", "@GetMapping(value=\"/searchEmpData\")\n\tpublic List<Employee> getAllEmployees()\n\t{\n\t\treturn this.integrationClient.getAllEmployees();\n\t}", "List<Employee> findByNameAndLocation(String name, String location);", "public int findEmployee(String name){\n log.debug(\"Inside findEmployee Method.\");\n int empID;\n String findEmpSQL = \"SELECT empID FROM employeeDetails WHERE name = \" + \"'\" + name + \"' AND businessID = \" + session.getLoggedInUserId();\n\n log.debug(\"Querying database for employeeID with name\" + name);\n resultSet = database.queryDatabase(findEmpSQL);\n\n try{\n if(resultSet.next()){\n empID = resultSet.getInt(\"empID\");\n log.info(\"Found employeeID: \" + empID);\n log.debug(\"Successfully found empID, returning to controller.\");\n return empID;\n }\n }\n catch (Exception e){\n log.error(e.getMessage());\n }\n log.debug(\"Failed to find empID, returning to controller.\");\n return -1;\n }", "@GetMapping(\"/employee/{id}\")\n\tpublic ResponseEntity<Employee> getEmployeeById(@PathVariable Long id) {\n\t\t\n\t\tEmployee employee = emprepo.findById(id).orElseThrow(()-> new ResourceNotFoundException(\"Employee not exist with id: \" + id)); \n\t\t\n\t\treturn ResponseEntity.ok(employee);\n\t}", "@RequestMapping(value=\"/getEmployee/{employeeId}\", method = RequestMethod.GET)\r\n\tpublic String getEmployeeById(@PathVariable(\"employeeId\") Integer employeeId, Model model) {\r\n\t\tEmployeeModel employeeModel = employeeService.getEmployeeById(employeeId);\r\n\t\tcom.ps.model.Model.MODE = \"Update\";\r\n\t\tmodel.addAttribute(\"employeeData\", employeeModel);\r\n\t\treturn \"search-employee\";\r\n\t}", "public Object getDetails(String key){\n\t\tKeyGenerator generator = new KeyGenerator();\n\t\tHashMap<String, String> getKey = generator.getEmployee_Key();\n\t\tboolean found = false;\n\t\t\n\t\tArrayList<String> names = generator.getEmployeesName();\n\t\tfor(int i = 0; i < names.size(); i++){\n\t\t\tString objKey = getKey.get(names.get(i));\n\t\t\tif(objKey.equals(key)){\n\t\t\t\tfound = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(found){\n\t\t\tJTable details = getTable(key);\n\t\t\treturn details;\n\t\t}else{\n\t\t\tString ntfound = \"NotFound\";\n\t\t\treturn ntfound;\n\t\t}\n\t}", "public Employee findEmployee(IncomingReport incoming_report) throws IllegalArgumentException, DAOException;", "@GetMapping(\"/employees/{id}\")\n\tpublic ResponseEntity<Employee> getEmployeeById(@PathVariable Long id) {\n\t\tEmployee orElseThrow = repo.findById(id).orElseThrow(() -> new ResourceNotFoundException(\"Employee not exist with id \" + id));\n\t\treturn ResponseEntity.ok(orElseThrow);\n\t}", "@Override\n\n\tpublic StudentBean dispalyemployee(Integer id) {\n\t\tStudentBean employee = null;\n\t\tfor(StudentBean e:stu)\n\t\t{ \n\t\t\tif(e.getStuId()==id)\n\t\t\t{ \n\t\t\t\temployee=e;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn employee ;\n\t}", "public ViewObjectImpl getEmployeesView2() {\n return (ViewObjectImpl)findViewObject(\"EmployeesView2\");\n }", "@GetMapping(value = \"/histori\")\n\t\tpublic String searchHistory(@RequestParam(name = \"fname\") String fname, Model model) {\n\t\t\tmodel.addAttribute(\"employees\", employeerepository.findByFname(fname));\n\t\t\treturn \"history\";\n\t\t}", "@GET\n\t@Path(\"all\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic String getEmployeesByName(@QueryParam(\"name\") String employeeName) throws ParseException{\n\t\t\n\t\tJSONObject employeesJsonObject = (JSONObject) parser.parse(getFileContent());\n\t\tJSONArray employeesArray = (JSONArray) employeesJsonObject.get(\"employee\");\n\t\tJSONObject employee;\n\t\t\n\t\t/*checking each employee*/\n\t\tfor ( int i = 0 ; i < employeesArray.size() ; i++ ){\n\t\t\temployee = ((JSONObject) employeesArray.get(i));\n\t\t\t\n\t\t\tif(!employee.get(\"name\").toString().equalsIgnoreCase(employeeName)){\n\t\t\t\temployeesArray.remove(employee);\n\t\t\t}\n\t\t}\n\t\treturn employeesJsonObject.toString();\n\t}", "@GetMapping(\"/{id}\")\n public Employee findById(@PathVariable(\"id\") Long id){\n return employeeService.findById(id);\n }", "public String employeeName(int employeeId) {\n\n String nameOfEmployee = \"\";\n\n try {\n Connection conn = ConnectToSqlDB.connectToSqlDatabase();\n String query = \"SELECT * FROM employees;\";\n\n ConnectToSqlDB.statement = conn.createStatement();\n\n ConnectToSqlDB.resultSet = ConnectToSqlDB.statement.executeQuery(query);\n\n while (ConnectToSqlDB.resultSet.next()) {\n int idField = ConnectToSqlDB.resultSet.getInt(\"employee_id\");\n String nameField = ConnectToSqlDB.resultSet.getString(\"employee_name\");\n String salaryField = ConnectToSqlDB.resultSet.getString(\"employee_salary\");\n String departmentField = ConnectToSqlDB.resultSet.getString(\"department\");\n\n if (idField == employeeId) {\n nameOfEmployee = nameField;\n }\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n System.out.print(\"The selected ID belongs to the following employee: \");\n return nameOfEmployee;\n }", "@GetMapping(\"/emloyees\")\n public List<Employee> all() {\n return employeeRepository.findAll();\n }", "public String getEmployeeName() {\n return employeeName;\n }", "@RequestMapping(value = \"/v2/employees\", method = RequestMethod.GET)\r\n\tpublic List<Employee> employeev2() {\r\n JPAQuery<?> query = new JPAQuery<Void>(em);\r\n QEmployee qemployee = QEmployee.employee;\r\n List<Employee> employees = (List<Employee>) query.from(qemployee).fetch();\r\n // Employee oneEmp = employees.get(0);\r\n\t\treturn employees;\r\n }", "@SuppressWarnings(\"unchecked\")\n\t@RequestMapping(params = \"search\", method = RequestMethod.POST)\n\tpublic ModelAndView fetchEmployee(@ModelAttribute(\"employee\") Employee emp,BindingResult result, Model m) {\n\t\tEmployee employee = empServiceimpl.searchEmployeeById(emp.getId());\n\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tList employeeList = new ArrayList();\n\t\temployeeList.add(employee);\n\n\t\treturn new ModelAndView(\"index\", \"employee1\", employeeList);\n\n\t}", "@GetMapping(value=\"employee/{employeeId}\")\n\tpublic ResponseEntity<Employee> getEmployeeById(@PathVariable(\"employeeId\") int employeeId)\n\t{\n\t\treturn employeeService.getEmployeeById(employeeId);\n\t}", "@GetMapping(\"/\")\n public String viewHomePage(Model model){\n model.addAttribute(\"listEmployee\",employeeService.getAllEmployees());\n return \"index\";\n }", "@GetMapping(value=\"/employes\")\n\tpublic List<Employee> getEmployeeDetails(){\n\t\t\n\t\tList<Employee> employeeList = employeeService.fetchEmployeeDetails();\n\t\treturn employeeList;\t\t\t\t\t\t\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}", "private void viewTeacher() {\n //Lesen wir die ID\n Scanner sc = new Scanner(System.in);\n System.out.print(\"ID of the teacher to be viewed: \");\n long ID = sc.nextLong();\n\n Teacher t = ctrl.getTeacherRepo().findOne(ID);\n if (t != null)\n System.out.println(t.toString());\n else\n System.out.println(\"Teacher with this ID doesn't exist!\");\n }", "public Collection<LogModel> selectLogByEmployee(EmployeeModel employee);", "@GetMapping(\"/{ecode}\")\n public Employee getUserById(@PathVariable(value = \"ecode\") long userId) {\n return this.employeeRepository.findById(userId)\n .orElseThrow(() -> new ResourceNotFoundException(\"Employee not found with id: \"+ userId));\n }", "public void editEmployeeInformationName(String text) {\n\t\tthis.name=text;\n\t\tResourceCatalogue resCat = new ResourceCatalogue();\t\t\n\t\tresCat.getResource(rid).editResource(name, this.sectionId);\n\t\tHashMap<String, String> setVars = new HashMap<String, String>();\n\t\tsetVars.put(\"empname\", \"\\'\"+name+\"\\'\");\n\t\tsubmitToDB(setVars);\n\n\t}", "public Employee myInfo(String username) {\r\n\t\tEmployee e = SQLUtilityEmployees.getEmployeeByUsername(username);\r\n\t\tSystem.out.println(e);\r\n\t\treturn e;\r\n\t}", "public Employee getEmployeeById(Long custId)throws EmployeeException;", "@GetMapping(\"/employees/{id}\")\n public ResponseEntity<Employee> getEmployeeById(@PathVariable(value = \"id\") long employeeId) throws ResourceNotFoundException {\n Employee employee = service.getEmployeeById(employeeId).orElseThrow(() -> new ResourceNotFoundException(\"Employee not found for this id: \" + employeeId));\n return ResponseEntity.ok().body(employee);\n }" ]
[ "0.7376824", "0.6958082", "0.6948941", "0.6828701", "0.6627253", "0.66008", "0.6591377", "0.65778345", "0.64594024", "0.6450096", "0.64410865", "0.6441033", "0.6415199", "0.64089614", "0.63962835", "0.6379003", "0.6366473", "0.63336927", "0.63184464", "0.6251462", "0.6207234", "0.6182889", "0.617374", "0.6163007", "0.6148716", "0.61351013", "0.612933", "0.6111531", "0.60985214", "0.6085883", "0.60735637", "0.6070829", "0.6065413", "0.6056276", "0.6054894", "0.60483694", "0.60379046", "0.6033214", "0.60233253", "0.60146594", "0.5992127", "0.5980504", "0.59769046", "0.59717816", "0.5966608", "0.59648854", "0.59604543", "0.5959702", "0.5952253", "0.59507614", "0.59462816", "0.59449315", "0.593544", "0.59346557", "0.59335166", "0.59050804", "0.5901323", "0.5882907", "0.58779013", "0.58692855", "0.58678144", "0.5864782", "0.5862467", "0.5861658", "0.5855989", "0.58557737", "0.58552814", "0.585507", "0.58516186", "0.58353806", "0.5826365", "0.58250934", "0.58248365", "0.58125144", "0.5810749", "0.5809397", "0.58092576", "0.5805846", "0.5805275", "0.57773465", "0.5775405", "0.57687336", "0.5768507", "0.57633996", "0.5761543", "0.57604027", "0.57550037", "0.5748336", "0.57425636", "0.5741124", "0.57373536", "0.5736421", "0.57113844", "0.57112086", "0.5698663", "0.56935185", "0.56911397", "0.5688054", "0.5686992", "0.5686849", "0.5685472" ]
0.0
-1
function to view all employees
public void actionPerformed(ActionEvent e){ empJTextArea.setText(null); if(employees.size() >= 1){ for(Employee employee: employees){ empJTextArea.append("\n Employee ID: "+employee.getEmployeeId() +"\n Name: " +employee.getEmployeeName() +"\n Access Level: " +employee.getAccess() +"\n Password: " +employee.getPassword() +"\n Salary: " +employee.getSalary()+"\n"); empJTextArea.setCaretPosition(0); } }else{ JOptionPane.showMessageDialog(null, "No Employees Found"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@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}", "private void doViewAllEmployees() {\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"***Hors Management System:: System Administration:: View All Staffs\");\n\n List<Employee> employees = employeeControllerRemote.retrieveAllEmployees();\n\n employees.forEach((employee) -> {\n System.out.println(\"Employee ID: \" + employee.getEmployeeId() + \"First Name: \" + employee.getFirstName() + \"Last Name: \" + employee.getLastName() + \"Job Role: \" + employee.getJobRole().toString() + \"Username: \" + employee.getUserName() + \"Password: \" + employee.getPassword());\n });\n\n System.out.println(\"Press any key to continue...>\");\n sc.nextLine();\n }", "@GetMapping(\"/GetAllEmployees\")\r\n public List<Employee> viewAllEmployees() {\r\n return admin.viewAllEmployees();\r\n }", "@RequestMapping(\"/employee\")\n\tpublic List<Employee> getAllEmplyee() {\n\t\treturn service.getAllEmplyee();\n\t}", "@RequestMapping(path = \"/employee\", method = RequestMethod.GET)\r\n\t@ResponseBody\r\n\tpublic List<Employee> displayEmployee() {\r\n\t\treturn er.findAll();\r\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 }", "@GetMapping(\"/employee\")\r\n\tpublic List<Employee> getAllEmployees()\r\n\t{\r\n\t\treturn empdao.findAll();\r\n\t}", "public void listEmployees()\n\t{\n\t\tString str = \"Name\\tSurname\\tMail\\tPassword\\tBranchId\\tId\\n\";\n\t\t\n\t\tList<Employee> employees = this.company.getEmployees();\n\n\t\tfor(int i=0; i<employees.length(); i++)\n\t\t{\n\t\t\tstr += employees.get(i).getName() + \"\\t\" + employees.get(i).getSurname() + \"\\t\" + employees.get(i).getMail() + \"\\t\" + employees.get(i).getPassword() + \"\\t\\t\" + employees.get(i).getBranchId() + \"\\t\\t\" + employees.get(i).getId() + \"\\n\";\n\t\t}\n\n\t\tSystem.out.println(str);\n\n\t}", "@GetMapping(value=\"/searchEmpData\")\n\tpublic List<Employee> getAllEmployees()\n\t{\n\t\treturn this.integrationClient.getAllEmployees();\n\t}", "@GetMapping(\"/employees\")\r\n\tpublic List<Employee> list() {\r\n\t return empService.listAll();\r\n\t}", "@GetMapping(\"/findAllEmployees\")\n\tpublic List<Employee> getAll() {\n\t\treturn testService.getAll();\n\t}", "@GetMapping(\"/emloyees\")\n public List<Employee> all() {\n return employeeRepository.findAll();\n }", "public List<Employee> getAllEmployees() {\n return employeeRepository.findAll();\n }", "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}", "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 }", "List<Employee> allEmpInfo();", "public List<Employees> getEmployeesList()\n {\n return employeesRepo.findAll();\n }", "@GetMapping(\"/employees\")\npublic List <Employee> findAlll(){\n\treturn employeeService.findAll();\n\t}", "@RequestMapping(value = \"/getAllEmployees\", method = RequestMethod.GET, produces = { MediaType.APPLICATION_JSON_VALUE })\r\n\tpublic List<Employee> getAllEmpoyees(){\r\n\t\treturn repository.getAllEmpoyees();\r\n\t}", "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}", "@Override\n\tpublic void getAllEmployee() {\n\t\t\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}", "@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}", "@Override\r\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn employees;\r\n\t}", "public List<Employee> getAll() {\n\t\treturn edao.listEmploye();\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 List<Employee> listAll(){\n return employeeRepository.findAll();\n }", "@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 }", "@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 List<EmployeeTO> getAllEmployees() {\n\t\t\r\n\t\treturn EmployeeService.getInstance().getAllEmployees();\r\n\t}", "public List<Employee> getListOfAllEmployees() {\n\t\tlista = employeeDao.findAll();\r\n\r\n\t\treturn lista;\r\n\t}", "@GetMapping(\"/getEmployees\")\n\t@ResponseBody\n\tpublic List<Employee> getAllEmployees(){\n\t\treturn employeeService.getEmployees();\n\t}", "public ViewObjectImpl getEmployees() {\n return (ViewObjectImpl)findViewObject(\"Employees\");\n }", "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}", "@RequestMapping(value = GET_ALL_EMPLOYEE_URL_API, method=RequestMethod.GET)\r\n public ResponseEntity<?> getAllEmployee() {\r\n\r\n checkLogin();\r\n\r\n return new ResponseEntity<>(employeeService.getAll(), HttpStatus.OK);\r\n }", "@Override\r\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn employeeDao.getAllEmployee();\r\n\t}", "@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}", "public List<Employee> getAllEmployeeDetail() {\n\t\treturn dao.getAllEmployeeDetail();\n\t}", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn employeeDao.getAllEmployees();\n\t}", "@Override\r\n\tpublic List<Employee> getAllEmployeeList() throws Exception {\n\t\t\r\n\t\treturn (List<Employee>) employeeRepository.findAll();\r\n\t}", "public void displayEmployees(){\n System.out.println(\"NAME --- SALARY --- AGE \");\n for (Employee employee : employees) {\n System.out.println(employee.getName() + \" \" + employee.getSalary() + \" \" + employee.getAge());\n }\n }", "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 }", "@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}", "@Override\n\tpublic List<Employee> findAllEmployees() {\n\t\treturn employeeRepository.findAllEmployess();\n\t}", "@RequestMapping(value=\"/listEmployees\", method=RequestMethod.GET)\n /* Show list of employees */\n public String listEmployees(Model model) {\n \tList<Employee> employeeList = employeeservice.listAllEmployees();\n\n model.addAttribute(\"employees\", employeeList);\n\n return \"showListEmployees\";\n }", "@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}", "@Override\r\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn null;\r\n\t}", "@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}", "@GetMapping(\"/all\")\n public ResponseEntity responseAllEmployees(){\n return new ResponseEntity<>(hr_service.getAllEmployees(), HttpStatus.OK);\n }", "public List<Employee> findAll() {\n return employeeRepository.findAll();\n }", "@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}", "public static void showEmployees(RequestHandler handler) {\n\t\tStringBuilder sb;\n\t\tsb = new StringBuilder();\n\t\tsb.append(\"\\nDisplaying all employees:\");\n\t\thandler.sendMessage(sb.toString());\n\t\tfor (Employee e : EmployeeData.getEmployees()) {\n\t\t\tshowEmployee(handler, e);\n\t\t}\n\t\thandler.sendMessage(new StringBuilder(\"Finished Displaying Employees\"));\n\t}", "@Override\n\tpublic List<Employee> getEmpleados() {\n\t\treturn repositorioEmployee.findAll();\n\t}", "public List<Employee> getEmployees();", "public HashMap<Integer, Employee> viewAllEmployee() {\r\n\t\treturn employee1;\r\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}", "public List<User> getAllEmployees(String companyShortName);", "@Transactional\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn accountDao.getAllEmployee();\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}", "@Override\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn null;\n\t}", "@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}", "@RequestMapping(value = { \"/list\" }, method = RequestMethod.GET)\r\n public String listEmployees(ModelMap model) {\r\n \r\n List<Employee> employees = service.findAllEmployees();\r\n model.addAttribute(\"employees\", employees);\r\n return \"allemployees\";\r\n }", "@Override\n\t@Transactional\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn employeeDao.getAllEmployees();\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\n\tpublic List<Employee> getAll() {\n\t\tList<Employee> list =null;\n\t\tEmployeeDAO employeeDAO = DAOFactory.getEmployeeDAO();\n\t\ttry {\n\t\t\tlist=employeeDAO.getAll();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}", "List<Employee> findAll();", "@Override\n public List<Employee> getAllEmployees() {\n return null;\n }", "@Override\n\tpublic List<Employee> queryAll() {\n\t\treturn dao.queryAll();\n\t}", "@GetMapping(\"/my-employee\")\n\t@Secured(Roles.BOSS)\n\tpublic ResponseEntity<EmployeeCollectionDto> getAllMyEmployees() {\n\t\tLogStepIn();\n\n\t\t// Gets the currently logged in user's name\n\t\tString username = SecurityContextHolder.getContext().getAuthentication().getName();\n\t\tLong bossId = userRepository.findByName(username).getEmployee().getId();\n\n\t\t// Adds the employees that directly belongs to this boss\n\t\tEmployeeCollectionDto employeeCollectionDto = new EmployeeCollectionDto();\n\t\tList<Employee> employeeList = employeeRepository.findAll();\n\t\tfor(Employee employee : employeeList) {\n\t\t\tif(employee.getBossId().equals(bossId))\n\t\t\t\temployeeCollectionDto.collection.add(toDto(employee));\n\t\t}\n\n\t\treturn LogStepOut(ResponseEntity.ok(employeeCollectionDto));\n\t}", "@RequestMapping(value=\"/employees/all\", method = RequestMethod.GET)\npublic @ResponseBody List<Employee> employeeListRest(){\n\treturn (List<Employee>) employeerepository.findAll();\n}", "public List<Employee> listAllCrud(){\n return employeeCrudRepository.findAll();\n }", "@GetMapping(value=\"/employes\")\n\tpublic List<Employee> getEmployeeDetails(){\n\t\t\n\t\tList<Employee> employeeList = employeeService.fetchEmployeeDetails();\n\t\treturn employeeList;\t\t\t\t\t\t\n\t}", "public List<Employee> list() {\n\t\t\treturn employees;\n\t\t}", "public List<String> getAll() {\n\treturn employeeService.getAll();\n }", "@RequestMapping(value = \"/v2/employees\", method = RequestMethod.GET)\r\n\tpublic List<Employee> employeev2() {\r\n JPAQuery<?> query = new JPAQuery<Void>(em);\r\n QEmployee qemployee = QEmployee.employee;\r\n List<Employee> employees = (List<Employee>) query.from(qemployee).fetch();\r\n // Employee oneEmp = employees.get(0);\r\n\t\treturn employees;\r\n }", "@Override\n\tpublic ResponseEntity<Collection<Employee>> findAll() {\n\t\treturn new ResponseEntity<Collection<Employee>>(empService.findAll(),HttpStatus.OK);\n\t}", "@GetMapping(\"/employees\")\n Flux<Employee> all() { //TODO: Wasn't previously public\n return this.repository.findAll();\n }", "public List<Employee> getAllEmployee(){\n List<Employee> employee = new ArrayList<Employee>();\n employeeRepository.findAll().forEach(employee::add);\n return employee;\n }", "@Override\n\tpublic List<Emp> findAll() {\n\t\treturn eb.findAll();\n\t}", "@Override\r\n\tpublic List<Employee> getdetails() {\n\t\treturn empdao.findAll();\r\n\t}", "@SuppressWarnings({ \"unchecked\", \"static-access\" })\n\t@Override\n\t/**\n\t * Leo todos los empleados.\n\t */\n\tpublic List<Employees> readAll() {\n\t\tList<Employees> ls = null;\n\n\t\tls = ((SQLQuery) sm.obtenerSesionNueva().createQuery(\n\t\t\t\tInstruccionesSQL.CONSULTAR_TODOS)).addEntity(Employees.class)\n\t\t\t\t.list();// no creo que funcione, revisar\n\n\t\treturn ls;\n\t}", "@RequestLine(\"GET /show\")\n List<Bucket> getAllEmployeesList();", "@Override\r\n\tpublic List<Employee> selectAllEmployee() {\n\t\treturn null;\r\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}", "@GetMapping\n\t@Secured(Roles.ADMIN)\n\tpublic ResponseEntity<EmployeeCollectionDto> getAll() {\n\t\tLogStepIn();\n\n\t\tList<Employee> employeeList = employeeRepository.findAll();\n\t\tEmployeeCollectionDto employeeCollectionDto = new EmployeeCollectionDto();\n\n\t\tfor (Employee employee : employeeList) {\n\t\t\temployeeCollectionDto.collection.add(toDto(employee));\n\t\t}\n\n\t\treturn LogStepOut(ResponseEntity.ok(employeeCollectionDto));\n\t}", "private void viewAll(HashMap<Integer, Employee> viewAllEmployee) {\r\n\t\tSet<Entry<String, String>> set = employee.entrySet();\r\n\t\tset.stream().forEach((element) -> System.out.println(element.getValue() + \" \" + element.getKey()));\r\n\t}", "Collection<EmployeeDTO> getAll();", "public List<Employee> getEmployeesOnly() {\n\t\treturn edao.listEmployeOnly();\n\t}", "public List<Empleado> getAll();", "public List<Employe> findAllEmployees() {\n\t\treturn null;\n\t}", "@GetMapping(value=\"/searchEmpData/{fname}\")\n\tpublic List<Employee> getEmployeeByName(@PathVariable (value = \"fname\") String fname)\n\t{\n\t\treturn integrationClient.getEmployees(fname);\n\t}", "@Override\n @Transactional\n public List<Employee> getlistEmployee() {\n \tList<Employee> employees = entityManager.createQuery(\"SELECT e FROM Employee e\", Employee.class).getResultList();\n \tfor(Employee p : employees)\n \t\tLOGGER.info(\"employee list::\" + p);\n \treturn employees;\n }", "public List<Employee> selectAllEmployee() {\n\n\t\t// using try-with-resources to avoid closing resources (boiler plate code)\n\t\tList<Employee> emp = new ArrayList<>();\n\t\t// Step 1: Establishing a Connection\n\t\ttry (Connection connection = dbconnection.getConnection();\n\n\t\t\t\t// Step 2:Create a statement using connection object\n\t\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(SELECT_ALL_employe);) {\n\t\t\tSystem.out.println(preparedStatement);\n\t\t\t// Step 3: Execute the query or update query\n\t\t\tResultSet rs = preparedStatement.executeQuery();\n\n\t\t\t// Step 4: Process the ResultSet object.\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString employeename = rs.getString(\"employeename\");\n\t\t\t\tString address = rs.getString(\"address\");\n\t\t\t\tint mobile = rs.getInt(\"mobile\");\n\t\t\t\tString position = rs.getString(\"position\");\n\t\t\t\tint Salary = rs.getInt(\"Salary\");\n\t\t\t\tString joineddate = rs.getString(\"joineddate\");\n\t\t\t\tString filename =rs.getString(\"filename\");\n\t\t\t\tString path = rs.getString(\"path\");\n\t\t\t\temp.add(new Employee(id, employeename, address, mobile, position, Salary, joineddate,filename,path));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tdbconnection.printSQLException(e);\n\t\t}\n\t\treturn emp;\n\t}", "@Override\n\tpublic List<Employee> findAllEmployee() {\n\t\treturn null;\n\t}", "@GET\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic String getAllEmployees(){\n\t\tString employeesJsonString = getFileContent();\n\t\treturn employeesJsonString;\n\t}", "@Override\r\n\tpublic List<Emp> getAll() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic List<Employee> findAll() {\n\t\treturn null;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\t\t\n\t\tpublic List<Employee> listEmployee() throws SQLException {\n\t\t\treturn (List<Employee>) employeeDAO.listEmployee();\n\t\t}", "@Override\n\tpublic List<EmployeeBean> getEmployeeList() throws Exception {\n\t\treturn employeeDao.getEmployeeList();\n\t}", "public String getEmployees(){\n return employees;\n }" ]
[ "0.84952974", "0.8213424", "0.82030433", "0.8018163", "0.8016731", "0.7946398", "0.79225856", "0.78507006", "0.78254354", "0.77668715", "0.77415526", "0.7736975", "0.7713791", "0.77058756", "0.769707", "0.7692233", "0.766034", "0.76524186", "0.7641107", "0.76398", "0.7639696", "0.76374525", "0.7613285", "0.758472", "0.7571041", "0.7556907", "0.75487775", "0.74704105", "0.7458424", "0.74470437", "0.7444164", "0.7441752", "0.74125737", "0.7412507", "0.7412101", "0.74097407", "0.7398648", "0.7396237", "0.7360225", "0.73588634", "0.73540145", "0.73517305", "0.73260665", "0.73222595", "0.7267677", "0.7261667", "0.72534704", "0.7243012", "0.7238891", "0.72322977", "0.72277915", "0.72211194", "0.7216235", "0.721455", "0.72133803", "0.7210836", "0.7179056", "0.71636164", "0.715948", "0.715948", "0.7157263", "0.715497", "0.71522063", "0.71491665", "0.714009", "0.7133047", "0.71287405", "0.7118296", "0.7102033", "0.70894855", "0.7082351", "0.7053478", "0.7042741", "0.7036967", "0.7032674", "0.70315", "0.7027326", "0.70165455", "0.70093864", "0.6997238", "0.69765943", "0.6945568", "0.6928103", "0.6927109", "0.6925245", "0.69106615", "0.69087124", "0.6901179", "0.68999755", "0.68897253", "0.6885216", "0.6873644", "0.6872009", "0.68504", "0.6848551", "0.68316543", "0.6825207", "0.68214875", "0.68105066", "0.6788375", "0.67848134" ]
0.0
-1
update a specific customer
public void actionPerformed(ActionEvent e){ if(viewEmpIdCombo.getSelectedIndex() != 0){ if(editEmpNameField.getText().isEmpty() || editEmpAccessField.getText().isEmpty() || editEmpSalaryField.getText().isEmpty() || editEmpPasswordField.getText().isEmpty()){ JOptionPane.showMessageDialog(null, "Please Complete All Fields"); }else{ for(Employee employee: employees){ if(employee.getEmployeeId() == Integer.parseInt(viewEmpIdCombo.getSelectedItem().toString())){ employee.setEmployeeName(editEmpNameField.getText()); employee.setAccess(Integer.parseInt(editEmpAccessField.getText())); employee.setSalary(Double.parseDouble(editEmpSalaryField.getText())); employee.setPassword(Integer.parseInt(editEmpPasswordField.getText())); JOptionPane.showMessageDialog(null, "Employee Updated"); viewEmpIdCombo.setSelectedIndex(0); editEmpNameField.setText(""); editEmpAccessField.setText(""); editEmpSalaryField.setText(""); editEmpPasswordField.setText(""); return; } } } }else{ JOptionPane.showMessageDialog(null, "Please Select a Valid Employee."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void updateCustomerById(Customer customer);", "public void update(Customer customer) {\n\n\t}", "public void updateCustomer(String id) {\n\t\t\n\t}", "public int updateCustomer(Customer customer) {\n return model.updateCustomer(customer); \n }", "@PutMapping(\"/customerupdate\")\n\tpublic void update(@RequestBody Customer theCustomer) {\n\t\t// checking whether the customer exists or not\n\t\tCustomer customerExists = customerServices.findByID(theCustomer.getMobile_number());\n\n\t\tif (customerExists != null) {\n\t\t\tcustomerServices.save(theCustomer);\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Customer with customer id - \" + theCustomer + \" not exists\");\n\t\t}\n\t}", "public ResponseEntity<?> updateCustomerById(Long id, customer.controller.Customer customer);", "@Override\n public void updateCustomer(UUID customerId, @RequestBody Customer customer) {\n log.debug(\"Updating a customer to service...\");\n }", "@Override\n\tpublic void update(Customer customer) {\n\t\t\n\t}", "@Override\n\tpublic void update(Customer customer) {\n\t\t\n\t}", "@PutMapping(\"/customers\")\n\tpublic Customer updatecustomer(@RequestBody Customer thecustomer) {\n\t\t\n\t\tthecustomerService.saveCustomer(thecustomer); //as received JSON object already has id,the saveorupdate() DAO method will update details of existing customer who has this id\n\t\treturn thecustomer;\n\t}", "@Override\n\tpublic void updateCustomer(Customer customer) throws Exception{\n\t\tConnection con = pool.getConnection();\n\t\tCustomer custCheck = getCustomer(customer.getId());\n\t\tif(custCheck.getCustName()== null)\n\t\t\treturn;\n\t\t\t//throws Exception no customer found in DB\n\n\t\ttry {\n\t\t\tStatement st = con.createStatement();\n\t\t\tString update = String.format(\"update customer set CUST_NAME=('%s') where id in ('%d')\" +\n\t\t\t\" update customer set PASSWORD=('%s')\"\n\t\t\t\t\t+ \" where id in('%d')\",\n\t\t\t\t\tcustomer.getCustName(),\n\t\t\t\t\tcustomer.getId(),\n\t\t\t\t\tcustomer.getPassword(),\n\t\t\t\t\tcustomer.getId());\n\t\t\t\n\t\t\tst.executeUpdate(update);\n\t\t\tSystem.out.println(\"Customer updated successfully\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage() + \"Unable to update A customer, Try Again! \");\n\t\t} finally {\n\t\t\tpool.returnConnection(con);\n\t\t}\n\n\t}", "private void updateCustomer(Customer customer) {\n List<String> args = Arrays.asList(\n customer.getCustomerName(),\n customer.getAddress(),\n customer.getPostalCode(),\n customer.getPhone(),\n customer.getLastUpdate().toString(),\n customer.getLastUpdatedBy(),\n String.valueOf(customer.getDivisionID()),\n String.valueOf(customer.getCustomerID())\n );\n DatabaseConnection.performUpdate(\n session.getConn(),\n Path.of(Constants.UPDATE_SCRIPT_PATH_BASE + \"UpdateCustomer.sql\"),\n args\n );\n }", "public void update(Customer myCust){\n }", "@Test\n\tpublic void updateCustomer() {\n\t\t// Given\n\t\tString name = \"Leo\";\n\t\tString address = \"Auckland\";\n\t\tString telephoneNumber = \"021123728381\";\n\t\tICustomer customer = customerController.create(name, address, telephoneNumber);\n\t\tname = \"Mark\";\n\t\taddress = \"Auckland\";\n\t\ttelephoneNumber = \"0211616447\";\n\t\tlong id = customer.getId();\n\n\t\t// When\n\t\tICustomer cus = customerController.update(id, name, address, telephoneNumber);\n\n\t\t// Then\n\t\tAssert.assertEquals(name, cus.getName());\n\t\tAssert.assertEquals(address, cus.getAddress());\n\t\tAssert.assertEquals(telephoneNumber, cus.getTelephoneNumber());\n\t\tAssert.assertEquals(id, cus.getId());\n\t}", "@Override\n public void updateCustomer(UUID id, CustomerDto customer) {\n log.debug(\"Customer is updated: customerId: \"+id);\n }", "public void update(Customer c){\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n try {\n ppst = conn.prepareCall(\"UPDATE customer SET name = ?, id = ?, phone = ? WHERE customer_key = ?\");\n ppst.setString(1, c.getName());\n ppst.setString(2, c.getId());\n ppst.setString(3, c.getPhone());\n ppst.setInt(4, c.getCustomerKey());\n ppst.executeUpdate();\n System.out.println(\"Updated successfully.\");\n } catch (SQLException e) {\n throw new RuntimeException(\"Update error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst);\n }\n }", "CustomerDto updateCustomer(CustomerDto customerDto);", "@Override\n\tpublic Customer update(long customerId, Customer customer) {\n\t\treturn null;\n\t}", "@Override\n\t@Transactional\n\tpublic void updateCustomer(Customer customer) {\n\n\t\thibernateTemplate.update(customer);\n\t\tSystem.out.println(\"customer is updated \" + customer);\n\n\t}", "public void update(Customer customer) throws SQLException {\r\n\t\tString updateSql = \"UPDATE \" + tableName\r\n\t\t\t\t+ \" SET name=?,surname=?,birth_date=?,birth_place=?,address=?,city=?,province=?,\"\r\n\t\t\t\t+ \" cap=?,phone_number=?,newsletter=?,email=?\" + \"WHERE (id = ?)\";\r\n\t\ttry {\r\n\t\t\t//connection = ds.getConnection();\r\n\t\t\tpreparedStatement = connection.prepareStatement(updateSql);\r\n\t\t\tpreparedStatement.setString(1, customer.getName());\r\n\t\t\tpreparedStatement.setString(2, customer.getSurname());\r\n\t\t\tpreparedStatement.setDate(3, (Date) customer.getBirthdate());\r\n\t\t\tpreparedStatement.setString(4, customer.getBirthplace());\r\n\t\t\tpreparedStatement.setString(5, customer.getAddress());\r\n\t\t\tpreparedStatement.setString(6, customer.getCity());\r\n\t\t\tpreparedStatement.setString(7, customer.getProvince());\r\n\t\t\tpreparedStatement.setInt(8, customer.getCap());\r\n\t\t\tpreparedStatement.setString(9, customer.getPhoneNumber());\r\n\t\t\tpreparedStatement.setInt(10, customer.getNewsletter());\r\n\t\t\tpreparedStatement.setString(11, customer.getEmail());\r\n\t\t\tpreparedStatement.setInt(12, customer.getId());\r\n\t\t\tpreparedStatement.executeUpdate();\r\n\t\t\tconnection.commit();\r\n\t\t} catch (SQLException e) {\r\n\t\t}\r\n\t}", "@Override\n\tpublic void updateCustomer(Customer customer) throws Exception {\n\t\tgetHibernateTemplate().update(customer);\n\t}", "@Override\n\tpublic Uni<Customer> updateCustomer(Customer customer) {\n\t\tFunction<Customer, Uni<? extends Customer>> update = entity -> {\n\t\t\tentity.setName(customer.getName());\n\t\t\tentity.setAddress(customer.getAddress());\n\t\t\treturn repo.flush().onItem().transform(ignore -> entity);\n\t\t};\n\t\treturn repo.findById(customer.getId()).onItem().ifNotNull().transformToUni(update);\n\t}", "private void updateCustomer(HttpServletRequest request, HttpServletResponse response) throws IOException {\n int id = Integer.parseInt(request.getParameter(\"id\"));\n String name = request.getParameter(\"name\");\n String phone = request.getParameter(\"phone\");\n String email = request.getParameter(\"email\");\n Customer updateCustomer = new Customer(id, name, phone, email);\n CustomerDao.addCustomer(updateCustomer);\n response.sendRedirect(\"list\");\n\n }", "@Override\n\tpublic void update(Customer t) {\n\n\t}", "@Override\r\n\tpublic Customer updateCustomer(Customer customer) {\r\n\t\tOptional<Customer> optionalCustomer = null;\r\n\t\tCustomer customer2 = null;\r\n\t\toptionalCustomer = customerRepository.findById(customer.getUserId());\r\n\t\tif (optionalCustomer.isPresent()) {\r\n\t\t\tcustomer2 = customerRepository.save(customer);\r\n\t\t\treturn customer2;\r\n\t\t} else {\r\n\t\t\tthrow new EntityUpdationException(\"Customer With Id \" + customer.getUserId() + \" does Not Exist.\");\r\n\t\t}\r\n\r\n\t}", "public static void update(Customer aCustomer) throws NotFoundException\r\n\t{\n\t\tphoneNumber = aCustomer.getPhoneNo();\r\n\t\tname = aCustomer.getName();\r\n\t\taddress = aCustomer.getAddress();\r\n\r\n\t\t// define the SQL query statement using the phone number key\r\n\t\tString sqlUpdate = \"Update CustomerTable \" +\r\n\t\t\t\t\t\t\t\t \" SET CustomerName = '\" + name +\"', \" +\r\n\t\t\t\t\t\t\t\t \" address = '\" + address +\"' \" +\r\n\t\t\t\t\t\t\t\t \" WHERE PhoneNo = '\" + phoneNumber + \"'\";\r\n\r\n\t\t// see if this customer exists in the database\r\n\t\t// NotFoundException is thrown by find method\r\n\t\ttry\r\n\t\t{\r\n\t\t\tCustomer c = Customer.find(phoneNumber);\r\n \t\t// if found, execute the SQL update statement\r\n \t\tint result = aStatement.executeUpdate(sqlUpdate);\r\n \t}\r\n\t\tcatch (SQLException e)\r\n\t\t\t{ System.out.println(e);\t}\r\n\t}", "void updateCustomer(int id, String[] updateInfo);", "CustomerOrder update(CustomerOrder customerOrder);", "public boolean updateCustomer(String customerJSON);", "public void editCustomer(Customer c) {\n\t\tconnector.editCustomer(c);\n\t\t\n\t\t// Edit entries in table \"Nummern\"\n\t\tconnector.editNumbers(c, c.getNumbers());\n\t\t\n\t\tupdateCustomers();\n\t}", "@Override\n\tpublic boolean updateCustomer(Customer customer) {\n\t\tSession session =sessionFactory.getCurrentSession();\n\t\tsession.update(customer);\n\t\treturn true;\n\t}", "@Override\n\tpublic Customer update(Customer o) {\n\n\t\tif (o == null || o.getId() == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tString updateQuery = String.format(\"UPDATE TB_customer SET \");\n\t\tupdateQuery += COLUMN_NAME_FIRST_NAME + \"= ? ,\";\n\t\tupdateQuery += COLUMN_NAME_LAST_NAME + \"= ? ,\";\n\t\tupdateQuery += COLUMN_NAME_EMAIL + \"= ? ,\";\n\t\tupdateQuery += COLUMN_NAME_KNICKNAME + \"= ?,\";\n\t\tupdateQuery += COLUMN_NAME_BIRTHDATE + \"= ?,\";\n\t\tupdateQuery += COLUMN_NAME_CREDITS + \"= ?\";\n\t\tupdateQuery += \" WHERE \" + COLUMN_NAME_ID + \"= ? ;\";\n\n\t\ttry (PreparedStatement pS = dbCon.prepareStatement(updateQuery)) {\n\n\t\t\tpS.setString(1, o.getFirstName());\n\t\t\tpS.setString(2, o.getLastName());\n\t\t\tpS.setString(3, o.getEmail());\n\t\t\tpS.setString(4, o.getKnickname());\n\t\t\tpS.setDate(5, java.sql.Date.valueOf(o.getBirthdate()));\n\t\t\tpS.setDouble(6, o.getCredits());\n\t\t\tpS.setInt(7, o.getId());\n\t\t\tpS.executeUpdate();\n\n\t\t\tpS.close();\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Update of tb_customer \" + o.getId() + \" failed : \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\n\t\treturn o;\n\t}", "@RequestMapping(method = RequestMethod.PUT, value = \"/{id}\")\n\t public ResponseEntity<?> updateUser(@PathVariable(\"id\") Long id, @RequestBody Customer customer) {\n\t \treturn service.updateCustomer(id, customer);\n\t }", "public static void updateCustomer(int customerID, String name, String address, String firstDivision, String postalCode, String phoneNumber) throws SQLException{\r\n\r\n //connection and prepared statement set up\r\n Connection conn = DBConnection.getConnection();\r\n String insertStatement = \"UPDATE customers SET Customer_Name = ?, Address = ?, Postal_Code = ?, Phone = ?, Last_Update = ?, Last_Updated_By = ?, Division_ID = ? WHERE Customer_ID = ?;\";\r\n DBQuery.setPreparedStatement(conn, insertStatement);\r\n PreparedStatement ps = DBQuery.getPreparedStatement();\r\n int divisionID = getDivisionID(firstDivision);\r\n String userName = DBUsers.getUser();\r\n\r\n ps.setString(1,name);\r\n ps.setString(2, address);\r\n ps.setString(3,postalCode);\r\n ps.setString(4,phoneNumber);\r\n ps.setTimestamp(5, Timestamp.valueOf(LocalDateTime.now()));\r\n ps.setString(6,userName);\r\n ps.setInt(7,divisionID);\r\n ps.setInt(8, customerID);\r\n\r\n ps.execute();\r\n\r\n if(ps.getUpdateCount() > 0) {\r\n System.out.println(ps.getUpdateCount() + \" row(s) effected\");\r\n }\r\n else {\r\n System.out.println(\"no change\");\r\n }\r\n }", "@Override\n\tpublic Customers update(Customers updatecust) {\n\t\tCustomers custpersist= search(updatecust.getId());\n\t\tif (custpersist==null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tCustomers upcust = CustRepo.save(updatecust);\n\t\treturn upcust;\n\t}", "@Override\r\n\tpublic void saveCustomer(CRMDto theCustomer) {\n\t\t\r\n\t\tSession session = factory.openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tsession.update(theCustomer);\r\n\t\ttx.commit();\r\n\t\t//System.out.println(\"pk update is \" +pk);\r\n\t\t\r\n\t\t\r\n\t}", "@PutMapping(\"/{id}\")\n public String update(@ModelAttribute(CUSTOMER) CustomerDTO customerDTO, @PathVariable(\"id\") long id) {\n Customer customer = mapDTOCustomerToPersistent(customerDTO);\n customer.getActualAddress().setModified(LocalDateTime.now());\n customerService.updateCustomer(customer, id);\n return REDIRECT_CLIENTS;\n }", "@PutMapping(\"/customer/{id}\")\n\tpublic ResponseEntity<Customer> updateCustomer(@PathVariable Long id, @RequestBody Customer customerDetails) {\n\t\tCustomer customer = customerRepository.findById(id)\n\t\t\t\t.orElseThrow(() -> new ResourceNotFoundException(\"Customer not exist with id :\" + id));\n\t\tcustomer.setName(customerDetails.getName());\n\t\tcustomer.setAddress(customerDetails.getAddress());\n\t\tcustomer.setNic(customerDetails.getNic());\n\t\tcustomer.setUsername(customerDetails.getUsername());\n\t\tcustomer.setPassword(customerDetails.getPassword());\n\t\tcustomer.setBirthday(customerDetails.getBirthday());\n\t\tcustomer.setMobile(customerDetails.getMobile());\n\t\tcustomer.setReg_date(customerDetails.getReg_date());\n\t\tcustomer.setEmail(customerDetails.getEmail());\n\t\tcustomer.setImage(customerDetails.getImage());\n\t\tcustomer.setSec_ques_no(customerDetails.getSec_ques_no());\n\t\tcustomer.setSec_ques_answer(customerDetails.getSec_ques_answer());\n\t\tcustomer.setGender(customerDetails.getGender());\n\n\t\tCustomer updatedCustomer = customerRepository.save(customer);\n\t\treturn ResponseEntity.ok(updatedCustomer);\n\t}", "@Override\n\tpublic boolean update(int customerId,String c) {\n\t\tString query=\"UPDATE Customer SET city=? where Customer_ID=?\";\n\t\ttry {\n\t\t\tPreparedStatement preparedStatement=DatabaseConnectionDAO.geConnection().prepareStatement(query);\n\t\t\tpreparedStatement.setInt(1, customerId);\n\t\t\tpreparedStatement.setString(2, c);\n\t\t\tint n=preparedStatement.executeUpdate();\n\t\t\tif(n>0)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"updated\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"enter valid data\");\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn false;\n\t}", "@ApiOperation(value = \"Replace a customer by new data\", notes = \"\")\n @PutMapping(value = {\"/{customerId}\"},produces = MediaType.APPLICATION_JSON_VALUE)\n @ResponseStatus(HttpStatus.OK)\n public CustomerDTO updateCustomer(@PathVariable Long customerId,@Validated @RequestBody CustomerDTO customerDTO) {\n return customerService.updateCustomer(customerId, customerDTO);\n }", "@Override\n\tpublic boolean updateCustomer(Customer customer) {\n\t\treturn false;\n\t}", "public Customer Update(int id, String attribute, Customer customer) {\n\t\t\n\t\tString sql = \"\";\n\t\t\n\t\tswitch(attribute) {\n\t\tcase \"NAME\":\n\t\t\tsql = \"UPDATE customers set name = '\"+ customer.getName() + \"' where customer_id = \"+id;\n\t\t\tbreak;\n\t\tcase \"EMAIL\":\n\t\t\tsql = \"UPDATE customers set email = '\"+ customer.getEmail() + \"' where customer_id = \"+id;\n\t\t\tbreak;\n\t\tcase \"ADDRESS\":\n\t\t\tsql = \"UPDATE customers set address = '\"+ customer.getAddress() + \"' where customer_id = \"+id;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tstmt.executeUpdate(sql);\n\t\t\treturn readById(id);\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 null;\n\t}", "public boolean updatecustomer(long id , Customermodel customermodel) {\n\t\t Optional<Customermodel> customerd = customerdb.findById(id);\n\n\t\t\t\t\tif (customerd.isPresent()) {\n\t\t\t\t\t\tCustomermodel customer = customerd.get();\n\t\t\t\t\t\t\n\t\t\t\t\t\tcustomer.setDob(customermodel.getDob());\n\t\t\t\t\t\tcustomer.setName(customermodel.getName());\n\t\t\t\t\t\tcustomerdb.save(customer);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\n\t\t\t\t\t} \n\t\t\t\t\telse {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} \n\t\t \n\t }", "public Customer updateCustomer(@RequestBody Customer theCustomer)\n {\n customerService.save(theCustomer);\n return theCustomer;\n }", "public void update(Customer customer) throws CustomerNotFoundException {\r\n this.entityManager.merge(customer);\r\n }", "public void update(String custNo, CstCustomer cstCustomer2) {\n\t\tcstCustomerDao.update(custNo,cstCustomer2);\n\t}", "public void update(Customer user){\n\t\t\n\t\tString sql = \"UPDATE CUSTOMER SET \" +\n\t\t\t\t\"NAME = ?, Age = ? WHERE CUST_ID = ? \";\n\t\tConnection conn = null;\n\t\t\n\t\ttry {\n\t\t\tconn = dataSource.getConnection();\n\t\t\tPreparedStatement ps = conn.prepareStatement(sql);\n\t\t\tps.setString(1, user.getName());\n\t\t\tps.setInt(2, user.getAge());\n\t\t\tps.setInt(3, user.getCustId());\n\t\t\tps.executeUpdate();\n\t\t\tps.close();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t\t\n\t\t} finally {\n\t\t\tif (conn != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {}\n\t\t\t}\n\t\t}\n\t}", "@PutMapping(\"/customers\")\n public void updateCustomer(@RequestBody CustomerHibernate theCustomerHibernate) {\n customerService.save(theCustomerHibernate);\n }", "@PreAuthorize(\"#oauth2.hasAnyScope('write','read-write')\")\n\t@RequestMapping(method = PUT, value = \"/{id}\", consumes = { APPLICATION_JSON_UTF8_VALUE })\n\tpublic Mono<ResponseEntity<?>> updateCustomer(@PathVariable @NotNull ObjectId id,\n\t\t\t@RequestBody @Valid Customer customerToUpdate) {\n\n\t\treturn repo.existsById(id).flatMap(exists -> {\n\n\t\t\tif (!exists) {\n\t\t\t\tthrow new CustomerServiceException(HttpStatus.BAD_REQUEST,\n\t\t\t\t\t\"Customer does not exist, to create a new customer use POST instead.\");\n\t\t\t}\n\n\t\t\treturn repo.save(customerToUpdate).then(Mono.just(noContent().build()));\n\t\t});\n\t}", "public void updateCustomer(int phone, int discount, String name, String address, String group, int originalNumber)\n\t{\n\t\tCustomer customer = getCustomer(originalNumber);\n\t\tcustomer.setPhone(phone);\n\t\tcustomer.setDiscount(discount);\n\t\tcustomer.setName(name);\n\t\tcustomer.setAddress(address);\n\t\tcustomer.setGroup(group);\n\t}", "Boolean updateOrInsert(Customer customer);", "public void updateCustomer(String name, String dob, String gender, String number, String email, String address, String password, Boolean promo, Integer reward) throws SQLException {\n st.executeUpdate(\"UPDATE IOTBAY.CUSTOMER SET \"\n + \"NAME ='\" + name \n + \"DATEOFBIRTH ='\" + dob \n + \"GENDER ='\" + gender \n + \"CONTACTNUMBER ='\" + number \n + \"BILLINGADDRESS ='\" + address \n + \"PASSWORD ='\" + password \n + \"PROMOTIONALNEWSLETTER ='\" + promo \n + \"', REWARDPOINTS='\" + reward \n + \"' WHERE EMAIL='\" + email + \"'\" );\n\n }", "void updateCustomerDDPay(CustomerDDPay cddp);", "@Override\n\tpublic void putCustomers(Customer customer) {\n\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(customer);;\n\n\t}", "public int updateCustomer(Map customerMap, Map allData){\r\n\t\t\r\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic int updateCustomerReprieve(CustomerReprieve customerReprieve) {\n\t\treturn customerDao.updateCustomerReprieve(customerReprieve);\n\t}", "int updateByPrimaryKey(OcCustContract record);", "public void setCustomer(String customer) {\n this.customer = customer;\n }", "public Customer putCustomer(final Customer customer) {\n return dbClient.put(customer);\n }", "@Override\n\tpublic boolean updateCustomer(Integer id, Customer customer) {\n\n\t\tboolean isUpdated = false;\n\n\t\tfor (Customer cust : customers) {\n\t\t\tif (cust.getId() == id) {\n\t\t\t\tcustomer.setId(id);\n\t\t\t\tcust.setUsername(customer.getUsername());\n\t\t\t\tcust.setFirstName(customer.getFirstName());\n\t\t\t\tcust.setLastName(customer.getLastName());\n\t\t\t\tcust.setEmail(customer.getEmail());\n\t\t\t\tcust.setUserType(customer.getUserType());\n\t\t\t\tcust.setPassword(customer.getPassword());\n\t\t\t\tcust.setAddress(customer.getAddress());\n\t\t\t\tlogger.info(\"Customer @id\" + id + \" is updated in the list\");\n\t\t\t\tisUpdated = true;\n\t\t\t}\n\t\t}\n\t\tlogger.info(\"Update done : updateCustomer.isUpdated = \" + isUpdated);\n\t\treturn isUpdated;\n\t}", "public void setExistingCustomer(Customer existingCustomer) { this.existingCustomer = existingCustomer; }", "@GET\n\t@Path(\"UpdateCustomer\")\n\tpublic Reply UpdateCustomer(@QueryParam(\"id\") int id, @QueryParam(\"companyname\") String companyname,\n\t\t\t@QueryParam(\"companynumber\") String companynumber, @QueryParam(\"contactname\") String contactname,\n\t\t\t@QueryParam(\"email\") String email, @QueryParam(\"phone\") String phone, @QueryParam(\"user\") int user) {\n\t\treturn ManagerHelper.getCustomerManager().UpdateCustomer(id, companyname, companynumber, contactname, email,\n\t\t\t\tphone, user);\n\t}", "public void setCustomerId(int customerId) \n {\n this.customerId = customerId;\n }", "public void setCustomer(String Cus){\n\n this.customer = Cus;\n }", "@RequestMapping(value = \"/customer/{id}\",method=RequestMethod.PUT)\n @ResponseStatus(HttpStatus.NO_CONTENT)\n public void updateCustomer(@PathVariable(\"id\") int id, @RequestBody @Valid CustomerViewModel customerViewModel){\n //check if the id matches the request body. Path variable and the\n //user passed data (customerId) must match to proceed.\n //so you need to input in both path variable and the requestbody\n if(id != customerViewModel.getCustomerId()){\n //throw illegal arguement\n }\n\n //if it does match, update that customer\n service.updateCustomer(customerViewModel);\n }", "public void setCustomer(Integer customer) {\n this.customer = customer;\n }", "@PutMapping(\"/api/customer/{id}\")\n\tpublic ResponseEntity<?> updateDetails(@PathVariable(\"id\") long id, @RequestBody CustomerDetails customerDetails) {\n\t\tcustomerService.updateDetails(id, customerDetails);\n\t\treturn ResponseEntity.ok().body(\"Customer Details is updated sucessfully\");\n\t}", "public void setCustomer_id(int customer_id){\n this.customer_id = customer_id;\n }", "int updateByExample(@Param(\"record\") CCustomer record, @Param(\"example\") CCustomerExample example);", "@Override\n\tpublic void updateProfile(CustomerUpdateVO customerVO) {\n\t\tCustomer customer = customerRepository.findById(customerVO.getCid()).get();\n\t\ttry {\n\t\t\tcustomer.setImage(customerVO.getPhoto().getBytes());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcustomer.setName(customerVO.getName());\n\t\tcustomer.setMobile(customerVO.getMobile());\n\t\tcustomer.setDom(new Timestamp(new Date().getTime()));\n\t\t/// customerRepository.save(customer);\n\t}", "protected void updateCustomer( int C_W_ID, int C_D_ID, int C_ID, double OL_AMOUNT ) {\n String query = \"UPDATE tpcc_customer SET c_balance = c_balance + \" + OL_AMOUNT + \", c_delivery_cnt = c_delivery_cnt + 1 WHERE c_w_id = \" + C_W_ID + \" AND c_d_id = \" + C_D_ID + \" AND c_id = \" + C_ID;\n executeAndLogStatement( query, QueryType.QUERYTYPEUPDATE );\n }", "public Boolean updateCustomer(String customerId, Customer updatedValuedCustomer){\n Boolean success = false;\n try{\n // try and connect\n conn = DriverManager.getConnection(URL);\n\n // make sql query\n PreparedStatement preparedStatement =\n conn.prepareStatement(\"UPDATE Customer SET FirstName=?, LastName=?, Country=?, PostalCode=?, Phone=?, Email=? WHERE CustomerId = ?\");\n preparedStatement.setString(1, updatedValuedCustomer.getFirstName());\n preparedStatement.setString(2, updatedValuedCustomer.getLastName());\n preparedStatement.setString(3, updatedValuedCustomer.getCountry());\n preparedStatement.setString(4, updatedValuedCustomer.getPostalCode());\n preparedStatement.setString(5, updatedValuedCustomer.getPhoneNumber());\n preparedStatement.setString(6, updatedValuedCustomer.getEmail());\n preparedStatement.setString(7, customerId);\n\n int result = preparedStatement.executeUpdate();\n success = (result != 0);\n System.out.println(\"Added customer\");\n }\n catch(Exception exception){\n System.out.println(exception.toString());\n }\n finally{\n try{\n conn.close();\n }\n catch (Exception exception){\n System.out.println(exception.toString());\n }\n }\n return success;\n }", "@PUT\n\t@Path(\"/update\")\n\t@Consumes(MediaType.APPLICATION_JSON)\n\tpublic void putCustomer(String test)\n\t\t\tthrows MalformedURLException, RemoteException, NotBoundException, ClassNotFoundException, SQLException {\n\n\t\t// Separate incoming data into individual strings\n\t\tString[] splited = test.split(\"\\\\s+\");\n\n\t\t// Connect to RMI and setup crud interface\n\t\tDatabaseOption db = (DatabaseOption) Naming.lookup(\"rmi://\" + address + service);\n\n\t\t// Connect to database\n\t\tdb.Connect();\n\n\t\t// Update the customers table\n\t\tdb.Update(\"UPDATE CUSTOMERS SET FIRST='\" + splited[1] + \"', SECOND='\" + splited[2] + \"', NUMBER='\" + splited[3]\n\t\t\t\t+ \"' WHERE id='\" + splited[0] + \"'\");\n\n\t\t// Update the bookings table\n\t\tdb.Update(\"UPDATE BOOKINGS SET FIRST='\" + splited[1] + \"', SECOND='\" + splited[2] + \"', NUMBER='\" + splited[3]\n\t\t\t\t+ \"' WHERE CUSTOMERID='\" + splited[0] + \"'\");\n\n\t\t// Disconnect to database\n\t\tdb.Close();\n\t}", "@Override\r\n\tpublic void update(CustVO custVO) {\n\t\tConnection con = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\ttry {\r\n\t\t\tcon = ds.getConnection();\r\n\t\t\tpstmt = con.prepareStatement(UPDATE);\r\n\r\n\t\t\tpstmt.setString(1, custVO.getCust_acc());\r\n\t\t\tpstmt.setString(2, custVO.getCust_pwd());\r\n\t\t\tpstmt.setString(3, custVO.getCust_name());\r\n\t\t\tpstmt.setString(4, custVO.getCust_sex());\r\n\t\t\tpstmt.setString(5, custVO.getCust_tel());\r\n\t\t\tpstmt.setString(6, custVO.getCust_addr());\r\n\t\t\tpstmt.setString(7, custVO.getCust_pid());\r\n\t\t\tpstmt.setString(8, custVO.getCust_mail());\r\n\t\t\tpstmt.setDate(9, custVO.getCust_brd());\r\n\t\t\tpstmt.setDate(10, custVO.getCust_reg());\r\n\t\t\tpstmt.setBytes(11, custVO.getCust_pic());\r\n\t\t\tpstmt.setString(12, custVO.getCust_status());\r\n\t\t\tpstmt.setString(13, custVO.getCust_niname());\r\n\t\t\tpstmt.setString(14, custVO.getCust_ID());\r\n\r\n\t\t\tpstmt.executeUpdate();\r\n\t\t} catch (SQLException se) {\r\n\t\t\tthrow new RuntimeException(\"A database error occured.\" + se.getMessage());\r\n\t\t} finally {\r\n\t\t\tif (pstmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpstmt.close();\r\n\t\t\t\t} catch (SQLException se) {\r\n\t\t\t\t\tse.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (con != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcon.close();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@CrossOrigin\n @RequestMapping(method = PUT, path = \"/customer\", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n public ResponseEntity<UpdateCustomerResponse> updateName(@RequestHeader(\"authorization\") final String authorization, @RequestBody UpdateCustomerRequest updateCustomerRequest) throws AuthorizationFailedException, UpdateCustomerException {\n String accessToken = utilityService.splitAuthorization(authorization);\n CustomerEntity customer = customerService.getCustomer(accessToken);\n String newFirstName = updateCustomerRequest.getFirstName();\n String newLastName = updateCustomerRequest.getLastName();\n // Check if the firstname entered is empty\n if (utilityService.isStringEmptyOrNull(newFirstName)) {\n throw new UpdateCustomerException(\"UCR-002\", \"First name field should not be empty\");\n } else {\n customer.setFirstName(newFirstName);\n customer.setLastName(newLastName);\n CustomerEntity updateCustomer = customerService.updateCustomer(customer);\n\n UpdateCustomerResponse response = new UpdateCustomerResponse();\n response.setId(updateCustomer.getUuid());\n response.setFirstName(updateCustomer.getFirstName());\n response.setLastName(updateCustomer.getLastName());\n response.setStatus(\"CUSTOMER DETAILS UPDATED SUCCESSFULLY\");\n return new ResponseEntity<UpdateCustomerResponse>(response, HttpStatus.OK);\n }\n\n }", "int updateByPrimaryKey(CustomerVisit record);", "@ApiOperation(value = \"Update a customer\", notes = \"\")\n @PatchMapping(value = {\"/{customerId}\"}, produces = MediaType.APPLICATION_JSON_VALUE)\n @ResponseStatus(HttpStatus.OK)\n public CustomerDTO patchCustomer(@PathVariable Long customerId,@Validated @RequestBody CustomerDTO customerDTO) {\n return customerService.patchCustomer(customerId, customerDTO);\n }", "@PreAuthorize(\"hasRole('ROLE_ADMIN')\")\n\t@RequestMapping(value = \"/{id}\", params = \"form\", method = RequestMethod.POST)\n\tpublic String update(@Valid Customer customer, BindingResult bindingResult, \n\t\t\t\t\t\tModel uiModel, HttpServletRequest httpServletRequest, \n\t\t\t\t\t\tRedirectAttributes redirectAttributes, Locale locale) {\n\t\t\tlogger.info(\"Updating customer\"); \n\t\t\tif (bindingResult.hasErrors()) {\n\t\t\t\tuiModel.addAttribute(\"message\", new Message(\"error\", messageSource.getMessage(\"customer_save_fail\", new Object[]{}, locale)));\n\t\t\t\tuiModel.addAttribute(\"customer\", customer);\n\t\t\t\treturn \"customers/update\"; \n\t\t\t}\n\t\t\tuiModel.asMap().clear(); \n\t\t\tredirectAttributes.addFlashAttribute(\"message\", new Message(\"success\",messageSource.getMessage(\"customer_save_success\", new Object[]{}, locale))); \n\t\t\tcustomerService.save(customer);\n\t\t\treturn \"redirect:/customers/\" + UrlUtil.encodeUrlPathSegment(customer.getId().toString(),httpServletRequest);\n\t}", "@RequestMapping(value = \"/customerOrders\",\n method = RequestMethod.PUT,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<CustomerOrder> updateCustomerOrder(@Valid @RequestBody CustomerOrder customerOrder) throws URISyntaxException {\n log.debug(\"REST request to update CustomerOrder : {}\", customerOrder);\n if (customerOrder.getId() == null) {\n return createCustomerOrder(customerOrder);\n }\n CustomerOrder result = customerOrderRepository.save(customerOrder);\n customerOrderSearchRepository.save(result);\n return ResponseEntity.ok()\n .headers(HeaderUtil.createEntityUpdateAlert(\"customerOrder\", customerOrder.getId().toString()))\n .body(result);\n }", "public void updateSalerCustomer(SalerCustomer salerCustomer) {\n\t\tthis.salerCustomerMapper.updateSalerCustomer(salerCustomer);\n\t}", "@Override\n\tpublic void saveCustomer(Customer theCustomer) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// save/upate the customer ... finally LOL\n\t\tcurrentSession.saveOrUpdate(theCustomer);\n\t\t\n\t}", "public void setCustomer(org.tempuri.Customers customer) {\r\n this.customer = customer;\r\n }", "@Override\n\tpublic void saveCustomer(Customer theCustomer) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// currentSession.save(theCustomer);\n\n\t\t// save/upate the customer\n\t\tcurrentSession.saveOrUpdate(theCustomer);\n\t}", "@PutMapping(\"/points/{customerId}\")\n @ResponseStatus(HttpStatus.NO_CONTENT)\n public void updatePointsOnAccount(@PathVariable(\"customerId\") int customerId, @RequestBody @Valid LevelUpViewModel lvm) {\n\n if (customerId != lvm.getCustomerId()) {\n throw new IllegalArgumentException(String.format(\"Id %s in the PathVariable does not match the Id %s in the RequestBody \", customerId, lvm.getCustomerId()));\n }\n\n serviceLayer.updatePoints(lvm);\n }", "@Test\n public void updateCustomer() {\n Customer customer = new Customer();\n customer.setFirstName(\"Dominick\");\n customer.setLastName(\"DeChristofaro\");\n customer.setEmail(\"[email protected]\");\n customer.setCompany(\"Omni\");\n customer.setPhone(\"999-999-9999\");\n customer = service.saveCustomer(customer);\n\n // Update the Customer in the database\n customer.setFirstName(\"Michael\");\n customer.setLastName(\"Stuckey\");\n customer.setEmail(\"[email protected]\");\n customer.setCompany(\"NuclearFuelServices\");\n customer.setPhone(\"222-222-2222\");\n service.updateCustomer(customer);\n\n // Test the updateCustomer() method\n verify(customerDao, times(1)).updateCustomer(customerArgumentCaptor.getValue());\n assertEquals(customer, customerArgumentCaptor.getValue());\n }", "@Test\n\t// @Disabled\n\tvoid testUpdateCustomer() {\n\t\tCustomer customer1 = new Customer(1, \"tommy\", \"cruise\", \"951771122\", \"[email protected]\");\n\t\tMockito.when(custRep.findById(1)).thenReturn(Optional.of(customer1));\n\t\tMockito.when(custRep.save(customer1)).thenReturn(customer1);\n\t\tCustomer persistedCust = custService.updateCustomer(1, customer1);\n\t\tassertEquals(1, persistedCust.getCustomerId());\n\t}", "public void setCustomer(\n @Nullable\n final String customer) {\n rememberChangedField(\"Customer\", this.customer);\n this.customer = customer;\n }", "protected void setCustomer(Customer customer) {\n this.customer = customer;\n }", "public void updateNewTandC(Integer vendorId, String userName);", "int updateByPrimaryKey(CustomerTag record);", "public void editCustomer() {\n int id = this.id;\n PersonInfo personInfo = dbHendler.getCustInfo(id);\n String name = personInfo.getName().toString().trim();\n String no = personInfo.getPhoneNumber().toString().trim();\n float custNo = personInfo.get_rootNo();\n String cUSTnO = String.valueOf(custNo);\n int fees = personInfo.get_fees();\n String fEES = Integer.toString(fees);\n int balance = personInfo.get_balance();\n String bALANCE = Integer.toString(balance);\n String nName = personInfo.get_nName().toString().trim();\n String startdate = personInfo.get_startdate();\n int areaID = personInfo.get_area();\n String area = dbHendler.getAreaName(areaID);\n person_name.setText(name);\n contact_no.setText(no);\n rootNo.setText(cUSTnO);\n monthly_fees.setText(fEES);\n balance_.setText(bALANCE);\n nickName.setText(nName);\n this.startdate.setText(startdate);\n // retrieving the index of element u\n int retval = items.indexOf(area);\n\n spinner.setSelection(retval);\n }", "public static int updateCustomer(int id, String name, String cnic,\r\n\t\t\tString phone, String address, int familySize, double monthlyIncome,\r\n\t\t\tdouble familyIncome, int status, String occupation) {\r\n\t\tConnection con = connection.Connect.getConnection();\r\n\t\tString query = \"Update customer SET customer_name = '\" + name\r\n\t\t\t\t+ \"',customer_cnic= '\" + cnic + \"',customer_address= '\"\r\n\t\t\t\t+ address + \"',customer_family_size= '\" + familySize\r\n\t\t\t\t+ \"',customer_phone ='\" + phone + \"',customer_monthly_income='\"\r\n\t\t\t\t+ monthlyIncome + \"',customer_family_income='\" + familyIncome\r\n\t\t\t\t+ \"',status= '\" + status + \"',occupation= '\" + occupation\r\n\t\t\t\t+ \"' WHERE customer_id= \" + id + \";\";\r\n\t\tint row = 0;\r\n\t\ttry {\r\n\t\t\tStatement st = con.createStatement();\r\n\t\t\trow = st.executeUpdate(query);\r\n\t\t\tif (row > 0) {\r\n\t\t\t\tSystem.out.println(\"Data is updated\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Data is not updated\");\r\n\t\t\t}\r\n\r\n\t\t\tst.close();\r\n\t\t\tcon.close();\r\n\r\n\t\t} catch (Exception ex) {\r\n\t\t\tlogger.error(\"\", ex);\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn row;\r\n\t}", "public void setCustomerId(Long customerId) {\n this.customerId = customerId;\n }", "@Override\n\tpublic void saveCustomer(Customer theCustomer) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// save the customer\n\t\tcurrentSession.saveOrUpdate(theCustomer);\n\t\t//currentSession.save(theCustomer);\n\t}", "public Customer createOrUpdateCustomer(final Customer customer) {\n checkNotNull(customer);\n\n String key = CustomerDbClient.computeKey(customer.getPhone(), customer.getName());\n Customer existing = dbClient.getById(key);\n if (existing == null) {\n return dbClient.putAndUpdateTimestamp(customer.toBuilder().setId(key).build());\n }\n\n List<Address> newAddresses = customer.getAddressesList()\n .stream()\n .filter(t -> !existing.getAddressesList().contains(t))\n .collect(Collectors.toList());\n\n Customer toUpdate = existing.toBuilder()\n .clearAddresses()\n .addAllAddresses(newAddresses) // The new address will be the default one.\n .addAllAddresses(existing.getAddressesList())\n .setDefaultAddressIndex(0)\n .build();\n\n return dbClient.putAndUpdateTimestamp(toUpdate);\n }", "public void updateSalerCustomerByDel(int uid) {\n\t\tthis.salerCustomerMapper.updateSalerCustomerByDel(uid);\n\t}", "public boolean updateCustomer() {\n\t\treturn false;\r\n\t}", "public CustomerProfileDTO editCustomerProfile(CustomerProfileDTO customerProfileDTO)throws EOTException;", "public void customerAddressChange(short w, short d, int c)\n throws SQLException\n {\n PreparedStatement customerAddressChange = prepareStatement(\n \"UPDATE CUSTOMER \" +\n \"SET C_STREET_1 = ?, C_STREET_2 = ?, \" +\n \"C_CITY = ?, C_STATE = ?, C_ZIP = ? \" +\n \"WHERE C_W_ID = ? AND C_D_ID = ? AND C_ID = ?\");\n \n customerAddressChange.setString(1, rand.randomAString10_20()); // c_street_1\n customerAddressChange.setString(2, rand.randomAString10_20()); // c_street_2\n customerAddressChange.setString(3, rand.randomAString10_20()); // c_city\n customerAddressChange.setString(4, rand.randomState()); // c_state\n customerAddressChange.setString(5, rand.randomZIP()); // c_zip\n \n customerAddressChange.setShort(6, w);\n customerAddressChange.setShort(7, d);\n customerAddressChange.setInt(8, c);\n \n customerAddressChange.executeUpdate();\n \n reset(customerAddressChange);\n \n conn.commit();\n \n }", "public void setCustomerId(long value) {\n this.customerId = value;\n }", "@Override\n\tpublic void saveCustomer(Customer theCustomer){\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n//\t\tcurrentSession.createQuery(\"from Customer c where c.firstName=\"+ theCustomer.getFirstName()).executeUpdate();\n\n\t\tQuery<Customer> query =\n\t\t\t\tcurrentSession.createQuery(\"select c from Customer c \"+\n\t\t\t\t\t\t\t\t\"where c.firstName =:theCustomerFirstName and \" +\n\t\t\t\t\t\t\t\t\"c.lastName =:theCustomerLastName and \" +\n\t\t\t\t\t\t\t\t\"c.email=:theCustomerEmail\",\n\t\t\t\t\t\t Customer.class);\n\n\t\t// set parameter on query\n\t\tquery.setParameter(\"theCustomerFirstName\", theCustomer.getFirstName());\n\t\tquery.setParameter(\"theCustomerLastName\", theCustomer.getLastName());\n\t\tquery.setParameter(\"theCustomerEmail\", theCustomer.getEmail());\n\n\t\ttry {\n\t\t\t// execute query and get instructor\n\t\t\tCustomer temp = query.getSingleResult();\n\t\t}\n\t\tcatch (Exception exe){\n\t\t\tlogger.log(Level.INFO,\"Already exists!!\");\n\t\t\tcurrentSession.saveOrUpdate(theCustomer);\n\t\t}\n\t}" ]
[ "0.87376624", "0.8472092", "0.8274566", "0.8170891", "0.8145405", "0.80692047", "0.8065902", "0.80265105", "0.80265105", "0.7989204", "0.7979382", "0.7961355", "0.792467", "0.785077", "0.7815211", "0.7793142", "0.77847004", "0.7753139", "0.77140355", "0.77116793", "0.7709141", "0.7708886", "0.76793265", "0.7651658", "0.7650251", "0.7581116", "0.75672174", "0.75370985", "0.7532644", "0.74865055", "0.7479652", "0.74644977", "0.74420476", "0.74356675", "0.73844683", "0.7347573", "0.73398757", "0.73369974", "0.7315092", "0.73023474", "0.7275865", "0.7238338", "0.72128075", "0.7195393", "0.7192333", "0.7192142", "0.71851486", "0.7171442", "0.7154634", "0.71529365", "0.7150894", "0.7125153", "0.7116736", "0.7089936", "0.70436513", "0.70071703", "0.69882953", "0.69604695", "0.69284505", "0.6910948", "0.6908147", "0.6890163", "0.68858963", "0.68856406", "0.6881212", "0.6880419", "0.68681335", "0.6824406", "0.68227047", "0.68153083", "0.6812428", "0.68030125", "0.68018854", "0.67976284", "0.67878103", "0.6774063", "0.67637473", "0.6758919", "0.6742491", "0.6723236", "0.67136765", "0.6701668", "0.6687939", "0.6681889", "0.6679084", "0.66753465", "0.6660278", "0.6658871", "0.66547316", "0.6652092", "0.66454643", "0.6642853", "0.6638586", "0.6620744", "0.66180897", "0.66049004", "0.6602097", "0.65884864", "0.6585373", "0.6585134", "0.65794694" ]
0.0
-1