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
///////////////////////////////////////////////////////////////////////////////////used for forward chaining only ///////////////////////////////////////////////////////////////////////select a rule to fire based on specificity
public Rule selectRule(Vector ruleSet) { Enumeration enum2 = ruleSet.elements() ; long numClauses ; Rule nextRule ; Rule bestRule = (Rule)enum2.nextElement() ; long max = bestRule.numAntecedents() ; while (enum2.hasMoreElements()) { nextRule = (Rule)enum2.nextElement() ; if ((numClauses = nextRule.numAntecedents()) > max) { max = numClauses ; bestRule = nextRule ; } } return bestRule ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Rule honorRules(InstanceWaypoint context){\n \t\t\n \t\tStyle style = getStyle(context);\n \t\tRule[] rules = SLD.rules(style);\n \t\t\n \t\t//do rules exist?\n \t\t\n \t\tif(rules == null || rules.length == 0){\n \t\t\treturn null;\n \t\t}\n \t\t\n \t\t\n \t\t//sort the elserules at the end\n \t\tif(rules.length > 1){\n \t\t\trules = sortRules(rules);\n \t\t}\n \t\t\n \t\t//if rule exists\n \t\tInstanceReference ir = context.getValue();\n \t\tInstanceService is = (InstanceService) PlatformUI.getWorkbench().getService(InstanceService.class);\n \t\tInstance inst = is.getInstance(ir);\n \t\t\t\n \t\tfor (int i = 0; i < rules.length; i++){\n \t\t\t\n \t\t\tif(rules[i].getFilter() != null){\t\t\t\t\t\t\n \t\t\t\t\n \t\t\t\tif(rules[i].getFilter().evaluate(inst)){\n \t\t\t\t\treturn rules[i];\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t//if a rule exist without a filter and without being an else-filter,\n \t\t\t//the found rule applies to all types\n \t\t\telse{\n \t\t\t\tif(!rules[i].isElseFilter()){\n \t\t\t\t\treturn rules[i];\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t\t//if there is no appropriate rule, check if there is an else-rule\n \t\tfor (int i = 0; i < rules.length; i++){\n \t\t\tif(rules[i].isElseFilter()){\n \t\t\t\treturn rules[i];\n \t\t\t}\n \t\t}\n \t\t\n \t \n \t\t//return null if no rule was found\n \t\treturn null;\n \t\n \t}", "private void actOnRules() {\r\n\r\n\t\tfor(String key: myRuleBook.keySet())\r\n\t\t{\r\n\r\n\t\t\tRule rule = myRuleBook.get(key);\r\n\t\t\tSpriteGroup[] obedients = myRuleMap.get(rule);\r\n\r\n\t\t\tif(rule.isSatisfied(obedients))\r\n\t\t\t{\r\n\t\t\t\trule.enforce(obedients);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void visit(FuncallExpression node) {\n Expression fct = node.getFunction();\n if (!(fct instanceof Identifier) || !((Identifier) fct).getName().equals(\"rule\")) {\n return;\n }\n\n boolean firstArg = true;\n for (Argument.Passed arg : node.getArguments()) {\n if (!\"implementation\".equals(arg.getName()) && (!firstArg || arg.isKeyword())) {\n firstArg = false;\n continue;\n }\n firstArg = false;\n Expression val = arg.getValue();\n if (val instanceof Identifier) {\n ruleImplSet.add(((Identifier) val).getName());\n }\n }\n }", "private void applyTheRule() throws Exception {\n System.out.println();\n System.out.println();\n System.out.println();\n System.out.println(\"IM APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n System.out.println();\n if (parameter.rule.equals(\"1\")) {\n Rule1.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"2\")) {\n Rule2.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3\")) {\n Rule3.all(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3a\")) {\n Rule3.a(resultingModel);\n\n }\n\n if (parameter.rule.equals(\"3b\")) {\n Rule3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"3c\")) {\n Rule3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"4\")) {\n Rule4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"4a\")) {\n Rule4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"4b\")) {\n Rule4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"4c\")) {\n Rule4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r1\")) {\n Reverse1.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r2\")) {\n Reverse2.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3\")) {\n Reverse3.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3a\")) {\n Reverse3.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3b\")) {\n Reverse3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3c\")) {\n Reverse3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4\")) {\n Reverse4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4a\")) {\n Reverse4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4b\")) {\n Reverse4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4c\")) {\n Reverse4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"5\")){\n Rule5.apply(resultingModel);\n }\n\n System.out.println(\"IM DONE APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n\n this.resultingModel.addRule(parameter);\n //System.out.println(this.resultingModel.name);\n this.resultingModel.addOutputInPath();\n }", "@Override\n\tpublic void reportRuleInvocation(Rule rule, Triple triple, DataObject dataObject) {\n\t\t\n\t}", "Rule getRule();", "public T caseRule(Rule object)\n {\n return null;\n }", "protected abstract Class<? extends ValidationRule> ruleBeingTested();", "public TypeCheckerProofRule getRule ( ) ;", "boolean handlesEventsOfType(RuleEventType type);", "protected RedirectRule loadRule(Element elem) {\r\n\t\t\r\n\t\t// Ignore if required attributes are missing\r\n\t\tif (!elem.hasAttribute(\"match\"))\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tString action = elem.getTagName();\r\n\t\t\r\n\t\tif (action.equals(\"forward\")) {\r\n\t\t\tForwardAction rule = new ForwardAction();\r\n\t\t\tif (!elem.hasAttribute(\"target\")) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\trule.match = Pattern.compile(elem.getAttribute(\"match\"));\r\n\t\t\trule.target = elem.getAttribute(\"target\");\r\n\t\t\t\r\n\t\t\trule.localAddress = elem.hasAttribute(\"local-address\")? \r\n\t\t\t\t\telem.getAttribute(\"local-address\") : null;\r\n\t\t\trule.remoteRange = elem.hasAttribute(\"remote-address\")?\r\n\t\t\t\t\telem.getAttribute(\"remote-address\") : null;\r\n\t\t\t\r\n\t\t\treturn rule;\r\n\t\t}\r\n\t\t\t\t\r\n\t\tif (action.equals(\"redirect\")) {\r\n\t\t\tRedirectAction rule = new RedirectAction();\r\n\t\t\tif (!elem.hasAttribute(\"target\")) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\trule.match = Pattern.compile(elem.getAttribute(\"match\"));\r\n\t\t\trule.target = elem.getAttribute(\"target\");\r\n\t\t\t\r\n\t\t\trule.localAddress = elem.hasAttribute(\"local-address\")? \r\n\t\t\t\t\telem.getAttribute(\"local-address\") : null;\r\n\t\t\trule.remoteRange = elem.hasAttribute(\"remote-address\")?\r\n\t\t\t\t\telem.getAttribute(\"remote-address\") : null;\r\n\t\t\t\r\n\t\t\trule.permanent = elem.hasAttribute(\"permanent\")?\r\n\t\t\t\t\telem.getAttribute(\"permanent\").equals(\"yes\") : false;\r\n\t\t\trule.encodeUrl = elem.hasAttribute(\"encode-url\")? \r\n\t\t\t\t\telem.getAttribute(\"encode-url\").equals(\"yes\") : false;\r\n\t\t\trule.entireUrl = elem.hasAttribute(\"entire-url\")?\r\n\t\t\t\t\telem.getAttribute(\"entire-url\").equals(\"yes\") : false;\r\n\t\t\trule.cache = elem.hasAttribute(\"cache\")?\r\n\t\t\t\t\telem.getAttribute(\"cache\") : null;\r\n\r\n\t\t\treturn rule;\r\n\t\t}\r\n\t\t\r\n\t\tif (action.equals(\"ignore\")) {\r\n\t\t\tIgnoreAction rule = new IgnoreAction();\r\n\t\t\t\r\n\t\t\trule.match = Pattern.compile(elem.getAttribute(\"match\"));\r\n\t\t\t\r\n\t\t\trule.localAddress = elem.hasAttribute(\"local-address\")? \r\n\t\t\t\t\telem.getAttribute(\"local-address\") : null;\r\n\t\t\trule.remoteRange = elem.hasAttribute(\"remote-address\")?\r\n\t\t\t\t\telem.getAttribute(\"remote-address\") : null;\r\n\t\t\treturn rule;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "boolean exactMatch(FlowRule rule);", "protected abstract Builder processSpecificRoutingRule(Builder rb);", "public interface Rule {\n\n /**\n * Process this security event and detects whether this represents a security breach from the perspective of this rule\n * \n * @param event\n * event to process\n * @return security breach - either a breach or not (could be delayed)\n */\n SecurityBreach isSecurityBreach(SecurityEvent event);\n\n /**\n * Detects whether this rule is applicable in the in-passed security mode. Each rule guarantees to return the very same value of this method at\n * runtime. E.g. if this method returns true for an instance, it is guaranteed it will always return true within the lifecycle of this object\n * \n * @param securityMode\n * security mode to test applicability of this rule against\n * @return true if so, false otherwise\n */\n boolean isApplicable(SecurityMode securityMode);\n\n /**\n * Detects whether this rule is enabled or not\n * \n * @return true if so, false otherwise\n */\n boolean isEnabled();\n\n /**\n * Get human readable description of this rule. It should be a unique string compared to all other rules\n * \n * @return unique description of this rule\n */\n String getDescription();\n\n /**\n * Gets Unique ID of this Rule\n * \n * @return integer identification of this rule\n */\n int getId();\n\n /**\n * Update this rule based on the in-passed rule detail (e.g. whether it is enabled, etc)\n * \n * @param ruleDetail\n * rule detail to use to update this rule\n */\n void updateFrom(RuleDetail ruleDetail);\n}", "@Override\r\n\tpublic void rule1() {\n\t\tSystem.out.println(\"인터페이스 ISports1메소드 --> rule()\");\r\n\t}", "private void parseRule(Node node) {\r\n if (switchTest) return;\r\n parse(node.right());\r\n }", "void setRule(Rule rule);", "protected void processTemporalRule(){\n RuleThread currntThrd;\n Thread currntThrdParent; // the parent of the current thread;\n int currntOperatingMode;\n int currntThrdPriority ;\n\n if( temporalRuleQueue.getHead()!= null){\n\n //If the rule thread is the top level, trigger the rule.\n currntThrd=temporalRuleQueue.getHead();\n while(currntThrd!= null){\n currntThrdPriority = currntThrd.getPriority ();\n currntThrdParent = currntThrd.getParent();\n\n if (currntThrd.getOperatingMode() == RuleOperatingMode.READY\n && !(currntThrd.getParent() == applThrd ||\n currntThrd.getParent().getClass().getName().equals(\"EventDispatchThread\")||\n currntThrd.getParent().getName ().equals (Constant.LEDReceiverThreadName)\n )){\n if(ruleSchedulerDebug)\n\t\t \t\t System.out.println(\"Changing mode of \"+currntThrd.getName()+\"from READY to EXE\");\n\n currntThrd.setOperatingMode(RuleOperatingMode.EXE);\n\t\t\t\t currntThrd.setScheduler(this);\n currntThrd.start();\n int rulePriority = 0;\n currntThrdParent = currntThrd;\n if(currntThrdParent instanceof RuleThread){\n rulePriority = currntThrd.getRulePriority();\n }\n currntThrd = currntThrd.next;\n while(currntThrd != null && currntThrd instanceof RuleThread &&\n currntThrd.getRulePriority() == rulePriority\n \t\t\t\t\t\t\t && currntThrd.getParent() == currntThrdParent ){\n if(ruleSchedulerDebug)\n \t\t\t System.out.print(\" start child thread =>\");\n\n currntThrd.print();\n currntThrd.setScheduler(this);\n if(\tcurrntThrd.getOperatingMode()== RuleOperatingMode.READY ){\n currntThrd.setOperatingMode(RuleOperatingMode.EXE);\n currntThrd.start();\n }\n \t\t\t\t\tcurrntThrd = currntThrd.next;\n }\n }\n // case 1.2:\n else if (currntThrd != null &&\tcurrntThrd.getOperatingMode() == RuleOperatingMode.EXE){\n \t\t\t\tcurrntThrd = currntThrd.next;\n\n }\n // case 1.3:\n\t\t\t\telse if (currntThrd != null && currntThrd.getOperatingMode() == RuleOperatingMode.WAIT){\n\t\t\t\t if(currntThrd.next == null){\n currntThrd.setOperatingMode(RuleOperatingMode.EXE);\n\n// ;\n // All its childs has been completed.\n // This currntThread's operating mode will be changed to FINISHED.\n }\n\t\t\t\t\telse{\n // check whether its neighbor is its child\n\t\t\t\t\t\tif(currntThrd.next.getParent() == currntThrdParent){\n if(ruleSchedulerDebug){\n\t \t\t\t\t\t System.out.println(\"\\n\"+currntThrd.getName()+\" call childRecurse \"+currntThrd.next.getName());\n\t\t \t\t\t\t\tcurrntThrd.print();\n }\n\n childRecurse(currntThrd, temporalRuleQueue);\n }\n }\n currntThrd = currntThrd.next;\n }\n // case 1.4:\n\t\t\t\telse if (currntThrd != null && currntThrd.getOperatingMode() == RuleOperatingMode.FINISHED){\n if(ruleSchedulerDebug){\n\t\t\t\t\t System.out.println(\"delete \"+currntThrd.getName() +\" rule thread from rule queue.\");\n\t\t\t\t\t\tcurrntThrd.print();\n }\n processRuleList.deleteRuleThread(currntThrd,temporalRuleQueue);\n \tcurrntThrd = currntThrd.next;\n }\n else{\n \t\t\t\tcurrntThrd = currntThrd.next;\n }\n }\n }\n }", "public void add_rule(Rule rule) throws Exception;", "private void applyRules(boolean install, FlowRule rule) {\n FlowRuleOperations.Builder ops = FlowRuleOperations.builder();\n\n ops = install ? ops.add(rule) : ops.remove(rule);\n flowRuleService.apply(ops.build(new FlowRuleOperationsContext() {\n @Override\n public void onSuccess(FlowRuleOperations ops) {\n log.trace(\"HP Driver: - applyRules onSuccess rule {}\", rule);\n }\n\n @Override\n public void onError(FlowRuleOperations ops) {\n log.trace(\"HP Driver: applyRules onError rule: \" + rule);\n }\n }));\n }", "public interface AlternateRule {\n\n /**\n * Returns true if the given activity and user preferences indicates that this rule\n * is matched, and therefore that the modifications dictated by this rule should be applied\n * @param userInterface\n * @param prefs\n * @return\n */\n boolean condition(UserInterface userInterface, UserPreferences prefs);\n\n /**\n * Returns a new user interface that should be used if <code>condition</code> evaluated\n * to true.\n * @param userInterface\n * @param prefs\n * @return\n */\n UserInterface modify(UserInterface userInterface, UserPreferences prefs);\n\n}", "public HashMap<String,Rule> get_rules_to_action() throws Exception;", "java.lang.String getRule();", "public interface Rule {\n \n /**\n * Determine if a rule meets all of its conditions.\n * @param OpSystem The overall system for this rule.\n * @return true if the rule meets its condition.\n */\n public boolean meetsCondition(OpSystem system);\n}", "@Override\n public void enterEveryRule(ParserRuleContext ctx) {\n\n }", "public void setRule(IRule rule)\n\t{\n\t\tthis.rule = rule;\n\t}", "public interface Rule {\r\n\r\n\tString getTargetedPropertyName();\r\n\tboolean hasFinished();\r\n\tObject nextValue();\r\n\tObject[] getValues();\r\n\tpublic void setValues(Object[] values);\r\n\t\r\n}", "public T caseQueryRule(QueryRule object)\n {\n return null;\n }", "Rule createRule();", "Rule createRule();", "Rule createRule();", "public void selectAction(){\r\n\t\t\r\n\t\t//Switch on the action to be taken i.e referral made by health care professional\r\n\t\tswitch(this.referredTo){\r\n\t\tcase DECEASED:\r\n\t\t\tisDeceased();\r\n\t\t\tbreak;\r\n\t\tcase GP:\r\n\t\t\treferToGP();\r\n\t\t\tbreak;\r\n\t\tcase OUTPATIENT:\r\n\t\t\tsendToOutpatients();\r\n\t\t\tbreak;\r\n\t\tcase SOCIALSERVICES:\r\n\t\t\treferToSocialServices();\r\n\t\t\tbreak;\r\n\t\tcase SPECIALIST:\r\n\t\t\treferToSpecialist();\r\n\t\t\tbreak;\r\n\t\tcase WARD:\r\n\t\t\tsendToWard();\r\n\t\t\tbreak;\r\n\t\tcase DISCHARGED:\r\n\t\t\tdischarge();\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t\r\n\t\t}//end switch\r\n\t}", "public void setRule(int rule) {\n\t\tthis.rule = rule;\n\t}", "@Override\n public R visit(Rule n, A argu) {\n R _ret = null;\n n.consequent.accept(this, argu);\n n.nodeToken.accept(this, argu);\n n.antecedent.accept(this, argu);\n return _ret;\n }", "@Test\n\tpublic void testSimpleRuleTest() {\n\t\tSkRuleBase rule = buildThings(ONE_RULE_FILE_NAME, SkRuleBase.class, \"rule\");\n\t}", "@Test\n public void testFromFollowedByQuery() throws Exception {\n final String text = \"rule X when Cheese() from $cheesery ?person( \\\"Mark\\\", 42; ) then end\";\n RuleDescr rule = ((RuleDescr) (parse(\"rule\", text)));\n TestCase.assertFalse(parser.getErrors().toString(), parser.hasErrors());\n PatternDescr pattern = ((PatternDescr) (getDescrs().get(0)));\n TestCase.assertEquals(\"Cheese\", pattern.getObjectType());\n TestCase.assertEquals(\"from $cheesery\", pattern.getSource().getText());\n TestCase.assertFalse(pattern.isQuery());\n pattern = ((PatternDescr) (getDescrs().get(1)));\n TestCase.assertEquals(\"person\", pattern.getObjectType());\n TestCase.assertTrue(pattern.isQuery());\n }", "public static void main(String[] args)\n {\n /*\n * Create a new loader with default factory.\n * \n * A factory will create all rule components when loader requires them\n * Default engine is used that creates all the default constructs in:\n * org.achacha.rules.compare\n * org.achacha.rules.condition\n * org.achacha.rules.action\n * \n * RulesEngineFactoryExtension can be used to extend a default factory while keeping existing constructs\n * for basic rules the default factory provides a wide variety of comparators and action elements\n * \n * The loader uses the factory to resolve where the rule parts are loaded from\n * There are several load types (file system, in-memory string, in-memory XML)\n * Here we will configure a simple in-memory string based loader and add the\n * conditions and actions from constants\n */\n RulesEngineLoaderImplMappedString loader = new RulesEngineLoaderImplMappedString(new RulesEngineFactory());\n \n // Add a simple rule and call it 'alwaysTrue', we will execute this rule using this name\n loader.addRule(\"alwaysTrue\", SIMPLE_RULE);\n \n /*\n * Create a rules engine that uses the loader and factory we just created\n * Normally these 3 objects would be someone retained so we don't have to re-parse the rules every execution\n * However this is a tutorial example\n */\n RulesEngine engine = new RulesEngine(loader);\n \n /////////////////////////// Everything above is initialization ///////////////////////////////////////\n \n /////////////////////////// Everything below is rule execution ///////////////////////////////////////\n /*\n * Now we need to have some input for the rule to process but since were are using constants in comparison we can just pass\n * an empty input model\n * \n * We use dom4j XML Element for input\n * \n * <request>\n * <input />\n * </request>\n */\n Element request = DocumentHelper.createElement(\"request\");\n request.addElement(\"input\");\n \n /*\n * RuleContext is an object that holds the input, output, event log, etc for a given rule execution\n * The engine can create a new context for us if we specify the input for the rule\n */\n RuleContext ruleContext = engine.createContext(request);\n \n /*\n * Now that we have set up our context we can execute the rule\n * Since we used addRule above and called this rule 'alwaysTrue', this is how we invoke this rule\n * \n * NOTE:\n * you can run multiple rules sequentially against the same context\n * some actions can modify input context and some conditions can check output context\n * so rules can depend on other rules\n */\n engine.execute(ruleContext, \"alwaysTrue\");\n \n /*\n * Display the output model\n * \n * Since the action we used is:\n * \n * <Action Operator='OutputValueSet'>\"\n * <Path>/result</Path>\"\n * <Value Source='Constant'><Data>yes</Data></Value>\"\n * </Action>\"\n * \n * We get the following output model:\n * <output><result>yes</result></output>\n * \n * NOTE: The path on the output action is always relative to the output element\n */\n System.out.println(\"Output Model\\n------------\");\n System.out.println(ruleContext.getOutputModel().asXML());\n }", "public void visit(BaseNode node) {\n String type = node.getTypeName();\n if (!nodeToSearch.contains(type))\n return;\n\n if (subRule.equals(\"wsdl\") || subRule.equals(\"xsd\")) {\n validWsdl(node, ctx);\n } else if (subRule.equals(\"process\")) {\n validProcess(node, ctx);\n }\n\n }", "public Optional<RewriteResult<A, ?>> one(final TypeRewriteRule rule) {\n return Optional.empty();\n }", "void checkRule(String rule) throws IOException;", "@Override\n public void apply(AsgQuery query, AsgStrategyContext context) {\n Stream.ofAll(this.elementSelector.apply(query))\n .forEach(selectedElement -> {\n Stream.ofAll(routings)\n .filter(routing -> routing.predicate.test(selectedElement))\n .toJavaOptional()\n .ifPresent(routing -> routing.getStrategy().apply(query, selectedElement, context));\n\n });\n }", "@Override\r\npublic void initRules(){\r\n\t\r\n}", "IRuleset add(IRuleset rule);", "public interface RuleConstruction extends SelectRule, DeleteRule, UpdateRule {\n\n /**\n * Check whether word is key-word\n *\n * @param word - word\n * @return false - word is not key-word\n * true - word is key-word\n */\n boolean isNotKeyWord(String word);\n\n /**\n * Check whether word is By-word\n *\n * @param currentIndex - word index\n * @param words - list of words\n * @return true - word is correct\n * false - word is not correct\n */\n boolean isByCorrect(int currentIndex, List<String> words);\n\n /**\n * Check whether word is And-word or Or-word\n *\n * @param currentIndex - word index\n * @param words - list of words\n * @return true - word is correct\n * false - word is not correct\n */\n boolean isAndOrCorrect(int currentIndex, List<String> words);\n\n /**\n * Check whether word is Between-word\n *\n * @param currentIndex - word index\n * @param words - list of words\n * @return true - word is correct\n * false - word is not correct\n */\n boolean isBetweenCorrect(int currentIndex, List<String> words);\n}", "protected DebugRuleElementMatch() {/* intentionally empty block */}", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }", "@Override public ParserRule getRule() { return rule; }" ]
[ "0.6521262", "0.589344", "0.5586065", "0.5578872", "0.5568958", "0.5556402", "0.54822", "0.54280233", "0.53585434", "0.53502023", "0.5321211", "0.53035873", "0.52756286", "0.5221392", "0.52130896", "0.51910686", "0.51556844", "0.5153068", "0.51519126", "0.512781", "0.51057535", "0.5069443", "0.5060927", "0.50543374", "0.5021858", "0.5009535", "0.49762756", "0.49509138", "0.49497908", "0.49497908", "0.49497908", "0.4946347", "0.49367076", "0.48960263", "0.48806128", "0.4878451", "0.48781213", "0.4876661", "0.4875053", "0.48495683", "0.48390138", "0.4809995", "0.48024386", "0.4785544", "0.47810403", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015", "0.4768015" ]
0.0
-1
TODO Autogenerated method stub
@Override protected void onResume() { super.onResume(); updateBt(BT_VIRUS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public List<String> getPageThemesByType(int id, int start, int maxCount) { String hql="from Trip t where t.sequence.id=? order by t.serviceScore"; List<Trip> ts=getSession().createQuery(hql).setParameter(0, id).list(); List<String> list=new ArrayList<String>(); for(int i=start;i<start+maxCount&&i<ts.size();i++){ String theme=ts.get(i).getThemeontrips().iterator().next().getTheme().getName(); if(!list.contains(theme)) list.add(theme); else maxCount++; } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public List<Theme> getThemeByName(String name) { String hql="from Theme t where t.name=?"; return getSession().createQuery(hql).setParameter(0, name).list(); }
{ "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
/ Time Complexity O(n) Space Complexity O(1) Kadane's Algorithim Maximum Sum
public static int maximumSubArray(int arr[]) { int sum=arr[0]; int maxSum = arr[0]; int n = arr.length; for(int i=1;i<n;i++) { sum = Math.max(sum+arr[i], arr[i]); maxSum = Math.max(maxSum, sum); } return maxSum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static int maxSum()\n {\n // Find array sum and i*arr[i] with no rotation\n int arrSum = 0; // Stores sum of arr[i]\n int currVal = 0; // Stores sum of i*arr[i]\n for (int i=0; i<arr.length; i++)\n {\n arrSum = arrSum + arr[i];\n currVal = currVal+(i*arr[i]);\n }\n\n // Initialize result as 0 rotation sum\n int maxVal = currVal;\n\n // Try all rotations one by one and find\n // the maximum rotation sum.\n for (int j=1; j<arr.length; j++)\n {\n currVal = currVal + arrSum-arr.length*arr[arr.length-j];\n if (currVal > maxVal)\n maxVal = currVal;\n }\n\n // Return result\n return maxVal;\n }", "public static int kadaneMaxSum(int[] nums) {\n if(nums == null || nums.length == 0) return -1;\n\n int maxSoFar = 0, maxEndingHere = 0;\n for(int i = 0; i < nums.length; i++) {\n maxEndingHere += nums[i];\n\n if(maxEndingHere < 0) {\n maxEndingHere = 0;\n } else if(maxSoFar < maxEndingHere) {\n maxSoFar = maxEndingHere;\n }\n }\n\n System.out.println(\"kadane the maxsum is \" + maxSoFar);\n return maxSoFar;\n }", "public kd kadenMaxSum(Integer [] arr){\n \n kd max = new kd();\n kd max_cur = new kd();\n kd result = new kd();\n \n for( int i =0; i<arr.length; i++ ){\n \n if(max_cur.sum < 0){\n max_cur.sum = arr[i];\n max_cur.i = i;\n max_cur.j = i;\n } else {\n max_cur.sum += arr[i];\n max_cur.j = i;\n }\n \n if(max_cur.sum>max.sum){\n max= max_cur;\n }\n System.out.println(\"Current max_cur \"+ max_cur.sum + \" max_cur.i \"+ max_cur.i + \" max_cur.j \"+ max_cur.j);\n System.out.println(\"Current max \"+ max.sum + \" max.i \"+ max.i + \" max.j \"+ max.j);\n }\n System.out.println(\"Max \"+ max.sum + \" max.i \"+ max.i + \" max.j \"+ max.j);\n result = max;\n \n return result;\n }", "private static int maxSum(int arr[]) {\n int sum = 0;\n Arrays.sort(arr);\n\n // Subtracting a1, a2, a3,....., a(n/2)-1,\n // an/2 twice and adding a(n/2)+1, a(n/2)+2,\n // a(n/2)+3,....., an - 1, an twice.\n for (int i = 0; i < arr.length / 2; i++) {\n sum -= (2 * arr[i]);\n sum += (2 * arr[arr.length - i - 1]);\n }\n\n return sum;\n }", "private static int maxSubSumN2(int[] a) {\n int maxSum = 0;\n\n for (int first = 0; first < a.length; first++) {\n int thisSum = 0;\n for (int i = first; i < a.length; i++) {\n thisSum += a[i];\n\n if (thisSum > maxSum) {\n maxSum = thisSum;\n }\n }\n }\n\n return maxSum;\n }", "public static int jKadaneAlgo(int A[], int n)\n\t{\n\t\t // initialize variables as first value in array\n\t\t int currentMax=A[0]; \n\t\t int maxSubarray=A[0]; \n\t\t for(int i=1; i<n; i++) \n\t\t { \n\t\t\t //compare the first element of array with the sum of first element of array and the iterating value of array\n\t\t\t currentMax=Math.max(A[i],(currentMax+A[i])); \n\t\t\t //keep updating the maxSubarray with highest value by comparing currentMax and maxSubArray\n\t\t\t maxSubarray=Math.max(maxSubarray,currentMax); \n\t\t }\n\t\t return maxSubarray;\n\t}", "public static int maxSum(int[] a, int k) \n {\n PriorityQueue<Integer> pq = new PriorityQueue<>(); \n for (int x : a) \n pq.add(x); \n \n // Do k negations by removing a minimum element k times \n while (k-- > 0) \n { \n // Retrieve and remove min element \n int temp = pq.poll(); \n \n // Modify the minimum element and add back \n // to priority queue \n temp *= -1; \n pq.add(temp); \n } \n \n // Compute sum of all elements in priority queue. \n int sum = 0; \n for (int x : pq) \n sum += x; \n return sum; \n }", "public static void main(String[] args) {\n int[] arr1 = { -10, 2, 2, -3, 14, -5, -23, 3, 7, -21};\n// for( int i = 0;i<K;i++){\n// arr[i] = sc.nextInt();\n// }\n int[] nums = getMaxSum(arr1);\n System.out.print(nums[0]);\n System.out.print(\" \");\n System.out.print(nums[1]);\n System.out.print(\" \");\n System.out.print(nums[2]);\n System.out.println();\n }", "private static int maxSubSumN(int[] a) {\n int maxSum = 0;\n int thisSum = 0;\n\n for (int i = 0; i < a.length; i++) {\n thisSum += a[i];\n\n if (thisSum > maxSum) {\n maxSum = thisSum;\n } else if (thisSum < 0) {\n thisSum = 0;\n }\n }\n\n return maxSum;\n }", "public int maxSumSubmatrix(int[][] matrix, int target) {\n int row = matrix.length;\n if(row==0)return 0;\n int col = matrix[0].length;\n int m = Math.min(row,col);\n int n = Math.max(row,col);\n //indicating sum up in every row or every column\n boolean colIsBig = col>row;\n int res = Integer.MIN_VALUE;\n for(int i = 0;i<m;i++){\n int[] array = new int[n];\n // sum from row j to row i\n for(int j = i;j>=0;j--){\n int val = 0;\n TreeSet<Integer> set = new TreeSet<Integer>();\n set.add(0);\n //traverse every column/row and sum up\n for(int k = 0;k<n;k++){\n array[k]=array[k]+(colIsBig?matrix[j][k]:matrix[k][j]);\n val = val + array[k];\n //use TreeMap to binary search previous sum to get possible result \n Integer subres = set.ceiling(val-target);\n if(null!=subres){\n res=Math.max(res,val-subres);\n }\n set.add(val);\n }\n }\n }\n return res;\n}", "static void miniMaxSum(int[] arr) {\n long minSum=0,maxSum=0;\n int temp=0;\n for(int k=0; k<arr.length-1; k++) {\n for(int i=0; i <arr.length-k-1;i++) {\n if(arr[i]>arr[i+1] ) {\n temp=arr[i];\n arr[i]=arr[i+1];\n arr[i+1]=temp;\n }\n }\n }\n for(int i=1;i<arr.length;i++){\n minSum+=arr[i-1];\n maxSum+=arr[i];\n }\n System.out.print(minSum+\" \"+maxSum);\n\n }", "private static int LargestSubArraySum(int[] array) {\n\t\tint maximumSum=0;\n\t\tfor(int i=0; i< array.length; i++) {\n\t\t\tfor(int j=i; j < array.length; j++) {\n\t\t\t\t\n\t\t\t\tint sum=0;\n\t\t\t\tfor(int k=i; k<= j; k++) \n\t\t\t\t\tsum += array[k];\n\t\t\t\t\n\t\t\t\tmaximumSum=Math.max(maximumSum, sum);\n\t\t\t} \n\t\t}\n\t\treturn maximumSum;\n\t}", "static int maxSubArraySum(int a[], int size)\n {\n int Cur_Max = a[0];\n int Prev_Max = a[0];\n \n for (int i = 1; i < size; i++)\n {\n //we want to know if the summition is increassing or not\n Prev_Max = Math.max(a[i], Prev_Max+a[i]);\n //Take Decision to change the value of the largest sum or not\n Cur_Max = Math.max(Cur_Max, Prev_Max);\n }\n return Cur_Max;\n }", "private static void findMaxSumMatrix(int[][] matrix) {\n int maxSum = Integer.MIN_VALUE;\n int row = 0;\n int col = 0;\n for (int rows = 0; rows <matrix.length - 2; rows++) {\n for (int column = 0; column <matrix[rows].length - 2; column++) {\n int currentItem = matrix[rows][column];\n int neighborItem = matrix[rows][column + 1];\n int nextNeighborItem = matrix[rows][column + 2];\n\n int currentDownNeighborItem = matrix[rows + 1][column];\n int downNeighborItem = matrix[rows + 1][column + 1];\n int nextDownNeighborItem = matrix[rows + 1][column + 2];\n\n int lastItem = matrix[rows + 2][column];\n int lastNeighborItem = matrix[rows + 2][column + 1];\n int nextLastNeighborItem = matrix[rows + 2][column + 2];\n\n int sum = getSum(currentItem, neighborItem, nextNeighborItem, currentDownNeighborItem, downNeighborItem, nextDownNeighborItem, lastItem, lastNeighborItem, nextLastNeighborItem);\n\n if(maxSum <=sum){\n maxSum = sum;\n row = rows;\n col = column;\n }\n }\n }\n System.out.println(\"Sum = \" + maxSum);\n System.out.printf(\"%s %s %s\\n\",matrix[row][col], matrix[row][col + 1],matrix[row][col + 2]);\n System.out.printf(\"%s %s %s\\n\",matrix[row + 1][col],matrix[row + 1][col + 1], matrix[row + 1][col + 2]);\n System.out.printf(\"%s %s %s\",matrix[row + 2][col], matrix[row + 2][col + 1], matrix[row + 2][col + 2]);\n }", "int maxSubarraySum(int arr[], int n){\n \n // Your code here\n int max = Integer.MIN_VALUE, curr = 0; \n \n for (int i = 0; i < n; i++) { \n curr = curr + arr[i]; \n if (max < curr) \n max = curr; \n if (curr < 0) \n curr = 0; \n } \n return max;\n }", "int maxSubarraySum(int arr[], int n){\n \n // Your code here\n int cursum = arr[0];\n int osum = arr[0];\n \n for(int i=1;i<n;i++){\n if(cursum>=0){\n cursum+=arr[i];\n }else{\n cursum=arr[i];\n }\n if(cursum>osum){\n osum=cursum;\n }\n }\n return osum;\n \n }", "public int solution(int[] A) {\n int N = A.length;\r\n int[] s1 = new int[N];\r\n int[] s2 = new int[N];\r\n \r\n for (int i = 1; i < N - 1; i++)\r\n {\r\n s1[i] = Math.max(0, s1[i - 1] + A[i]);\r\n }\r\n \r\n for (int i = N - 2; i > 0; i--)\r\n {\r\n s2[i] = Math.max(0, s2[i + 1] + A[i]);\r\n }\r\n \r\n int max = 0;\r\n \r\n for (int i = 1; i < N - 1; i++)\r\n {\r\n max = Math.max(max, s1[i - 1] + s2[i + 1]);\r\n }\r\n \r\n return max;\r\n }", "public static void main(String[] args) {\n\t\tint[] a = { -2, -3, 4, -1, -2, 1, 5, -3 }; \n\t\t int size = a.length; \n\t int max_so_far = Integer.MIN_VALUE, max_ending_here=0;\n\t for (int i = 0; i < size; i++) { \n\t max_ending_here = max_ending_here + a[i]; \n\t if (max_so_far < max_ending_here) \n\t max_so_far = max_ending_here; \n\t if (max_ending_here < 0) \n\t max_ending_here = 0; \n\t } \n\t // System.out.println(max_so_far);\n\t int product=1,max=0;\n\t for (int i = 0; i < size; i++) {\n\t \t\n\t \tproduct=product*a[i];\n\t \tif(product>max)\n\t \t\tmax=product;\n\t \t if (product < 0) \n\t \t\t product = 1; \n\t \t\n\t }\n\t // System.out.println(max);\n\t \n\t Arrays.sort(a);\n\t int i=0,j=a.length-1;\n\t while(i<a.length &&j<a.length)\n\t {\n\t \t if(a[i]+a[j]==3)\n\t \t {\n\t \t\t System.out.println(a[i]+\" \"+a[j]);\n\t \t\t i++;j--;\n\t \t }\n\t \t else if(a[i]+a[j]>3)\n\t \t\t j--;\n\t \t else if(a[i]+a[j]<3)\n\t \t\t i++;\n\t }\n\t \n\t \n\t }", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint a[] = {2,1,3,-4,-2};\n\t\t//int a[] = {1 ,2, 3, 7, 5};\n\t\tboolean found = false;\n\t\t\n\t\t//this will solve in o n^2\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\tint sum = 0;\n\t\t\tfor(int j = i ; j< a.length ; j++){\n\t\t\t\tsum += a[j] ;\n\t\t\t\tif(sum == 0){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(found)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t// link : https://www.youtube.com/watch?v=PSpuM9cimxA&list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s&index=49\n\t\tSystem.out.println(found + \" found\");\n\t\tfound = false;\n\t\t//solving with O of N with the help sets\n\t\t// x + 0 = y\n\t\tSet<Integer> set = new HashSet<>();\n\t\tint sum = 0;\n\t\tfor(int element : a){\n\t\t\tset.add(sum);\n\t\t\tsum += element;\n\t\t\tif(set.contains(sum)){\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t\tfound = false;\n\t\t// when the sum of subarray is K\n\t\t\n\t\t//solving with O of N with the help sets\n\t\t//x + k = y >>>\n\t\tSet<Integer> set1 = new HashSet<>();\n\t\tint k = 12;\n\t\tint summ = 0;\n\t\tfor(int element : a){\n\t\t\tset1.add(summ);\n\t\t\tsumm += element;\n\t\t\tif(set1.contains(summ - k)){ // y - k = x(alredy presnt or not)\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(set1);\n\t\tSystem.out.println();\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t}", "static int findMaxSum(Node node){\n Res res = new Res();\n res.value = Integer.MIN_VALUE;\n findmaxUtil(node,res);\n return res.value;\n }", "public int[] solution(int N, int[] A) {\n int maxSum = 0, max = 0;\n int[] resultArr = new int[N];\n for (int a : A) {\n if (1 <= a && a <= N) {\n // 모든 값에 적용 되어야 하는 maxSum 값보다 작으면, maxSum 값이 적용되지 않은 것이다.\n // 이 경우, maxSum 값을 적용 하고, +1 값을 해준다.\n // 그 외의 경우, 현 값에 +1 만 해주면 된다.\n if (resultArr[a - 1] < maxSum) {\n resultArr[a - 1] = (maxSum + 1);\n } else {\n resultArr[a - 1] += 1;\n }\n // 현 resultArr 배열 에서의 최대값 max 를 구한다\n if (max < resultArr[a - 1]) {\n max = resultArr[a - 1];\n }\n } else if (a == N + 1) {\n // 모든 resultArr 에 적용 되어야 하는 maxSum 값으로 적용 시킨다\n maxSum = max;\n }\n }\n // result[i] 가 maxSum 값 미만 이라는 것은, 위에서 해당 index 에 maxSum 값을 반영 해주지 않았음 을 의미(+변화가 없었음)\n // 해당 index 에 maxSum 값을 반영 해주면 된다.\n for (int i = 0; i < resultArr.length; i++) {\n if (resultArr[i] < maxSum) {\n resultArr[i] = maxSum;\n }\n }\n return resultArr;\n }", "static\nint\nfindMaxSum(\nint\n[]arr, \nint\nn) \n\n{ \n\n\n// Array to store prefix sum. \n\nint\n[]preSum = \nnew\nint\n[n]; \n\n\n// Array to store suffix sum. \n\nint\n[]suffSum = \nnew\nint\n[n]; \n\n\n// Variable to store maximum sum. \n\nint\nans = \nint\n.MinValue; \n\n\n// Calculate prefix sum. \n\npreSum[0] = arr[0]; \n\nfor\n(\nint\ni = 1; i < n; i++) \n\npreSum[i] = preSum[i - 1] + arr[i]; \n\n\n// Calculate suffix sum and compare \n\n// it with prefix sum. Update ans \n\n// accordingly. \n\nsuffSum[n - 1] = arr[n - 1]; \n\n\nif\n(preSum[n - 1] == suffSum[n - 1]) \n\nans = Math.Max(ans, preSum[n - 1]); \n\n\nfor\n(\nint\ni = n - 2; i >= 0; i--) \n\n{ \n\nsuffSum[i] = suffSum[i + 1] + arr[i]; \n\n\nif\n(suffSum[i] == preSum[i]) \n\nans = Math.Max(ans, preSum[i]); \n\n} \n\n\nreturn\nans; \n\n}", "public static int maxSumForConsecutiveElements(int[] array, int k) {\r\n int length = array.length;\r\n\r\n // O(n)\r\n for (int i = 0; i < length - 1; i++) {\r\n array[i + 1] += array[i];\r\n }\r\n\r\n int maxSum = 0;\r\n int startIndex = k - 1;\r\n // O(n)\r\n for (int i = startIndex; i < length; i++) {\r\n int firstElementIndex = i - startIndex;\r\n int currentSum;\r\n\r\n if (firstElementIndex == 0) {\r\n maxSum = array[i];\r\n continue;\r\n } else {\r\n currentSum = array[i] - array[firstElementIndex - 1];\r\n }\r\n\r\n if (currentSum > maxSum) {\r\n maxSum = currentSum;\r\n }\r\n }\r\n\r\n return maxSum;\r\n }", "static int maxSubsetSum(int[] arr) {\n int n = arr.length;\n int[] dp = new int[n];\n dp[0] = arr[0];\n dp[1] = Math.max(arr[0], arr[1]);\n\n for (int i = 2; i < n; ++i) {\n dp[i] = Math.max(dp[i - 2], Math.max(dp[i - 2] + arr[i], Math.max(dp[i - 1], arr[i])));\n }\n\n return dp[n - 1];\n }", "private static int MaxSubarraySum(int[] a) {\n\t\t\n\t\tint max_so_for =Integer.MIN_VALUE;\n\t\tint max_ending_here = 0;;\n\t\t\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\tmax_ending_here = max_ending_here + a[i];\n\t\t\t\n\t\t\tif(max_so_for < max_ending_here )\n\t\t\t\tmax_so_for = max_ending_here;\n\t\t\tif(max_ending_here < 0)\n\t\t\t\tmax_ending_here = 0;\n\t\t}\n\t\t\n\t\treturn max_so_for;\n\t}", "private int FindMaxSum(int[] arr, int length) {\r\n\t\t\r\n\t\tint incl = arr[0];\r\n\t\tint excl = 0;\r\n\t\tint excl_new = 0;\r\n\t\t\r\n\t\tfor(int i = 1;i<arr.length;i++)\r\n\t\t{\r\n\t\t\texcl_new = (incl > excl) ? incl : excl;\r\n\t\t\t \r\n /* current max including i */\r\n incl = excl + arr[i];\r\n excl = excl_new;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn excl>incl?excl:incl;\r\n\t}", "private static int maxSubSumN3(int[] a) {\n int maxSum = 0;\n\n for (int first = 0; first < a.length; first++) {\n for (int last = first; last < a.length; last++) {\n int thisSum = 0;\n\n for (int i = first; i <= last; i++)\n thisSum += a[i];\n\n if (thisSum > maxSum) {\n maxSum = thisSum;\n }\n }\n }\n\n return maxSum;\n }", "public static int example3(int[] arr) { // O(n)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n^2)\r\n\t\t\tfor (int k = 0; k <= j; k++) // loop from 0 to j\r\n\t\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Since we have nested for loop which dominates here and it is\r\n\t\t * O(n^2) and we always take the maximum. so the answer is quadratic time O(n^2)\r\n\t\t * \r\n\t\t */\r\n\t}", "private static double getTimeForMaxSubSumOf(int[] list) {\n long start = System.currentTimeMillis();\n maxSubSumN(list);\n long stop = System.currentTimeMillis();\n return (stop - start) / 1000.0;\n }", "public static long maximumSubarraySum_bf(int[] nums, int k) {\n int len = nums.length;\n\n long ans = 0;\n for (int i = 0; i <= len - k; i++) {\n long sum = 0;\n Set<Integer> set = new HashSet<>();\n for (int j = 0; j < k; j++) {\n if (set.contains(nums[i + j])) {\n sum = 0;\n break;\n }\n\n set.add(nums[i + j]);\n sum += nums[i + j];\n }\n\n ans = Math.max(ans, sum);\n }\n\n return ans;\n }", "public int maxSubArraySum(int[] nums) {\n int maxSoFar = 0;\n int maxEndingHere = 0;\n\n for (int i = 0; i < nums.length; i++) {\n maxEndingHere = maxEndingHere + nums[i];\n if (maxEndingHere > maxSoFar)\n maxSoFar = maxEndingHere;\n if (maxEndingHere < 0)\n maxEndingHere = 0;\n }\n return maxSoFar;\n }", "@Test\n\tpublic void when_provided_maximum_size_list_with_all_elements_that_can_be_added_then_return_sum_in_allowable_amount_of_time() {\n\t\tfinal int[] elements = Fixture.initializeRandomList(MAX_NUM_ELEMENTS, MIN_ELEMENT_SIZE, 5);\n\t\tfinal int elementSum = IntStream.of(elements).sum();\n\t\tfinal long startTime = System.currentTimeMillis();\n\n\t\tfinal int result = Knapsack.getOptimalWeight(elementSum, elements);\n\n\t\tassertThat(result, is(elementSum));\n\t\tassertThat(System.currentTimeMillis() - startTime < Fixture.MAX_ALLOWABLE_CALCULATION_TIME, is(true));\n\t}", "public static long maximumSubarraySum(int[] nums, int k) {\n int len = nums.length;\n\n long ans = 0;\n\n Map<Integer, Integer> map = new HashMap<>();\n long sum = 0;\n for (int i = 0, j = 0; j <= len; j++) {\n if (j - i == k) {\n if (map.size() == k) {\n ans = Math.max(ans, sum);\n }\n\n int cnt = map.getOrDefault(nums[i], 0);\n if (cnt > 1) {\n map.put(nums[i], cnt - 1);\n } else {\n map.remove(nums[i]);\n }\n sum -= nums[i];\n i++;\n }\n\n if (j == len) {\n break;\n }\n\n map.put(nums[j], map.getOrDefault(nums[j], 0) + 1);\n sum += nums[j];\n }\n\n return ans;\n }", "public static int maxProfit(int arr[]) {\n\t\t\n\t\tint mpif[]=new int[arr.length];\n\t\tint maxProfit=0;\n\t\tint minCurrent=Integer.MAX_VALUE;\n\t\t\n\t\t\n\t\tfor(int i=0;i<mpif.length;i++) {\n\t\t\t\n\t\t\tif(arr[i]<minCurrent) {\n\t\t\t\tminCurrent=arr[i];\n\t\t\t}\n\t\t\tif(arr[i]-minCurrent>maxProfit) {\n\t\t\t\tint tempProfit=arr[i]-minCurrent;\n\t\t\t\tmaxProfit=Math.max(maxProfit, tempProfit);\n\t\t\t\tmpif[i]=maxProfit;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmpif[i]=Math.max(maxProfit, arr[i]-minCurrent);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tint mpat=0;\n\t\tint currentMAx=arr[arr.length-1];\n\t\tint mpbf[]=new int[arr.length];\n\t\tfor(int i=arr.length-2;i>=0;i--) {\n\t\t\tif(arr[i]>currentMAx) {\n\t\t\t\tcurrentMAx=arr[i];\n\t\t\t}\n\t\t\tif(currentMAx-arr[i]>mpat) {\n\t\t\t\tint temp=currentMAx-arr[i];\n\t\t\t\tmpat=Math.max(mpat, temp);\n\t\t\t\tmpbf[i]=mpat;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmpbf[i]=Math.max(mpat, currentMAx-arr[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tint ans[]=new int[arr.length];\n\t\tint max_=0;\n\t\tfor(int i=0;i<ans.length;i++) {\n\t\t\tint sum=mpbf[i]+mpif[i];\n\t\t\tans[i]=sum;\n\t\t\tif(sum>max_) {\n\t\t\t\tmax_=sum;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i=0;i<ans.length;i++) {\n\t\t\tSystem.out.print(mpif[i]+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\tfor(int i=0;i<ans.length;i++) {\n\t\t\tSystem.out.print(mpbf[i]+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<ans.length;i++) {\n\t\t\tSystem.out.print(ans[i]+\" \");\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\treturn max_;\n\t\t\n\t\t\n\t\t\n\t}", "public static int maxSubsetSumNoAdjacent(int[] array) {\n\t\tint[] solution = array.clone();\n\t\t\n\t\t//edge cases\n\t\tif(array.length ==0){\n\t\t\treturn 0;\n\t\t}else if(array.length==1){\n\t\t\treturn array[0];\n\t\t}\n\t\t//base case\t\t\n\t\tsolution[1] = Math.max(array[0], array[1]);\n\t\t//Dynamic programming implemntation\n\t\tfor(int i=2; i< array.length; i++){\n\t\t\tsolution[i] = Math.max((solution[i-2] + array[i]), solution[i-1]);\n\t\t\t\n\t\t}\n return solution[array.length-1];\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt(), M = scanner.nextInt();\n int[][] graph = new int[N + 1][N + 1];\n\n for (int i = 0; i < M; i++) {\n int from = scanner.nextInt(), to = scanner.nextInt();\n int weight = scanner.nextInt();\n graph[from][to] = weight;\n }\n \n int[][][] dp = new int[N + 1][N + 1][N + 1];\n\n for (int i = 1; i <= N; i++) {\n for (int j = 1; j <= N; j++) {\n if (graph[i][j] != 0) {\n dp[0][i][j] = graph[i][j];\n } else {\n dp[0][i][j] = Integer.MAX_VALUE;\n }\n }\n }\n \n for (int k = 0; k <= N; k++) {\n for (int i = 1; i <= N; i++) {\n dp[k][i][i] = 0;\n }\n }\n\n for (int k = 1; k <= N; k++) {\n for (int i = 1; i <= N; i++) {\n for (int j = 1; j <= N; j++) {\n if (dp[k - 1][i][k] != Integer.MAX_VALUE && dp[k - 1][k][j] != Integer.MAX_VALUE) {\n dp[k][i][j] = Math.min(dp[k - 1][i][j], dp[k -1][i][k] + dp[k -1][k][j]);\n } else {\n dp[k][i][j] = dp[k - 1][i][j];\n }\n }\n }\n }\n\n int Q = scanner.nextInt();\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < Q; i++) {\n int from = scanner.nextInt(), to = scanner.nextInt();\n int res = dp[N][from][to] == Integer.MAX_VALUE ? -1 : dp[N][from][to];\n sb.append(res).append('\\n');\n }\n System.out.println(sb.toString());\n }", "private static Pair<Integer, Integer> getMaxSumHelper(Node root) {\n\t\t\n\t\tif(root.left_ == null && root.right_ == null) {\n\t\t\treturn new Pair<Integer, Integer>(root.data_, 0);\n\t\t}\n\t\t\n\t\tPair<Integer, Integer> lp = null;\n\t\tif(root.left_ != null) {\n\t\t\tlp = getMaxSumHelper(root.left_);\n\t\t}\n\t\t\n\t\tPair<Integer, Integer> rp = null;\n\t\tif(root.right_ != null) {\n\t\t\trp = getMaxSumHelper(root.right_);\n\t\t}\n\t\t\n\t\treturn new Pair<Integer, Integer>(\n\t\t\t\tlp.getValue()+rp.getValue()+root.data_, \t// root inclusiveSum + sum of children exclusiveSum\n\t\t\t\tlp.getKey()+rp.getKey());\t\t\t\t\t// root exclusiveSum -> sum of children inclusiveSum\n\t\t\n\t}", "public static int maxSubArraySum(int a[]) {\n\t\tint max_so_far = a[0];\n\t\tint curr_max = a[0];\n\n\t\tfor (int i = 1; i < a.length; i++) {\n\t\t\tcurr_max = Math.max(a[i], curr_max + a[i]);\n\t\t\tmax_so_far = Math.max(max_so_far, curr_max);\n\t\t}\n\t\treturn max_so_far;\n\t}", "public int maxSumSubmatrix(int[][] matrix, int k) {\n int res=Integer.MIN_VALUE; \n int rows=matrix.length, cols=matrix[0].length; \n int[][] areas=new int[rows][cols];\n for(int i=0; i<rows; i++){\n for(int j=0; j<cols; j++){\n int area=matrix[i][j];\n if(i>0) area+=areas[i-1][j];\n if(j>0) area+=areas[i][j-1];\n if(i>0 && j>0) area-=areas[i-1][j-1];\n areas[i][j]=area;\n }\n }\n \n for(int r1=0; r1<rows; r1++){\n for(int c1=0; c1<cols; c1++){\n for(int r2=r1; r2<rows; r2++){\n for(int c2=c1; c2<cols; c2++){\n int sec=areas[r2][c2];\n if(r1>0) sec-=areas[r1-1][c2];\n if(c1>0) sec-=areas[r2][c1-1];\n if(r1>0 && c1>0) sec+= areas[r1-1][c1-1];\n if(sec<=k) res=Math.max(sec, res);\n }\n }\n }\n }\n return res;\n }", "public int maxSumSubmatrix(int[][] matrix, int k) {\n int res=Integer.MIN_VALUE; \n int rows=matrix.length, cols=matrix[0].length; \n int[][] areas=new int[rows][cols];\n for(int i=0; i<rows; i++){\n for(int j=0; j<cols; j++){\n int area=matrix[i][j];\n if(i>0) area+=areas[i-1][j];\n if(j>0) area+=areas[i][j-1];\n if(i>0 && j>0) area-=areas[i-1][j-1];\n areas[i][j]=area;\n }\n }\n \n for(int r1=0; r1<rows; r1++){\n for(int r2=r1; r2<rows; r2++){\n TreeSet<Integer> set=new TreeSet<Integer>();\n set.add(0);\n for(int c=0; c<cols; c++){\n int sec=areas[r2][c];\n if(r1>0) sec-= areas[r1-1][c];\n Integer ceiling=set.ceiling(sec-k);\n if(ceiling!=null)\n res=Math.max(res, sec-ceiling);\n set.add(sec);\n }\n }\n }\n return res;\n }", "static long maxProduct(int[] arr, int n) {\n long maxproduct=arr[0], temp1=0, temp2=0;\n long mintillhere=arr[0], maxtillhere=arr[0];\n for(int i=1; i<n; i++){\n // if(arr[i] > 0){\n // product *= arr[i];\n // if(product > maxproduct) maxproduct = product;\n // System.out.println(\"Arr[i] \" + arr[i] + \"Product \" + product + \"maxproduct\" + maxproduct);\n // }\n \n // else if(arr[i] < 0){\n // if(negative*arr[i] > 0) {\n // product = negative*arr[i];\n // if(product > maxproduct) maxproduct = product;\n // System.out.println(\"Arr[i] \" + arr[i] + \"Product \" + product + \"Negative \" + negative + \"maxproduct \" + maxproduct);\n // negative=product;\n // }\n // else {\n // negative = product*arr[i];\n // product = 1; \n // System.out.println(\"Arr[i] \" + arr[i] + \"Product \" + product + \"Negative \" + negative);\n \n // }\n // }\n \n // else if(arr[i] == 0){\n // product = 1;\n // negative = 1;\n // } \n temp1 = maxtillhere*arr[i];\n temp2 = mintillhere*arr[i];\n maxtillhere = Math.max(arr[i], Math.max(temp1, temp2));\n mintillhere = Math.min(arr[i], Math.min(temp1, temp2));\n if(maxtillhere > maxproduct) maxproduct = maxtillhere;\n }\n return maxproduct;\n }", "int sumKOfLargest(int[] array, int k){\n int heapSize = array.length;\n int sum = 0;\n buildMaxHeap(array,heapSize);\n for(int i = 0; i< k ; i++){\n sum = sum+array[0];\n extractMax(array,heapSize);\n heapSize--;\n heapify(array,i,heapSize);\n }\n return sum;\n }", "public static int maxSum(int[] nums) {\n if(nums == null || nums.length == 0) return -1;\n\n int maxEndingHere = nums[0], maxSoFar = nums[0];\n for(int i = 1; i < nums.length; i++) {\n maxEndingHere = Math.max(maxEndingHere + nums[i], nums[i]);\n maxSoFar = Math.max(maxSoFar, maxEndingHere);\n }\n\n return maxSoFar;\n }", "int maxSum(int[] arr){\n\t\tint sum=0;\n\t\tint arrayMin = findMin(arr);\n\t\tfor (int i=0; i<arr.length; i++) {\n\t\t\tif (arr[i] != arrayMin) {\n\t\t\t\tsum += arr[i];\n\t\t\t}\n\t\t}\n\t\treturn sum;\n\t}", "static void miniMaxSum(int[] arr) {\n Arrays.sort(arr);\n long sum = 0;\n for (int i : arr) {\n sum += i;\n }\n System.out.println((sum - arr[4]) + \" \" + (sum - arr[0]));\n }", "static void miniMaxSum(int[] arr) {\n int min=arr[0];\n int max=0;\n long maxsum=0,minsum=0;\n for(int i:arr)\n {\n if(i<min)\n {\n min=i;\n }\n if(i>max)\n {\n max=i;\n }\n }\n for(int i:arr)\n {\n if(i==max)\n {\n max=0;\n continue;\n }\n else\n {\n minsum+=i;\n }\n }\n for(int i:arr)\n {\n if(i==min)\n {\n min=0;\n continue;\n }\n else\n {\n maxsum+=i;\n }\n }\n System.out.println(minsum+\" \"+maxsum);\n }", "public static double maxSubsequenceSum(double[] a) {\r\n\t\tdouble[] s = new double[a.length];\r\n\t\tdouble max = s[0] = a[0];\r\n\t\tfor (int i = 1; i < a.length; i++) {\r\n\t\t\ts[i] = s[i - 1] < 0 ? a[i] : s[i - 1] + a[i];\r\n\t\t\tmax = Math.max(max, s[i]);\r\n\t\t}\r\n\t\treturn max;\r\n\t}", "int maxSubarraySum(int arr[], int n)\r\n {\r\n int maxSoFar = Integer.MIN_VALUE;\r\n int currMax = 0;\r\n for(int i = 0; i < n; i++) {\r\n currMax = Math.max(arr[i], currMax+arr[i]);\r\n maxSoFar = Math.max(currMax, maxSoFar);\r\n }\r\n return maxSoFar;\r\n }", "public int solution(int[] A) {\n int sum = 0;\n int max = 0;\n Map<Integer, Integer> countMap = new HashMap<>();\n for (int i = 0; i < A.length; i++) {\n int val = Math.abs(A[i]);\n sum += val;\n A[i] = val;\n max = Math.max(val, max);\n countMap.put(val, countMap.getOrDefault(val, 0) + 1);\n }\n int[] dp = new int[sum + 1];\n for (int i = 1; i < dp.length; i++) {\n dp[i] = -1;\n }\n int[] count = new int[max + 1];\n for (Map.Entry<Integer, Integer> countMapEntry : countMap.entrySet()) {\n count[countMapEntry.getKey()] = countMapEntry.getValue();\n }\n for (int i = 1; i < max + 1; i++) {\n if (count[i] > 0) {\n for (int j = 0; j < dp.length; j++) {\n if (dp[j] >= 0) {\n dp[j] = count[i];\n } else if (j >= i && dp[j - i] > 0) {\n dp[j] = dp[j - i] - 1;\n }\n }\n }\n }\n int half = sum / 2;\n for (int i = half; i >= 0; i--) {\n if (dp[i] >= 0) {\n return Math.abs((sum - i) - i);\n }\n }\n return -1;\n }", "private int go(int a[]) {\n int n = a.length;\n int maxsofar = Integer.MIN_VALUE;\n int minsofar = Integer.MAX_VALUE;\n int curmin = 0, curmax = 0, total = 0;\n int ans = 0;\n\n for (int i = 0; i < n; i++) {\n curmax = Math.max(curmax + a[i], a[i]);\n curmin = Math.min(curmin + a[i], a[i]);\n maxsofar = Math.max(maxsofar, curmax);\n minsofar = Math.min(minsofar, curmin);\n total += a[i];\n }\n\n if (maxsofar > 0) {\n ans = Math.max(maxsofar, total - minsofar);\n } else {\n ans = maxsofar;\n }\n return ans;\n }", "public static int maxSumOfAdjancentElementsSubArray( int[] array ) {\n\t\tassertThat( array ).isNotNull();\n\n\t\tint arrLength = array.length;\n\n\t\tif( arrLength == 0 )\n\t\t\treturn 0;\n\t\tif( arrLength == 1 )\n\t\t\treturn array[0];\n\n\t\tint maximumSum = array[0];\n\t\tfor( int i = 1; i < arrLength; i++ ) {\n\n\t\t\tarray[i] = Math.max( array[i - 1] + array[i], array[i] );\n\t\t\tmaximumSum = maximumSum > array[i] ? maximumSum : array[i];\n\t\t}\n\n\t\treturn maximumSum;\n\t}", "public int maxFrequency2(int[] nums, int k) {\n Arrays.sort(nums);\n int i = 0;\n int j = 0;\n long sum = k;\n for (int n = nums.length; j < n; j++) {\n sum += nums[j];\n if (sum < (long)nums[j] * (j - i + 1)) {\n sum -= nums[i++];\n }\n }\n return j - i;\n }", "public int maxProduct(final List<Integer> A) {\n\t\t int maxTillNow = A.get(0);\n\t\t int minArrSumAtCurrPos = A.get(0);\n\t\t int maxArrSumAtCurrPos = A.get(0);\n\t\t \n\t\t for(int i=1;i<A.size();i++){\n\t\t\t int tmpMin = Math.min(A.get(i), Math.min(minArrSumAtCurrPos*A.get(i), maxArrSumAtCurrPos*A.get(i)));\n\t\t\t int tmpMax = Math.max(minArrSumAtCurrPos*A.get(i),Math.max(maxArrSumAtCurrPos*A.get(i),A.get(i)));\n\t\t\t \n\t\t\t minArrSumAtCurrPos = tmpMin;\n\t\t\t maxArrSumAtCurrPos = tmpMax;\n\t\t\t \n\t\t\t if(maxArrSumAtCurrPos > maxTillNow){\n\t\t\t\t maxTillNow = maxArrSumAtCurrPos;\n\t\t\t }\n\t\t }\n\t\t \n\t\t return maxTillNow;\n\t }", "public static void main(String[] args) {\n int[][] array = new int[6][6];\n int sum=0, result=0, sub=0;\n Scanner sc = new Scanner(System.in);\n //System.out.println(\"Enter array elements\")\n for(int x=0 ; x < 6; x++){\n for( int y=0; y < 6; y++) {\n array[x][y]= sc.nextInt();\n }\n }\n //System.out.println(\"Desired Sum : \")\n for( int k=0; k < 4; k++){\n for( int m=0; m < 4; m++){\n for ( int i=k; i < k+3; i++ ){\n int j=0; \n for ( j=m; j < m+3; j++){\n if( i != k+1){\n sum += array[i][j];\n }\n else{\n sum += array[i][j+1];\n break;\n }\n }\n }\n result = Math.max(result, sum);\n sum = 0; \n }\n }\n System.out.println(result);\n \n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int max = Integer.MIN_VALUE;\n int temp;\n int[][] array = new int[6][6];\n for(int i=0; i<6; i++){\n for(int j=0; j<6; j++){\n array[i][j] = sc.nextInt();\n }\n }\n for(int i=0;i<4;i++){\n for(int j=0;j<4;j++){\n temp = array[i][j] + array[i][j+1] + array[i][j+2]\n + array[i+1][j+1]\n + array[i+2][j] + array[i+2][j+1] + array[i+2][j+2];\n max = Math.max(temp,max);\n }\n }\n System.out.println(max);\n }", "public void maximize()\n\t{\n\t\tint i,j,max=cost[0][0];\n\t\t\n\t\tfor(i=0;i<n;i++)\n\t\t{\n\t\t\tfor(j=0;j<n;j++)\n\t\t\t{\n\t\t\t\tif(cost[i][j]>max)\n\t\t\t\t{\n\t\t\t\t\tmax=cost[i][j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(i=0;i<n;i++)\n\t\t{\n\t\t\tfor(j=0;j<n;j++)\n\t\t\t{\t\t\n\t\t\t\tcost[i][j]=max-cost[i][j];\n\t\t\t}\n\t\t}\n\t\t\n\t}", "int maxPathSum(int tri[][], int m, int n)\n {\n // loop for bottom-up calculation\n //i是row,j是column\n for (int i = m - 1; i >= 0; i--)\n {\n for (int j = 0; j <= i; j++)\n {\n // for each element, check both\n // elements just below the number\n // and below right to the number\n // add the maximum of them to it\n if (tri[i + 1][j] > tri[i + 1][j + 1])\n tri[i][j] += tri[i+1][j];\n else\n tri[i][j] += tri[i + 1][j + 1];\n }\n }\n\n // return the top element\n // which stores the maximum sum\n return tri[0][0];\n }", "public static int solution(int[] A, int k, int m) {\n int[] prefix = countingPrefixSums(A);\n\n int max = 0;\n for (int i = 0; i < Math.min(k, m); i++) {\n int first = k - i;\n int last = Math.max(k, Math.min(k + (m - i * 2), A.length - 1));\n max = Math.max(max, first > 0 ? prefix[last] - prefix[first - 1] : prefix[last]);\n }\n\n return max;\n }", "static int maximumDifferenceSum(int arr[], int N)\n {\n int dp[][] = new int [N][2];\n\n for (int i = 0; i < N; i++)\n dp[i][0] = dp[i][1] = 0;\n\n for (int i = 0; i< (N - 1); i++)\n {\n /* for [i+1][0] (i.e. current modified\n value is 1), choose maximum from\n dp[i][0] + abs(1 - 1) = dp[i][0] and\n dp[i][1] + abs(1 - arr[i]) */\n dp[i + 1][0] = Math.max(dp[i][0],\n dp[i][1] + Math.abs(1 - arr[i]));\n\n /* for [i+1][1] (i.e. current modified value\n is arr[i+1]), choose maximum from\n dp[i][0] + abs(arr[i+1] - 1) and\n dp[i][1] + abs(arr[i+1] - arr[i])*/\n dp[i + 1][1] = Math.max(dp[i][0] +\n Math.abs(arr[i + 1] - 1),\n dp[i][1] + Math.abs(arr[i + 1]\n - arr[i]));\n }\n\n return Math.max(dp[N - 1][0], dp[N - 1][1]);\n }", "public static int maxSubArrayO1(int[] nums) {\n int maxSum=nums[0];\n int sum=nums[0];\n for(int i=1;i<nums.length;i++){\n sum=sum+nums[i];\n sum=Math.max(sum,nums[i]);\n maxSum= Math.max(sum,maxSum);\n }\n return maxSum;\n }", "public static int solve() {\n FactorizationSieve sieve = new FactorizationSieve(LIMIT + 1);\n int[] abundants = new int[LIMIT + 1];\n int k = 0;\n\n for (int n = 1; n <= LIMIT; n++)\n if (sieve.sigma(1, n) > n + n)\n abundants[k++] = n;\n\n // Sum pair of abundant numbers\n BitSet absums = new BitSet(LIMIT + 1);\n for (int i = 0; i < k; i++) {\n for (int j = i; j < k; j++) {\n int n = abundants[i] + abundants[j];\n if (n > LIMIT)\n break;\n absums.set(n);\n }\n }\n\n // Find all numbers that cannot be written as the sum of two abundant numbers\n int res = 0;\n for (int n = 1; n <= LIMIT; n++)\n if (!absums.get(n))\n res += n;\n return res;\n }", "static int getMaxCoinValGeeks(int arr[], int n)\n {\n // Create a table to store solutions of subproblems\n int table[][] = new int[n][n];\n int gap, gapStartIndx, gapEndIndx, x, y, z;\n\n // Fill table using above recursive formula.\n // Note that the tableis filled in diagonal\n // fashion (similar to http://goo.gl/PQqoS),\n // from diagonal elements to table[0][n-1]\n // which is the result.\n for (gap = 0; gap < n; ++gap)\n {\n // both gapStartIndx and gapEndIndx are incremented in each loop iteration\n // for each gap, gapStartIndx keeps moving\n // gapEndIndx is always gap more than the gapStartIndx\n // when gap == 0, gapStartIndx = gapEndIndx\n // table[i,j] identifies the max value obtained by the player who picks first\n // first player = i to get val[i] , range of coins left = i+1, j\n // second player max value = table[i+1,j], range of coins left = i+2, j\n // first player max value = table[i+2,j]. So total value for player 1 is\n // val[i] + table[i+2, j]\n // first player picks j to get val[j], range of coins left i, j-1.\n // second player max = table[i, j-1] range of coins left i, j-2\n // first player max = table[i,j-2]\n // so for finding max value for a p\n for (gapStartIndx = 0, gapEndIndx = gap; gapEndIndx < n; ++gapStartIndx, ++gapEndIndx)\n {\n // Here x is value of F(i+2, j),\n // y is F(i+1, j-1) and z is\n // F(i, j-2) in above recursive formula\n // if gapStartIndx and gapEndIndx are two or more apart\n x = ((gapStartIndx + 2) <= gapEndIndx) ? table[gapStartIndx + 2][gapEndIndx] : 0;\n y = ((gapStartIndx + 1) <= (gapEndIndx - 1)) ? table[gapStartIndx +1 ][gapEndIndx - 1] : 0;\n z = (gapStartIndx <= (gapEndIndx - 2)) ? table[gapStartIndx][gapEndIndx - 2]: 0;\n\n table[gapStartIndx][gapEndIndx] = Math.max(arr[gapStartIndx] +\n Math.min(x, y), arr[gapEndIndx] +\n Math.min(y, z));\n }\n }\n\n return table[0][n - 1];\n }", "public int maxDiffSubArrays(int[] nums) {\n int[] leftMins = new int[nums.length];\n int[] leftMaxs = new int[nums.length];\n int[] rightMins = new int[nums.length];\n int[] rightMaxs = new int[nums.length];\n leftMins[0] = nums[0];\n leftMaxs[0] = nums[0];\n rightMins[nums.length-1] = nums[nums.length-1];\n rightMaxs[nums.length-1] = nums[nums.length-1];\n int leftSum = nums[0], rightSum = nums[nums.length-1];\n int leftMin=0, leftMax=0, rightMin=0, rightMax=0;\n for (int i=1;i < nums.length;i++) {\n leftMin = Math.min(leftMin, leftSum);\n leftMax = Math.max(leftMax, leftSum);\n leftSum += nums[i];\n leftMins[i] = Math.min(leftMins[i-1], leftSum-leftMax);\n leftMaxs[i] = Math.max(leftMaxs[i-1], leftSum-leftMin);\n }\n\n for (int i=nums.length-2;i>=0;i--) {\n rightMin = Math.min(rightMin, rightSum);\n rightMax = Math.max(rightMax, rightSum);\n rightSum += nums[i];\n rightMins[i] = Math.min(rightMins[i+1], rightSum-rightMax);\n rightMaxs[i] = Math.max(rightMaxs[i+1], rightSum-rightMin);\n }\n int result = Integer.MIN_VALUE;\n for (int i=0;i < nums.length-1;i++) {\n result = Math.max(result, Math.max(Math.abs(rightMaxs[i+1]-leftMins[i])\n ,Math.abs(leftMaxs[i]-rightMins[i+1])));\n }\n return result;\n }", "static int maxProduct(int A[], int n) {\n\t int r = A[0];\n\n\t // imax/imin stores the max/min product of\n\t // subarray that ends with the current number A[i]\n\t for (int i = 1, imax = r, imin = r; i < n; i++) {\n\t // multiplied by a negative makes big number smaller, small number bigger\n\t // so we redefine the extremums by swapping them\n\t if (A[i] < 0)\n\t {\n\t \tint temp = imax;\n\t \timax = imin;\n\t \timin = temp;\n\t \t//swap(imax, imin);\n\t }\n\n\t // max/min product for the current number is either the current number itself\n\t // or the max/min by the previous number times the current one\n\t imax = Math.max(A[i], imax * A[i]);\n\t imin = Math.min(A[i], imin * A[i]);\n\n\t // the newly computed max value is a candidate for our global result\n\t r = Math.max(r, imax);\n\t }\n\t return r;\n\t}", "public static void maxSubArray(Integer[] arr){\n\n int maxSum = arr[0]; // start with smallest number\n int i =0;\n int j =1;\n\n while (j< arr.length){\n if((maxSum + arr[j] > maxSum) ){\n maxSum = arr[j];\n i++;\n j++;\n }\n\n }\n\n }", "static int recurseMaxStolenValue(int[] values,int i){\r\n\t if(i >= values.length) return 0;\r\n\t if(i == values.length -1) return values[values.length-1];\r\n\t \r\n\t return Math.max( values[i] + recurseMaxStolenValue(values,i+2)\r\n\t ,values[i+1] + recurseMaxStolenValue(values,i+3)\r\n\t );\r\n\t /*\r\n\t *Approach #2 for Recursion --> This approach won't work to convert to DP,but recursion yields right result\r\n\t */\r\n\t \r\n\t /*\r\n\t if(i >= values.length) return 0; \r\n\t int result1 = values[i]+recurseMaxStolenValue(values,i+2);\r\n\t int result2 = recurseMaxStolenValue(values,i+1);\r\n\t return (Math.max(result1,result2));\r\n\t */\r\n\t \r\n\t }", "public static int getMaxSum(int[] arr) {\n int maxSum = 0;\n int sum = 0;\n for (int i : arr) {\n sum += i;\n if (maxSum < sum) maxSum = sum;\n else if (sum < 0) sum = 0;\n }\n return maxSum;\n }", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\r\n\t\tint n = input.nextInt() + 1;\r\n\t\tint array[] = new int[n];\r\n\t\tfor (int i = 0; i<n; i++) {\r\n\t\t\tarray[i] = 0;\r\n\t\t}\r\n\t\tint m = input.nextInt();\r\n\t\tfor (int i = 0; i<m; i++) {\r\n\t\t\tint a = input.nextInt();\r\n\t\t\tint b = input.nextInt();\r\n\t\t\tint k = input.nextInt();\r\n\t\t\tfor(int i1 = a; i1<=b; i1++)\r\n\t\t\t{\r\n\t\t\t\tarray[i1] = array[i1] + k;\r\n\t\t\t}\r\n\t\t}\r\n\t\tinput.close();\r\n\t\t\r\n\t\tint maximum = array[0];\r\n\t\tfor(int i = 1; i<array.length; i++)\r\n\t\t\tif (array[i] > maximum)\r\n\t\t\t\tmaximum = array[i];\r\n\t\t\r\n\t\tSystem.out.println(maximum);\r\n\t\t//This works but it is too slow. We are accessing the array 3 times which is not good.\r\n\t}", "private static int maxSubArrayGolden(int[] nums) {\n if (nums == null || nums.length == 0) {\n return 0;\n }\n // in case the result is negative.\n int max = Integer.MIN_VALUE;\n int sum = 0;\n for (int num : nums) {\n sum += num;\n max = Math.max(sum, max);\n sum = Math.max(sum, 0);\n }\n return max;\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint T;\n\t\tT=sc.nextInt();\n\t\tfor(int test_case = 1; test_case <= T; test_case++){\n\t\t\tN = sc.nextInt();//3~100,000\n//\t\t\tint Max = 0;\n//\t\t\tint n2 = space(N);\n//\t\t\tint[] arr = new int[n2*2 + 1];\n//\t\t\tfor(int i = n2, size = 0; size < N; i++, size++) {\n//\t\t\t\tarr[i] = sc.nextInt();\n//\t\t\t\tMax = Max < arr[i] ? arr[i] : Max;\n//\t\t\t}\n//\t\t\tint leftIdx = n2;\n//\t\t\tint rightIdx = n2 * 2 - 1;\n//\t\t\twhile(leftIdx != 1) {\n//\t\t\t\tfor(int i = leftIdx; i<=rightIdx; i = i + 2) {\n//\t\t\t\t\tarr[i/2] = arr[i] + arr[i+1];\n//\t\t\t\t\tMax = Max < arr[i/2] ? arr[i/2] : Max;\n//\t\t\t\t}\n//\t\t\t\trightIdx = leftIdx - 1;\n//\t\t\t\tleftIdx = leftIdx / 2;\n//\t\t\t}\n\t\t\tint[] arr = new int[N];\n\t\t\tint Max = 0;\n\t\t\tfor(int i=0;i<N;i++) {\n\t\t\t\tarr[i] = sc.nextInt();\n\t\t\t}\n\t\t\tMax = fastMaxSum(arr);\n\t\t\tSystem.out.println(\"#\" + test_case + \" \" + Max);\n\t\t}\n\t}", "private static long calc1()\n {\n final int min = 1000;\n final int max = 10000;\n\n // initialize\n List<List<Integer>> m = new ArrayList<>();\n for (int k = 0; k < end; k++) {\n List<Integer> list = new ArrayList<Integer>();\n int n = 1;\n while (k >= start) {\n int p = pkn(k, n);\n if (p >= max) {\n break;\n }\n if (p >= min) {\n list.add(p);\n }\n n++;\n }\n m.add(list);\n }\n\n boolean[] arr = new boolean[end];\n arr[start] = true;\n\n List<Integer> solutions = new ArrayList<>();\n List<Integer> list = m.get(start);\n for (Integer first : list) {\n LinkedList<Integer> values = new LinkedList<>();\n values.add(first);\n f(m, arr, values, 1, solutions);\n // we stop at the first solution found\n if (!solutions.isEmpty()) {\n break;\n }\n }\n\n // solutions.stream().forEach(System.out::println);\n int res = solutions.stream().reduce(0, Integer::sum);\n return res;\n }", "public ArrayList<ArrayList<Integer>> fourSum(int[] num, int target) {\n int temp = 0;\n Arrays.sort(num);\n\n ArrayList<ArrayList<Integer>> a = new ArrayList<ArrayList<Integer>>();\n int [] s = new int [4];\n int total = 0;\n int current = -1;\n int i = 0;\n Arrays.fill(s, 0);\n HashMap<Long, Integer> m = new HashMap<Long, Integer>();\n \n \n if (num.length < 4) return a;\n \n while (i!=-1) {\n //increase the current pointer\n ++current;\n if (current > num.length-1) {\n --i;\n if (i >= 0) \n {\n current = s[i];\n total -= num[current];\n }\n }\n else if (total + num[current] > target || total + (4-i)*num[num.length-1] < target) {\n --i;\n if (i >= 0) \n {\n current = s[i];\n total -= num[current];\n }\n }\n else {\n //check if current number will work\n /*if (current == 0)\n {\n */\n if (i < 3) {s[i] = current; total += num[current]; ++i;}\n else if (num[current] + total == target) {\n //bingo one answer\n ArrayList<Integer> b = new ArrayList<Integer>();\n long c = num[s[0]]*num[s[1]]*num[s[2]]*num[current];\n long d = Math.abs((long)num[s[0]]*1000000000) \n + Math.abs((long)num[s[1]]*1000000)\n + Math.abs((long)num[s[2]]*1000)\n + Math.abs((long)num[current]);\n if (c < 0) d *= -1;\n if (!m.containsKey(d))\n {\n b.add(num[s[0]]);\n b.add(num[s[1]]);\n b.add(num[s[2]]);\n b.add(num[current]);\n a.add(b);\n m.put(d, 1);\n }\n }\n /*\n } \n else if (num[current] != num[current-1])\n {\n if (i < 2) {s[i] = current; total += num[current]; ++i;}\n else if (num[current] + total == 0) {\n //bingo one answer\n ArrayList<Integer> b = new ArrayList<Integer>();\n b.add(num[s[0]]);\n b.add(num[s[1]]);\n b.add(num[s[2]]);\n a.add(b);\n }\n }\n */\n }\n }\n return a;\n }", "public static int maxSale(int[] arr, int m) {\n Queue<Integer> queue = new PriorityQueue<Integer>(new Comparator<Integer>(){\n @Override\n public int compare(Integer a, Integer b) {\n return b - a;\n }\n });\n // (a,b) -> (b,a));\n for(int ticket : arr) {\n queue.offer(ticket);\n }\n int sum = 0;\n while (m > 0) {\n if (queue.isEmpty()) {\n break;\n }\n int max = queue.poll();\n int top = (queue.isEmpty() ? 0 : queue.peek());\n for(; m > 0 && max >= top; m--, max--) {\n sum += max;\n }\n if (max > 0) {\n queue.offer(max);\n }\n }\n return sum;\n }", "public int maxSubArray(int[] nums) {\n if (nums.length == 0) return 0;\n int maxSum = nums[0];\n int sum = maxSum;\n for (int i = 1; i < nums.length; i++) {\n sum += nums[i];\n if (nums[i] > sum) {\n sum = nums[i];\n }\n if (sum > maxSum) {\n maxSum = sum;\n }\n }\n return maxSum;\n\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.print(\"Unesite velicinu n x n matrice: \");\r\n\t\tint n = input.nextInt(); // unos n x n matrice n = broj redova i kolona matrice\r\n\r\n\t\tint[][] matrix = new int[n][n];\r\n\t\tArrayList<Integer> maxR = new ArrayList<>();\r\n\t\tArrayList<Integer> maxK = new ArrayList<>();\r\n\r\n\t\tSystem.out.println(\"Matrica: \");\r\n\t\tfor(int i=0; i<matrix.length; i++) {\r\n\t\t\tfor(int j=0; j<matrix[0].length; j++) {\r\n\t\t\t\tmatrix[i][j] = (int)(Math.random()*2); // punjenje matrice integerima 0 i 1\r\n\t\t\t\tSystem.out.print(matrix[i][j] + \" \"); // ispis matrice u konzolu\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t\tint sumaR = 0, sumaK = 0, totalSumaR, totalSumaK, nula = 0;\r\n\t\t\r\n\t\tfor(int j=0; j<matrix[0].length; j++) {\r\n\t\t\tsumaR += matrix[0][j]; // suma reda matrice\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i=0; i<matrix.length; i++) {\r\n\t\t\tsumaK += matrix[i][0]; // suma kolona matrice\r\n\t\t}\r\n\t\tfor(int i=0; i<matrix.length; i++) { // za sve elemente matrice\r\n\t\t\ttotalSumaR = 0;\r\n\t\t\ttotalSumaK = 0;\r\n\t\t\tfor(int j=0; j<matrix[i].length; j++) {\r\n\t\t\t\ttotalSumaR += matrix[i][j]; // suma svih redova matrice\r\n\t\t\t\ttotalSumaK += matrix[j][i]; // suma svih kolona matrice\r\n\t\t\t\tif(totalSumaR > sumaR) { // ako bilo koji red matrice ima vecu sumu od sume prvog reda matrice\r\n\t\t\t\t\tsumaR = totalSumaR; // taj red postaje red sa najvecom sumom\r\n\t\t\t\t\tmaxR.clear(); // brisu se stare pozicije redova sa najvecom sumom\r\n\t\t\t\t\tmaxR.add(i); // ubacivanje broja indexa reda sa najvecom sumom u listu\t\r\n\t\t\t\t} else if(totalSumaR == sumaR) { // ako je ukupna suma zadnjeg reda jednak najvecoj sumi reda\r\n\t\t\t\t\t//maxR.clear(); brisu se ostale pozicije redova sa najvecom sumom u listi (ako trazimo samo zadnji red sa najvise 1)\r\n\t\t\t\t\tmaxR.add(i); // dodaje se krajnja pozicija najvece sume reda u listi\r\n\t\t\t\t}\r\n\t\t\t\tif(totalSumaK > sumaK) { // ako bilo koja kolona matrice ima vecu sumu od sume prve kolone matrice\r\n\t\t\t\t\tsumaK = totalSumaK; // ta kolona postaje kolona sa najvecom sumom\r\n\t\t\t\t\tmaxK.clear(); // brisu se stare pozicije kolone sa najvecom sumom\r\n\t\t\t\t\tmaxK.add(i); // ubacivanje broja indexa kolone sa najvecom sumom u listu\r\n\t\t\t\t} else if(totalSumaK == sumaK) { // ako je ukupna suma zadnje kolone jednaka najvecoj sumi kolone\r\n\t\t\t\t\t//maxK.clear(); brisu se ostale pozicije kolona sa najvecom sumom u listi (ako trazimo samo zadnju kolonu sa najvise 1)\r\n\t\t\t\t\tmaxK.add(i); // dodaje se krajnja pozicija najvece sume kolone u listi\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(maxR.isEmpty()) { // ako je lista prazna\r\n\t\t\tmaxR.add(nula); // ubaci u listu 0\r\n\t\t}\r\n\t\tSystem.out.print(\"Redovi sa najvise jedinica su: \");\r\n\t\tfor(int i=0; i<maxR.size(); i++) {\r\n\t\t\tSystem.out.print(maxR.get(i) + \" \"); // ispis pozicija najvece sume redova iz liste\r\n\t\t}\r\n\t\tif(maxK.isEmpty()) { // ako je lista prazna\r\n\t\t\tmaxK.add(nula); // ubaci u listu 0\r\n\t\t}\r\n\t\tSystem.out.print(\"\\nKolone sa najvise jedinica su: \");\r\n\t\tfor(int i=0; i<maxK.size(); i++) {\r\n\t\t\tSystem.out.print(maxK.get(i) + \" \"); // ispis pozicija najvece sume kolona iz liste\r\n\t\t}\r\n\t\t\r\n\t\tinput.close();\r\n\t}", "public static void main(String[] args) {\n\t\tint a[]= {15,3,7,1,9,2};\n\t\tsubarraysum(a,11);//Time complexity O(n^2) space O(1)\n\n\t\tsubarraysum_reducecomplexity(a,11,a.length); //Time complexity O(n) space O(1)\n\n\t}", "static boolean isValid(int a[], int n, int k, int max)\r\n\t {\r\n\t int painter = 1, sum = 0;\r\n\t \r\n\t for(int i = 0; i < n; i++)\r\n\t {\r\n\t if(sum + a[i] > max)\r\n\t {\r\n\t painter++;\r\n\t sum = a[i];\r\n\t \r\n\t if(painter > k)\r\n\t return false;\r\n\t }\r\n\t else\r\n\t sum += a[i];\r\n\t }\r\n\t \r\n\t return true;\r\n\t }", "public static int maxSumSubSequence(int[] d) {\n\t\tint[] sum = new int[d.length];\n\t\tfor (int i = 0; i < d.length; i++) {\n\t\t\tsum[i] = d[i];\n\t\t}\n\t\tfor (int i = 1; i < d.length; i++) {\n\t\t\tfor (int j = 0; j < i; j++) {\n\t\t\t\tif (d[j] < d[i] && sum[i] < sum[j] + d[i]) {\n\t\t\t\t\tsum[i] = sum[j] + d[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint max = Integer.MIN_VALUE;\n\t\tfor (int i = 0; i < sum.length; i++) {\n\t\t\tmax = Math.max(max, sum[i]);\n\t\t}\n\t\treturn max;\n\t}", "public static int max() {\r\n\r\n\t\tint[] arr1 = ArrayMethods.get5();\r\n\t\tint[] arr2 = ArrayMethods.get5();\r\n\r\n\t\tint sum1 = 0;\r\n\t\tint sum2 = 0;\r\n\r\n\t\tint max = 0;\r\n\r\n\t\tfor (int num : arr1) {\r\n\t\t\tsum1 += num;\r\n\t\t}\r\n\t\tfor (int num : arr2) {\r\n\t\t\tsum2 += num;\r\n\t\t}\r\n\r\n\t\tif (sum1 > sum2) {\r\n\r\n\t\t\tmax = sum1;\r\n\r\n\t\t} else if (sum1 == sum2) {\r\n\r\n\t\t\tmax = sum1;\r\n\r\n\t\t} else {\r\n\r\n\t\t\tmax = sum2;\r\n\t\t}\r\n\t\treturn max;\r\n\t}", "private static long calc2(int max)\n {\n long sum = 1; // \"1\" is valid (1 + 1/1 = 2)\n boolean[] primes = PrimeUtils.isPrimeSoE(max + 1);\n\n // we skip odd values (1 + n/1 is even if n is odd)\n for (int n = 2; n <= max; n = n + 2) {\n // test special case: 1\n if (!primes[n + 1]) {\n continue;\n }\n int sqrt = (int) Math.sqrt(n);\n // skip squares\n if (sqrt * sqrt == n) {\n continue;\n }\n boolean flag = true;\n for (int d = 2; d <= sqrt; d++) {\n if (n % d != 0) {\n continue;\n }\n int e = n / d;\n if (!primes[d + e]) {\n flag = false;\n break;\n }\n }\n if (flag) {\n sum += n;\n // System.out.println(n);\n }\n }\n return sum;\n }", "public int[] maxset(int[] A) {all negative\n //p n p n n\n //\n int resultIndex = 0;\n BigInteger resultMax = BigInteger.ZERO;\n int resultLength = 0;\n\n int currentIndex = 0;\n BigInteger currentMax = BigInteger.valueOf(0);\n int currentLength = 0;\n\n for (int i = 0; i <= A.length-1; i++) {\n if (A[i] < 0) {\n\n currentMax = BigInteger.ZERO;\n currentIndex = i + 1;\n currentLength = 0;\n } else {\n currentMax = currentMax.add(BigInteger.valueOf(A[i]));\n currentLength++;\n if (currentMax.compareTo(resultMax)>0) {\n resultMax = currentMax;\n resultLength=currentLength;\n resultIndex = currentIndex;\n } else if (((currentMax == resultMax)) &&(currentLength > resultLength)) {\n resultLength = currentLength;\n resultIndex = currentIndex;\n }\n }\n }\n\n int[] resultArray = new int[resultLength];\n for (int i = 0; i < resultLength; i++) {\n resultArray[i] = A[resultIndex + i];\n }\n\n return resultArray;\n }", "private static long countSummations(int target, int currSum, int lastVal){\n if (currSum == target){\n return 1;\n }\n\n long numSummations = 0;\n\n for (int i = 1; i <= lastVal; i++){\n if (i + currSum > target){\n return numSummations;\n }\n currSum += i;\n numSummations += countSummations(target, currSum, i);\n currSum -= i;\n }\n return numSummations;\n }", "public static void main(String[] args) {\n\n\t\tlong largestSum = 0; \n\t\t\n\t\tfor(int a=1;a<100;a++)\n\t\t{\n\t\t\tfor(int b=1;b<100;b++)\n\t\t\t{\n\t\t\t\tBigInteger A = new BigInteger(a+\"\"),B = new BigInteger(b+\"\");\n\t\t\t\t\n\t\t\t\tBigInteger Result = A.pow(b);\n\t\t\t\tif(largestSum<SumOfDigitsInAString(Result.toString()))\n\t\t\t\t{\n\t\t\t\t\tlargestSum = SumOfDigitsInAString(Result.toString());\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\tSystem.out.println(SumOfDigitsInAString(Result.toString()));\n\t\t\tSystem.out.println(\"a : \" + a + \"b : \" + b);\t\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(largestSum);\n\t}", "public static void main(String[] args)\n {\n int A[]={2,4,6,8,10,15,17,19,18};\n int sum=0;\n for(int i=0; i<A.length;i++)\n {\n sum=sum+A[i];\n }\n System.out.println(\"Sum of all elements : \"+ sum);\n\n //===== Searching an element========\n int key=6;\n for(int j=0;j<A.length;j++)\n {\n if(A[j]==key)\n {\n System.out.println(\"Key found at Index : \"+ j);\n break;\n }\n }\n\n //======== Finding maximum elements=========\n int max= Integer.MIN_VALUE;\n for(int k=0;k<A.length;k++)\n {\n if(max<A[k])\n {\n max=A[k];\n }\n }\n System.out.println(\"Max is: \" + max);\n\n //========= Finding Second Largest element =========\n\n int max1=A[0],max2=A[0];\n for(int l=0;l<A.length;l++)\n {\n if(max1<A[l])\n {\n max2=max1;\n max1=A[l];\n }\n else if(max1>A[l] && max2<A[l])\n {\n max2=A[l];\n }\n }\n System.out.println(\"Second Largest element: \"+ max2);\n\n\n }", "public static int findMaxSumSubArray(int k, int[] arr) {\n int windowSum = 0, maxSum = Integer.MIN_VALUE;\n int windowStart = 0;\n for (int windowEnd = 0; windowEnd < arr.length; windowEnd++) {\n windowSum += arr[windowEnd]; // add the next element\n // slide the window, we don't need to slide if we've not hit the required window size of 'k'\n if (windowEnd >= k - 1) {\n maxSum = Math.max(maxSum, windowSum);\n windowSum -= arr[windowStart]; // subtract the element going out\n windowStart++; // slide the window ahead\n }\n }\n return maxSum;\n }", "private static int optimalBinary(int[][] costMatrix, int[] key, int[] values, int[][] nodeMatrix) {\n\t\tint min=0;\n\t\tint n= values.length;\n\t\tint r;\n\t\tint currentSum=0;\n\t\t\n\t\tfor(int size=1;size<=n; size++){\n\t\t\t////System.out.println(\"size \"+size);\n\t\t\tfor(int l=1;l<=n-size+1;l++){\n\t\t\t\tcurrentSum=0;\n\t\t\t\tr=l+size-1;\n\t\t\t\tmin = costMatrix[l][r];\n\t\t\t\t////System.out.println(\"\"+l+r);\n\t\t\t\tint sum1=0;\n\t\t\t\tfor(int k=l;k<=r;k++){\n\t\t\t\t\tsum1+=values[k-1];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(l==r){\n\t\t\t\t\tmin=values[l-1];\n\t\t\t\t}else{\n\t\t\t\t\tfor(int k=l;k<=r;k++){\n\t\t\t\t\t\t////System.out.println(\" :::: K which is root \" +k+ \" : \" +l+ \" \" +(k-1)+ \" \"+ (k+1)+\" \"+ r +\" : \");\n\t\t\t\t\t\tcurrentSum = sum1 + costMatrix[l][k-1]+ ( (k+1 <= n) ? costMatrix[k+1][r] : 0);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(currentSum<min){ \n\t\t\t\t\t\t\tmin=currentSum;\n\t\t\t\t\t\t\tnodeMatrix[l][r]=k;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcostMatrix[l][r]= min;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn min;\n\t}", "public int maxProduct(final List<Integer> A) {\n if (A.size() == 0) {\n return 0;\n }\n int[] posProduct = new int[A.size()];\n int[] negProduct = new int[A.size()];\n int[] maxProduct = new int[A.size()];\n posProduct[0] = negProduct[0] = maxProduct[0] = A.get(0);\n for (int i = 1;i < A.size();i++) {\n int a = posProduct[i-1] * A.get(i);\n int b = negProduct[i-1] * A.get(i);\n posProduct[i] = Math.max(Math.max(a, b), A.get(i));\n negProduct[i] = Math.min(Math.min(a, b), A.get(i));\n maxProduct[i] = Math.max(posProduct[i], maxProduct[i-1]);\n }\n // for(int i=0;i<A.size();i++)\n // {\n // System.out.print(\" |\"+posProduct[i]);\n // }\n // System.out.println();\n // for(int i=0;i<A.size();i++)\n // {\n // System.out.print(\" |\"+negProduct[i]);\n // }\n // System.out.println();\n return maxProduct[A.size()-1];\n }", "public int kSum(int[] A, int k, int target) {\n\t\tint res=0;\r\n\t\t//考虑k=1的情况\r\n//\t\tif (k==1) {\r\n//\t\t\tfor(int i=0;i<A.length;i++) {\r\n//\t\t\t\tif (A[i]==target) {\r\n//\t\t\t\t\tres++;\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t\treturn res;\r\n//\t\t}\r\n//\t\tint sum_k_1=0;\r\n//\t\tint sum=target-sum_k_1;\r\n//\t\tif (k>1 && k<A.length) {\r\n//\t\t\tfor(int i=0;i<A.length-1;i++) {\r\n//\t\t\t\tfor(int j=i+1;j<A.length;j++) {\r\n//\t\t\t\t\t\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t}\r\n\t\t//动态规划\r\n\t\tint n=A.length;\r\n\t\tint[][][] f=new int[n+1][k+1][target+1];\r\n\t\tfor(int i=0;i<n+1;i++) {\r\n\t\t\tf[i][0][0]=1;\r\n\t\t}\r\n\t\tfor(int i=1;i<=n;i++) {\r\n\t\t\tfor(int j=1;j<=k && j<=i;j++) {\r\n\t\t\t\tfor(int t=1;t<=target;t++) {\r\n\t\t\t\t\tf[i][j][t]=0;\r\n\t\t\t\t\tif (t>=A[i-1]) {\r\n\t\t\t\t\t\tf[i][j][t]=f[i-1][j-1][t-A[i-1]];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tf[i][j][t]+=f[i-1][j][t];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn f[n][k][target];\r\n }", "static void miniMaxSum(int[] arr) {\n\t\tlong max = Long.MIN_VALUE;\n\t\tlong min = Long.MAX_VALUE;\n\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tlong compareMax = sum(i, arr);\n\t\t\tlong compareMin = sum(i, arr);\n\n\t\t\tif (max < compareMax)\n\t\t\t\tmax = compareMax;\n\t\t\tif (min > compareMin)\n\t\t\t\tmin = compareMin;\n\n\t\t}\n\t\tSystem.out.print(min);\n\t\tSystem.out.print(\" \");\n\t\tSystem.out.print(max);\n\t}", "private static int getHighestSum(List<? extends ISubsetSum> list, int n, int sum) {\n\t\tboolean subset[][] = new boolean[sum + 1][n + 1];\n\n\t\t// primeira coluna toda true, pois se considera que com qualquer\n\t\t// conjunto se pode obter uma somatoria de 0.\n\t\tfor (int i = 0; i <= n; i++)\n\t\t\tsubset[0][i] = true;\n\n\t\t// nenhuma somatoria é possível com nenhum elemento.\n\t\tfor (int i = 1; i <= sum; i++)\n\t\t\tsubset[i][0] = false;\n\n\t\t// Vai verificando se com aqueles elementos se obtem a sum iterada.\n\t\tfor (int i = 1; i <= sum; i++) {\n\t\t\tfor (int j = 1; j <= n; j++) {\n\t\t\t\tsubset[i][j] = subset[i][j - 1];\n\t\t\t\tif (i >= list.get(j - 1).getValue()) {\n\t\t\t\t\tsubset[i][j] = subset[i][j] || subset[i - list.get(j - 1).getValue()][j - 1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// itera sobre a ultima row de tras para frente até achar um valor true\n\t\t// e retorna a maior somatoria, tal que somatoria <= sum.\n\t\tint maxSum = 0;\n\t\tfor (int i = sum; i > 0; i--) {\n\t\t\tif (subset[i][n] == true) {\n\t\t\t\tmaxSum = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn maxSum;\n\n\t}", "public int maxPathSum(TreeNode root) {\n helper(root); \n //run the function but don't use the final return value\n //only save the \"result\" when we run the function\n return result;\n }", "public static int sumOfTwoLargestElements1(int[] a) {\n int firstNum = Integer.MIN_VALUE;\n int secondNum = Integer.MIN_VALUE;\n for (int num : a){\n if(num>firstNum){\n secondNum = firstNum;\n firstNum = num;\n }else if (num>secondNum){\n secondNum = num;\n }\n }\n return firstNum+secondNum;\n }", "private final int m()\n\t { int n = 0;\n\t int i = 0;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break; i++;\n\t }\n\t i++;\n\t while(true)\n\t { while(true)\n\t { if (i > j) return n;\n\t if (cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t n++;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t }\n\t }", "public int solution(int[] A) {\n Arrays.sort(A);\n int max = Integer.MIN_VALUE;\n max = Math.max(max,A[0]*A[1]*A[A.length-1]);\n max = Math.max(max,A[A.length-3]*A[A.length-2]*A[A.length-1]);\n return max;\n }", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int arr[][] = new int[6][6];\n for(int i=0; i < 6; i++){\n for(int j=0; j < 6; j++){\n arr[i][j] = in.nextInt();\n }\n }\n int ans=maxSum(arr);\n System.out.printf(\"%d\",ans);\n }", "static void maxSubArraySum1(int a[], int size)\n {\n int max_so_far = Integer.MIN_VALUE,\n max_ending_here = 0,start = 0,\n end = 0, s = 0;\n\n for (int i = 0; i < size; i++)\n {\n max_ending_here += a[i];\n\n if (max_so_far < max_ending_here)\n {\n max_so_far = max_ending_here;\n start = s;\n end = i;\n }\n\n if (max_ending_here < 0)\n {\n max_ending_here = 0;\n s = i + 1;\n }\n }\n System.out.println(\"Maximum contiguous sum is \" + max_so_far);\n System.out.println(\"Starting index \" + start);\n System.out.println(\"Ending index \" + end);\n }", "public int maxProduct(int[] nums) {\n Arrays.sort(nums);\r\n return (nums[nums.length - 1] - 1) * (nums[nums.length - 2] - 1);\r\n\r\n //暴力解法,两次循环\r\n /*int res = 0;\r\n int n = nums.length;\r\n Arrays.sort(nums);\r\n for(int i = 0 ; i < n; i++){\r\n for(int j = i; j < n; j++){\r\n if(i != j){\r\n res = Math.max(res, (nums[i] - 1)*(nums[j] - 1));\r\n }\r\n }\r\n }\r\n return res;*/\r\n }", "public static ArrayList<ArrayList<Integer>> fourSum(ArrayList<Integer> a, int k) {\n Collections.sort(a);\n System.out.println(a);\n LinkedHashMap<Integer, List<List<Integer>>> m = new LinkedHashMap<Integer, List<List<Integer>>>();\n for (int i = 0; i <= a.size() - 3; i++) {\n for (int j = i + 1; j <= a.size() - 2; j++) {\n if (m.get(a.get(i) + a.get(j)) == null) {\n ArrayList<List<Integer>> v = new ArrayList<List<Integer>>();\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n } else {\n List<List<Integer>> v = m.get(a.get(i) + a.get(j));\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n }\n\n }\n }\n LinkedHashSet<ArrayList<Integer>> res = new LinkedHashSet<ArrayList<Integer>>();\n for (int i = 2; i <= a.size() - 1; i++) {\n for (int j = i + 1; j < a.size(); j++) {\n List<List<Integer>> v = m.get(k - (a.get(i) + a.get(j)));\n if (v != null && v.size() >= 1) {\n for (List<Integer> l : v) {\n\n if (l.get(0) < l.get(1) && l.get(1) < i && l.get(1) < j) {\n //System.out.println(l.get(0) + \" \" + l.get(1) + \" \" + i + \" \" + j);\n ArrayList<Integer> out = new ArrayList<Integer>();\n out.add(a.get(l.get(0)));\n out.add(a.get(l.get(1)));\n out.add(a.get(i));\n out.add(a.get(j));\n Collections.sort(out);\n //System.out.println(out);\n res.add(out);\n }\n }\n }\n }\n }\n return new ArrayList<ArrayList<Integer>>(res);\n }", "public double findmaxavg(int[] nums, int k){\r\n\t\tdouble res = Integer.MIN_VALUE;\r\n\t\tfor (int s = 0; s < nums.length -k + 1; s++) {\r\n\t\t\tdouble sum = 0;\r\n\t\t\tfor (int i = 0; i < k; i++) {\r\n\t\t\t\tsum+=nums[i+s];\r\n\t\t\t}\r\n\t\t\tres = Math.max(res, sum/k);\r\n\t\t}\r\n\t\treturn res;\t\t\r\n\t//Time complexity : O(n*k). \r\n\t//Space complexity : O(1).\r\n\t\r\n\t\t\r\n\t\t\r\n\r\n\t}", "private static int maxValue(int[] a) {\n\t\tint max_value =0;\r\n\t\tint current_max=0;\r\n\t\t\r\n\t\tfor(int i=0;i<a.length;i++)\r\n\t\t{\r\n\t\t\tcurrent_max += a[i];\r\n\t\t\tmax_value= Math.max(max_value, current_max);\r\n\t\t\tif(a[i]<0)\r\n\t\t\t\tcurrent_max=0;\r\n\t\t}\r\n\t\t\r\n\t\treturn max_value;\r\n\t}", "public int maxSubarraySumCircular(int[] A) {\n int total = 0, maxSum = -30000, curMax = 0, minSum = 30000, curMin = 0;\n for (int a :\n A) {\n curMax = Math.max(curMax + a, a);\n maxSum = Math.max(maxSum, curMax);\n curMin = Math.min(curMin + a, a);\n minSum = Math.min(minSum, curMin);\n total += a;\n }\n return maxSum > 0 ? Math.max(maxSum, total - minSum) : maxSum;\n }" ]
[ "0.7240935", "0.7227872", "0.7144769", "0.71074903", "0.6926938", "0.69224334", "0.6911805", "0.68712825", "0.6773183", "0.67534244", "0.6738477", "0.668517", "0.6639001", "0.6620849", "0.6614504", "0.66083175", "0.65947276", "0.6565034", "0.6540337", "0.6524759", "0.6514379", "0.6507193", "0.65070486", "0.648438", "0.64806694", "0.6479825", "0.6455929", "0.6381196", "0.6375034", "0.6354721", "0.63490784", "0.6339118", "0.633145", "0.6329958", "0.63177025", "0.6312395", "0.6308098", "0.6292131", "0.62875706", "0.6278845", "0.6249536", "0.6247519", "0.6247185", "0.6235175", "0.6226966", "0.6224332", "0.6221562", "0.6208614", "0.62005323", "0.61943835", "0.6192145", "0.61778283", "0.617393", "0.61620015", "0.6154129", "0.61478686", "0.614348", "0.61350465", "0.6131974", "0.6127466", "0.61261845", "0.6124397", "0.611478", "0.6110227", "0.61066115", "0.6103514", "0.60994947", "0.60953087", "0.60953003", "0.60828966", "0.60778797", "0.6071278", "0.606536", "0.6032046", "0.6010488", "0.6008336", "0.6007516", "0.59816355", "0.5976811", "0.5972625", "0.59712005", "0.59663755", "0.59567016", "0.5954145", "0.59399575", "0.5938496", "0.5925768", "0.5925651", "0.5925505", "0.59240764", "0.59170437", "0.59117305", "0.59050894", "0.5896638", "0.5894182", "0.5887439", "0.58853054", "0.5885227", "0.5881286", "0.58747494", "0.58732635" ]
0.0
-1
Create a Trigger with the given name, and group.
public AbstractTrigger(String name, String group, String jobName, String jobGroup) { setName(name); setGroup(group); setJobName(jobName); setJobGroup(jobGroup); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Nonnull\n public JDK8TriggerBuilder <T> withIdentity (final String name, final String group)\n {\n m_aTriggerKey = new TriggerKey (name, group);\n return this;\n }", "public String createEventForGroup(String groupName) throws ParseException;", "TriggerType createTriggerType();", "public void createGroup(String group_name){\r\n\t\t/* \r\n\t\t * Create a new entry in group database using the information\r\n\t\t * given by the parameters\r\n\t\t */\r\n\t\tSQLiteDatabase db = this.getWritableDatabase();\r\n \tContentValues values = new ContentValues();\r\n \t\r\n\t\tvalues.put(DBHelper.COLUMN_GROUPNAME, group_name);\r\n\t\t\r\n\t\tdb.insert(DBHelper.GROUP_TABLE_NAME, null, values);\r\n\t\tdb.close();\r\n\t}", "UserGroup createGroup(String companyId, String name, String groupLead);", "public static CronTrigger createCronTrigger(String cronExp,\n\t\t\tString triggerName, String jobName,String groupName) throws SchedulerException,\n\t\t\tParseException {\n\t\tlog.info(\"------- create Scheduling cronTrigger ----------------\");\n\t\tCronTrigger cronTrigger = new CronTrigger(triggerName, groupName, jobName, groupName, cronExp);\n\t\treturn cronTrigger;\n\t}", "public Trigger createTrigger(ConfigProperties cprop){\n\t\tint repeat;\n\t\tlong interval;\n\t\tCalendar sd = calculateStartTime(cprop);\n\t\tCalendar ed = calculateEndTime(cprop);\n\t\tString name = cprop.getProperty(\"PROJ.name\");\n\n\t\tString rstr = cprop.getProperty(\"TIME.repeat\");\n\t\tString istr = cprop.getProperty(\"TIME.interval\");\n\t\tString fstr = cprop.getProperty(\"TIME.frequency\");\n\n\t\t//repeat this many times or forever\n\t\tif(rstr!=null)\n\t\t\trepeat = Integer.parseInt(rstr);\n\t\telse\n\t\t\trepeat = SimpleTrigger.REPEAT_INDEFINITELY;\n\n\t\t//repeat every interval milliseconds or daily\n\t\t//interval overrides frequency\n\t\tif(istr!=null)\n\t\t\tinterval = Long.parseLong(istr);\n\t\telse if (fstr!=null)\n\t\t\tinterval = ONE_DAY/Long.parseLong(fstr);\n\t\telse\n\t\t\tinterval = ONE_DAY;\n\n\t\tjlog.info(\"Create Trigger n=\"+name+\" sd=\"+sd.getTime()+\" ed=\"+ed.getTime()+\" r=\"+repeat+\" i=\"+interval);\n\n\t\tTrigger trigger = new SimpleTrigger(name, null,sd.getTime(),ed.getTime(),repeat,interval);\n\t\ttrigger.setMisfireInstruction(SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT);\n\t\treturn trigger;\n\n\n\t}", "protected abstract void createTriggerOrAction();", "public void setName(String name) {\n if (name == null || name.trim().length() == 0) {\n throw new IllegalArgumentException(\n \"Trigger name cannot be null or empty.\");\n }\n\n this.name = name;\n this.key = null;\n }", "ID create(NewRoamingGroup group);", "@Nonnull\n public static JDK8TriggerBuilder <ITrigger> newTrigger ()\n {\n return new JDK8TriggerBuilder <> ();\n }", "ITrigger getTrigger(String sTriggerName);", "UserGroup createGroup(String companyId, String name);", "Observable<Task2> scheduleTask(String name, String groupKey, int executionOrder, Map<String, String> parameters,\n Trigger trigger);", "public void createGroup() {\n\t\tString name = JOptionPane\n\t\t\t\t.showInputDialog(\"Please Enter a new group name:\");\n\t\tif (name.equals(\"\"))\n\t\t\treturn;\n\n\t\tDefaultMutableTreeNode node = (DefaultMutableTreeNode) getLastSelectedPathComponent();\n\t\tEllowFile pfile = (EllowFile) node.getUserObject(), file;\n\t\tif (pfile.isDirectory()) {\n\t\t\tfile = new EllowFile(pfile.getAbsolutePath() + \"\\\\\\\\\" + name);\n\t\t\tfile.mkdirs();\n\t\t\tmodel.insertNodeInto(new DefaultMutableTreeNode(file), node,\n\t\t\t\t\tnode.getChildCount());\n\t\t} else {\n\t\t\tfile = new EllowFile(pfile.getParent() + \"\\\\\\\\\" + name);\n\t\t\tfile.mkdirs();\n\t\t\tnode = ((DefaultMutableTreeNode) node.getParent());\n\t\t\tmodel.insertNodeInto(new DefaultMutableTreeNode(file), node,\n\n\t\t\tnode.getChildCount());\n\t\t}\n\t\tfile.parentProject = pfile.parentProject;\n\t\tpfile.parentProject.rebuild();\n\t\tmodel.nodeChanged(root);\n\t}", "@NonNull\n public Trigger build() {\n return new Trigger(type, goal, null);\n }", "public UUID createGroup(Group group) throws JsonProcessingException, IOException, NdexException{\n\t\tJsonNode postData = objectMapper.valueToTree(group);\n\t\treturn ndexRestClient.createNdexObjectByPost(NdexApiVersion.v2 + \"/group\", postData);\n\t}", "@Nonnull\n public JDK8TriggerBuilder <T> withIdentity (final String name)\n {\n m_aTriggerKey = new TriggerKey (name, null);\n return this;\n }", "private void CreateNewGroup(String group, String current_uid, String push_id) {\n\n mDatabaseInfo = FirebaseDatabase.getInstance().getReference().child(\"Groups\").child(current_uid).child(push_id).child(\"groupinfo\");\n\n HashMap<String, String> userMap = new HashMap<>();\n userMap.put(\"name\", group);\n userMap.put(\"admin\", current_uid);\n userMap.put(\"groupid\", push_id);\n mDatabaseInfo.setValue(userMap);\n\n mDatabaseMember = FirebaseDatabase.getInstance().getReference().child(\"Groups\").child(current_uid).child(push_id).child(\"member\").child(current_uid);\n\n HashMap<String, String> adminMap = new HashMap<>();\n adminMap.put(\"seen\", \"false\");\n mDatabaseMember.setValue(adminMap);\n }", "protected void sequence_AT_DEFINE_DefinitionTrigger_TRIGGER(ISerializationContext context, DefinitionTrigger semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "public boolean createGroup(GroupsGen group) {\n \n super.create(group);\n return true;\n }", "@Nonnull\n public JDK8TriggerBuilder <T> forJob (final String jobName, final String jobGroup)\n {\n m_aJobKey = new JobKey (jobName, jobGroup);\n return this;\n }", "GroupRefType createGroupRefType();", "private void createGroup(String groupName, String description, List<String> tags) {\n trCreateNewGroup.setGroupName(groupName);\n trCreateNewGroup.setOwner(user);\n trCreateNewGroup.setDescription(description);\n trCreateNewGroup.setTags(tags);\n\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-d\");\n Date date = new Date();\n String strData = dateFormat.format(date);\n\n trCreateNewGroup.setCreationDate(DateTime.Builder.buildDateString(strData));\n\n try {\n trCreateNewGroup.execute();\n } catch (GroupAlreadyExistingException e) {\n Toast toast = Toast.makeText(this, getString(R.string.group_already_created), Toast.LENGTH_LONG);\n toast.show();\n }\n\n updateMedalProgress(UserAchievement.FOUNDER);\n }", "public void toolGroupAdded(String name, ToolGroup group) {\r\n try {\r\n a.toolGroupAdded(name, group);\r\n } catch(Exception e) {\r\n I18nManager intl_mgr = I18nManager.getManager();\r\n String msg = intl_mgr.getString(GROUP_ADD_ERR_PROP) + a;\r\n\r\n errorReporter.errorReport(msg, e);\r\n }\r\n\r\n try {\r\n b.toolGroupAdded(name, group);\r\n } catch(Exception e) {\r\n I18nManager intl_mgr = I18nManager.getManager();\r\n String msg = intl_mgr.getString(GROUP_ADD_ERR_PROP) + b;\r\n\r\n errorReporter.errorReport(msg, e);\r\n }\r\n }", "public long insertPerson(String name, int groupId) throws SQLException {\r\n\t\tContentValues initialValues = new ContentValues();\r\n\t\tinitialValues.put(KEY_NAME, name);\r\n\t\tinitialValues.put(KEY_GROUP_ID, groupId);\r\n\t\tinitialValues.put(KEY_GIFTEE_1_ID, -1);\r\n\t\tinitialValues.put(KEY_GIFTEE_2_ID, -1);\r\n\t\tinitialValues.put(KEY_NUM_TIMES_SELECTED, 0);\r\n\t\treturn db.insert(DATABASE_TABLE, null, initialValues);\r\n\t}", "public PgEventTrigger() {\n this(\"pg_event_trigger\", null);\n }", "ConsumerGroup createConsumerGroup(String name) throws RegistrationException;", "@NonNull\n public Trigger build() {\n if (UAStringUtil.isEmpty(eventName)) {\n return new Trigger(type, goal, null);\n }\n\n JsonPredicate predicate = JsonPredicate.newBuilder()\n .setPredicateType(JsonPredicate.AND_PREDICATE_TYPE)\n .addMatcher(JsonMatcher.newBuilder()\n .setKey(CustomEvent.EVENT_NAME)\n .setValueMatcher(ValueMatcher.newValueMatcher(JsonValue.wrap(eventName)))\n .build())\n .build();\n return new Trigger(type, goal, predicate);\n }", "void addTrigger(ITrigger tTrigger, boolean bIsPersistent)\r\n throws StorageProviderException;", "public Group createGroup(Group group) throws RepositoryAccessException {\r\n Connection conn = null;\r\n try {\r\n conn = openTransaction();\r\n GroupProxy proxy = new GroupProxy(conn);\r\n proxy.createGroup(group);\r\n conn.commit();\r\n } catch (Exception ex) {\r\n rollback(conn);\r\n String msg = \"Could not create group.\" + ex.getMessage();\r\n \r\n LogService.logWarn(msg, LOGGER);\r\n throw new RepositoryAccessException(msg, ex);\r\n } finally {\r\n close(conn);\r\n }\r\n \r\n return group;\r\n }", "@Test\n public void testInsertGroupThreadEvent() {\n ContentValues contentValues = new ContentValues();\n assertThat(mContentResolver.insert(Uri.parse(\"content://rcs/group_thread\"),\n contentValues)).isEqualTo(Uri.parse(\"content://rcs/group_thread/1\"));\n\n // create a group name change event\n ContentValues eventValues = new ContentValues();\n eventValues.put(NEW_NAME_COLUMN, \"new name\");\n assertThat(mContentResolver.insert(\n Uri.parse(\"content://rcs/group_thread/1/name_changed_event\"),\n eventValues)).isEqualTo(Uri.parse(\n \"content://rcs/group_thread/1/name_changed_event/1\"));\n }", "private GroupBinding createGroupBinding (Schema.Group g, Class<?> tgtType,\n Schema.Group origin)\n throws BlinkException\n {\n ArrayList<Field> bindingFields = new ArrayList<Field> ();\n GroupBinding b = new GroupBindingImpl (origin, tgtType, bindingFields);\n grpBndByName.put (origin.getName (), b);\n grpBndByClass.put (tgtType, b);\n\n long tid = b.getCompactTypeId ();\n if (grpBndByTid.containsKey (tid))\n {\n addAmbiguousTypeIdError (origin, tid);\n grpBndByTid.remove (tid);\n }\n else\n {\n if (! conflictByTid.containsKey (tid))\n grpBndByTid.put (tid, b);\n }\n\n HashMap<String, Method> allMethods = new HashMap<String, Method> ();\n getAllMethods (tgtType, allMethods);\n mapFields (g, allMethods, bindingFields);\n return b;\n }", "CreateParameterGroupResult createParameterGroup(CreateParameterGroupRequest createParameterGroupRequest);", "public boolean trigger (String name) {\n final TriggerReference trigger = module.getTrigger(name);\n if (trigger == null) {\n Logger.missing(\"TriggerReference\", name);\n return false;\n } else {\n return trigger.get();\n }\n }", "public Event createEvent(String name) {\r\n\t\tEvent newEvent = new Event(this.GID, name);\r\n\t\tevents.add(newEvent);\r\n\t\treturn newEvent;\r\n\t}", "HttpStatus createGroup(final String groupName);", "public Group createGroup( Group group ) {\n String path = template.urlFor( UrlTemplate.GROUPS_PATH ).build();\n com.silanis.esl.api.model.Group apiGroup = new GroupConverter(group).toAPIGroupWithoutMembers();\n try {\n String stringResponse = client.post( path, Serialization.toJson( apiGroup ) );\n com.silanis.esl.api.model.Group apiResponse = Serialization.fromJson( stringResponse, com.silanis.esl.api.model.Group.class );\n Group resultGroup = new GroupConverter(apiResponse).toSDKGroup();\n for ( GroupMember groupMember : group.getMembers() ) {\n addMember(resultGroup.getId(), groupMember);\n }\n return resultGroup;\n } catch ( RequestException e ) {\n throw new EslServerException( \"Unable to create Group.\", e );\n } catch ( Exception e ) {\n throw new EslException( \"Unable to create Group.\", e );\n }\n }", "public PgEventTrigger(String alias) {\n this(alias, PG_EVENT_TRIGGER);\n }", "private void processCreateTrigger() throws HsqlException {\n\n Table t;\n boolean isForEach;\n boolean isNowait;\n int queueSize;\n String triggerName;\n boolean isQuoted;\n String sWhen;\n String sOper;\n String tableName;\n String token;\n String className;\n TriggerDef td;\n Trigger o;\n\n triggerName = tokenizer.getName();\n\n String schemaname = tokenizer.getLongNameFirst();\n\n database.schemaManager.checkTriggerExists(triggerName,\n session.getSchemaNameForWrite(schemaname), false);\n\n isQuoted = tokenizer.wasQuotedIdentifier();\n isForEach = false;\n isNowait = false;\n queueSize = TriggerDef.getDefaultQueueSize();\n sWhen = tokenizer.getSimpleToken();\n sOper = tokenizer.getSimpleToken();\n\n tokenizer.getThis(Token.T_ON);\n\n tableName = tokenizer.getName();\n\n if (schemaname == null) {\n schemaname =\n session.getSchemaNameForWrite(tokenizer.getLongNameFirst());\n } else if (!schemaname.equals(\n session.getSchemaNameForWrite(tokenizer.getLongNameFirst()))) {\n throw Trace.error(Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS);\n }\n\n t = database.schemaManager.getUserTable(session, tableName,\n schemaname);\n\n if (t.isView()) {\n throw Trace.error(Trace.NOT_A_TABLE);\n }\n\n session.setScripting(true);\n\n // \"FOR EACH ROW\" or \"CALL\"\n token = tokenizer.getSimpleToken();\n\n if (token.equals(Token.T_FOR)) {\n token = tokenizer.getSimpleToken();\n\n if (token.equals(Token.T_EACH)) {\n token = tokenizer.getSimpleToken();\n\n if (token.equals(Token.T_ROW)) {\n isForEach = true;\n\n // should be 'NOWAIT' or 'QUEUE' or 'CALL'\n token = tokenizer.getSimpleToken();\n } else {\n throw Trace.error(Trace.UNEXPECTED_END_OF_COMMAND, token);\n }\n } else {\n throw Trace.error(Trace.UNEXPECTED_END_OF_COMMAND, token);\n }\n }\n\n if (token.equals(Token.T_NOWAIT)) {\n isNowait = true;\n\n // should be 'CALL' or 'QUEUE'\n token = tokenizer.getSimpleToken();\n }\n\n if (token.equals(Token.T_QUEUE)) {\n queueSize = tokenizer.getInt();\n\n // should be 'CALL'\n token = tokenizer.getSimpleToken();\n }\n\n if (!token.equals(Token.T_CALL)) {\n throw Trace.error(Trace.UNEXPECTED_END_OF_COMMAND, token);\n }\n\n className = tokenizer.getSimpleName();\n\n if (!tokenizer.wasQuotedIdentifier()) {\n throw Trace.error(Trace.UNEXPECTED_END_OF_COMMAND, className);\n }\n\n HsqlName name = database.nameManager.newHsqlName(triggerName,\n isQuoted);\n\n td = new TriggerDef(name, sWhen, sOper, isForEach, t, className,\n isNowait, queueSize, database.classLoader);\n\n t.addTrigger(td);\n\n if (td.isValid()) {\n try {\n\n // start the trigger thread\n td.start();\n } catch (Exception e) {\n throw Trace.error(Trace.UNKNOWN_FUNCTION, e.toString());\n }\n }\n\n database.schemaManager.registerTriggerName(triggerName, t.getName());\n\n// --\n }", "public CreateGroup() {\n initComponents();\n start();\n }", "public ServiceGroup create(String shortName, String title, int cid) throws Exception;", "GroupType createGroupType();", "GroupType createGroupType();", "@RequestMapping(value = CREATE_SIMPLE_TRIGGER, method = POST)\n @ResponseBody\n @ResponseStatus(ACCEPTED)\n public ResponseEntity<String> createNewSimpleTriggerForJob(@RequestBody final QuartzDTO quartzDTO, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {\n return quartzService.createNewSimpleTriggerForJob(quartzDTO, getCookie(httpServletRequest, X_AUTH_TOKEN));\n }", "@NonNull\n public Trigger build() {\n JsonPredicate predicate;\n if (UAStringUtil.isEmpty(regionId)) {\n predicate = null;\n } else {\n predicate = JsonPredicate.newBuilder()\n .addMatcher(JsonMatcher.newBuilder()\n .setKey(RegionEvent.REGION_ID)\n .setValueMatcher(ValueMatcher.newValueMatcher(JsonValue.wrap(regionId)))\n .build())\n .build();\n }\n\n return new Trigger(type, goal, predicate);\n }", "public void setGroupName(String name) {\n group.setName(name);\n }", "public QrtzSimpleTriggers(Name alias) {\n this(alias, QRTZ_SIMPLE_TRIGGERS);\n }", "public JobBuilder withIdentity(String name, String group) {\n key = new JobKey(name, group);\n return this;\n }", "public static Message createJoinEvent(long group_, int ifindex_)\r\n { return new Message(JOIN, 0, 0, group_, ifindex_); }", "private void setAddGroupButtonListener(AlertDialog alertDialog, View newGroupDialog) {\n MaterialButton btnAddGroup = newGroupDialog.findViewById(R.id.btnAddGroup);\n\n btnAddGroup.setOnClickListener(v -> {\n TextInputLayout groupName = newGroupDialog.findViewById(R.id.addGroupName);\n TextInputLayout groupDescription = newGroupDialog.findViewById(R.id.addDescription);\n TextInputLayout groupTags = newGroupDialog.findViewById(R.id.addTags);\n\n boolean isCorrect = checkEmptyTitle(groupName);\n isCorrect = isCorrect && checkTagPattern(groupTags);\n\n if (isCorrect) {\n String[] tags = Objects.requireNonNull(groupTags.getEditText()).getText().toString().split(\",\");\n createGroup(Objects.requireNonNull(groupName.getEditText()).getText().toString(),\n Objects.requireNonNull(groupDescription.getEditText()).getText().toString(),\n new ArrayList<>(Arrays.asList(tags)));\n alertDialog.dismiss();\n }\n });\n }", "@Test // (groups={\"All\"}) //(groups={\"smoke\"})\r\n\tpublic void createLead() {\n\t\tSystem.out.println(\"create\");\r\n\t}", "private void addNewGroupToFireBase(Bundle guideData) {\n }", "public boolean createGroup(String groupName) {\r\n \t\tboolean result = this.dataLayer.addGroup(groupName);\r\n \r\n \t\t// if succesfuly created on dataLayer, then add into GroupList\r\n \t\tif (result)\r\n \t\t\tthis.groupList.addGroup(groupName);\r\n \r\n \t\treturn result;\r\n \t}", "public QrtzSimpleTriggers() {\n this(DSL.name(\"qrtz_simple_triggers\"), null);\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult createGroup = mFacePlus.createGroup(groupname.getText().toString(), groupname.getText().toString(), null);\n\t\t\t\tif(createGroup.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + createGroup.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tGroup group = (Group) createGroup.data;\n\t\t\t\tLog.e(TAG,\"groupid = \"+group.getId());\n\t\t\t\tLog.e(TAG,group.toString());\n\t\t\t}", "public final EObject ruleETriggerDefinition() throws RecognitionException {\n EObject current = null;\n\n Token lv_name_0_0=null;\n Token otherlv_1=null;\n Token this_BEGIN_2=null;\n Token this_END_4=null;\n EObject lv_trigger_3_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:2138:2: ( ( ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_trigger_3_0= ruleETriggerDefinitionBody ) ) this_END_4= RULE_END ) )\n // InternalRMParser.g:2139:2: ( ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_trigger_3_0= ruleETriggerDefinitionBody ) ) this_END_4= RULE_END )\n {\n // InternalRMParser.g:2139:2: ( ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_trigger_3_0= ruleETriggerDefinitionBody ) ) this_END_4= RULE_END )\n // InternalRMParser.g:2140:3: ( (lv_name_0_0= RULE_QUALIFIED_NAME ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_trigger_3_0= ruleETriggerDefinitionBody ) ) this_END_4= RULE_END\n {\n // InternalRMParser.g:2140:3: ( (lv_name_0_0= RULE_QUALIFIED_NAME ) )\n // InternalRMParser.g:2141:4: (lv_name_0_0= RULE_QUALIFIED_NAME )\n {\n // InternalRMParser.g:2141:4: (lv_name_0_0= RULE_QUALIFIED_NAME )\n // InternalRMParser.g:2142:5: lv_name_0_0= RULE_QUALIFIED_NAME\n {\n lv_name_0_0=(Token)match(input,RULE_QUALIFIED_NAME,FOLLOW_11); \n\n \t\t\t\t\tnewLeafNode(lv_name_0_0, grammarAccess.getETriggerDefinitionAccess().getNameQUALIFIED_NAMETerminalRuleCall_0_0());\n \t\t\t\t\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getETriggerDefinitionRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"name\",\n \t\t\t\t\t\tlv_name_0_0,\n \t\t\t\t\t\t\"org.sodalite.dsl.RM.QUALIFIED_NAME\");\n \t\t\t\t\n\n }\n\n\n }\n\n otherlv_1=(Token)match(input,Colon,FOLLOW_6); \n\n \t\t\tnewLeafNode(otherlv_1, grammarAccess.getETriggerDefinitionAccess().getColonKeyword_1());\n \t\t\n this_BEGIN_2=(Token)match(input,RULE_BEGIN,FOLLOW_31); \n\n \t\t\tnewLeafNode(this_BEGIN_2, grammarAccess.getETriggerDefinitionAccess().getBEGINTerminalRuleCall_2());\n \t\t\n // InternalRMParser.g:2166:3: ( (lv_trigger_3_0= ruleETriggerDefinitionBody ) )\n // InternalRMParser.g:2167:4: (lv_trigger_3_0= ruleETriggerDefinitionBody )\n {\n // InternalRMParser.g:2167:4: (lv_trigger_3_0= ruleETriggerDefinitionBody )\n // InternalRMParser.g:2168:5: lv_trigger_3_0= ruleETriggerDefinitionBody\n {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getETriggerDefinitionAccess().getTriggerETriggerDefinitionBodyParserRuleCall_3_0());\n \t\t\t\t\n pushFollow(FOLLOW_8);\n lv_trigger_3_0=ruleETriggerDefinitionBody();\n\n state._fsp--;\n\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getETriggerDefinitionRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"trigger\",\n \t\t\t\t\t\tlv_trigger_3_0,\n \t\t\t\t\t\t\"org.sodalite.dsl.RM.ETriggerDefinitionBody\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n\n }\n\n\n }\n\n this_END_4=(Token)match(input,RULE_END,FOLLOW_2); \n\n \t\t\tnewLeafNode(this_END_4, grammarAccess.getETriggerDefinitionAccess().getENDTerminalRuleCall_4());\n \t\t\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "@Transactional\n @PostMapping\n public ResponseEntity<EntityModel<EventTriggerDto>> createEventTrigger(@Validated @RequestBody EventTriggerDto eventTrigger) {\n EventTrigger createdEvent = service.createEventTrigger(ModelMapperUtils.convert(eventTrigger, EventTrigger.class));\n return new ResponseEntity<>(linkAssembler.toModel(createdEvent, EventTriggerDto.class), HttpStatus.OK);\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n public Group createOrUpdateGroup(String groupId, Group group) {\n return this.serviceClient.createOrUpdateGroup(groupId, group);\n }", "public ContentModelInsertion(String name, KeyStroke keyStroke, String group)\n {\n super(name,name,keyStroke,group);\n \n }", "@Test\n @SdkSuppress(minSdkVersion = 33)\n public void registerWebTrigger_NoErrors() throws Exception {\n Assume.assumeTrue(AdServicesInfo.INSTANCE.version() >= 5);\n\n WebTriggerParams webTriggerParams =\n new WebTriggerParams(TRIGGER_REGISTRATION_URI, false);\n WebTriggerRegistrationRequest webTriggerRegistrationRequest =\n new WebTriggerRegistrationRequest(\n Collections.singletonList(webTriggerParams),\n DESTINATION);\n\n assertThat(mMeasurementManager.registerWebTriggerAsync(webTriggerRegistrationRequest).get())\n .isNotNull();\n }", "Object createLogger(String name);", "protected abstract Logger newInstance(String name);", "protected void createGroup(int id, int parentGroupID) {\n\t\tsendMessage(\"/g_new\", new Object[] { id, 0, parentGroupID });\n\n\t}", "void createServerStoredContactGroup(ContactGroup parent, String groupName)\n throws OperationFailedException;", "public IGenScheduleHandler create() throws CreateException, RemoteException;", "GroupQueryBuilder setName(String name);", "public DeepCreatedOriginGroup withName(String name) {\n this.name = name;\n return this;\n }", "@Override\n\tpublic LinkGroup create(long linkgroupId) {\n\t\tLinkGroup linkGroup = new LinkGroupImpl();\n\n\t\tlinkGroup.setNew(true);\n\t\tlinkGroup.setPrimaryKey(linkgroupId);\n\n\t\tlinkGroup.setCompanyId(companyProvider.getCompanyId());\n\n\t\treturn linkGroup;\n\t}", "@NonNull\n public Trigger build() {\n JsonPredicate predicate = null;\n if (versionMatcher != null) {\n predicate = VersionUtils.createVersionPredicate(versionMatcher);\n }\n return new Trigger(Trigger.VERSION, goal, predicate);\n }", "public void addDragInGroupName(String name) {\n group.addDragInGroupName(name);\n }", "@SuppressWarnings(\"serial\")\n\tpublic Group addGroup(final String name) throws Exception{\n\t\tUserRegistry ur = UserRegistry.findOrCreate(doc);\n\t\tGroups groups = Groups.findOrCreate(ur);\n\t\treturn Group.findOrCreate(groups,\n\t\t\t\tnew HashMap<String, String>(){{\n\t\t\t\t\tput(\"name\",name);\n\t\t\t\t}});\t\n\t}", "public void create(Rule event);", "private void createGroupDialog() {\n AlertDialog.Builder dialog = new AlertDialog.Builder(Objects.requireNonNull(this),\n R.style.AlertDialogTheme);\n dialog.setTitle(R.string.add_new_group_title);\n dialog.setMessage(R.string.add_new_group_description);\n\n View newGroupDialog = getLayoutInflater().inflate(R.layout.new_group_dialog, null);\n dialog.setView(newGroupDialog);\n\n AlertDialog alertDialog = dialog.create();\n setAddGroupButtonListener(alertDialog, newGroupDialog);\n\n alertDialog.show();\n }", "public void addTrigger(final PgTrigger trigger) {\n triggers.add(trigger);\n }", "public void createEventFromFile(String name, String[] arr) {\n\t\tLocalDate date = LocalDate.parse(arr[0]);\n\t\tLocalTime stime = LocalTime.parse(arr[1], timeFormat);\n\t\tLocalTime etime = LocalTime.parse(arr[2], timeFormat);\n\t\tEvent e = new Event(name,date,stime,etime);\n\t\tcreateEvent(e);\n\t}", "@Test\n public void testSetScriptGroupName_1()\n throws Exception {\n LogicStep fixture = new LogicStep();\n fixture.setScript(\"\");\n fixture.setName(\"\");\n fixture.setOnFail(\"\");\n fixture.setScriptGroupName(\"\");\n fixture.stepIndex = 1;\n String scriptGroupName = \"\";\n\n fixture.setScriptGroupName(scriptGroupName);\n\n }", "public String createFamily(String name);", "private Trigger createSimpleJob(SchedulerJobEntity schedulerEntity, JobDetail jobDetail) throws ParseException {\n\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\tDate date = df.parse(schedulerEntity.getStartTime());\n\n\t\tSimpleScheduleBuilder simpleScheduleBuilder = null;\n\n\t\tif (schedulerEntity.getRepeatCount() >= 0) {\n\t\t\t\n\t\t\tsimpleScheduleBuilder = SimpleScheduleBuilder.simpleSchedule()\n\t\t\t\t\t.withRepeatCount(schedulerEntity.getRepeatCount())\n\t\t\t\t\t.withIntervalInMilliseconds(schedulerEntity.getRepeatTime());\n\t\t\t\n\t\t} else {\n\t\t\tsimpleScheduleBuilder = SimpleScheduleBuilder.simpleSchedule().repeatForever()\n\t\t\t\t\t.withIntervalInMilliseconds(schedulerEntity.getRepeatTime());\n\t\t}\n\n\t\treturn TriggerBuilder.newTrigger().withIdentity(schedulerEntity.getJobName(), schedulerEntity.getJobGroup())\n\t\t\t\t.forJob(jobDetail).usingJobData(jobDetail.getJobDataMap()).startAt(date)\n\t\t\t\t.withDescription(schedulerEntity.getJobName()).withSchedule(simpleScheduleBuilder).build();\n\t}", "boolean containsTrigger(String sTriggerName);", "Definition createDefinition();", "@POST\n @Produces(MediaType.APPLICATION_JSON)\n @Consumes(MediaType.APPLICATION_JSON)\n @Path(\"/{alertId}/triggers\")\n @Description(\"Creates new triggers for the given alert ID.\")\n public List<TriggerDto> addTrigger(@Context HttpServletRequest req,\n @PathParam(\"alertId\") BigInteger alertId, TriggerDto triggerDto) {\n if (alertId == null || alertId.compareTo(BigInteger.ZERO) < 1) {\n throw new WebApplicationException(\"Alert Id cannot be null and must be a positive non-zero number.\", Status.BAD_REQUEST);\n }\n if (triggerDto == null) {\n throw new WebApplicationException(\"Null trigger object cannot be created.\", Status.BAD_REQUEST);\n }\n\n Alert alert = alertService.findAlertByPrimaryKey(alertId);\n\n if (alert != null) {\n validateResourceAuthorization(req, alert.getOwner(), getRemoteUser(req));\n\n Trigger trigger = new Trigger(alert, triggerDto.getType(), triggerDto.getName(), triggerDto.getThreshold(),\n triggerDto.getSecondaryThreshold(), triggerDto.getInertia());\n List<Trigger> triggers = new ArrayList<Trigger>(alert.getTriggers());\n\n triggers.add(trigger);\n alert.setTriggers(triggers);\n alert.setModifiedBy(getRemoteUser(req));\n return TriggerDto.transformToDto(alertService.updateAlert(alert).getTriggers());\n }\n throw new WebApplicationException(Response.Status.NOT_FOUND.getReasonPhrase(), Response.Status.NOT_FOUND);\n }", "public void setGroupName(String newGroupName)\n {\n this.groupName = newGroupName;\n }", "public SuperGroupCreateExecutor(Index index, SuperGroup superGroup) {\n super(index);\n this.superGroup = superGroup;\n }", "@POST\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"/{alertId}/notifications/{notificationId}/triggers/{triggerId}\")\n @Description(\n \"Associates the trigger having the given ID to the given notification ID. Both the trigger and notification must be owned by the alert.\"\n )\n public TriggerDto addTriggerToNotification(@Context HttpServletRequest req,\n @PathParam(\"alertId\") BigInteger alertId,\n @PathParam(\"notificationId\") BigInteger notificationId,\n @PathParam(\"triggerId\") BigInteger triggerId) {\n if (alertId == null || alertId.compareTo(BigInteger.ZERO) < 1) {\n throw new WebApplicationException(\"Alert Id cannot be null and must be a positive non-zero number.\", Status.BAD_REQUEST);\n }\n if (notificationId == null || notificationId.compareTo(BigInteger.ZERO) < 1) {\n throw new WebApplicationException(\"Notification Id cannot be null and must be a positive non-zero number.\", Status.BAD_REQUEST);\n }\n if (triggerId == null || triggerId.compareTo(BigInteger.ZERO) < 1) {\n throw new WebApplicationException(\"Trigger Id cannot be null and must be a positive non-zero number.\", Status.BAD_REQUEST);\n }\n\n Notification notification = null;\n Trigger alertTrigger = null;\n Alert alert = alertService.findAlertByPrimaryKey(alertId);\n\n if (alert == null) {\n throw new WebApplicationException(Status.NOT_FOUND.getReasonPhrase(), Status.NOT_FOUND);\n }\n validateResourceAuthorization(req, alert.getOwner(), getRemoteUser(req));\n for (Notification tempNotification : alert.getNotifications()) {\n if (tempNotification.getId().equals(notificationId)) {\n notification = tempNotification;\n break;\n }\n }\n if (notification == null) {\n throw new WebApplicationException(\"Notification Id does not exist for this alert.\", Status.BAD_REQUEST);\n }\n for (Trigger tempTrigger : alert.getTriggers()) {\n if (tempTrigger.getId().equals(triggerId)) {\n alertTrigger = tempTrigger;\n break;\n }\n }\n if (alertTrigger == null) {\n throw new WebApplicationException(\"Trigger Id does not exist for this alert. Create a trigger first then add it to the notification\",\n Status.BAD_REQUEST);\n }\n\n // Make sure that the notification does not have this trigger.\n for (Trigger tempTrigger : notification.getTriggers()) {\n if (tempTrigger.getId().equals(triggerId)) {\n throw new WebApplicationException(\"This trigger already exists for the notification.\", Status.BAD_REQUEST);\n }\n }\n\n List<Trigger> list = new ArrayList<Trigger>(notification.getTriggers());\n\n list.add(alertTrigger);\n notification.setTriggers(list);\n alert.setModifiedBy(getRemoteUser(req));\n alert = alertService.updateAlert(alert);\n for (Notification tempNotification : alert.getNotifications()) {\n if (tempNotification.getId().equals(notificationId)) {\n for (Trigger tempTrigger : notification.getTriggers()) {\n if (tempTrigger.getId().equals(triggerId)) {\n return TriggerDto.transformToDto(tempTrigger);\n }\n }\n }\n }\n throw new WebApplicationException(\"Trigger update failed.\", Status.INTERNAL_SERVER_ERROR);\n }", "public final void rule__XConstructorCall__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:13368:1: ( ( 'new' ) )\r\n // InternalDroneScript.g:13369:1: ( 'new' )\r\n {\r\n // InternalDroneScript.g:13369:1: ( 'new' )\r\n // InternalDroneScript.g:13370:2: 'new'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXConstructorCallAccess().getNewKeyword_1()); \r\n }\r\n match(input,84,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXConstructorCallAccess().getNewKeyword_1()); \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 }", "void create(Team team);", "public void addGroup(String name) {\n if(isGroup(name) == false) {\n /* Create a new groupchatpanel */\n GroupChatPanel gcp = new GroupChatPanel(guicontrol, concontrol, name);\n \n /* Add the group to the hashmap */\n grouptabs.put(name, gcp);\n \n /* Add the group to the JTabbedPane */\n tbMain.addTab(name, gcp);\n \n /* Now focus on the tab */\n tbMain.setSelectedComponent(gcp);\n \n /* Now focus on the TextField */\n gcp.tfSendPrep.requestFocusInWindow();\n }\n }", "public DriverForCreateBuilder groupId(Long groupId) {\r\n driverForCreate.setGroupId(groupId);\r\n return this;\r\n }", "void trigger(Entity e);", "@Override //to be moved to Cloud service\r\n\tpublic void createEvent(String eventName) {\n\t\t\r\n\t}", "Long insert(MessageGroup record);", "@Override\r\n\tpublic void create() {\n\t\tsuper.create();\r\n\t\t// Ground\r\n\t\tBodyDef groundBodyDef = new BodyDef();\r\n\t\tgroundBody = world.createBody(groundBodyDef);\r\n\t\tEdgeShape edgeShape = new EdgeShape();\r\n\t\tedgeShape.set(new Vector2(50.0f, 0.0f), new Vector2(50.0f, 0.0f));\r\n\t\tgroundBody.createFixture(edgeShape, 0.0f);\r\n \r\n\t\tcreateFirstGroupShape();\r\n\t\t// the second group\r\n\t\tcreateSecondGroupShape();\r\n\t}", "public BoundaryEventDefinitionBuilder addBoundaryEvent(final String name) {\n return new BoundaryEventDefinitionBuilder(getProcessBuilder(), getContainer(), activity, name, true);\n }", "public AddNewContactGroupAction() {\r\n\t\tsuper();\r\n\t}", "public static void main(String[] args) {\n DeleteTriggerCreator deleteTriggerCreator = new DeleteTriggerCreator();\n System.out.println(deleteTriggerCreator.createTrigger(\"ART_IB\".toLowerCase()));\n }", "public int createNewStaff(String name, int branchId) {\n clickOnBtn(ActionsEnum.Create.name());\n fillCreateOrEditForm(name, branchId);\n clickOnBtn(ActionsEnum.Save.name());\n waitForElementInvisibility(xpathBtn.replace(\"*btn*\", ActionsEnum.Save.name()));\n int id = getMaxId();\n logger.info(\"# Newly Created Staff's Id: \" + id);\n return id;\n }", "@Transactional\n public synchronized GroupEntity createGroup(String groupName, GroupType groupType) {\n // create an admin principal to represent this group\n PrincipalTypeEntity principalTypeEntity = principalTypeDAO.findById(PrincipalTypeEntity.GROUP_PRINCIPAL_TYPE);\n if (principalTypeEntity == null) {\n principalTypeEntity = new PrincipalTypeEntity();\n principalTypeEntity.setId(PrincipalTypeEntity.GROUP_PRINCIPAL_TYPE);\n principalTypeEntity.setName(PrincipalTypeEntity.GROUP_PRINCIPAL_TYPE_NAME);\n principalTypeDAO.create(principalTypeEntity);\n }\n PrincipalEntity principalEntity = new PrincipalEntity();\n principalEntity.setPrincipalType(principalTypeEntity);\n principalDAO.create(principalEntity);\n\n final GroupEntity groupEntity = new GroupEntity();\n groupEntity.setGroupName(groupName);\n groupEntity.setPrincipal(principalEntity);\n groupEntity.setGroupType(groupType);\n\n groupDAO.create(groupEntity);\n return groupEntity;\n }", "public int createNewStaff(String name, String branch) {\n clickOnBtn(ActionsEnum.Create.name());\n fillCreateOrEditForm(name, branch);\n clickOnBtn(ActionsEnum.Save.name());\n waitForElementInvisibility(xpathBtn.replace(\"*btn*\", ActionsEnum.Save.name()));\n int id = getMaxId();\n logger.info(\"# Newly Created Staff's Id: \" + id);\n return id;\n }", "@FXML\n\tprivate void createGroup(ActionEvent event){\n\t\tif(subgroup_menu.getValue().equals(\"--- INGEN ---\")){\n\t\t\tif(GroupName_field.getText().equals(\"\")){\n\t\t\t\tmakeDialog(\"Du må gi gruppen et navn.\");\n\t\t\t} else {\n\t\t\t\tDatabaseInterface db = new DatabaseInterface();\n\t\t\t\tdb.setGroup(GroupName_field.getText(), findInvited());\n\t\t\t\tStage stage = (Stage) create_btn.getScene().getWindow();\n\t\t\t stage.close();\n\t\t\t}\n\t//-------This kicks in if a user chose a group in the dropdown menu-----\\\\\n\t\t} else {\n\t\t\tif(GroupName_field.getText().equals(\"\")){\n\t\t\t\tmakeDialog(\"Du må gi gruppen et navn.\");\n\t\t\t} else {\n\t\t\t\tDatabaseInterface db = new DatabaseInterface();\n\t\t\t\tString supergroup_name = (String) subgroup_menu.getValue();\n\t\t\t\tint SubGroupId = db.setGroup(GroupName_field.getText(), findInvited()).getGroup_id();\n\t\t\t\tint SuperGroupId = getSupergroupID(supergroup_name);\n\t\t\t\tdb.setSubGroup(SuperGroupId, SubGroupId);\n\t\t\t\tStage stage = (Stage) create_btn.getScene().getWindow();\n\t\t\t stage.close();\n\t\t\t}\n\t\t}\n\t\t\n\t}" ]
[ "0.6327168", "0.58971566", "0.57014585", "0.5582321", "0.5555977", "0.5331999", "0.52388555", "0.5235219", "0.5223564", "0.51927745", "0.5148791", "0.5108757", "0.50902355", "0.5079169", "0.5006604", "0.49921846", "0.4953912", "0.49213076", "0.4901366", "0.48941147", "0.48636156", "0.48270017", "0.47859213", "0.4779266", "0.4757434", "0.47527063", "0.47399887", "0.47329184", "0.47114384", "0.4670268", "0.4657318", "0.45999074", "0.45832407", "0.45351815", "0.45248044", "0.44930527", "0.4478889", "0.4474483", "0.44743702", "0.4468693", "0.44605577", "0.4453619", "0.4427679", "0.4427679", "0.442671", "0.44217372", "0.44033518", "0.44015136", "0.4398946", "0.43948552", "0.43774006", "0.43770003", "0.4372509", "0.43685508", "0.4363611", "0.43558535", "0.4354898", "0.43481427", "0.4341515", "0.4341513", "0.43312502", "0.43226445", "0.43196392", "0.43195274", "0.43140694", "0.43103147", "0.4306206", "0.4303589", "0.42983285", "0.4297558", "0.42963547", "0.42948034", "0.42939594", "0.42921454", "0.42876402", "0.42790297", "0.4258178", "0.4251737", "0.42402658", "0.42368573", "0.42361268", "0.42241237", "0.42215148", "0.4219681", "0.4219078", "0.42180955", "0.42161062", "0.42159975", "0.4214468", "0.42127997", "0.42108107", "0.42096862", "0.4206543", "0.41961756", "0.41956943", "0.4194208", "0.41922253", "0.4189711", "0.41883343", "0.41855443" ]
0.62004584
1
/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Interface. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get the name of this Trigger.
public String getName() { return name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public EventName getName() {\n return this.name;\n }", "public static String getTriggerField(){\n return WHAT_IS_THE_SOURCE_OF_FUNDS.getFieldNameValue();\n }", "public String getName ( ) {\n\t\treturn extract ( handle -> handle.getName ( ) );\n\t}", "ITrigger getTrigger(String sTriggerName);", "public String getName() {\n\t\treturn this.toString();\n\t}", "@Override\n public String toString() {\n return \"Trigger '\" + getFullName() + \"': triggerClass: '\"\n + getClass().getName() + \" calendar: '\" + getCalendarName() \n + \"' misfireInstruction: \" + getMisfireInstruction() \n + \" nextFireTime: \" + getNextFireTime();\n }", "private String resolveName()\n {\n\n String forwardName = null;\n\n // trigger\n final EventFacade trigger = this.getTrigger();\n\n if (trigger != null)\n {\n\n forwardName = trigger.getName();\n\n }\n\n // name\n if (forwardName == null)\n {\n\n forwardName = this.getName();\n\n }\n\n // target\n if (forwardName == null)\n {\n\n forwardName = this.getTarget().getName();\n\n }\n\n // else\n if (forwardName == null)\n {\n\n forwardName = \"unknown\";\n\n }\n\n // return\n return forwardName;\n\n }", "public java.lang.String getName();", "String getWebhookName();", "@Override\n public String getName() {\n return this.name();\n }", "@Override\n\t\tfinal public String getName() {\n\t\t\treturn this.Name;\n\t\t}", "@Override\n\tpublic String getName() {\n\n\t\treturn name;\n\t}", "public Trigger getTrigger() {\n \t\treturn trigger;\n \t}", "@Nonnull String getName();", "public String getName() {\r\n\t\treturn name.get();\r\n\t}", "public String getName() {\r\n return this.name();\r\n }", "@Override\r\n\tpublic String getName() {\n\t\treturn this.name;\r\n\t}", "public String propertyName() {\n\t\t\treturn target != null ? target : name;\n\t\t}", "@Override\n\tpublic String getName() {\n\t\treturn this.name;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn this.name;\n\t}", "public String getNameReference() { \n\t\treturn getNameReferenceElement().getValue();\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn super.getName();\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn super.getName();\n\t}", "public String getName() {\n return name.get();\n }", "public String getName() {\r\n return getDef().getName();\r\n }", "@Override\n\tpublic String getName() {\n\t\tfinal PsiElement nameIdentifier = getNameIdentifier();\n\t\treturn nameIdentifier != null ? nameIdentifier.getText() : getText();\n\t}", "public String getName() { \n\t\treturn getNameElement().getValue();\n\t}", "public String getName() { \n\t\treturn getNameElement().getValue();\n\t}", "public String getName() { \n\t\treturn getNameElement().getValue();\n\t}", "@Override\r\n\tpublic String getName() \r\n\t{\r\n\t\treturn this._name;\r\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn this.name;\n\t\t\n\t}", "public final String getName() {\n if (name == null) {\n name = this.getClass().getSimpleName().substring(3);\n }\n return name;\n }", "@Override\n\t\t\tpublic String getName() {\n\t\t\t\treturn name;\n\t\t\t}", "@Override\n public String getName() {\n return this.getClass().getSimpleName();\n }", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "public Object getName() {\n\t\treturn this.name;\n\t}", "public Object getName() {\n\t\treturn this.name;\n\t}", "public String getName() {\n return instance.getName();\n }", "@Override\n public String toString() {\n StringBuffer buf = new StringBuffer(\"TriggerEvent{name=\");\n buf.append(name).append(\",type=\").append(type);\n if (payload != null) {\n buf.append(\",payload=\").append(payload.toString());\n }\n buf.append(\"}\");\n return String.valueOf(buf);\n }", "public String getName() {\n\t\treturn name; // Replace with your code\n\t}", "public String getName() {\n return getProperty(Property.NAME);\n }", "@Override\n public String getName() {\n return name();\n }", "@Override\r\n\tpublic String getName() {\n\t\treturn name;\r\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn name;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn name;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn name;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn name;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn name;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn name;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn name;\n\t}" ]
[ "0.7155335", "0.6840671", "0.6803958", "0.6802454", "0.6753956", "0.6721266", "0.6714002", "0.6700054", "0.6690587", "0.66841125", "0.6624713", "0.66245687", "0.6619379", "0.6609503", "0.65964615", "0.65890473", "0.65870506", "0.65847063", "0.6574639", "0.6574639", "0.65309924", "0.6528522", "0.6528522", "0.65262145", "0.65259904", "0.65258497", "0.6523662", "0.6523662", "0.6523662", "0.6520019", "0.65139836", "0.65139186", "0.6509241", "0.65083236", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.6507471", "0.65022576", "0.65022576", "0.6501346", "0.6500562", "0.64930284", "0.64857763", "0.6482308", "0.647801", "0.64620364", "0.64620364", "0.64620364", "0.64620364", "0.64620364", "0.64620364", "0.64620364" ]
0.0
-1
Set the name of this Trigger.
public void setName(String name) { if (name == null || name.trim().length() == 0) { throw new IllegalArgumentException( "Trigger name cannot be null or empty."); } this.name = name; this.key = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@IcalProperty(pindex = PropertyInfoIndex.NAME,\n required = true,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true)\n public void setName(final String val) {\n name = val;\n }", "public void setName(String name) {\n\t\tthis.name = name;\n\t\tfireChange();\n\t}", "public void setName(String name) {\r\n String oldValue = this.name;\r\n this.name = name;\r\n propertyChangeSupport.firePropertyChange(PROPERTY_NAME, oldValue, name);\r\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\r\n\tpublic void setName(String name) {\n\t\tthis.name = name;\r\n\t}", "@Override\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\t}", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\n\t}", "public void setName(String name) {\n ModelEvent<?> event = new ModelEventBuilder( ModelEventType.NAME_MODIFIED, this ).setOldValue( this.name )\n .setNewValue( name ).buildEvent();\n\n this.name = name;\n publishEvent( event );\n }", "@Override\n public void setName(String name)\n {\n checkState();\n this.name = name;\n }", "public void setName(final String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(final String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(final String name) {\n this.name = name;\n }", "public void setName(final String name) {\n this.name = name;\n }", "public void setName(final String name) {\n this.name = name;\n }", "public void setName(final String name) {\n this.name = name;\n }", "public void setName(final String name) {\n\t\tthis.name = name;\n\t}", "public void setName(final String name) {\n\t\tthis.name = name;\n\t}", "public void setName(final String name) {\n\t\tthis.name = name;\n\t}", "public void setName(final String name) {\n\t\tthis.name = name;\n\t}", "public void setName(final String name) {\n this.name = name;\n }", "public void setName(final String name) {\n this.name = name;\n }", "public final void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\r\n\t\t_name = name;\r\n\t}", "public void setName(final String name) {\n mName = name;\n }", "public void setName (String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName( final String name )\r\n {\r\n this.name = name;\r\n }", "public void setName(String name) {\n\t\t\tthis.name = name;\n\t\t}", "public void setName(String name) {\n\t\t\tthis.name = name;\n\t\t}", "public void setName(String name) {\n _name = name;\n }", "public void setName(String name) {\n\t this.name = name;\n\t }", "public void setName( final String name )\n\t{\n\t\tthis.name = name;\n\t}", "public void setName(String name)\n {\n fName = name;\n }", "public void setName(String name) {\n if (!name.isEmpty()) {\n this.name = name;\n }\n }", "public void setName (String name) {\n this.name = name;\n }", "public void setName (String name) {\n this.name = name;\n }", "public void setName (String name) {\n this.name = name;\n }", "public void setName( String name ) {\n this.name = name;\n }", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n this._name = name;\r\n }", "public void setName(String name) {\n\n this.name = name;\n }", "public void setName(String name) {\r\r\n\t\tthis.name = name;\r\r\n\t}", "public void setName (String name) {\n this.name = name;\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "protected void setName(String name) {\n \t\tString oldName = this.name;\n \t\tthis.name = name;\n \t\tfirePropertyChange(PROPERTY_NAME, oldName, name);\n \t}", "protected void setName(String name) {\n this._name = name;\n }", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\n\t\tmName = name;\n\t}", "public void setName(String name)\n {\n this.name = name;\n }", "protected void setName(String name) {\n this.name = name;\n }", "public void setName( String name )\n {\n this.name = name;\n }", "public void setName( String name )\n {\n this.name = name;\n }", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}" ]
[ "0.7416927", "0.73762095", "0.7369624", "0.7353112", "0.7353112", "0.7334962", "0.7310596", "0.72887456", "0.72887456", "0.7279359", "0.72772485", "0.72731066", "0.72708267", "0.72708267", "0.72578573", "0.72578573", "0.72578573", "0.72578573", "0.7237988", "0.7237988", "0.7237988", "0.7237988", "0.7237654", "0.7237654", "0.7217742", "0.7213886", "0.72050196", "0.7204931", "0.7201201", "0.71848667", "0.71848667", "0.71809125", "0.71703565", "0.71687496", "0.71674234", "0.7163849", "0.7159406", "0.7159406", "0.7159406", "0.71578544", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.7150155", "0.714376", "0.71423364", "0.7141776", "0.7138518", "0.7138518", "0.7138518", "0.71303564", "0.71303564", "0.71303564", "0.71303564", "0.7129742", "0.7129274", "0.7127674", "0.7127674", "0.7127674", "0.71273375", "0.7126308", "0.7121002", "0.7119367", "0.7119367", "0.7118516", "0.7118516", "0.7118516", "0.7118516", "0.7118516", "0.7118516", "0.7118516", "0.7118516" ]
0.8429008
0
Get the group of this Trigger.
public String getGroup() { return group; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getGroup() {\n\t\treturn group;\n\t}", "public String getGroup() {\n return this.group;\n }", "public Group getGroup() {\n return group;\n }", "public String getGroup ()\n {\n return group;\n }", "public String getGroup ()\n {\n return group;\n }", "public int getGroup() {\n return group;\n }", "public Group getGroup() {\n return _group;\n }", "public String getGroup() {\n if (overrideGroupKey != null) {\n return overrideGroupKey;\n }\n return getNotification().getGroup();\n }", "public long getGroup()\r\n { return group; }", "public Group getGroup() {\n return this.inGroup;\n }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public String getGroupKey() {\n return groupKey;\n }", "public Group getGroup() {\r\n\t\tif (this.group == null)\r\n\t\t\tthis.group = this.groupEjb.getGroupById(this.getGroupId());\r\n\t\treturn this.group;\r\n\t}", "public String getGroup() {\n return groupName;\n }", "public UserGroup getGroup() {\n return group;\n }", "public String getGroupKey() {\n return this.GroupKey;\n }", "public String group() { return group; }", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.Group getGroup();", "public int getGroupID() {\n return groupID;\n }", "@Override\n\tpublic String getGroup() {\n\t\treturn \"Group_\"+SliceName(stdClass);\n\t}", "public Long getGroupID()\n {\n return groupID;\n }", "public String getGroupUuid() {\n\t\treturn groupUuid;\n\t}", "public String groupId() {\n return this.groupId;\n }" ]
[ "0.76772094", "0.76552945", "0.763737", "0.7619076", "0.7619076", "0.7583818", "0.75316", "0.7480858", "0.72108364", "0.7175308", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.7120999", "0.70971435", "0.7065575", "0.70636314", "0.7015169", "0.6994987", "0.69386107", "0.6853611", "0.6794771", "0.6783311", "0.67398554", "0.67351353", "0.6724443" ]
0.7678965
1
Set the name of this Trigger.
public void setGroup(String group) { if (group != null && group.trim().length() == 0) { throw new IllegalArgumentException( "Group name cannot be an empty string."); } if(group == null) { group = Scheduler.DEFAULT_GROUP; } this.group = group; this.key = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setName(String name) {\n if (name == null || name.trim().length() == 0) {\n throw new IllegalArgumentException(\n \"Trigger name cannot be null or empty.\");\n }\n\n this.name = name;\n this.key = null;\n }", "@IcalProperty(pindex = PropertyInfoIndex.NAME,\n required = true,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true)\n public void setName(final String val) {\n name = val;\n }", "public void setName(String name) {\n\t\tthis.name = name;\n\t\tfireChange();\n\t}", "public void setName(String name) {\r\n String oldValue = this.name;\r\n this.name = name;\r\n propertyChangeSupport.firePropertyChange(PROPERTY_NAME, oldValue, name);\r\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\r\n\tpublic void setName(String name) {\n\t\tthis.name = name;\r\n\t}", "@Override\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\t}", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\n\t}", "public void setName(String name) {\n ModelEvent<?> event = new ModelEventBuilder( ModelEventType.NAME_MODIFIED, this ).setOldValue( this.name )\n .setNewValue( name ).buildEvent();\n\n this.name = name;\n publishEvent( event );\n }", "@Override\n public void setName(String name)\n {\n checkState();\n this.name = name;\n }", "public void setName(final String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(final String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(final String name) {\n this.name = name;\n }", "public void setName(final String name) {\n this.name = name;\n }", "public void setName(final String name) {\n this.name = name;\n }", "public void setName(final String name) {\n this.name = name;\n }", "public void setName(final String name) {\n\t\tthis.name = name;\n\t}", "public void setName(final String name) {\n\t\tthis.name = name;\n\t}", "public void setName(final String name) {\n\t\tthis.name = name;\n\t}", "public void setName(final String name) {\n\t\tthis.name = name;\n\t}", "public void setName(final String name) {\n this.name = name;\n }", "public void setName(final String name) {\n this.name = name;\n }", "public final void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\r\n\t\t_name = name;\r\n\t}", "public void setName(final String name) {\n mName = name;\n }", "public void setName (String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName( final String name )\r\n {\r\n this.name = name;\r\n }", "public void setName(String name) {\n\t\t\tthis.name = name;\n\t\t}", "public void setName(String name) {\n\t\t\tthis.name = name;\n\t\t}", "public void setName(String name) {\n _name = name;\n }", "public void setName(String name) {\n\t this.name = name;\n\t }", "public void setName( final String name )\n\t{\n\t\tthis.name = name;\n\t}", "public void setName(String name)\n {\n fName = name;\n }", "public void setName(String name) {\n if (!name.isEmpty()) {\n this.name = name;\n }\n }", "public void setName (String name) {\n this.name = name;\n }", "public void setName (String name) {\n this.name = name;\n }", "public void setName (String name) {\n this.name = name;\n }", "public void setName( String name ) {\n this.name = name;\n }", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n this._name = name;\r\n }", "public void setName(String name) {\n\n this.name = name;\n }", "public void setName(String name) {\r\r\n\t\tthis.name = name;\r\r\n\t}", "public void setName (String name) {\n this.name = name;\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "protected void setName(String name) {\n \t\tString oldName = this.name;\n \t\tthis.name = name;\n \t\tfirePropertyChange(PROPERTY_NAME, oldName, name);\n \t}", "protected void setName(String name) {\n this._name = name;\n }", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\n\t\tmName = name;\n\t}", "public void setName(String name)\n {\n this.name = name;\n }", "protected void setName(String name) {\n this.name = name;\n }", "public void setName( String name )\n {\n this.name = name;\n }", "public void setName( String name )\n {\n this.name = name;\n }", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}" ]
[ "0.8429008", "0.7416927", "0.73762095", "0.7369624", "0.7353112", "0.7353112", "0.7334962", "0.7310596", "0.72887456", "0.72887456", "0.7279359", "0.72772485", "0.72731066", "0.72708267", "0.72708267", "0.72578573", "0.72578573", "0.72578573", "0.72578573", "0.7237988", "0.7237988", "0.7237988", "0.7237988", "0.7237654", "0.7237654", "0.7217742", "0.7213886", "0.72050196", "0.7204931", "0.7201201", "0.71848667", "0.71848667", "0.71809125", "0.71703565", "0.71687496", "0.71674234", "0.7163849", "0.7159406", "0.7159406", "0.7159406", "0.71578544", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.715694", "0.7150155", "0.714376", "0.71423364", "0.7141776", "0.7138518", "0.7138518", "0.7138518", "0.71303564", "0.71303564", "0.71303564", "0.71303564", "0.7129742", "0.7129274", "0.7127674", "0.7127674", "0.7127674", "0.71273375", "0.7126308", "0.7121002", "0.7119367", "0.7119367", "0.7118516", "0.7118516", "0.7118516", "0.7118516", "0.7118516", "0.7118516", "0.7118516", "0.7118516" ]
0.0
-1
Returns the 'full name' of the Trigger in the format "group.name".
public String getFullName() { return group + "." + name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getName() {\n return String.format(\"%s %s\", getFirst(), getLast());\n }", "public static String getTriggerField(){\n return WHAT_IS_THE_SOURCE_OF_FUNDS.getFieldNameValue();\n }", "public String getNamePrefix() {\n if ( group==null )\n return super.getNamePrefix();\n else\n return group.getNamePrefix();\n }", "public String getOriginalName() {\n return group.getName();\n }", "public String getName()\n {\n return groupService.getName(this);\n }", "public String getFullName()\n {\n String schema = db.getSchema();\n return (schema!=null) ? schema+\".\"+name : name;\n }", "public String getFormatName() {\n\t\tString name = getName();\n\t\tif (name.startsWith(SpotlessPlugin.EXTENSION)) {\n\t\t\tString after = name.substring(SpotlessPlugin.EXTENSION.length());\n\t\t\tif (after.endsWith(SpotlessPlugin.CHECK)) {\n\t\t\t\treturn after.substring(0, after.length() - SpotlessPlugin.CHECK.length()).toLowerCase(Locale.US);\n\t\t\t} else if (after.endsWith(SpotlessPlugin.APPLY)) {\n\t\t\t\treturn after.substring(0, after.length() - SpotlessPlugin.APPLY.length()).toLowerCase(Locale.US);\n\t\t\t}\n\t\t}\n\t\treturn name;\n\t}", "public String getFullName() {\n return getFullMethodName(method);\n }", "public String getName(){\n \treturn this.name().replace(\"_\", \" \");\n }", "private String resolveName()\n {\n\n String forwardName = null;\n\n // trigger\n final EventFacade trigger = this.getTrigger();\n\n if (trigger != null)\n {\n\n forwardName = trigger.getName();\n\n }\n\n // name\n if (forwardName == null)\n {\n\n forwardName = this.getName();\n\n }\n\n // target\n if (forwardName == null)\n {\n\n forwardName = this.getTarget().getName();\n\n }\n\n // else\n if (forwardName == null)\n {\n\n forwardName = \"unknown\";\n\n }\n\n // return\n return forwardName;\n\n }", "public String getFullJobName() {\n return jobGroup + \".\" + jobName;\n }", "public String getName()\r\n \t{\n \t\treturn (explicit ? (module.length() > 0 ? module + \"`\" : \"\") : \"\")\r\n \t\t\t\t+ name + (old ? \"~\" : \"\"); // NB. No qualifier\r\n \t}", "@Override\n public String toString() {\n return \"Trigger '\" + getFullName() + \"': triggerClass: '\"\n + getClass().getName() + \" calendar: '\" + getCalendarName() \n + \"' misfireInstruction: \" + getMisfireInstruction() \n + \" nextFireTime: \" + getNextFireTime();\n }", "public String getAbsoluteName() {\n\t\tint index = this.getName().indexOf(\".\");\n\t\tif (index == -1)\n\t\t\treturn this.getName();\n\t\telse\n\t\t\treturn this.getName().substring(0, index);\n\t}", "public String getSimpleName() {\n final var lastDotIdx = name.lastIndexOf('.');\n return name.substring(lastDotIdx + 1);\n }", "public String getName ( ) {\n\t\treturn extract ( handle -> handle.getName ( ) );\n\t}", "public String getBName() {\n\t\tif (getAbsoluteName)\n\t\t\treturn absoluteName;\n\t\telse\n\t\t\treturn shortName;\n\t}", "public final String getName() {\n String ret = null;\n for (String s : getNameFields()) {\n if (ret == null) {\n ret = get(s);\n } else {\n ret = ret + \",\" + get(s);\n }\n }\n return ret;\n }", "public String provideFullName( )\r\n {\r\n return String.format( \"%s %s\",\r\n getFirstNm( ),\r\n getLastNm( ) );\r\n }", "PropertyName getName();", "private String formatLoggerName(LogRecord record)\n\t{\n\t\tString loggerName = record.getLoggerName();\n\t\tif(loggerName.startsWith(LOG_SOURCE_PREFIX))\n\t\t{\n\t\t\tloggerName = loggerName.substring(LOG_SOURCE_PREFIX.length());\n\t\t}\n\t\treturn loggerName;\n\t}", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "protected String getMetricName(MetricName metricName) {\n return format(\"%s.%s\", metricName.group(), metricName.name());\n }", "String getFullName() {\r\n StringBuffer buf = new StringBuffer(type.getName());\r\n Summary current = type.getParent();\r\n\r\n while (current != null) {\r\n if (current instanceof TypeSummary) {\r\n buf.insert(0, \".\");\r\n buf.insert(0, ((TypeSummary)current).getName());\r\n } else if (current instanceof PackageSummary) {\r\n String temp = ((PackageSummary)current).getName();\r\n\r\n if ((temp != null) && (temp.length() > 0)) {\r\n buf.insert(0, \".\");\r\n buf.insert(0, temp);\r\n }\r\n }\r\n current = current.getParent();\r\n }\r\n\r\n return buf.toString();\r\n }", "public java.lang.String getName();", "@Override\n\tpublic String getName() {\n\t\tfinal String name = super.getName();\n\t\ttry {\n\t\t\treturn name.substring(namespace.length()+1);\n\t\t} catch (Exception e) {\n\t\t\treturn name;\n\t\t}\n\t}", "private String name() {\r\n return cls.getSimpleName() + '.' + mth;\r\n }", "private static String extractGroupName(FloodyGroup floodyGroup) {\n return isBlank(floodyGroup.name())\n ? (\"FloodyGroup-\"\n +\n // append random long number to ensure unique group name\n new Random().nextLong())\n : floodyGroup.name();\n }", "String fullName();", "public String propertyName() {\n\t\t\treturn target != null ? target : name;\n\t\t}", "@Override\n public String getName() {\n final String name = getClass().getName();\n final int lastDollar = name.lastIndexOf('$');\n return name.substring(lastDollar + 1);\n }", "public String getName() {\n return (\"(\" + this.source.getName() + \",\" + this.destination.getName() + \")\");\n }", "public String name() {\n return (parts.length > 0) ? parts[parts.length - 1] : null;\n }", "public static String getCurrentMethodName() {\n\t\tStackTraceElement stackTraceElements[] = (new Throwable()).getStackTrace();\n\t\tString fullString = stackTraceElements[1].toString();\n\t\tint stringEnd = fullString.indexOf('(');\n\t\tString fullName = fullString.substring(0, stringEnd);\n\t\tint start = fullName.lastIndexOf('.') + 1;\n\t\tString methodName = fullName.substring(start);\n\n\t\treturn methodName;\n\t}", "private String getLoggerName(LoggingEvent event) {\n int index = event.getLoggerName().lastIndexOf('.');\n\n return (index > -1) ?\n event.getLoggerName().substring(index + 1) :\n event.getLoggerName();\n }", "String getWebhookName();", "public String getGroupName() {\n GitLabGroupInfo groupInfo = getGroupInfo();\n return (groupInfo != null) ? groupInfo.getName() : \"<could not fetch group information>\";\n }", "public String getName() {\n // defaults to class name\n String className = getClass().getName();\n return className.substring(className.lastIndexOf(\".\")+1);\n }", "public String getMethodName() {\n return LOG_TAG + \":\" + this.getClass().getSimpleName() + \".\" + new Throwable().getStackTrace()[1].getMethodName();\n }", "public String getLastNameFieldName() {\n return getStringProperty(LAST_NAME_FIELD_NAME_KEY);\n }", "public String getFullyQualifiedName();", "public String getNameForm()\n {\n return schema.getNameForm();\n }", "default String getQualifiedName() {\n return declaringType().getQualifiedName() + \".\" + this.getName();\n }", "BaseComponent getComponentName();", "public String getGroupname()\n {\n return group2d;\n }", "public String getLocalizedName()\n {\n return StatCollector.translateToLocal(this.getUnlocalizedName() + \".\" + TreeOresLogs2.EnumType.DIAMOND.getUnlocalizedName() + \".name\");\n }", "String getFieldName();", "public String getFQN(){\n\t\treturn this.tsApp.getFQN()+\"_\"+this.tsName;\n\t}", "public String getCaseName() {\n\t\tStackTraceElement stack[] = (new Throwable()).getStackTrace();\n\t\tint i = stack[1].toString().indexOf(\"(\");\n\t\tString tempStr1 = stack[1].toString().substring(0, i);\n\t\treturn tempStr1.trim();\n\t}" ]
[ "0.6429217", "0.62845325", "0.6278667", "0.6249849", "0.6233518", "0.6212298", "0.6084226", "0.6081472", "0.6013476", "0.5934209", "0.59247106", "0.59130186", "0.590593", "0.5847101", "0.5764783", "0.57040334", "0.56875247", "0.5670106", "0.56489456", "0.5627575", "0.56191754", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.561688", "0.5614122", "0.5596431", "0.5594101", "0.5585237", "0.558349", "0.55833584", "0.5580038", "0.5578287", "0.5561323", "0.55427265", "0.5521698", "0.5513044", "0.550446", "0.5503993", "0.54979706", "0.54950684", "0.5487409", "0.5483827", "0.5473189", "0.54711753", "0.54706925", "0.5461199", "0.54588985", "0.5433624", "0.5427679", "0.54209226", "0.54195493" ]
0.68031365
0
Returns the 'full name' of the Job that the Trigger points to, in the format "group.name".
public String getFullJobName() { return jobGroup + "." + jobName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getTargetJobName();", "public String getJobName() {\n return this.mJob;\n }", "public java.lang.String getTargetJobName() {\n java.lang.Object ref = targetJobName_;\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 targetJobName_ = s;\n }\n return s;\n }\n }", "@Override\n\tpublic String getJobName() {\n\t\treturn model.getJobName();\n\t}", "public java.lang.String getTargetJobName() {\n java.lang.Object ref = targetJobName_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n targetJobName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getJobName() {\n return this.JobName;\n }", "public String getJobName() {\n return this.jobName;\n }", "public String getJobName() {\n return jobName;\n }", "public String getJobName() {\n return jobName;\n }", "public String getFullName() {\n return group + \".\" + name;\n }", "com.google.protobuf.ByteString\n getTargetJobNameBytes();", "public com.google.protobuf.ByteString\n getTargetJobNameBytes() {\n java.lang.Object ref = targetJobName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n targetJobName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getTargetJobNameBytes() {\n java.lang.Object ref = targetJobName_;\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 targetJobName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n public String getTypeName() {\n return job_name;\n }", "@Override\n public String getJobName() {\n return operate_name;\n }", "public String getJob() {\r\n\t\t\treturn job;\r\n\t\t}", "public String getName()\n {\n return groupService.getName(this);\n }", "@Digits(integer=9,fraction=0)\n\t@Override\n\tpublic String getJob() {\n\t\treturn super.getJob();\n\t}", "public String getJob() {\n return job;\n }", "java.lang.String getJobId();", "public String getNamePrefix() {\n if ( group==null )\n return super.getNamePrefix();\n else\n return group.getNamePrefix();\n }", "public String getName() {\n return String.format(\"%s %s\", getFirst(), getLast());\n }", "public String getOriginalName() {\n return group.getName();\n }", "public String getBName() {\n\t\tif (getAbsoluteName)\n\t\t\treturn absoluteName;\n\t\telse\n\t\t\treturn shortName;\n\t}", "String getTaskName();", "String getTaskName();", "public String getJobId();", "public java.lang.String getJobId() {\n java.lang.Object ref = jobId_;\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 jobId_ = s;\n }\n return s;\n }\n }", "public String getFullName()\n {\n String schema = db.getSchema();\n return (schema!=null) ? schema+\".\"+name : name;\n }", "private String getTaskName() {\n \n \t\treturn this.environment.getTaskName() + \" (\" + (this.environment.getIndexInSubtaskGroup() + 1) + \"/\"\n \t\t\t+ this.environment.getCurrentNumberOfSubtasks() + \")\";\n \t}", "java.lang.String getHangmogName();", "public final String get_name() {\n return scheduler_name;\n }", "public String getAbsoluteName() {\n\t\tint index = this.getName().indexOf(\".\");\n\t\tif (index == -1)\n\t\t\treturn this.getName();\n\t\telse\n\t\t\treturn this.getName().substring(0, index);\n\t}", "protected String get_object_name() {\n\t\treturn this.servicegroupname;\n\t}", "public java.lang.String getJobId() {\n java.lang.Object ref = jobId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n jobId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "private String resolveName()\n {\n\n String forwardName = null;\n\n // trigger\n final EventFacade trigger = this.getTrigger();\n\n if (trigger != null)\n {\n\n forwardName = trigger.getName();\n\n }\n\n // name\n if (forwardName == null)\n {\n\n forwardName = this.getName();\n\n }\n\n // target\n if (forwardName == null)\n {\n\n forwardName = this.getTarget().getName();\n\n }\n\n // else\n if (forwardName == null)\n {\n\n forwardName = \"unknown\";\n\n }\n\n // return\n return forwardName;\n\n }", "public static String getName(Entity building) {\n\t\treturn (String) building.getProperty(NAME_PROPERTY);\n\t}", "public String getTaskName();", "public String getGroupName() {\n GitLabGroupInfo groupInfo = getGroupInfo();\n return (groupInfo != null) ? groupInfo.getName() : \"<could not fetch group information>\";\n }", "public String name() {\n return (parts.length > 0) ? parts[parts.length - 1] : null;\n }", "public final String getName() {\n return \"job-priority\";\n }", "public String getSrcJobTitle() {\r\n return (String) getAttributeInternal(SRCJOBTITLE);\r\n }", "public String getBatchName(G group, Batch<K, T> batch) {\n return \"batch(\" + batch.size() + \")\";\n }", "java.lang.String getExecutionStageName();", "public String getFullName() {\n return proteinIdentifier.getFullName() + \"_\" + chainId;\n }", "String getBaseQueueName();", "String fullName();", "public String getTaskName() {\n Object ref = taskName_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n taskName_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "java.lang.String getQueueName();", "public String getJobProperty() {\r\n return jobProperty;\r\n }", "String jobTableName();", "public String getName() {\n int index = getSplitIndex();\n return path.substring(index + 1);\n }", "public String getName() {\n // defaults to class name\n String className = getClass().getName();\n return className.substring(className.lastIndexOf(\".\")+1);\n }", "public String getDisplayName() {\n return Messages.JobProfiles_displayName();\n }", "public String getFormatName() {\n\t\tString name = getName();\n\t\tif (name.startsWith(SpotlessPlugin.EXTENSION)) {\n\t\t\tString after = name.substring(SpotlessPlugin.EXTENSION.length());\n\t\t\tif (after.endsWith(SpotlessPlugin.CHECK)) {\n\t\t\t\treturn after.substring(0, after.length() - SpotlessPlugin.CHECK.length()).toLowerCase(Locale.US);\n\t\t\t} else if (after.endsWith(SpotlessPlugin.APPLY)) {\n\t\t\t\treturn after.substring(0, after.length() - SpotlessPlugin.APPLY.length()).toLowerCase(Locale.US);\n\t\t\t}\n\t\t}\n\t\treturn name;\n\t}", "public String getTaskName() {\n Object ref = taskName_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n taskName_ = s;\n return s;\n }\n }", "public String queueName();", "public String getName()\r\n \t{\n \t\treturn (explicit ? (module.length() > 0 ? module + \"`\" : \"\") : \"\")\r\n \t\t\t\t+ name + (old ? \"~\" : \"\"); // NB. No qualifier\r\n \t}", "public String getName()\r\n {\r\n return taskName;\r\n }", "public String getName() {\n\t\treturn this.toString();\n\t}", "private String buildMessageSubject(NotificationJob job) {\n\t\treturn MessageFormat.format( SUBJECT_FORMAT,\n\t\t\t\tjob.getAction().getDisplayLabel( Locale.getDefault() ),\n\t\t\t\tmanager.getDisplayName() );\n\t}", "public String getPjName() {\n return pjName;\n }", "public static String getCompName(String fullName) {\n\t\tString name = cutMetaExt(fullName);\n\t\tint i = name.lastIndexOf(\".\");\n\t\tif (i < 0)\n\t\t\treturn name;\n\t\treturn name.substring(0, i); // cut comp name from path's string\n\t}", "@Override\n public String getDisplayName() {\n return \"Trigger a remote parameterized job\";\n }", "public Job getJob();", "public String getName()\n\t{\n\t\treturn fullName;\n\t}", "public final String toString() {\n return scheduler_name;\n }", "long getJobIDTarget();", "public String getName(){\n \treturn this.name().replace(\"_\", \" \");\n }", "@Override\n\tpublic long getJobId() {\n\t\treturn model.getJobId();\n\t}", "public String getSimpleName() {\n final var lastDotIdx = name.lastIndexOf('.');\n return name.substring(lastDotIdx + 1);\n }", "public String getName() {\n return (NAME_PREFIX + _applicationId + DELIM + _endpointId);\n }", "protected String logFile(AggregatedJob job) {\n StringBuffer sb = new StringBuffer(32);\n if (mGlobalLog) {\n // the basename of the log file is derived from the dag name\n sb.append(this.mClusteredADag.getLabel());\n } else {\n // per seqexec job name\n sb.append(job.getName());\n }\n sb.append(this.SEQEXEC_PROGRESS_REPORT_SUFFIX);\n return sb.toString();\n }", "public String getName() {\n\t\tfinal String submitterName = getSubmitterName();\n\t\tif (submitterName != null)\n\t\t\treturn ProteomeXchangeFilev2_1.MTD + TAB + \"submitter_name\" + TAB + submitterName;\n\t\treturn null;\n\t}", "public String getFullName() {\n return getFullMethodName(method);\n }", "public String provideFullName( )\r\n {\r\n return String.format( \"%s %s\",\r\n getFirstNm( ),\r\n getLastNm( ) );\r\n }", "public java.lang.String getHangmogName() {\n java.lang.Object ref = hangmogName_;\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 hangmogName_ = s;\n }\n return s;\n }\n }", "protected String getMetricName(MetricName metricName) {\n return format(\"%s.%s\", metricName.group(), metricName.name());\n }", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();" ]
[ "0.73927116", "0.695819", "0.6887139", "0.6882644", "0.6822708", "0.6649235", "0.6641678", "0.6612197", "0.6612197", "0.64175606", "0.6379597", "0.6284903", "0.6228807", "0.62234086", "0.6181453", "0.6165885", "0.61445624", "0.6134066", "0.61091363", "0.6095681", "0.6071495", "0.60227704", "0.5930439", "0.5818692", "0.5760356", "0.5760356", "0.57421046", "0.5729984", "0.57076913", "0.56685036", "0.5661975", "0.5660124", "0.5647267", "0.5638681", "0.5635108", "0.5597465", "0.5594529", "0.55933994", "0.5580847", "0.55757624", "0.55680865", "0.55675125", "0.5532377", "0.55235684", "0.5492207", "0.548548", "0.5482179", "0.5468807", "0.54656", "0.5464096", "0.54549354", "0.54476047", "0.54421926", "0.5441005", "0.54384965", "0.5438258", "0.5436436", "0.5430731", "0.54272026", "0.5421095", "0.54206115", "0.541006", "0.54053307", "0.5403902", "0.5402071", "0.54015815", "0.5392417", "0.53912276", "0.53823143", "0.5363968", "0.53625953", "0.5356897", "0.535258", "0.5348687", "0.53480774", "0.5340659", "0.53371733", "0.53309745", "0.5328268", "0.5328268", "0.5328268", "0.5328268", "0.5328268", "0.5328268", "0.5328268", "0.5328268", "0.5328268", "0.5328268", "0.5328268", "0.5328268", "0.5328268", "0.5328268", "0.5328268", "0.5328268", "0.5328268", "0.5328268", "0.5328268", "0.5328268", "0.5328268", "0.5328268" ]
0.80713415
0
Return the description given to the Trigger instance by its creator (if any).
public String getDescription() { return description; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getCreator();", "public static String getTriggerField(){\n return WHAT_IS_THE_SOURCE_OF_FUNDS.getFieldNameValue();\n }", "public String getCreator() {\n return this.creator;\n }", "public String getCreator() {\r\n return creator;\r\n }", "public String getCreator() {\r\n return creator;\r\n }", "@Override\n public String getDisplayName() {\n return Strings.getString(\"BuildPipelineTrigger.DisplayText\"); //$NON-NLS-1$\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n\t\treturn creator;\n\t}", "public T caseTriggerDesc(TriggerDesc object) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\treturn \"Trigger [id=\" + id + \", name=\" + name + \", schedulerType=\" + schedulerType + \", schedularAttrs=\"\r\n\t\t\t\t+ schedularAttributes + \", schedulerKey=\" + schedulerKey + \"]\";\r\n\t}", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "@Override\n protected String getCreatorDisplayName() {\n try {\n // DAV:creator-displayname -> use jcr:createBy if present.\n if (exists() && ((Node) item).hasProperty(Property.JCR_CREATED_BY)) {\n return ((Node) item).getProperty(Property.JCR_CREATED_BY).getString();\n }\n } catch (RepositoryException e) {\n log.warn(\"Error while accessing jcr:createdBy property\");\n }\n\n // fallback\n return super.getCreatorDisplayName();\n }", "public String toString() {\r\n \t\treturn \"\\\"\" + _name + \"\\\" by \" + _creator;\r\n \t}", "public String getCreatorName() {\n return creatorName;\n }", "public String getCreatorName() {\n return creatorName;\n }", "public String getCreatorName() {\n return creatorName;\n }", "public String getCreator() {\n return getProperty(Property.CREATOR);\n }", "@Override\n public String toString() {\n return \"Trigger '\" + getFullName() + \"': triggerClass: '\"\n + getClass().getName() + \" calendar: '\" + getCalendarName() \n + \"' misfireInstruction: \" + getMisfireInstruction() \n + \" nextFireTime: \" + getNextFireTime();\n }", "@Override\n public String toString() {\n StringBuffer buf = new StringBuffer(\"TriggerEvent{name=\");\n buf.append(name).append(\",type=\").append(type);\n if (payload != null) {\n buf.append(\",payload=\").append(payload.toString());\n }\n buf.append(\"}\");\n return String.valueOf(buf);\n }", "@VTID(13)\r\n int getCreator();", "public String getCreator()\n\t{\n\t\treturn null;\n\t}", "WithCreate withDescription(String description);", "WithCreate withDescription(String description);", "ITrigger getTrigger(String sTriggerName);", "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();", "TriggerType createTriggerType();", "public java.lang.String getCreatedByName() {\n return createdByName;\n }", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "protected String describeGeneral() {\n\t\tString description;\n\t\tString initiator = Util.getCleanName(mInitator);\n\t\tif (initiator.equalsIgnoreCase(\"AIR\"))\n\t\t\tinitiator = \"None\";\n\t\tString output = Util.getCleanName(mOutput);\n\t\tif (output.equalsIgnoreCase(\"AIR\"))\n\t\t\toutput = \"None\";\n\t\tdouble effectAmountLow = getEffectAmount(0);\n\t\tdouble effectAmountHigh = getEffectAmount(30);\n\t\tdouble elfAmount = getEffectAmount(mNormalLevel);\n\t\tString toolType = toolType();\n\t\tdescription = String.format(\"Effect Block Trigger: %s Block Output: %s . \"\n\t\t\t\t\t\t+ \"Effect value ranges from %.2f - %.2f for levels 0 to 30. \"\n\t\t\t\t\t\t+ \"Elves have the effect %.2f , as if they were level %d . \"\n\t\t\t\t\t\t+ \"Tools affected: %s. \"\n\t\t\t\t\t\t+ (mRequireTool ? \"Tool needed.\" : \"Tool not needed.\"),\n\t\t\t\t\t\tinitiator, output, effectAmountLow, effectAmountHigh,\n\t\t\t\t\t\telfAmount, mNormalLevel, toolType);\n\n\t\treturn description;\n\t}", "@Override\n public String getName() {\n return this.desc;\n }", "public java.lang.String getCreatorName() {\n return creatorName;\n }", "@Override\n public String getDescription() {\n return this.description + \"/by\" + this.dueDate;\n }", "public String getDescription() {\n return ACTION_DETAILS[id][DESC_DETAIL_INDEX];\n }", "public String description();", "@Override\r\n\tpublic String toString() {\r\n\t\treturn String.format(\"%s: %s\", getName(), getDescription());\r\n\t}", "public String getDescription();", "public String getDescription();" ]
[ "0.6015498", "0.59100884", "0.59079754", "0.58842033", "0.58842033", "0.5879691", "0.5860999", "0.5860999", "0.5860999", "0.5860999", "0.5860999", "0.5860999", "0.5860999", "0.5860999", "0.5860999", "0.57028335", "0.55826235", "0.55819803", "0.5578651", "0.5578651", "0.5578651", "0.5578651", "0.5578651", "0.5578651", "0.5578651", "0.5578651", "0.5578651", "0.5578651", "0.5578651", "0.5578651", "0.5554991", "0.55433655", "0.5532908", "0.5532908", "0.5532908", "0.55152786", "0.5512549", "0.5507269", "0.5503636", "0.5499447", "0.54902387", "0.54902387", "0.54836106", "0.5476874", "0.5476874", "0.5476874", "0.5476874", "0.5476874", "0.5476874", "0.5476874", "0.5476874", "0.5476874", "0.5476752", "0.54030585", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.54022396", "0.539837", "0.5381422", "0.5378698", "0.53587246", "0.5355916", "0.53453773", "0.5344503", "0.53112775", "0.53112775" ]
0.0
-1
Set a description for the Trigger instance may be useful for remembering/displaying the purpose of the trigger, though the description has no meaning to Quartz.
public void setDescription(String description) { this.description = description; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Nonnull\n public JDK8TriggerBuilder <T> withDescription (final String triggerDescription)\n {\n m_sDescription = triggerDescription;\n return this;\n }", "public void setDescription(String description) {\n this.description = description;\r\n // changeSupport.firePropertyChange(\"description\", oldDescription, description);\r\n }", "public void setDescription(String descr);", "public void setDescription(String newValue);", "public void setDescription(String newValue);", "public void setDescription(String description) { this.description = description; }", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription(String Description) {\n this.Description = Description;\n }", "public void setDescription(String description);", "public void setDescription(String description);", "public void setDescription(String description);", "public void setDescription(String description);", "public void setDescription(String description);", "void setDescription(java.lang.String description);", "public void setDescription (String description);", "public void setDescription(java.lang.Object description) {\n this.description = description;\n }", "void setDescription(String description);", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(final String description);", "public void setDescription(String description)\n {\n this.description = description;\n }", "void setDescription(final String description);", "public void setDescription(String description)\n {\n this.description = description;\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description) {\n this.description = description;\n this.updated = new Date();\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description){\n this.description = description;\n }", "public void setDescription(String description) {\n \tthis.description = description;\n }", "public void setDescription(String desc);", "protected void setDescription(String description) {\n this.description = description;\n }", "public void setDescription( String val ) {\n doCommand( new UpdateSegmentObject( getUser().getUsername(), getFlow(), \"description\", val ) );\n }", "public void setDescription(String value) {\r\n this.description = value;\r\n }", "public void setDescription( String description )\n {\n this.description = description;\n }", "public void setDescription( String description )\n {\n this.description = description;\n }", "public void setDescription( String description )\n {\n this.description = description;\n }", "public void setDescription(String description)\n {\n this.description = description;\n }", "public void setDescription(String description)\n {\n this.description = description;\n }", "public void setDescription(String description)\n {\n this.description = description;\n }", "public void setDescription(String sDescription);", "@Override\n\tpublic void setDescription(java.lang.String description) {\n\t\t_esfTournament.setDescription(description);\n\t}", "public void setDescription(String description) {\n mDescription = description;\n }", "public void setDescription(String description) {\r\n \t\tthis.description = description;\r\n \t}", "public void setDescription(String description) {\n\n }", "public void setDescription(String description) {\r\n\t\tthis.description = description;\r\n\t}", "public void setDescription(String description) {\r\n\t\tthis.description = description;\r\n\t}", "public void setDescription(String description) {\r\n\t\tthis.description = description;\r\n\t}", "public void setDescription(String description) {\r\n\t\tthis.description = description;\r\n\t}", "public void setDescription(String description) {\r\n\t\tthis.description = description;\r\n\t}", "public void setDescription(String description) {\r\n\t\tthis.description = description;\r\n\t}", "public void setDescription(String description) {\r\n\t\tthis.description = description;\r\n\t}" ]
[ "0.7379991", "0.6930329", "0.67860633", "0.676121", "0.676121", "0.67476314", "0.67427623", "0.67427623", "0.67427623", "0.67427623", "0.67427623", "0.67427623", "0.6728911", "0.6717936", "0.6717936", "0.6717936", "0.6717936", "0.6717936", "0.6695928", "0.669506", "0.6689888", "0.66543555", "0.6654287", "0.6654287", "0.6644161", "0.6632394", "0.66216177", "0.6600703", "0.6590947", "0.6590947", "0.6590947", "0.6590947", "0.6590947", "0.65876067", "0.6584347", "0.65831137", "0.65793043", "0.65793043", "0.65793043", "0.65793043", "0.65793043", "0.6579202", "0.6577534", "0.6576361", "0.6571351", "0.65705633", "0.65670323", "0.6566894", "0.6566894", "0.6566894", "0.6565548", "0.6565548", "0.6565548", "0.6561412", "0.65567255", "0.6551711", "0.6547301", "0.6542779", "0.65316784", "0.65316784", "0.65316784", "0.65316784", "0.65316784", "0.65316784", "0.65316784" ]
0.0
-1
Get the JobDataMap that is associated with the Trigger. Changes made to this map during job execution are not repersisted, and in fact typically result in an IllegalStateException.
public JobDataMap getJobDataMap() { if (jobDataMap == null) { jobDataMap = new JobDataMap(); } return jobDataMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ObservableList<Job> getJobData() {\n return jobData;\n }", "public abstract Map<String, Trigger> getTriggers();", "public Map<String, Object> getCurrentData() throws Exception;", "JobConf getJobConf() {\n return jobConf;\n }", "public void setJobDataMap(JobDataMap jobDataMap) {\n this.jobDataMap = jobDataMap;\n }", "public String getJobInfo() {\n return jobInfo;\n }", "public Map<UUID, T> getJobs(UUID agentId) throws RemoteException;", "public List<byte[]> getAllJobInfo() {\n // Fetch a job list with protobuf bytes format from GCS.\n synchronized (GlobalStateAccessor.class) {\n validateGlobalStateAccessorPointer();\n return this.nativeGetAllJobInfo(globalStateAccessorNativePointer);\n }\n }", "public Dsjob getJobObject() { return job; }", "@Override\n public AsyncJob getJob() {\n final AsyncJob job = s_jobMgr.getAsyncJob(_job.getId());\n return job;\n }", "public Map<String, String> getData() {\n if (data == null) data = new HashMap<>();\n return data;\n }", "public HashMap<Long, String> getData() {\n\t\treturn data;\n\t}", "@Override\n public Job getJobPOJO() {\n return jobUnproxied;\n }", "public JobMetadata getMetaData() {\n return this.metaData;\n }", "public Map<String, Object> getData() {\n\t\treturn this.data;\n\t}", "@Override\r\n\tpublic T getJob() {\n\t\treturn super.getJob();\r\n\t}", "@Override\n\tpublic long getJobId() {\n\t\treturn model.getJobId();\n\t}", "public JobID getJobID() {\n \n \t\treturn this.environment.getJobID();\n \t}", "public JobOrder getJob() {\n\t\tif (job == null) {\n\t\t\tsetJob(findJobOrder(getPlacement().getJobOrder().getId()));\n\t\t}\n\t\treturn job;\n\t}", "public JSONObject handleGetJobDetail(String jobId) {\n MapReduceState state;\n try {\n state = MapReduceState.getMapReduceStateFromJobID(ds, JobID.forName(jobId));\n } catch (EntityNotFoundException e) {\n throw new IllegalArgumentException(\"Couldn't find MapReduce for id:\" + jobId, e);\n }\n return state.toJson(true);\n }", "@UnsupportedAppUsage\n public Map<String, Object> getMap() {\n return this.mMap;\n }", "public java.util.List<cb.Careerbuilder.Job> getJobsList() {\n if (jobsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(jobs_);\n } else {\n return jobsBuilder_.getMessageList();\n }\n }", "public java.util.List<? extends cb.Careerbuilder.JobOrBuilder> \n getJobsOrBuilderList() {\n return jobs_;\n }", "@ApiStatus.Internal\n @NotNull\n public Map<String, Object> getData() {\n return data;\n }", "public Long getJobID() {\n return jobID;\n }", "private synchronized RunningJobImpl get(final String jobIdentifier) {\n final RunningJobImpl result = this.jobs.get(jobIdentifier);\n if (null == result) {\n throw new RuntimeException(\"Trying to get a RunningJob that is unknown: \" + jobIdentifier);\n }\n return result;\n }", "public java.util.List<cb.Careerbuilder.Job> getJobsList() {\n return jobs_;\n }", "protected Map<Long, ScheduledRecording> getDeletedScheduleMap() {\n return mDeletedScheduleMap;\n }", "public interface JobValues {\n\n void setValue(JobDependency jobDependency, Serializable value);\n\n Serializable getValue(JobDependency jobDependency);\n\n void clear();\n\n default Map<String, Serializable> getMap(Job<?> job) {\n Map<String, Serializable> result = new HashMap<>();\n for (JobDependency jobDependency : job.getUnsortedDependencies()) {\n result.put(jobDependency.getKey(), getValue(jobDependency));\n }\n return result;\n }\n}", "public UpdateJobDetails details() {\n return this.details;\n }", "public Job getJob();", "public JobDetail build() {\n return null;\n }", "public final HashMap<Integer, T> getData() {\n\t\treturn this.data;\n\t}", "public static Map<String, String> getMapping() {\r\n\t\treturn data.get();\r\n\t}", "public Job build() {\r\n return job;\r\n }", "public JDK8TriggerBuilder <T> forJob (final JobKey keyOfJobToFire)\n {\n m_aJobKey = keyOfJobToFire;\n return this;\n }", "public java.util.List<? extends cb.Careerbuilder.JobOrBuilder> \n getJobsOrBuilderList() {\n if (jobsBuilder_ != null) {\n return jobsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(jobs_);\n }\n }", "com.google.protobuf.ByteString\n getJobIdBytes();", "public Collection<BatchJobParameters> getCurrentJobs() {\n return runningJobs.values();\n }", "@Override\n protected Map<String, Object> getBeansMap()\n {\n return TestUtility.getStateData();\n }", "public java.util.Map<java.lang.String, java.lang.String>\n getMutableAppClientParas() {\n return internalGetMutableAppClientParas().getMutableMap();\n }", "public java.util.Map<java.lang.String, java.lang.String> getAppClientParas() {\n return internalGetAppClientParas().getMap();\n }", "public java.util.Map<java.lang.String, java.lang.String> getAppClientParas() {\n return internalGetAppClientParas().getMap();\n }", "public interface TriggerContext {\n\n /**\n * Return the last <i>scheduled</i> execution time of the task, or.\n *\n * @return the date\n * {@code null} if not scheduled before.\n */\n Date lastScheduledExecutionTime();\n\n /**\n * Return the last <i>actual</i> execution time of the task, or {@code null}\n * if not scheduled before.\n *\n * @return the date\n */\n Date lastActualExecutionTime();\n\n /**\n * Return the last completion time of the task, or {@code null} if not\n * scheduled before.\n *\n * @return the date\n */\n Date lastCompletionTime();\n}", "public PipelineJobState state() {\n return this.innerProperties() == null ? null : this.innerProperties().state();\n }", "public Job getJob(){\n return job;\n }", "public RuntimeExceptionDao<Lock, Integer> getLockDataDao() {\n\t\tif (lockRuntimeDao == null) {\n\t\t\tlockRuntimeDao = getRuntimeExceptionDao(Lock.class);\n\t\t}\n\t\treturn lockRuntimeDao;\n\t}", "@Override\n public List<IMapData<Integer, String>> getHashMapData() {\n List<IMapData<Integer, String>> data = new ArrayList<>();\n\n data.add(this.getHashMapData1());\n data.add(this.getHashMapData2());\n\n return data;\n }", "public static br.unb.cic.bionimbus.avro.gen.JobInfo.Builder newBuilder() {\n return new br.unb.cic.bionimbus.avro.gen.JobInfo.Builder();\n }", "public Map<Integer, Integer> getMemoryDataMap(){\n return dataMemory.getMemoryMap();\n }", "public Map<ComponentId, CHILD> getComponentMap() {\n return Collections.unmodifiableMap(producerById);\n }", "public TriggerAccess getTrigger () {\n return this.trigger;\n }", "public Job currentJob() {\n \t\treturn currentJob;\n \t}", "public Job getHadoopJob() ;", "public int getJobState() {\n return jobState;\n }", "public CustomerDataObject getJob_Customer() {\r\n return job_Customer;\r\n }", "private RequestData getJobData(SlingHttpServletRequest request) {\n try {\n String data = request.getParameter(PARAM_DATA);\n if (StringUtils.isNotBlank(data)) {\n return new ObjectMapper().readValue(data, RequestData.class);\n }\n } catch (IOException e) {\n logger.error(\"Unable to parse job data from request: {}\", e.getLocalizedMessage());\n }\n return null;\n }", "public HashMap<String, String> getMap() {\n return _map;\n }", "private Properties getJobConfFromFile(RunningJob runningJob) {\n Properties jobConfProperties = new Properties();\n try {\n log.info(\"RunningJob Configuration File location: \" + runningJob.getJobFile());\n Path path = new Path(runningJob.getJobFile());\n Configuration conf = new Configuration(false);\n FileSystem fileSystem = FileSystem.get(new Configuration());\n InputStream inputStream = fileSystem.open(path);\n conf.addResource(inputStream);\n\n for (Map.Entry<String, String> entry : conf) {\n if (entry.getKey().equals(\"pig.mapPlan\")\n || entry.getKey().equals(\"pig.reducePlan\")) {\n jobConfProperties.setProperty(entry.getKey(),\n ObjectSerializer.deserialize(entry.getValue()).toString());\n } else {\n jobConfProperties.setProperty(entry.getKey(), entry.getValue());\n }\n }\n } catch (FileNotFoundException e) {\n log.warn(\"Configuration file not found for old jobsflows.\");\n } catch (IOException e) {\n log.warn(\"Error occurred when retrieving configuration info.\", e);\n }\n return jobConfProperties;\n }", "private JobDetail createJobDetail(SchedulerJobEntity schedulerEntity) throws Exception {\n\n\t\tJobDetail jobDetail = null;\n\t\tJobDataMap jobDataMap = createJobDataMap(schedulerEntity.getJobName(), schedulerEntity.getInvokeParam());\n\n\t\tClass<? extends Job> cls = jobRegistry.findJobByName(schedulerEntity.getJobGroup()).orElseThrow();\n\t\t\n\t\tjobDetail = JobBuilder.newJob(cls)\n\t\t\t\t.withIdentity(schedulerEntity.getJobName(), schedulerEntity.getJobGroup()).setJobData(jobDataMap)\n\t\t\t\t.requestRecovery().build();\n\t\t\n\t\treturn jobDetail;\n\t}", "public Trigger getTrigger() {\n \t\treturn trigger;\n \t}", "public DatabaseMap getDatabaseMap()\r\n {\r\n return this.dbMap;\r\n }", "public void execute(JobExecutionContext context) throws JobExecutionException {\n\t\t\n\t\tint scheduler_id=(Integer)context.getJobDetail().getJobDataMap().get(\"scheduler_id\");\t\t\n \tString taskuid=(String)context.getJobDetail().getJobDataMap().get(\"taskuid\");\n \tString invoked_by=(String)context.getJobDetail().getJobDataMap().get(SchedulerEngine.JOBDATA_INVOKED_BY);\n \tString updatedtime=(String)context.getJobDetail().getJobDataMap().get(SchedulerEngine.JOBDATA_UPDATED_TIME);\n \tNumber trigger_row_id=(Number)context.getJobDetail().getJobDataMap().get(SchedulerEngine.JOBDATA_TRIGGER_ROW_ID);\n \t//System.out.println(\"ScheduledTaskJob.execute() 2be removed later:taskuid:\"+taskuid+\" scheduler_id:\"+scheduler_id);\n \t\n \t\n \t\n \ttry{\n \t\t\n\t \t//Map data=getSchedulerData(scheduler_id);\n \t\tSchedulerDB sdb=SchedulerDB.getSchedulerDB();\n \t\tMap data=null;\n \t\tString inject_code=null;\n \t\ttry{\n \t\t\tsdb.connectDB();\n \t\t\tdata=sdb.getScheduler(scheduler_id); \n \t\t\tif(trigger_row_id!=null){\n \t\t\t\tMap trig=sdb.getOneRowTriggerData(trigger_row_id.longValue());\n \t\t\t\tinject_code=(String)trig.get(\"inject_code\");\n \t\t\t}\n \t\t}catch(Exception e){\n \t\t\tthrow e;\n \t\t}finally {\n \t\t\tsdb.closeDB();\n \t\t}\n \t\t\n \t\tif(data.get(\"deleted\")!=null && ((Number)data.get(\"deleted\")).intValue()==1){\n \t\t\tthrow new Exception(\"Deleted Task can't be executed\");\n \t\t}\n \t\t\n \t\tlog.debug(\"trigger_row_id:\"+trigger_row_id+\" inject_code:\"+inject_code);\n\t \t\n\t \tScheduledTask task=new ScheduledTaskFactory().getTask(taskuid);\n\t \tif(task==null) {\n\t \t\tthrow new Exception(\"Task Group not found for the task:\"+scheduler_id);\n\t \t}\n\t \tStackFrame sframe=new StackFrame(task,data);\n\t \tif(invoked_by!=null && !invoked_by.equals(\"\")) {\n\t \t\tsframe.setInvokedby(invoked_by);\n\t \t}else{\n\t \t\tif(updatedtime!=null){\n\t \t\t\tsframe.setInvokedby(\"Scheduler (\"+updatedtime+\")\");\n\t \t\t}else{\n\t \t\t\tsframe.setInvokedby(\"Scheduler\");\n\t \t\t}\n\t \t}\n\t\t\t\n\t\t\tif(context.getTrigger().getPreviousFireTime()!=null){\n\t\t\t\tsframe.setTrigger_time(context.getTrigger().getPreviousFireTime().getTime());\n\t\t\t}else{\n\t\t\t\tsframe.setTrigger_time(new Date().getTime());\n\t\t\t}\n\t\t\t\n\t\t\tif(context.getTrigger().getNextFireTime()!=null){\n\t\t\t\tsframe.setNexttrigger_time(context.getTrigger().getNextFireTime().getTime());\n\t\t\t}\t\t\t\n\t\t\n\t\t\t\n\t\t\tif(Config.getValue(\"load_balancing_server\")!=null && Config.getValue(\"load_balancing_server\").equals(P2PService.getComputerName())){\n\t\t\t\tLoadBalancingQueueItem li=new LoadBalancingQueueItem();\n\t\t\t\tli.setSf(sframe);\n\t\t\t\tInteger id=(Integer)data.get(\"id\");\n\t\t\t\tli.setInject_code(inject_code);\n\t\t\t\tli.setSchedulerid(id);\n\t\t\t\tLoadBalancingQueue.getDefault().add(li);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t/*ScheduledTaskQueue.add(sframe);*/\n\t\t\t}\n\t\t\t\n\t\t\tlog.debug(\"adding task to queue: task:\"+data.get(\"name\"));\n \t}catch(Exception e){\n \t\te.printStackTrace(); \t\t\n \t\t//ClientErrorMgmt.reportError(e, \"Error while triggering task\");\n \t} \n\t\t \n\t\t//String status=null;\n\t\t//try{\t\t\n\t\t\t//task.execute();\n\t\t\t//status=task.EXCECUTION_SUCCESS;\n\t\t//}catch(Exception e){\n\t\t//\tstatus=task.EXCECUTION_FAIL;\t\t\t\n\t\t//\tClientErrorMgmt.reportError(e, null);\n\t\t//}finally{\n\t\t//\ttry{\n\t\t//\t\taddLog(sdate,data,status);\n\t\t//\t}catch(Exception e){\n\t\t//\t\tClientErrorMgmt.reportError(e, null);\n\t\t//\t}\t\t\t\n\t\t//}\n\t\t\n \t\n \t\n\t}", "@Override\n\tpublic HashMap<String, String> getData() {\n\t\treturn dataSourceApi.getData();\n\t}", "public DatabaseMap getDatabaseMap()\n {\n return this.dbMap;\n }", "public DatabaseMap getDatabaseMap()\n {\n return this.dbMap;\n }", "@Override\n\tpublic Map<String, Object> doWork() {\n\t\treturn null;\n\t}", "public Task<Map<String, Notification>> getAllNotificationsMap() {\n\r\n final TaskCompletionSource<Map<String, Notification>> tcs = new TaskCompletionSource<>();\r\n notificationRef.addListenerForSingleValueEvent(new ValueEventListener() {\r\n @Override\r\n public void onDataChange(DataSnapshot dataSnapshot) {\r\n GenericTypeIndicator<HashMap<String, Notification>> t = new GenericTypeIndicator<HashMap<String, Notification>>() {\r\n };\r\n Map<String, Notification> result = new HashMap<>(dataSnapshot.getValue(t));\r\n tcs.setResult(result);\r\n }\r\n\r\n @Override\r\n public void onCancelled(DatabaseError databaseError) {\r\n\r\n }\r\n });\r\n\r\n return tcs.getTask();\r\n }", "public Provenance getHealthMapProvenance() {\n if (healthMapProvenance == null) {\n healthMapProvenance = alertService.getProvenanceByName(ProvenanceNames.HEALTHMAP);\n }\n return healthMapProvenance;\n }", "@Override\n public List<String[]> getAppSchedulerData()\n {\n return null;\n }", "public Map<String, Object> getComponentConfiguration() {\n\t\treturn null;\n\t}", "public HashMap<String, String> getClaimKeyHashMap() {\n\t\treturn this.claimKeyHashMap;\n\t}", "public Map getMap() {\n\t\treturn this.map;\n\t}", "public int getHC_JobDataChange_ID();", "public Map<Component, Class> getSourceChanges()\n {\n if (sourceChanges == null)\n {\n sourceChanges = new HashMap<>();\n }\n return sourceChanges;\n }", "public interface Job {\n\n /** unique id for this job that is used as a reference in the service methods */\n String getId();\n\n /** job executor identification that has acquired this job and is going to execute it */\n String getLockOwner();\n\n /** in case this is a timer, it is the time that the timer should fire, in case this \n * is a message, it is null. */\n Date getDueDate();\n\n /** in case this is a timer, it is the time that the timer should fire, in case this \n * is a message, it is null.\n * @deprecated call {@link #getDueDate()} instead */\n @Deprecated\n Date getDuedate();\n\n /** exception that occurred during the last execution of this job. The transaction \n * of the job execution is rolled back. A synchronization is used to create \n * a separate transaction to update the exception and decrement the retries. */\n String getException();\n\n /** number of retries left. This is only decremented when an exception occurs during job \n * execution. The transaction of the job execution is rolled back. A synchronization is used to create \n * a separate transaction to update the exception and decrement the retries. */\n int getRetries();\n\n /** indicates if this job should be executed separate from any other job \n * in the same process instance */\n boolean isExclusive();\n\n /** the related execution */\n Execution getExecution();\n\n /** the related process instance */\n Execution getProcessInstance();\n\n Date getLockExpirationTime();\n\n}", "public Map<String, Object> context() {\n return unmodifiableMap(context);\n }", "public BackingMapManagerContext getContext();", "public Map<K,V> getMap() {\n Map<K,V> results = new HashMap<K,V>(valueMap.size());\n\n synchronized(theLock) {\n for (Map.Entry<K,CacheableObject> entry : valueMap.entrySet()) {\n if (! isExpired(entry.getValue())) {\n results.put(entry.getKey(), entry.getValue().cachedObject);\n }\n }\n }\n\n return results;\n }", "public JobEntry getJob(String jobId)\n {\n JobEntry je = null;\n\n try\n {\n je = schedulerService.getJob(Integer.parseInt(jobId));\n }\n catch (TurbineException e)\n {\n log.error(\"Could not retreive job id #{}\", jobId, e);\n }\n\n return je;\n }", "Map<String, FieldInfo> getFieldMap() {\n return fieldMap;\n }", "public String getJobId() {\n return jobId;\n }", "public String getJobId() {\n return this.jobId;\n }", "public String getJobId() {\n return this.jobId;\n }", "public String getJobId() {\n return this.jobId;\n }", "public JobData(Job job,\n JobContext jContext,\n TaskAttemptContext tContext,\n ManifestCommitter committer) {\n this.job = job;\n this.jContext = jContext;\n this.tContext = tContext;\n this.committer = committer;\n conf = job.getConfiguration();\n }", "public String getJobID() {\n\t\t\treturn JobID;\n\t\t}", "public Map<String, Commands> getCommandMap() {\n return cmdMap;\n }", "public static Map<String, String> getMapping() {\n\t\treturn ThreadContext.getMapping();\n\t}", "private PipelineJobPropertiesUpdate innerProperties() {\n return this.innerProperties;\n }", "public long getJobIDTarget() {\n return jobIDTarget_;\n }", "private Map<String, DataContainer> getDataContainerMap() {\r\n\r\n if (this.dataContainerMap == null) {\r\n if (this.dataContainerList == null) {\r\n parse();\r\n }\r\n\r\n this.dataContainerMap = new HashMap<>();\r\n for (DataContainer dataContainer : this.dataContainerList) {\r\n this.dataContainerMap.put(dataContainer.getVariableName(), dataContainer);\r\n }\r\n }\r\n return this.dataContainerMap;\r\n }", "@ApiModelProperty(value = \"Data related to the last job run for this Flow\")\n public Object getLatestJob() {\n return latestJob;\n }", "public java.util.List<cb.Careerbuilder.Job.Builder> \n getJobsBuilderList() {\n return getJobsFieldBuilder().getBuilderList();\n }", "public long getJobIDTarget() {\n return jobIDTarget_;\n }", "public int getJobId() {\r\n\t\treturn jobId;\r\n\t}", "public Map<String, Callback> getCallbacks() {\n return callbacks;\n }", "public Map<String, String> getValueData(){\n\t\treturn valueCache;\n\t}", "public String getJobProperty() {\r\n return jobProperty;\r\n }", "protected TriggerFactory getTriggerFactory() {\n\t\treturn this.triggerFactory;\n\t}" ]
[ "0.5714544", "0.5537865", "0.53598726", "0.52141684", "0.5183257", "0.5040619", "0.501434", "0.49732873", "0.49484104", "0.4943409", "0.491317", "0.49115026", "0.49057534", "0.48863098", "0.4849254", "0.4817827", "0.48155585", "0.47821745", "0.47481975", "0.47337267", "0.47226173", "0.47216097", "0.471507", "0.4710926", "0.46993056", "0.46986723", "0.46924743", "0.46802756", "0.46789563", "0.46739402", "0.46719155", "0.46542788", "0.4649447", "0.4641834", "0.46396068", "0.4636692", "0.46359646", "0.46355635", "0.4633665", "0.46227694", "0.45978191", "0.45971966", "0.4592736", "0.45891964", "0.4585987", "0.45766452", "0.45530725", "0.45340613", "0.45185333", "0.45157552", "0.45149258", "0.45114818", "0.45095196", "0.4508688", "0.45040616", "0.44858152", "0.44848487", "0.44768357", "0.44754174", "0.4468447", "0.44684404", "0.4451066", "0.4448148", "0.44475228", "0.44353884", "0.44353884", "0.44352803", "0.44312152", "0.44304496", "0.4430373", "0.44201705", "0.44071436", "0.4404701", "0.43987086", "0.43985704", "0.43970132", "0.4390369", "0.43726462", "0.4368107", "0.4365604", "0.4363545", "0.43571395", "0.4346548", "0.4346548", "0.4346548", "0.43434232", "0.43389523", "0.433863", "0.43336338", "0.43285903", "0.43251842", "0.43229854", "0.43221208", "0.43205473", "0.4317476", "0.43148962", "0.43120798", "0.43098706", "0.43090758", "0.43053266" ]
0.7602976
0
Set the JobDataMap to be associated with the Trigger.
public void setJobDataMap(JobDataMap jobDataMap) { this.jobDataMap = jobDataMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void setTriggers(Map<String, Trigger> triggers);", "public void setData(Map<E, String> data) {\n\t\tthis.data = data;\n\t}", "public TriggerMessage(String processInstanceId, Object data) {\n\t\tthis.processInstanceId = processInstanceId;\n\t\tthis.payload = data;\n\t}", "public void setHC_JobDataChange_ID (int HC_JobDataChange_ID);", "public JobDataMap getJobDataMap() {\n if (jobDataMap == null) {\n jobDataMap = new JobDataMap();\n }\n return jobDataMap;\n }", "private void setUpNotification() {\n if (getIntent().getExtras() != null) {\n for (String key : getIntent().getExtras().keySet()) {\n Object value = getIntent().getExtras().get(key);\n Logger.e(\"Key: \" + key + \" Value: \" + value);\n\n if(key.equals(\"Key\")) {\n try {\n String idStr = String.valueOf(value);\n int id = Integer.parseInt(idStr);\n onOpenJobItem(id);\n }\n catch (Exception e){\n e.printStackTrace();\n }\n }\n\n }\n }\n // [END handle_data_extras]\n }", "public void setHadoopJob( Job currJob ) ;", "public JDK8TriggerBuilder <T> forJob (final JobKey keyOfJobToFire)\n {\n m_aJobKey = keyOfJobToFire;\n return this;\n }", "public void setData(LinkedHashMap<Integer, Data> data){\r\n\t\tthis.data = data;\r\n\t}", "public void setData(Object oData) { m_oData = oData; }", "public void setJob_Customer(CustomerDataObject job_Customer) {\r\n this.job_Customer = job_Customer;\r\n }", "public void setData(Object data) {\r\n this.data = data;\r\n }", "public void setUserData(Object data);", "public void setData(Data data) {\n this.data = data;\n }", "public void setData(Object data) {\n this.data = data;\n }", "abstract public void setUserData(Object data);", "public void setData(IData data) {\n this.data = data;\n }", "void setData(T data) {\n\t\tthis.data = data;\n\t}", "public abstract void setData(Map<ID, T> data);", "public void setData(Object data) {\n\t\tthis.data = data;\n\t}", "public JobData(Job job,\n JobContext jContext,\n TaskAttemptContext tContext,\n ManifestCommitter committer) {\n this.job = job;\n this.jContext = jContext;\n this.tContext = tContext;\n this.committer = committer;\n conf = job.getConfiguration();\n }", "public void setData(T data){\n this.data = data;\n }", "public void setData(AdHocCommandData data) {\n this.data = data;\n }", "public void setData(E data) {\r\n\t\tthis.data = data;\r\n\t}", "public void setData(CellRecord[] data) {\r\n setAttribute(\"data\", data, true);\r\n }", "public void setJob(Job job) throws JobEvent, InterruptedException {\n this.job = job;\n\n try {\n\n job.run();\n\n }\n catch (JobEvent | InterruptedException rethrow)\n {\n this.job = null;\n throw rethrow;\n }\n\n }", "public void setData( E data ) {\n\t\tthis.data = data;\n\t}", "public void setJob(Job job) throws DeviceException {\n \t\ttry {\n \t\t\tcontroller.caput(jobChannel, job.ordinal(), 2);\n \t\t} catch (Throwable e) {\n \t\t\tthrow new DeviceException(\"failed to set JOB for the robot\", e);\n \t\t}\n \t}", "@Override\r\n\tprotected void setData(Object data) {\n\t\t\r\n\t}", "public void setJobObserver(JobObserver jO) {\n\r\n\t}", "public static void setGeoTargetsInCache(Map<String,String> dataMap){ \t\n \tif(memcache !=null && memcache.contains(ALL_GEO_TARGETS_KEY)){\n \t\tmemcache.delete(ALL_GEO_TARGETS_KEY);\n \t}\n \tmemcache.put(ALL_GEO_TARGETS_KEY, dataMap);\n\t}", "public AddDataSourceCallback(Case caseForJob, AutoIngestDataSource dataSourceInfo, UUID taskId, Object lock) {\n this.caseForJob = caseForJob;\n this.dataSourceInfo = dataSourceInfo;\n this.taskId = taskId;\n this.lock = lock;\n }", "public void setData(E data){\n\t\t\tthis.data = data;\n\t\t}", "void setData (Object newData) { /* package access */ \n\t\tdata = newData;\n\t}", "public void setData(E data)\n {\n this.data = data;\n }", "public void addTriggers(Map<String, Object> map) {\n }", "public void setDataObject(Object dataObj)\r\n {\r\n\r\n debug(\"setDataObject() - Set Data member Obj\");\r\n // Null out any reference to this data that may be present\r\n stockData = null;\r\n if (dataObj != null)\r\n {\r\n if (dataObj instanceof StockData)\r\n {\r\n stockData = (StockData) dataObj;\r\n }\r\n else if (dataObj instanceof String)\r\n {\r\n stockData = addSymbolToCurrentWatchList((String) dataObj);\r\n }\r\n\r\n }\r\n\r\n debug(\"setDataObject() - stockData is [\" + ((stockData == null) ? \"null\" : stockData.getName()) + \"]\");\r\n }", "public void setData(GenericItemType data) {\n this.data = data;\n }", "public void setDataProvenance(TrialDataProvenance dataProvenance){\n\t\tthis.dataProvenance = dataProvenance;\n\t}", "@Override\n\tpublic void changementMap(String dataName) {\n\t\talgo.setDataName(dataName);\n\t}", "public void setData(@NotNull String key, @NotNull Object value) {\n data.put(key, value);\n }", "public void setMassData (MassData data) {\n\t\tmassData2.center.set(data.center.x, data.center.y);\n\t\tmassData2.I = data.I;\n\t\tmassData2.mass = data.mass;\n\t\tbody.setMassData(massData2);\n\t}", "public void setJob(Job jobNum){\n job = jobNum;\n }", "private void setUser(Map<String, Object> data) {\n this.setUser(ID(), data);\n }", "public abstract void setCustomData(Object data);", "public void setUserData(Object argUserData) {\n userData = argUserData;\n }", "public abstract void set(String key, T data);", "@Override\r\n\tpublic void setData(E data) {\n\t\tthis.data=data;\r\n\t}", "public void attachJob(Job job) {\n\t\tthis.job = job.copy();\n\t}", "private void initData() {\n\t\tIntent intent = getIntent();\n\t\tjob = (Job) intent.getSerializableExtra(\"job\");\n\t\tedt_content.setText(job.getJobContent());\n\t\tedt_course.setText(job.getCourseName());\n\t}", "public void setMetaData(HashMap pMetaData) ;", "protected void setFixture(Map fixture) {\n\t\tthis.fixture = fixture;\n\t}", "private void setUserData(){\n }", "public void put(T data){\r\n\t\tthis.data = data;\r\n\t}", "protected void setupJob(JobData jobData) throws IOException {\n ManifestCommitter committer = jobData.committer;\n JobContext jContext = jobData.jContext;\n TaskAttemptContext tContext = jobData.tContext;\n describe(\"\\nsetup job\");\n try (DurationInfo d = new DurationInfo(LOG,\n \"setup job %s\", jContext.getJobID())) {\n committer.setupJob(jContext);\n }\n setupCommitter(committer, tContext);\n describe(\"setup complete\");\n }", "public void dataWasSet();", "public void \n\tsetData(\n\t\t\tString key, \n\t\t\tObject value) \n\t{\n\t\ttry{\n\t\t\tthis_mon.enter();\n\n\t\t\tif (user_data == null) {\n\t\t\t\tuser_data = new HashMap();\n\t\t\t}\n\t\t\tif (value == null) {\n\t\t\t\tif (user_data.containsKey(key))\n\t\t\t\t\tuser_data.remove(key);\n\t\t\t} else {\n\t\t\t\tuser_data.put(key, value);\n\t\t\t}\n\t\t}finally{\n\t\t\tthis_mon.exit();\n\t\t}\n\t}", "public void setData (G pData){\n this._data=pData;\n }", "public void setData(V data){\n\t\tthis.data = data;\n\t}", "public void setRequestData(T requestData) {\n this.requestData = requestData;\n }", "protected void setDataInForm(Long jobID) {\n if (jobID == null) {\n this.stepsValues = NewTaskService.getInitList();\n this.jobName = null;\n pickListBean.initDualList();\n } else {\n Job job = jobService.getByIdWithCollections(jobID);\n this.stepsValues = NewTaskService.getJobStepValuesList(job); \n this.jobName = job.getJobName(); \n pickListBean.setDualListByJob(job);\n }\n }", "private void setAlarmData(Intent intent) {\n if (mAlarmId == Constants.DEFAULT_ALARM_ID) {\n\n mAlarmId = intent.getIntExtra(Constants.EXTRA_ALARM_ID, Constants.DEFAULT_ALARM_ID);\n // factory view model is used for sending parameters to the view model in our case\n // with alarm entry id to make sure we have one entity on our viewModel\n DetailViewModelFactory factory = new DetailViewModelFactory(mDb, mAlarmId);\n mViewModel =\n ViewModelProviders.of(this, factory).get(DetailViewModel.class);\n\n // Observe changes in model in order to update UI\n mViewModel.getAlarm().observe(this, new Observer<AlarmEntry>() {\n @Override\n public void onChanged(@Nullable AlarmEntry alarmEntry) {\n mViewModel.getAlarm().removeObserver(this);\n if (alarmEntry == null) {\n return;\n }\n mAlarmId = alarmEntry.getId();\n mMapDestination =\n new MapDestination(alarmEntry.getLatitude(), alarmEntry.getLongitude(),\n alarmEntry.getLocation(), alarmEntry.getRadius());\n mAlarmRingtone = alarmEntry.getAlert() != null ? Uri.parse(alarmEntry.getAlert()) : null;\n\n // populate the UI\n populateUI(alarmEntry);\n }\n });\n }\n }", "void setUserData(Object userData);", "public void setJobProperty(String jobProperty) {\r\n this.jobProperty = jobProperty;\r\n }", "@Override\n public void setUserData(final Object userData) {\n this.userData = userData;\n }", "public void setData(String key, String value) {\r\n\t\tdata.put(key, value);\r\n\t}", "public void assignData( final String _arg ) throws Exception {\n\t\t\t\n\t\t\tthis.appTda_.assignData( _arg );\n\t\t}", "void setData(Object data);", "public void setDatos(HashMap datos) {\r\n this.datos = datos;\r\n }", "public void setUserData(Object userData) {\n this.userData = userData;\n }", "@Override\r\n\t\tpublic Object setUserData(String key, Object data, UserDataHandler handler)\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public void setInitializationData(IConfigurationElement config,\n\t\t\tString propertyName, Object data) throws CoreException {\n\t\tthis.config = config;\n\t}", "public void setImageData(byte[] imageData) {\n if (tile != null) {\n tile.setImageData(imageData);\n } else {\n this.data = imageData;\n }\n }", "void setTrainData(DataModel trainData);", "public void setUserData (Object userData) {\n\t\tthis.userData = userData;\n\t}", "@Override\n\tpublic void setDataObject(DataObject arg0) throws DataBindingException {\n\n\t}", "@Nonnull\n public JDK8TriggerBuilder <T> forJob (final IJobDetail jobDetail)\n {\n final JobKey k = jobDetail.getKey ();\n if (k.getName () == null)\n throw new IllegalArgumentException (\"The given job has not yet had a name assigned to it.\");\n m_aJobKey = k;\n return this;\n }", "private void pushToUsersPerCause(HashMap<String, String> userIdDataMap, Integer index){\n userIdDataMap.put(\"UserID\", UserDataProvider.getInstance().getCurrentUserId());\n // push the hashmap to the preexisting database skill\n firebaseData.child(DBKeys.KEY_USERS_PER_CAUSE).child(userCauses.get(index).getCause()).push().setValue(userIdDataMap);\n }", "public void setRecordData(org.afscme.enterprise.common.RecordData recordData) {\n this.recordData = recordData;\n }", "public void setJobId( int jobId ) ;", "@Override\n\tpublic void setData() {\n\n\t}", "public void setUserData(String key, Object data) {\n button.setUserData(key, data);\n }", "public void setJobProgress(JobProgress jobProgress) {\n this.jobProgress = jobProgress;\n }", "public void setHC_EmployeeJob_ID (int HC_EmployeeJob_ID);", "public void SetJobByFileLine(String[] jobInfo) {\r\n this.setJobID(Integer.parseInt(jobInfo[0]));\r\n this.setJobPriority(Integer.parseInt(jobInfo[1]));\r\n this.setJobInTime(Integer.parseInt(jobInfo[2]));\r\n this.setJobInstructionNum(Integer.parseInt(jobInfo[3]));\r\n Log.Info(\"检测后备作业\", String.format(\"正在加载后备作业:%d,优先级:%d,进入时间:%d,指令数:%d\", jobID, jobPriority, jobInTime, jobInstructionNum));\r\n instructions = new ArrayList<>(jobInstructionNum);\r\n this.data = new short[jobInstructionNum];\r\n }", "protected void addDataMap(DataMap map, DataMap currentMap) {\n\n ProjectController mediator = getProjectController();\n\n if (currentMap != null) {\n // merge with existing map... have to memorize map state before and after\n // to do the right events\n\n Collection<ObjEntity> originalOE = new ArrayList<>(currentMap.getObjEntities());\n Collection<DbEntity> originalDE = new ArrayList<>(currentMap.getDbEntities());\n Collection<QueryDescriptor> originalQueries = new ArrayList<>(currentMap.getQueryDescriptors());\n\n currentMap.mergeWithDataMap(map);\n map = currentMap;\n\n // postprocess changes\n Collection<ObjEntity> newOE = new ArrayList<>(currentMap.getObjEntities());\n Collection<DbEntity> newDE = new ArrayList<>(currentMap.getDbEntities());\n Collection<QueryDescriptor> newQueries = new ArrayList<>(currentMap.getQueryDescriptors());\n\n EntityEvent entityEvent = new EntityEvent(Application.getFrame(), null);\n QueryEvent queryEvent = new QueryEvent(Application.getFrame(), null);\n\n // 1. ObjEntities\n Collection<ObjEntity> addedOE = new ArrayList<>(newOE);\n addedOE.removeAll(originalOE);\n for (ObjEntity e : addedOE) {\n entityEvent.setEntity(e);\n entityEvent.setId(MapEvent.ADD);\n mediator.fireObjEntityEvent(entityEvent);\n }\n\n Collection<ObjEntity> removedOE = new ArrayList<>(originalOE);\n removedOE.removeAll(newOE);\n for (ObjEntity e : removedOE) {\n entityEvent.setEntity(e);\n entityEvent.setId(MapEvent.REMOVE);\n mediator.fireObjEntityEvent(entityEvent);\n }\n\n // 2. DbEntities\n Collection<DbEntity> addedDE = new ArrayList<>(newDE);\n addedDE.removeAll(originalDE);\n for(DbEntity e: addedDE) {\n entityEvent.setEntity(e);\n entityEvent.setId(MapEvent.ADD);\n mediator.fireDbEntityEvent(entityEvent);\n }\n\n Collection<DbEntity> removedDE = new ArrayList<>(originalDE);\n removedDE.removeAll(newDE);\n for(DbEntity e: removedDE) {\n entityEvent.setEntity(e);\n entityEvent.setId(MapEvent.REMOVE);\n mediator.fireDbEntityEvent(entityEvent);\n }\n\n // 3. queries\n Collection<QueryDescriptor> addedQueries = new ArrayList<>(newQueries);\n addedQueries.removeAll(originalQueries);\n for(QueryDescriptor q: addedQueries) {\n queryEvent.setQuery(q);\n queryEvent.setId(MapEvent.ADD);\n mediator.fireQueryEvent(queryEvent);\n }\n\n Collection<QueryDescriptor> removedQueries = new ArrayList<>(originalQueries);\n removedQueries.removeAll(newQueries);\n for(QueryDescriptor q: removedQueries) {\n queryEvent.setQuery(q);\n queryEvent.setId(MapEvent.REMOVE);\n mediator.fireQueryEvent(queryEvent);\n }\n\n mediator.fireDataMapDisplayEvent(new DataMapDisplayEvent(Application\n .getFrame(), map, (DataChannelDescriptor) mediator\n .getProject()\n .getRootNode(), mediator.getCurrentDataNode()));\n }\n else {\n // fix DataMap name, as there maybe a map with the same name already\n ConfigurationNode root = mediator.getProject().getRootNode();\n map.setName(NameBuilder\n .builder(map, root)\n .baseName(map.getName())\n .name());\n\n // side effect of this operation is that if a node was created, this DataMap\n // will be linked with it...\n mediator.addDataMap(Application.getFrame(), map);\n }\n }", "public void setDataValue(String key, Object value) {\n\t\t if (value == null) {\n\t\t\t data.remove(key);\n\t\t }else {\n\t\t\t data.put(key, value);\n\t\t }\n\t }", "@Override\n\tpublic void setJob(String job) {\n\t\tsuper.setJob(job);\n\t}", "public void setData(T val) {\r\n\t\tthis.val = val;\r\n\t}", "void setData (Object data);", "public void onDataChanged(IData data) {\r\n setData(data);\r\n }", "public void setDataTransformation(org.cagrid.data.dcql.DataTransformation dataTransformation) {\r\n this.dataTransformation = dataTransformation;\r\n }", "public void setJobStartDate(java.util.Calendar jobStartDate)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(JOBSTARTDATE$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(JOBSTARTDATE$0);\r\n }\r\n target.setCalendarValue(jobStartDate);\r\n }\r\n }", "public void trigger(List<Entity> _trigger){\n\t\tif(event!=null){\n\t\t\tevent.activate(System.currentTimeMillis(), _trigger);\n\t\t}\n\t}", "public void setUpdateData() {\n positionFenceToUpdateinController = Controller.getPositionFenceInArrayById(this.idFenceToUpdate);\n if(positionFenceToUpdateinController >= 0) {\n Fence fence = Controller.fences.get(positionFenceToUpdateinController);\n ((MainActivity)getActivity()).getSupportActionBar().setTitle(Constant.TITLE_VIEW_UPDATE_FENCE + \": \" + fence.getName());\n this.nameFence.setText(fence.getName());\n this.addressFence.setText(fence.getAddress());\n this.cityFence.setText(fence.getCity());\n this.provinceFence.setText(fence.getProvince());\n this.numberFence.setText(fence.getNumber());\n this.textSMSFence.setText(fence.getTextSMS());\n int index = (int)Constant.SPINNER_RANGE_POSITIONS.get(fence.getRange());\n this.spinnerRange.setSelection(index);\n this.spinnerEvent.setSelection(fence.getEvent());\n }\n }", "@Input(\"onData\")\n synchronized public void onData(Map<String, Object> argMap) {\n if (getBooleanProperty(SWITCH_STATE_PROPERTY)) {\n on(argMap);\n } else {\n off(argMap);\n }\n }", "public void updateDataSet(ArrayList<JobSpecBean> dataList) {\n\t\tthis.dataList = dataList;\n\t\tnotifyDataSetChanged();\n\t}", "public void setMediaData(MediaData mediaData) {\n List<MediaData.HighLightPair> hlMap = mediaData.getHighLightDataMap();\n if(!Predicates.isEmpty(hlMap)) {\n highLightMap = new SparseArray<>();\n VisitServices.from(hlMap).fire(new FireVisitor<MediaData.HighLightPair>() {\n @Override\n public Boolean visit(MediaData.HighLightPair pair, Object param) {\n List<MediaData.HighLightData> highLightData = VEGapUtils.filterHighLightByScore(pair.getDatas());\n if(!Predicates.isEmpty(highLightData)){\n highLightMap.put(pair.getTime(), highLightData);\n }\n return null;\n }\n });\n }\n mHighLightHelper = new HighLightHelper(highLightMap, mediaType == IPathTimeTraveller.TYPE_IMAGE);\n }", "protected void updateLocalData(Building[] data){\n new DBHandler(cx).updateBuildings(data);\n }", "public void setHostDataNode(TDataNodeLocation hostDataNode) {\n this.hostDataNode = hostDataNode;\n }" ]
[ "0.5513042", "0.5388933", "0.52749383", "0.52325594", "0.52029014", "0.5201245", "0.50795686", "0.5038368", "0.5021187", "0.50204265", "0.49931684", "0.4988868", "0.4977638", "0.4970052", "0.49395403", "0.49264887", "0.49235004", "0.49163583", "0.4903892", "0.49001476", "0.4899849", "0.48833686", "0.48672077", "0.48004717", "0.47991738", "0.47990158", "0.47939512", "0.47813016", "0.47801667", "0.47666243", "0.47597948", "0.47558123", "0.47458348", "0.47402167", "0.47385162", "0.47324482", "0.4732237", "0.47308236", "0.47262302", "0.47229463", "0.4714744", "0.471441", "0.47119412", "0.47027144", "0.47008026", "0.46904114", "0.46787056", "0.4674318", "0.46712172", "0.46708205", "0.4653545", "0.46440417", "0.4613086", "0.46092162", "0.46033987", "0.4596606", "0.45887095", "0.45851687", "0.45826137", "0.45746204", "0.45522282", "0.45506358", "0.4548653", "0.45428413", "0.4532229", "0.4520759", "0.45135477", "0.4512799", "0.4502279", "0.45003122", "0.44990635", "0.44956827", "0.4485966", "0.44853547", "0.4479491", "0.44751015", "0.4471215", "0.44679964", "0.4440919", "0.44331762", "0.44244507", "0.44208786", "0.44194642", "0.4418751", "0.44171116", "0.44022134", "0.43962458", "0.4395772", "0.43871033", "0.4386764", "0.4386451", "0.43833548", "0.43810865", "0.43757603", "0.43754777", "0.4364322", "0.43616566", "0.43612528", "0.4356278", "0.4355069" ]
0.7304204
0
The priority of a Trigger acts as a tiebreaker such that if two Triggers have the same scheduled fire time, then the one with the higher priority will get first access to a worker thread. If not explicitly set, the default value is 5.
public int getPriority() { return priority; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JDK8TriggerBuilder <T> withPriority (final int triggerPriority)\n {\n m_nPriority = triggerPriority;\n return this;\n }", "private void raisePriority() {\n Thread cThr = Thread.currentThread();\n _priority = (byte)((cThr instanceof H2O.FJWThr) ? ((H2O.FJWThr)cThr)._priority+1 : super.priority());\n }", "@Override\n \tpublic int priority() {\n \t\treturn 10;\n \t}", "@DISPID(115)\r\n\t// = 0x73. The runtime will prefer the VTID if present\r\n\t@VTID(110)\r\n\tint queuePriority();", "@Override\n\t\tpublic int priority() {\n\t\t\treturn 500;\n\t\t}", "public int priority(){\n return 0; //TODO codavaj!!\n }", "public int priority()\n\t{\n\t\treturn priority;\n\t}", "@DISPID(3)\r\n\t// = 0x3. The runtime will prefer the VTID if present\r\n\t@VTID(9)\r\n\tint queuePriority();", "public int getPriority()\r\n\t\t{\r\n\t\t\treturn 25;\r\n\t\t}", "public void setPriority(int value) {\n this.priority = value;\n }", "public abstract int priority();", "public TriggerCondition() {\n this(METRIC_HEAPUSG, 95);\n }", "public void testCmdUpdate_priority_field() {\n\t\t// Initialize test variables\n\t\tCommandAction expectedCA;\n\t\tTask expectedTask;\n\t\tList<Task> expectedTaskList;\n\n\t\t/*\n\t\t * Test 4: Testing priority field (all ID are valid)(default priority is\n\t\t * normal)\n\t\t */\n\t\tctf.initialize();\n\t\texpectedTaskList = null;\n\t\taddNewTask(TASK_NAME_1);\n\n\t\t// Test 4a: priority is null\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, null);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\t// Test 4b: priority is normal\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_NORM);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\texpectedTaskList = new ArrayList<Task>();\n\t\t// Test 4c: priority is high\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_HIGH);\n\t\texpectedTask = ctf.createExpectedTask(TASK_NAME_1, NO_TIME, NO_TIME, PRIORITY_TYPE.HIGH);\n\t\texpectedTaskList.add(expectedTask);\n\t\texpectedCA = new CommandAction(String.format(MSG_TASKUPDATED, VALID_TASKID), true, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\t\t\n\t\texpectedTaskList = new ArrayList<Task>();\n\t\t// Test 4d: priority is low\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_LOW);\n\t\texpectedTask = ctf.createExpectedTask(TASK_NAME_1, NO_TIME, NO_TIME, PRIORITY_TYPE.LOW);\n\t\texpectedTaskList.add(expectedTask);\n\t\texpectedCA = new CommandAction(String.format(MSG_TASKUPDATED, VALID_TASKID), true, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\t}", "public void setPriority(double priority) {\n\t\tthis.priority = priority;\n\t}", "public int getPriority()\n {\n long dt = getSafeTimeMillis();\n\n // calculate \"age\" - how old is the statement\n long cMillisAge = dt - m_dtCreated;\n\n // calculate \"recentness\" - when was the statement last used\n long cMillisDormant = dt - m_dtLastUse;\n\n // calculate \"frequency\" - how often is the statement used\n int cUses = m_cUses;\n double dflRate = (cMillisAge == 0 ? 1 : cMillisAge)\n / (cUses == 0 ? 1 : cUses);\n\n // combine the measurements into a priority\n double dflRateScore = Math.log(Math.max(dflRate , 100.0) / 100.0 );\n double dflDormantScore = Math.log(Math.max(cMillisDormant, 1000L) / 1000.0);\n int nPriority = (int) (dflRateScore + dflDormantScore) / 2;\n\n return Math.max(0, Math.min(10, nPriority));\n }", "@IcalProperty(pindex = PropertyInfoIndex.PRIORITY,\n eventProperty = true,\n todoProperty = true\n )\n public void setPriority(final Integer val) {\n priority = val;\n }", "int priority();", "int priority();", "public int getPriority(){\n\t\treturn priority;\n\t}", "default byte getPriority() {\n\t\treturn 0;\n\t}", "public void setPriority(int priority){\n this.priority = priority;\n }", "public void setPriority(int priority) {\n this.priority = priority;\n }", "public void setPriority(int priority) {\n this.priority = priority;\n }", "public byte getWorkPriority() {\n return 80;\n }", "@Override\n public int getPriority() {\n return 75;\n }", "public void setPriority(int priority){\n\t\tthis.priority = priority;\n\t}", "public double getPriority() {\n\t\treturn priority;\n\t}", "public void setPriority(long priority) {\n\t\tsuper.priority = priority;\n\t}", "public IssueBuilderAbstract priority(Integer priority){\n if(priority > 0 && priority <= 10)\n fieldPriority = priority;\n else fieldPriority = -1;\n return this;\n }", "public static void main(String[] args) throws Exception {\n\n Thread t1 = new Thread(() -> {\n for (int i = 0; i <= 5; i++) {\n System.out.println(\"Hi \" + Thread.currentThread().getPriority() + \" \" + Thread.currentThread().getName());\n try {\n Thread.sleep(1000);\n } catch (Exception ex) {\n // Logger.getLogger(Hi.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n\n }, \"Hi Thread\");\n Thread t2 = new Thread(() -> {\n for (int i = 0; i <= 5; i++) {\n System.out.println(\"Hello \" + Thread.currentThread().getPriority() + \" \" + Thread.currentThread().getName());\n try {\n Thread.sleep(1000);\n } catch (Exception ex) {\n// Logger.getLogger(Hi.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }, \"Hello Thread\");\n// t1.setName(\"Hi Thread\");\n// t2.setName(\"Hello Thread\");\n\n// System.out.println(t1.getName());\n// System.out.println(t2.getName());\n t1.setPriority(Thread.MIN_PRIORITY); //1\n t2.setPriority(Thread.MAX_PRIORITY); //2\n System.out.println(t1.getPriority());\n System.out.println(t2.getPriority());\n\n t1.start();\n try {\n Thread.sleep(10);\n } catch (Exception ex) {\n// Logger.getLogger(ThreadDemo.class.getName()).log(Level.SEVERE, null, ex);\n }\n t2.start();\n\n t1.join();\n t2.join();\n System.out.println(t1.isAlive());\n System.out.println(\"Bye\");\n }", "@Override\n public int getPriority() {\n return 1;\n }", "@Override\n public int getPriority() {\n return priority;\n }", "@Override\n public int getPriority() {\n return priority;\n }", "public void setPriority(Priority priority) {\r\n this.priority = priority;\r\n }", "public void setPriority(int priority) {\n this.mPriority = priority;\n }", "@java.lang.Override\n public int getPriorityValue() {\n return priority_;\n }", "public final String getName() {\n return \"job-priority\";\n }", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "public int getPriority() {\n\t\treturn priority;\n\t}", "public int getPriority() {\n\t\treturn priority;\n\t}", "public int getPriority() {\n\t\treturn priority;\n\t}", "public int getPriority() {\n\t\treturn priority;\n\t}", "public static void selfTest() {\n System.out.println(\"+++Beginning tests for priority scheduler+++\");\n int numTests = 5;\n int count = 0;\n\n boolean machine_start_status = Machine.interrupt().disabled();\n Machine.interrupt().disable();\n\n PriorityScheduler p = new PriorityScheduler();\n\n ThreadQueue t = p.newThreadQueue(true);\n ThreadQueue t1 = p.newThreadQueue(true);\n ThreadQueue t2 = p.newThreadQueue(true);\n ThreadQueue masterQueue = p.newThreadQueue(true);\n\n KThread tOwn = new KThread();\n KThread t1Own = new KThread();\n KThread t2Own = new KThread();\n\n t.acquire(tOwn);\n t1.acquire(t1Own);\n t2.acquire(t2Own);\n\n\n for (int i = 0; i < 3; i++) {\n for (int j = 1; j <= 3; j++) {\n KThread curr = new KThread();\n\n if (i == 0)\n t.waitForAccess(curr);\n else if (i == 1)\n t1.waitForAccess(curr);\n else\n t2.waitForAccess(curr);\n\n p.setPriority(curr, j);\n }\n }\n\n KThread temp = new KThread();\n t.waitForAccess(temp);\n p.getThreadState(temp).setPriority(4);\n\n temp = new KThread();\n t1.waitForAccess(temp);\n p.getThreadState(temp).setPriority(5);\n\n temp = new KThread();\n t2.waitForAccess(temp);\n p.getThreadState(temp).setPriority(7);\n\n temp = new KThread();\n\n masterQueue.waitForAccess(tOwn);\n masterQueue.waitForAccess(t1Own);\n masterQueue.waitForAccess(t2Own);\n\n masterQueue.acquire(temp);\n\n System.out.println(\"master queue: \"); masterQueue.print();\n// System.out.println(\"t queue: \"); t.print();\n// System.out.println(\"t1 queue: \"); t1.print();\n// System.out.println(\"t2 queue: \"); t2.print();\n//\n// System.out.println(\"tOwn effective priority = \" + p.getThreadState(tOwn).getEffectivePriority() + \" and priority = \" + p.getThreadState(tOwn).getPriority());\n System.out.println(\"temp's effective priority = \" + p.getThreadState(temp).getEffectivePriority());\n\n System.out.println(\"After taking away max from master queue\");\n KThread temp1 = masterQueue.nextThread();\n masterQueue.print();\n System.out.println(\"temp's effective priority = \" + p.getThreadState(temp).getEffectivePriority() + \" and it's priority = \" + p.getThreadState(temp).getPriority());\n System.out.println(\"nextThread's effective priority = \" + p.getThreadState(temp1).getEffectivePriority());\n Machine.interrupt().restore(machine_start_status);\n// while(count < numTests) {\n// KThread toRun = new KThread(new PriSchedTest(count++));\n// System.out.println(toRun);\n// t.waitForAccess(toRun);\n// p.getThreadState(toRun).setPriority(numTests-count);\n// toRun.fork();\n// }\n// count = 0;\n// while(count++ < numTests) {\n// KThread next = t.nextThread();\n// Lib.assertTrue(p.getThreadState(next).getPriority() == numTests-count);\n// System.out.println(\"Priority is \" + p.getThreadState(next).getPriority());\n// }\n }", "public int getPriority(){\n return 2;\n }", "public void setPriority(String priority) {\r\n this.priority = priority;\r\n }", "public int getPriority() {\n return priority;\n }", "public void setPriority(int r) {\n priority = r;\n }", "public void setPriority(java.lang.Object priority) {\n this.priority = priority;\n }", "public void setPriority(final int priority) {\n\t\tthis.priority = priority;\n\t}", "public int getPriority(){\n\t\t\n\t\treturn this.priority;\n\t}", "default int getPriority() {\n return 0;\n }", "@java.lang.Override\n public int getPriority() {\n return priority_;\n }", "public int getPriority();", "public int getPriority();", "public Integer getPriority() {\n return priority;\n }", "public void testSetProperties() throws Exception {\n final JettySolrRunner runner = cluster.getJettySolrRunner(0);\n final SolrResourceLoader resourceLoader = runner.getCoreContainer().getResourceLoader();\n final SolrCloudManager solrCloudManager = runner.getCoreContainer().getZkController().getSolrCloudManager();\n \n try (ScheduledTriggers scheduledTriggers = new ScheduledTriggers(resourceLoader, solrCloudManager)) {\n AutoScalingConfig config = new AutoScalingConfig(Collections.emptyMap());\n scheduledTriggers.setAutoScalingConfig(config);\n\n // Setup a trigger that records the timestamp of each time it was run\n // we only need 2 timestamps for the test, so limit the queue and make the trigger a No-Op if full\n final BlockingQueue<Long> timestamps = new ArrayBlockingQueue<Long>(2);\n final AutoScaling.Trigger t1 = new MockTrigger(TriggerEventType.NODELOST, \"mock-timestamper\") {\n @Override\n public void run() {\n log.info(\"Running {} in {}\", this.getName(), Thread.currentThread().getName());\n timestamps.offer(solrCloudManager.getTimeSource().getTimeNs());\n }\n };\n\n log.info(\"Configuring simple scheduler and adding trigger: {}\", t1.getName());\n t1.configure(resourceLoader, solrCloudManager, Collections.emptyMap());\n scheduledTriggers.add(t1);\n\n waitForAndDiffTimestamps(\"conf(default delay)\",\n ScheduledTriggers.DEFAULT_SCHEDULED_TRIGGER_DELAY_SECONDS, TimeUnit.SECONDS,\n timestamps);\n \n log.info(\"Reconfiguing scheduler to use 4s delay and clearing queue for trigger: {}\", t1.getName());\n config = config.withProperties(Collections.singletonMap\n (AutoScalingParams.TRIGGER_SCHEDULE_DELAY_SECONDS, 4));\n scheduledTriggers.setAutoScalingConfig(config);\n timestamps.clear();\n\n waitForAndDiffTimestamps(\"conf(four sec delay)\", \n 4, TimeUnit.SECONDS, \n timestamps);\n \n log.info(\"Removing trigger: {}\", t1.getName());\n scheduledTriggers.remove(t1.getName());\n \n log.info(\"Reconfiguing scheduler to use default props\");\n config = config.withProperties(ScheduledTriggers.DEFAULT_PROPERTIES);\n scheduledTriggers.setAutoScalingConfig(config);\n\n \n assertTrue(\"Test sanity check, need default thread pool to be at least 3 so we can\" +\n \"test lowering it by 2\", ScheduledTriggers.DEFAULT_TRIGGER_CORE_POOL_SIZE >= 3);\n final int numTriggers = ScheduledTriggers.DEFAULT_TRIGGER_CORE_POOL_SIZE;\n final int reducedThreadPoolSize = numTriggers - 2;\n \n // Setup X instances of a trigger that:\n // - records it's name as being run\n // - skipping all remaining execution if it's name has already been recorded\n // - records the name of the thread that ran it\n // - blocks on a cyclic barrier untill at Y instances have run (to hog a thread)\n // ...to test that the scheduler will add new threads as needed, up to the configured limit\n //\n // NOTE: the reason we need X unique instances is because the scheduler won't \"re-run\" a single\n // trigger while a previouss \"run\" is still in process\n final List<AutoScaling.Trigger> triggerList = new ArrayList<>(numTriggers);\n \n // Use a cyclic barrier gated by an atomic ref so we can swap it out later\n final AtomicReference<CyclicBarrier> latch = new AtomicReference<>(new CyclicBarrier(numTriggers));\n \n // variables for tracking state as we go\n // NOTE: all read/write must be gated by synchronizing on the barrier (ref),\n // so we we can ensure we are reading a consistent view\n final Set<String> threadNames = Collections.synchronizedSet(new LinkedHashSet<>());\n final Set<String> triggerNames = Collections.synchronizedSet(new LinkedHashSet<>());\n final AtomicLong fails = new AtomicLong(0);\n\n // Use a semaphore to track when each trigger *finishes* so our test thread\n // can know when to check & clear the tracking state\n final Semaphore completionSemaphore = new Semaphore(numTriggers);\n \n for (int i = 0; i < numTriggers; i++) {\n AutoScaling.Trigger trigger = new MockTrigger(TriggerEventType.NODELOST,\n \"mock-blocking-trigger-\" + i) {\n @Override\n public void run() {\n log.info(\"Running {} in {}\", this.getName(), Thread.currentThread().getName());\n CyclicBarrier barrier = null;\n synchronized (latch) {\n if (triggerNames.add(this.getName())) {\n log.info(\"{}: No-Op since we've already recorded a run\", this.getName());\n return;\n }\n threadNames.add(Thread.currentThread().getName());\n barrier = latch.get();\n }\n \n try {\n log.info(\"{}: waiting on barrier to hog a thread\", this.getName());\n barrier.await(30, TimeUnit.SECONDS);\n completionSemaphore.release();\n } catch (Exception e) {\n fails.incrementAndGet();\n log.error(this.getName() + \": failure waiting on cyclic barrier: \" + e.toString(), e);\n }\n }\n };\n\n trigger.configure(resourceLoader, solrCloudManager, Collections.emptyMap());\n triggerList.add(trigger);\n completionSemaphore.acquire();\n log.info(\"Adding trigger {} to scheduler\", trigger.getName());\n scheduledTriggers.add(trigger);\n }\n \n log.info(\"Waiting on semaphore for all triggers to signal completion...\");\n assertTrue(\"Timed out waiting for semaphore count to be released\",\n completionSemaphore.tryAcquire(numTriggers, 60, TimeUnit.SECONDS));\n \n synchronized (latch) {\n assertEquals(\"Unexpected number of trigger names found: \" + triggerNames.toString(),\n numTriggers, triggerNames.size());\n assertEquals(\"Unexpected number of thread ames found: \" + threadNames.toString(),\n numTriggers, threadNames.size());\n assertEquals(\"Unexpected number of trigger fails recorded, check logs?\",\n 0, fails.get());\n\n // before releasing the latch, clear the state and update our config to use a lower number of threads\n log.info(\"Updating scheduler config to use {} threads\", reducedThreadPoolSize);\n config = config.withProperties(Collections.singletonMap(AutoScalingParams.TRIGGER_CORE_POOL_SIZE,\n reducedThreadPoolSize));\n scheduledTriggers.setAutoScalingConfig(config);\n\n log.info(\"Updating cyclic barrier and clearing test state so triggers will 'run' again\");\n latch.set(new CyclicBarrier(reducedThreadPoolSize));\n threadNames.clear();\n triggerNames.clear();\n }\n \n log.info(\"Waiting on semaphore for all triggers to signal completion...\");\n assertTrue(\"Timed out waiting for semaphore count to be released\",\n completionSemaphore.tryAcquire(numTriggers, 60, TimeUnit.SECONDS));\n \n synchronized (latch) {\n assertEquals(\"Unexpected number of trigger names found: \" + triggerNames.toString(),\n numTriggers, triggerNames.size());\n assertEquals(\"Unexpected number of thread names found: \" + threadNames.toString(),\n reducedThreadPoolSize, threadNames.size());\n assertEquals(\"Unexpected number of trigger fails recorded, check logs?\",\n 0, fails.get());\n }\n }\n }", "public int getPriority() {\n return priority;\n }", "public int getEffectivePriority() {\n Lib.assertTrue(Machine.interrupt().disabled());\n\n\n return getWinningPriority();\n }", "public int getPriority() \n {\n return priority;\n }", "public void setPriority(int priority) {\n Lib.assertTrue(Machine.interrupt().disabled());\n if (this.priority == priority)\n return;\n\n this.priority = priority;\n recalculateThreadScheduling();\n update();\n }", "public Integer getPriority() {\n return priority;\n }", "public Integer getPriority() {\n return priority;\n }", "private void setUpdateTriggerTime(int value) {\n bitField0_ |= 0x00000002;\n updateTriggerTime_ = value;\n }", "@Override\r\n\tpublic int getPriority() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic int getPriority() {\n\t\treturn 0;\r\n\t}", "public int getEffectivePriority() \n {\n if(waitQueue == null)\n\t\t\t{\n return priority;\n }\n \n if(lastEffectivePriority < 0) //If there is a need to update the last effective priority\n\t\t\t{\n if(waitQueue != null) \n\t\t\t\t{\n if(waitQueue.transferPriority) //If the queue concerned is a join or a lock waitQueue and not the readyQueue\n\t\t\t\t\t{\n\t\t\t\t\t\tlastEffectivePriority=Math.max(waitQueue.getMaxPriority(),priority+donation); //Maximum of the priority of the head of the queue and priority+proposed donation\n }\n else\n\t\t\t\t\t{\n return priority;\n }\n }\n \n else\n\t\t\t\t{\n lastEffectivePriority = priority; //Set effective priority for the first time\n }\n }\n return lastEffectivePriority;\n }", "@Test\n public void launchesEventhandlerThreadpoolPriorityTest() {\n // TODO: test launchesEventhandlerThreadpoolPriority\n }", "@java.lang.Override\n public int getPriority() {\n return priority_;\n }", "@Override\r\n\tpublic int getPriority() {\n\t\treturn Message.LOW_PRIORITY;\r\n\t}", "ITrigger getTrigger(String sTriggerName);", "TriggerPositionType getTriggerPositionType();", "@java.lang.Override\n public int getPriorityValue() {\n return priority_;\n }", "private void setPriority(final Integer priority) {\n Story story = (Story) getTableRow().getItem();\n if (priority != null) {\n try {\n getModel().changeStoryPriority(story, priority);\n }\n catch (CustomException e) {\n addFormError(textField, \"{NanError}\");\n }\n }\n else {\n changeStoryStateToNone(story, () -> {\n try {\n getModel().changeStoryPriority(story, null);\n } catch (CustomException e) {\n ErrorReporter.get().reportError(e, \"Failed to set priority\");\n }\n });\n }\n }", "public int getPriority() {\n\t\treturn getSettings().getInt(\"priority\");\n\t}", "@Test(timeout = 10000)\n public void testJobPriorityChange() throws Exception {\n org.apache.hadoop.mapreduce.JobID jid = new JobID(\"001\", 1);\n JobPriorityChangeEvent test = new JobPriorityChangeEvent(jid, JobPriority.LOW);\n Assert.assertEquals(test.getJobId().toString(), jid.toString());\n Assert.assertEquals(test.getPriority(), LOW);\n }", "public int getPriority()\n {\n return priority;\n }", "public void setPriority(int priority) {\r\n\t\t\r\n\t\tif (defaultMode != null) {\r\n\t\t\tdefaultMode.setPriority(priority);\r\n\t\t} else {\r\n\t\t\tsendWarning(\r\n\t\t\t\t\t\"Trying set the priority of a Transition that \"\r\n\t\t\t\t\t\t\t+ \"possibly has multiple modes\",\r\n\t\t\t\t\t\"Transition: \" + getName(),\r\n\t\t\t\t\t\"Method setPriority(int priority) of class Transition is only to be \"\r\n\t\t\t\t\t\t\t+ \"used on Transitions that only have a single mode and are\"\r\n\t\t\t\t\t\t\t+ \" constructed as such\",\r\n\t\t\t\t\t\"Use setPriority(int priority) on the specific TransitionModes instead\");\r\n\t\t}\r\n\t}", "int getPriority( int priority );", "public void setPriority(@NotNull Priority priority) {\r\n this.priority = priority;\r\n }", "public int getPriority()\n\t{\n\t\treturn mPriority;\n\t}", "public int getPriority() {\n return this.priority;\n }", "public static void main(String[] args) {\n\t\tLab_11_ThreadPriority n=new Lab_11_ThreadPriority();\n\t\tLab_11_ThreadPriority n1=new Lab_11_ThreadPriority();\n\t\tLab_11_ThreadPriority n2=new Lab_11_ThreadPriority();\n\t\tLab_11_ThreadPriority n3=new Lab_11_ThreadPriority();\n\t\tn.start();\n\t\tn1.start();\n\t\tn2.start();\n\t\tn3.start();\n\t\tn.setPriority(NORM_PRIORITY);\n\t\tn1.setPriority(MAX_PRIORITY);\n\t\tn2.setPriority(MIN_PRIORITY);\n\t\t\n\t}", "public void setPriority(@EntityInstance int i, @IntRange(from = 0, to = 7) int priority) {\n nSetPriority(mNativeObject, i, priority);\n }", "public void setPriority(int data) {\n priority = data;\n }", "public abstract int getPriority();", "public abstract int getPriority();", "public abstract int getPriority();", "public int getPriority() {\n\t\tInteger prop = (Integer) getObject(\"priority\");\n\t\tif (prop != null) {\n\t\t\treturn prop;\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"The Task doesn't have its priority set\");\n\t\t}\n\t}" ]
[ "0.6581204", "0.63750756", "0.58654255", "0.57872784", "0.57687396", "0.57519656", "0.57368976", "0.57362884", "0.57015675", "0.56317073", "0.55680794", "0.55610746", "0.5516108", "0.54979515", "0.54795104", "0.5478579", "0.54261315", "0.54261315", "0.5405267", "0.5399298", "0.53937167", "0.5388064", "0.5388064", "0.5384447", "0.5380934", "0.5366013", "0.53623736", "0.5347088", "0.5332364", "0.53075385", "0.5302285", "0.5280296", "0.5280296", "0.5278197", "0.5277884", "0.52715564", "0.5260535", "0.5255914", "0.5255914", "0.5255914", "0.5255914", "0.5255914", "0.5255914", "0.5255914", "0.5255914", "0.5251981", "0.5251981", "0.5251981", "0.5251981", "0.5249178", "0.5237842", "0.523594", "0.5226582", "0.522592", "0.52214944", "0.52152336", "0.5211383", "0.5210455", "0.5203258", "0.52009284", "0.52009284", "0.5196557", "0.51961285", "0.5194714", "0.51902604", "0.51854265", "0.5183228", "0.5182833", "0.5182833", "0.5182571", "0.5181698", "0.5181698", "0.5178937", "0.5178359", "0.5177553", "0.51755077", "0.51741505", "0.5156847", "0.51566046", "0.5156216", "0.51442754", "0.513661", "0.51216686", "0.511137", "0.5110541", "0.5103743", "0.50888216", "0.5088163", "0.50801045", "0.50740075", "0.50706786", "0.50671554", "0.50671554", "0.50671554", "0.5066875" ]
0.5189997
70
The priority of a Trigger acts as a tie breaker such that if two Triggers have the same scheduled fire time, then Quartz will do its best to give the one with the higher priority first access to a worker thread. If not explicitly set, the default value is 5.
public void setPriority(int priority) { this.priority = priority; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JDK8TriggerBuilder <T> withPriority (final int triggerPriority)\n {\n m_nPriority = triggerPriority;\n return this;\n }", "private void raisePriority() {\n Thread cThr = Thread.currentThread();\n _priority = (byte)((cThr instanceof H2O.FJWThr) ? ((H2O.FJWThr)cThr)._priority+1 : super.priority());\n }", "public TriggerCondition() {\n this(METRIC_HEAPUSG, 95);\n }", "@Override\n\t\tpublic int priority() {\n\t\t\treturn 500;\n\t\t}", "@Override\n \tpublic int priority() {\n \t\treturn 10;\n \t}", "@DISPID(115)\r\n\t// = 0x73. The runtime will prefer the VTID if present\r\n\t@VTID(110)\r\n\tint queuePriority();", "@DISPID(3)\r\n\t// = 0x3. The runtime will prefer the VTID if present\r\n\t@VTID(9)\r\n\tint queuePriority();", "public int priority(){\n return 0; //TODO codavaj!!\n }", "public int getPriority()\r\n\t\t{\r\n\t\t\treturn 25;\r\n\t\t}", "public int priority()\n\t{\n\t\treturn priority;\n\t}", "ITrigger getTrigger(String sTriggerName);", "@IcalProperty(pindex = PropertyInfoIndex.PRIORITY,\n eventProperty = true,\n todoProperty = true\n )\n public void setPriority(final Integer val) {\n priority = val;\n }", "public void setPriority(int value) {\n this.priority = value;\n }", "public void testSetProperties() throws Exception {\n final JettySolrRunner runner = cluster.getJettySolrRunner(0);\n final SolrResourceLoader resourceLoader = runner.getCoreContainer().getResourceLoader();\n final SolrCloudManager solrCloudManager = runner.getCoreContainer().getZkController().getSolrCloudManager();\n \n try (ScheduledTriggers scheduledTriggers = new ScheduledTriggers(resourceLoader, solrCloudManager)) {\n AutoScalingConfig config = new AutoScalingConfig(Collections.emptyMap());\n scheduledTriggers.setAutoScalingConfig(config);\n\n // Setup a trigger that records the timestamp of each time it was run\n // we only need 2 timestamps for the test, so limit the queue and make the trigger a No-Op if full\n final BlockingQueue<Long> timestamps = new ArrayBlockingQueue<Long>(2);\n final AutoScaling.Trigger t1 = new MockTrigger(TriggerEventType.NODELOST, \"mock-timestamper\") {\n @Override\n public void run() {\n log.info(\"Running {} in {}\", this.getName(), Thread.currentThread().getName());\n timestamps.offer(solrCloudManager.getTimeSource().getTimeNs());\n }\n };\n\n log.info(\"Configuring simple scheduler and adding trigger: {}\", t1.getName());\n t1.configure(resourceLoader, solrCloudManager, Collections.emptyMap());\n scheduledTriggers.add(t1);\n\n waitForAndDiffTimestamps(\"conf(default delay)\",\n ScheduledTriggers.DEFAULT_SCHEDULED_TRIGGER_DELAY_SECONDS, TimeUnit.SECONDS,\n timestamps);\n \n log.info(\"Reconfiguing scheduler to use 4s delay and clearing queue for trigger: {}\", t1.getName());\n config = config.withProperties(Collections.singletonMap\n (AutoScalingParams.TRIGGER_SCHEDULE_DELAY_SECONDS, 4));\n scheduledTriggers.setAutoScalingConfig(config);\n timestamps.clear();\n\n waitForAndDiffTimestamps(\"conf(four sec delay)\", \n 4, TimeUnit.SECONDS, \n timestamps);\n \n log.info(\"Removing trigger: {}\", t1.getName());\n scheduledTriggers.remove(t1.getName());\n \n log.info(\"Reconfiguing scheduler to use default props\");\n config = config.withProperties(ScheduledTriggers.DEFAULT_PROPERTIES);\n scheduledTriggers.setAutoScalingConfig(config);\n\n \n assertTrue(\"Test sanity check, need default thread pool to be at least 3 so we can\" +\n \"test lowering it by 2\", ScheduledTriggers.DEFAULT_TRIGGER_CORE_POOL_SIZE >= 3);\n final int numTriggers = ScheduledTriggers.DEFAULT_TRIGGER_CORE_POOL_SIZE;\n final int reducedThreadPoolSize = numTriggers - 2;\n \n // Setup X instances of a trigger that:\n // - records it's name as being run\n // - skipping all remaining execution if it's name has already been recorded\n // - records the name of the thread that ran it\n // - blocks on a cyclic barrier untill at Y instances have run (to hog a thread)\n // ...to test that the scheduler will add new threads as needed, up to the configured limit\n //\n // NOTE: the reason we need X unique instances is because the scheduler won't \"re-run\" a single\n // trigger while a previouss \"run\" is still in process\n final List<AutoScaling.Trigger> triggerList = new ArrayList<>(numTriggers);\n \n // Use a cyclic barrier gated by an atomic ref so we can swap it out later\n final AtomicReference<CyclicBarrier> latch = new AtomicReference<>(new CyclicBarrier(numTriggers));\n \n // variables for tracking state as we go\n // NOTE: all read/write must be gated by synchronizing on the barrier (ref),\n // so we we can ensure we are reading a consistent view\n final Set<String> threadNames = Collections.synchronizedSet(new LinkedHashSet<>());\n final Set<String> triggerNames = Collections.synchronizedSet(new LinkedHashSet<>());\n final AtomicLong fails = new AtomicLong(0);\n\n // Use a semaphore to track when each trigger *finishes* so our test thread\n // can know when to check & clear the tracking state\n final Semaphore completionSemaphore = new Semaphore(numTriggers);\n \n for (int i = 0; i < numTriggers; i++) {\n AutoScaling.Trigger trigger = new MockTrigger(TriggerEventType.NODELOST,\n \"mock-blocking-trigger-\" + i) {\n @Override\n public void run() {\n log.info(\"Running {} in {}\", this.getName(), Thread.currentThread().getName());\n CyclicBarrier barrier = null;\n synchronized (latch) {\n if (triggerNames.add(this.getName())) {\n log.info(\"{}: No-Op since we've already recorded a run\", this.getName());\n return;\n }\n threadNames.add(Thread.currentThread().getName());\n barrier = latch.get();\n }\n \n try {\n log.info(\"{}: waiting on barrier to hog a thread\", this.getName());\n barrier.await(30, TimeUnit.SECONDS);\n completionSemaphore.release();\n } catch (Exception e) {\n fails.incrementAndGet();\n log.error(this.getName() + \": failure waiting on cyclic barrier: \" + e.toString(), e);\n }\n }\n };\n\n trigger.configure(resourceLoader, solrCloudManager, Collections.emptyMap());\n triggerList.add(trigger);\n completionSemaphore.acquire();\n log.info(\"Adding trigger {} to scheduler\", trigger.getName());\n scheduledTriggers.add(trigger);\n }\n \n log.info(\"Waiting on semaphore for all triggers to signal completion...\");\n assertTrue(\"Timed out waiting for semaphore count to be released\",\n completionSemaphore.tryAcquire(numTriggers, 60, TimeUnit.SECONDS));\n \n synchronized (latch) {\n assertEquals(\"Unexpected number of trigger names found: \" + triggerNames.toString(),\n numTriggers, triggerNames.size());\n assertEquals(\"Unexpected number of thread ames found: \" + threadNames.toString(),\n numTriggers, threadNames.size());\n assertEquals(\"Unexpected number of trigger fails recorded, check logs?\",\n 0, fails.get());\n\n // before releasing the latch, clear the state and update our config to use a lower number of threads\n log.info(\"Updating scheduler config to use {} threads\", reducedThreadPoolSize);\n config = config.withProperties(Collections.singletonMap(AutoScalingParams.TRIGGER_CORE_POOL_SIZE,\n reducedThreadPoolSize));\n scheduledTriggers.setAutoScalingConfig(config);\n\n log.info(\"Updating cyclic barrier and clearing test state so triggers will 'run' again\");\n latch.set(new CyclicBarrier(reducedThreadPoolSize));\n threadNames.clear();\n triggerNames.clear();\n }\n \n log.info(\"Waiting on semaphore for all triggers to signal completion...\");\n assertTrue(\"Timed out waiting for semaphore count to be released\",\n completionSemaphore.tryAcquire(numTriggers, 60, TimeUnit.SECONDS));\n \n synchronized (latch) {\n assertEquals(\"Unexpected number of trigger names found: \" + triggerNames.toString(),\n numTriggers, triggerNames.size());\n assertEquals(\"Unexpected number of thread names found: \" + threadNames.toString(),\n reducedThreadPoolSize, threadNames.size());\n assertEquals(\"Unexpected number of trigger fails recorded, check logs?\",\n 0, fails.get());\n }\n }\n }", "public abstract int priority();", "public int getPriority()\n {\n long dt = getSafeTimeMillis();\n\n // calculate \"age\" - how old is the statement\n long cMillisAge = dt - m_dtCreated;\n\n // calculate \"recentness\" - when was the statement last used\n long cMillisDormant = dt - m_dtLastUse;\n\n // calculate \"frequency\" - how often is the statement used\n int cUses = m_cUses;\n double dflRate = (cMillisAge == 0 ? 1 : cMillisAge)\n / (cUses == 0 ? 1 : cUses);\n\n // combine the measurements into a priority\n double dflRateScore = Math.log(Math.max(dflRate , 100.0) / 100.0 );\n double dflDormantScore = Math.log(Math.max(cMillisDormant, 1000L) / 1000.0);\n int nPriority = (int) (dflRateScore + dflDormantScore) / 2;\n\n return Math.max(0, Math.min(10, nPriority));\n }", "public void testCmdUpdate_priority_field() {\n\t\t// Initialize test variables\n\t\tCommandAction expectedCA;\n\t\tTask expectedTask;\n\t\tList<Task> expectedTaskList;\n\n\t\t/*\n\t\t * Test 4: Testing priority field (all ID are valid)(default priority is\n\t\t * normal)\n\t\t */\n\t\tctf.initialize();\n\t\texpectedTaskList = null;\n\t\taddNewTask(TASK_NAME_1);\n\n\t\t// Test 4a: priority is null\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, null);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\t// Test 4b: priority is normal\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_NORM);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\texpectedTaskList = new ArrayList<Task>();\n\t\t// Test 4c: priority is high\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_HIGH);\n\t\texpectedTask = ctf.createExpectedTask(TASK_NAME_1, NO_TIME, NO_TIME, PRIORITY_TYPE.HIGH);\n\t\texpectedTaskList.add(expectedTask);\n\t\texpectedCA = new CommandAction(String.format(MSG_TASKUPDATED, VALID_TASKID), true, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\t\t\n\t\texpectedTaskList = new ArrayList<Task>();\n\t\t// Test 4d: priority is low\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, CmdParameters.PARAM_VALUE_TASK_PRIORITY_LOW);\n\t\texpectedTask = ctf.createExpectedTask(TASK_NAME_1, NO_TIME, NO_TIME, PRIORITY_TYPE.LOW);\n\t\texpectedTaskList.add(expectedTask);\n\t\texpectedCA = new CommandAction(String.format(MSG_TASKUPDATED, VALID_TASKID), true, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\t}", "TriggerPositionType getTriggerPositionType();", "public int getTriggerRound() {\n return triggerRound;\n }", "public void setPriority(double priority) {\n\t\tthis.priority = priority;\n\t}", "public final String getName() {\n return \"job-priority\";\n }", "@Override\n public int getPriority() {\n return 75;\n }", "public IssueBuilderAbstract priority(Integer priority){\n if(priority > 0 && priority <= 10)\n fieldPriority = priority;\n else fieldPriority = -1;\n return this;\n }", "public int getPriority(){\n\t\treturn priority;\n\t}", "public double getPriority() {\n\t\treturn priority;\n\t}", "public void setPriority(int priority){\n this.priority = priority;\n }", "default byte getPriority() {\n\t\treturn 0;\n\t}", "public byte getWorkPriority() {\n return 80;\n }", "@Override\n public int getPriority() {\n return 1;\n }", "int priority();", "int priority();", "public void setPriority(int priority){\n\t\tthis.priority = priority;\n\t}", "public void setPriority(long priority) {\n\t\tsuper.priority = priority;\n\t}", "@Test(timeout = 10000)\n public void testJobPriorityChange() throws Exception {\n org.apache.hadoop.mapreduce.JobID jid = new JobID(\"001\", 1);\n JobPriorityChangeEvent test = new JobPriorityChangeEvent(jid, JobPriority.LOW);\n Assert.assertEquals(test.getJobId().toString(), jid.toString());\n Assert.assertEquals(test.getPriority(), LOW);\n }", "private void setUpdateTriggerTime(int value) {\n bitField0_ |= 0x00000002;\n updateTriggerTime_ = value;\n }", "@java.lang.Override\n public int getPriorityValue() {\n return priority_;\n }", "@Override\n public int getPriority() {\n return priority;\n }", "@Override\n public int getPriority() {\n return priority;\n }", "public int getEffectivePriority() \n {\n if(waitQueue == null)\n\t\t\t{\n return priority;\n }\n \n if(lastEffectivePriority < 0) //If there is a need to update the last effective priority\n\t\t\t{\n if(waitQueue != null) \n\t\t\t\t{\n if(waitQueue.transferPriority) //If the queue concerned is a join or a lock waitQueue and not the readyQueue\n\t\t\t\t\t{\n\t\t\t\t\t\tlastEffectivePriority=Math.max(waitQueue.getMaxPriority(),priority+donation); //Maximum of the priority of the head of the queue and priority+proposed donation\n }\n else\n\t\t\t\t\t{\n return priority;\n }\n }\n \n else\n\t\t\t\t{\n lastEffectivePriority = priority; //Set effective priority for the first time\n }\n }\n return lastEffectivePriority;\n }", "public PgEventTrigger() {\n this(\"pg_event_trigger\", null);\n }", "public int getPriority() {\n\t\treturn priority;\n\t}", "public int getPriority() {\n\t\treturn priority;\n\t}", "public int getPriority() {\n\t\treturn priority;\n\t}", "public int getPriority() {\n\t\treturn priority;\n\t}", "@java.lang.Override\n public int getPriority() {\n return priority_;\n }", "public static void main(String[] args) throws Exception {\n\n Thread t1 = new Thread(() -> {\n for (int i = 0; i <= 5; i++) {\n System.out.println(\"Hi \" + Thread.currentThread().getPriority() + \" \" + Thread.currentThread().getName());\n try {\n Thread.sleep(1000);\n } catch (Exception ex) {\n // Logger.getLogger(Hi.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n\n }, \"Hi Thread\");\n Thread t2 = new Thread(() -> {\n for (int i = 0; i <= 5; i++) {\n System.out.println(\"Hello \" + Thread.currentThread().getPriority() + \" \" + Thread.currentThread().getName());\n try {\n Thread.sleep(1000);\n } catch (Exception ex) {\n// Logger.getLogger(Hi.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }, \"Hello Thread\");\n// t1.setName(\"Hi Thread\");\n// t2.setName(\"Hello Thread\");\n\n// System.out.println(t1.getName());\n// System.out.println(t2.getName());\n t1.setPriority(Thread.MIN_PRIORITY); //1\n t2.setPriority(Thread.MAX_PRIORITY); //2\n System.out.println(t1.getPriority());\n System.out.println(t2.getPriority());\n\n t1.start();\n try {\n Thread.sleep(10);\n } catch (Exception ex) {\n// Logger.getLogger(ThreadDemo.class.getName()).log(Level.SEVERE, null, ex);\n }\n t2.start();\n\n t1.join();\n t2.join();\n System.out.println(t1.isAlive());\n System.out.println(\"Bye\");\n }", "default int getPriority() {\n return 0;\n }", "public Builder setUpdateTriggerTime(int value) {\n copyOnWrite();\n instance.setUpdateTriggerTime(value);\n return this;\n }", "@java.lang.Override\n public int getPriority() {\n return priority_;\n }", "public int getPriority(){\n return 2;\n }", "@Test\n public void launchesEventhandlerThreadpoolPriorityTest() {\n // TODO: test launchesEventhandlerThreadpoolPriority\n }", "public void setPriority(Priority priority) {\r\n this.priority = priority;\r\n }", "public void setPriority(int priority) {\n this.mPriority = priority;\n }", "@Override\r\n\tpublic int getPriority() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic int getPriority() {\n\t\treturn 0;\r\n\t}", "private void setPriority(final Integer priority) {\n Story story = (Story) getTableRow().getItem();\n if (priority != null) {\n try {\n getModel().changeStoryPriority(story, priority);\n }\n catch (CustomException e) {\n addFormError(textField, \"{NanError}\");\n }\n }\n else {\n changeStoryStateToNone(story, () -> {\n try {\n getModel().changeStoryPriority(story, null);\n } catch (CustomException e) {\n ErrorReporter.get().reportError(e, \"Failed to set priority\");\n }\n });\n }\n }", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "public int getPriority(){\n\t\t\n\t\treturn this.priority;\n\t}", "@Override\r\n\tpublic int getPriority() {\n\t\treturn Message.LOW_PRIORITY;\r\n\t}", "public JobPriority(int value) {\n super (value, 1, 100);\n }", "public int compareTo(Trigger other) {\n\n if(other.getKey() == null && getKey() == null)\n return 0;\n if(other.getKey() == null)\n return -1;\n if(getKey() == null)\n return 1;\n \n return getKey().compareTo(other.getKey());\n }", "public Trigger getTrigger() {\n \t\treturn trigger;\n \t}", "int getUpdateTriggerTime();", "public void setPriority(int r) {\n priority = r;\n }", "@java.lang.Override\n public int getPriorityValue() {\n return priority_;\n }", "public int getPriority() {\n return priority;\n }", "public void setPriority(String priority) {\r\n this.priority = priority;\r\n }", "public void setPriority(final int priority) {\n\t\tthis.priority = priority;\n\t}", "public void setPriority(java.lang.Object priority) {\n this.priority = priority;\n }", "public int getPriority() {\n\t\treturn getSettings().getInt(\"priority\");\n\t}", "public Integer getPriority() {\n return priority;\n }", "public int getPriority() \n {\n return priority;\n }", "public interface ConnectionPrioritizerTrigger {\n void mo1675a(RequestPriority requestPriority);\n}", "public int getPriority() {\n return priority;\n }", "public int getPriority() {\n return priority;\n }", "public int getPriority() {\n return priority;\n }", "public int getPriority() {\n return priority;\n }", "public int getPriority() {\n return priority;\n }", "public int getPriority() {\n return priority;\n }", "public int getPriority();", "public int getPriority();", "public Integer getPriority() {\n return priority;\n }", "public Integer getPriority() {\n return priority;\n }", "public int getPriority() {\n return priority;\n }", "public static void selfTest() {\n System.out.println(\"+++Beginning tests for priority scheduler+++\");\n int numTests = 5;\n int count = 0;\n\n boolean machine_start_status = Machine.interrupt().disabled();\n Machine.interrupt().disable();\n\n PriorityScheduler p = new PriorityScheduler();\n\n ThreadQueue t = p.newThreadQueue(true);\n ThreadQueue t1 = p.newThreadQueue(true);\n ThreadQueue t2 = p.newThreadQueue(true);\n ThreadQueue masterQueue = p.newThreadQueue(true);\n\n KThread tOwn = new KThread();\n KThread t1Own = new KThread();\n KThread t2Own = new KThread();\n\n t.acquire(tOwn);\n t1.acquire(t1Own);\n t2.acquire(t2Own);\n\n\n for (int i = 0; i < 3; i++) {\n for (int j = 1; j <= 3; j++) {\n KThread curr = new KThread();\n\n if (i == 0)\n t.waitForAccess(curr);\n else if (i == 1)\n t1.waitForAccess(curr);\n else\n t2.waitForAccess(curr);\n\n p.setPriority(curr, j);\n }\n }\n\n KThread temp = new KThread();\n t.waitForAccess(temp);\n p.getThreadState(temp).setPriority(4);\n\n temp = new KThread();\n t1.waitForAccess(temp);\n p.getThreadState(temp).setPriority(5);\n\n temp = new KThread();\n t2.waitForAccess(temp);\n p.getThreadState(temp).setPriority(7);\n\n temp = new KThread();\n\n masterQueue.waitForAccess(tOwn);\n masterQueue.waitForAccess(t1Own);\n masterQueue.waitForAccess(t2Own);\n\n masterQueue.acquire(temp);\n\n System.out.println(\"master queue: \"); masterQueue.print();\n// System.out.println(\"t queue: \"); t.print();\n// System.out.println(\"t1 queue: \"); t1.print();\n// System.out.println(\"t2 queue: \"); t2.print();\n//\n// System.out.println(\"tOwn effective priority = \" + p.getThreadState(tOwn).getEffectivePriority() + \" and priority = \" + p.getThreadState(tOwn).getPriority());\n System.out.println(\"temp's effective priority = \" + p.getThreadState(temp).getEffectivePriority());\n\n System.out.println(\"After taking away max from master queue\");\n KThread temp1 = masterQueue.nextThread();\n masterQueue.print();\n System.out.println(\"temp's effective priority = \" + p.getThreadState(temp).getEffectivePriority() + \" and it's priority = \" + p.getThreadState(temp).getPriority());\n System.out.println(\"nextThread's effective priority = \" + p.getThreadState(temp1).getEffectivePriority());\n Machine.interrupt().restore(machine_start_status);\n// while(count < numTests) {\n// KThread toRun = new KThread(new PriSchedTest(count++));\n// System.out.println(toRun);\n// t.waitForAccess(toRun);\n// p.getThreadState(toRun).setPriority(numTests-count);\n// toRun.fork();\n// }\n// count = 0;\n// while(count++ < numTests) {\n// KThread next = t.nextThread();\n// Lib.assertTrue(p.getThreadState(next).getPriority() == numTests-count);\n// System.out.println(\"Priority is \" + p.getThreadState(next).getPriority());\n// }\n }", "@DISPID(31)\r\n\t// = 0x1f. The runtime will prefer the VTID if present\r\n\t@VTID(36)\r\n\tasci.activebatch.enumJobTimerTriggerType timerTrigger();", "public int getPriority() {\n\t\tInteger prop = (Integer) getObject(\"priority\");\n\t\tif (prop != null) {\n\t\t\treturn prop;\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"The Task doesn't have its priority set\");\n\t\t}\n\t}", "public interface TriggerContext {\n\n /**\n * Return the last <i>scheduled</i> execution time of the task, or.\n *\n * @return the date\n * {@code null} if not scheduled before.\n */\n Date lastScheduledExecutionTime();\n\n /**\n * Return the last <i>actual</i> execution time of the task, or {@code null}\n * if not scheduled before.\n *\n * @return the date\n */\n Date lastActualExecutionTime();\n\n /**\n * Return the last completion time of the task, or {@code null} if not\n * scheduled before.\n *\n * @return the date\n */\n Date lastCompletionTime();\n}", "public void setPriority(BigDecimal priority) {\n\t\tthis.priority = priority;\n\t}", "public int getAlertPriority()\n {\n return this.alert_priority;\n }", "public void setPriority(int priority) {\n Lib.assertTrue(Machine.interrupt().disabled());\n if (this.priority == priority)\n return;\n\n this.priority = priority;\n recalculateThreadScheduling();\n update();\n }", "TriggeringStatement getTriggeringStatement();" ]
[ "0.6542818", "0.6008161", "0.56865484", "0.565869", "0.56510127", "0.5648758", "0.55603564", "0.5481952", "0.54753417", "0.54635984", "0.54482293", "0.53701866", "0.5362277", "0.53369045", "0.52934134", "0.52779096", "0.5261952", "0.5257113", "0.52195334", "0.52157855", "0.5202581", "0.5176092", "0.5163334", "0.51268363", "0.5112101", "0.5109812", "0.5107239", "0.5107159", "0.5104785", "0.51022744", "0.51022744", "0.5098824", "0.5086724", "0.5081277", "0.5069283", "0.50441444", "0.5043389", "0.5043389", "0.5039481", "0.4998789", "0.49903527", "0.49903527", "0.49903527", "0.49903527", "0.49900723", "0.49878046", "0.4984343", "0.49832606", "0.498053", "0.4979027", "0.49776548", "0.4974919", "0.49687824", "0.4965608", "0.4965608", "0.4965164", "0.49612394", "0.49612394", "0.49612394", "0.49612394", "0.49612394", "0.49612394", "0.49612394", "0.49612394", "0.49607864", "0.4955645", "0.49553677", "0.49521852", "0.4951009", "0.49509662", "0.49504605", "0.49450955", "0.49418157", "0.4938817", "0.4935017", "0.49292907", "0.4917417", "0.49168763", "0.49076167", "0.49034494", "0.49005002", "0.49005002", "0.49005002", "0.49005002", "0.49005002", "0.49005002", "0.4899833", "0.4899833", "0.48985314", "0.48985314", "0.48968843", "0.48823455", "0.48822004", "0.48713183", "0.48623425", "0.48572573", "0.48546863", "0.4853037", "0.48423555" ]
0.50965625
33
This method should not be used by the Quartz client. Called by the scheduler at the time a Trigger is first added to the scheduler, in order to have the Trigger compute its first fire time, based on any associated calendar. After this method has been called, getNextFireTime() should return a valid answer.
public abstract Date computeFirstFireTime(Calendar calendar);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Date getNextFireTime();", "public abstract Date getFinalFireTime();", "@Test\n\t@Ignore\n\tpublic void testScheduler() {\n\t\torg.springframework.scheduling.support.CronTrigger trigger = new CronTrigger(\"0 0 0 * * *\");\n\t\tCalendar today = Calendar.getInstance();\n\t\ttoday.add(Calendar.DAY_OF_MONTH, -1);\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss z\");\n\t\tfinal Date yesterday = today.getTime();\n\t\tString lastMessage = (sdf.format(yesterday)) + \" : [Yesterday]\";\n\t\tlog.debug(lastMessage);\n\t\tDate nextExecution = trigger.nextExecutionTime(\n\t\t\t\tnew TriggerContext() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Date lastScheduledExecutionTime() {\n\t\t\t\t\t\treturn yesterday;\n\t\t\t\t\t}\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Date lastActualExecutionTime() {\n\t\t\t\t\t\treturn yesterday;\n\t\t\t\t\t}\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Date lastCompletionTime() {\n\t\t\t\t\t\treturn yesterday;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tString nextMessage = sdf.format(nextExecution) + \" : [Execution] \";\n\t\tlog.debug(nextMessage);\n\t}", "public static Date computeEndTimeToAllowParticularNumberOfFirings(OperableTrigger trigg, org.quartz.Calendar cal, \n int numTimes) {\n\n OperableTrigger t = (OperableTrigger) trigg.clone();\n\n if (t.getNextFireTime() == null) {\n t.computeFirstFireTime(cal);\n }\n \n int c = 0;\n Date endTime = null;\n \n for (int i = 0; i < numTimes; i++) {\n Date d = t.getNextFireTime();\n if (d != null) {\n c++;\n t.triggered(cal);\n if(c == numTimes)\n endTime = d;\n } else {\n break;\n }\n }\n \n if(endTime == null)\n return null;\n \n endTime = new Date(endTime.getTime() + 1000L);\n \n return endTime;\n }", "public abstract Date getPreviousFireTime();", "public int getFireTicks ( ) {\n\t\treturn invokeSafe ( \"getFireTicks\" );\n\t}", "public double getFireTime() {\n\t\treturn fireTime;\n\t}", "public long getNextScheduled() {\n\t\tDate currDate = new Date();\n\t\t\n\t\tCalendar runTimeToday = Calendar.getInstance();\n\t\trunTimeToday.setTime(currDate);\n\t\t\n\t\trunTimeToday.set(Calendar.HOUR_OF_DAY, hour);\n\t\trunTimeToday.set(Calendar.MINUTE, minute);\n\t\trunTimeToday.set(Calendar.SECOND, 0);\n\t\t\n\t\tDate runTimeTodayDate = runTimeToday.getTime();\n\t\t\n\t\tif(currDate.before(runTimeTodayDate)) {\n\t\t\tSystem.out.println(\"DailyProcess: Next runtime is today.\");\n\t\t} else {\n\t\t\t// equals or after\n\t\t\tSystem.out.println(\"DailyProcess: Next runtime is tomorrow.\");\n\t\t\trunTimeToday.add(Calendar.DATE, 1);\n\t\t\trunTimeTodayDate = runTimeToday.getTime();\n\t\t}\n\t\t\n\t\tlong runTime = runTimeTodayDate.getTime() - currDate.getTime();\n\t\t\n\t\tif(false) {\n\t\t\t// Debugging\n\t\t\trunTime = 0;\n\t\t}\n\t\t\n\t\trunTime += randomDelay;\n\t\t\n\t\treturn runTime;\n\t}", "public int getMaxFireTicks ( ) {\n\t\treturn invokeSafe ( \"getMaxFireTicks\" );\n\t}", "public Date getNextScheduledRun() {\n\t\tfinal Calendar cal = Calendar.getInstance();\n\t\tcal.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);\n\t\tcal.set(Calendar.HOUR_OF_DAY, 1);\n\t\tcal.set(Calendar.MINUTE, 0);\n\n\t\tif ( cal.before(Calendar.getInstance()) ){\n\t\t\tcal.add(Calendar.DATE, 7);\n\t\t}\n\t\treturn cal.getTime();\n\t\n\t}", "private void checkIsAbleToFire() {\n\n\t\tif (ticksToNextFire <= currentTickCount) {\n\t\t\tisAbleToFire = true;\n\t\t} else {\n\t\t\tisAbleToFire = false;\n\t\t}\n\t}", "public void tryToFire() {\n\t\tif (System.currentTimeMillis() - lastFire < firingInterval) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// if we waited long enough, create the shot entity, and record the time.\n\t\tlastFire = System.currentTimeMillis();\n\t\tShotEntity shot = new ShotEntity(this,\"shot.gif\",ship.getX()+10,ship.getY()-30, 1);\n\t\tentities.add(shot);\n\t}", "public long getNextTime() {\r\n if (super.getNextTime() == 0) {\r\n return 0;\r\n }\r\n Object obj = this._queue;\r\n if (obj != null) {\r\n if (obj instanceof LockFreeTaskQueueCore) {\r\n if (!((LockFreeTaskQueueCore) obj).isEmpty()) {\r\n return 0;\r\n }\r\n } else if (obj == EventLoop_commonKt.CLOSED_EMPTY) {\r\n return LongCompanionObject.MAX_VALUE;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n DelayedTaskQueue delayedTaskQueue = (DelayedTaskQueue) this._delayed;\r\n if (delayedTaskQueue != null) {\r\n DelayedTask delayedTask = (DelayedTask) delayedTaskQueue.peek();\r\n if (delayedTask != null) {\r\n long j = delayedTask.nanoTime;\r\n TimeSource timeSource = TimeSourceKt.getTimeSource();\r\n return RangesKt.coerceAtLeast(j - (timeSource != null ? timeSource.nanoTime() : System.nanoTime()), 0);\r\n }\r\n }\r\n return LongCompanionObject.MAX_VALUE;\r\n }", "@Override\n protected LocalDateTime CalculateNextFeedTime() {\n return LocalDateTime.now();\n }", "int getUpdateTriggerTime();", "public static List<Date> computeFireTimes(OperableTrigger trigg, org.quartz.Calendar cal,\n int numTimes) {\n LinkedList<Date> lst = new LinkedList<Date>();\n\n OperableTrigger t = (OperableTrigger) trigg.clone();\n\n if (t.getNextFireTime() == null) {\n t.computeFirstFireTime(cal);\n }\n\n for (int i = 0; i < numTimes; i++) {\n Date d = t.getNextFireTime();\n if (d != null) {\n lst.add(d);\n t.triggered(cal);\n } else {\n break;\n }\n }\n\n return java.util.Collections.unmodifiableList(lst);\n }", "private synchronized EventType scheduleNextEvent()\n {\n Date today = new Date();\n Date today_sunrise = ss.getSunrise(latitude, longitude);\n Date today_sunset = ss.getSunset(latitude, longitude);\n Date today_off = ss.getOff(off);\n\n // get sunrise and sunset time for tomorrow\n Calendar tomorrow = Calendar.getInstance();\n tomorrow.roll(Calendar.DATE, true);\n Date tomorrow_sunrise = ss.getSunrise(latitude, longitude, tomorrow.getTime());\n Date tomorrow_sunset = ss.getSunset(latitude, longitude, tomorrow.getTime());\n Date tomorrow_off = ss.getOff(off);\n\n // determine if sunrise or sunset is the next event\n if (today.after(today_sunset)) {\n // get tomorrow's date time\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: SUNRISE \");\n System.out.println(\" @ \" + tomorrow_sunrise);\n System.out.println(\"-----------------------------------\");\n\n // schedule tomorrow's sunrise as next event\n timer.schedule(new SunriseTask(), tomorrow_sunrise);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = tomorrow_sunrise;\n nextSunsetDate = tomorrow_sunset;\n\n // return next event\n nextEvent = EventType.SunriseTomorrow;\n return nextEvent;\n } else if (today.after(today_sunrise)) {\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: SUNSET \");\n System.out.println(\" @ \" + today_sunset);\n System.out.println(\"-----------------------------------\");\n\n // schedule sunset as next event\n timer.schedule(new SunsetTask(), today_sunset);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = tomorrow_sunrise;\n nextSunsetDate = today_sunset;\n\n // return next event\n nextEvent = EventType.SunsetToday;\n return nextEvent;\n } else if (today.after(today_off)) {\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: OFF \");\n System.out.println(\" @ \" + today_off);\n System.out.println(\"-----------------------------------\");\n\n // schedule sunset as next event\n timer.schedule(new SunsetTask(), today_off);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = tomorrow_sunrise;\n nextSunsetDate = today_sunset;\n\n // return next event\n nextEvent = EventType.SunriseTomorrow;\n return nextEvent;\n } else {\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: SUNRISE \");\n System.out.println(\" @ \" + today_sunrise);\n System.out.println(\"-----------------------------------\");\n\n // schedule sunrise as next event\n timer.schedule(new SunriseTask(), today_sunrise);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = today_sunrise;\n nextSunsetDate = today_sunset;\n\n // return next event\n nextEvent = EventType.SunriseToday;\n return nextEvent;\n }\n }", "protected boolean canFire()\n\t\t{\n\t\treturn ( TimeUtils.timeSinceMillis(startTime) > this.fireDelay );\n\t\t}", "public long processNextEvent() {\r\n Runnable dequeue;\r\n ThreadSafeHeapNode threadSafeHeapNode;\r\n if (processUnconfinedEvent()) {\r\n return getNextTime();\r\n }\r\n DelayedTaskQueue delayedTaskQueue = (DelayedTaskQueue) this._delayed;\r\n if (delayedTaskQueue == null || delayedTaskQueue.isEmpty()) {\r\n dequeue = dequeue();\r\n if (dequeue != null) {\r\n dequeue.run();\r\n }\r\n return getNextTime();\r\n }\r\n TimeSource timeSource = TimeSourceKt.getTimeSource();\r\n long nanoTime = timeSource != null ? timeSource.nanoTime() : System.nanoTime();\r\n do {\r\n synchronized (delayedTaskQueue) {\r\n ThreadSafeHeapNode firstImpl = delayedTaskQueue.firstImpl();\r\n threadSafeHeapNode = null;\r\n if (firstImpl != null) {\r\n DelayedTask delayedTask = (DelayedTask) firstImpl;\r\n if (delayedTask.timeToExecute(nanoTime) ? enqueueImpl(delayedTask) : false) {\r\n threadSafeHeapNode = delayedTaskQueue.removeAtImpl(0);\r\n }\r\n }\r\n }\r\n } while (((DelayedTask) threadSafeHeapNode) != null);\r\n dequeue = dequeue();\r\n if (dequeue != null) {\r\n }\r\n return getNextTime();\r\n }", "public double getNextTime(){\n\t\tif(timeoutSet.peek() == null && eventSet.peek() == null) return Double.MAX_VALUE;\n\t\telse if(eventSet.peek() != null && timeoutSet.peek() != null) return Math.min(eventSet.peek().getTime(), timeoutSet.peek().getTime());\n\t\telse if(eventSet.peek() == null && timeoutSet.peek() != null) return timeoutSet.peek().getTime();\n\t\treturn eventSet.peek().getTime();\n\t}", "public Fire randomFire() {\r\n Random random = new Random();\r\n List<Enemy> lowestLine = this.lowestLine();\r\n if (lowestLine.isEmpty()) { return null; }\r\n int i = random.nextInt(lowestLine.size());\r\n return lowestLine.get(i).fire(this.game);\r\n }", "public abstract Date getFireTimeAfter(Date afterTime);", "public static void rescheduleRefreshJob() {\n\t\ttry {\n\t\t\tScheduler sched = StdSchedulerFactory.getDefaultScheduler();\n\n\t\t\tSimpleTrigger trigger = newTrigger()\n\t\t\t .withIdentity(REFRESH_TRIGGER_KEY)\n\t\t\t .withSchedule(repeatSecondlyForever(refreshInterval))\n\t\t\t .build();\n\t\t\t\n\t\t\tsched.rescheduleJob(REFRESH_TRIGGER_KEY, trigger);\n\t\t\tlogger.debug(\"Rescheduled refresh job '{}' in DefaulScheduler\", REFRESH_TRIGGER_KEY);\n\t\t} catch (SchedulerException e) {\n\t\t\tlogger.warn(\"Could not reschedule refresh job: {}\", e.getMessage());\n\t\t}\n\t}", "public int getUpdateTriggerTime() {\n return updateTriggerTime_;\n }", "private void setupFireRate(double fireRatePerSecond)\n\t\t{\n\t\tthis.startTime = 0;\n\t\tthis.fireDelay = 1 / fireRatePerSecond * 1000;\n\t\t}", "public Date getNextExecutionTime() {\n\t\treturn SchedulerUtil.getNextExecution(this);\n\t}", "public int getUpdateTriggerTime() {\n return instance.getUpdateTriggerTime();\n }", "private long getWaitTime() {\n long retVal = 1;\n long difference = System.currentTimeMillis() - myLastRefreshTime;\n if (difference < 75) {\n retVal = 75 - difference;\n }\n return (retVal);\n }", "@Override\n protected Scheduler scheduler() {\n return Scheduler.newFixedRateSchedule(0, 1, TimeUnit.SECONDS);\n }", "@Override\n\tpublic void addSelfTrigger(ISelfTrigger trigger) {\n\t\t\n\t}", "@Override\n public long checkFrequencyMillis()\n {\n return TimeUnit.DAYS.toMillis( 1 );\n }", "private void runPeriodic() {\n boolean ok = ScheduledFutureTask.super.runAndReset();\n boolean down = isShutdown();\n // Reschedule if not cancelled and not shutdown or policy allows\n if (ok && !down) {\n updateNextExecutionTime();\n MeasurableScheduler.super.getQueue().add(this);\n }\n // This might have been the final executed delayed\n // task. Wake up threads to check.\n else if (down)\n interruptIdleWorkers();\n }", "public void preFire(){\n\t}", "@Override\n protected Scheduler scheduler() {\n return Scheduler.newFixedRateSchedule(0, 1, TimeUnit.DAYS);\n }", "public com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition getAutoReplyTriggeredSend()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().find_element_user(AUTOREPLYTRIGGEREDSEND$20, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "@DISPID(31)\r\n\t// = 0x1f. The runtime will prefer the VTID if present\r\n\t@VTID(36)\r\n\tasci.activebatch.enumJobTimerTriggerType timerTrigger();", "public void compute() {\n\t\t// Fire as continuously as gun heating will allow.\n\t\tif (getGunCurrentTemp() < getGunUnjamTemp() && fires)\n\t\t\tfire((float)(Math.random() * 360.0));\n\t\t// Might as well wait the gun can be reloaded\n\t\tUtility.delay(getGunReloadDurationMillis());\n\t}", "public static void scheduleRefreshJob() {\n\t\ttry {\n\t\t\tScheduler sched = StdSchedulerFactory.getDefaultScheduler();\n\t\t\tJobDetail job = newJob(RefreshJob.class)\n\t\t\t .withIdentity(REFRESH_JOB_KEY)\n\t\t\t .build();\n\n\t\t\tSimpleTrigger trigger = newTrigger()\n\t\t\t .withIdentity(REFRESH_TRIGGER_KEY)\n\t\t\t .withSchedule(repeatSecondlyForever(refreshInterval))\n\t\t\t .build();\n\n\t\t\tsched.scheduleJob(job, trigger);\n\t\t\tlogger.debug(\"Scheduled refresh job '{}' in DefaulScheduler\", job.getKey());\n\t\t} catch (SchedulerException e) {\n\t\t\tlogger.warn(\"Could not schedule refresh job: {}\", e.getMessage());\n\t\t}\n\t}", "@Override\n\tpublic RunTime runTime()\n\t{\n\t\tCalendar now = Calendar.getInstance();\n\t\tRunTimeImpl rv = new RunTimeImpl(now.get(Calendar.HOUR_OF_DAY), now.get(Calendar.MINUTE));\n\n\t\treturn rv;\n\t}", "@Override\n public ScheduledFuture<?> schedule(Runnable task, Trigger trigger) {\n if (!canRun()) {\n return null;\n }\n return super.schedule(task, trigger);\n }", "public double nextArrivalTime() {\n return (-1 / lambda) * Math.log(1 - randomAT.nextDouble());\n }", "protected void scheduleExpiry()\n {\n long dtExpiry = 0L;\n int cDelay = OldOldCache.this.m_cExpiryDelay;\n if (cDelay > 0)\n {\n dtExpiry = getSafeTimeMillis() + cDelay;\n }\n setExpiryMillis(dtExpiry);\n }", "public com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition getAutoForwardTriggeredSend()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().find_element_user(AUTOFORWARDTRIGGEREDSEND$16, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "private void scheduleNextAlarm() {\n // Cancel the currently scheduled Alarm in order to schedule the next.\n if (nextAlarm != null) {\n alarmManager.cancel(createAlarmIntent(this, nextAlarm.getId()));\n nextAlarm = null;\n }\n final Calendar calendar = Calendar.getInstance();\n Alarm alarm;\n int i = 0;\n do {\n // Look for an Alarm that is upcoming from the Calendar day and time.\n alarm = dailyDoDatabaseHelper.getNextAlarmForCalendarDay(calendar);\n if (alarm == null) {\n // If an Alarm was not found for the remainder of the day,\n // then check the next day starting midnight.\n calendar.set(Calendar.HOUR_OF_DAY, 0);\n calendar.set(Calendar.MINUTE, 0);\n calendar.add(Calendar.DAY_OF_WEEK, 1);\n Log.d(CLASS_NAME, String.format(\"Checking next Calendar=%s for Alarm.\", calendar));\n }\n } while (alarm == null && i++ < 7);\n if (alarm != null) {\n nextAlarm = alarm;\n // Reusing the previous Calendar because it has scope of the future day.\n calendar.set(Calendar.HOUR_OF_DAY, alarm.getHour());\n calendar.set(Calendar.MINUTE, alarm.getMinute());\n calendar.set(Calendar.SECOND, 0);\n alarmManager.set(AlarmManager.RTC_WAKEUP,\n calendar.getTimeInMillis(),\n createAlarmIntent(this, alarm.getId()));\n Log.d(CLASS_NAME, String.format(\"Alarm=%s was found, scheduled on Calendar=%s\", alarm.toString(), calendar.toString()));\n } else {\n Log.d(CLASS_NAME, \"No upcoming Alarm(s) found to schedule.\");\n }\n }", "public interface TriggerContext {\n\n /**\n * Return the last <i>scheduled</i> execution time of the task, or.\n *\n * @return the date\n * {@code null} if not scheduled before.\n */\n Date lastScheduledExecutionTime();\n\n /**\n * Return the last <i>actual</i> execution time of the task, or {@code null}\n * if not scheduled before.\n *\n * @return the date\n */\n Date lastActualExecutionTime();\n\n /**\n * Return the last completion time of the task, or {@code null} if not\n * scheduled before.\n *\n * @return the date\n */\n Date lastCompletionTime();\n}", "public Date getNextCheckDate(Date now)\r\n\t{\r\n\t\tsetTime(now);\r\n\r\n\t\tswitch (type)\r\n\t\t{\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_MINUTE:\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.MINUTE, 1);\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_HOUR:\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.HOUR_OF_DAY, 1);\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.HALF_DAY:\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tint hour = get(Calendar.HOUR_OF_DAY);\r\n\t\t\tif (hour < 12)\r\n\t\t\t{\r\n\t\t\t\tset(Calendar.HOUR_OF_DAY, 12);\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\tset(Calendar.HOUR_OF_DAY, 0);\r\n\t\t\t\tadd(Calendar.DAY_OF_MONTH, 1);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_DAY:\r\n\t\t\tset(Calendar.HOUR_OF_DAY, 0);\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.DATE, 1);\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_WEEK:\r\n\t\t\tset(Calendar.DAY_OF_WEEK, getFirstDayOfWeek());\r\n\t\t\tset(Calendar.HOUR_OF_DAY, 0);\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.WEEK_OF_YEAR, 1);\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_MONTH:\r\n\t\t\tset(Calendar.DATE, 1);\r\n\t\t\tset(Calendar.HOUR_OF_DAY, 0);\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.MONTH, 1);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tthrow new IllegalStateException(\"Unknown periodicity type.\");\r\n\t\t}\r\n\t\treturn getTime();\r\n\t}", "protected TriggerFactory getTriggerFactory() {\n\t\treturn this.triggerFactory;\n\t}", "public int getFireDuration() {\n \t\treturn 1500;\n \t}", "private void beginSchedule(){\n\t\tDivaApp.getInstance().submitScheduledTask(new RandomUpdater(this), RandomUpdater.DELAY, RandomUpdater.PERIOD);\n\t}", "@Override\n protected Scheduler createScheduler() {\n return new JLScheduler(this) {\n @Override\n public List<Goal> goals(Job job) {\n List<Goal> goals= super.goals(job);\n Goal endGoal = goals.get(goals.size()-1);\n if (!(endGoal.name().equals(\"End\"))) {\n throw new IllegalStateException(\"Last goal is not an End goal?\");\n }\n endGoal.addPrereq(new IRGoal(job, fSourceLoader));\n return goals;\n }\n };\n }", "public boolean isHasFire() {\n\t\treturn hasFire;\n\t}", "public long getRunLastMillis()\n {\n return 0L;\n }", "private Trigger createSimpleJob(SchedulerJobEntity schedulerEntity, JobDetail jobDetail) throws ParseException {\n\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\tDate date = df.parse(schedulerEntity.getStartTime());\n\n\t\tSimpleScheduleBuilder simpleScheduleBuilder = null;\n\n\t\tif (schedulerEntity.getRepeatCount() >= 0) {\n\t\t\t\n\t\t\tsimpleScheduleBuilder = SimpleScheduleBuilder.simpleSchedule()\n\t\t\t\t\t.withRepeatCount(schedulerEntity.getRepeatCount())\n\t\t\t\t\t.withIntervalInMilliseconds(schedulerEntity.getRepeatTime());\n\t\t\t\n\t\t} else {\n\t\t\tsimpleScheduleBuilder = SimpleScheduleBuilder.simpleSchedule().repeatForever()\n\t\t\t\t\t.withIntervalInMilliseconds(schedulerEntity.getRepeatTime());\n\t\t}\n\n\t\treturn TriggerBuilder.newTrigger().withIdentity(schedulerEntity.getJobName(), schedulerEntity.getJobGroup())\n\t\t\t\t.forJob(jobDetail).usingJobData(jobDetail.getJobDataMap()).startAt(date)\n\t\t\t\t.withDescription(schedulerEntity.getJobName()).withSchedule(simpleScheduleBuilder).build();\n\t}", "public void activateTimers(){\n\n\t\twhile(true){\n\t\t\ttry {\n\t\t\t\tThread.sleep(FIVE_SECONDS);\n\t\t\t\t//System.out.print(\".\");\n\t\t\t\tSystem.out.println(jobscheduler.getSchedulerStatus());\n\t\t\t\t//if the props list changes\n\t\t\t\tif(poller.inspect()!=0){\n\t\t\t\t\tschedule(this.poller.refresh());\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\tfor (String k : trigs.keySet()){\n\t\t\t\t\tSystem.out.println(k+\"//\"+formatCalendar(Calendar.getInstance())+\"->\"+trigs.get(k).getNextFireTime());\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t}\n\t\t\tcatch(InterruptedException ie){\n\t\t\t\tSystem.err.println(\"Interrupted Exception : \" + ie);\n\t\t\t\tthrow new RuntimeException(ie);\n\t\t\t}\n\t\t\tcatch(SchedulerException se){\n\t\t\t\tSystem.err.println(\"Scheduler Exception : \" + se);\n\t\t\t}\n\t\t}\n\t}", "public void toNow() {\r\n double now = currentSimulationTime();\r\n double passed_time = now - lastTime - suspendetTime;\r\n\r\n if (MathTools.less(0, passed_time)) {\r\n if (currentStep != null) {\r\n\r\n // get the demand of the first job\r\n double demand = running_processes.get(currentStep);\r\n demand -= passed_time;\r\n SuspendableFCFSResource.this.remainingDemand -= passed_time;\r\n \r\n // avoid trouble caused by rounding issues\r\n demand = MathTools.equalsDouble(demand, 0) ? 0.0 : demand;\r\n\r\n assert demand >= 0 : \"Remaining demand (\" + demand + \") smaller than zero! at simulation time: \"\r\n + now;\r\n\r\n running_processes.put(currentStep, demand);\r\n }\r\n }\r\n lastTime = now;\r\n suspendetTime = 0;\r\n }", "@Nonnull\n public JDK8TriggerBuilder <T> startNow ()\n {\n return startAt (PDTFactory.getCurrentLocalDateTime ());\n }", "public Trigger createTrigger(ConfigProperties cprop){\n\t\tint repeat;\n\t\tlong interval;\n\t\tCalendar sd = calculateStartTime(cprop);\n\t\tCalendar ed = calculateEndTime(cprop);\n\t\tString name = cprop.getProperty(\"PROJ.name\");\n\n\t\tString rstr = cprop.getProperty(\"TIME.repeat\");\n\t\tString istr = cprop.getProperty(\"TIME.interval\");\n\t\tString fstr = cprop.getProperty(\"TIME.frequency\");\n\n\t\t//repeat this many times or forever\n\t\tif(rstr!=null)\n\t\t\trepeat = Integer.parseInt(rstr);\n\t\telse\n\t\t\trepeat = SimpleTrigger.REPEAT_INDEFINITELY;\n\n\t\t//repeat every interval milliseconds or daily\n\t\t//interval overrides frequency\n\t\tif(istr!=null)\n\t\t\tinterval = Long.parseLong(istr);\n\t\telse if (fstr!=null)\n\t\t\tinterval = ONE_DAY/Long.parseLong(fstr);\n\t\telse\n\t\t\tinterval = ONE_DAY;\n\n\t\tjlog.info(\"Create Trigger n=\"+name+\" sd=\"+sd.getTime()+\" ed=\"+ed.getTime()+\" r=\"+repeat+\" i=\"+interval);\n\n\t\tTrigger trigger = new SimpleTrigger(name, null,sd.getTime(),ed.getTime(),repeat,interval);\n\t\ttrigger.setMisfireInstruction(SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT);\n\t\treturn trigger;\n\n\n\t}", "double getMinTimerTrig();", "@ScheduledMethod(start = ScheduleParameters.END, interval = 0, priority = ScheduleParameters.LAST_PRIORITY)\n\tpublic void testIntegrateAndFire() {\n\t\tassertEquals(1, firingVector.size());\n\t\tdouble timeOfFiring = firingVector.get(0);\n\t\t// the time of firing must be the same with the latest integrated\n\t\t// synapse.\n\t\tassertEquals(timeOfFiring, synapse7.getLastSpikeTime(), 0.0);\n\t\tassertEquals(timeOfFiring, synapse8.getLastSpikeTime(), 0.0);\n\t\t//\n\t\tVector<Synapse> contributedSynapses = restingNeuron\n\t\t\t\t.getContributedSynapses();\n\t\tassertNotNull(contributedSynapses);\n\t\tassertEquals(6, contributedSynapses.size());\n\t\tassertFalse(contributedSynapses.contains(synapse1));\n\t\tassertFalse(contributedSynapses.contains(synapse2));\n\t\tassertTrue(contributedSynapses.contains(synapse3));\n\t\tassertTrue(contributedSynapses.contains(synapse4));\n\t\tassertTrue(contributedSynapses.contains(synapse5));\n\t\tassertTrue(contributedSynapses.contains(synapse6));\n\t\tassertTrue(contributedSynapses.contains(synapse7));\n\t\tassertTrue(contributedSynapses.contains(synapse8));\n\t\tassertFalse(contributedSynapses.contains(synapse9));\n\t\tassertFalse(contributedSynapses.contains(synapse10));\n\t\tassertFalse(contributedSynapses.contains(synapse11));\n\t\t//\n\t\tVector<Neuron> candidateNeurons = restingNeuron.getCandidateNeurons();\n\t\tassertNotNull(candidateNeurons);\n\t\tassertEquals(candidateNeurons.size(), 1);\n\t}", "public BigDecimal getSetupTimeReal() {\n\t\tBigDecimal bd = (BigDecimal) get_Value(\"SetupTimeReal\");\n\t\tif (bd == null)\n\t\t\treturn Env.ZERO;\n\t\treturn bd;\n\t}", "double getDefaultTimerTrig();", "private com.google.protobuf.SingleFieldBuilderV3<\n com.google.protobuf.Timestamp,\n com.google.protobuf.Timestamp.Builder,\n com.google.protobuf.TimestampOrBuilder>\n getLastRefreshTimeFieldBuilder() {\n if (lastRefreshTimeBuilder_ == null) {\n lastRefreshTimeBuilder_ =\n new com.google.protobuf.SingleFieldBuilderV3<\n com.google.protobuf.Timestamp,\n com.google.protobuf.Timestamp.Builder,\n com.google.protobuf.TimestampOrBuilder>(\n getLastRefreshTime(), getParentForChildren(), isClean());\n lastRefreshTime_ = null;\n }\n return lastRefreshTimeBuilder_;\n }", "@Override\n public String toString() {\n return \"Trigger '\" + getFullName() + \"': triggerClass: '\"\n + getClass().getName() + \" calendar: '\" + getCalendarName() \n + \"' misfireInstruction: \" + getMisfireInstruction() \n + \" nextFireTime: \" + getNextFireTime();\n }", "public void fire() {\n\n\t\t// A player cannot continually fire, there is a delay between each bullet.\n\t\tif (isAbleToFire) {\n\n\t\t\taudio.playMusic(\"Audio/Fire.wav\");\n\n\t\t\tif (multiBulletIsActive) {\n\n\t\t\t\tmultiBulletFire();\n\n\t\t\t} else if (speedBulletIsActive) {\n\n\t\t\t\tspeedBulletFire();\n\n\t\t\t} else if (quickFireBulletIsActive) {\n\n\t\t\t\tquickFireBulletFire();\n\n\t\t\t} else {\n\n\t\t\t\t// Single fire.\n\t\t\t\t// Adjust bullet position to be fired from the center of the player.\n\t\t\t\tbulletArrayList.add(new Bullet(xPosition + ((width / 2) - bulletWidth / 2), bulletYPosition,\n\t\t\t\t\t\tbulletWidth, bulletHeight, \"Red\"));\n\t\t\t}\n\n\t\t\t// Stop the player from being able to fire for 'ticksBetweemFire' amount.\n\t\t\tticksToNextFire = currentTickCount + ticksBetweenFire;\n\t\t}\n\t}", "@Scheduled(initialDelayString = \"${jobs.frequent.trigger.init.seconds:1800}000\", fixedDelayString = \"${jobs.frequent.trigger.delay.seconds:10800}000\")\n\tpublic void frequentPolling() {\n\t\tif (jazzPartnerTrackingJobEnabled) {\n\t\t\tlog.info(\"Scheduled Frequent Polling Launched\");\n\t\t\tSet<JazzApplicantPollConfiguration> configs = jazzPolling.getFrequentPollingConfigs();\n\t\t\tfor (JazzApplicantPollConfiguration config : configs) {\n\t\t\t\tjazzPolling.pollJazzApplicants(config);\n\t\t\t}\n\t\t} else {\n\t\t\tlog.info(\"Jazz frequent polling disabled.\");\t\t\t\t\n\t\t}\t\n\t}", "public void arrive() {\r\n\t\tif (creature.getxMove() == 0 && creature.getyMove() == 0){\r\n\t\t\tarriveTimer += System.currentTimeMillis() - lastMoveTimer;\r\n\t\t\tlastMoveTimer = System.currentTimeMillis();\r\n\t\t\tif(arriveTimer < arriveCooldown)\r\n\t\t\t\treturn;\r\n\t\t\tindex++;\r\n\t\t\tif (index > checkpoints.size()){\r\n\t\t\t\tindex = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public java.util.Calendar getRequestedTime()\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(REQUESTEDTIME$2, 0);\n if (target == null)\n {\n return null;\n }\n return target.getCalendarValue();\n }\n }", "private long decideNextEndReset() {\n\t\tlong time = System.currentTimeMillis() + plugin.getEndResetPeriod() * 86400000;\n\t\t// Round to get the start of the next day in GMT, 5PM Pacific, 8PM Eastern,\n\t\t// when there are the most players on more-or-less\n\t\treturn (time / 86400000) * 86400000;\n\t}", "public com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition addNewAutoReplyTriggeredSend()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition target = null;\n target = (com.exacttarget.wsdl.partnerapi.TriggeredSendDefinition)get_store().add_element_user(AUTOREPLYTRIGGEREDSEND$20);\n return target;\n }\n }", "@Test\n public void testGetNextAlarm()\n {\n addTask(\"task1\", now.plusMinutes(5), null, false);\n addTask(\"task2\", now.plusDays(5), null, false);\n addTask(\"task3\", now.plusMinutes(5), Type.DAY, false); //due date NOW + 5 min\n addTask(\"task4\", now.minusDays(1), Type.WEEK, false); //due date in 1 week\n addTask(\"task5\", now.plusMinutes(10), null, true); //disabled\n\n new GetNextAlarm().getNextAlarm(now.plusMinutes(5).getMillis(), false);\n\n //this should calculate the next occurrance of task3\n Cursor cursor = taskProvider.query(TaskProvider.TASK_JOIN_REPEAT_URI,\n new TaskTable().getColumns(TASK_ID, REPEAT_NEXT_DUE_DATE),\n REPEAT_NEXT_DUE_DATE+\"=\"+now.plusMinutes(5).plusDays(1).getMillis(),\n null,\n null);\n\n assertThat(cursor.getCount(), is(1));\n cursor.moveToFirst();\n assertThat(cursor.getInt(0), is(3));\n\n }", "private void fireEvents() {\n\n if (clockTickCount % clockTicksTillWorkloadChange == 0) {\n clockEventPublisher.fireTriggerWorkloadHandlerEvent(clockTickCount, intervalDurationInMilliSeconds);\n }\n\n // if (clockTickCount % clockTicksTillScalingDecision == 0) {\n // clockEventPublisher.fireTriggerAutoScalerEvent(clockTickCount,\n // intervalDurationInMilliSeconds);\n // }\n\n clockEventPublisher.fireClockEvent(clockTickCount, intervalDurationInMilliSeconds);\n\n // INfrastruktur\n if (clockTickCount % clockTicksTillPublishInfrastructureState == 0) {\n clockEventPublisher.fireTriggerPublishInfrastructureStateEvent(clockTickCount,\n intervalDurationInMilliSeconds);\n\n }\n\n // Queue\n if (clockTickCount % clockTicksTillPublishQueueState == 0) {\n\n clockEventPublisher.fireTriggerPublishQueueStateEvent(clockTickCount, intervalDurationInMilliSeconds);\n }\n\n }", "Date getEventFiredAt();", "boolean hasUpdateTriggerTime();", "@PostConstruct\n public void initTriggerEvaluateRunning() {\n this.triggerRepository.findAll().forEach(trigger -> {\n if (trigger.getEvaluateRunningDate() != null) {\n var unlocked = trigger.toBuilder().evaluateRunningDate(null).build();\n this.triggerRepository.save(unlocked);\n }\n });\n }", "@java.lang.Override\n public long getNextDefenderBonusCollectTimestampMs() {\n return nextDefenderBonusCollectTimestampMs_;\n }", "public LocalTime calcArrivalTime() {\n if (StaticData.TravelTime[Location.valueOf(this.dLocation).getIndex()][Location.valueOf(this.aLocation).getIndex()] != 0)\n return this.getDTime().plusMinutes(StaticData.delay + StaticData.TravelTime[Location.valueOf(this.dLocation).getIndex()][Location.valueOf(this.aLocation).getIndex()]);\n else\n return this.getDTime().plusMinutes(StaticData.delay + StaticData.TravelTime[Location.valueOf(this.aLocation).getIndex()][Location.valueOf(this.dLocation).getIndex()]);\n\n }", "private static void initializeJob(IGoobiJob goobiJob, String configuredStartTimeProperty,Scheduler sched) throws SchedulerException{\n\t\tlogger.debug(goobiJob.getJobName());\n\t\tJobDetail jobDetail = new JobDetail(goobiJob.getJobName(), null, goobiJob.getClass());\n\t\t\n\t\t\n\t\tif (ConfigMain.getLongParameter(configuredStartTimeProperty, -1) != -1) {\n\t\t\tlong msOfToday = ConfigMain.getLongParameter(configuredStartTimeProperty, -1);\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tcal.set(1984, 8, 11, 0, 0);\n\t\t\tcal.set(Calendar.SECOND, 0);\n\t\t\tcal.set(Calendar.MILLISECOND, 0);\n\n\t\t\tcal.setTime(new Date(cal.getTimeInMillis() + msOfToday));\n\t\t\tint hour = cal.get(Calendar.HOUR_OF_DAY);\n\t\t\tint min = cal.get(Calendar.MINUTE);\n\n\t\t\tTrigger trigger = TriggerUtils.makeDailyTrigger(hour, min);\n\t\t\ttrigger.setStartTime(new Date());\n\t\t\ttrigger.setName(goobiJob.getJobName() + \"_trigger\");\n\n\t\t\tif(logger.isInfoEnabled()){\n\t\t\t\tlogger.info(\"daily Job \" + goobiJob.getJobName() + \" start time: \" + hour + \":\" + min);\n\t\t\t}\n\t\t\tsched.scheduleJob(jobDetail, trigger);\n\t\t}\n\t}", "public boolean isFirstLaunchCalled() {\n return this.f51;\n }", "protected boolean isJobJustTriggered(Trigger trigger, Date currentTime, int nearEventInMinutes) {\n\t\tjava.util.Calendar cal = new FlashServiceImpl().getServerCalendar();\n\t\tDate prevTime = trigger.getPreviousFireTime();\n\t\tif (prevTime != null) {\n\t\t\tjava.util.Calendar serverCalendar = new FlashServiceImpl().getServerCalendar();\n\t\t\tserverCalendar.setTimeInMillis(prevTime.getTime());\n\t\t\tcal.add(java.util.Calendar.MINUTE, nearEventInMinutes);\n\t\t\tif (cal.getTime().after(currentTime)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean isFire() {\n return this.type == Type.FIRE;\n }", "static void scheduleNextNotificationRefresh(Context context, AlarmManagerInterface manager,\n long alarmTime) {\n scheduleAlarmHelper(context, manager, alarmTime, true);\n }", "@java.lang.Override\n public long getNextDefenderBonusCollectTimestampMs() {\n return nextDefenderBonusCollectTimestampMs_;\n }", "@Override\n\tpublic float getStartTime()\n\t{\n\t\treturn _tbeg;\n\t}", "public boolean hasUpdateTriggerTime() {\n return instance.hasUpdateTriggerTime();\n }", "public double getFirstTime()\n\t{\n\t\tdouble time = Double.NaN;\n\t\tfinal Entry< Double, V > entry = getFirstEntry();\n\t\tif( entry != null )\n\t\t{\n\t\t\ttime = entry.getKey();\n\t\t}\n\t\treturn time;\n\t}", "public Date getDefaultStartTime()\r\n {\r\n return (m_defaultStartTime);\r\n }", "@Override\r\n\tpublic int requiredTime() {\n\t\treturn 0;\r\n\t}", "public Alarm getFirstAlarm()\r\n\t{\r\n\t\tif ((getAlarms() != null) && !getAlarms().isEmpty())\r\n\t\t{\r\n\t\t\treturn getAlarms().get(FIRST);\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}", "public boolean triggersNow()\n\t{\n\t\tif(!this.canTrigger())\n\t\t\treturn false;\n\n\t\tfor(GameObject object: this.game.actualState.stack())\n\t\t\tif(object instanceof StateTriggeredAbility)\n\t\t\t\tif(((StateTriggeredAbility)object).printedVersionID == this.ID)\n\t\t\t\t\treturn false;\n\n\t\tIdentified source = this.getSource(this.state);\n\t\tint controller;\n\t\tif(source.isGameObject())\n\t\t\tcontroller = ((GameObject)source).controllerID;\n\t\telse\n\t\t\t// it's a player\n\t\t\tcontroller = source.ID;\n\t\tfor(GameObject object: this.game.actualState.waitingTriggers.get(controller))\n\t\t\tif((object instanceof StateTriggeredAbility) && (((StateTriggeredAbility)object).printedVersionID == this.ID))\n\t\t\t\treturn false;\n\n\t\tfor(SetGenerator condition: this.triggerConditions)\n\t\t\tif(!condition.evaluate(this.game, this).isEmpty())\n\t\t\t\treturn true;\n\n\t\treturn false;\n\t}", "@Override\r\n\r\n\tpublic E pollFirst() {\n\t\treturn poll();\r\n\t}", "public double getReadyTime()\n {\n if (scheduledOPs.isEmpty())\n {\n return 0;\n\n }else{\n\n \t//Get latest scheduled op's completion time as ready time\n return scheduledOPs.get(scheduledOPs.size() - 1).getCompletionTime();\n }\n }", "public static long nextRunSync(Schedule schedule, Calendar nowCal) throws AppException {\n\n\t\tlong durationInSec = 0;\n\t\tCalendar scheduleCal = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n\t\tString[] hourMin = schedule.getTime().split(\":\");\n\t\tint curMonth = nowCal.get(Calendar.MONTH);\n\t\tswitch (schedule.getFrequency()) {\n\t\tcase \"daily\":\n\t\t\tscheduleCal.set(Calendar.HOUR_OF_DAY, Integer.parseInt(hourMin[0]));\n\t\t\tscheduleCal.set(Calendar.MINUTE, Integer.parseInt(hourMin[1]));\n\t\t\tif (nowCal.getTimeInMillis() > scheduleCal.getTimeInMillis()) {\n\t\t\t\tscheduleCal.add(Calendar.HOUR, 24);\n\t\t\t\tdurationInSec = (scheduleCal.getTimeInMillis() - nowCal.getTimeInMillis()) / 1000;\n\t\t\t} else if (nowCal.getTimeInMillis() < scheduleCal.getTimeInMillis()) {\n\t\t\t\tdurationInSec = (scheduleCal.getTimeInMillis() - nowCal.getTimeInMillis()) / 1000;\n\t\t\t} else {\n\t\t\t\tdurationInSec = 0;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tschedule.setNextRun(ShowTimeinGMT(scheduleCal));\n\t\treturn durationInSec;\n\n\t}", "public long getNextCheckMillis(Date now)\r\n\t{\r\n\t\treturn getNextCheckDate(now).getTime();\r\n\t}", "public IUTCTime getFirstTime() {\n if (null == firstTime) {\n return new UTCTime(0);\n }\n return firstTime;\n }", "public LocalDateTime getFireTime() {\n return fireTime;\n }", "public int getEventTime() {\n\t\treturn scheduledTime;\n\t}", "public void pressureToFire() {\n fire1.set(true);\n fire2.set(FFM);\n }", "public double getStartTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STARTTIME$22);\r\n if (target == null)\r\n {\r\n return 0.0;\r\n }\r\n return target.getDoubleValue();\r\n }\r\n }", "static Date calculateNextNotificationDate(Date now, Date sentDate, List<Integer> remindSteps) {\n Calendar sentCal = Calendar.getInstance();\n sentCal.setTime(sentDate);\n for (int dayOffset : remindSteps) {\n sentCal.add(Calendar.DAY_OF_YEAR, dayOffset);\n if (sentCal.getTime().compareTo(now) > 0) {\n return sentCal.getTime();\n }\n }\n return null;\n }", "@Override\r\n\tpublic void doInitialSchedules() {\n\t}" ]
[ "0.6937616", "0.5957808", "0.57517654", "0.5750201", "0.5733211", "0.5591187", "0.55682427", "0.54332715", "0.5390885", "0.53863174", "0.5381111", "0.5364568", "0.5359685", "0.5333282", "0.53171843", "0.5314072", "0.53067535", "0.53058743", "0.52816296", "0.527264", "0.5161132", "0.510766", "0.50999933", "0.50946933", "0.5063176", "0.5053386", "0.502873", "0.5025151", "0.49971485", "0.4929881", "0.49165958", "0.48905212", "0.48871678", "0.48806632", "0.48761547", "0.48671648", "0.48613963", "0.48567408", "0.48504454", "0.48494792", "0.48489442", "0.48109576", "0.4805531", "0.47961116", "0.4795519", "0.4776752", "0.47729686", "0.4749286", "0.4748368", "0.47180116", "0.47158086", "0.4714371", "0.47084302", "0.46951747", "0.46868953", "0.4686536", "0.46806264", "0.4673992", "0.46707457", "0.46680588", "0.46679804", "0.46604243", "0.465879", "0.46516192", "0.46406686", "0.4634981", "0.4631057", "0.46162", "0.46033603", "0.4601811", "0.46015", "0.4600501", "0.45970738", "0.45947897", "0.45910707", "0.4588141", "0.4585838", "0.45852154", "0.45794788", "0.45774743", "0.45664495", "0.45555007", "0.45521054", "0.4539393", "0.45392847", "0.45347655", "0.45286736", "0.45196003", "0.45177674", "0.45101687", "0.45063648", "0.450213", "0.4495739", "0.44923288", "0.44918233", "0.4491758", "0.44887275", "0.44841415", "0.44789883", "0.4478268" ]
0.6465504
1
Get the time at which the Trigger should occur.
public abstract Date getStartTime();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getUpdateTriggerTime();", "public int getUpdateTriggerTime() {\n return instance.getUpdateTriggerTime();\n }", "public int getUpdateTriggerTime() {\n return updateTriggerTime_;\n }", "public abstract Date getPreviousFireTime();", "public abstract Date getFinalFireTime();", "public long getEventTime();", "public Date getEventTime() {\n\t\treturn time;\n\t}", "public int getEventTime() {\n\t\treturn scheduledTime;\n\t}", "public long getStartTime();", "public long getStartTime();", "public EventTime getTime() {\n return this.time;\n }", "long getStartTime();", "public long getPlayerTime ( ) {\n\t\treturn extract ( handle -> handle.getPlayerTime ( ) );\n\t}", "@Override\r\n\tpublic long getTime() {\n\t\treturn this.time;\r\n\t}", "T getEventTime();", "public gov.ucore.ucore._2_0.TimeType getTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.ucore.ucore._2_0.TimeType target = null;\n target = (gov.ucore.ucore._2_0.TimeType)get_store().find_element_user(TIME$2, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "int getStartTime();", "int getStartTime();", "int getStartTime();", "public int getStartTime()\n {\n if (isRepeated()) return start;\n else return time;\n }", "public Time getTime() {\n return this.time; // returns the time associated with the task\n }", "OffsetDateTime lastActionDateTime();", "public String getStartTime();", "public String getStartTime();", "public double getStartTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STARTTIME$22);\r\n if (target == null)\r\n {\r\n return 0.0;\r\n }\r\n return target.getDoubleValue();\r\n }\r\n }", "public long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}", "public Integer getOnTime() {\n return onTime;\n }", "public long getTime() {\r\n\t\treturn time;\r\n\t}", "public interface TriggerContext {\n\n /**\n * Return the last <i>scheduled</i> execution time of the task, or.\n *\n * @return the date\n * {@code null} if not scheduled before.\n */\n Date lastScheduledExecutionTime();\n\n /**\n * Return the last <i>actual</i> execution time of the task, or {@code null}\n * if not scheduled before.\n *\n * @return the date\n */\n Date lastActualExecutionTime();\n\n /**\n * Return the last completion time of the task, or {@code null} if not\n * scheduled before.\n *\n * @return the date\n */\n Date lastCompletionTime();\n}", "public int getTime()\n {\n if (isRepeated()) return start;\n else return time;\n }", "@java.lang.Override\n public long getTime() {\n return time_;\n }", "Date getEventFiredAt();", "public java.util.Calendar getRequestedTime()\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(REQUESTEDTIME$2, 0);\n if (target == null)\n {\n return null;\n }\n return target.getCalendarValue();\n }\n }", "public Date getStartTime() {\n\t\treturn getOriginatingTime();\n\t}", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public int getTT()\n {\n return toTime;\n }", "public synchronized long getTime() {\n return -1L;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public org.landxml.schema.landXML11.GPSTime xgetStartTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.GPSTime target = null;\r\n target = (org.landxml.schema.landXML11.GPSTime)get_store().find_attribute_user(STARTTIME$22);\r\n return target;\r\n }\r\n }", "public synchronized long getWhen() {\n return when;\n }", "public long getTime() {\r\n \treturn time;\r\n }", "long getInhabitedTime();", "public long getTime() {\n return time;\n }", "public long getEventTime() {\n return eventTime;\n }", "public long getWhen() {\n return when;\n }", "@javax.annotation.Nullable\n public Long getTime() {\n return time;\n }", "@Override\n public long getTime() {\n return time;\n }", "public String getStartTime() {\n\t\treturn (new Parser(value)).getString();\n\t}", "public abstract Date getNextFireTime();", "public final long getTime () {\n return time;\n }", "public int getTime() {\r\n return time;\r\n }", "public int getTime() {\n\t\treturn time;\n\t}", "public int getTime() {\n\t\treturn time;\n\t}", "public long lastTime()\r\n/* 219: */ {\r\n/* 220:412 */ return this.lastTime.get();\r\n/* 221: */ }", "public static long getStartTime() {\n return startTime;\n }", "public long getTime() {\n return _time;\n }", "public double getStartTime();", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "@java.lang.Override\n public long getTime() {\n return instance.getTime();\n }", "public Date getAtTime() {\r\n return atTime;\r\n }", "public String getEventTime() {\r\n\t\treturn eventTime;\r\n\t}", "public Long getTime() {\n return time;\n }", "public int getTime() {\n\n\t\treturn time;\n\t}", "public Date getEventTime() {\n return eventTime;\n }", "public Date getEventTime() {\n return eventTime;\n }", "public long getPlayerTimeOffset ( ) {\n\t\treturn extract ( handle -> handle.getPlayerTimeOffset ( ) );\n\t}", "public Date time() {\n return _time;\n }", "public Date time() {\n return _time;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return instance.getTime();\n }", "public long getTime() {\n return instance.getTime();\n }", "public long getTime() {\n return instance.getTime();\n }", "public long getTime() {\n return instance.getTime();\n }", "public static LocalDateTime getLastAction() {\n return lastAction;\n }", "public long getTime() {\n return instance.getTime();\n }", "public long getTime() {\n return instance.getTime();\n }", "public long getTime() {\n return instance.getTime();\n }", "public Date getTime() {\r\n\t\treturn time;\r\n\t}", "public Date getTime() {\n\t\treturn time;\n\t}", "public String getEventTime() {\r\n return eventTime;\r\n }", "public long getTime() {\n return timeMillis;\n }", "public Integer getMakeTime() {\n\t\treturn makeTime;\n\t}", "public Date time() {\n return _time;\n }", "java.util.Calendar getStartTime();", "@Override\r\n\tpublic String gettime() {\n\t\treturn user.gettime();\r\n\t}", "public io.opencannabis.schema.temporal.TemporalInstant.Instant getDesiredTime() {\n if (desiredTimeBuilder_ == null) {\n return desiredTime_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : desiredTime_;\n } else {\n return desiredTimeBuilder_.getMessage();\n }\n }", "public static long time() {\n return date().getTime();\n }", "public Date getTime() {\r\n return time;\r\n }", "public Date getTime() {\r\n return time;\r\n }", "public Date getTime() {\r\n return time;\r\n }", "@Override\n\tpublic String getTime() {\n\t\treturn time;\n\t}" ]
[ "0.718352", "0.70944744", "0.7046346", "0.7044609", "0.6942304", "0.68180615", "0.6763391", "0.66108966", "0.65877146", "0.65877146", "0.65875405", "0.6581069", "0.65748346", "0.65620375", "0.6527075", "0.65113306", "0.64761734", "0.64761734", "0.64761734", "0.6435556", "0.6429776", "0.6420707", "0.6399794", "0.6399794", "0.6386594", "0.63620627", "0.63400537", "0.63318557", "0.6328144", "0.6324266", "0.631681", "0.63155264", "0.6311429", "0.6287189", "0.62760365", "0.62760365", "0.62760365", "0.62760365", "0.62760365", "0.62760365", "0.6275277", "0.6271804", "0.6264105", "0.6264105", "0.62611586", "0.6257441", "0.6253889", "0.6252486", "0.62524223", "0.625118", "0.6247786", "0.6246672", "0.62435484", "0.62434024", "0.62428284", "0.6242155", "0.624103", "0.62337804", "0.62337804", "0.62322104", "0.6231861", "0.62256587", "0.6221886", "0.6221094", "0.6221094", "0.6221094", "0.62174493", "0.6215092", "0.62117726", "0.62112075", "0.6210123", "0.6205767", "0.6205767", "0.62029004", "0.62021124", "0.62021124", "0.6196411", "0.6196411", "0.6196411", "0.61903083", "0.61903083", "0.61903083", "0.61903083", "0.61899257", "0.6183542", "0.6183542", "0.6183542", "0.6180314", "0.6176407", "0.61759096", "0.61720586", "0.6164263", "0.6150249", "0.61480844", "0.6147925", "0.614612", "0.6126134", "0.6117422", "0.6117422", "0.6117422", "0.6117414" ]
0.0
-1
The time at which the trigger's scheduling should start. May or may not be the first actual fire time of the trigger, depending upon the type of trigger and the settings of the other properties of the trigger. However the first actual first time will not be before this date. Setting a value in the past may cause a new trigger to compute a first fire time that is in the past, which may cause an immediate misfire of the trigger.
public abstract void setStartTime(Date startTime);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Date getDefaultStartTime()\r\n {\r\n return (m_defaultStartTime);\r\n }", "public abstract Date getPreviousFireTime();", "public abstract Date getNextFireTime();", "public Date getStartTime() {\n\t\treturn getOriginatingTime();\n\t}", "public abstract Date getFinalFireTime();", "public Timestamp getDateStartSchedule() {\n\t\treturn (Timestamp) get_Value(\"DateStartSchedule\");\n\t}", "public io.opencannabis.schema.temporal.TemporalInstant.Instant getDesiredTime() {\n return desiredTime_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : desiredTime_;\n }", "public io.opencannabis.schema.temporal.TemporalInstant.Instant getDesiredTime() {\n if (desiredTimeBuilder_ == null) {\n return desiredTime_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : desiredTime_;\n } else {\n return desiredTimeBuilder_.getMessage();\n }\n }", "public int getEventTime() {\n\t\treturn scheduledTime;\n\t}", "public Date getScheduleTime() {\n return this.scheduleTime;\n }", "public org.landxml.schema.landXML11.GPSTime xgetStartTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.GPSTime target = null;\r\n target = (org.landxml.schema.landXML11.GPSTime)get_store().find_attribute_user(STARTTIME$22);\r\n return target;\r\n }\r\n }", "public Date getScheduletime() {\r\n return scheduletime;\r\n }", "public double getStartTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STARTTIME$22);\r\n if (target == null)\r\n {\r\n return 0.0;\r\n }\r\n return target.getDoubleValue();\r\n }\r\n }", "public abstract Date computeFirstFireTime(Calendar calendar);", "public double getScheduledTime() {\n return scheduledTime;\n }", "public float getStartTime()\r\n\t{\r\n\t\tif (starttime != null)\r\n\t\t\treturn starttime.getTimeInMillis();\r\n\t\t\r\n\t\treturn 0;\r\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(STARTTIME_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(STARTTIME_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(STARTTIME_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(STARTTIME_PROP.get());\n }", "public int getUpdateTriggerTime() {\n return updateTriggerTime_;\n }", "@Override\n\tpublic float getStartTime()\n\t{\n\t\treturn _tbeg;\n\t}", "public java.util.Calendar getRequestedTime()\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(REQUESTEDTIME$2, 0);\n if (target == null)\n {\n return null;\n }\n return target.getCalendarValue();\n }\n }", "public Date getStartTime() {\r\n\t\treturn startTime;\r\n\t}", "public int getUpdateTriggerTime() {\n return instance.getUpdateTriggerTime();\n }", "@Nonnull\n public JDK8TriggerBuilder <T> startNow ()\n {\n return startAt (PDTFactory.getCurrentLocalDateTime ());\n }", "public int getStartTime()\n {\n if (isRepeated()) return start;\n else return time;\n }", "public Date getStartTime() {\n\t\treturn startTime;\n\t}", "public Date getStartTime() {\n\t\treturn startTime;\n\t}", "public Date getStartTime() {\n\t\treturn startTime;\n\t}", "public Date getStartTime() {\n\t\treturn startTime;\n\t}", "io.opencannabis.schema.temporal.TemporalInstant.Instant getDesiredTime();", "private Date getPreviosDayStartTime() {\n\t\treturn null;\n\t}", "public Calendar getStartTime() {\r\n\t\treturn startTime;\r\n\t}", "@Override\n\tpublic int getStartTime() {\n\t\treturn 0;\n\t}", "public Date getActualStart()\r\n {\r\n return (m_actualStart);\r\n }", "public java.util.Date getStartTime() {\n return startTime;\n }", "public Date getElectronicStartTime() {\n return (Date)getAttributeInternal(ELECTRONICSTARTTIME);\n }", "public long getStartTime() {\n\t\treturn startTime;\n\t}", "java.util.Calendar getStartTime();", "public java.util.Date getStartTime() {\n return this.startTime;\n }", "public java.util.Date getStartTime() {\n return this.startTime;\n }", "public java.util.Date getStartTime() {\n return this.startTime;\n }", "@Override\n protected LocalDateTime CalculateNextFeedTime() {\n return LocalDateTime.now();\n }", "public Date getStartTime() {\r\n return this.startTime;\r\n }", "Optional<Instant> startTime();", "public LocalDateTime getStartTime() {\n\t\treturn startTime;\n\t}", "Instant getStart();", "public java.lang.Long getStartTime() {\n return start_time;\n }", "public Date getNextExecutionTime() {\n\t\treturn SchedulerUtil.getNextExecution(this);\n\t}", "public Date getStartTime() {\n return this.startTime;\n }", "public long getStartTime();", "public long getStartTime();", "@Override\n\tpublic Long updateStartTime() {\n\t\treturn null;\n\t}", "public java.lang.Long getStartTime() {\n return start_time;\n }", "@Override\n\tpublic RunTime runTime()\n\t{\n\t\tCalendar now = Calendar.getInstance();\n\t\tRunTimeImpl rv = new RunTimeImpl(now.get(Calendar.HOUR_OF_DAY), now.get(Calendar.MINUTE));\n\n\t\treturn rv;\n\t}", "public long getStartTime() {\r\n return startTime;\r\n }", "public long getStartTime () {\n if (isPerformance) {\n return System.currentTimeMillis();\n }\n else\n {\n return 0;\n }\n }", "@Override\n public Date getBeginTime() {\n return beginTime;\n }", "public Date getStartTime() {\n return startTime;\n }", "public Date getStartTime() {\n return startTime;\n }", "public Date getStartTime() {\n return startTime;\n }", "Date getEventFiredAt();", "public Date getSettleTime() {\n return settleTime;\n }", "public DTM getDateTimeStartOfAdministration() { \r\n\t\tDTM retVal = this.getTypedField(3, 0);\r\n\t\treturn retVal;\r\n }", "public Date getStarttime() {\n return starttime;\n }", "public Date getStarttime() {\n return starttime;\n }", "public long getStartTime() {\n return startTime;\n }", "public long getStartTime() {\n return startTime;\n }", "public long getStartTime() {\n return startTime;\n }", "public long getStartTime() {\n return startTime;\n }", "int getUpdateTriggerTime();", "@DISPID(90)\r\n\t// = 0x5a. The runtime will prefer the VTID if present\r\n\t@VTID(88)\r\n\tjava.util.Date expectedBeginExecutionTime();", "com.google.protobuf.Timestamp getStartTime();", "public Date getRequiredTime() {\n return requiredTime;\n }", "public long getStart_time() {\n return start_time;\n }", "@Override\n\tpublic Date getStartTime() {\n\t\treturn promotionLineItem.getStartTime();\n\t}", "long getStartTime();", "public double getStartTime();", "protected double getStartTime() {\n\t\treturn startTime;\n\t}", "public double getFireTime() {\n\t\treturn fireTime;\n\t}", "public long getStartTime ()\r\n {\r\n return startTime;\r\n }", "int getStartTime();", "int getStartTime();", "int getStartTime();", "public static Calendar getDefaultScheduleTime() {\n Calendar scheduled = Calendar.getInstance(TimeZone.getTimeZone(\"Europe/Copenhagen\"));\n scheduled.add(Calendar.HOUR, 1);\n\n scheduled.set(Calendar.MINUTE, 0);\n scheduled.set(Calendar.SECOND, 0);\n scheduled.set(Calendar.MILLISECOND, 0);\n\n return scheduled;\n }", "public String getStartTime() {\n return this.StartTime;\n }", "private void setUpdateTriggerTime(int value) {\n bitField0_ |= 0x00000002;\n updateTriggerTime_ = value;\n }", "public LocalTime getStartTime () {\n\t\treturn DateUtils.toLocalTime(this.start);\n\t}", "public static long getStartTime() {\n return startTime;\n }", "public DTM getRxa3_DateTimeStartOfAdministration() { \r\n\t\tDTM retVal = this.getTypedField(3, 0);\r\n\t\treturn retVal;\r\n }", "public abstract Date getStartTime();", "public Date getDefaultEndTime()\r\n {\r\n return (m_defaultEndTime);\r\n }", "@DISPID(13)\r\n\t// = 0xd. The runtime will prefer the VTID if present\r\n\t@VTID(19)\r\n\tjava.util.Date nextScheduledExecutionDateTime();", "@Override\r\n\tpublic int requiredTime() {\n\t\treturn 0;\r\n\t}", "public long getTimeStart()\n {\n return this.timeStart;\n }", "public String getStartTime() {\n\t\treturn (new Parser(value)).getString();\n\t}", "public IUTCTime getFirstTime() {\n if (null == firstTime) {\n return new UTCTime(0);\n }\n return firstTime;\n }", "public long getBeginTime() { return beginTime; }", "public org.apache.xmlbeans.XmlDateTime xgetRequestedTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlDateTime target = null;\n target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(REQUESTEDTIME$2, 0);\n return target;\n }\n }", "public double getStartTime() {\n return startTime;\n }" ]
[ "0.65434545", "0.64940107", "0.6409908", "0.63867986", "0.6299049", "0.6230454", "0.6227341", "0.61749685", "0.61354226", "0.6118681", "0.6116968", "0.61114794", "0.60861444", "0.6030594", "0.60202736", "0.59861916", "0.5957326", "0.5957326", "0.59554243", "0.59554243", "0.5938097", "0.5935365", "0.5927856", "0.5912815", "0.59028816", "0.5902688", "0.5891771", "0.5874682", "0.5874682", "0.5874682", "0.5874682", "0.5872445", "0.5870269", "0.5866506", "0.5855707", "0.5853537", "0.5840749", "0.5831628", "0.58267516", "0.58191854", "0.5812224", "0.5812224", "0.5812224", "0.58057964", "0.5790374", "0.57863265", "0.5761606", "0.5757916", "0.5753893", "0.57536584", "0.5746155", "0.57338005", "0.57338005", "0.5732904", "0.5726412", "0.5720271", "0.5711725", "0.570578", "0.5705066", "0.5695809", "0.5695809", "0.5695809", "0.56839824", "0.567282", "0.5670812", "0.5669042", "0.5669042", "0.5667801", "0.5667801", "0.5667801", "0.5667801", "0.56589293", "0.5650674", "0.5647378", "0.5640246", "0.5638504", "0.5634493", "0.56328356", "0.5629812", "0.5626", "0.561298", "0.5611576", "0.56058186", "0.56058186", "0.56058186", "0.56050617", "0.560475", "0.5599851", "0.5583433", "0.5581975", "0.5575167", "0.5574692", "0.5568941", "0.5561393", "0.553942", "0.5534328", "0.5530408", "0.55280465", "0.55273235", "0.5527107", "0.5525446" ]
0.0
-1
Set the time at which the Trigger should quit repeating regardless of any remaining repeats (based on the trigger's particular repeat settings).
public abstract void setEndTime(Date endTime);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTime(int start, int end, int repeat)\n {\n if (start == end) setTime(start);\n else\n {\n this.start = start;\n this.end = end;\n this.repeat = repeat;\n }\n }", "public static void resetTime() {\n\t\ttime = TimeUtils.millis();\n\t}", "public synchronized void resetTime() {\n }", "public void SetEatenTime(double time) {\n\t\tEatenTime = time ;\n\t}", "public void resetPlayerTime ( ) {\n\t\texecute ( handle -> handle.resetPlayerTime ( ) );\n\t}", "public void setRepeat(final boolean isRepeating) {\n\t\tthis.isRepeating = isRepeating;\n\t\tif (isRepeating) {\n\t\t\tloopListenerID = addOnEndEvent(() -> goToStart());\n\t\t} else {\n\t\t\tremoveOnEndEvent(loopListenerID);\n\t\t}\n\t}", "@AfterEach\n public void setTimeInterval() {\n try {\n TimeUnit.SECONDS.sleep(Long.valueOf(settings.getTimeInterval()));\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "void setInhabitedTime(long ticks);", "public void setRepeat() {\n\t\tthis.repeat = !this.repeat;\n\t}", "@Override\n\tpublic void repeatChanged(boolean repeating) {\n\t\t\n\t}", "public void resetTimeLimit();", "public void setResetTimeOnStop(boolean aFlag) { _resetTimeOnStop = aFlag; }", "public void setMaxTime(int aMaxTime)\n{\n // Set max time\n _maxTime = aMaxTime;\n \n // If time is greater than max-time, reset time to max time\n if(getTime()>_maxTime)\n setTime(_maxTime);\n}", "public void setRepeatInterval(Long repeatInterval) {\n\t\tthis.repeatInterval = repeatInterval;\n\t}", "public void kickTimer() {\n delayTime = System.currentTimeMillis() + shutdownDelay;\n// System.out.println(\"Time at which the loop should kick: \" + delayTime);\n }", "public void stopRepeating() {\n mRepeatHandler.removeMessages(RepeatHandler.MSG_REPEAT);\n mResourceIdToRepeat = 0;\n }", "private void doSomeThingRepeat() {\n\t\t\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\n\t\t\tint mHourNow = 0, mMinuteNow = 0;\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t\tfinal Calendar c = Calendar.getInstance();\n\t\t\t\tmHourNow = c.get(Calendar.HOUR_OF_DAY);\n\t\t\t\tmMinuteNow= c.get(Calendar.MINUTE);\n\t\t\t\ttime = prefs.getString(\"time\", \"\");\n\t\t\t\tString mHour = time.substring(0, 2);\n\t\t\t\tString mMinute = time.substring(3, 5) ;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tint mh = Integer.parseInt(mHour);\n\t\t\t\tint mm = Integer.parseInt(mMinute);\n\t\t\t\t\t\n\t\t\t\tif (mHourNow == mh && mMinuteNow == mm) {\n\t\t\t\t\tplayMediaAlarm();\n\t\t\t\t}\n\t\t\t\t\tLog.d(\"Myservice-doSomeThingRepeat\", mHourNow +\"h\"+ mMinuteNow + \"&&\" +mHour +\"h\" + mMinute);\n\t\t\t\t\n\t\t\t}\n\t\t}, 0, UPDATE);\n\t}", "void setTime(final int time);", "public void setTimer() {\n\t\t\n\t}", "public void setTime(int t){\r\n\t\t\t\ttime = t;\r\n\t\t\t}", "void setTestAlarm() \n {\n \t// start with now\n java.util.Calendar c = java.util.Calendar.getInstance();\n c.setTimeInMillis(System.currentTimeMillis());\n\n int nowHour = c.get(java.util.Calendar.HOUR_OF_DAY);\n int nowMinute = c.get(java.util.Calendar.MINUTE);\n\n int minutes = (nowMinute + 1) % 60;\n int hour = nowHour + (nowMinute == 0 ? 1 : 0);\n\n saveAlarm(this, mId, true, hour, minutes, mRepeatPref.getDaysOfWeek(),\n true, \"\", mAlarmPref.getAlertString(), true);\n }", "private void setUpdateTriggerTime(int value) {\n bitField0_ |= 0x00000002;\n updateTriggerTime_ = value;\n }", "public void setTime(){\r\n \r\n }", "public edu.pa.Rat.Builder clearTime() {\n fieldSetFlags()[0] = false;\n return this;\n }", "@Override\n\tpublic void setStartTime(int t) {\n\t\t\n\t}", "public synchronized static void resetTime() {\n\t\ttime = 0;\n\t}", "public void setRepeat(boolean repeat) {\n this.repeat = repeat;\n }", "public void setRepeatingAlarm(Context context, int type) {\n\n\n Intent intent = new Intent(context, AlarmReceiver.class);\n intent.putExtra(EXTRA_TYPE, type);\n\n String time = \"00:00\";\n if (type == Const.REQUEST_RELEASE_REMINDER) {\n time = Const.TIME_RELEASE_REMINDER;\n } else {\n time = Const.TIME_DAILY_REMINDER;\n }\n String[] timeArray = time.split(\":\");\n\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY, Integer.parseInt(timeArray[0]));\n calendar.set(Calendar.MINUTE, Integer.parseInt(timeArray[1]));\n calendar.set(Calendar.SECOND, 0);\n\n PendingIntent pendingIntent = PendingIntent.getBroadcast(\n context,\n type,\n intent,\n 0);\n\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n if (alarmManager != null) {\n alarmManager.setInexactRepeating(\n AlarmManager.RTC_WAKEUP,\n calendar.getTimeInMillis(),\n AlarmManager.INTERVAL_DAY,\n pendingIntent\n );\n\n /*if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n alarmManager.setAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, 0, pendingIntent);\n } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n alarmManager.setExact(AlarmManager.RTC_WAKEUP, 0, pendingIntent);\n } else {\n alarmManager.set(AlarmManager.RTC_WAKEUP, 0, pendingIntent);\n }\n */\n\n Log.d(TAG, \"setRepeatingAlarm: Set \" + type + \" = \" + time);\n }\n\n }", "public Builder clearDesiredTime() {\n if (desiredTimeBuilder_ == null) {\n desiredTime_ = null;\n onChanged();\n } else {\n desiredTime_ = null;\n desiredTimeBuilder_ = null;\n }\n\n return this;\n }", "public void setTime(int time) {\n\t\tthis.time = time;\n\t}", "public void setRepeat(Boolean repeat)\n\t{\n\t\tthis.repeat = repeat;\n\t}", "public void setTimeEnd(long te)\n {\n this.timeEnd = (te > 0L)? te : -1L;\n }", "public void presetTime(long tick,int ento){\r\n\r\n\t}", "static void setTiming(){\n killTime=(Pars.txType!=0) ? Pars.txSt+Pars.txDur+60 : Pars.collectTimesB[2]+Pars.dataTime[1]+60;//time to kill simulation\n tracksTime=(Pars.tracks && Pars.txType==0) ? Pars.collectTimesI[1]:(Pars.tracks)? Pars.collectTimesBTx[1]:100*24*60;//time to record tracks\n }", "void unsetRecurrenceDuration();", "public void setTime(int time) {\n\n\t\tthis.time = time;\n\t}", "public final synchronized void resetTime() {\n this.last = System.nanoTime();\n }", "public void resetLoop(){\n\t\tloopTime = 0;\n\t}", "@Test\n public void repeatingTask_changeRepeatPeriod_nextWeekDate() {\n LocalDate testDate = LocalDateTime.now().minusWeeks(1).minusDays(1).toLocalDate();\n LocalTime testTime = LocalTime.of(8, 30);\n LocalDateTime testDateTime = LocalDateTime.of(testDate, testTime);\n Event testEvent = new Event(\"8 days ago\", \"CS2113T\", testDateTime, testDateTime.plusHours(4),\n \"testing\");\n testTaskList.addTask(testEvent);\n // Set to 1w\n RepeatCommand testRepeatCommand = new RepeatCommand(2, 1, RepeatCommand.WEEKLY_ICON);\n testRepeatCommand.execute(testTaskList, testUi);\n RepeatEvent repeatEvent = (RepeatEvent) testTaskList.getTask(2);\n // Set to 1d\n testRepeatCommand = new RepeatCommand(2, 1, RepeatCommand.DAILY_ICON);\n testRepeatCommand.execute(testTaskList, testUi);\n repeatEvent = (RepeatEvent) testTaskList.getTask(2);\n\n assertEquals(repeatEvent.getPeriodCounter(), 0);\n assertEquals(repeatEvent.getNextDateTime(), LocalDateTime.of(LocalDate.now().plusWeeks(1), testTime));\n }", "private void setDay() {\n Boolean result = false;\n for (int i = 0; i < 7; ++i) {\n if(mAlarmDetails.getRepeatingDay(i))\n result = true;\n mAlarmDetails.setRepeatingDay(i, mAlarmDetails.getRepeatingDay(i));\n }\n if(!result)\n mAlarmDetails.setRepeatingDay((Calendar.getInstance().get(Calendar.DAY_OF_WEEK) - 1), true);\n }", "public void setDelay(double clock);", "public void setTime(int time) {\r\n\t\tthis.time = time;\r\n\t\tupdate();\r\n\t}", "void resetLoop () {\n try {\n timer.cancel();\n timer.purge();\n } catch (Exception e) {\n\n }\n timer = new Timer();\n timer.schedule(new LoopTask(), stepDelay, stepDelay);\n }", "public void setSit_time(int time)\n\t{\n\t\tsit_time = time - enter_time;\t\n\t}", "public void setRepeat(int repeat) {\n ModelEvent<?> event = new ModelEventBuilder( ModelEventType.REPEAT_MODIFIED, this ).setOldValue( this.repeat )\n .setNewValue( repeat ).buildEvent();\n\n this.repeat = repeat;\n publishEvent( event );\n }", "void unsetTimeInterval();", "public void resetTimeout(){\n this.timeout = this.timeoutMax;\n }", "public void setTime(java.lang.Integer value) {\n this.time = value;\n }", "public void setLastEventTime() {\r\n\t\t\tthis.lastEventTime = 0;\r\n\t\t}", "public void setEventTime(int newTime) {\n\t\tthis.scheduledTime = newTime;\n\t}", "public void setTime(long time) {\r\n\t\tthis.time = time;\r\n\t}", "public void Repeat(boolean repeat);", "public static void setTime(){\n\t\tCalendar cal = Calendar.getInstance();\n\t\tif (!JsonUtils.RUNNING_LOCALLY){\n\t\t\tcal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 4); //account for UTC offset because of lambda\n\t\t}\n\t\tCURRENT_TIME = formatTime(cal.getTime().toString());\n\t}", "public edu.pa.Rat.Builder setTime(int value) {\n validate(fields()[0], value);\n this.time = value;\n fieldSetFlags()[0] = true;\n return this; \n }", "void setEnd(Instant instant);", "public void setCurrentTime(double time) {\n if (time < 0) {\n time = 0;\n }\n \n nextStartTime = time;\n \n makeNewMusic();\n }", "public void setCurrentPlayTime(long playTime) { throw new RuntimeException(\"Stub!\"); }", "private void setTimeLeft() {\n\t\tif (timeLeft == 1)\n\t\t\ttimer.cancel();\n\t\ttimeLeft--;\n\t}", "public void resetTime() {\n\t\ttime_passed = 0l;\n\t}", "protected void onSetDailyTimerSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "public void setAlarmMorning(Context context, long timestampMillisKey) {\n //cancel any existing alarms and then set a new one\n cancel(context);\n\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY, Constants.AFTER_HOURS_END);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n calendar.set(Calendar.MILLISECOND, 0);\n\n if (calendar.compareTo(Calendar.getInstance()) < 0) {\n //this means we are trying to set alarm time which is already expired, so add 24Hrs or 1 day to this and then set alarm\n calendar.add(Calendar.DATE, 1);\n }\n\n Intent alarmIntent = new Intent(context, AutoPendingNotificationTrigger.class);\n\n Bundle bundle = new Bundle();\n bundle.putLong(Constants.EXTRA_TIME_STAMP_MILLIS, timestampMillisKey);\n alarmIntent.putExtras(bundle);\n\n AlarmManager alarmManager = (AlarmManager) context.getSystemService(context.getApplicationContext().ALARM_SERVICE);\n alarmManager.setExact(AlarmManager.RTC_WAKEUP,\n calendar.getTimeInMillis(),\n PendingIntent.getBroadcast(context.getApplicationContext(), ALARM_REQUEST_CODE, alarmIntent, PendingIntent.FLAG_UPDATE_CURRENT));\n }", "public void setGameTime() {\n\t\tgameTime = new Date();\n\t}", "private void setCronTime(Settings set) {\n CRON_TIME = set.getValue(\"cron.time\");\n }", "public synchronized void setTimeToWakeUpToFalse() {\n this.timeToWakeUp = false;\n }", "public void reapet(int interval) {\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(System.currentTimeMillis());\n defineAlartRepeat(calendar, interval, AlarmManager.ELAPSED_REALTIME_WAKEUP);\n }", "public void setTime(){\n \tDatabaseManager.getDBM().setLockedTime(cal); \n }", "public void reset()\n\t{\n\t\tdelayCount = 0f;\n\t\trepeatCount = 0;\n\t\tenabled = true;\n\t}", "public void setTime(long time) {\n this.time = time;\n }", "protected void setTimeout() {\r\n\t\tTimeout timeout = new Timeout();\r\n\t\tt.schedule(timeout, TIMEOUT);\r\n\t}", "public void setAlarm(int time, String name){\n\t}", "private void setEndTimer() {\n vertx.setTimer(10, id -> testComplete());\n }", "public void resetTimeLimitAction();", "void resetTimeout() {\n timer.cancel();\n timer = getTimer();\n timer.schedule(getTimerTask(), this.timeout);\n }", "public void setTime(long time) {\r\n this.time = time;\r\n }", "@Override\n public void onTimeSet(TimePicker view, int hour, int minute) {\n trigger.getEndtime().set(Calendar.HOUR_OF_DAY, hour);\n trigger.getEndtime().set(Calendar.MINUTE, minute);\n updateEndTime();\n }", "public void setTime(int time)\n {\n this.time = time;\n start = time;\n end = time;\n }", "public void setReminderRepeat(String repeat, String repeatinterval, String repeattype) {\n if(repeat.equals(\"true\")){\n tvrepeat.setText(\"Every \" + repeatinterval + \" \" + repeattype + \"(s)\");\n }else if(repeat.equals(\"false\")){\n tvrepeat.setText(\"Repeat Off\");\n }\n }", "private void setRepeatMode() {\n tvRepeatMode.setText(data.getRepeateDays());\n }", "public void resetTimerComplete() {\n\t\tsetStartingTime(0);\n\t}", "public void onRepeat() {\n\t\t// TODO Auto-generated method stub\n\t\tLastWholeDelta = 0;\n\t}", "public void setModifiyTime(Date modifiyTime) {\n this.modifiyTime = modifiyTime;\n }", "@Override\n public void setSleepTime(int st) {\n this.sleepTime = st;\n\n // notify the update thread so that it can recalculate\n if (updateThread.isRunning())\n updateThread.interrupt();\n }", "public void setTime(int aTime)\n{\n // If we loop, mod the time, otherwise, clamp time\n if(getLoops() && aTime>getMaxTime())\n aTime = aTime%getMaxTime();\n else aTime = SnapMath.clamp(aTime, 0, getMaxTime());\n \n // If already at given time, just return\n if(_time==aTime) return;\n\n // Set new value and fire property change\n firePropertyChange(\"Time\", _time, _time = aTime, -1);\n \n // Reset time of owner children\n for(int i=0, iMax=getOwner().getChildCount(); i<iMax; i++)\n getOwner().getChild(i).setTime(_time);\n \n // Send did update notification\n for(int i=0, iMax=getListenerCount(Listener.class); i<iMax; i++)\n getListener(Listener.class, i).animatorUpdated(this);\n \n // Clear new born list\n _newBorns.clear();\n}", "public void resetTime( long time) {\n nextClusterGenerationTime = time + nextClusterGenerationTime - lastGenerationTime ;\n }", "public void setTime(long time)\n {\n this.time = time;\n\n }", "public void changeStartTimeTo(long t) {\n\t\tm_startTime = t;\n\t\tif( m_privateNotification != null ) {\n\t\t\tString content = \"changeStartOfSignals:\"+Long.toString(t)+\";\";\n\t\t\tm_privateNotification.sendMessage(m_parentName+\"TSCanvasMenu\", m_parentName+\"TSCanvas\", content);\n\t\t}\n\t}", "public void autoStopForwardDelayTime(int delay) throws JposException;", "public void setTime()\n \t{\n \t\tif( !paused )\n \t\t{\n\t \t\tlong playingTime = System.currentTimeMillis() - startTime;\n\t \t\tlong timeLeft = 180000 - playingTime;\n\t \t\tlong min = timeLeft / 60000;\n\t \t\tlong sec = ( timeLeft - ( min * 60000 ) ) / 1000L;\n\t \t\t\n\t \t\tif( timeLeft < 0 )\n\t \t\t{\n\t \t\t\t//Game over!\n\t \t\t\tgameOver();\n\t \t\t\treturn;\n\t \t\t}\n\t \t\t\n\t \t\tString s = \"Time: \";\n\t \t\ts += Integer.toString( (int)min ) + \":\";\n\t \t\tif( sec >= 10 )\n\t \t\t\ts += Integer.toString( (int)sec );\n\t \t\telse\n\t \t\t\ts += \"0\" + Integer.toString( (int)sec );\n\t \t\t\n\t \t\ttimerLabel.setText( s );\n \t\t}\n \t}", "public void resetClock()\n {\n startingTime = System.currentTimeMillis();\n }", "void timeSet(Integer timeOpen, Integer timeWork){\n\t\tdaysUntilStarts = timeOpen;\n\t\tdaysToRun = timeWork;\n\t}", "private void resetTime()\n {\n timer.stop();\n timeDisplay.setText(ZERO_TIME);\n time = 0.0;\n }", "public void setDelay(int delay) {\n\t\t if (delay != this.delay) logger.info(\"New delay is: \"+getElapsedTimeHoursMinutesSecondsString(delay)); \n\t\t if (delay < this.delay) {\n\t\t\t scheduledFuture.cancel(true);\n\t\t\t reset(delay); \n\t\t }\n\t\t this.delay = delay;\n\t }", "private void setTime(long value) {\n \n time_ = value;\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "public void unsetStopTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(STOPTIME$24);\r\n }\r\n }", "private void scheduleNextReset() {\n alarmManager.cancel(createResetIntent(this));\n final SharedPreferences sharedPreferences = getSharedPreferences(getString(R.string.pref_daily_do), Context.MODE_PRIVATE);\n final boolean isDailyResetEnabled = sharedPreferences.getBoolean(getString(R.string.pref_daily_reset_enabled), true);\n if (isDailyResetEnabled) {\n final int hourOfReset = sharedPreferences.getInt(getString(R.string.pref_daily_reset_hour), 0);\n final int minuteOfReset = sharedPreferences.getInt(getString(R.string.pref_daily_reset_minute), 0);\n final Calendar calendarToRepeat = Calendar.getInstance();\n calendarToRepeat.set(Calendar.HOUR_OF_DAY, hourOfReset);\n calendarToRepeat.set(Calendar.MINUTE, minuteOfReset);\n calendarToRepeat.set(Calendar.SECOND, 0);\n if (calendarToRepeat.before(Calendar.getInstance())) {\n calendarToRepeat.add(Calendar.DAY_OF_WEEK, 1);\n }\n alarmManager.setRepeating(AlarmManager.RTC_WAKEUP,\n calendarToRepeat.getTimeInMillis(),\n AlarmManager.INTERVAL_DAY,\n createResetIntent(this));\n Log.d(CLASS_NAME, String.format(\"Next reset scheduled on Calendar=%s\", calendarToRepeat.toString()));\n } else {\n Log.d(CLASS_NAME, String.format(\"Resets cancelled.\"));\n }\n }", "@Override\n\t\tpublic void run() {\n\t\t\tisRepeatFlag = true;\n\t\t}", "public void setSettleTime(Date settleTime) {\n this.settleTime = settleTime;\n }", "void setRecurrenceDuration(int recurrenceDuration);" ]
[ "0.5935052", "0.5887371", "0.58515924", "0.58059025", "0.57997274", "0.57943785", "0.57784075", "0.5759101", "0.5740267", "0.57039833", "0.5677229", "0.5631681", "0.5584546", "0.55746573", "0.5560352", "0.5545186", "0.5529034", "0.55266345", "0.55078465", "0.5490261", "0.5475569", "0.5461861", "0.54550123", "0.54177344", "0.541062", "0.5409687", "0.54068965", "0.53908026", "0.5388733", "0.5385295", "0.5384265", "0.53485554", "0.5344848", "0.5339077", "0.53384626", "0.5327472", "0.5318464", "0.5307887", "0.5298681", "0.5287863", "0.5275211", "0.5269802", "0.52494466", "0.5247249", "0.52444065", "0.52432305", "0.5233474", "0.5233295", "0.52191436", "0.5217883", "0.52172035", "0.5216279", "0.5214071", "0.5209785", "0.5202363", "0.51973325", "0.5188743", "0.51779026", "0.51757526", "0.5174525", "0.51711845", "0.51672184", "0.51644874", "0.5162026", "0.51603955", "0.5155158", "0.5148254", "0.5140571", "0.51402617", "0.5134465", "0.51326466", "0.512768", "0.5118752", "0.5118539", "0.51177967", "0.51175094", "0.5116119", "0.51130366", "0.51074594", "0.5098894", "0.50895387", "0.50739056", "0.50673604", "0.50636405", "0.5058121", "0.5046708", "0.5040535", "0.50403565", "0.5025271", "0.5021106", "0.5019442", "0.5018445", "0.50118953", "0.50118953", "0.50118953", "0.50118953", "0.50076115", "0.500733", "0.50050324", "0.500081", "0.49993083" ]
0.0
-1
Get the time at which the Trigger should quit repeating regardless of any remaining repeats (based on the trigger's particular repeat settings).
public abstract Date getEndTime();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getEndTime()\n {\n if (isRepeated()) return end;\n else return time;\n }", "public int getTime()\n {\n if (isRepeated()) return start;\n else return time;\n }", "public int getRepeatInterval()\n {\n if (isRepeated()) return repeat;\n else return 0;\n }", "public int getStartTime()\n {\n if (isRepeated()) return start;\n else return time;\n }", "@CheckReturnValue\n public abstract long getTimeUntilReset();", "public float getRepeatDelay()\n\t{\n\t\treturn repeatDelay;\n\t}", "public Long getLastRunDuration();", "int getChronicDelayTime();", "public Long getRepeatInterval() {\n\t\treturn repeatInterval;\n\t}", "public long getMaxTime()\n {\n return times[times.length - 1];\n }", "public int getEventTime() {\n\t\treturn scheduledTime;\n\t}", "int getUpdateTriggerTime();", "long getRepeatIntervalPref();", "int getSignOffTime();", "public int getUpdateTriggerTime() {\n return instance.getUpdateTriggerTime();\n }", "public int getTimer() {\n return getOption(ArenaOption.TIMER);\n }", "long getInhabitedTime();", "java.lang.String getWaitTime();", "public Duration getResetInterval() {\n return resetInterval;\n }", "public long getSimTime() {\n\t return now;\n\t}", "int getEndTime();", "int getEndTime();", "int getEndTime();", "public abstract Date getNextFireTime();", "public int getUpdateTriggerTime() {\n return updateTriggerTime_;\n }", "@Override\n\tpublic Double getTimer() {\n\t\treturn null;\n\t}", "public abstract Date getFinalFireTime();", "public long getIntegrationTime() {\n\t\treturn updateTimeStamp - startTime;\n\t}", "public long getRunLastMillis()\n {\n return 0L;\n }", "public long getEventTime();", "public abstract Date getPreviousFireTime();", "public static long getLastResetTime() {\n return p().lastReset;\n }", "public org.landxml.schema.landXML11.GPSTime xgetStopTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.GPSTime target = null;\r\n target = (org.landxml.schema.landXML11.GPSTime)get_store().find_attribute_user(STOPTIME$24);\r\n return target;\r\n }\r\n }", "public int getEndMinute() {\n\treturn end.getMinute();\n }", "private long getWaitTime() {\n long retVal = 1;\n long difference = System.currentTimeMillis() - myLastRefreshTime;\n if (difference < 75) {\n retVal = 75 - difference;\n }\n return (retVal);\n }", "public double getNextTime(){\n\t\tif(timeoutSet.peek() == null && eventSet.peek() == null) return Double.MAX_VALUE;\n\t\telse if(eventSet.peek() != null && timeoutSet.peek() != null) return Math.min(eventSet.peek().getTime(), timeoutSet.peek().getTime());\n\t\telse if(eventSet.peek() == null && timeoutSet.peek() != null) return timeoutSet.peek().getTime();\n\t\treturn eventSet.peek().getTime();\n\t}", "public double getStopTime();", "public String LastTimePeriod() {\n String finalTime = \"24:00-24:00\"; // Generate the same format to re-use the function.\n return CreateBlankPeroid(finalTime);\n }", "private long decideNextEndReset() {\n\t\tlong time = System.currentTimeMillis() + plugin.getEndResetPeriod() * 86400000;\n\t\t// Round to get the start of the next day in GMT, 5PM Pacific, 8PM Eastern,\n\t\t// when there are the most players on more-or-less\n\t\treturn (time / 86400000) * 86400000;\n\t}", "public long getElapsedTimeHour() {\n return running ? ((((System.currentTimeMillis() - startTime) / 1000) / 60 ) / 60) : 0;\n }", "public double getRemainingTime()\n {\n return totalTime - scheduledTime;\n }", "public long lastCumulativeTime()\r\n/* 234: */ {\r\n/* 235:434 */ return this.lastCumulativeTime;\r\n/* 236: */ }", "public double getStopTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STOPTIME$24);\r\n if (target == null)\r\n {\r\n return 0.0;\r\n }\r\n return target.getDoubleValue();\r\n }\r\n }", "public long getLoopTime();", "public double getLastTime()\n\t{\n\t\tdouble time = Double.NaN;\n\t\tfinal Entry< Double, V > entry = getLastEntry();\n\t\tif( entry != null )\n\t\t{\n\t\t\ttime = entry.getKey();\n\t\t}\n\t\treturn time;\n\t}", "Double getRemainingTime();", "public Rational getEndTime ()\r\n {\r\n if (isWholeDuration()) {\r\n return null;\r\n }\r\n\r\n Rational chordDur = getDuration();\r\n\r\n if (chordDur == null) {\r\n return null;\r\n } else {\r\n return startTime.plus(chordDur);\r\n }\r\n }", "@Override\r\n\tpublic long getExitDateTime() {\n\t\treturn 0;\r\n\t}", "public String getStopTime() {\n\t\treturn (new Parser(value)).skipString().getString();\n\t}", "public static long getRemainTimeInDay() {\r\n\t\tlong remain;\r\n\r\n\t\tCalendar calendar = Calendar.getInstance();\r\n\t\tcalendar.setTime(new Date());\r\n\t\tcalendar.set(Calendar.HOUR_OF_DAY, 23);\r\n\t\tcalendar.set(Calendar.MINUTE, 59);\r\n\t\tcalendar.set(Calendar.SECOND, 59);\r\n\t\tremain = calendar.getTimeInMillis() - System.currentTimeMillis();\r\n\r\n\t\treturn remain;\r\n\t}", "public Timestamp getLastCompetition() {\r\n return lastCompetition;\r\n }", "@Override\n\tpublic RunTime runTime()\n\t{\n\t\tCalendar now = Calendar.getInstance();\n\t\tRunTimeImpl rv = new RunTimeImpl(now.get(Calendar.HOUR_OF_DAY), now.get(Calendar.MINUTE));\n\n\t\treturn rv;\n\t}", "public long lastTime()\r\n/* 219: */ {\r\n/* 220:412 */ return this.lastTime.get();\r\n/* 221: */ }", "public synchronized long getTime() {\n return -1L;\n }", "public int getExtraTimeGiven()\r\n {\r\n return extraTimeGiven;\r\n }", "public int getDelayedTimeout();", "public io.opencannabis.schema.temporal.TemporalInstant.Instant getDesiredTime() {\n if (desiredTimeBuilder_ == null) {\n return desiredTime_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : desiredTime_;\n } else {\n return desiredTimeBuilder_.getMessage();\n }\n }", "public double getWorkTime()\n {\n if (cFixedServiceTimed)\n {\n return (mServerConfig.mServiceTime);\n }\n double tBase;\n double tDelta;\n switch (mHoldType)\n {\n case cHoldNormal:\n return (cRandom.normal(mServerConfig.mServiceTime, mServerConfig.mServiceTime * 0.1)); //0.3\n\n case cHoldNegexp:\n tBase = mServerConfig.mServiceTime * 0.75;\n tDelta = 1.0 / (mServerConfig.mServiceTime * 0.50);\n return (tBase + cRandom.negexp(tDelta));\n\n case cHoldPoisson:\n tBase = mServerConfig.mServiceTime * 0.75;\n tDelta = mServerConfig.mServiceTime * 0.50;\n return (tBase + cRandom.poisson(tDelta));\n\n case cHoldUniform:\n return (cRandom.uniform(mServerConfig.mServiceTime * 0.75, mServerConfig.mServiceTime * 1.5));\n }\n return 0.0;\n }", "int getWaitTime();", "public long getExpirationTime()\n {\n return this.m_eventExpirationTime;\n }", "public boolean getResetTimeOnStop() { return _resetTimeOnStop; }", "XMLGregorianCalendar getMovementEndTime();", "java.util.Calendar getEndTime();", "public float getFullDuration()\n\t{\n\t\tif (repeatCnt < 0) return -1;\n\t\treturn delay + duration + (repeatDelay + duration) * repeatCnt;\n\t}", "@Override\n public int getTimeForNextTicInSeconds() {\n int seconds = Calendar.getInstance().get(Calendar.SECOND);\n return 60 - seconds;\n }", "public int getRepeat() {\n return repeat;\n }", "public Date getEventTime() {\n\t\treturn time;\n\t}", "public int getTimer() {\n return timer;\n }", "public long getTimerTime() {\n return timerTime;\n }", "io.opencannabis.schema.temporal.TemporalInstant.Instant getDesiredTime();", "public io.opencannabis.schema.temporal.TemporalInstant.Instant getDesiredTime() {\n return desiredTime_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : desiredTime_;\n }", "public long getDelayTime() {\n return (long) this.DELAY_TIME;\n }", "public Date takeOff() {\n \t\r\n \tthis.lastTimeTookOf = new Date();\r\n \treturn lastTimeTookOf;\r\n }", "public int getDelayTime()\n\t{\n\t\treturn delayTime;\n\t}", "protected long getRetryPeriod()\n {\n return heartbeat.getPulsePeriod();\n }", "public Integer getCurrentLapsTime() {\n\t\treturn this.currentAction.getCurrentLapsTime();\n\t}", "@Override\n public DateTime getMaxIngestedEventTime()\n {\n return getMaxTime();\n }", "public int getEat_time()\n\t{\n\t\treturn eat_time;\n\t}", "double getDefaultTimerTrig();", "private long remainingTime() {\n final long remainingTime = this.designatedEnd - System.currentTimeMillis();\n return remainingTime >= 0 ? remainingTime : 0L;\n }", "public Integer getDefaultWakeupPeriod() {\n return wakeupDefaultPeriod;\n }", "int getRecurrenceDuration();", "public int getFinishMinute() {\n return finishMinute;\n }", "int getStartTime();", "int getStartTime();", "int getStartTime();", "T getEventTime();", "public int getMaxTime() { return _maxTime; }", "public ScheduledHarvest getLastOneTimeHarvest() {\n\n\t\treturn lastOneTimeHarvest;\n\n\t}", "public long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}", "public TimeStep getTimeStep() {\n\t\t// Only here to ensure it is being used correctly.\n\t\t// cbit.util.Assertion.assertNotNull(fieldTimeStep);\n\t\treturn fieldTimeStep;\n\t}", "@Override\n protected int getRevealTime()\n {\n // If not Line chart or Trace.Disabled, return default\n Trace trace = getTrace();\n boolean showPointsOrArea = trace.isShowPoints() || trace.isShowArea();\n if (showPointsOrArea || getTrace().isDisabled())\n return ContentView.DEFAULT_REVEAL_TIME;\n\n // Calc factor to modify default time\n double maxLen = getTraceLineShapeArcLength();\n double factor = Math.max(1, Math.min(maxLen / 500, 2));\n\n // Return default time times factor\n return (int) Math.round(factor * ContentView.DEFAULT_REVEAL_TIME);\n }", "Instant getEnd();", "public long getWhen() {\n return when;\n }", "public Long getDelaytime() {\n return delaytime;\n }", "public Long getSunsetTime(){\n return sunsetTime;\n }", "public double getScheduledTime() {\n return scheduledTime;\n }", "public int getConfirmTime() {\n\t\treturn _tempNoTiceShipMessage.getConfirmTime();\n\t}", "public synchronized long getWhen() {\n return when;\n }", "Duration getRemainingTime();", "public int getRecitationTime(){\n\t\treturn this.recitationTime;\n\t}" ]
[ "0.6362243", "0.61022365", "0.6080687", "0.59752697", "0.58338106", "0.58175737", "0.5780848", "0.57694775", "0.5722594", "0.57143277", "0.5694223", "0.5663494", "0.56193656", "0.5613759", "0.56110716", "0.5582631", "0.5561066", "0.5560448", "0.555927", "0.55144626", "0.5504317", "0.5504317", "0.5504317", "0.5502679", "0.5493331", "0.54795146", "0.54786044", "0.5452695", "0.544937", "0.54320097", "0.5429764", "0.5419928", "0.541386", "0.5401022", "0.53854424", "0.5376082", "0.53672415", "0.53447974", "0.5343455", "0.53433615", "0.5339005", "0.5336882", "0.533654", "0.5333095", "0.53302854", "0.53075975", "0.52960503", "0.5293708", "0.5284929", "0.5277179", "0.5275821", "0.52735925", "0.5272614", "0.5271567", "0.52369636", "0.5225553", "0.5222571", "0.52225304", "0.5222497", "0.5219557", "0.52176154", "0.52125907", "0.5211796", "0.51913714", "0.5189921", "0.51865727", "0.51852334", "0.51754844", "0.51661646", "0.5163102", "0.51615745", "0.5160831", "0.5157062", "0.5150026", "0.5147888", "0.51444864", "0.5142485", "0.5141976", "0.5139958", "0.51386505", "0.51383716", "0.5130689", "0.512855", "0.51254296", "0.51254296", "0.51254296", "0.51209664", "0.5117644", "0.5116562", "0.5115489", "0.51135266", "0.5110054", "0.510582", "0.51030344", "0.51017714", "0.51004076", "0.5100133", "0.50992274", "0.50965166", "0.508505", "0.5078118" ]
0.0
-1
Returns the next time at which the Trigger is scheduled to fire. If the trigger will not fire again, null will be returned. Note that the time returned can possibly be in the past, if the time that was computed for the trigger to next fire has already arrived, but the scheduler has not yet been able to fire the trigger (which would likely be due to lack of resources e.g. threads). The value returned is not guaranteed to be valid until after the Trigger has been added to the scheduler.
public abstract Date getNextFireTime();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getNextTime(){\n\t\tif(timeoutSet.peek() == null && eventSet.peek() == null) return Double.MAX_VALUE;\n\t\telse if(eventSet.peek() != null && timeoutSet.peek() != null) return Math.min(eventSet.peek().getTime(), timeoutSet.peek().getTime());\n\t\telse if(eventSet.peek() == null && timeoutSet.peek() != null) return timeoutSet.peek().getTime();\n\t\treturn eventSet.peek().getTime();\n\t}", "public long getNextTime() {\r\n if (super.getNextTime() == 0) {\r\n return 0;\r\n }\r\n Object obj = this._queue;\r\n if (obj != null) {\r\n if (obj instanceof LockFreeTaskQueueCore) {\r\n if (!((LockFreeTaskQueueCore) obj).isEmpty()) {\r\n return 0;\r\n }\r\n } else if (obj == EventLoop_commonKt.CLOSED_EMPTY) {\r\n return LongCompanionObject.MAX_VALUE;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n DelayedTaskQueue delayedTaskQueue = (DelayedTaskQueue) this._delayed;\r\n if (delayedTaskQueue != null) {\r\n DelayedTask delayedTask = (DelayedTask) delayedTaskQueue.peek();\r\n if (delayedTask != null) {\r\n long j = delayedTask.nanoTime;\r\n TimeSource timeSource = TimeSourceKt.getTimeSource();\r\n return RangesKt.coerceAtLeast(j - (timeSource != null ? timeSource.nanoTime() : System.nanoTime()), 0);\r\n }\r\n }\r\n return LongCompanionObject.MAX_VALUE;\r\n }", "public long getNextScheduled() {\n\t\tDate currDate = new Date();\n\t\t\n\t\tCalendar runTimeToday = Calendar.getInstance();\n\t\trunTimeToday.setTime(currDate);\n\t\t\n\t\trunTimeToday.set(Calendar.HOUR_OF_DAY, hour);\n\t\trunTimeToday.set(Calendar.MINUTE, minute);\n\t\trunTimeToday.set(Calendar.SECOND, 0);\n\t\t\n\t\tDate runTimeTodayDate = runTimeToday.getTime();\n\t\t\n\t\tif(currDate.before(runTimeTodayDate)) {\n\t\t\tSystem.out.println(\"DailyProcess: Next runtime is today.\");\n\t\t} else {\n\t\t\t// equals or after\n\t\t\tSystem.out.println(\"DailyProcess: Next runtime is tomorrow.\");\n\t\t\trunTimeToday.add(Calendar.DATE, 1);\n\t\t\trunTimeTodayDate = runTimeToday.getTime();\n\t\t}\n\t\t\n\t\tlong runTime = runTimeTodayDate.getTime() - currDate.getTime();\n\t\t\n\t\tif(false) {\n\t\t\t// Debugging\n\t\t\trunTime = 0;\n\t\t}\n\t\t\n\t\trunTime += randomDelay;\n\t\t\n\t\treturn runTime;\n\t}", "public Date getNextExecutionTime() {\n\t\treturn SchedulerUtil.getNextExecution(this);\n\t}", "public gov.ucore.ucore._2_0.TimeType getTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.ucore.ucore._2_0.TimeType target = null;\n target = (gov.ucore.ucore._2_0.TimeType)get_store().find_element_user(TIME$2, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public io.opencannabis.schema.temporal.TemporalInstant.Instant getDesiredTime() {\n return desiredTime_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : desiredTime_;\n }", "public long processNextEvent() {\r\n Runnable dequeue;\r\n ThreadSafeHeapNode threadSafeHeapNode;\r\n if (processUnconfinedEvent()) {\r\n return getNextTime();\r\n }\r\n DelayedTaskQueue delayedTaskQueue = (DelayedTaskQueue) this._delayed;\r\n if (delayedTaskQueue == null || delayedTaskQueue.isEmpty()) {\r\n dequeue = dequeue();\r\n if (dequeue != null) {\r\n dequeue.run();\r\n }\r\n return getNextTime();\r\n }\r\n TimeSource timeSource = TimeSourceKt.getTimeSource();\r\n long nanoTime = timeSource != null ? timeSource.nanoTime() : System.nanoTime();\r\n do {\r\n synchronized (delayedTaskQueue) {\r\n ThreadSafeHeapNode firstImpl = delayedTaskQueue.firstImpl();\r\n threadSafeHeapNode = null;\r\n if (firstImpl != null) {\r\n DelayedTask delayedTask = (DelayedTask) firstImpl;\r\n if (delayedTask.timeToExecute(nanoTime) ? enqueueImpl(delayedTask) : false) {\r\n threadSafeHeapNode = delayedTaskQueue.removeAtImpl(0);\r\n }\r\n }\r\n }\r\n } while (((DelayedTask) threadSafeHeapNode) != null);\r\n dequeue = dequeue();\r\n if (dequeue != null) {\r\n }\r\n return getNextTime();\r\n }", "public Date getNextScheduledRun() {\n\t\tfinal Calendar cal = Calendar.getInstance();\n\t\tcal.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);\n\t\tcal.set(Calendar.HOUR_OF_DAY, 1);\n\t\tcal.set(Calendar.MINUTE, 0);\n\n\t\tif ( cal.before(Calendar.getInstance()) ){\n\t\t\tcal.add(Calendar.DATE, 7);\n\t\t}\n\t\treturn cal.getTime();\n\t\n\t}", "io.opencannabis.schema.temporal.TemporalInstant.Instant getDesiredTime();", "public io.opencannabis.schema.temporal.TemporalInstant.Instant getDesiredTime() {\n if (desiredTimeBuilder_ == null) {\n return desiredTime_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : desiredTime_;\n } else {\n return desiredTimeBuilder_.getMessage();\n }\n }", "public abstract Date getPreviousFireTime();", "public static long next() {\n return System.currentTimeMillis();\n }", "public double nextArrivalTime() {\n return (-1 / lambda) * Math.log(1 - randomAT.nextDouble());\n }", "public org.landxml.schema.landXML11.GPSTime xgetStartTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.GPSTime target = null;\r\n target = (org.landxml.schema.landXML11.GPSTime)get_store().find_attribute_user(STARTTIME$22);\r\n return target;\r\n }\r\n }", "public Instant getExpirationTime() {\n return unit == ChronoUnit.SECONDS\n ? Instant.ofEpochSecond((Long.MAX_VALUE >>> timestampLeftShift) + epoch)\n : Instant.ofEpochMilli((Long.MAX_VALUE >>> timestampLeftShift) + epoch);\n }", "public int getTime()\n {\n if (isRepeated()) return start;\n else return time;\n }", "@DISPID(13)\r\n\t// = 0xd. The runtime will prefer the VTID if present\r\n\t@VTID(19)\r\n\tjava.util.Date nextScheduledExecutionDateTime();", "public double getFirstTime()\n\t{\n\t\tdouble time = Double.NaN;\n\t\tfinal Entry< Double, V > entry = getFirstEntry();\n\t\tif( entry != null )\n\t\t{\n\t\t\ttime = entry.getKey();\n\t\t}\n\t\treturn time;\n\t}", "public Optional<QueuedEvent> getNextEvent() {\n if (events.size() == 0) {\n return Optional.empty();\n }\n QueuedEvent nextEvent = events.get(0);\n for (QueuedEvent e : this.events) {\n if (e.getMsLeft() < nextEvent.getMsLeft()) {\n nextEvent = e;\n }\n }\n return Optional.of(nextEvent);\n }", "public int getStartTime()\n {\n if (isRepeated()) return start;\n else return time;\n }", "public java.util.Calendar getRequestedTime()\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(REQUESTEDTIME$2, 0);\n if (target == null)\n {\n return null;\n }\n return target.getCalendarValue();\n }\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder> \n getDesiredTimeFieldBuilder() {\n if (desiredTimeBuilder_ == null) {\n desiredTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder>(\n getDesiredTime(),\n getParentForChildren(),\n isClean());\n desiredTime_ = null;\n }\n return desiredTimeBuilder_;\n }", "public org.landxml.schema.landXML11.GPSTime xgetStopTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.GPSTime target = null;\r\n target = (org.landxml.schema.landXML11.GPSTime)get_store().find_attribute_user(STOPTIME$24);\r\n return target;\r\n }\r\n }", "@Override\n protected LocalDateTime CalculateNextFeedTime() {\n return LocalDateTime.now();\n }", "public TimeValue getMaxTaskWaitTime() {\n final var oldestTaskTimeMillis = allBatchesStream().mapToLong(Batch::getCreationTimeMillis).min().orElse(Long.MAX_VALUE);\n\n if (oldestTaskTimeMillis == Long.MAX_VALUE) {\n return TimeValue.ZERO;\n }\n\n return TimeValue.timeValueMillis(threadPool.relativeTimeInMillis() - oldestTaskTimeMillis);\n }", "public int getEventTime() {\n\t\treturn scheduledTime;\n\t}", "public int getUpdateTriggerTime() {\n return instance.getUpdateTriggerTime();\n }", "public abstract Date getFinalFireTime();", "public int timeToNextEnemy(){\n if(mEnemyIndex < mEnemiesToSpawn.size()){\n return mTimeToSpawnEnemy.get(mEnemyIndex);\n } else {\n return -1;\n }\n }", "public TimeStep getTimeStep() {\n\t\t// Only here to ensure it is being used correctly.\n\t\t// cbit.util.Assertion.assertNotNull(fieldTimeStep);\n\t\treturn fieldTimeStep;\n\t}", "public TimeRef time() {\n if (this.ptr == Pointer.NULL) {\n throw new RuntimeException();\n }\n TimeRef result = new TimeRef(LiveSplitCoreNative.INSTANCE.SegmentHistoryElement_time(this.ptr));\n return result;\n }", "Optional<Instant> startTime();", "public double getScheduledTime() {\n return scheduledTime;\n }", "public double getLastTime()\n\t{\n\t\tdouble time = Double.NaN;\n\t\tfinal Entry< Double, V > entry = getLastEntry();\n\t\tif( entry != null )\n\t\t{\n\t\t\ttime = entry.getKey();\n\t\t}\n\t\treturn time;\n\t}", "public long getMaxTime()\n {\n return times[times.length - 1];\n }", "private long getWaitTime() {\n long retVal = 1;\n long difference = System.currentTimeMillis() - myLastRefreshTime;\n if (difference < 75) {\n retVal = 75 - difference;\n }\n return (retVal);\n }", "public int getUpdateTriggerTime() {\n return updateTriggerTime_;\n }", "public Date getNextChargeTime() {\n return nextChargeTime;\n }", "public double getFireTime() {\n\t\treturn fireTime;\n\t}", "private synchronized EventType scheduleNextEvent()\n {\n Date today = new Date();\n Date today_sunrise = ss.getSunrise(latitude, longitude);\n Date today_sunset = ss.getSunset(latitude, longitude);\n Date today_off = ss.getOff(off);\n\n // get sunrise and sunset time for tomorrow\n Calendar tomorrow = Calendar.getInstance();\n tomorrow.roll(Calendar.DATE, true);\n Date tomorrow_sunrise = ss.getSunrise(latitude, longitude, tomorrow.getTime());\n Date tomorrow_sunset = ss.getSunset(latitude, longitude, tomorrow.getTime());\n Date tomorrow_off = ss.getOff(off);\n\n // determine if sunrise or sunset is the next event\n if (today.after(today_sunset)) {\n // get tomorrow's date time\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: SUNRISE \");\n System.out.println(\" @ \" + tomorrow_sunrise);\n System.out.println(\"-----------------------------------\");\n\n // schedule tomorrow's sunrise as next event\n timer.schedule(new SunriseTask(), tomorrow_sunrise);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = tomorrow_sunrise;\n nextSunsetDate = tomorrow_sunset;\n\n // return next event\n nextEvent = EventType.SunriseTomorrow;\n return nextEvent;\n } else if (today.after(today_sunrise)) {\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: SUNSET \");\n System.out.println(\" @ \" + today_sunset);\n System.out.println(\"-----------------------------------\");\n\n // schedule sunset as next event\n timer.schedule(new SunsetTask(), today_sunset);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = tomorrow_sunrise;\n nextSunsetDate = today_sunset;\n\n // return next event\n nextEvent = EventType.SunsetToday;\n return nextEvent;\n } else if (today.after(today_off)) {\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: OFF \");\n System.out.println(\" @ \" + today_off);\n System.out.println(\"-----------------------------------\");\n\n // schedule sunset as next event\n timer.schedule(new SunsetTask(), today_off);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = tomorrow_sunrise;\n nextSunsetDate = today_sunset;\n\n // return next event\n nextEvent = EventType.SunriseTomorrow;\n return nextEvent;\n } else {\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: SUNRISE \");\n System.out.println(\" @ \" + today_sunrise);\n System.out.println(\"-----------------------------------\");\n\n // schedule sunrise as next event\n timer.schedule(new SunriseTask(), today_sunrise);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = today_sunrise;\n nextSunsetDate = today_sunset;\n\n // return next event\n nextEvent = EventType.SunriseToday;\n return nextEvent;\n }\n }", "public long getMinTime()\n {\n return times[0];\n }", "public TimeWrapper getTime() throws NoSuchElementException {\n return this.timeWrapper.get();\n }", "public int getFireTicks ( ) {\n\t\treturn invokeSafe ( \"getFireTicks\" );\n\t}", "int getUpdateTriggerTime();", "public double getReadyTime()\n {\n if (scheduledOPs.isEmpty())\n {\n return 0;\n\n }else{\n\n \t//Get latest scheduled op's completion time as ready time\n return scheduledOPs.get(scheduledOPs.size() - 1).getCompletionTime();\n }\n }", "public long lastTime()\r\n/* 219: */ {\r\n/* 220:412 */ return this.lastTime.get();\r\n/* 221: */ }", "public org.apache.xmlbeans.XmlDateTime xgetRequestedTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlDateTime target = null;\n target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(REQUESTEDTIME$2, 0);\n return target;\n }\n }", "@Override\n\tpublic Double getTimer() {\n\t\treturn null;\n\t}", "public long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}", "private com.google.protobuf.SingleFieldBuilderV3<\n com.google.protobuf.Timestamp,\n com.google.protobuf.Timestamp.Builder,\n com.google.protobuf.TimestampOrBuilder>\n getLastRefreshTimeFieldBuilder() {\n if (lastRefreshTimeBuilder_ == null) {\n lastRefreshTimeBuilder_ =\n new com.google.protobuf.SingleFieldBuilderV3<\n com.google.protobuf.Timestamp,\n com.google.protobuf.Timestamp.Builder,\n com.google.protobuf.TimestampOrBuilder>(\n getLastRefreshTime(), getParentForChildren(), isClean());\n lastRefreshTime_ = null;\n }\n return lastRefreshTimeBuilder_;\n }", "public TimedVariable findNext(Date ref)\n\t{\n\t\tif (vars.isEmpty())\n\t\t\treturn null;\n\t\tint sz = vars.size();\n\n\t\tTimedVariable dummy = new TimedVariable(0);\n\t\tdummy.setTime(ref);\n\t\tint idx = Collections.binarySearch(vars, dummy, tvComparator);\n\n\t\tif (idx < 0)\n\t\t\tidx = (-idx) - 1;\n\t\telse // the exact time was found. Increment to the next value\n\t\t\tidx++;\n\t\t\n\t\tif (idx < sz)\n\t\t\treturn vars.get(idx);\n\t\telse\n\t\t\treturn null;\n\t}", "public Time getNextDepartureTime (Departures d) {\n Time t;\n try {\n t = departures.get ( d.getGoingTo () ).higher ( d ).getDeparture_time ();\n } catch (NullPointerException e) {\n t = departures.get ( d.getGoingTo () ).first ().getDeparture_time ();\n }\n return t;\n }", "public long getEstimatedTimeAtNextMark() {\n return estimatedTimeAtNextMark;\n }", "public int getTimer() {\n return getOption(ArenaOption.TIMER);\n }", "private synchronized Date reschedule(SchedulerTask schedulerTask, ScheduleIterator iterator)\n { the scheduler has been canceled\n // This happens if a task itself stops the scheduler!!\n //\n\t\tif (this.timer == null)\n\t\t\treturn null;\n \n // the task has been canceled in the meanwhile?\n if (schedulerTask.getState()== SchedulerTaskState.CANCELED)\n return null;\n\n SchedulerTimerTask timerTask = new SchedulerTimerTask(schedulerTask, iterator);\n scheduledTimerTasks.put(schedulerTask.getKey(), timerTask);\n \n Date nextExecution = getNextExecution(timerTask.iterator);\n if (nextExecution == null)\n {\n // The task wants terminate\n //\n cancel(timerTask.schedulerTask.getKey());\n }\n else\n {\n // The task wants run again\n //\n timer.schedule(timerTask, nextExecution);\n }\n \n return nextExecution;\n }", "public double getStartTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STARTTIME$22);\r\n if (target == null)\r\n {\r\n return 0.0;\r\n }\r\n return target.getDoubleValue();\r\n }\r\n }", "public int nextTimeAfter(int time)\n {\n if (time < 0)\n {\n throw new IllegalArgumentException(\"Method nextTimeAfter: Invalid time\");\n }\n\n int nt = -1;\n\n if(isActive())\n {\n if (!isRepeated())\n {\n if (this.time > time) nt = this.time;\n }\n else\n {\n if (start > time) nt = start;\n\n else if (time < end) {\n int prev = start;\n int next = start + repeat;\n while (next <= end - repeat)\n {\n if (time < next)\n {\n nt = next;\n break;\n }\n else\n {\n prev = next;\n next += repeat;\n }\n }\n }\n\n }\n\n }\n\n return nt;\n }", "public IUTCTime getFirstTime() {\n if (null == firstTime) {\n return new UTCTime(0);\n }\n return firstTime;\n }", "private long getNow()\n {\n // no need to convert to collection if had an Iterables.max(), but not present in standard toolkit, and not worth adding\n List<SSTableReader> list = new ArrayList<>();\n Iterables.addAll(list, cfs.getSSTables(SSTableSet.LIVE));\n if (list.isEmpty())\n return 0;\n return Collections.max(list, (o1, o2) -> Long.compare(o1.getMaxTimestamp(), o2.getMaxTimestamp()))\n .getMaxTimestamp();\n }", "@DISPID(31)\r\n\t// = 0x1f. The runtime will prefer the VTID if present\r\n\t@VTID(36)\r\n\tasci.activebatch.enumJobTimerTriggerType timerTrigger();", "public static Time timeOf(Object obj) {\n if (obj instanceof Time)\n return (Time) obj;\n return null;\n }", "public abstract Date getFireTimeAfter(Date afterTime);", "public long getTimerTime() {\n return timerTime;\n }", "public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getDesiredTimeOrBuilder() {\n if (desiredTimeBuilder_ != null) {\n return desiredTimeBuilder_.getMessageOrBuilder();\n } else {\n return desiredTime_ == null ?\n io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : desiredTime_;\n }\n }", "public int getMaxFireTicks ( ) {\n\t\treturn invokeSafe ( \"getMaxFireTicks\" );\n\t}", "@CheckReturnValue\n public abstract long getTimeUntilReset();", "public static long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}", "public java.util.Calendar getSigningTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SIGNINGTIME$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getCalendarValue();\r\n }\r\n }", "public TaskInfo getNextTimeTask(TaskInfo ppTaskInfo) {\n\t\tTaskInfo pNextTask = m_pTaskList;\r\n\t\tif (pNextTask != null && pNextTask.time.next <= m_clock.getFrameEnd()) {\r\n\t\t\tm_pTaskList = pNextTask.pNext;\r\n\t\t\t// pNextTask.pNext = null;\r\n\t\t\tppTaskInfo = pNextTask;\r\n\t\t\treturn ppTaskInfo;\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public LocalTime calcArrivalTime() {\n if (StaticData.TravelTime[Location.valueOf(this.dLocation).getIndex()][Location.valueOf(this.aLocation).getIndex()] != 0)\n return this.getDTime().plusMinutes(StaticData.delay + StaticData.TravelTime[Location.valueOf(this.dLocation).getIndex()][Location.valueOf(this.aLocation).getIndex()]);\n else\n return this.getDTime().plusMinutes(StaticData.delay + StaticData.TravelTime[Location.valueOf(this.aLocation).getIndex()][Location.valueOf(this.dLocation).getIndex()]);\n\n }", "public Date getCurrentFetchTime() {\n synchronized (fetchingTimeLock) {\r\n if (nextFetchTime == null) {\r\n Date now = new Date();\r\n currentFetchTime = new Date(now.getTime() - OFFSET_DURATION);\r\n nextFetchTime = new Date(now.getTime() + ConfigParameters.FETCH_DURATION);\r\n } else {\r\n currentFetchTime = nextFetchTime;\r\n nextFetchTime = new Date(currentFetchTime.getTime() + ConfigParameters.FETCH_DURATION);\r\n }\r\n\r\n return currentFetchTime;\r\n }\r\n\t}", "private long decideNextEndReset() {\n\t\tlong time = System.currentTimeMillis() + plugin.getEndResetPeriod() * 86400000;\n\t\t// Round to get the start of the next day in GMT, 5PM Pacific, 8PM Eastern,\n\t\t// when there are the most players on more-or-less\n\t\treturn (time / 86400000) * 86400000;\n\t}", "public static Time uniqueInstance() {\r\n\t\tif (time == null) {\r\n\t\t\tsynchronized (Time.class) {\r\n\t\t\t\tif (time == null) {\r\n\t\t\t\t\ttime = new Time(600);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn time;\r\n\t}", "public Timer getTime() {\n\t\treturn time;\n\t}", "public static int getSleepTime()\n {\n int result = SLEEP_TIME;\n SLEEP_TIME += SLEEP_TIME_INTERVAL;\n if (SLEEP_TIME > SLEEP_TIME_MAX)\n {\n SLEEP_TIME = 0;\n }\n return result;\n }", "public Time getBestTime()\n\t{\n\t\treturn bestTime;\n\t}", "public abstract Date computeFirstFireTime(Calendar calendar);", "public float getTime()\r\n\t{\r\n\t\treturn runningTime;\r\n\t}", "public synchronized Event getNextEvent() {\n\t\twhile (queue.isEmpty()) {\n\t\t\ttry {\n\t\t\t\twait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t\treturn queue.pop();\n\t}", "public GregorianCalendar getTime()\n {\n // FIXME: GregorianCalendar is mutable, dus je mag niet zomaar het object zelf naar buiten brengen, dan laat je toe\n // dat om 't even wie de tijd verzet\n return this.now;\n }", "public synchronized long getTime() {\n return -1L;\n }", "public Time getTime() {\n return this.time; // returns the time associated with the task\n }", "long getMostSleepyMinuteSleepTime() {\n return getMinuteTotalSleepTime(getMostSleepyMinute());\n }", "public double getTimeDelayActivation() {\r\n\t\tif (activation_count > 1) return last_activation;\r\n\t\telse return 0.0;\r\n\t}", "public long getExpirationTime()\n {\n return this.m_eventExpirationTime;\n }", "public long getPlayerTime ( ) {\n\t\treturn extract ( handle -> handle.getPlayerTime ( ) );\n\t}", "public MyTime nextMinute(){\n\t\tint second = getSeconds();\n\t\tint minute = getMinute();\n\t\tint hour = getHours();\n\t\t\n\t\tif (minute!=59){\n\t\t\tminute++;\n\t\t}\n\t\telse{\n\t\t\tminute = 0;\n\t\t\tif (hours!=23){\n\t\t\t\thour++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\thour = 0;\n\t\t\t}\n\t\t\n\t\t}\n\t\n\t\t\n\t\treturn new MyTime(hour,minute,second);\n\t}", "public Long getTime() {\n if (timeEnd == null) {\n return null;\n }\n return timeEnd - timeStart;\n }", "public com.walgreens.rxit.ch.cda.TS getBirthTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.TS target = null;\n target = (com.walgreens.rxit.ch.cda.TS)get_store().find_element_user(BIRTHTIME$12, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public long lastCumulativeTime()\r\n/* 234: */ {\r\n/* 235:434 */ return this.lastCumulativeTime;\r\n/* 236: */ }", "public int getWaitedTime() {\n\t\treturn this.waitedTime;\n\t}", "public com.google.protobuf.Timestamp getLastRefreshTime() {\n if (lastRefreshTimeBuilder_ == null) {\n return lastRefreshTime_ == null\n ? com.google.protobuf.Timestamp.getDefaultInstance()\n : lastRefreshTime_;\n } else {\n return lastRefreshTimeBuilder_.getMessage();\n }\n }", "public interface TriggerContext {\n\n /**\n * Return the last <i>scheduled</i> execution time of the task, or.\n *\n * @return the date\n * {@code null} if not scheduled before.\n */\n Date lastScheduledExecutionTime();\n\n /**\n * Return the last <i>actual</i> execution time of the task, or {@code null}\n * if not scheduled before.\n *\n * @return the date\n */\n Date lastActualExecutionTime();\n\n /**\n * Return the last completion time of the task, or {@code null} if not\n * scheduled before.\n *\n * @return the date\n */\n Date lastCompletionTime();\n}", "Instant getStart();", "public long getNextCheckMillis(Date now)\r\n\t{\r\n\t\treturn getNextCheckDate(now).getTime();\r\n\t}", "Optional<Duration> timeToNextExecution(final ZonedDateTime date);", "@Override\n public int getTimeForNextTicInSeconds() {\n int seconds = Calendar.getInstance().get(Calendar.SECOND);\n return 60 - seconds;\n }", "public int getEndTime()\n {\n if (isRepeated()) return end;\n else return time;\n }", "public float getTimeToMove()\n\t{\n\t\treturn this.timeToMove;\n\t}", "public int getScopeTime()\n{\n // If scope time not explicitly set, get time prior to given time\n if(_scopeTime==null) {\n List <Integer> keyFrames = getKeyFrameTimes();\n int index = Collections.binarySearch(keyFrames, getTime());\n if(index<0) index = -index - 2; else index--;\n return index>=0? keyFrames.get(index) : 0;\n }\n \n // Return scope time\n return _scopeTime;\n}" ]
[ "0.66930324", "0.65551305", "0.6423434", "0.60011387", "0.57688534", "0.5672416", "0.5665899", "0.5593646", "0.55690396", "0.5514951", "0.54087186", "0.5396792", "0.5386823", "0.5294309", "0.52757806", "0.5263939", "0.52497923", "0.52150494", "0.52010846", "0.51768017", "0.51715183", "0.51657414", "0.51431", "0.51384574", "0.51046693", "0.5094405", "0.50931275", "0.50814635", "0.5065406", "0.5065111", "0.50645417", "0.50370526", "0.5001753", "0.49971852", "0.49720246", "0.49641952", "0.4957665", "0.49384862", "0.4936126", "0.49348056", "0.49339762", "0.49312505", "0.49296892", "0.49022233", "0.48797727", "0.48695016", "0.4865319", "0.48547608", "0.48512954", "0.48449883", "0.48425126", "0.4831132", "0.48052624", "0.47986346", "0.47825998", "0.47698125", "0.47616264", "0.47559473", "0.4753738", "0.47518", "0.47496742", "0.47454002", "0.47452542", "0.4745239", "0.47237673", "0.4721747", "0.47095087", "0.4699956", "0.46818593", "0.46797734", "0.46755955", "0.46732026", "0.4671634", "0.4665448", "0.4635248", "0.46347436", "0.4626629", "0.46214378", "0.4612014", "0.46100038", "0.45884475", "0.45881167", "0.45856997", "0.45833376", "0.45776016", "0.4577163", "0.4575166", "0.45637694", "0.4560824", "0.45577672", "0.4554476", "0.4553979", "0.45351836", "0.45233947", "0.45197505", "0.45184276", "0.4509653", "0.45050374", "0.4496795", "0.44965705" ]
0.6273861
3
Returns the previous time at which the Trigger fired. If the trigger has not yet fired, null will be returned.
public abstract Date getPreviousFireTime();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getUpdateTriggerTime() {\n return instance.getUpdateTriggerTime();\n }", "int getUpdateTriggerTime();", "public double getLastTime()\n\t{\n\t\tdouble time = Double.NaN;\n\t\tfinal Entry< Double, V > entry = getLastEntry();\n\t\tif( entry != null )\n\t\t{\n\t\t\ttime = entry.getKey();\n\t\t}\n\t\treturn time;\n\t}", "public int getUpdateTriggerTime() {\n return updateTriggerTime_;\n }", "public long lastTime()\r\n/* 219: */ {\r\n/* 220:412 */ return this.lastTime.get();\r\n/* 221: */ }", "public Long getTimeLapsed() {\r\n\t\tif(moodTimestamp == null) \r\n\t\t\treturn null;\r\n\t\telse \r\n\t\t\treturn ((System.currentTimeMillis()/1000) - moodTimestamp.longValue());\r\n\t}", "public T previous()\n {\n // TODO: implement this method\n return null;\n }", "public PlayerPosition getPrevious() {\n\n\t\tswitch (this) {\n\t\t\tcase BOTTOM:\n\t\t\t\treturn RIGHT;\n\t\t\tcase LEFT:\n\t\t\t\treturn BOTTOM;\n\t\t\tcase TOP:\n\t\t\t\treturn LEFT;\n\t\t\tcase RIGHT:\n\t\t\t\treturn TOP;\n\t\t\tdefault:\n\t\t\t\t// must not happen\n\t\t\t\treturn null;\n\t\t}\n\t}", "public Long getLastOnsetTime() {\n if (timeInfos.isEmpty()) {\n return null;\n } else {\n int size = timeInfos.size();\n return timeInfos.get(size - 1).getOnsetTime();\n }\n }", "public double getNextTime(){\n\t\tif(timeoutSet.peek() == null && eventSet.peek() == null) return Double.MAX_VALUE;\n\t\telse if(eventSet.peek() != null && timeoutSet.peek() != null) return Math.min(eventSet.peek().getTime(), timeoutSet.peek().getTime());\n\t\telse if(eventSet.peek() == null && timeoutSet.peek() != null) return timeoutSet.peek().getTime();\n\t\treturn eventSet.peek().getTime();\n\t}", "public MyTime previousMinute(){\n\t\tint second = getSeconds();\n\t\tint minute = getMinute();\n\t\tint hour = getHours();\n\n\t\tif (minute == 0){\n\t\t\tminute = 59;\n\t\t\t\n\t\t\tif (hour == 0){\n\t\t\t\thour = 23;\n\t\t\t}\n\t\t\telse{\n\t\t\t\thour--;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tminute--;\n\t\t}\t\n\n\t\treturn new MyTime(hour,minute,second);\n\t}", "@CheckReturnValue\n public abstract long getTimeUntilReset();", "public static LocalDateTime getLastAction() {\n return lastAction;\n }", "public Time lastModifiedTime()\n\t{\n\t\tResource resource = getResource();\n\t\tif (resource instanceof IModifiable)\n\t\t{\n\t\t\treturn ((IModifiable)resource).lastModifiedTime();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "public Long getLastEndTime() {\n if (timeInfos.isEmpty()) {\n return null;\n } else {\n int size = timeInfos.size();\n return timeInfos.get(size - 1).getEndTime();\n }\n }", "public org.landxml.schema.landXML11.GPSTime xgetStartTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.GPSTime target = null;\r\n target = (org.landxml.schema.landXML11.GPSTime)get_store().find_attribute_user(STARTTIME$22);\r\n return target;\r\n }\r\n }", "public TimeRef time() {\n if (this.ptr == Pointer.NULL) {\n throw new RuntimeException();\n }\n TimeRef result = new TimeRef(LiveSplitCoreNative.INSTANCE.SegmentHistoryElement_time(this.ptr));\n return result;\n }", "public gov.ucore.ucore._2_0.TimeType getTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.ucore.ucore._2_0.TimeType target = null;\n target = (gov.ucore.ucore._2_0.TimeType)get_store().find_element_user(TIME$2, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public Date getPreviousWeekStart() {\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.HOUR_OF_DAY, 0); // ! clear would not reset the hour of day !\n cal.clear(Calendar.MINUTE);\n cal.clear(Calendar.SECOND);\n cal.clear(Calendar.MILLISECOND);\n\n cal.setFirstDayOfWeek(Calendar.MONDAY);\n cal.set(Calendar.DAY_OF_WEEK, cal.getFirstDayOfWeek());\n cal.add(Calendar.DATE, -7);\n Date previousWeekStart = cal.getTime();\n\n return previousWeekStart;\n }", "public java.util.Calendar getRequestedTime()\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(REQUESTEDTIME$2, 0);\n if (target == null)\n {\n return null;\n }\n return target.getCalendarValue();\n }\n }", "public synchronized long getWhen() {\n return when;\n }", "public static long getLastResetTime() {\n return p().lastReset;\n }", "public synchronized long getTime() {\n return -1L;\n }", "public double getStartTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STARTTIME$22);\r\n if (target == null)\r\n {\r\n return 0.0;\r\n }\r\n return target.getDoubleValue();\r\n }\r\n }", "public com.google.protobuf.Timestamp getLastRefreshTime() {\n if (lastRefreshTimeBuilder_ == null) {\n return lastRefreshTime_ == null\n ? com.google.protobuf.Timestamp.getDefaultInstance()\n : lastRefreshTime_;\n } else {\n return lastRefreshTimeBuilder_.getMessage();\n }\n }", "public Timestamp getTimestamp() {\r\n for (int i = 0; i < eventFields.size(); i++) {\r\n EventDataEntry currentEntry = eventFields.get(i);\r\n if (currentEntry.getColumnName().equalsIgnoreCase(\"timestamp\")) {\r\n return (Timestamp) currentEntry.getValues().getFirst();\r\n }\r\n }\r\n return null;\r\n }", "public Long getTime() {\n if (timeEnd == null) {\n return null;\n }\n return timeEnd - timeStart;\n }", "public Optional<Instant> getBefore() {\n\t\treturn before;\n\t}", "public int getStartTime()\n {\n if (isRepeated()) return start;\n else return time;\n }", "public IEvent getPreviousEvent();", "public String getPrevDate() \n\t{\n\t\tm_calendar.set (Calendar.DAY_OF_MONTH, getDayOfMonth() -1);\n\t\treturn getTodayDate();\n\t}", "ZonedDateTime lastRefTimestamp() {\n ArticleRef last = buffer.peekLast();\n if(last == null) {\n return null;\n }\n return last.getTimestamp();\n }", "public Trigger getTrigger() {\n \t\treturn trigger;\n \t}", "public interface TriggerContext {\n\n /**\n * Return the last <i>scheduled</i> execution time of the task, or.\n *\n * @return the date\n * {@code null} if not scheduled before.\n */\n Date lastScheduledExecutionTime();\n\n /**\n * Return the last <i>actual</i> execution time of the task, or {@code null}\n * if not scheduled before.\n *\n * @return the date\n */\n Date lastActualExecutionTime();\n\n /**\n * Return the last completion time of the task, or {@code null} if not\n * scheduled before.\n *\n * @return the date\n */\n Date lastCompletionTime();\n}", "public Optional<Instant> getBefore() {\n\t\t\treturn before;\n\t\t}", "public long getPlayerTimeOffset ( ) {\n\t\treturn extract ( handle -> handle.getPlayerTimeOffset ( ) );\n\t}", "public Date getPreviousWeekEnd() {\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.HOUR_OF_DAY, 0); // ! clear would not reset the hour of day !\n cal.clear(Calendar.MINUTE);\n cal.clear(Calendar.SECOND);\n cal.clear(Calendar.MILLISECOND);\n\n cal.setFirstDayOfWeek(Calendar.MONDAY);\n cal.set(Calendar.DAY_OF_WEEK, cal.getFirstDayOfWeek());\n cal.add(Calendar.DATE, -1);\n Date previousWeekEnd = cal.getTime();\n\n return previousWeekEnd;\n }", "public int getScopeTime()\n{\n // If scope time not explicitly set, get time prior to given time\n if(_scopeTime==null) {\n List <Integer> keyFrames = getKeyFrameTimes();\n int index = Collections.binarySearch(keyFrames, getTime());\n if(index<0) index = -index - 2; else index--;\n return index>=0? keyFrames.get(index) : 0;\n }\n \n // Return scope time\n return _scopeTime;\n}", "public long getPlayerTime ( ) {\n\t\treturn extract ( handle -> handle.getPlayerTime ( ) );\n\t}", "public TimedVariable findPrev(Date ref)\n\t{\n\t\tif (vars.isEmpty())\n\t\t\treturn null;\n\t\tTimedVariable dummy = new TimedVariable(0);\n\t\tdummy.setTime(ref);\n\t\tint idx = Collections.binarySearch(vars, dummy, tvComparator);\n\t\tif (idx < 0)\n\t\t\tidx = (-idx) - 1;\n\n\t\t// The 'insertion point' would be the next one, so subtract one.\n\t\t// If now less than zero, there are no vars prev to 'sec'.\n\t\tif (--idx < 0)\n\t\t\treturn null;\n\t\treturn vars.get(idx);\n\t}", "public int getOlddeltaT() {\n return olddeltaT;\n }", "public LocalDateTime getLastUpdTime() {\n return (LocalDateTime) get(7);\n }", "@java.lang.Override\n public com.google.protobuf.Timestamp getLastRefreshTime() {\n return lastRefreshTime_ == null\n ? com.google.protobuf.Timestamp.getDefaultInstance()\n : lastRefreshTime_;\n }", "long getSince();", "public long getWhen() {\n return when;\n }", "public Integer getCurrentLapsTime() {\n\t\treturn this.currentAction.getCurrentLapsTime();\n\t}", "public long hoverTime() {\n\t\treturn hoverStart == 0 ? 0 : Calendar.getInstance().getTimeInMillis() - hoverStart;\n\t}", "public long getTimeOfLastValuesChanged();", "public org.apache.xmlbeans.XmlDateTime xgetRequestedTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlDateTime target = null;\n target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(REQUESTEDTIME$2, 0);\n return target;\n }\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n com.google.protobuf.Timestamp,\n com.google.protobuf.Timestamp.Builder,\n com.google.protobuf.TimestampOrBuilder>\n getLastRefreshTimeFieldBuilder() {\n if (lastRefreshTimeBuilder_ == null) {\n lastRefreshTimeBuilder_ =\n new com.google.protobuf.SingleFieldBuilderV3<\n com.google.protobuf.Timestamp,\n com.google.protobuf.Timestamp.Builder,\n com.google.protobuf.TimestampOrBuilder>(\n getLastRefreshTime(), getParentForChildren(), isClean());\n lastRefreshTime_ = null;\n }\n return lastRefreshTimeBuilder_;\n }", "public long lastCumulativeTime()\r\n/* 234: */ {\r\n/* 235:434 */ return this.lastCumulativeTime;\r\n/* 236: */ }", "@Nullable\n public Date getModifiedTime() {\n return mModifiedTime == null ? null : new Date(mModifiedTime.getTime());\n }", "public long sinceStart() {\n return System.currentTimeMillis() - lastStart;\n }", "public int getTime()\n {\n if (isRepeated()) return start;\n else return time;\n }", "public Date getEventTime() {\n\t\treturn time;\n\t}", "public E previousStep() {\r\n\t\tthis.current = this.values[Math.max(this.current.ordinal() - 1, 0)];\r\n\t\treturn this.current;\r\n\t}", "public Position2D getPreviousPosition()\n {\n return previousPosition;\n }", "OffsetDateTime lastActionDateTime();", "public long getEventTime();", "public org.landxml.schema.landXML11.GPSTime xgetStopTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.GPSTime target = null;\r\n target = (org.landxml.schema.landXML11.GPSTime)get_store().find_attribute_user(STOPTIME$24);\r\n return target;\r\n }\r\n }", "public java.util.Date getLastDriftCheckTimestamp() {\n return this.lastDriftCheckTimestamp;\n }", "public IUTCTime getLastTime() {\n if (null == lastTime) {\n return new UTCTime(0);\n }\n return lastTime;\n }", "public long getLastPlayed ( ) {\n\t\treturn extract ( handle -> handle.getLastPlayed ( ) );\n\t}", "public int getEventTime() {\n\t\treturn scheduledTime;\n\t}", "public MyTime previouseHour(){\n\t\tint second = getSeconds();\n\t\tint minute = getMinute();\n\t\tint hour = getHours();\n\n\t\tif (hour == 0){\n\t\t\thour = 23;\n\t\t}\n\t\telse{\n\t\t\thour--;\n\t\t}\n\n\n\t\treturn new MyTime(hour,minute,second);\n\t}", "public TimeStep getTimeStep() {\n\t\t// Only here to ensure it is being used correctly.\n\t\t// cbit.util.Assertion.assertNotNull(fieldTimeStep);\n\t\treturn fieldTimeStep;\n\t}", "public EventTime getTime() {\n return this.time;\n }", "public\tString\tgetPreviousSignature() {\n\t\t\treturn\tthis.prevSignature;\n\t\t}", "Date getLastTime();", "public Date getLastTime() {\n return lastTime;\n }", "@Override\n\tpublic float getStartTime()\n\t{\n\t\treturn _tbeg;\n\t}", "public java.util.Date getLastExecuteTime()\n {\n return null;\n }", "public Token getPreviousToken() {\n return previousToken;\n }", "public Object getPrev() {\n\t\tif (current != null) {\n\t\t\tcurrent = current.prev;\n\t\t} else {\n\t\t\tcurrent = start;\n\t\t}\n\t\treturn current == null ? null : current.item; //Ha nincs még start, akkor null adjon vissza\n\t}", "public double getLeftTrigger() {\n\t\treturn getRawAxis(LEFT_TRIGGER);\n\t}", "public OffsetDateTime getModifiedTime()\n\t{\n\t\treturn (OffsetDateTime) this.getKeyValue(\"Modified_Time\");\n\n\t}", "public double getTimeDelayActivation() {\r\n\t\tif (activation_count > 1) return last_activation;\r\n\t\telse return 0.0;\r\n\t}", "public CellCoord previousColumn() {\n return new CellCoord(column - 1, row);\n }", "public DateTime lastTrainedDateTime() {\n return this.lastTrainedDateTime;\n }", "@Override\n\tpublic Double getTimer() {\n\t\treturn null;\n\t}", "public Production getLastProductionFired () { return lastFiredInst.getProduction(); }", "public int getTime() {\n\t\tif(player == null) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn player.getPosition();\n\t}", "public CellCoord previousRow() {\n return new CellCoord(column, row - 1);\n }", "@Override\n public E getPrevious() {\n if (isCurrent() && prev != null) { return prev.getData(); }\n else { throw new IllegalStateException(\"There is no previous element.\"); }\n }", "public Timestamp getRecordStatusTime() {\n\t\treturn null;\n\t}", "public float getStartTime()\r\n\t{\r\n\t\tif (starttime != null)\r\n\t\t\treturn starttime.getTimeInMillis();\r\n\t\t\r\n\t\treturn 0;\r\n\t}", "public com.walgreens.rxit.ch.cda.TS getBirthTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.TS target = null;\n target = (com.walgreens.rxit.ch.cda.TS)get_store().find_element_user(BIRTHTIME$12, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public abstract Date getFinalFireTime();", "public Timestamp getLastLogintime() {\n return lastLogintime;\n }", "com.google.protobuf.Timestamp getCurrentStateTime();", "T getEventTime();", "public State getPreviousState()\r\n\t{\r\n\t\treturn previousState;\r\n\t}", "public T prev() {\n cursor = ((Entry<T>) cursor).prev;\n ready = true;\n return cursor.element;\n }", "public T previous() {\r\n\t\t// aktu == null ist dann, wenn aktu einen schritt zuvor first war;\r\n\t\tif (aktu == null) {\r\n\t\t\treturn null;\r\n\t\t} else if (first.equals(aktu)) {\r\n\t\t\t// wir sind am Ende, deswegen setzen wir aktu auf null (für die\r\n\t\t\t// Abfrage oberhalb) und geben den ersten Wert zurück;\r\n\t\t\taktu = null;\r\n\t\t\treturn (T) first.getData();\r\n\t\t} else if (first.equals(aktu.getPrevious())) {\r\n\t\t\t// überprüft, ob der Knoten vor dem aktuellen der letzte ist, dass\r\n\t\t\t// hat den Grund, dass beim letzten die Methode .getPrevios eine\r\n\t\t\t// NullPointerException wirft;\r\n\t\t\taktu = first;\r\n\t\t\treturn (T) first.getNext().getData();\r\n\t\t} else {\r\n\t\t\t// das ist der Standardfall solange der nicht beim vorletzten Knoten\r\n\t\t\t// angekommen ist.\r\n\t\t\taktu = aktu.getPrevious();\r\n\t\t\treturn (T) aktu.getNext().getData();\r\n\t\t}\r\n\r\n\t}", "com.google.protobuf.Timestamp getStartTime();", "@Override\n\tpublic Long updateStartTime() {\n\t\treturn null;\n\t}", "public Node getPrev() {\n return null;\n }", "public Date getStartTime() {\n\t\treturn getOriginatingTime();\n\t}", "public Timestamp getStatusTime() {\n\t\treturn null;\n\t}", "public Long getConditionLastEndTime(String condition) {\n if (onsetConditions.containsKey(condition)) {\n return onsetConditions.get(condition).getLastEndTime();\n }\n return null;\n }" ]
[ "0.62390924", "0.6195274", "0.6152098", "0.6141449", "0.6125025", "0.59802306", "0.5931242", "0.5900334", "0.5891104", "0.5859611", "0.58583933", "0.5816834", "0.5774656", "0.5764481", "0.5753705", "0.57458854", "0.56806564", "0.56716555", "0.56398726", "0.56396735", "0.5639013", "0.56328946", "0.5631027", "0.5623256", "0.5621159", "0.5597213", "0.55915785", "0.5580046", "0.55763286", "0.55692685", "0.55664545", "0.5564648", "0.5562269", "0.553864", "0.5538317", "0.55184954", "0.55149186", "0.55143106", "0.54918253", "0.54881424", "0.54829234", "0.5473746", "0.54639566", "0.5463322", "0.54619676", "0.5457273", "0.545156", "0.54454", "0.54357713", "0.543259", "0.54283184", "0.5409824", "0.53989387", "0.538508", "0.5384652", "0.5384061", "0.53839207", "0.53813595", "0.53788024", "0.5374795", "0.537316", "0.53676504", "0.5364356", "0.53630745", "0.53627276", "0.5362072", "0.53478193", "0.5322912", "0.5319662", "0.53186774", "0.53166777", "0.53161067", "0.5310879", "0.5289534", "0.5288258", "0.52863914", "0.52737665", "0.52720135", "0.5267913", "0.5258257", "0.5258244", "0.52549416", "0.52434325", "0.52421814", "0.5240887", "0.5234366", "0.52266514", "0.52193004", "0.52150697", "0.5212488", "0.521136", "0.52113575", "0.520995", "0.52041197", "0.51989186", "0.5195893", "0.519384", "0.51897645", "0.5187833", "0.518606" ]
0.7021419
0
Returns the next time at which the Trigger will fire, after the given time. If the trigger will not fire after the given time, null will be returned.
public abstract Date getFireTimeAfter(Date afterTime);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Date getNextFireTime();", "public double getNextTime(){\n\t\tif(timeoutSet.peek() == null && eventSet.peek() == null) return Double.MAX_VALUE;\n\t\telse if(eventSet.peek() != null && timeoutSet.peek() != null) return Math.min(eventSet.peek().getTime(), timeoutSet.peek().getTime());\n\t\telse if(eventSet.peek() == null && timeoutSet.peek() != null) return timeoutSet.peek().getTime();\n\t\treturn eventSet.peek().getTime();\n\t}", "io.opencannabis.schema.temporal.TemporalInstant.Instant getDesiredTime();", "public int nextTimeAfter(int time)\n {\n if (time < 0)\n {\n throw new IllegalArgumentException(\"Method nextTimeAfter: Invalid time\");\n }\n\n int nt = -1;\n\n if(isActive())\n {\n if (!isRepeated())\n {\n if (this.time > time) nt = this.time;\n }\n else\n {\n if (start > time) nt = start;\n\n else if (time < end) {\n int prev = start;\n int next = start + repeat;\n while (next <= end - repeat)\n {\n if (time < next)\n {\n nt = next;\n break;\n }\n else\n {\n prev = next;\n next += repeat;\n }\n }\n }\n\n }\n\n }\n\n return nt;\n }", "public io.opencannabis.schema.temporal.TemporalInstant.Instant getDesiredTime() {\n return desiredTime_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : desiredTime_;\n }", "public gov.ucore.ucore._2_0.TimeType getTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.ucore.ucore._2_0.TimeType target = null;\n target = (gov.ucore.ucore._2_0.TimeType)get_store().find_element_user(TIME$2, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public io.opencannabis.schema.temporal.TemporalInstant.Instant getDesiredTime() {\n if (desiredTimeBuilder_ == null) {\n return desiredTime_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : desiredTime_;\n } else {\n return desiredTimeBuilder_.getMessage();\n }\n }", "public long getNextTime() {\r\n if (super.getNextTime() == 0) {\r\n return 0;\r\n }\r\n Object obj = this._queue;\r\n if (obj != null) {\r\n if (obj instanceof LockFreeTaskQueueCore) {\r\n if (!((LockFreeTaskQueueCore) obj).isEmpty()) {\r\n return 0;\r\n }\r\n } else if (obj == EventLoop_commonKt.CLOSED_EMPTY) {\r\n return LongCompanionObject.MAX_VALUE;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n DelayedTaskQueue delayedTaskQueue = (DelayedTaskQueue) this._delayed;\r\n if (delayedTaskQueue != null) {\r\n DelayedTask delayedTask = (DelayedTask) delayedTaskQueue.peek();\r\n if (delayedTask != null) {\r\n long j = delayedTask.nanoTime;\r\n TimeSource timeSource = TimeSourceKt.getTimeSource();\r\n return RangesKt.coerceAtLeast(j - (timeSource != null ? timeSource.nanoTime() : System.nanoTime()), 0);\r\n }\r\n }\r\n return LongCompanionObject.MAX_VALUE;\r\n }", "public abstract Date getPreviousFireTime();", "private com.google.protobuf.SingleFieldBuilderV3<\n io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder> \n getDesiredTimeFieldBuilder() {\n if (desiredTimeBuilder_ == null) {\n desiredTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder>(\n getDesiredTime(),\n getParentForChildren(),\n isClean());\n desiredTime_ = null;\n }\n return desiredTimeBuilder_;\n }", "public long getNextScheduled() {\n\t\tDate currDate = new Date();\n\t\t\n\t\tCalendar runTimeToday = Calendar.getInstance();\n\t\trunTimeToday.setTime(currDate);\n\t\t\n\t\trunTimeToday.set(Calendar.HOUR_OF_DAY, hour);\n\t\trunTimeToday.set(Calendar.MINUTE, minute);\n\t\trunTimeToday.set(Calendar.SECOND, 0);\n\t\t\n\t\tDate runTimeTodayDate = runTimeToday.getTime();\n\t\t\n\t\tif(currDate.before(runTimeTodayDate)) {\n\t\t\tSystem.out.println(\"DailyProcess: Next runtime is today.\");\n\t\t} else {\n\t\t\t// equals or after\n\t\t\tSystem.out.println(\"DailyProcess: Next runtime is tomorrow.\");\n\t\t\trunTimeToday.add(Calendar.DATE, 1);\n\t\t\trunTimeTodayDate = runTimeToday.getTime();\n\t\t}\n\t\t\n\t\tlong runTime = runTimeTodayDate.getTime() - currDate.getTime();\n\t\t\n\t\tif(false) {\n\t\t\t// Debugging\n\t\t\trunTime = 0;\n\t\t}\n\t\t\n\t\trunTime += randomDelay;\n\t\t\n\t\treturn runTime;\n\t}", "public abstract Date getFinalFireTime();", "public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getDesiredTimeOrBuilder() {\n if (desiredTimeBuilder_ != null) {\n return desiredTimeBuilder_.getMessageOrBuilder();\n } else {\n return desiredTime_ == null ?\n io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : desiredTime_;\n }\n }", "public long getMaxTime()\n {\n return times[times.length - 1];\n }", "public Long getLastOnsetTime() {\n if (timeInfos.isEmpty()) {\n return null;\n } else {\n int size = timeInfos.size();\n return timeInfos.get(size - 1).getOnsetTime();\n }\n }", "public Time getNextDepartureTime (Departures d) {\n Time t;\n try {\n t = departures.get ( d.getGoingTo () ).higher ( d ).getDeparture_time ();\n } catch (NullPointerException e) {\n t = departures.get ( d.getGoingTo () ).first ().getDeparture_time ();\n }\n return t;\n }", "public Long getLastEndTime() {\n if (timeInfos.isEmpty()) {\n return null;\n } else {\n int size = timeInfos.size();\n return timeInfos.get(size - 1).getEndTime();\n }\n }", "Optional<Duration> timeToNextExecution(final ZonedDateTime date);", "public TaskInfo getNextTimeTask(TaskInfo ppTaskInfo) {\n\t\tTaskInfo pNextTask = m_pTaskList;\r\n\t\tif (pNextTask != null && pNextTask.time.next <= m_clock.getFrameEnd()) {\r\n\t\t\tm_pTaskList = pNextTask.pNext;\r\n\t\t\t// pNextTask.pNext = null;\r\n\t\t\tppTaskInfo = pNextTask;\r\n\t\t\treturn ppTaskInfo;\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public double getFollowingTime( final double time )\n\t{\n\t\tdouble followingDate = Double.NaN;\n\t\tfinal Entry< Double, V > entry = getFollowingEntry( time );\n\t\tif( entry != null )\n\t\t{\n\t\t\tfollowingDate = entry.getKey();\n\t\t}\n\t\treturn followingDate;\n\t}", "public final flipsParser.time_return time() throws RecognitionException {\n flipsParser.time_return retval = new flipsParser.time_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token At323=null;\n Token For325=null;\n flipsParser.fixedTime_return fixedTime324 = null;\n\n flipsParser.relativeTime_return relativeTime326 = null;\n\n\n CommonTree At323_tree=null;\n CommonTree For325_tree=null;\n RewriteRuleTokenStream stream_At=new RewriteRuleTokenStream(adaptor,\"token At\");\n RewriteRuleTokenStream stream_For=new RewriteRuleTokenStream(adaptor,\"token For\");\n RewriteRuleSubtreeStream stream_relativeTime=new RewriteRuleSubtreeStream(adaptor,\"rule relativeTime\");\n RewriteRuleSubtreeStream stream_fixedTime=new RewriteRuleSubtreeStream(adaptor,\"rule fixedTime\");\n try {\n // flips.g:501:2: ( At fixedTime -> ^( TIME FIXED fixedTime ) | For relativeTime -> ^( TIME RELATIVE relativeTime ) )\n int alt129=2;\n int LA129_0 = input.LA(1);\n\n if ( (LA129_0==At) ) {\n alt129=1;\n }\n else if ( (LA129_0==For) ) {\n alt129=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 129, 0, input);\n\n throw nvae;\n }\n switch (alt129) {\n case 1 :\n // flips.g:501:4: At fixedTime\n {\n At323=(Token)match(input,At,FOLLOW_At_in_time2700); \n stream_At.add(At323);\n\n pushFollow(FOLLOW_fixedTime_in_time2702);\n fixedTime324=fixedTime();\n\n state._fsp--;\n\n stream_fixedTime.add(fixedTime324.getTree());\n\n\n // AST REWRITE\n // elements: fixedTime\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 502:2: -> ^( TIME FIXED fixedTime )\n {\n // flips.g:502:5: ^( TIME FIXED fixedTime )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TIME, \"TIME\"), root_1);\n\n adaptor.addChild(root_1, (CommonTree)adaptor.create(FIXED, \"FIXED\"));\n adaptor.addChild(root_1, stream_fixedTime.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n case 2 :\n // flips.g:503:4: For relativeTime\n {\n For325=(Token)match(input,For,FOLLOW_For_in_time2718); \n stream_For.add(For325);\n\n pushFollow(FOLLOW_relativeTime_in_time2720);\n relativeTime326=relativeTime();\n\n state._fsp--;\n\n stream_relativeTime.add(relativeTime326.getTree());\n\n\n // AST REWRITE\n // elements: relativeTime\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 504:2: -> ^( TIME RELATIVE relativeTime )\n {\n // flips.g:504:5: ^( TIME RELATIVE relativeTime )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TIME, \"TIME\"), root_1);\n\n adaptor.addChild(root_1, (CommonTree)adaptor.create(RELATIVE, \"RELATIVE\"));\n adaptor.addChild(root_1, stream_relativeTime.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public Date getAfterTime() {\r\n return afterTime;\r\n }", "public String getNextTimeFromDayTime(int day,String time){\n \t\tString res = \"00:00:00\";\n //\t\tif(existDayTime(day,time)){\n //\t\t\t// SELECT time FROM time WHERE day = 0 AND ID = 1+(SELECT ID FROM time WHERE day= 0 AND time ='16:00:00')\n //\t\t\tSQLiteDatabase db= this.getReadableDatabase();\n //\t\t\tCursor c = db.rawQuery(\"SELECT time FROM time \" +\n //\t\t\t\t\t\t\t\t \"WHERE day = \"+day+\" \" +\n //\t\t\t\t\t\t\t\t \"AND ID = 1+(SELECT ID \" +\n //\t\t\t\t\t\t\t\t \t\t\t \"FROM time \" +\n //\t\t\t\t\t\t\t\t \t\t\t \"WHERE day=\"+day+\" \" +\n //\t\t\t\t\t\t\t\t \t\t\t \"AND time ='\"+time+\"')\",null);\n //\t\t\tif(c != null){\n //\t\t\t\tc.moveToFirst();\n //\t\t\t\tres = c.getString(0);\n //\t\t\t}\n //\t\t\tdb.close();\n //\t\t\treturn res;\n //\t\t} else {\n \t\t\t// TODO: else Pfad klappt immer, if nicht notwendig!\n \t\t\t// SELECT time FROM time WHERE day = 1 AND time(time) > time('18:00:00')\n \t\t\tLog.v(\"test\",\"DB-Zeit \"+time);\n \t\t\tLog.v(\"test\",\"Tag \"+String.valueOf(day));\n \t\t\tSQLiteDatabase db = this.getReadableDatabase();\n \t\t\tCursor c = db.rawQuery(\"SELECT time FROM time \" +\n \t\t\t\t\t\t\t\t \"WHERE day = \"+day+\" \" +\n \t\t\t\t\t\t\t\t \"AND time(time) > time('\"+time+\"')\",null);\n \t\t\tif(c != null){\n \t\t\t\tc.moveToFirst();\n \t\t\t\tres = c.getString(0);\n\t\t\t} else {\n\t\t\t\t// TODO: als Test, wenn Zeit fr heute nicht mehr vorhanden, nimm nchsten Tag\n\t\t\t\tres = getFirstTimeFromDay((1+day)%7);\n \t\t\t}\n \t\t\t//db.close();\n \t\t\tLog.v(\"test\",String.valueOf(res));\n \t\t\treturn res;\n //\t\t}\n \t}", "public double nextArrivalTime() {\n return (-1 / lambda) * Math.log(1 - randomAT.nextDouble());\n }", "Optional<Instant> startTime();", "public TimedVariable findNext(Date ref)\n\t{\n\t\tif (vars.isEmpty())\n\t\t\treturn null;\n\t\tint sz = vars.size();\n\n\t\tTimedVariable dummy = new TimedVariable(0);\n\t\tdummy.setTime(ref);\n\t\tint idx = Collections.binarySearch(vars, dummy, tvComparator);\n\n\t\tif (idx < 0)\n\t\t\tidx = (-idx) - 1;\n\t\telse // the exact time was found. Increment to the next value\n\t\t\tidx++;\n\t\t\n\t\tif (idx < sz)\n\t\t\treturn vars.get(idx);\n\t\telse\n\t\t\treturn null;\n\t}", "public Date getNextExecutionTime() {\n\t\treturn SchedulerUtil.getNextExecution(this);\n\t}", "Date getLastTime();", "public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getDesiredTimeOrBuilder() {\n return getDesiredTime();\n }", "public long lastTime()\r\n/* 219: */ {\r\n/* 220:412 */ return this.lastTime.get();\r\n/* 221: */ }", "public Optional<Instant> getAfter() {\n\t\treturn after;\n\t}", "public java.util.Calendar getRequestedTime()\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(REQUESTEDTIME$2, 0);\n if (target == null)\n {\n return null;\n }\n return target.getCalendarValue();\n }\n }", "io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getDesiredTimeOrBuilder();", "public Optional<Instant> getAfter() {\n\t\t\treturn after;\n\t\t}", "public gov.ucore.ucore._2_0.TimeType addNewTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.ucore.ucore._2_0.TimeType target = null;\n target = (gov.ucore.ucore._2_0.TimeType)get_store().add_element_user(TIME$2);\n return target;\n }\n }", "Optional<Duration> timeFromLastExecution(final ZonedDateTime date);", "public Rational getEndTime ()\r\n {\r\n if (isWholeDuration()) {\r\n return null;\r\n }\r\n\r\n Rational chordDur = getDuration();\r\n\r\n if (chordDur == null) {\r\n return null;\r\n } else {\r\n return startTime.plus(chordDur);\r\n }\r\n }", "public Optional<QueuedEvent> getNextEvent() {\n if (events.size() == 0) {\n return Optional.empty();\n }\n QueuedEvent nextEvent = events.get(0);\n for (QueuedEvent e : this.events) {\n if (e.getMsLeft() < nextEvent.getMsLeft()) {\n nextEvent = e;\n }\n }\n return Optional.of(nextEvent);\n }", "public static Time timeOf(Object obj) {\n if (obj instanceof Time)\n return (Time) obj;\n return null;\n }", "static void scheduleNextNotificationRefresh(Context context, AlarmManagerInterface manager,\n long alarmTime) {\n scheduleAlarmHelper(context, manager, alarmTime, true);\n }", "public TimeRef time() {\n if (this.ptr == Pointer.NULL) {\n throw new RuntimeException();\n }\n TimeRef result = new TimeRef(LiveSplitCoreNative.INSTANCE.SegmentHistoryElement_time(this.ptr));\n return result;\n }", "public long processNextEvent() {\r\n Runnable dequeue;\r\n ThreadSafeHeapNode threadSafeHeapNode;\r\n if (processUnconfinedEvent()) {\r\n return getNextTime();\r\n }\r\n DelayedTaskQueue delayedTaskQueue = (DelayedTaskQueue) this._delayed;\r\n if (delayedTaskQueue == null || delayedTaskQueue.isEmpty()) {\r\n dequeue = dequeue();\r\n if (dequeue != null) {\r\n dequeue.run();\r\n }\r\n return getNextTime();\r\n }\r\n TimeSource timeSource = TimeSourceKt.getTimeSource();\r\n long nanoTime = timeSource != null ? timeSource.nanoTime() : System.nanoTime();\r\n do {\r\n synchronized (delayedTaskQueue) {\r\n ThreadSafeHeapNode firstImpl = delayedTaskQueue.firstImpl();\r\n threadSafeHeapNode = null;\r\n if (firstImpl != null) {\r\n DelayedTask delayedTask = (DelayedTask) firstImpl;\r\n if (delayedTask.timeToExecute(nanoTime) ? enqueueImpl(delayedTask) : false) {\r\n threadSafeHeapNode = delayedTaskQueue.removeAtImpl(0);\r\n }\r\n }\r\n }\r\n } while (((DelayedTask) threadSafeHeapNode) != null);\r\n dequeue = dequeue();\r\n if (dequeue != null) {\r\n }\r\n return getNextTime();\r\n }", "int getUpdateTriggerTime();", "public static Wait until(Instant time)\r\n\t{\r\n\t\treturn new Wait(WaitTarget.withEndTime(time));\r\n\t}", "Optional<ZonedDateTime> lastExecution(final ZonedDateTime date);", "public Time getBestTime()\n\t{\n\t\treturn bestTime;\n\t}", "public Time getTime() {\n return this.time; // returns the time associated with the task\n }", "public org.landxml.schema.landXML11.GPSTime xgetStopTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.GPSTime target = null;\r\n target = (org.landxml.schema.landXML11.GPSTime)get_store().find_attribute_user(STOPTIME$24);\r\n return target;\r\n }\r\n }", "public EventTime getTime() {\n return this.time;\n }", "public static Date computeEndTimeToAllowParticularNumberOfFirings(OperableTrigger trigg, org.quartz.Calendar cal, \n int numTimes) {\n\n OperableTrigger t = (OperableTrigger) trigg.clone();\n\n if (t.getNextFireTime() == null) {\n t.computeFirstFireTime(cal);\n }\n \n int c = 0;\n Date endTime = null;\n \n for (int i = 0; i < numTimes; i++) {\n Date d = t.getNextFireTime();\n if (d != null) {\n c++;\n t.triggered(cal);\n if(c == numTimes)\n endTime = d;\n } else {\n break;\n }\n }\n \n if(endTime == null)\n return null;\n \n endTime = new Date(endTime.getTime() + 1000L);\n \n return endTime;\n }", "private long decideNextEndReset() {\n\t\tlong time = System.currentTimeMillis() + plugin.getEndResetPeriod() * 86400000;\n\t\t// Round to get the start of the next day in GMT, 5PM Pacific, 8PM Eastern,\n\t\t// when there are the most players on more-or-less\n\t\treturn (time / 86400000) * 86400000;\n\t}", "public boolean firedRecently(double time);", "private static Date wakeTime(){\n\t\t\n\t\t//doesn't work?\n\t\tSharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(ZeoData.getContext());\n\t\tint hours =Integer.getInteger(sharedPref.getString(SleepMonitorPreferences.PREF_WAKE_AFTER_HOURS,\"0\"), 0);\n\t\t\n\n\t\tCalendar cal=Calendar.getInstance();\n\t\tCalendar today=Calendar.getInstance();\n\t\t\n\t\tif (hours==0){\n\t\t\tlong alarmMillis =sharedPref.getLong(SleepMonitorPreferences.PREF_ALARM_TIME,0);\n\t\t\t\n\t\t\t//set the time (and date) from the preference\n\t\t\tcal.setTimeInMillis(alarmMillis);\n\t\t\t\n\t\t\t//override the date with today\n\t\t\t//inelegant, but the before midnight the alarm will just look like it is long past\n\t\t\t//\tthen in the morning it will be \"today\" and work.\n\t\t\tcal.set(Calendar.YEAR, today.get(Calendar.YEAR));\n\t\t\tcal.set(Calendar.MONTH, today.get(Calendar.MONTH));\n\t\t\tcal.set(Calendar.DAY_OF_MONTH, today.get(Calendar.DAY_OF_MONTH));\n\t\t\t\n\t\t\t//cal.set(2012, 7, 2, 7, 30);\n\t\t\t//cal.set(Calendar.HOUR_OF_DAY, 7);\n\t\t\t//cal.set(Calendar.MINUTE, 30);\n\t\n\t\t}else{\n\t\t\n\t\t\t//wake x hours after beginning of night (not actually same as beginning of sleep)\n\t\t\tint sleepEventID=ZeoData.mostRecentSleepEventID(0);\n\t\t\t//after sleeping for an hour\n\t\t\tif(ZeoData.epochCountBase()>120){\n\t\t\t\tlong start=ZeoData.startOfNight(sleepEventID);\n\t\t\t\t\n\t\t\t\tcal.setTimeInMillis(start);\n\t\t\t\t//add x hours to start of night\n\t\t\t\tcal.add(Calendar.HOUR, hours);\n\t\t\t}else{\n\t\t\t\t//before an hour's sleep, return impossible date\n\t\t\t\tcal.set(9999, 6, 27, 7, 30);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn cal.getTime();\n\t\t\n\t\t//SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(ZeoData.getContext());\n\t\t//return new Date(sharedPref.getLong(SleepMonitorPreferences.PREF_ALARM_TIME,0));\n\t\t\n\t}", "BusinessCenterTime getValuationTime();", "public int getEndTime()\n {\n if (isRepeated()) return end;\n else return time;\n }", "public TimeWrapper getTime() throws NoSuchElementException {\n return this.timeWrapper.get();\n }", "public org.apache.xmlbeans.XmlDateTime xgetRequestedTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlDateTime target = null;\n target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(REQUESTEDTIME$2, 0);\n return target;\n }\n }", "public int timeToNextEnemy(){\n if(mEnemyIndex < mEnemiesToSpawn.size()){\n return mTimeToSpawnEnemy.get(mEnemyIndex);\n } else {\n return -1;\n }\n }", "OffsetDateTime lastActionDateTime();", "public hr.client.appuser.CouponCenter.TimeRange getExchangeTime() {\n if (exchangeTimeBuilder_ == null) {\n return exchangeTime_ == null ? hr.client.appuser.CouponCenter.TimeRange.getDefaultInstance() : exchangeTime_;\n } else {\n return exchangeTimeBuilder_.getMessage();\n }\n }", "T getEventTime();", "Time getTime();", "public double getLastTime()\n\t{\n\t\tdouble time = Double.NaN;\n\t\tfinal Entry< Double, V > entry = getLastEntry();\n\t\tif( entry != null )\n\t\t{\n\t\t\ttime = entry.getKey();\n\t\t}\n\t\treturn time;\n\t}", "public void next( long time );", "public static long getTimeToNextLevel(final int skill, final int xpGainedPerHour) {\r\n\t\treturn getTimeToLevel(skill, Skills.getRealLevel(skill) + 1, xpGainedPerHour);\r\n\t}", "public void setTime(gov.ucore.ucore._2_0.TimeType time)\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.ucore.ucore._2_0.TimeType target = null;\n target = (gov.ucore.ucore._2_0.TimeType)get_store().find_element_user(TIME$2, 0);\n if (target == null)\n {\n target = (gov.ucore.ucore._2_0.TimeType)get_store().add_element_user(TIME$2);\n }\n target.set(time);\n }\n }", "Expression getReaction_time_parm();", "@Scheduled(fixedRate = 60_000)\n public void checkEventTime() {\n isTimeService.findAll().forEach(event -> {\n if (event.getSchedulledTime().isBefore(LocalDateTime.now())) {\n this.producer.sendReachTimeMessage(new IsTime(event.getMessageId()));\n this.isTimeService.deleteById(event.getSchedulledId());\n }\n });\n// log.info(\"Schedulled time check.\");\n }", "public LocalTime getLastTime(String token){\n\t\tfor(Session s : getSessionSet()){\n\t\t\tif(s.getToken().equals(token)){\n\t\t\t\treturn s.getLoginTime();\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn null;\n\t}", "public int getDelayTime(Node sender, int curTime) {\n\n\t\tif (this.delayType == IConstants.MSGDELAY_LOCAL_FIXED) {\t\n\t\t\tif (sender.equals(this.start)) {\n\t\t\t\tthis.lastestMsgTimeForStart = curTime + this.delaySeed;\t\t\t\t\n\t\t\t\treturn this.lastestMsgTimeForStart;\n\t\t\t\t\n\t\t\t} else if (sender.equals(this.end)) {\n\t\t\t\tthis.lastestMsgTimeForEnd = curTime + this.delaySeed;\n\t\t\t\treturn this.lastestMsgTimeForEnd;\n\t\t\t\t\n\t\t\t} else {\t\t\t\t\n\t\t\t\tString msg = \"Edge \" + this + \" does not contain sender node \" + sender;\n\t\t\t\tSystem.err.println(\"@Edge: \" + msg);\n\t\t\t\tthrow new RuntimeException(msg);\n\t\t\t}\n\t\n\t\t} else if (this.delayType == IConstants.MSGDELAY_LOCAL_RANDOM_UNIFORM) {\n\t\t\tint base = 0;\n\t\t\tif (sender.equals(this.start)) {\n\t\t\t\tif(this.lastestMsgTimeForStart > curTime){\n\t\t\t\t\tbase = this.lastestMsgTimeForStart;\n\t\t\t\t}else{\n\t\t\t\t\tbase = curTime;\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t} else if (sender.equals(this.end)) {\n\t\t\t\tif(this.lastestMsgTimeForEnd > curTime){\n\t\t\t\t\tbase = this.lastestMsgTimeForEnd;\n\t\t\t\t}else{\n\t\t\t\t\tbase = curTime;\n\t\t\t\t}\t\t\t\t\n\t\t\t} else {\t\t\t\t\n\t\t\t\tString msg = \"Edge \" + this + \" does not contain sender node \" + sender;\n\t\t\t\tSystem.err.println(\"@Edge: \" + msg);\n\t\t\t\tthrow new RuntimeException(msg);\n\t\t\t}\n\n\t\t\tIRandom r = Uniform.getInstance(System.currentTimeMillis());\n\t\t\tint t = 0;\t\t\t\t\t\t\n\t\t\tif (this.msgFlowType == IConstants.MSGFLOW_FIFO_TYPE) {\n\t\t\t\tt = r.nextInt(IConstants.MAX_RANDOM_RANGE) + base + 1;\n\t\t\t}else{\n\t\t\t\tt = r.nextInt(IConstants.MAX_RANDOM_RANGE) + curTime + 1;\n\t\t\t}\n\t\t\tif (sender.equals(this.start)) {\n\t\t\t\tthis.lastestMsgTimeForStart = t;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tthis.lastestMsgTimeForEnd = t;\n\t\t\t}\n\t\t\treturn t;\n\n\t\t} else if (this.delayType == IConstants.MSGDELAY_LOCAL_RANDOM_POISSON) {\n\t\t\tint base = 0;\n\t\t\tif (sender.equals(this.start)) {\n\t\t\t\tif(this.lastestMsgTimeForStart > curTime){\n\t\t\t\t\tbase = this.lastestMsgTimeForStart;\n\t\t\t\t}else{\n\t\t\t\t\tbase = curTime;\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t} else if (sender.equals(this.end)) {\n\t\t\t\tif(this.lastestMsgTimeForEnd > curTime){\n\t\t\t\t\tbase = this.lastestMsgTimeForEnd;\n\t\t\t\t}else{\n\t\t\t\t\tbase = curTime;\n\t\t\t\t}\t\t\t\t\n\t\t\t} else {\t\t\t\t\n\t\t\t\tString msg = \"Edge \" + this + \" does not contain sender node \" + sender;\n\t\t\t\tSystem.err.println(\"@Edge: \" + msg);\n\t\t\t\tthrow new RuntimeException(msg);\n\t\t\t}\n\n\t\t\tIRandom r = Poisson.getInstance(System.currentTimeMillis());\n\t\t\tint t = 0;\t\t\t\t\t\t\n\t\t\tif (this.msgFlowType == IConstants.MSGFLOW_FIFO_TYPE) {\n\t\t\t\tt = r.nextInt(IConstants.MAX_RANDOM_RANGE) + base + 1;\n\t\t\t}else{\n\t\t\t\tt = r.nextInt(IConstants.MAX_RANDOM_RANGE) + curTime + 1;\n\t\t\t}\n\t\t\tif (sender.equals(this.start)) {\n\t\t\t\tthis.lastestMsgTimeForStart = t;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tthis.lastestMsgTimeForEnd = t;\n\t\t\t}\n\t\t\treturn t;\n\t\t\t\n\t\t} else {\t\t\t\n\t\t\t//if (this.delayType == IConstants.MSGDELAY_LOCAL_RANDOM_CUSTOMS) {\n\t\t\t\n\t\t\tIRandom clientRandom = GraphFactory.getGraph(graphId).getClientRandom();\n\t\t\tif(clientRandom == null){\n\t\t\t\tString msg = \"You haven't set your custom random number generator!\";\n\t\t\t\tSystem.err.println(msg);\n\t\t\t\tthrow new RuntimeException(msg);\n\t\t\t\t\n\t\t\t} else{\n\t\t\t\tint base = 0;\n\t\t\t\tif (sender.equals(this.start)) {\n\t\t\t\t\tif(this.lastestMsgTimeForStart > curTime){\n\t\t\t\t\t\tbase = this.lastestMsgTimeForStart;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tbase = curTime;\n\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t} else if (sender.equals(this.end)) {\n\t\t\t\t\tif(this.lastestMsgTimeForEnd > curTime){\n\t\t\t\t\t\tbase = this.lastestMsgTimeForEnd;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tbase = curTime;\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t} else {\t\t\t\t\n\t\t\t\t\tString msg = \"Edge \" + this + \" does not contain sender node \" + sender;\n\t\t\t\t\tSystem.err.println(\"@Edge: \" + msg);\n\t\t\t\t\tthrow new RuntimeException(msg);\n\t\t\t\t}\n\n\t\t\t\tint t = 0;\t\t\t\t\t\t\n\t\t\t\tif (this.msgFlowType == IConstants.MSGFLOW_FIFO_TYPE) {\n\t\t\t\t\tt = clientRandom.nextInt(IConstants.MAX_RANDOM_RANGE) + base + 1;\n\t\t\t\t}else{\n\t\t\t\t\tt = clientRandom.nextInt(IConstants.MAX_RANDOM_RANGE) + curTime + 1;\n\t\t\t\t}\n\t\t\t\tif (sender.equals(this.start)) {\n\t\t\t\t\tthis.lastestMsgTimeForStart = t;\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tthis.lastestMsgTimeForEnd = t;\n\t\t\t\t}\n\t\t\t\treturn t;\n\t\t\t}\n\t\t}\n\n\t}", "@Override\n protected LocalDateTime CalculateNextFeedTime() {\n return LocalDateTime.now();\n }", "private com.google.protobuf.SingleFieldBuilder<\n hr.client.appuser.CouponCenter.TimeRange, hr.client.appuser.CouponCenter.TimeRange.Builder, hr.client.appuser.CouponCenter.TimeRangeOrBuilder> \n getExchangeTimeFieldBuilder() {\n if (exchangeTimeBuilder_ == null) {\n exchangeTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n hr.client.appuser.CouponCenter.TimeRange, hr.client.appuser.CouponCenter.TimeRange.Builder, hr.client.appuser.CouponCenter.TimeRangeOrBuilder>(\n getExchangeTime(),\n getParentForChildren(),\n isClean());\n exchangeTime_ = null;\n }\n return exchangeTimeBuilder_;\n }", "public io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder getDesiredTimeBuilder() {\n \n onChanged();\n return getDesiredTimeFieldBuilder().getBuilder();\n }", "private long getWaitTime() {\n long retVal = 1;\n long difference = System.currentTimeMillis() - myLastRefreshTime;\n if (difference < 75) {\n retVal = 75 - difference;\n }\n return (retVal);\n }", "Double getRemainingTime();", "@Override\n\tpublic Double getTimer() {\n\t\treturn null;\n\t}", "public static TimeOfTheDay getMatchingTimeOfTheDay(Calendar now){\n Calendar compareTime = Calendar.getInstance();\n compareTime.set(Calendar.YEAR, now.get(Calendar.YEAR));\n compareTime.set(Calendar.MONTH, now.get(Calendar.MONTH));\n compareTime.set(Calendar.DAY_OF_MONTH, now.get(Calendar.DAY_OF_MONTH));\n compareTime.set(Calendar.HOUR_OF_DAY, END_OF_NIGHT);\n compareTime.set(Calendar.MINUTE, 0);\n compareTime.set(Calendar.SECOND, 0);\n compareTime.set(Calendar.MILLISECOND, 0);\n\n // Is it night?\n if (now.before(compareTime)){\n return NIGHT;\n }\n\n // Then it might be Morning?\n compareTime.set(Calendar.HOUR_OF_DAY, END_OF_MORNING);\n if (now.before(compareTime)){\n return MORNING;\n }\n\n // Then it is midday?\n compareTime.set(Calendar.HOUR_OF_DAY, END_OF_MIDDAY);\n if (now.before(compareTime)){\n return MIDDAY;\n }\n\n //Then it is afternoon?\n compareTime.set(Calendar.HOUR_OF_DAY, END_OF_AFTERNOON);\n if (now.before(compareTime)){\n return AFTERNOON;\n }\n\n // Then it is evening?\n compareTime.set(Calendar.HOUR_OF_DAY, END_OF_EVENING);\n if (now.before(compareTime)){\n return EVENING;\n }\n\n //In this case it is really late!\n return NIGHT;\n }", "public hr.client.appuser.CouponCenter.TimeRange getExchangeTime() {\n return exchangeTime_ == null ? hr.client.appuser.CouponCenter.TimeRange.getDefaultInstance() : exchangeTime_;\n }", "public Date getNextChargeTime() {\n return nextChargeTime;\n }", "XMLGregorianCalendar getMovementEndTime();", "public long getPlayerTime ( ) {\n\t\treturn extract ( handle -> handle.getPlayerTime ( ) );\n\t}", "long getRetrievedTime();", "public int getTime()\n {\n if (isRepeated()) return start;\n else return time;\n }", "long getTimeUntilNextTransit(Coordinates coord, long time) throws AstrometryException;", "Timer getTimer();", "public org.landxml.schema.landXML11.GPSTime xgetStartTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.GPSTime target = null;\r\n target = (org.landxml.schema.landXML11.GPSTime)get_store().find_attribute_user(STARTTIME$22);\r\n return target;\r\n }\r\n }", "public static long getTimeToNextLevel(final int skill, final long runTime, final int xpGained) {\r\n\t\treturn getTimeToNextLevel(skill, Util.getPerHourValue(runTime, xpGained));\r\n\t}", "@CheckReturnValue\n public abstract long getTimeUntilReset();", "Optional<ZonedDateTime> nextExecution(final ZonedDateTime date);", "@javax.annotation.Nullable\n public Long getTime() {\n return time;\n }", "public void setPeekTime(int aTime);", "public void pickUpTimer()\r\n\t{\t\t\r\n\t\tSystem.out.println(timer.get());\r\n\t\tif(timer.get() < Config.Auto.timeIntakeOpen)\r\n\t\t{\r\n\t\t\t//claw.openClaw();\r\n\t\t\tSystem.out.println(\"in second if\");\r\n\t\t}\r\n\t\t\t\t\r\n\t\telse if(timer.get() < Config.Auto.timeElevatorStack)\r\n\t\t{\r\n\t\t\t//elevator.setLevel(elevatorLevel);\r\n\t\t\t//elevatorLevel++;\r\n\t\t}\r\n\t\t\r\n\t\telse if(timer.get() < Config.Auto.timeIntakeClose)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"in first if\");\r\n\t\t\t//claw.closeClaw();\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t\tendRoutine();\r\n\t}", "public TimeStep getTimeStep() {\n\t\t// Only here to ensure it is being used correctly.\n\t\t// cbit.util.Assertion.assertNotNull(fieldTimeStep);\n\t\treturn fieldTimeStep;\n\t}", "public Date getNextScheduledRun() {\n\t\tfinal Calendar cal = Calendar.getInstance();\n\t\tcal.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);\n\t\tcal.set(Calendar.HOUR_OF_DAY, 1);\n\t\tcal.set(Calendar.MINUTE, 0);\n\n\t\tif ( cal.before(Calendar.getInstance()) ){\n\t\t\tcal.add(Calendar.DATE, 7);\n\t\t}\n\t\treturn cal.getTime();\n\t\n\t}", "public double getFireTime() {\n\t\treturn fireTime;\n\t}", "public int getTimer() {\n return getOption(ArenaOption.TIMER);\n }", "boolean hasDesiredTime();", "private com.google.protobuf.SingleFieldBuilder<\n hr.client.appuser.CouponCenter.TimeRange, hr.client.appuser.CouponCenter.TimeRange.Builder, hr.client.appuser.CouponCenter.TimeRangeOrBuilder> \n getUseTimeFieldBuilder() {\n if (useTimeBuilder_ == null) {\n useTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n hr.client.appuser.CouponCenter.TimeRange, hr.client.appuser.CouponCenter.TimeRange.Builder, hr.client.appuser.CouponCenter.TimeRangeOrBuilder>(\n getUseTime(),\n getParentForChildren(),\n isClean());\n useTime_ = null;\n }\n return useTimeBuilder_;\n }", "private com.google.protobuf.SingleFieldBuilder<\n hr.client.appuser.CouponCenter.TimeRange, hr.client.appuser.CouponCenter.TimeRange.Builder, hr.client.appuser.CouponCenter.TimeRangeOrBuilder> \n getUseTimeFieldBuilder() {\n if (useTimeBuilder_ == null) {\n useTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n hr.client.appuser.CouponCenter.TimeRange, hr.client.appuser.CouponCenter.TimeRange.Builder, hr.client.appuser.CouponCenter.TimeRangeOrBuilder>(\n getUseTime(),\n getParentForChildren(),\n isClean());\n useTime_ = null;\n }\n return useTimeBuilder_;\n }", "java.lang.String getWaitTime();" ]
[ "0.6271457", "0.6049722", "0.59163564", "0.58150005", "0.5753085", "0.5701746", "0.5693483", "0.56664425", "0.55311126", "0.5391647", "0.52839506", "0.5274492", "0.51841956", "0.51705426", "0.51239574", "0.5094456", "0.5080782", "0.5070003", "0.50683063", "0.50550675", "0.5015854", "0.49939814", "0.49925905", "0.49646118", "0.49611437", "0.49336278", "0.49304184", "0.4929913", "0.4929408", "0.4925973", "0.4917766", "0.4909932", "0.4905352", "0.49044883", "0.49027085", "0.48931044", "0.48794934", "0.4878775", "0.48756957", "0.48631632", "0.4861332", "0.48461375", "0.48417354", "0.4816226", "0.4773863", "0.4762291", "0.47426298", "0.4735136", "0.4723099", "0.47202358", "0.47162136", "0.4705575", "0.4702003", "0.46800426", "0.46791553", "0.46739525", "0.466505", "0.46582365", "0.4643049", "0.46400878", "0.46149135", "0.46086434", "0.45974803", "0.4593588", "0.4585628", "0.4577038", "0.45728093", "0.4571785", "0.45694032", "0.45665586", "0.4559286", "0.45581126", "0.45580575", "0.45565656", "0.4552266", "0.4546533", "0.45446092", "0.45337552", "0.45313585", "0.4517766", "0.45158523", "0.45121935", "0.45077044", "0.45052853", "0.45045626", "0.45031834", "0.44996208", "0.4497126", "0.44953144", "0.449117", "0.4488769", "0.44887498", "0.44827384", "0.44756597", "0.44716266", "0.4469924", "0.44617742", "0.4453207", "0.4453207", "0.4450622" ]
0.6455401
0
Returns the last time at which the Trigger will fire, if the Trigger will repeat indefinitely, null will be returned. Note that the return time may be in the past.
public abstract Date getFinalFireTime();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long lastTime()\r\n/* 219: */ {\r\n/* 220:412 */ return this.lastTime.get();\r\n/* 221: */ }", "public double getLastTime()\n\t{\n\t\tdouble time = Double.NaN;\n\t\tfinal Entry< Double, V > entry = getLastEntry();\n\t\tif( entry != null )\n\t\t{\n\t\t\ttime = entry.getKey();\n\t\t}\n\t\treturn time;\n\t}", "public abstract Date getPreviousFireTime();", "public Long getLastEndTime() {\n if (timeInfos.isEmpty()) {\n return null;\n } else {\n int size = timeInfos.size();\n return timeInfos.get(size - 1).getEndTime();\n }\n }", "public long getNextTime() {\r\n if (super.getNextTime() == 0) {\r\n return 0;\r\n }\r\n Object obj = this._queue;\r\n if (obj != null) {\r\n if (obj instanceof LockFreeTaskQueueCore) {\r\n if (!((LockFreeTaskQueueCore) obj).isEmpty()) {\r\n return 0;\r\n }\r\n } else if (obj == EventLoop_commonKt.CLOSED_EMPTY) {\r\n return LongCompanionObject.MAX_VALUE;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n DelayedTaskQueue delayedTaskQueue = (DelayedTaskQueue) this._delayed;\r\n if (delayedTaskQueue != null) {\r\n DelayedTask delayedTask = (DelayedTask) delayedTaskQueue.peek();\r\n if (delayedTask != null) {\r\n long j = delayedTask.nanoTime;\r\n TimeSource timeSource = TimeSourceKt.getTimeSource();\r\n return RangesKt.coerceAtLeast(j - (timeSource != null ? timeSource.nanoTime() : System.nanoTime()), 0);\r\n }\r\n }\r\n return LongCompanionObject.MAX_VALUE;\r\n }", "public double getNextTime(){\n\t\tif(timeoutSet.peek() == null && eventSet.peek() == null) return Double.MAX_VALUE;\n\t\telse if(eventSet.peek() != null && timeoutSet.peek() != null) return Math.min(eventSet.peek().getTime(), timeoutSet.peek().getTime());\n\t\telse if(eventSet.peek() == null && timeoutSet.peek() != null) return timeoutSet.peek().getTime();\n\t\treturn eventSet.peek().getTime();\n\t}", "public long getMaxTime()\n {\n return times[times.length - 1];\n }", "public gov.ucore.ucore._2_0.TimeType getTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.ucore.ucore._2_0.TimeType target = null;\n target = (gov.ucore.ucore._2_0.TimeType)get_store().find_element_user(TIME$2, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "int getUpdateTriggerTime();", "public static long getLastResetTime() {\n return p().lastReset;\n }", "public abstract Date getNextFireTime();", "public int getUpdateTriggerTime() {\n return instance.getUpdateTriggerTime();\n }", "public long getRunLastMillis()\n {\n return 0L;\n }", "public Long getLastOnsetTime() {\n if (timeInfos.isEmpty()) {\n return null;\n } else {\n int size = timeInfos.size();\n return timeInfos.get(size - 1).getOnsetTime();\n }\n }", "public int getUpdateTriggerTime() {\n return updateTriggerTime_;\n }", "public IUTCTime getLastTime() {\n if (null == lastTime) {\n return new UTCTime(0);\n }\n return lastTime;\n }", "@CheckReturnValue\n public abstract long getTimeUntilReset();", "@Override\n\tpublic Double getTimer() {\n\t\treturn null;\n\t}", "@java.lang.Override\n public com.google.protobuf.Timestamp getLastRefreshTime() {\n return lastRefreshTime_ == null\n ? com.google.protobuf.Timestamp.getDefaultInstance()\n : lastRefreshTime_;\n }", "public long lastCumulativeTime()\r\n/* 234: */ {\r\n/* 235:434 */ return this.lastCumulativeTime;\r\n/* 236: */ }", "private com.google.protobuf.SingleFieldBuilderV3<\n com.google.protobuf.Timestamp,\n com.google.protobuf.Timestamp.Builder,\n com.google.protobuf.TimestampOrBuilder>\n getLastRefreshTimeFieldBuilder() {\n if (lastRefreshTimeBuilder_ == null) {\n lastRefreshTimeBuilder_ =\n new com.google.protobuf.SingleFieldBuilderV3<\n com.google.protobuf.Timestamp,\n com.google.protobuf.Timestamp.Builder,\n com.google.protobuf.TimestampOrBuilder>(\n getLastRefreshTime(), getParentForChildren(), isClean());\n lastRefreshTime_ = null;\n }\n return lastRefreshTimeBuilder_;\n }", "public synchronized long getTime() {\n return -1L;\n }", "public com.google.protobuf.Timestamp getLastRefreshTime() {\n if (lastRefreshTimeBuilder_ == null) {\n return lastRefreshTime_ == null\n ? com.google.protobuf.Timestamp.getDefaultInstance()\n : lastRefreshTime_;\n } else {\n return lastRefreshTimeBuilder_.getMessage();\n }\n }", "public Date getLastTime() {\n return lastTime;\n }", "Date getLastTime();", "protected long getLastMsTime() {\r\n return lastMsTime;\r\n }", "public interface TriggerContext {\n\n /**\n * Return the last <i>scheduled</i> execution time of the task, or.\n *\n * @return the date\n * {@code null} if not scheduled before.\n */\n Date lastScheduledExecutionTime();\n\n /**\n * Return the last <i>actual</i> execution time of the task, or {@code null}\n * if not scheduled before.\n *\n * @return the date\n */\n Date lastActualExecutionTime();\n\n /**\n * Return the last completion time of the task, or {@code null} if not\n * scheduled before.\n *\n * @return the date\n */\n Date lastCompletionTime();\n}", "public java.util.Date getLastExecuteTime()\n {\n return null;\n }", "public int getEndTime()\n {\n if (isRepeated()) return end;\n else return time;\n }", "public int getTime()\n {\n if (isRepeated()) return start;\n else return time;\n }", "public Time lastModifiedTime()\n\t{\n\t\tResource resource = getResource();\n\t\tif (resource instanceof IModifiable)\n\t\t{\n\t\t\treturn ((IModifiable)resource).lastModifiedTime();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "public Long getTime() {\n if (timeEnd == null) {\n return null;\n }\n return timeEnd - timeStart;\n }", "public long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}", "public ScheduledHarvest getLastOneTimeHarvest() {\n\n\t\treturn lastOneTimeHarvest;\n\n\t}", "public int getScopeTime()\n{\n // If scope time not explicitly set, get time prior to given time\n if(_scopeTime==null) {\n List <Integer> keyFrames = getKeyFrameTimes();\n int index = Collections.binarySearch(keyFrames, getTime());\n if(index<0) index = -index - 2; else index--;\n return index>=0? keyFrames.get(index) : 0;\n }\n \n // Return scope time\n return _scopeTime;\n}", "public double getFireTime() {\n\t\treturn fireTime;\n\t}", "public Long getLastRunDuration();", "public TimeValue getMaxTaskWaitTime() {\n final var oldestTaskTimeMillis = allBatchesStream().mapToLong(Batch::getCreationTimeMillis).min().orElse(Long.MAX_VALUE);\n\n if (oldestTaskTimeMillis == Long.MAX_VALUE) {\n return TimeValue.ZERO;\n }\n\n return TimeValue.timeValueMillis(threadPool.relativeTimeInMillis() - oldestTaskTimeMillis);\n }", "private long getNow()\n {\n // no need to convert to collection if had an Iterables.max(), but not present in standard toolkit, and not worth adding\n List<SSTableReader> list = new ArrayList<>();\n Iterables.addAll(list, cfs.getSSTables(SSTableSet.LIVE));\n if (list.isEmpty())\n return 0;\n return Collections.max(list, (o1, o2) -> Long.compare(o1.getMaxTimestamp(), o2.getMaxTimestamp()))\n .getMaxTimestamp();\n }", "public long getLastPlayed ( ) {\n\t\treturn extract ( handle -> handle.getLastPlayed ( ) );\n\t}", "double getFullTime();", "public org.landxml.schema.landXML11.GPSTime xgetStopTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.GPSTime target = null;\r\n target = (org.landxml.schema.landXML11.GPSTime)get_store().find_attribute_user(STOPTIME$24);\r\n return target;\r\n }\r\n }", "private long getWaitTime() {\n long retVal = 1;\n long difference = System.currentTimeMillis() - myLastRefreshTime;\n if (difference < 75) {\n retVal = 75 - difference;\n }\n return (retVal);\n }", "public TimeRef time() {\n if (this.ptr == Pointer.NULL) {\n throw new RuntimeException();\n }\n TimeRef result = new TimeRef(LiveSplitCoreNative.INSTANCE.SegmentHistoryElement_time(this.ptr));\n return result;\n }", "public long getEventTime();", "public Long getTimeLapsed() {\r\n\t\tif(moodTimestamp == null) \r\n\t\t\treturn null;\r\n\t\telse \r\n\t\t\treturn ((System.currentTimeMillis()/1000) - moodTimestamp.longValue());\r\n\t}", "ZonedDateTime lastRefTimestamp() {\n ArticleRef last = buffer.peekLast();\n if(last == null) {\n return null;\n }\n return last.getTimestamp();\n }", "public Long getMaxDelayTime() {\n return this.MaxDelayTime;\n }", "public int getEventTime() {\n\t\treturn scheduledTime;\n\t}", "@Override\r\n\tpublic long getTime() {\n\t\treturn this.time;\r\n\t}", "public long getLastAttackTime() {\r\n\t\treturn lastAttackTime;\r\n\t}", "public Timestamp getLastLogintime() {\n return lastLogintime;\n }", "public long getTimerTime() {\n return timerTime;\n }", "public static long getTime() {\n\t\treturn (Sys.getTime() * 1000) / Sys.getTimerResolution();\n\t}", "@Override\n\tpublic long currentTimeMillis() {\n\t\treturn this.currentTime;\n\t}", "public long getDelayTime() {\n return (long) this.DELAY_TIME;\n }", "public long getLastTimePlayed()\n {\n return lastTimePlayed;\n }", "public org.landxml.schema.landXML11.GPSTime xgetStartTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.GPSTime target = null;\r\n target = (org.landxml.schema.landXML11.GPSTime)get_store().find_attribute_user(STARTTIME$22);\r\n return target;\r\n }\r\n }", "public long getLastTouchMillis()\n {\n return m_dtLastUse;\n }", "public double getTimeDelayActivation() {\r\n\t\tif (activation_count > 1) return last_activation;\r\n\t\telse return 0.0;\r\n\t}", "public int getStartTime()\n {\n if (isRepeated()) return start;\n else return time;\n }", "@Override\n public DateTime getMaxIngestedEventTime()\n {\n return getMaxTime();\n }", "Optional<Instant> startTime();", "public Production getLastProductionFired () { return lastFiredInst.getProduction(); }", "@javax.annotation.Nullable\n public Long getTime() {\n return time;\n }", "public long getLastCheckTimeMillis() {\n return this.lastCheckTimeMillis;\n }", "public int getTimer() {\n return getOption(ArenaOption.TIMER);\n }", "public abstract Date getFireTimeAfter(Date afterTime);", "int getChronicDelayTime();", "public long getExpirationTime()\n {\n return this.m_eventExpirationTime;\n }", "public double getFullTime() {\n return fullTime_;\n }", "T getEventTime();", "public Rational getEndTime ()\r\n {\r\n if (isWholeDuration()) {\r\n return null;\r\n }\r\n\r\n Rational chordDur = getDuration();\r\n\r\n if (chordDur == null) {\r\n return null;\r\n } else {\r\n return startTime.plus(chordDur);\r\n }\r\n }", "public Long getConditionLastEndTime(String condition) {\n if (onsetConditions.containsKey(condition)) {\n return onsetConditions.get(condition).getLastEndTime();\n }\n return null;\n }", "public Date getNextExecutionTime() {\n\t\treturn SchedulerUtil.getNextExecution(this);\n\t}", "public long getTimeOfLastValuesChanged();", "public double getFullTime() {\n return fullTime_;\n }", "public int getMaxFireTicks ( ) {\n\t\treturn invokeSafe ( \"getMaxFireTicks\" );\n\t}", "public com.walgreens.rxit.ch.cda.TS getBirthTime()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.TS target = null;\n target = (com.walgreens.rxit.ch.cda.TS)get_store().find_element_user(BIRTHTIME$12, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public long getLastUpdateTime() {\n return this.lastUpdateTime;\n }", "@Override\n\tpublic long getTime() {\n\t\treturn System.nanoTime() - startTime;\n\t}", "public long getLastCallEndTimestamp() {\n if (!mCallRecords.isEmpty()) {\n return mCallRecords.get(0).getCallEndTimestamp();\n }\n return -1;\n }", "@Override\r\n\tpublic E pollLast() {\n\t\treturn null;\r\n\t}", "public EventTime getTime() {\n return this.time;\n }", "public long getPlayerTime ( ) {\n\t\treturn extract ( handle -> handle.getPlayerTime ( ) );\n\t}", "public Instant getLastCompletion() {\n\t\treturn Last;\n\t}", "public long getLastUpdateTime() {\n return lastUpdateTime;\n }", "public long getTime() {\r\n\t\treturn time;\r\n\t}", "public io.opencannabis.schema.temporal.TemporalInstant.Instant getDesiredTime() {\n if (desiredTimeBuilder_ == null) {\n return desiredTime_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : desiredTime_;\n } else {\n return desiredTimeBuilder_.getMessage();\n }\n }", "long getRetrievedTime();", "public Integer getMaxTime() {\n return maxTime;\n }", "public float getCurrentTime () {\n\t\treturn timer;\n\t}", "public int getMaxTime() { return _maxTime; }", "public static long now() {\n return System.nanoTime();\n }", "public long getLastMoveTime() {\r\n\t\treturn lastMoveTime;\r\n\t}", "@SuppressWarnings(\"unused\")\n public Date getLastUpdateTime() {\n final LocationClient locationClient = getLocationClient();\n return locationClient == null ? null: locationClient.getLastUpdateTime();\n }", "public long getSimTime() {\n\t return now;\n\t}", "public Long getDelaytime() {\n return delaytime;\n }", "public Time getTime() {\n return this.time; // returns the time associated with the task\n }", "public long getTime() {\n return timeMillis;\n }" ]
[ "0.6925157", "0.678661", "0.66117406", "0.6522349", "0.6505575", "0.6487196", "0.64124465", "0.63961816", "0.63946897", "0.63525194", "0.633567", "0.6286013", "0.6280388", "0.62648743", "0.623932", "0.6216139", "0.6188523", "0.6143847", "0.61407787", "0.6124703", "0.60780346", "0.6046397", "0.6042268", "0.60383785", "0.60280526", "0.59944606", "0.59869814", "0.59810424", "0.59790283", "0.59583694", "0.5914879", "0.58992535", "0.58688414", "0.5847109", "0.58395755", "0.58361876", "0.5834071", "0.5826152", "0.58181053", "0.5817866", "0.58171433", "0.58124924", "0.58101255", "0.5803923", "0.5793669", "0.5771546", "0.57644254", "0.57611847", "0.5755996", "0.5730707", "0.57059985", "0.57016146", "0.5697836", "0.5674236", "0.5670679", "0.5669716", "0.5667865", "0.5667341", "0.5651158", "0.5643593", "0.56427693", "0.5634091", "0.5625993", "0.56242454", "0.5622875", "0.561616", "0.56137884", "0.5608782", "0.5604491", "0.5603814", "0.5603532", "0.5601913", "0.55901366", "0.5573188", "0.5569041", "0.5564842", "0.5561859", "0.55538243", "0.5550899", "0.55490977", "0.5546887", "0.55429083", "0.554128", "0.55391985", "0.5537529", "0.55313843", "0.5530924", "0.5526208", "0.5520885", "0.5520735", "0.55189013", "0.5518331", "0.5517642", "0.55151725", "0.5513979", "0.55108315", "0.5500964", "0.54994833", "0.54994535", "0.54868233" ]
0.64589334
6
Set the instruction the Scheduler should be given for handling misfire situations for this Trigger the concrete Trigger type that you are using will have defined a set of additional MISFIRE_INSTRUCTION_XXX constants that may be passed to this method. If not explicitly set, the default value is MISFIRE_INSTRUCTION_SMART_POLICY.
public void setMisfireInstruction(int misfireInstruction) { if (!validateMisfireInstruction(misfireInstruction)) { throw new IllegalArgumentException( "The misfire instruction code is invalid for this type of trigger."); } this.misfireInstruction = misfireInstruction; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getMisfireInstruction() {\n return misfireInstruction;\n }", "public void setInstruction(Instruction instruction) {\n this.instruction = instruction;\n }", "public void setInstruction(String instruction)\n\t\t{\n\t\t\tif(instruction == null)\n\t\t\t{\n\t\t\t\tinstruction = \"\";\n\t\t\t}\n\n\t\t\tm_instruction = instruction.trim();\n\t\t}", "public void setSpecialInstruction(String specialInstruction) {\n this.specialInstruction = specialInstruction;\n }", "public void setInstructionDate(String instructionDate) {\r\n\r\n\t\ttry {\r\n\r\n\t\t\tthis.instructionDate = this.sdf.parse(instructionDate);\r\n\r\n\t\t} catch (ParseException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public String getInstruction(){\n\t\treturn this.instruction;\n\t}", "public String getInstruction()\n\t\t{\n\t\t\treturn m_instruction;\n\t\t}", "public void setIntelligenceRule(IntelligenceRule IntelligenceRule) {\n this.IntelligenceRule = IntelligenceRule;\n }", "public void setValue(Instruction val) {\n this.val = checkNotNull(val, \"val\");\n }", "public void setDanglingInstruction(DanglingInstruction i) {\n dangling = i;\n }", "public void setInstruction(String ins)\n\t{\n\t\tgetJLabel().setText(ins);\n\t}", "protected void addInstruction(final CPU6502Instruction instruction) {\r\n if (this.instructions[instruction.opCode] != null) {\r\n throw new RuntimeException(\"Instruction \" + instruction.opCode + \" already defined!\");\r\n } else {\r\n this.instructions[instruction.opCode] = instruction;\r\n }\r\n }", "protected void emulateExtendedInstruction(final CPU6502Instruction instruction) {\r\n if (null != getLogger()) {\r\n getLogger().warning(\"Not implemented instruction at $\" + Integer.toHexString(this.currentInstructionAddress) + \": $\" + Integer.toHexString(this.memory[this.currentInstructionAddress] & 0xff));\r\n }\r\n try {\r\n Thread.sleep(100);\r\n } catch (Exception e) {\r\n }\r\n }", "public void setImsi(String imsi) {\r\n this.imsi = imsi == null ? null : imsi.trim();\r\n }", "public Instruction getInstruction() {\n return this.instruction;\n }", "public abstract void setTriggerOrAction();", "public void setInstructions(String instructions) {\n this.instructions = instructions;\n }", "public void setImmatriculation(java.lang.String immatriculation) {\n this.immatriculation = immatriculation;\n }", "public String getSpecialInstruction() {\n return specialInstruction;\n }", "public void setImmunizationInj (java.lang.String immunizationInj) {\n\t\tthis.immunizationInj = immunizationInj;\n\t}", "void setDefeatCondition(String conditionIdentifier);", "public void setImmagine(String immagine) {\n\t\tthis.setImmagine(new File (immagine));\n\t}", "public void SetJobInstructions(String[] instructionInfo) {\r\n Instruction instruction = new Instruction(Integer.parseInt(instructionInfo[0]),\r\n Integer.parseInt(instructionInfo[1]), Integer.parseInt(instructionInfo[2]), Short.parseShort(instructionInfo[3]));\r\n this.instructions.add(instruction);\r\n }", "public void setNmi(int nmi){\n this.nmi=nmi;\n }", "public void setIpmiSupported(java.lang.Boolean ipmiSupported) {\r\n this.ipmiSupported = ipmiSupported;\r\n }", "@Property(\"triggerAction\")\n void setTriggerAction(String triggerAction);", "public void setHandThrowDamage(short handThrowDamage);", "public void setExpression(com.vmware.converter.AlarmExpression expression) {\r\n this.expression = expression;\r\n }", "public void setPower(int i)\n {\n this.powerOfIi = i;\n }", "public void setInstructionFile(String s)\r\n \t{\r\n \t\tm_sInsFileName = s;\r\n \t}", "String getInstruction();", "public void setIsmtransitionCareflowstepCode(\n\t\t\tString ismtransitionCareflowstepCode) {\n\t\tthis.ismtransitionCareflowstepCode = ismtransitionCareflowstepCode == null ? null\n\t\t\t\t: ismtransitionCareflowstepCode.trim();\n\t}", "public SetFinshMarkFromMes(final String multiplier) {\r\n this.multiplier =multiplier;\r\n }", "public void setSmenicon(String smenicon) {\n this.smenicon = smenicon == null ? null : smenicon.trim();\n }", "@Override\n public boolean isInstruction() {\n return true;\n }", "void setMedlineSi(gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi medlineSi);", "protected void emulateInstruction(final CPU6502Instruction instruction) {\r\n switch (instruction.opGroup) {\r\n // official instructions\r\n case ADC:\r\n operationADC(getOperand(instruction) & 0xff);\r\n break;\r\n\r\n case AND:\r\n operationAND(getOperand(instruction) & 0xff);\r\n break;\r\n\r\n case ASL:\r\n if (instruction.addressMode == CPU6502Instruction.ACCUMULATOR) {\r\n this.carryFlag = this.ac >= 0x80;\r\n this.ac = (this.ac << 1) & 0xff;\r\n this.zeroFlag = this.ac == 0;\r\n this.signFlag = this.ac >= 0x80;\r\n } else {\r\n operationASL(getOperandAddress(instruction));\r\n }\r\n break;\r\n\r\n case BCC:\r\n if (!this.carryFlag) {\r\n setPC(getOperandAddress(instruction));\r\n }\r\n break;\r\n\r\n case BCS:\r\n if (this.carryFlag) {\r\n setPC(getOperandAddress(instruction));\r\n }\r\n break;\r\n\r\n case BEQ:\r\n if (this.zeroFlag) {\r\n setPC(getOperandAddress(instruction));\r\n }\r\n break;\r\n\r\n case BIT:\r\n operationBIT(getOperand(instruction) & 0xff);\r\n break;\r\n\r\n case BMI:\r\n if (this.signFlag) {\r\n setPC(getOperandAddress(instruction));\r\n }\r\n break;\r\n\r\n case BNE:\r\n if (!this.zeroFlag) {\r\n setPC(getOperandAddress(instruction));\r\n }\r\n break;\r\n\r\n case BPL:\r\n if (!this.signFlag) {\r\n setPC(getOperandAddress(instruction));\r\n }\r\n break;\r\n\r\n case BRK:\r\n // break is followed by another byte\r\n addPC(1);\r\n serviceInterrupt(0xfffe);\r\n this.breakFlag = true;\r\n break;\r\n\r\n case BVC:\r\n if (!this.overflowFlag) {\r\n setPC(getOperandAddress(instruction));\r\n }\r\n break;\r\n\r\n case BVS:\r\n if (this.overflowFlag) {\r\n setPC(getOperandAddress(instruction));\r\n }\r\n break;\r\n\r\n case CLC:\r\n this.carryFlag = false;\r\n break;\r\n\r\n case CLV:\r\n this.overflowFlag = false;\r\n break;\r\n\r\n case CLD:\r\n this.decimalFlag = false;\r\n break;\r\n\r\n case CLI:\r\n this.interruptFlag = false;\r\n this.isCheckInterrupt = true;\r\n break;\r\n\r\n case CMP:\r\n operationCMP(getOperand(instruction) & 0xff);\r\n break;\r\n\r\n case CPX:\r\n operationCPX(getOperand(instruction) & 0xff);\r\n break;\r\n\r\n case CPY:\r\n operationCPY(getOperand(instruction) & 0xff);\r\n break;\r\n\r\n case DEC:\r\n operationDEC(getOperandAddress(instruction));\r\n break;\r\n\r\n case DEX:\r\n --this.x;\r\n this.x &= 0xff;\r\n this.zeroFlag = this.x == 0;\r\n this.signFlag = this.x >= 0x80;\r\n break;\r\n\r\n case DEY:\r\n --this.y;\r\n this.y &= 0xff;\r\n this.zeroFlag = this.y == 0;\r\n this.signFlag = this.y >= 0x80;\r\n break;\r\n\r\n case EOR:\r\n operationEOR(getOperand(instruction) & 0xff);\r\n break;\r\n\r\n case INC:\r\n operationINC(getOperandAddress(instruction));\r\n break;\r\n\r\n case INX:\r\n ++this.x;\r\n this.x &= 0xff;\r\n this.zeroFlag = this.x == 0;\r\n this.signFlag = this.x >= 0x80;\r\n break;\r\n\r\n case INY:\r\n ++this.y;\r\n this.y &= 0xff;\r\n this.zeroFlag = this.y == 0;\r\n this.signFlag = this.y >= 0x80;\r\n break;\r\n\r\n case JMP:\r\n setPC(getOperandAddress(instruction));\r\n break;\r\n\r\n case JSR:\r\n operationJSR(getOperandAddress(instruction));\r\n break;\r\n\r\n case LDA:\r\n this.ac = getOperand(instruction) & 0xff;\r\n this.zeroFlag = this.ac == 0;\r\n this.signFlag = this.ac >= 0x80;\r\n break;\r\n\r\n case LDX:\r\n this.x = getOperand(instruction) & 0xff;\r\n this.zeroFlag = this.x == 0;\r\n this.signFlag = this.x >= 0x80;\r\n break;\r\n\r\n case LDY:\r\n this.y = getOperand(instruction) & 0xff;\r\n this.zeroFlag = this.y == 0;\r\n this.signFlag = this.y >= 0x80;\r\n break;\r\n\r\n case LSR:\r\n if (instruction.addressMode == CPU6502Instruction.ACCUMULATOR) {\r\n operationLSRAccumulator();\r\n } else {\r\n operationLSR(getOperandAddress(instruction));\r\n }\r\n break;\r\n\r\n case NOP:\r\n break;\r\n\r\n case ORA:\r\n operationORA(getOperand(instruction) & 0xff);\r\n break;\r\n\r\n case PHA:\r\n push((byte)this.ac);\r\n break;\r\n\r\n case PHP:\r\n this.breakFlag = true;\r\n push((byte) getStatusByte());\r\n this.breakFlag = false;\r\n break;\r\n\r\n case PLA:\r\n this.ac = pop() & 0xff;\r\n this.zeroFlag = this.ac == 0;\r\n this.signFlag = this.ac >= 0x80;\r\n break;\r\n\r\n case PLP:\r\n setStatusByte(pop() & 0xff);\r\n this.breakFlag = false;\r\n this.isCheckInterrupt = true;\r\n break;\r\n\r\n case RTS:\r\n setPC((pop() & 0xff) + ((pop() & 0xff) << 8) + 1);\r\n break;\r\n\r\n case RTI:\r\n setStatusByte(pop() & 0xff);\r\n setPC((pop() & 0xff) + ((pop() & 0xff) << 8));\r\n this.breakFlag = false;\r\n this.isCheckInterrupt = true;\r\n break;\r\n\r\n case ROL:\r\n if (instruction.addressMode == CPU6502Instruction.ACCUMULATOR) {\r\n this.ac = operationROL((byte)this.ac) & 0xff;\r\n } else {\r\n operationROL(getOperandAddress(instruction));\r\n }\r\n break;\r\n\r\n case ROR:\r\n if (instruction.addressMode == CPU6502Instruction.ACCUMULATOR) {\r\n this.ac = operationROR((byte)this.ac) & 0xff;\r\n } else {\r\n operationROR(getOperandAddress(instruction));\r\n }\r\n break;\r\n\r\n case SBC:\r\n operationSBC(getOperand(instruction) & 0xff);\r\n break;\r\n\r\n case SEC:\r\n this.carryFlag = true;\r\n break;\r\n\r\n case SED:\r\n this.decimalFlag = true;\r\n break;\r\n\r\n case SEI:\r\n this.interruptFlag = true;\r\n break;\r\n\r\n case STA:\r\n writeByte(getOperandAddress(instruction), (byte)this.ac);\r\n break;\r\n\r\n case STX:\r\n writeByte(getOperandAddress(instruction), (byte)this.x);\r\n break;\r\n\r\n case STY:\r\n writeByte(getOperandAddress(instruction), (byte)this.y);\r\n break;\r\n\r\n case TSX:\r\n this.x = this.sp & 0xff;\r\n this.zeroFlag = this.x == 0;\r\n this.signFlag = this.x >= 0x80;\r\n break;\r\n\r\n case TXS:\r\n this.sp = this.x;\r\n break;\r\n\r\n case TXA:\r\n this.ac = this.x;\r\n this.zeroFlag = this.ac == 0;\r\n this.signFlag = this.ac >= 0x80;\r\n break;\r\n\r\n case TAX:\r\n this.x = this.ac;\r\n this.zeroFlag = this.x == 0;\r\n this.signFlag = this.x >= 0x80;\r\n break;\r\n\r\n case TYA:\r\n this.ac = this.y;\r\n this.zeroFlag = this.ac == 0;\r\n this.signFlag = this.ac >= 0x80;\r\n break;\r\n\r\n case TAY:\r\n this.y = this.ac;\r\n this.zeroFlag = this.y == 0;\r\n this.signFlag = this.y >= 0x80;\r\n break;\r\n\r\n // undocumented instructions\r\n // ALR = AND + LSR\r\n case ALR:\r\n operationAND(getOperand(instruction) & 0xff);\r\n operationLSRAccumulator();\r\n break;\r\n\r\n // ANC ANDs the contents of the A register with an immediate value and then \r\n // moves bit 7 of A into the Carry flag. \r\n case ANC:\r\n operationAND(getOperand(instruction) & 0xff);\r\n this.carryFlag = (this.ac & 0x80) != 0;\r\n break;\r\n\r\n // ARR = AND + ROR\r\n case ARR:\r\n operationAND(getOperand(instruction) & 0xff);\r\n this.ac = operationROR((byte)this.ac);\r\n break;\r\n\r\n // ASO = ASL + ORA\r\n case ASO: {\r\n final int address = getOperandAddress(instruction);\r\n\r\n operationASL(address);\r\n operationORA(readByte(address) & 0xff);\r\n break;\r\n }\r\n\r\n // AXA stores the result of A AND X AND the high byte of the target \r\n // address of the operand +1 in memory.\r\n case AXA: {\r\n final int adr2 = getOperandAddress(instruction);\r\n\r\n writeByte(adr2, (byte) (this.ac & this.x & ((adr2 >> 8) + 1)));\r\n break;\r\n }\r\n\r\n // AXS\r\n case AXS:\r\n writeByte(getOperandAddress(instruction), (byte) (this.ac & this.x));\r\n break;\r\n\r\n // DCM = DEC + CMP\r\n case DCM: {\r\n final int address = getOperandAddress(instruction);\r\n\r\n operationDEC(address);\r\n operationCMP(readByte(address) & 0xff);\r\n break;\r\n }\r\n\r\n // INS = INC + SBC\r\n case INS: {\r\n final int address = getOperandAddress(instruction);\r\n\r\n operationINC(address);\r\n operationSBC(readByte(address) & 0xff);\r\n break;\r\n }\r\n\r\n // LAS is not implemented\r\n case LAS:\r\n if (null != getLogger()) {\r\n getLogger().warning(\"Not implemented instruction at $\" + Integer.toHexString(this.currentInstructionAddress) + \": $\" + Integer.toHexString(this.memory[this.currentInstructionAddress] & 0xff));\r\n }\r\n break;\r\n\r\n // LAX = LDA + LDX\r\n case LAX:\r\n this.ac = getOperand(instruction) & 0xff;\r\n operationLDX(this.ac);\r\n break;\r\n\r\n // LSE = LSR + EOR\r\n case LSE: {\r\n final int address = getOperandAddress(instruction);\r\n\r\n operationLSR(address);\r\n operationEOR(readByte(address) & 0xff);\r\n break;\r\n }\r\n\r\n // OAL = ORA #ee + AND + TAX\r\n case OAL: {\r\n this.ac |= 0xee;\r\n this.ac &= (getOperand(instruction) & 0xff);\r\n this.x = this.ac;\r\n this.zeroFlag = this.ac == 0;\r\n this.signFlag = this.ac >= 0x80;\r\n break;\r\n }\r\n\r\n // RLA = ROL + AND\r\n case RLA: {\r\n final int address = getOperandAddress(instruction);\r\n\r\n operationROL(address);\r\n operationAND(readByte(address) & 0xff);\r\n break;\r\n }\r\n\r\n // RRA = ROR + ADC\r\n case RRA: {\r\n final int address = getOperandAddress(instruction);\r\n\r\n operationROR(address);\r\n operationADC(readByte(address) & 0xff);\r\n break;\r\n }\r\n\r\n // SAX ANDs the contents of the A and X registers (leaving the contents of A \r\n // intact), subtracts an immediate value, and then stores the result in X.\r\n case SAX: {\r\n this.x = (this.ac & this.x) - (getOperand(instruction) & 0xff);\r\n this.carryFlag = x >= 0;\r\n this.x &= 0xff;\r\n this.zeroFlag = this.x == 0;\r\n this.signFlag = this.x >= 0x80;\r\n break;\r\n }\r\n\r\n // SAY ANDs the contents of the Y register with and stores the \r\n // result in memory.\r\n case SAY: {\r\n final int oldAc = this.ac;\r\n\r\n this.ac = this.y;\r\n operationAND(readByte(0x78) & 0xff);\r\n writeByte(getOperandAddress(instruction), (byte)this.ac);\r\n this.ac = oldAc;\r\n break;\r\n }\r\n\r\n // SKB = skip byte\r\n case SKB:\r\n getOperand(instruction);\r\n break;\r\n\r\n // SKW = skip word\r\n case SKW:\r\n getOperand(instruction);\r\n if (instruction.addressMode == CPU6502Instruction.INDIRECT_X) {\r\n addPC(1);\r\n }\r\n break;\r\n\r\n // TAS ANDs the contents of the A and X registers (without changing \r\n // the contents of either register) and transfers the result to the stack \r\n // pointer. It then ANDs that result with the contents of the high byte of \r\n // the target address of the operand +1 and stores that final result in \r\n // memory.\r\n case TAS: {\r\n final int address = getOperandAddress(instruction);\r\n\r\n this.sp = this.ac & this.x;\r\n writeByte(address, (byte) (this.sp & ((address >> 8) + 1)));\r\n break;\r\n }\r\n\r\n // XAA = TXA + AND\r\n case XAA:\r\n this.ac = (readByte(this.pc - 1) & 0xff) & this.x & (this.ac | 0xee);\r\n this.zeroFlag = this.ac == 0;\r\n this.signFlag = this.ac >= 0x80;\r\n break;\r\n\r\n // XAS ANDs the contents of the X register with and stores the \r\n // result in memory\r\n case XAS: {\r\n final int oldAc = this.ac;\r\n\r\n this.ac = this.x;\r\n operationAND(readByte(0x65) & 0xff);\r\n writeByte(getOperandAddress(instruction), (byte)this.ac);\r\n this.ac = oldAc;\r\n break;\r\n }\r\n\r\n default:\r\n // try the extended instructions\r\n emulateExtendedInstruction(instruction);\r\n }\r\n }", "void notifyReject(final TradeInstruction instruction);", "public MyMemory(){\n super();\n this.instruction = new Instruction(); //Only the IR register will use this attribute\n }", "public void setTrigger(Trigger trigger) {\n \t\tthis.trigger = trigger;\n \t\tif (this.trigger == null)\n \t\t\tthis.trigger = Trigger.NONE;\n \t}", "public void addRemediationInstruction(String xml) {\n }", "public void mo3805e(int i) {\n this.f1470as = i;\n }", "public final void setNMI(final IOChip ioChip, final boolean state) {\r\n if (setSignal(this.nmis, ioChip, state)) {\r\n final boolean setNMI = !this.irqs.isEmpty();\r\n\r\n if (!this.isNMILow && setNMI) {\r\n this.isCheckInterrupt = true;\r\n }\r\n this.isNMILow = setNMI;\r\n }\r\n }", "@IcalProperty(pindex = PropertyInfoIndex.SCHEDULE_METHOD,\n jname = \"scheduleMethod\",\n eventProperty = true,\n todoProperty = true)\n public void setScheduleMethod(final int val) {\n scheduleMethod = val;\n }", "public void setIspBotRule(BotManagedRule IspBotRule) {\n this.IspBotRule = IspBotRule;\n }", "public boolean isInstruction() {\r\n return true;\r\n }", "void\t\tsetCommandSensitivity(String command, boolean flag);", "protected void set_iflag(boolean RHS) { set_sreg(Utils.setbit(7,RHS, get_sreg())); }", "@Override\n\tpublic void execute(String instruction, Registers registers, MCU mcu) throws MachineFaultException {\n\t\tfr = StringUtil.binaryToDecimal(instruction.substring(6, 8));\n\t\tix = StringUtil.binaryToDecimal(instruction.substring(9, 11));\n\t\ti = StringUtil.binaryToDecimal(instruction.substring(8, 9));\n\t\taddress = StringUtil.binaryToDecimal(instruction.substring(11, 16));\n\t\tint effectiveAddress = EffectiveAddress.calculateEA(ix, address, i, mcu, registers);\n\t\t\n\t\tString exp=\"0000000\";\n\t String man=\"00000000\";\n\t \n\t\tregisters.setMAR(effectiveAddress);\n\t\tregisters.setMBR(mcu.fetchFromCache(registers.getMAR()));\n\t\tint expI=registers.getMBR();\n\t\tregisters.setMAR(effectiveAddress+1);\n\t\tregisters.setMBR(mcu.fetchFromCache(registers.getMAR()));\n\t\tint manI=registers.getMBR();\n\n\t\t\n\n\t\tString temp=Integer.toString(expI);\n\t\texp=exp.substring(0,7-temp.length())+temp;\n\t\tString temp1=Integer.toString(manI);\n\t\tman=temp1+man.substring(temp1.length());\n\n\t\t\n\n\t\t\n\t\tString frs=exp+man;\n\t\t\n\t\tregisters.setFRByNum(fr, Integer.parseInt(frs,2));\n\t\t\n\t\tregisters.increasePCByOne();\n\t}", "protected void onChange_InfectionRisk() {\n onChange_InfectionRisk_xjal( InfectionRisk );\n }", "public void setIsspecific(Integer isspecific) {\n this.isspecific = isspecific;\n }", "String getMarkingInstruction();", "public void setScheduleExpression(String scheduleExpression) {\n this.scheduleExpression = scheduleExpression;\n }", "public void setIvaMFlag(String value) {\n setAttributeInternal(IVAMFLAG, value);\n }", "public ConvectionMirage(){\n super(ID, COST, TYPE, RARITY, TARGET);\n block = baseBlock = 11;\n magicNumber = baseMagicNumber = 1;\n }", "public interface IInstruction {\r\n /**\r\n * Returns how many cycles this instruction needs to execute.\r\n * \r\n * @return The number of cycles this instruction takes.\r\n */\r\n public int getCycles();\r\n \r\n /**\r\n * Executes the instruction under a given environment.\r\n * \r\n * @param cpu The UCPU16 instance.\r\n * @param a The second parameter of a binary instruction as an addressing mode,\r\n * or the only parameter of an unary instruction.\r\n * @param b The first parameter of a binary instruction as an addressing mode.\r\n * @param am The additional argument for a.\r\n * @param bm The additional argument for b.\r\n */\r\n public void execute(UCPU16 cpu, IAddressingMode a, IAddressingMode b, int am, int bm);\r\n \r\n /**\r\n * Returns the symbolic name of this operation for the debugger\r\n * and disassembler.\r\n * \r\n * @return The symbolic name of this instruction operation.\r\n */\r\n public String getName();\r\n}", "public void setManagementInterface(AddressInfo managementInterface) {\r\n this.managementInterface = managementInterface;\r\n }", "void setAllowFriendlyFire(boolean allowFriendlyFire);", "protected void setHMetisExec(final String str) {\n\t\tthis.hMetisExec = str;\n\t}", "public final void setImpact(java.lang.String impact)\r\n\t{\r\n\t\tsetImpact(getContext(), impact);\r\n\t}", "public void setINSTRUCTIONS1(String INSTRUCTIONS1) {\r\n this.INSTRUCTIONS1 = INSTRUCTIONS1 == null ? null : INSTRUCTIONS1.trim();\r\n }", "public TriggerCondition() {\n this(METRIC_HEAPUSG, 95);\n }", "@Override\n public void setNotification() {\n if (getTense() == Tense.FUTURE) {\n //Context ctx = SHiTApplication.getContext();\n //SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(ctx);\n\n int leadTimeEventMinutes = SHiTApplication.getPreferenceInt(Constants.Setting.ALERT_LEAD_TIME_EVENT, LEAD_TIME_MISSING);\n\n if (leadTimeEventMinutes != LEAD_TIME_MISSING) {\n if (travelTime > 0) {\n leadTimeEventMinutes += travelTime;\n }\n\n setNotification(Constants.Setting.ALERT_LEAD_TIME_EVENT\n , leadTimeEventMinutes\n , R.string.alert_msg_event\n , getNotificationClickAction()\n , null);\n }\n }\n }", "@Override\n\tpublic void onStartInstrExecution(Instruction instr) {\n\t\t\n\t}", "public void setFuel(String inFuel)\n {\n if(inFuel.equals(\"\"))\n {\n throw new IllegalArgumentException(\n \"Fuel cannout be empty\" );\n }\n else if(validateFuel(inFuel))\n {\n fuel = inFuel;\n }\n else\n {\n throw new IllegalArgumentException(\n \"Fuel must be Battery, Bio, or Diesel. Casing does not matter\"\n );\n }\n }", "public void setIops(Integer iops) {\n this.iops = iops;\n }", "public void setNotification(String notif) {\n frame.setNotification(notif);\n }", "public void setImei(String imei) {\n this.imei = imei == null ? null : imei.trim();\n }", "public void setImei(String imei) {\n this.imei = imei == null ? null : imei.trim();\n }", "public int setSilicateMin(Integer silicateMin) {\n try {\n setSilicateMin(silicateMin.floatValue());\n } catch (Exception e) {\n setSilicateMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return silicateMinError;\n }", "public void setIsmtransitionCareflowstepName(\n\t\t\tString ismtransitionCareflowstepName) {\n\t\tthis.ismtransitionCareflowstepName = ismtransitionCareflowstepName == null ? null\n\t\t\t\t: ismtransitionCareflowstepName.trim();\n\t}", "@Override\r\n\t\tpublic void setSDIPanelInstruction() {\n\t\t\t\r\n\t\t}", "public boolean setCustomInstrumentation(gw.processes.WorkQueueInstrumentation instrumentation) {\n return ((com.guidewire.pl.domain.workqueue.InstrumentedWorkerTaskPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.workqueue.InstrumentedWorkerTaskPublicMethods\")).setCustomInstrumentation(instrumentation);\n }", "public void changeImageMule(){\n\t\tsetIcon(imgm);\n\t}", "public void setMisenm(String misenm) {\r\n this.misenm = misenm;\r\n }", "public boolean setCustomInstrumentation(gw.processes.WorkQueueInstrumentation instrumentation) {\n return ((com.guidewire.pl.domain.workqueue.InstrumentedWorkerTaskPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.workqueue.InstrumentedWorkerTaskPublicMethods\")).setCustomInstrumentation(instrumentation);\n }", "public void setAlarm (int alarm) { this.alarm = alarm; }", "public FrInterruptRequest(int interruptNumber, boolean NMI, int icr) {\r\n this.interruptNumber = interruptNumber;\r\n isNMI = NMI;\r\n this.icr = icr;\r\n }", "public void setIntituleposte(String value) {\n setAttributeInternal(INTITULEPOSTE, value);\n }", "public void setImmunity(boolean bool) {\r\n shieldImmune = bool;\r\n }", "public final void mo6107M(int i, String str) {\n AppMethodBeat.m2504i(129949);\n if (C5046bo.isNullOrNil(str)) {\n str = \"{}\";\n }\n this.hku.hjU.mo67942L(i, str);\n AppMethodBeat.m2505o(129949);\n }", "public int setSilicateMin(String silicateMin) {\n try {\n setSilicateMin(new Float(silicateMin).floatValue());\n } catch (Exception e) {\n setSilicateMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return silicateMinError;\n }", "public void setExpression(String expression) {\n opensimSimulationJNI.ExpressionBasedPointToPointForce_setExpression(swigCPtr, this, expression);\n }", "public void setAutorizacionAutoimpresorSRI(AutorizacionAutoimpresorSRI autorizacionAutoimpresorSRI)\r\n/* 125: */ {\r\n/* 126:150 */ this.autorizacionAutoimpresorSRI = autorizacionAutoimpresorSRI;\r\n/* 127: */ }", "public void setDealingInf(String dealingInf)\n/* */ {\n/* 243 */ this.dealingInf = dealingInf;\n/* */ }", "public void setMach(float Mach);", "public void setInstructions(String text){\n instructions.setText(text);\n }", "public void setMn008(String mn008) {\n this.mn008 = mn008 == null ? null : mn008.trim();\n }", "public void setRiskWarning(Integer riskWarning) {\n this.riskWarning = riskWarning;\n }", "public int setSilicateMin(Float silicateMin) {\n try {\n setSilicateMin(silicateMin.floatValue());\n } catch (Exception e) {\n setSilicateMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return silicateMinError;\n }", "public static void setInfectionRate(double newRate) {\n infectionRate = newRate;\n }", "public void setNotification( String action, int icon){\n\n PendingIntent contentIntent = PendingIntent.getActivity(getApplicationContext(), 0,\n new Intent(getApplicationContext(),MainActivity.class), 0);\n Notification.Builder notificationBuilder=new Notification.Builder(getApplicationContext()).setTicker(\n \"Momkey \"+ action).setSmallIcon(icon).setAutoCancel(true)\n .setContentText(action).setContentInfo(\"\"+1)\n .setContentTitle(\"MOMKEY\")\n .setContentIntent(contentIntent);\n\n NotificationManager notificationManager =\n (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);\n\n Notification n = notificationBuilder.build();\n\n n.defaults = Notification.FLAG_AUTO_CANCEL;\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n notificationManager.notify(1111,notificationBuilder.build());\n }\n }", "public void setConsultImg(String consultImg) {\n this.consultImg = consultImg;\n }", "public void mo3831q(int i) {\n this.f1440O = i;\n }", "public void setConstant(){\n \tisConstant = true;\n }", "public final void mI() throws RecognitionException {\n try {\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:402:11: ( ( 'i' | 'I' ) )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:402:12: ( 'i' | 'I' )\n {\n if ( input.LA(1)=='I'||input.LA(1)=='i' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n }\n finally {\n }\n }", "public void setInstCode(String instCode) {\n this.instCode = instCode == null ? null : instCode.trim();\n }", "@Override\n public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException {\n\n }", "public void operand(String str) {\n postFix.add(str);\n }", "public void setADD_STRING8_MAND(String ADD_STRING8_MAND) {\r\n this.ADD_STRING8_MAND = ADD_STRING8_MAND == null ? null : ADD_STRING8_MAND.trim();\r\n }" ]
[ "0.6086663", "0.6035634", "0.59254485", "0.55300516", "0.49112815", "0.4766693", "0.47277924", "0.4722473", "0.47129998", "0.46970367", "0.4660434", "0.465214", "0.46313584", "0.46308112", "0.4595625", "0.45774606", "0.45287544", "0.45112327", "0.45056957", "0.4484375", "0.44664133", "0.44558555", "0.4444637", "0.44350663", "0.44189432", "0.43903956", "0.4378919", "0.4372694", "0.43507496", "0.4336638", "0.43353713", "0.43252257", "0.4319731", "0.43174925", "0.4298518", "0.42644796", "0.42559806", "0.42316988", "0.42293805", "0.42289492", "0.4202375", "0.4193191", "0.41833863", "0.41804305", "0.4174069", "0.41688305", "0.41678497", "0.4165777", "0.4159675", "0.4151833", "0.41377506", "0.41341615", "0.41323173", "0.413222", "0.41156253", "0.41006768", "0.40957567", "0.40909812", "0.40890953", "0.40866944", "0.4079043", "0.40740836", "0.40721044", "0.40702134", "0.40675846", "0.406615", "0.4062406", "0.40597668", "0.40597668", "0.40555507", "0.40542927", "0.40509543", "0.40287253", "0.4028707", "0.40111774", "0.4004861", "0.40017933", "0.39899462", "0.3987936", "0.398268", "0.39785126", "0.3975393", "0.39713785", "0.3967513", "0.39674607", "0.3966649", "0.395676", "0.39527878", "0.3951139", "0.3949254", "0.39475062", "0.3937512", "0.39367473", "0.3933575", "0.39335668", "0.3932059", "0.39306274", "0.39227372", "0.39214253", "0.3914948" ]
0.7215486
0
Get the instruction the Scheduler should be given for handling misfire situations for this Trigger the concrete Trigger type that you are using will have defined a set of additional MISFIRE_INSTRUCTION_XXX constants that may be passed to this method. If not explicitly set, the default value is MISFIRE_INSTRUCTION_SMART_POLICY.
public int getMisfireInstruction() { return misfireInstruction; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMisfireInstruction(int misfireInstruction) {\n if (!validateMisfireInstruction(misfireInstruction)) {\n throw new IllegalArgumentException(\n \"The misfire instruction code is invalid for this type of trigger.\");\n }\n this.misfireInstruction = misfireInstruction;\n }", "public String getInstruction()\n\t\t{\n\t\t\treturn m_instruction;\n\t\t}", "public String getInstruction(){\n\t\treturn this.instruction;\n\t}", "public Instruction getInstruction() {\n return this.instruction;\n }", "public String getSpecialInstruction() {\n return specialInstruction;\n }", "String getInstruction();", "@ValidStrings({\"immediate\", \"pending-reboot\"})\n public String getApplyMethod() {\n if (applyMethod == null) {\n applyMethod = \"immediate\";\n }\n\n return applyMethod;\n }", "public void setInstruction(Instruction instruction) {\n this.instruction = instruction;\n }", "String getMarkingInstruction();", "public void setSpecialInstruction(String specialInstruction) {\n this.specialInstruction = specialInstruction;\n }", "public YangString getTriggersMmeValue() throws JNCException {\n return (YangString)getValue(\"triggers-mme\");\n }", "public AutomaticRecoveryAction getAutomaticRecoveryAction() {\n return automaticRecoveryAction;\n }", "public String getScheduleExpression() {\n return this.scheduleExpression;\n }", "public com.vmware.converter.AlarmExpression getExpression() {\r\n return expression;\r\n }", "public void setInstruction(String instruction)\n\t\t{\n\t\t\tif(instruction == null)\n\t\t\t{\n\t\t\t\tinstruction = \"\";\n\t\t\t}\n\n\t\t\tm_instruction = instruction.trim();\n\t\t}", "public boolean isInstruction() {\r\n return true;\r\n }", "@Property(\"triggerAction\")\n String getTriggerAction();", "public CWE getMedicalRoleExecutingPhysician() { \r\n\t\tCWE retVal = this.getTypedField(32, 0);\r\n\t\treturn retVal;\r\n }", "@DISPID(135)\r\n\t// = 0x87. The runtime will prefer the VTID if present\r\n\t@VTID(130)\r\n\tjava.lang.String triggerType();", "@Override\n public boolean isInstruction() {\n return true;\n }", "public int getScheduleMethod() {\n return scheduleMethod;\n }", "@DISPID(29)\r\n\t// = 0x1d. The runtime will prefer the VTID if present\r\n\t@VTID(29)\r\n\tjava.lang.String eventTriggerMachine();", "ITrigger getTrigger(String sTriggerName);", "public String getIsmtransitionCareflowstepCode() {\n\t\treturn ismtransitionCareflowstepCode;\n\t}", "public TriggerCondition() {\n this(METRIC_HEAPUSG, 95);\n }", "TriggeringStatement getTriggeringStatement();", "public String getFixedCondition() {\n return _fixedCondition;\n }", "@Override\n\tpublic String getWorkflowDefinitionCode() {\n\t\treturn \"gsm_newEquipment\";\n\t}", "public String getImsi() {\r\n return imsi;\r\n }", "public interface WMTrigger extends WorkflowDefinitionObject {\r\n WMActivity getActivity();\r\n\r\n Boolean getMatchEventObjectForCompletion();\r\n\r\n WMPostTransitionRestriction getPostTransitionRestriction();\r\n\r\n Condition getCondition();\r\n\r\n String getTitle();\r\n}", "public CWE getPsl32_MedicalRoleExecutingPhysician() { \r\n\t\tCWE retVal = this.getTypedField(32, 0);\r\n\t\treturn retVal;\r\n }", "public String getADD_STRING8_MAND() {\r\n return ADD_STRING8_MAND;\r\n }", "public String getADD_STRING8_MAND() {\r\n return ADD_STRING8_MAND;\r\n }", "public RetriggerMode getRetriggerMode();", "public String getDemandType() {\n return demandType;\n }", "@Override\n\tpublic String getNotification() {\n\t\treturn null;\n\t}", "public String getIvaMFlag() {\n return (String) getAttributeInternal(IVAMFLAG);\n }", "public int getThrowWhen()\n {\n return throwWhen;\n }", "public CPU6502Instruction getInstruction(final int opCode) {\r\n return this.instructions[opCode];\r\n }", "public Integer getMnemonic() {\n return (Integer) getValue(MNEMONIC_KEY);\n }", "public String getInstructions() {\n return instructions;\n }", "public CWE getRoleExecutingPhysician() { \r\n\t\tCWE retVal = this.getTypedField(31, 0);\r\n\t\treturn retVal;\r\n }", "protected void emulateExtendedInstruction(final CPU6502Instruction instruction) {\r\n if (null != getLogger()) {\r\n getLogger().warning(\"Not implemented instruction at $\" + Integer.toHexString(this.currentInstructionAddress) + \": $\" + Integer.toHexString(this.memory[this.currentInstructionAddress] & 0xff));\r\n }\r\n try {\r\n Thread.sleep(100);\r\n } catch (Exception e) {\r\n }\r\n }", "public Integer getRiskWarning() {\n return riskWarning;\n }", "public Trigger getTrigger() {\n \t\treturn trigger;\n \t}", "public boolean isInstruction() {\n\t\treturn this.operation instanceof MagicInstruction;\n\t}", "public abstract void setTriggerOrAction();", "public ImNotifPolicy getImNotifPolicy();", "public String getSettlementUpdateActionRequest() {\n return settlementUpdateActionRequest;\n }", "@Override\n\tprotected PriceInstruction calculate(QuantityInstruction qtyInstruction,\n\t\t\tSingleInstrumentStrategy strategy) {\n\t\treturn null;\n\t}", "@javax.annotation.Nullable\n @ApiModelProperty(example = \"critical\", value = \"The impact of the incident.\")\n\n public String getImpact() {\n return impact;\n }", "@Override\n public String toString() {\n return \"Trigger '\" + getFullName() + \"': triggerClass: '\"\n + getClass().getName() + \" calendar: '\" + getCalendarName() \n + \"' misfireInstruction: \" + getMisfireInstruction() \n + \" nextFireTime: \" + getNextFireTime();\n }", "public final EObject ruleSoftGoalImpact() throws RecognitionException {\r\n EObject current = null;\r\n\r\n AntlrDatatypeRuleToken lv_impact_1_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1028:28: ( ( ( ( ruleQualifiedName ) ) ( (lv_impact_1_0= ruleImpact ) ) ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1029:1: ( ( ( ruleQualifiedName ) ) ( (lv_impact_1_0= ruleImpact ) ) )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1029:1: ( ( ( ruleQualifiedName ) ) ( (lv_impact_1_0= ruleImpact ) ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1029:2: ( ( ruleQualifiedName ) ) ( (lv_impact_1_0= ruleImpact ) )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1029:2: ( ( ruleQualifiedName ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1030:1: ( ruleQualifiedName )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1030:1: ( ruleQualifiedName )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1031:3: ruleQualifiedName\r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n \t\t\tif (current==null) {\r\n \t current = createModelElement(grammarAccess.getSoftGoalImpactRule());\r\n \t }\r\n \r\n }\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getSoftGoalImpactAccess().getTargetSoftGoalCrossReference_0_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_ruleQualifiedName_in_ruleSoftGoalImpact2151);\r\n ruleQualifiedName();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n \r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1044:2: ( (lv_impact_1_0= ruleImpact ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1045:1: (lv_impact_1_0= ruleImpact )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1045:1: (lv_impact_1_0= ruleImpact )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:1046:3: lv_impact_1_0= ruleImpact\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getSoftGoalImpactAccess().getImpactImpactParserRuleCall_1_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_ruleImpact_in_ruleSoftGoalImpact2172);\r\n lv_impact_1_0=ruleImpact();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getSoftGoalImpactRule());\r\n \t }\r\n \t\tset(\r\n \t\t\tcurrent, \r\n \t\t\t\"impact\",\r\n \t\tlv_impact_1_0, \r\n \t\t\"Impact\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public java.lang.CharSequence getALLOWMTMTORUN() {\n return ALLOW_MTM_TO_RUN;\n }", "public IntelligenceRule getIntelligenceRule() {\n return this.IntelligenceRule;\n }", "public abstract String getIntentActionString();", "public String getHeavyAttackKey() {\n return this.heavyAttackKey;\n }", "public java.lang.String getImo() {\n\t\treturn _tempNoTiceShipMessage.getImo();\n\t}", "@Override\r\n\tpublic Notification createSMSNotification() {\n\t\treturn null;\r\n\t}", "public Informer reqInformOnTimerSetting() {\n\t\t\taddProperty(EPC_ON_TIMER_SETTING);\n\t\t\treturn this;\n\t\t}", "public java.lang.CharSequence getALLOWMTMTORUN() {\n return ALLOW_MTM_TO_RUN;\n }", "public BasicInstructionFormat getInstructionFormat() {\r\n\t\treturn instructionFormat;\r\n\t}", "public String getADD_STRING7_MAND() {\r\n return ADD_STRING7_MAND;\r\n }", "public String getADD_STRING7_MAND() {\r\n return ADD_STRING7_MAND;\r\n }", "public double getSignal(){\n\t\t\treturn SIGNAL; //a constant for olfactory\n\t\t}", "@Property(\"triggerAction\")\n void setTriggerAction(String triggerAction);", "@Override\n public String[] getInstructions() {\n return null;\n }", "public float getSilicateMin() {\n return silicateMin;\n }", "public Number getWorkflowNotificationId() {\r\n return (Number) getAttributeInternal(WORKFLOWNOTIFICATIONID);\r\n }", "@Nullable String pistonBehavior();", "public interface IsSendSMSForReminder\n {\n /**\n * not show\n */\n String SUPPORT = \"1\";\n\n /**\n * show\n */\n String UN_SUPPORT = \"0\";\n }", "public String getSimType() {\n if (mySimType.equals(\"PREDATORPREY\")) {\n return mySimType;\n }\n if (mySimType.equals(\"FIRE\")) {\n return mySimType;\n }\n if (mySimType.equals(\"GAMEOFLIFE\")) {\n return mySimType;\n }\n if (mySimType.equals(\"PERCOLATION\")) {\n return mySimType;\n }\n if (mySimType.equals(\"ROCKPAPERSCISSORS\")) {\n return mySimType;\n }\n if (mySimType.equals(\"SEGREGATION\")) {\n return mySimType;\n }\n else {\n throw new IllegalArgumentException(\"Simulation type given is invalid\");\n }\n\n }", "public void setIntelligenceRule(IntelligenceRule IntelligenceRule) {\n this.IntelligenceRule = IntelligenceRule;\n }", "@AutoEscape\n\tpublic String getReason();", "public interface IInstruction {\r\n /**\r\n * Returns how many cycles this instruction needs to execute.\r\n * \r\n * @return The number of cycles this instruction takes.\r\n */\r\n public int getCycles();\r\n \r\n /**\r\n * Executes the instruction under a given environment.\r\n * \r\n * @param cpu The UCPU16 instance.\r\n * @param a The second parameter of a binary instruction as an addressing mode,\r\n * or the only parameter of an unary instruction.\r\n * @param b The first parameter of a binary instruction as an addressing mode.\r\n * @param am The additional argument for a.\r\n * @param bm The additional argument for b.\r\n */\r\n public void execute(UCPU16 cpu, IAddressingMode a, IAddressingMode b, int am, int bm);\r\n \r\n /**\r\n * Returns the symbolic name of this operation for the debugger\r\n * and disassembler.\r\n * \r\n * @return The symbolic name of this instruction operation.\r\n */\r\n public String getName();\r\n}", "public java.lang.String getImmunizationInj () {\n\t\treturn immunizationInj;\n\t}", "public com.vmware.converter.AlarmAction getAction() {\r\n return action;\r\n }", "private final byte getOperand(final CPU6502Instruction instruction) {\r\n return instruction.addressMode == CPU6502Instruction.IMMEDIATE\r\n ? this.memory[this.currentInstructionAddress + 1]\r\n : readByte(getOperandAddress(instruction));\r\n }", "public java.lang.String getImmatriculation() {\n return immatriculation;\n }", "@Override\n public String getIsimIst() {\n return mIsimIst;\n }", "public final void synpred10_InternalSafetyParser_fragment() throws RecognitionException { \n // InternalSafetyParser.g:3707:5: ( ( () Whenever ( ( ruleExpr ) ) Occurs ( ( ruleExpr ) ) Implies ) )\n // InternalSafetyParser.g:3707:6: ( () Whenever ( ( ruleExpr ) ) Occurs ( ( ruleExpr ) ) Implies )\n {\n // InternalSafetyParser.g:3707:6: ( () Whenever ( ( ruleExpr ) ) Occurs ( ( ruleExpr ) ) Implies )\n // InternalSafetyParser.g:3708:6: () Whenever ( ( ruleExpr ) ) Occurs ( ( ruleExpr ) ) Implies\n {\n // InternalSafetyParser.g:3708:6: ()\n // InternalSafetyParser.g:3709:6: \n {\n }\n\n match(input,Whenever,FollowSets000.FOLLOW_21); if (state.failed) return ;\n // InternalSafetyParser.g:3711:6: ( ( ruleExpr ) )\n // InternalSafetyParser.g:3712:7: ( ruleExpr )\n {\n // InternalSafetyParser.g:3712:7: ( ruleExpr )\n // InternalSafetyParser.g:3713:8: ruleExpr\n {\n pushFollow(FollowSets000.FOLLOW_41);\n ruleExpr();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n\n }\n\n match(input,Occurs,FollowSets000.FOLLOW_21); if (state.failed) return ;\n // InternalSafetyParser.g:3717:6: ( ( ruleExpr ) )\n // InternalSafetyParser.g:3718:7: ( ruleExpr )\n {\n // InternalSafetyParser.g:3718:7: ( ruleExpr )\n // InternalSafetyParser.g:3719:8: ruleExpr\n {\n pushFollow(FollowSets000.FOLLOW_51);\n ruleExpr();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n\n }\n\n match(input,Implies,FollowSets000.FOLLOW_2); if (state.failed) return ;\n\n }\n\n\n }\n }", "pb4server.FireFightAskReq getFireFightAskReq();", "public String getAlarm() {\n\t\treturn mAlarm;\n\t}", "public String getSuspension();", "@java.lang.Override\n public POGOProtos.Rpc.CombatActionProto getMinigameAction() {\n return minigameAction_ == null ? POGOProtos.Rpc.CombatActionProto.getDefaultInstance() : minigameAction_;\n }", "public MetricOuterClass.Metric getMetricTreatment() {\n if (metricTreatmentBuilder_ == null) {\n return metricTreatment_ == null ? MetricOuterClass.Metric.getDefaultInstance() : metricTreatment_;\n } else {\n return metricTreatmentBuilder_.getMessage();\n }\n }", "@Override\r\n\tpublic IScheduler getForcedScheduler() {\n\t\treturn null;\r\n\t}", "public String getImpulseType() {\n return impulseType;\n }", "public static boolean getTrigger() {\n\t\treturn true;\r\n\t}", "public static Instruction getInstance() {\n \t\treturn staticInstance;\n \t}", "public static Instruction getInstance() {\n \t\treturn staticInstance;\n \t}", "public static Instruction getInstance() {\n \t\treturn staticInstance;\n \t}", "public godot.wire.Wire.Basis getBasis() {\n if (basisBuilder_ == null) {\n return basis_ == null ? godot.wire.Wire.Basis.getDefaultInstance() : basis_;\n } else {\n return basisBuilder_.getMessage();\n }\n }", "public String getIsmtransitionCareflowstepName() {\n\t\treturn ismtransitionCareflowstepName;\n\t}", "protected String getStrainType()\n{\n\treturn \"Met E\";\n}", "public java.lang.String getActualRemark () {\n\t\treturn actualRemark;\n\t}", "void notifyReject(final TradeInstruction instruction);", "protected String getIntermediateFormula() {\n if ( isGlobal() ) {\n return globalConstraint;\n } else if ( isRoleBased() ) {\n return roleMapToFormula();\n } else {\n // rls is disabled\n return EMPTY_STRING;\n }\n }", "public String getRegFlow() {\r\n\t\treturn regFlow;\r\n\t}", "public void setImmatriculation(java.lang.String immatriculation) {\n this.immatriculation = immatriculation;\n }" ]
[ "0.6126239", "0.5432007", "0.53310525", "0.5274733", "0.525124", "0.5150794", "0.47903353", "0.46776175", "0.46748927", "0.4667337", "0.46427298", "0.4502734", "0.44497293", "0.44493115", "0.44414136", "0.4416542", "0.4392056", "0.43628836", "0.43575886", "0.4320478", "0.43108812", "0.42946395", "0.42831227", "0.42736232", "0.4267446", "0.42569652", "0.42453787", "0.42176038", "0.4183102", "0.41816288", "0.41771185", "0.4171801", "0.4171801", "0.4166264", "0.41624987", "0.41568062", "0.41427395", "0.41194436", "0.40959507", "0.4091527", "0.4088044", "0.40880397", "0.4077077", "0.40749255", "0.407063", "0.40691403", "0.40658075", "0.40587953", "0.40494", "0.4040297", "0.40384454", "0.40340796", "0.40339163", "0.4031271", "0.40296257", "0.40190855", "0.40173534", "0.40156108", "0.40137964", "0.40118846", "0.40114966", "0.40099517", "0.40080175", "0.40080175", "0.400285", "0.40006363", "0.39912796", "0.3989882", "0.39769396", "0.39641246", "0.3964116", "0.3961764", "0.39602715", "0.39552408", "0.3954355", "0.3950976", "0.39498314", "0.39469016", "0.39443433", "0.39296353", "0.39284113", "0.39277944", "0.39266944", "0.39228284", "0.391272", "0.39113542", "0.39093846", "0.38977826", "0.38969132", "0.38918218", "0.38918218", "0.38918218", "0.38900325", "0.3885792", "0.38791305", "0.38765368", "0.3870295", "0.38609266", "0.3859518", "0.38586584" ]
0.679019
0
This method should not be used by the Quartz client. To be implemented by the concrete classes that extend this class. The implementation should update the Trigger's state based on the MISFIRE_INSTRUCTION_XXX that was selected when the Trigger was created.
public abstract void updateAfterMisfire(Calendar cal);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void onTrigger();", "public abstract void setTriggerOrAction();", "@Override\n\t\tvoid runCommand() {\n\t\t\ttrigger.execute();\n\t\t}", "public void setMisfireInstruction(int misfireInstruction) {\n if (!validateMisfireInstruction(misfireInstruction)) {\n throw new IllegalArgumentException(\n \"The misfire instruction code is invalid for this type of trigger.\");\n }\n this.misfireInstruction = misfireInstruction;\n }", "private void triggerReset() {\n DefenceField.fieldActivated = false;\n OnFieldReset event = new OnFieldReset(this::doActivation);\n event.beginTask();\n DefenceField.getShrineEntity().send(event);\n event.finishTask();\n }", "@Override\n \tprotected void trigger(TriggerMessage message) {\n \t\tthis.getDataObjectService().saveObject(this.getUniqueProcessId(), message.getProcessInstanceId(), message.getPayload());\n \t\t\n \t\teventDefinition.trigger(message);\n \t\t\n \t\tthis.getNodeInstanceMediatorService().setNodeInstanceEndTime(message.getProcessInstanceId(), new Date());\n \t\t\n\t\tthis.getNodeInstanceMediatorService().setState(\n\t\t\t\tmessage.getProcessInstanceId(),\n\t\t\t\tNodeInstaceStates.PASSED_STATE);\n\t\t\n \t\tthis.getNodeInstanceMediatorService().persistChanges();\n \t\t\n \t\tthis.sendMessageToNodeActor(message, this.getActivatingGatewayNode());\n \t}", "public void triggerEvent() {\n\t\ts.changeOpenState();\n\t\ts.setChangedAndNotify();\n\t\t\n\t}", "public void trigger(Fact fact) {\n\t\t\n\t}", "@Override\n\tpublic void addSelfTrigger(ISelfTrigger trigger) {\n\t\t\n\t}", "public void onTriggerChange() {\n findViewById(R.id.temp).post(new Runnable() {\n public void run() {\n ConsumerIrManager mCIR = ScaryUtil.getConsumerIRService(getApplicationContext());\n if (m_Inst.power) {\n TransmissionCode data = ScaryUtil.getIRCode(m_Inst.sequence, m_Inst.temp); // (TransmissionCode)samsung.get(m_Inst.temp);\n ScaryUtil.transmit(getApplicationContext(),data);\n }\n }\n });\n }", "public void preFire(){\n\t}", "public abstract boolean isTrigger();", "public void trigger(List<Entity> _trigger){\n\t\tif(event!=null){\n\t\t\tevent.activate(System.currentTimeMillis(), _trigger);\n\t\t}\n\t}", "@Override\n public String toString() {\n return \"Trigger '\" + getFullName() + \"': triggerClass: '\"\n + getClass().getName() + \" calendar: '\" + getCalendarName() \n + \"' misfireInstruction: \" + getMisfireInstruction() \n + \" nextFireTime: \" + getNextFireTime();\n }", "protected abstract void createTriggerOrAction();", "void trigger();", "public void fire() {\n // operation finished\n dfStatus |= DF_STATUS_READY;\n }", "@Override\n\tprotected boolean on_trigger_activated(String trigger_name) {\n\t\treturn false;\n\t}", "protected void sequence_AT_DEFINE_DefinitionTrigger_TRIGGER(ISerializationContext context, DefinitionTrigger semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "void trigger(Entity e);", "private void trigger() {\n\t\t\tif (repeatState == REPEAT_ADD) {\n\t\t\t\tadd();\n\t\t\t}\n\t\t\tif (repeatState == REPEAT_SUBTRACT) {\n\t\t\t\tsubtract();\n\t\t\t}\n\t\t}", "public void pressureToFire() {\n fire1.set(true);\n fire2.set(FFM);\n }", "private boolean triggered() {\n\t\treturn true;\n\t}", "public void setTrigger(Trigger trigger) {\n \t\tthis.trigger = trigger;\n \t\tif (this.trigger == null)\n \t\t\tthis.trigger = Trigger.NONE;\n \t}", "public int getMisfireInstruction() {\n return misfireInstruction;\n }", "private void m145784n() {\n nativeSetUpdateNotification(this.f119482o, this.f119477j.f119584j, this.f119477j.f119585k);\n }", "public void trigger(PromiseManager pm) {\n\tthrow new SubclassResponsibilityException();\n/*\nudanax-top.st:15949:DetectorEvent methodsFor: 'triggering'!\n{void} trigger: pm {PromiseManager}\n\t\"Send the message across the wire.\"\n\t\n\tself subclassResponsibility!\n*/\n}", "@Override\n\tpublic void fire() throws Exception {\n\t\tsuper.fire();\n\t}", "public void fireImageChange() {\n if (fireRequired) {\n observer.fire(transform());\n fireRequired = false;\n }\n }", "public void trigger() {\n\t\t\n//\t\t #ifdef DEBUG\n\t\t // The sensor should not have been scheduled if it has a NULL\n\t\t // callback function. Be safe and test here.\n\t\t if (func == null) {\n\t\t SoDebugError.post(\"SoSensor::trigger\",\n\t\t \"Cannot trigger a sensor with NULL callback\");\n\t\t return;\n\t\t }\n//\t\t #endif /* DEBUG */\n\t\t \n\t\t // Call the sensor function\n\t\t func.run(funcData, this);\n\t\t \n\t\t }", "protected void fireChangeEvent() {\n\t\tfireEvent(new DebugEvent(this, DebugEvent.CHANGE));\n\t}", "public TriggerMessage(String processInstanceId, Object data) {\n\t\tthis.processInstanceId = processInstanceId;\n\t\tthis.payload = data;\n\t}", "@Property(\"triggerAction\")\n void setTriggerAction(String triggerAction);", "public Trigger getTrigger() {\n \t\treturn trigger;\n \t}", "public abstract void fire();", "public abstract void fire();", "public static boolean getTrigger() {\n\t\treturn true;\r\n\t}", "@NonNull\n public Trigger build() {\n return new Trigger(type, goal, null);\n }", "protected void loadTrigger() {\n this.keyTrigger = getContentAssistTrigger();\n }", "private void fireBatteryStatus(String trigger)\n\t{\n\t\tfireBatteryStatus(batteryLevel, isPowerConnected, trigger, null);\n\t}", "public void executeTrigger(Object object);", "private void processCreateTrigger() throws HsqlException {\n\n Table t;\n boolean isForEach;\n boolean isNowait;\n int queueSize;\n String triggerName;\n boolean isQuoted;\n String sWhen;\n String sOper;\n String tableName;\n String token;\n String className;\n TriggerDef td;\n Trigger o;\n\n triggerName = tokenizer.getName();\n\n String schemaname = tokenizer.getLongNameFirst();\n\n database.schemaManager.checkTriggerExists(triggerName,\n session.getSchemaNameForWrite(schemaname), false);\n\n isQuoted = tokenizer.wasQuotedIdentifier();\n isForEach = false;\n isNowait = false;\n queueSize = TriggerDef.getDefaultQueueSize();\n sWhen = tokenizer.getSimpleToken();\n sOper = tokenizer.getSimpleToken();\n\n tokenizer.getThis(Token.T_ON);\n\n tableName = tokenizer.getName();\n\n if (schemaname == null) {\n schemaname =\n session.getSchemaNameForWrite(tokenizer.getLongNameFirst());\n } else if (!schemaname.equals(\n session.getSchemaNameForWrite(tokenizer.getLongNameFirst()))) {\n throw Trace.error(Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS);\n }\n\n t = database.schemaManager.getUserTable(session, tableName,\n schemaname);\n\n if (t.isView()) {\n throw Trace.error(Trace.NOT_A_TABLE);\n }\n\n session.setScripting(true);\n\n // \"FOR EACH ROW\" or \"CALL\"\n token = tokenizer.getSimpleToken();\n\n if (token.equals(Token.T_FOR)) {\n token = tokenizer.getSimpleToken();\n\n if (token.equals(Token.T_EACH)) {\n token = tokenizer.getSimpleToken();\n\n if (token.equals(Token.T_ROW)) {\n isForEach = true;\n\n // should be 'NOWAIT' or 'QUEUE' or 'CALL'\n token = tokenizer.getSimpleToken();\n } else {\n throw Trace.error(Trace.UNEXPECTED_END_OF_COMMAND, token);\n }\n } else {\n throw Trace.error(Trace.UNEXPECTED_END_OF_COMMAND, token);\n }\n }\n\n if (token.equals(Token.T_NOWAIT)) {\n isNowait = true;\n\n // should be 'CALL' or 'QUEUE'\n token = tokenizer.getSimpleToken();\n }\n\n if (token.equals(Token.T_QUEUE)) {\n queueSize = tokenizer.getInt();\n\n // should be 'CALL'\n token = tokenizer.getSimpleToken();\n }\n\n if (!token.equals(Token.T_CALL)) {\n throw Trace.error(Trace.UNEXPECTED_END_OF_COMMAND, token);\n }\n\n className = tokenizer.getSimpleName();\n\n if (!tokenizer.wasQuotedIdentifier()) {\n throw Trace.error(Trace.UNEXPECTED_END_OF_COMMAND, className);\n }\n\n HsqlName name = database.nameManager.newHsqlName(triggerName,\n isQuoted);\n\n td = new TriggerDef(name, sWhen, sOper, isForEach, t, className,\n isNowait, queueSize, database.classLoader);\n\n t.addTrigger(td);\n\n if (td.isValid()) {\n try {\n\n // start the trigger thread\n td.start();\n } catch (Exception e) {\n throw Trace.error(Trace.UNKNOWN_FUNCTION, e.toString());\n }\n }\n\n database.schemaManager.registerTriggerName(triggerName, t.getName());\n\n// --\n }", "protected void fireStateChanged() {\n if (listenerList != null) {\n // Guaranteed to return a non-null array\n Object[] listeners = listenerList.getListenerList();\n // Process the listeners last to first, notifying\n // those that are interested in this event\n for (int i = listeners.length - 2; i >= 0; i -= 2) {\n if (listeners[i] == ChangeListener.class) {\n // Lazily create the event:\n if (changeEvent == null) {\n changeEvent = new ChangeEvent(this);\n }\n ((ChangeListener) listeners[i + 1]).stateChanged(changeEvent);\n }\n }\n }\n }", "public void setRetriggerMode( RetriggerMode retriggerMode );", "public boolean isFire() {\n return this.type == Type.FIRE;\n }", "@Override\n\tpublic synchronized void fire() {\n\t}", "@DISPID(135)\r\n\t// = 0x87. The runtime will prefer the VTID if present\r\n\t@VTID(130)\r\n\tjava.lang.String triggerType();", "public void fireTransition(Transition fired){\r\n\t\tif(fired.isEnabled()){\r\n\t\t\t\r\n\t\t\tArrayList<ArrayList<Integer>> incidence = net.getIncidence();\r\n\t\t\tint[] markingChange = new int[incidence.size()];\r\n\t\t\t\r\n\t\t\tint col = net.getTransitions().indexOf(fired);\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < markingChange.length; i++){\r\n\t\t\t\tmarkingChange[i] = incidence.get(i).get(col);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tTokenManager manager = new TokenManager(layout, net);\r\n\t\t\tmanager.changeMarking(markingChange);\r\n\t\t}\r\n\t}", "TriggeringStatement getTriggeringStatement();", "protected void fireStateChanged() {\n\t\tChangeEvent changeEvent = new ChangeEvent(this);\n\n\t\tfor (ChangeListener changeListener : changeListeners) {\n\t\t\tchangeListener.stateChanged(changeEvent);\n\t\t}\n\t}", "@Override\n public ScheduledFuture<?> schedule(Runnable task, Trigger trigger) {\n if (!canRun()) {\n return null;\n }\n return super.schedule(task, trigger);\n }", "public void fire() {\n \tintakeTalon1.set(1);\n \tintakeTalon2.set(1);\n }", "public TriggerCondition() {\n this(METRIC_HEAPUSG, 95);\n }", "public abstract void setTriggers(Map<String, Trigger> triggers);", "protected void fireStateChanged() {\n Object[] listeners = changeListeners.getListenerList();\n // Process teh listeners last to first, notifying those that are\n // interested in this event.\n for (int i = listeners.length - 2; i >= 0; i -= 2) {\n if (listeners[i] == ChangeListener.class) {\n if (changeEvent == null) {\n changeEvent = new ChangeEvent(this);\n ((ChangeListener) listeners[i + 1]).stateChanged(changeEvent);\n }\n }\n }\n }", "protected TriggerFactory getTriggerFactory() {\n\t\treturn this.triggerFactory;\n\t}", "public void mo1607a() {\r\n if (this.f4603a.f4592h != null) {\r\n Message.obtain(this.f4603a.f4598n, 3).sendToTarget();\r\n }\r\n }", "public boolean getTrigger(){\n \treturn !trigger.get();\n }", "public void fire(TileEnvironment levelEnv) {\n\t\t\n\t}", "protected void recordTriggerMacro(TriggerMacro macro) {\n super.recordTriggerMacro(macro);\n }", "protected void fireStateChanged(){\n Object[] listeners=listenerList.getListenerList();\n // Process the listeners last to first, notifying\n // those that are interested in this event\n for(int i=listeners.length-2;i>=0;i-=2){\n if(listeners[i]==ChangeListener.class){\n // Lazily create the event:\n if(changeEvent==null)\n changeEvent=new ChangeEvent(this);\n ((ChangeListener)listeners[i+1]).stateChanged(changeEvent);\n }\n }\n }", "@Property(\"triggerAction\")\n String getTriggerAction();", "public interface WMTrigger extends WorkflowDefinitionObject {\r\n WMActivity getActivity();\r\n\r\n Boolean getMatchEventObjectForCompletion();\r\n\r\n WMPostTransitionRestriction getPostTransitionRestriction();\r\n\r\n Condition getCondition();\r\n\r\n String getTitle();\r\n}", "boolean isSimpleTrigger();", "public TriggerAccess getTrigger () {\n return this.trigger;\n }", "public interface EnchantmentTrigger {}", "void rescheduleAJob(String oldTriggerName, String oldTriggerGroup, Trigger newTrigger);", "public void trigger(Event event);", "public abstract Map<String, Trigger> getTriggers();", "ITrigger getTrigger(String sTriggerName);", "public void setHasFire(boolean hasFire) {\n\t\tthis.hasFire = hasFire;\n\t}", "protected void fireStateChanged() \r\n {\r\n Object[] listeners = listenerList.getListenerList();\r\n for (int i = listeners.length - 2; i >= 0; i -=2 ) {\r\n if (listeners[i] == ChangeListener.class) {\r\n if (changeEvent == null) {\r\n changeEvent = new ChangeEvent(this);\r\n }\r\n ((ChangeListener)listeners[i+1]).stateChanged(changeEvent);\r\n } \r\n }\r\n }", "@Step\n public static void fire(final Transition _self) {\n fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepCommand command = new fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepCommand() {\n \t@Override\n \tpublic void execute() {\n \t\tfr.inria.diverse.sample.petrinetv2.semantics.TransitionAspectTransitionAspectProperties _self_ = fr.inria.diverse.sample.petrinetv2.semantics.TransitionAspectTransitionAspectContext.getSelf(_self);\n \t\t_privk3_fire(_self_, _self);\n \t}\n };\n fr.inria.diverse.k3.al.annotationprocessor.stepmanager.IStepManager manager = fr.inria.diverse.k3.al.annotationprocessor.stepmanager.StepManagerRegistry.getInstance().findStepManager(_self);\n if (manager != null) {\n \tmanager.executeStep(_self,command,\"Transition\",\"fire\");\n } else {\n \tcommand.execute();\n }\n }", "abstract public void triggerExplosion();", "protected void fireStateChanged ()\n {\n Object[] listeners = listenerList.getListenerList();\n ChangeEvent event = null;\n for (int ii = listeners.length - 2; ii >= 0; ii -= 2) {\n if (listeners[ii] == ChangeListener.class) {\n if (event == null) {\n event = new ChangeEvent(this);\n }\n ((ChangeListener)listeners[ii + 1]).stateChanged(event);\n }\n }\n }", "private void testFirebase() {\n Intent launchIntent = new Intent(this, HomeActivity.class);\n launchIntent.putExtra(Constants.FIREBASE_ACTION, true);\n launchIntent.putExtra(Constants.FIREBASE_TITLE, \"Sample Title\");\n launchIntent.putExtra(Constants.FIREBASE_BODY, \"Sample Body\");\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, launchIntent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n Bitmap rawBitmap = BitmapFactory.decodeResource(getResources(),\n R.mipmap.ic_launcher_round);\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ic_stat_notif_icon_firebase_om)\n .setLargeIcon(rawBitmap)\n .setContentTitle(getResources().getString(R.string.app_name))\n .setContentText(\"Sample body\")\n .setAutoCancel(true)\n .setContentIntent(pendingIntent);\n\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n Notification notification = notificationBuilder.build();\n notification.flags |= Notification.FLAG_NO_CLEAR;\n\n notificationManager.notify(0 /* ID of notification */, notification);\n }", "public Notification(NType type, Date date, String description, User target, Event trigger)\n\t{\n\t\tthis.type = type;\n\t\tthis.date = date;\n\t\tthis.description = description;\n\t\tthis.target = target;\n\t\tthis.trigger = trigger;\n\t}", "@Override\n\tpublic boolean triggers(AbstractInformationState is) {\n\t\treturn (((IUNetworkInformationState) is).currentContribIntegratesNextInput());\n\t}", "protected void fireStateChanged() {\r\n Object[] listeners = listenerList.getListenerList();\r\n for (int i = listeners.length - 2; i >= 0; i -= 2) {\r\n if (listeners[i] == ChangeListener.class) {\r\n if (changeEvent == null) {\r\n changeEvent = new ChangeEvent(this);\r\n }\r\n ((ChangeListener) listeners[i + 1]).stateChanged(changeEvent);\r\n }\r\n }\r\n }", "private void fireEvents() {\n\n if (clockTickCount % clockTicksTillWorkloadChange == 0) {\n clockEventPublisher.fireTriggerWorkloadHandlerEvent(clockTickCount, intervalDurationInMilliSeconds);\n }\n\n // if (clockTickCount % clockTicksTillScalingDecision == 0) {\n // clockEventPublisher.fireTriggerAutoScalerEvent(clockTickCount,\n // intervalDurationInMilliSeconds);\n // }\n\n clockEventPublisher.fireClockEvent(clockTickCount, intervalDurationInMilliSeconds);\n\n // INfrastruktur\n if (clockTickCount % clockTicksTillPublishInfrastructureState == 0) {\n clockEventPublisher.fireTriggerPublishInfrastructureStateEvent(clockTickCount,\n intervalDurationInMilliSeconds);\n\n }\n\n // Queue\n if (clockTickCount % clockTicksTillPublishQueueState == 0) {\n\n clockEventPublisher.fireTriggerPublishQueueStateEvent(clockTickCount, intervalDurationInMilliSeconds);\n }\n\n }", "public interface TriggerHandler {\n\n String handleTrigger(String stateJson, Collection<Subscription> subscriptions, String cfgJson);\n\n String getTriggerType();\n\n}", "public void markTriggersMmeCreate() throws JNCException {\n markLeafCreate(\"triggersMme\");\n }", "@Override\n public void actionPerformed (ActionEvent e) {\n fireChanged();\n }", "public void execute(RecordTriggerContext recordTriggerContext) {\n LogService logService = ServiceLocator.locate(LogService.class);\n /*\n * Get an instance of the User Defined Service we created.\n * User defined Services are used similarly to Vault SDK services.\n * User Defined Services don't contribute to the memory limit after the method has exited.\n */\n ProductSearchUserDefinedService productSearchUserDefinedService = ServiceLocator.locate(ProductSearchUserDefinedService.class);\n\n /*\n * Get an instance of the PickList Service used to retrieve picklist values.\n * More information about hor to retrive picklist values can be found here:\n * https://repo.veevavault.com/javadoc/vault-sdk-api/20.1.0/docs/api/com/veeva/vault/sdk/api/picklist/package-summary.html\n */\n PicklistService picklistService = ServiceLocator.locate(PicklistService.class);\n // Picklist of bicycle parts in bicycle part orders\n Picklist bicyclePartPicklist = picklistService.getPicklist(\"bicycle_part__c\");\n // Picklist of bicycle part manufacturers in bicycle part orders\n Picklist bicyclePartManufacturersPicklist = picklistService.getPicklist(\"bicycle_part_manufacturer__c\");\n\n @SuppressWarnings(\"unchecked\")\n Map<String, String> partAndManufacturerMap = VaultCollections.newMap();\n @SuppressWarnings(\"unchecked\")\n Map<String, BigDecimal> orderQuantityMap = VaultCollections.newMap();\n\n recordTriggerContext.getRecordChanges().forEach(recordChange -> {\n\n // Initialize part name and manufacture name strings\n String bicyclePartName = \"\";\n String bicyclePartManufacturerName = \"\";\n\n // Get the bicycle parts pick list values\n List<String> bicyclePartsListValues = recordChange.getNew().getValue(\"bicycle_part__c\", ValueType.PICKLIST_VALUES);\n\n // Get the name(label) of the bicycle part using the bicyclePartPickList\n if (bicyclePartsListValues != null && !bicyclePartsListValues.isEmpty()) {\n //Get single-picklist value name selected by user\n String partPicklistValueName = bicyclePartsListValues.get(0);\n //Get picklist value label\n bicyclePartName = bicyclePartPicklist.getPicklistValue(partPicklistValueName).getLabel();\n }\n\n // Get the name(label) of the bicycle part manufacturer using the bicyclePartManufacturerPickList\n List<String> bicyclePartManufacturersListValues = recordChange.getNew().getValue(\"bicycle_part_manufacturer__c\", ValueType.PICKLIST_VALUES);\n if (bicyclePartManufacturersListValues != null && !bicyclePartManufacturersListValues.isEmpty()) {\n //Get single-picklist value name selected by user\n String partManufacturerPicklistValueName = bicyclePartManufacturersListValues.get(0);\n //Get picklist value label\n bicyclePartManufacturerName = bicyclePartManufacturersPicklist.getPicklistValue(partManufacturerPicklistValueName).getLabel();\n }\n\n // If the bicycle part name or the manufacturer name are null or empty, then throw an error.\n if((bicyclePartName == null || bicyclePartName.isEmpty()) ||\n (bicyclePartManufacturerName == null || bicyclePartManufacturerName.isEmpty())) {\n recordChange.setError(\"INVALID_ARGUMENT\", \"Product with specified manufacturer does not exist.\");\n }\n\n // Get the order quantity\n BigDecimal orderQuantity = recordChange.getNew().getValue(\"order_quantity__c\", ValueType.NUMBER);\n\n // Add part name, part manufacturer name and order quantity to maps\n partAndManufacturerMap.put(\"'\" + bicyclePartName + \"'\", \"'\" + bicyclePartManufacturerName + \"'\");\n orderQuantityMap.put(bicyclePartName, orderQuantity);\n });\n logService.logResourceUsage(\"Before doesProductExist Method Call: \");\n Map<String, BicyclePartData> doProductsExist = productSearchUserDefinedService.doesProductExist(partAndManufacturerMap);\n logService.logResourceUsage(\"After doesProductExist Method Call: \" );\n\n // Validate that all user entered bicycle part name were found, if not setError on the record change.\n for (RecordChange recordChange : recordTriggerContext.getRecordChanges()) {\n // If no results were found, all user inputted products and manufacturer combinations are wrong.\n if (doProductsExist == null) {\n recordChange.setError(\"INVALID_ARGUMENT\", \"Product with specified manufacturer does not exist.\");\n continue;\n }\n\n // Get the bicycle parts pick list values\n List<String> bicyclePartsListValues = recordChange.getNew().getValue(\"bicycle_part__c\", ValueType.PICKLIST_VALUES);\n\n String bicyclePartName = \"\";\n // Get the name(label) of the bicycle part using the bicyclePartPickList\n if (bicyclePartsListValues != null && !bicyclePartsListValues.isEmpty()) {\n //Get single-picklist value name selected by user\n String partPicklistValueName = bicyclePartsListValues.get(0);\n //Get picklist value label\n bicyclePartName = bicyclePartPicklist.getPicklistValue(partPicklistValueName).getLabel();\n }\n\n if (bicyclePartName != null && !doProductsExist.get(bicyclePartName).getIdExists()) { // If Id of bicycle part is found then it exists\n // setError if the user specified bicycle part's record was not found.\n recordChange.setError(\"INVALID_ARGUMENT\", \"Product with specified manufacturer does not exist.\");\n }\n }\n\n // Reduce the quantity for the bicycle parts that we are creating an order for.\n if(doProductsExist != null) {\n logService.logResourceUsage(\"Before reduceProductQuantity Method Call: \");\n productSearchUserDefinedService.reduceProductQuantity(doProductsExist.values(), orderQuantityMap);\n logService.logResourceUsage(\"After reduceProductQuantity Method Call: \");\n }\n logService.logResourceUsage(\"End: \");\n }", "public void setToFire(Point3d position){\r\n\t\tworld.setBlockState(new BlockPos(position.x, position.y, position.z), Blocks.FIRE.getDefaultState());\r\n\t}", "public void fireStateChanged() {\r\n Object[] listeners = listenerList.getListenerList();\r\n for (int i = listeners.length - 2; i >= 0; i -= 2) {\r\n if (listeners[i] == ChangeListener.class) {\r\n if (changeEvent == null) {\r\n return;\r\n }\r\n ((ChangeListener) listeners[i + 1]).stateChanged(changeEvent);\r\n }\r\n }\r\n }", "@Nonnull\n public static JDK8TriggerBuilder <ITrigger> newTrigger ()\n {\n return new JDK8TriggerBuilder <> ();\n }", "public interface ModelTrigger{\n\n\t/** Start's the simulation. */\n\tpublic void startSimulation();\n\n\t/** Stop's the simulation. */\n\tpublic void stopSimulation();\n\n\t/** Return true if the simulation is running. */\n\tpublic boolean isRunning();\n}", "private void fireValueChange(boolean b) {\n \t\n\t\t\n\t}", "@NonNull\n public Trigger build() {\n if (UAStringUtil.isEmpty(eventName)) {\n return new Trigger(type, goal, null);\n }\n\n JsonPredicate predicate = JsonPredicate.newBuilder()\n .setPredicateType(JsonPredicate.AND_PREDICATE_TYPE)\n .addMatcher(JsonMatcher.newBuilder()\n .setKey(CustomEvent.EVENT_NAME)\n .setValueMatcher(ValueMatcher.newValueMatcher(JsonValue.wrap(eventName)))\n .build())\n .build();\n return new Trigger(type, goal, predicate);\n }", "@Override\n\t\tpublic void onChange(boolean selfChange) {\n\t\t\tmHandler.sendEmptyMessage(1);\n\t\t\tLog.i(\"message\", \"dataChange\");\n\t\t\tsuper.onChange(selfChange);\n\t\t}", "Set getTriggers();", "public void setFire(float xTile, float yTile)\r\n/* 171: */ {\r\n/* 172:194 */ if (tileWalkable(xTile, yTile)) {\r\n/* 173:196 */ this.fire[((int)xTile)][((int)yTile)] = 1;\r\n/* 174: */ }\r\n/* 175: */ }", "public void fireChange() {\n fireChange(new ChangeEvent(source));\n }", "void addTrigger(ITrigger tTrigger, boolean bIsPersistent)\r\n throws StorageProviderException;", "private void fireSelectionChangeNotification () {\r\n\t\tif ( selectionChangeListener!=null)\r\n\t\t\tselectionChangeListener.execute();\r\n\t}", "public TriggerMessage() {\n\t}", "@Override\n\t\tprotected boolean validateTrigger(int triggerID, String... arguments) {\n\t\t\treturn false;\n\t\t}", "public synchronized void fireStateChanged() {\n Object[] listeners = listenerList.getListenerList();\n for (int i = listeners.length - 2; i >= 0; i -= 2)\n if (listeners[i] == ChangeListener.class) {\n if (changeEvent == null)\n return;\n ((ChangeListener) listeners[i + 1]).stateChanged(changeEvent);\n }\n }", "@Override\n public void setNotification() {\n if (getTense() == Tense.FUTURE) {\n //Context ctx = SHiTApplication.getContext();\n //SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(ctx);\n\n int leadTimeEventMinutes = SHiTApplication.getPreferenceInt(Constants.Setting.ALERT_LEAD_TIME_EVENT, LEAD_TIME_MISSING);\n\n if (leadTimeEventMinutes != LEAD_TIME_MISSING) {\n if (travelTime > 0) {\n leadTimeEventMinutes += travelTime;\n }\n\n setNotification(Constants.Setting.ALERT_LEAD_TIME_EVENT\n , leadTimeEventMinutes\n , R.string.alert_msg_event\n , getNotificationClickAction()\n , null);\n }\n }\n }", "public void trigger() {\n\n\t\tfor (Gadget gadget : getGadgetsToTrigger()) {\n\n\t\t\tgadget.trigger();\n\n\t\t}\n\n\t}" ]
[ "0.63564503", "0.5930465", "0.59111786", "0.58512616", "0.58465844", "0.5825759", "0.57489645", "0.56265587", "0.56020916", "0.5598569", "0.5586958", "0.5570329", "0.55645716", "0.55349463", "0.55148", "0.5416014", "0.5413852", "0.53941554", "0.5381003", "0.5369249", "0.5348787", "0.53410214", "0.533802", "0.5329918", "0.53231317", "0.5320895", "0.5282926", "0.52767843", "0.5269627", "0.52595574", "0.52476656", "0.52397287", "0.5230274", "0.52225834", "0.5199909", "0.5199909", "0.517284", "0.5162897", "0.51626796", "0.5133123", "0.51320547", "0.51294094", "0.51219815", "0.5116352", "0.5101857", "0.50912267", "0.50897706", "0.50718445", "0.50630546", "0.5042783", "0.5039435", "0.50340676", "0.5033777", "0.50193286", "0.50165063", "0.5011613", "0.5001452", "0.50004953", "0.50000817", "0.49998072", "0.4999148", "0.49983943", "0.4989842", "0.49791384", "0.49669322", "0.4951947", "0.49494067", "0.49461645", "0.49443415", "0.49364415", "0.4934364", "0.49128738", "0.49060202", "0.49057478", "0.48940226", "0.48851168", "0.48559946", "0.4846699", "0.48449922", "0.4836504", "0.48281935", "0.48259014", "0.48256427", "0.48197007", "0.48131517", "0.48088333", "0.4793226", "0.47909424", "0.47870842", "0.47842175", "0.4782527", "0.47816104", "0.47814733", "0.4781368", "0.47704238", "0.47656193", "0.47579077", "0.47553754", "0.47548732", "0.47530845", "0.47458336" ]
0.0
-1
This method should not be used by the Quartz client. To be implemented by the concrete class. The implementation should update the Trigger's state based on the given new version of the associated Calendar (the state should be updated so that it's next fire time is appropriate given the Calendar's new settings).
public abstract void updateWithNewCalendar(Calendar cal, long misfireThreshold);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void triggerEvent() {\n\t\ts.changeOpenState();\n\t\ts.setChangedAndNotify();\n\t\t\n\t}", "public abstract void updateAfterMisfire(Calendar cal);", "void rescheduleAJob(String oldTriggerName, String oldTriggerGroup, Trigger newTrigger);", "@Override\n\tpublic void eventDate(Date newDate) {\n\t\t\n\t}", "@NonNull\n public Trigger build() {\n JsonPredicate predicate = null;\n if (versionMatcher != null) {\n predicate = VersionUtils.createVersionPredicate(versionMatcher);\n }\n return new Trigger(Trigger.VERSION, goal, predicate);\n }", "public abstract void onTrigger();", "@PreUpdate\n\tprotected void onUpdate() {\n\t\tupdated = new Date();\n\t\trcaCase.updated = updated;\n\t}", "public static void rescheduleRefreshJob() {\n\t\ttry {\n\t\t\tScheduler sched = StdSchedulerFactory.getDefaultScheduler();\n\n\t\t\tSimpleTrigger trigger = newTrigger()\n\t\t\t .withIdentity(REFRESH_TRIGGER_KEY)\n\t\t\t .withSchedule(repeatSecondlyForever(refreshInterval))\n\t\t\t .build();\n\t\t\t\n\t\t\tsched.rescheduleJob(REFRESH_TRIGGER_KEY, trigger);\n\t\t\tlogger.debug(\"Rescheduled refresh job '{}' in DefaulScheduler\", REFRESH_TRIGGER_KEY);\n\t\t} catch (SchedulerException e) {\n\t\t\tlogger.warn(\"Could not reschedule refresh job: {}\", e.getMessage());\n\t\t}\n\t}", "public Trigger createTrigger(ConfigProperties cprop){\n\t\tint repeat;\n\t\tlong interval;\n\t\tCalendar sd = calculateStartTime(cprop);\n\t\tCalendar ed = calculateEndTime(cprop);\n\t\tString name = cprop.getProperty(\"PROJ.name\");\n\n\t\tString rstr = cprop.getProperty(\"TIME.repeat\");\n\t\tString istr = cprop.getProperty(\"TIME.interval\");\n\t\tString fstr = cprop.getProperty(\"TIME.frequency\");\n\n\t\t//repeat this many times or forever\n\t\tif(rstr!=null)\n\t\t\trepeat = Integer.parseInt(rstr);\n\t\telse\n\t\t\trepeat = SimpleTrigger.REPEAT_INDEFINITELY;\n\n\t\t//repeat every interval milliseconds or daily\n\t\t//interval overrides frequency\n\t\tif(istr!=null)\n\t\t\tinterval = Long.parseLong(istr);\n\t\telse if (fstr!=null)\n\t\t\tinterval = ONE_DAY/Long.parseLong(fstr);\n\t\telse\n\t\t\tinterval = ONE_DAY;\n\n\t\tjlog.info(\"Create Trigger n=\"+name+\" sd=\"+sd.getTime()+\" ed=\"+ed.getTime()+\" r=\"+repeat+\" i=\"+interval);\n\n\t\tTrigger trigger = new SimpleTrigger(name, null,sd.getTime(),ed.getTime(),repeat,interval);\n\t\ttrigger.setMisfireInstruction(SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT);\n\t\treturn trigger;\n\n\n\t}", "public abstract Date computeFirstFireTime(Calendar calendar);", "public void trigger(Fact fact) {\n\t\t\n\t}", "public void trigger(List<Entity> _trigger){\n\t\tif(event!=null){\n\t\t\tevent.activate(System.currentTimeMillis(), _trigger);\n\t\t}\n\t}", "public boolean triggersNow()\n\t{\n\t\tif(!this.canTrigger())\n\t\t\treturn false;\n\n\t\tfor(GameObject object: this.game.actualState.stack())\n\t\t\tif(object instanceof StateTriggeredAbility)\n\t\t\t\tif(((StateTriggeredAbility)object).printedVersionID == this.ID)\n\t\t\t\t\treturn false;\n\n\t\tIdentified source = this.getSource(this.state);\n\t\tint controller;\n\t\tif(source.isGameObject())\n\t\t\tcontroller = ((GameObject)source).controllerID;\n\t\telse\n\t\t\t// it's a player\n\t\t\tcontroller = source.ID;\n\t\tfor(GameObject object: this.game.actualState.waitingTriggers.get(controller))\n\t\t\tif((object instanceof StateTriggeredAbility) && (((StateTriggeredAbility)object).printedVersionID == this.ID))\n\t\t\t\treturn false;\n\n\t\tfor(SetGenerator condition: this.triggerConditions)\n\t\t\tif(!condition.evaluate(this.game, this).isEmpty())\n\t\t\t\treturn true;\n\n\t\treturn false;\n\t}", "protected void sequence_AT_DEFINE_DefinitionTrigger_TRIGGER(ISerializationContext context, DefinitionTrigger semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "private void setUpdateTriggerTime(int value) {\n bitField0_ |= 0x00000002;\n updateTriggerTime_ = value;\n }", "public void scheduleViewChange(){\n PBFTRequestInfo rinfo = getRequestInfo();\n\n if(!isPrimary() && rinfo.hasSomeWaiting()){\n \n if(!overloaded() || changing()){\n long now = getClockValue();\n\n if(!getViewTimer().workingAt(now)){\n\n long timeout = getPrimaryFaultTimeout();\n PBFTTimeoutDetector ttask = (PBFTTimeoutDetector) getViewTimer().getTask();\n\n if(ttask != null && ttask.get(\"TIMEOUT\") != null){\n timeout = (Long)ttask.get(\"TIMEOUT\");\n JDSUtility.debug(\"[scheduleViewChange()] s\" + getLocalServerID() + \" computed changeview timeout equal to \" + timeout);\n }\n\n long timestamp = now + timeout;\n getViewTimer().schedule(timestamp);\n return;\n }\n return;\n }//end change-view timer is working\n JDSUtility.debug(\"[batch()]s\" + getLocalServerID() + \", at time \" + getClockValue() + \", has been in overloaded state.\");\n }//end if it is not primary\n \n }", "@Override\n \tprotected void trigger(TriggerMessage message) {\n \t\tthis.getDataObjectService().saveObject(this.getUniqueProcessId(), message.getProcessInstanceId(), message.getPayload());\n \t\t\n \t\teventDefinition.trigger(message);\n \t\t\n \t\tthis.getNodeInstanceMediatorService().setNodeInstanceEndTime(message.getProcessInstanceId(), new Date());\n \t\t\n\t\tthis.getNodeInstanceMediatorService().setState(\n\t\t\t\tmessage.getProcessInstanceId(),\n\t\t\t\tNodeInstaceStates.PASSED_STATE);\n\t\t\n \t\tthis.getNodeInstanceMediatorService().persistChanges();\n \t\t\n \t\tthis.sendMessageToNodeActor(message, this.getActivatingGatewayNode());\n \t}", "private synchronized void onUpdate() {\n if (pollingJob == null || pollingJob.isCancelled()) {\n int refresh;\n\n try {\n refresh = getConfig().as(OpenSprinklerConfig.class).refresh;\n } catch (Exception exp) {\n refresh = this.refreshInterval;\n }\n\n pollingJob = scheduler.scheduleWithFixedDelay(refreshService, DEFAULT_WAIT_BEFORE_INITIAL_REFRESH, refresh,\n TimeUnit.SECONDS);\n }\n }", "@Override\r\n\tpublic void documentChangeFinalized(long aTimestamp) {\n\t\t\r\n\t}", "int getUpdateTriggerTime();", "public void update(Schedule arg0) {\n\t\t\n\t}", "@Override\n public String toString() {\n return \"Trigger '\" + getFullName() + \"': triggerClass: '\"\n + getClass().getName() + \" calendar: '\" + getCalendarName() \n + \"' misfireInstruction: \" + getMisfireInstruction() \n + \" nextFireTime: \" + getNextFireTime();\n }", "protected void fireChangeEvent() {\n\t\tfireEvent(new DebugEvent(this, DebugEvent.CHANGE));\n\t}", "private void fireEvents() {\n\n if (clockTickCount % clockTicksTillWorkloadChange == 0) {\n clockEventPublisher.fireTriggerWorkloadHandlerEvent(clockTickCount, intervalDurationInMilliSeconds);\n }\n\n // if (clockTickCount % clockTicksTillScalingDecision == 0) {\n // clockEventPublisher.fireTriggerAutoScalerEvent(clockTickCount,\n // intervalDurationInMilliSeconds);\n // }\n\n clockEventPublisher.fireClockEvent(clockTickCount, intervalDurationInMilliSeconds);\n\n // INfrastruktur\n if (clockTickCount % clockTicksTillPublishInfrastructureState == 0) {\n clockEventPublisher.fireTriggerPublishInfrastructureStateEvent(clockTickCount,\n intervalDurationInMilliSeconds);\n\n }\n\n // Queue\n if (clockTickCount % clockTicksTillPublishQueueState == 0) {\n\n clockEventPublisher.fireTriggerPublishQueueStateEvent(clockTickCount, intervalDurationInMilliSeconds);\n }\n\n }", "public void updateDate() {\n for (ChangeListener l : listeners) {\n l.stateChanged(new ChangeEvent(this));\n }\n }", "@Override\n\tprotected boolean on_trigger_activated(String trigger_name) {\n\t\treturn false;\n\t}", "public static void scheduleRefreshJob() {\n\t\ttry {\n\t\t\tScheduler sched = StdSchedulerFactory.getDefaultScheduler();\n\t\t\tJobDetail job = newJob(RefreshJob.class)\n\t\t\t .withIdentity(REFRESH_JOB_KEY)\n\t\t\t .build();\n\n\t\t\tSimpleTrigger trigger = newTrigger()\n\t\t\t .withIdentity(REFRESH_TRIGGER_KEY)\n\t\t\t .withSchedule(repeatSecondlyForever(refreshInterval))\n\t\t\t .build();\n\n\t\t\tsched.scheduleJob(job, trigger);\n\t\t\tlogger.debug(\"Scheduled refresh job '{}' in DefaulScheduler\", job.getKey());\n\t\t} catch (SchedulerException e) {\n\t\t\tlogger.warn(\"Could not schedule refresh job: {}\", e.getMessage());\n\t\t}\n\t}", "@Test\n\t@Ignore\n\tpublic void testScheduler() {\n\t\torg.springframework.scheduling.support.CronTrigger trigger = new CronTrigger(\"0 0 0 * * *\");\n\t\tCalendar today = Calendar.getInstance();\n\t\ttoday.add(Calendar.DAY_OF_MONTH, -1);\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss z\");\n\t\tfinal Date yesterday = today.getTime();\n\t\tString lastMessage = (sdf.format(yesterday)) + \" : [Yesterday]\";\n\t\tlog.debug(lastMessage);\n\t\tDate nextExecution = trigger.nextExecutionTime(\n\t\t\t\tnew TriggerContext() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Date lastScheduledExecutionTime() {\n\t\t\t\t\t\treturn yesterday;\n\t\t\t\t\t}\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Date lastActualExecutionTime() {\n\t\t\t\t\t\treturn yesterday;\n\t\t\t\t\t}\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Date lastCompletionTime() {\n\t\t\t\t\t\treturn yesterday;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tString nextMessage = sdf.format(nextExecution) + \" : [Execution] \";\n\t\tlog.debug(nextMessage);\n\t}", "@Override\n\t\t\tpublic void changedUpdate(DocumentEvent arg0) {\n\t\t\t}", "public void setCalendarForModel(Calendar calend) {\n this.cal = calend;\n //fireTableDataChanged();\n refresh();\n}", "private void fireBatteryStatus(String trigger)\n\t{\n\t\tfireBatteryStatus(batteryLevel, isPowerConnected, trigger, null);\n\t}", "private void checkUpdateCheckTriggered(PackageVersions packageVersions) {\n // Assert the PackageTracker attempted to trigger an update.\n mFakeIntentHelper.assertUpdateTriggered();\n\n // If an update check was triggered reliability triggering should always be enabled to\n // ensure that it can be completed if it fails.\n mFakeIntentHelper.assertReliabilityTriggerScheduled();\n\n // Check the expected storage state.\n checkPackageStorageStatus(PackageStatus.CHECK_STARTED, packageVersions);\n }", "protected TriggerFactory getTriggerFactory() {\n\t\treturn this.triggerFactory;\n\t}", "void updateBeliefStateTrigger( BeliefStateDimension prev_belief,\n BeliefUpdateTrigger trigger,\n BeliefStateDimension next_belief )\n throws BelievabilityException\n {\n if (( prev_belief == null )\n || ( trigger == null )\n || ( next_belief == null ))\n throw new BelievabilityException\n ( \"updateBeliefStateTrigger()\",\n \"NULL parameter(s) sent in.\" );\n \n if ( trigger instanceof DiagnosisTrigger )\n updateBeliefStateDiagnosisObs( prev_belief,\n (DiagnosisTrigger) trigger,\n next_belief );\n else if ( trigger instanceof BelievabilityAction)\n updateBeliefStateActionTrans( prev_belief,\n (BelievabilityAction) trigger,\n next_belief );\n else\n throw new BelievabilityException\n ( \"updateBeliefStateTrigger()\",\n \"Unknown BeliefUpdateTrigger subclass: \"\n + trigger.getClass().getName() );\n \n }", "protected void fireDateChanged() {\n\t\tfor(ReadingPointListener l : listeners) l.dateChanged(this);\n\t}", "@Override // ohos.workscheduler.IWorkScheduler\r\n /* Code decompiled incorrectly, please refer to instructions dump. */\r\n public void onCommonEventTriggered(ohos.aafwk.content.Intent r6) throws ohos.rpc.RemoteException {\r\n /*\r\n // Method dump skipped, instructions count: 104\r\n */\r\n throw new UnsupportedOperationException(\"Method not decompiled: ohos.workscheduler.WorkSchedulerProxy.onCommonEventTriggered(ohos.aafwk.content.Intent):void\");\r\n }", "@Test\n public void testRecuccrenceRuleChange() throws Exception {\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n int occurences = 10;\n String rrule = RRuleFactory.getFrequencyWithOccurenceLimit(RecurringFrequency.DAILY, occurences);\n deltaEvent.setRrule(rrule);\n\n /*\n * Update as organizer\n */\n long now = now().longValue();\n String fromStr = DateTimeUtil.getZuluDateTime(new Date(now - TimeUnit.DAYS.toMillis(1)).getTime()).getValue();\n String untilStr = DateTimeUtil.getZuluDateTime(new Date(now + TimeUnit.DAYS.toMillis(30)).getTime()).getValue();\n\n ChronosCalendarResultResponse calendarResultResponse = chronosApi.updateEvent(deltaEvent.getFolder(), deltaEvent.getId(), now(), getUpdateBody(deltaEvent), deltaEvent.getRecurrenceId(), null, null, null, null, null, null, fromStr, untilStr, Boolean.TRUE, null);\n assertNull(calendarResultResponse.getError());\n assertTrue(calendarResultResponse.getData().getUpdated().size() == 0);\n assertTrue(calendarResultResponse.getData().getCreated().size() == occurences);\n assertTrue(calendarResultResponse.getData().getDeleted().size() == 1);\n\n /*\n * Check that end date has been updated\n */\n AnalyzeResponse analyzeResponse = receiveUpdateAsAttendee(PartStat.NEEDS_ACTION, CustomConsumers.ALL);\n AnalysisChange change = assertSingleChange(analyzeResponse);\n assertThat(\"Recurrence ID is not correct.\", change.getNewEvent().getRrule(), is(rrule));\n }", "private void trigger() {\n\t\t\tif (repeatState == REPEAT_ADD) {\n\t\t\t\tadd();\n\t\t\t}\n\t\t\tif (repeatState == REPEAT_SUBTRACT) {\n\t\t\t\tsubtract();\n\t\t\t}\n\t\t}", "public void calendarListener(CalendarEvent ce){\n Date triggerDate = (Date)ce.getTriggerDate().clone();\n setInicioRegistrar(triggerDate);\n setFinRegistrar(triggerDate);\n }", "private void updateDay(GregorianCalendar reference, JPanel weekday) {\n\t\tGregorianCalendar start = (GregorianCalendar) reference.clone();\n\t\tGregorianCalendar end = (GregorianCalendar) reference.clone();\n\n\t\tstart = DateCalc.startOf(start, Calendar.DAY_OF_MONTH);\n\n\t\tend = DateCalc.endOf(end, Calendar.DAY_OF_MONTH);\n\n\t\tArrayList<Event> today = this.calendar.getDay(start);\n\t\tfor (Event current : today) {\n\t\t\tthis.colorBlocks(start, weekday, current, end);\n\t\t}\n\t}", "public final void updateChangeDateTime() {\n \tm_changeDate = System.currentTimeMillis();\n }", "@PostConstruct\n public void initTriggerEvaluateRunning() {\n this.triggerRepository.findAll().forEach(trigger -> {\n if (trigger.getEvaluateRunningDate() != null) {\n var unlocked = trigger.toBuilder().evaluateRunningDate(null).build();\n this.triggerRepository.save(unlocked);\n }\n });\n }", "EventChannel.Update update();", "private boolean triggered() {\n\t\treturn true;\n\t}", "@Override\n public void execute(JobExecutionContext context) {\n\n JobDataMap dataMap = context.getJobDetail().getJobDataMap();\n\n Long dataSourceId = dataMap.getLong(DataVinesConstants.DATASOURCE_ID);\n\n LocalDateTime scheduleTime = DateUtils.date2LocalDateTime(context.getScheduledFireTime());\n LocalDateTime fireTime = DateUtils.date2LocalDateTime(context.getFireTime());\n\n logger.info(\"scheduled fire time :{}, fire time :{}, dataSource id :{}\", scheduleTime, fireTime, dataSourceId);\n logger.info(\"scheduled start work , dataSource id :{} \", dataSourceId);\n\n CatalogMetaDataFetchTaskService catalogMetaDataFetchTaskService = getJobExternalService().getCatalogTaskService();\n CatalogRefresh catalogRefresh = new CatalogRefresh();\n catalogRefresh.setDatasourceId(dataSourceId);\n\n DataSource dataSource = getJobExternalService().getDataSourceService().getDataSourceById(dataSourceId);\n if (dataSource == null) {\n logger.warn(\"dataSource {} is null\", dataSourceId);\n return;\n }\n\n catalogMetaDataFetchTaskService.refreshCatalog(catalogRefresh);\n }", "@SuppressWarnings(\"unchecked\")\n private void updateRecurrences(final BwEvent val,\n final UpdateEventResult uc,\n final Collection<BwEventProxy> overrides,\n final ChangeTable changes) throws CalFacadeException {\n if ((changes != null) && !changes.isEmpty()) {\n if (!changes.recurrenceChanged()) {\n return;\n }\n\n if (!changes.recurrenceRulesChanged()) {\n // We can handle exdate and rdate changes.\n ChangeTableEntry ent = changes.getEntry(PropertyInfoIndex.EXDATE);\n if (ent.getAddedValues() != null) {\n // exdates added - remove the instances.\n removeInstances(val, uc, overrides, ent.getAddedValues());\n }\n\n if (ent.getRemovedValues() != null) {\n // exdates removed - add the instances.\n addInstances(val, uc, overrides, ent.getRemovedValues());\n }\n\n ent = changes.getEntry(PropertyInfoIndex.RDATE);\n if (ent.getAddedValues() != null) {\n // rdates added - add the instances.\n addInstances(val, uc, overrides, ent.getAddedValues());\n }\n\n if (ent.getRemovedValues() != null) {\n // rdates removed - remove the instances.\n removeInstances(val, uc, overrides, ent.getRemovedValues());\n }\n\n return;\n }\n }\n\n HibSession sess = getSess();\n\n Map<String, BwRecurrenceInstance> updated = new HashMap<String, BwRecurrenceInstance>();\n\n /* Get all the times for this event. - this could be a problem. Need to\n limit the number. Should we do this in chunks, stepping through the\n whole period?\n */\n\n RecurPeriods rp = RecurUtil.getPeriods(val, cb.getSyspars().getMaxYears(),\n cb.getSyspars().getMaxInstances());\n\n if (rp.instances.isEmpty()) {\n // No instances for an alleged recurring event.\n\n // XXX Mark the master as non-recurring to stop it disappearing\n val.setRecurring(false);\n //throwException(CalFacadeException.noRecurrenceInstances);\n }\n\n String stzid = val.getDtstart().getTzid();\n\n/* try {\n val.setLatestDate(Timezones.getUtc(rp.rangeEnd.toString(), stzid));\n } catch (Throwable t) {\n throwException(new CalFacadeException(t));\n } */\n\n int maxInstances = cb.getSyspars().getMaxInstances();\n\n boolean dateOnly = val.getDtstart().getDateType();\n\n for (Period p: rp.instances) {\n String dtval = p.getStart().toString();\n if (dateOnly) {\n dtval = dtval.substring(0, 8);\n }\n\n BwDateTime rstart = BwDateTime.makeBwDateTime(dateOnly, dtval, stzid);\n\n dtval = p.getEnd().toString();\n if (dateOnly) {\n dtval = dtval.substring(0, 8);\n }\n\n BwDateTime rend = BwDateTime.makeBwDateTime(dateOnly, dtval, stzid);\n\n BwRecurrenceInstance ri = new BwRecurrenceInstance();\n\n ri.setDtstart(rstart);\n ri.setDtend(rend);\n ri.setRecurrenceId(ri.getDtstart().getDate());\n ri.setMaster(val);\n\n updated.put(ri.getRecurrenceId(), ri);\n maxInstances--;\n if (maxInstances == 0) {\n // That's all you're getting from me\n break;\n }\n }\n\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"from \");\n sb.append(BwRecurrenceInstance.class.getName());\n sb.append(\" where master=:master\");\n\n sess.createQuery(sb.toString());\n sess.setEntity(\"master\", val);\n Collection current = sess.getList();\n\n Iterator it = current.iterator();\n while (it.hasNext()) {\n BwRecurrenceInstance ri = (BwRecurrenceInstance)it.next();\n BwRecurrenceInstance updri = updated.get(ri.getRecurrenceId());\n\n if (updri == null) {\n // Not in the new instance set - delete from db\n sess.delete(ri);\n uc.addDeleted(ri);\n } else {\n /* Found instance with same recurrence id. Is the start and end the same\n */\n if (!ri.getDtstart().equals(updri.getDtstart()) ||\n !ri.getDtend().equals(updri.getDtend())) {\n ri.setDtstart(updri.getDtstart());\n ri.setDtend(updri.getDtend());\n\n sess.update(ri);\n uc.addUpdated(ri);\n }\n\n // Remove the entry - we've processed it.\n updated.remove(ri.getRecurrenceId());\n }\n }\n\n /* updated only contains recurrence ids that don't exist */\n\n for (BwRecurrenceInstance ri: updated.values()) {\n sess.save(ri);\n uc.addAdded(ri);\n }\n }", "public void updateCalendarType() {\n\t\tthis.calType = (this.jdCO <= this.jd ? SE_GREG_CAL : SE_JUL_CAL);\n\t\t;\n\t}", "public Builder setUpdateTriggerTime(int value) {\n copyOnWrite();\n instance.setUpdateTriggerTime(value);\n return this;\n }", "public void setLastModified(java.util.Calendar param) {\n localLastModifiedTracker = param != null;\n\n this.localLastModified = param;\n }", "public void updateItem(IItem schedulerValueObject, IPersistenceObjectsFactory factory) {\n try {\n\n OpicsNettingSchedulerItem opicsDaemonValueObject = (OpicsNettingSchedulerItem) schedulerValueObject;\n int itemStatus = opicsDaemonValueObject.getItemStatus();\n\n IBOUB_OPX_NettingScheduler opicsBalancesHandoffItem = (IBOUB_OPX_NettingScheduler) factory.findByPrimaryKey(\n IBOUB_OPX_NettingScheduler.BONAME, opicsDaemonValueObject.getItemID(), false);\n\n if (updateParameters) {\n opicsBalancesHandoffItem.setF_NOSTROUPDATEFREQUENCY(nostroUpdateFrequency);\n opicsBalancesHandoffItem.setF_POSITIONUPDATEFREQUENCY(positionUpdateFrequency);\n opicsBalancesHandoffItem.setF_ISNOSTROHANDOFFENABLE(isNostroUpdateEnabled);\n opicsBalancesHandoffItem.setF_ISPOSITIONHANDOFFENABLE(isPositionUpdateEnabled);\n updateParameters = false;\n }\n\n // Update the static variables from the database\n nostroUpdateFrequency = opicsBalancesHandoffItem.getF_NOSTROUPDATEFREQUENCY();\n positionUpdateFrequency = opicsBalancesHandoffItem.getF_POSITIONUPDATEFREQUENCY();\n isNostroUpdateEnabled = opicsBalancesHandoffItem.isF_ISNOSTROHANDOFFENABLE();\n isPositionUpdateEnabled = opicsBalancesHandoffItem.isF_ISPOSITIONHANDOFFENABLE();\n\n updateOpicsNettedBalancesSchedulerStatus(itemStatus, opicsBalancesHandoffItem, schedulerValueObject, factory);\n if (itemStatus == IItemStatusCodes.FAILED) {\n logger.error(\"A Bankfusion exception has occured which has stopped the daemon\");\n }\n if (itemStatus == IItemStatusCodes.PROCESSED) {\n Timestamp now = SystemInformationManager.getInstance().getBFBusinessDateTime();\n if (opicsDaemonValueObject.isProcessNostros() && opicsBalancesHandoffItem.isF_ISNOSTROHANDOFFENABLE()) {\n long nostroOffset = (opicsBalancesHandoffItem.getF_NOSTROUPDATEFREQUENCY() * oneMinute) - 1000;\n opicsBalancesHandoffItem.setF_NEXTNOSTROUPDTTM(new Timestamp(now.getTime() + nostroOffset));\n }\n if (opicsDaemonValueObject.isProcessPositions() && opicsBalancesHandoffItem.isF_ISPOSITIONHANDOFFENABLE()) {\n long positionOffset = (opicsBalancesHandoffItem.getF_POSITIONUPDATEFREQUENCY() * oneMinute) - 1000;\n opicsBalancesHandoffItem.setF_NEXTPOSITIONUPDTTM(new Timestamp(now.getTime() + positionOffset));\n }\n }\n }\n catch (BankFusionException exception) {\n logger.error(\"A Bankfusion exception has occured\", exception);\n return;\n }\n catch (Exception exception) {\n logger.error(\"An unknown exception has occured\", exception);\n return;\n }\n }", "@Override\n\tpublic void onRefreshDate() {\n\t\trefreshDate();\n\t}", "@Override\n\t\tvoid runCommand() {\n\t\t\ttrigger.execute();\n\t\t}", "@Bean\n\tpublic SimpleTriggerFactoryBean reminPublicationTrigger() throws ParseException{\n\t\tSimpleTriggerFactoryBean stFactory = new SimpleTriggerFactoryBean();\n\t\tstFactory.setJobDetail(reminderPublicationJob().getObject());\n\t\tstFactory.setRepeatInterval(sendReminderPublicationInterval);\n\t\tstFactory.setStartTime(DateUtily.string2Date(sendReminderPublicationDateInidate,\n\t\t\t\t\t\t\t\t\t\t\t\t\t Constante.DATE_FORMAT_JAVA));\n\t\tlog4j.info(\"<reminPublicationTrigger> QUARTZ: reminPublicationJob -> inicio:\"+sendReminderPublicationDateInidate+\n\t\t\t\t\" activo:\"+sendReminderPublicationStart+\" %%%\");\n\t\treturn stFactory;\n\t}", "void trigger(Entity e);", "private void indicateCalendarDisplayTimeChanged() {\n raise(new CalendarDisplayTimeChangedEvent(currentDateTime));\n }", "public void trigger() {\n\t\t\n//\t\t #ifdef DEBUG\n\t\t // The sensor should not have been scheduled if it has a NULL\n\t\t // callback function. Be safe and test here.\n\t\t if (func == null) {\n\t\t SoDebugError.post(\"SoSensor::trigger\",\n\t\t \"Cannot trigger a sensor with NULL callback\");\n\t\t return;\n\t\t }\n//\t\t #endif /* DEBUG */\n\t\t \n\t\t // Call the sensor function\n\t\t func.run(funcData, this);\n\t\t \n\t\t }", "@Override\n\tpublic void trigger(final Object value) {\n\t\tPreconditions.checkNotNull(value);\n\n\t\tEticket eticket = null;\n\t\tif (value instanceof Eticket) {\n\t\t\teticket = (Eticket) value;\n\t\t}\n\t\tif ((eticket != null) && (eticket.getType() == EticketType.SINGLE)) {\n\t\t\ttry {\n\t\t\t\tfinal ParseObject eticketObj = new ParseObject(\"Ticket\");\n\t\t\t\teticketObj.put(\"id\", eticket.getTicketId());\n\t\t\t\teticketObj.put(\"date\", eticket.getDate());\n\t\t\t\teticketObj.put(\"type\", eticket.getType().name());\n\t\t\t\teticketObj.save();\n\t\t\t} catch (final ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void reactMain_region_digitalwatch_Display_refreshing_RefreshingChrono() {\n\t\tif (sCIButtons.topLeftPressed) {\n\t\t\tnextStateIndex = 1;\n\t\t\tstateVector[1] = State.$NullState$;\n\n\t\t\ttimer.unsetTimer(this, 3);\n\n\t\t\ttimer.setTimer(this, 2, 1 * 1000, false);\n\n\t\t\tsCIDisplay.operationCallback.refreshTimeDisplay();\n\n\t\t\tsCIDisplay.operationCallback.refreshDateDisplay();\n\n\t\t\tnextStateIndex = 1;\n\t\t\tstateVector[1] = State.main_region_digitalwatch_Display_refreshing_RefreshingTime_timeView_hideAlarm;\n\t\t} else {\n\t\t\tif (timeEvents[3]) {\n\t\t\t\tnextStateIndex = 1;\n\t\t\t\tstateVector[1] = State.$NullState$;\n\n\t\t\t\ttimer.unsetTimer(this, 3);\n\n\t\t\t\ttimer.setTimer(this, 3, 250, false);\n\n\t\t\t\tsCIDisplay.operationCallback.refreshChronoDisplay();\n\n\t\t\t\tsCILogicUnit.operationCallback.getChrono();\n\n\t\t\t\tnextStateIndex = 1;\n\t\t\t\tstateVector[1] = State.main_region_digitalwatch_Display_refreshing_RefreshingChrono;\n\t\t\t}\n\t\t}\n\t}", "private void fireRebuildPerformedEvent() {\r\n final Vector listeners = getProjectChangedListeners();\r\n final Enumeration enumer = listeners.elements();\r\n while (enumer.hasMoreElements()) {\r\n final ProjectChangedListener listener = (ProjectChangedListener) enumer.\r\n nextElement();\r\n listener.rebuildPerformed(getProject());\r\n }\r\n }", "@Override\r\n public void changedUpdate(DocumentEvent e) {\n ActivoTimer();\r\n }", "@Test\n public void launchesEventhandlerUpdatelastmodificationTest() {\n // TODO: test launchesEventhandlerUpdatelastmodification\n }", "@Test\n public void testCurrentDayAll1() {\n long t1 = new DateTime(\"2015-10-10T10:10:00\").getMillis();\n long taskAId = taskService.createTaskByJobId(jobAId, t1, t1, TaskType.SCHEDULE);\n long taskBId = taskService.createTaskByJobId(jobBId, t1, t1, TaskType.SCHEDULE);\n\n DAGDependChecker checker = new DAGDependChecker(jobCId);\n Map<Long, JobDependStatus> jobDependMap = Maps.newHashMap();\n DependencyExpression dependencyExpression = new TimeOffsetExpression(\"cd\");\n DependencyStrategyExpression dependencyStrategy = new DefaultDependencyStrategyExpression(CommonStrategy.ALL.getExpression());\n JobDependStatus statusC2A = new JobDependStatus(jobCId, jobAId, dependencyExpression, dependencyStrategy);\n JobDependStatus statusC2B = new JobDependStatus(jobCId, jobBId, dependencyExpression, dependencyStrategy);\n jobDependMap.put(jobAId, statusC2A);\n jobDependMap.put(jobBId, statusC2B);\n checker.setJobDependMap(jobDependMap);\n\n long scheduleTime = new DateTime(\"2015-10-10T11:11:00\").getMillis();\n Assert.assertEquals(false, checker.checkDependency(Sets.newHashSet(jobAId, jobBId), scheduleTime));\n\n taskService.updateStatus(taskAId, TaskStatus.SUCCESS);\n Assert.assertEquals(false, checker.checkDependency(Sets.newHashSet(jobAId, jobBId), scheduleTime));\n\n taskService.updateStatus(taskBId, TaskStatus.SUCCESS);\n Assert.assertEquals(true, checker.checkDependency(Sets.newHashSet(jobAId, jobBId), scheduleTime));\n\n taskService.deleteTaskAndRelation(taskAId);\n taskService.deleteTaskAndRelation(taskBId);\n }", "@Override\n\tpublic void commitCalendar(CalendarEdit edit) {\n\t\t\n\t}", "boolean hasUpdateTriggerTime();", "public static Date computeEndTimeToAllowParticularNumberOfFirings(OperableTrigger trigg, org.quartz.Calendar cal, \n int numTimes) {\n\n OperableTrigger t = (OperableTrigger) trigg.clone();\n\n if (t.getNextFireTime() == null) {\n t.computeFirstFireTime(cal);\n }\n \n int c = 0;\n Date endTime = null;\n \n for (int i = 0; i < numTimes; i++) {\n Date d = t.getNextFireTime();\n if (d != null) {\n c++;\n t.triggered(cal);\n if(c == numTimes)\n endTime = d;\n } else {\n break;\n }\n }\n \n if(endTime == null)\n return null;\n \n endTime = new Date(endTime.getTime() + 1000L);\n \n return endTime;\n }", "@Override\n\tpublic void addSelfTrigger(ISelfTrigger trigger) {\n\t\t\n\t}", "public void trigger(Event event);", "void trigger();", "public int getUpdateTriggerTime() {\n return updateTriggerTime_;\n }", "private void onAddToCalendarSuccess() {\r\n database.eventDao().update(event);\r\n updateSpeedDialActionItems();\r\n showToast(getString(R.string.event_calendar_add_event_sucess), Toast.LENGTH_LONG);\r\n }", "@Override\n\tpublic void \t\t\t\t\t\tuserDefinedInternalTransition (\n\t\t\t\t\t\t\t\tDuration elapsedTime)\n\t{\n\t\tDuration d1 = new Duration (\n\t\t\t\tthis.interDayDelay , \n\t\t\t\tthis.getSimulatedTimeUnit()\n\t\t\t) ; \n\t\t\n\t\tassert d1 != null ;\n\t\t\n\t\tTime t = this.getCurrentStateTime().add(d1) ; \n\t\tdouble dur = 2.0 * this.meanRunDuration * this.rg.nextBeta(1.75, 1.75) ; \n\t\tdouble temp = 2.0 * this.meanTemperature * this.rg.nextBeta(1.75, 1.75) ; \n\t\t// impossible to set temperature more than MAX_TEMPERATURE\n\t\ttemp = (temp > OvenModel.MAX_TEMPERATURE)?OvenModel.MAX_TEMPERATURE:temp ;\n\t\tthis.scheduleEvent(new RunOven(t, dur , temp));\n\t}", "@Test\n public void testStartDateChange() throws Exception {\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n Calendar date = Calendar.getInstance();\n date.setTimeInMillis(date.getTimeInMillis() + TimeUnit.HOURS.toMillis(1));\n deltaEvent.setStartDate(DateTimeUtil.getDateTime(date));\n\n updateEventAsOrganizer(deltaEvent);\n\n /*\n * Check that start date has been updated\n * Note: Due internal handling of a shortened Event, no rescheduling will happen. Thus the participant status is\n * unchanged. For details see com.openexchange.chronos.impl.Utils.coversDifferentTimePeriod(Event, Event) or\n * http://documentation.open-xchange.com/latest/middleware/calendar/implementation_details.html#reset-of-participation-status\n */\n AnalyzeResponse analyzeResponse = receiveUpdateAsAttendee(PartStat.ACCEPTED, CustomConsumers.ACTIONS);\n AnalysisChange change = assertSingleChange(analyzeResponse);\n assertSingleDescription(change, \"The appointment was rescheduled.\");\n }", "@NonNull\n public Trigger build() {\n return new Trigger(type, goal, null);\n }", "public void execute(JobExecutionContext context) throws JobExecutionException {\n\t\t\n\t\tint scheduler_id=(Integer)context.getJobDetail().getJobDataMap().get(\"scheduler_id\");\t\t\n \tString taskuid=(String)context.getJobDetail().getJobDataMap().get(\"taskuid\");\n \tString invoked_by=(String)context.getJobDetail().getJobDataMap().get(SchedulerEngine.JOBDATA_INVOKED_BY);\n \tString updatedtime=(String)context.getJobDetail().getJobDataMap().get(SchedulerEngine.JOBDATA_UPDATED_TIME);\n \tNumber trigger_row_id=(Number)context.getJobDetail().getJobDataMap().get(SchedulerEngine.JOBDATA_TRIGGER_ROW_ID);\n \t//System.out.println(\"ScheduledTaskJob.execute() 2be removed later:taskuid:\"+taskuid+\" scheduler_id:\"+scheduler_id);\n \t\n \t\n \t\n \ttry{\n \t\t\n\t \t//Map data=getSchedulerData(scheduler_id);\n \t\tSchedulerDB sdb=SchedulerDB.getSchedulerDB();\n \t\tMap data=null;\n \t\tString inject_code=null;\n \t\ttry{\n \t\t\tsdb.connectDB();\n \t\t\tdata=sdb.getScheduler(scheduler_id); \n \t\t\tif(trigger_row_id!=null){\n \t\t\t\tMap trig=sdb.getOneRowTriggerData(trigger_row_id.longValue());\n \t\t\t\tinject_code=(String)trig.get(\"inject_code\");\n \t\t\t}\n \t\t}catch(Exception e){\n \t\t\tthrow e;\n \t\t}finally {\n \t\t\tsdb.closeDB();\n \t\t}\n \t\t\n \t\tif(data.get(\"deleted\")!=null && ((Number)data.get(\"deleted\")).intValue()==1){\n \t\t\tthrow new Exception(\"Deleted Task can't be executed\");\n \t\t}\n \t\t\n \t\tlog.debug(\"trigger_row_id:\"+trigger_row_id+\" inject_code:\"+inject_code);\n\t \t\n\t \tScheduledTask task=new ScheduledTaskFactory().getTask(taskuid);\n\t \tif(task==null) {\n\t \t\tthrow new Exception(\"Task Group not found for the task:\"+scheduler_id);\n\t \t}\n\t \tStackFrame sframe=new StackFrame(task,data);\n\t \tif(invoked_by!=null && !invoked_by.equals(\"\")) {\n\t \t\tsframe.setInvokedby(invoked_by);\n\t \t}else{\n\t \t\tif(updatedtime!=null){\n\t \t\t\tsframe.setInvokedby(\"Scheduler (\"+updatedtime+\")\");\n\t \t\t}else{\n\t \t\t\tsframe.setInvokedby(\"Scheduler\");\n\t \t\t}\n\t \t}\n\t\t\t\n\t\t\tif(context.getTrigger().getPreviousFireTime()!=null){\n\t\t\t\tsframe.setTrigger_time(context.getTrigger().getPreviousFireTime().getTime());\n\t\t\t}else{\n\t\t\t\tsframe.setTrigger_time(new Date().getTime());\n\t\t\t}\n\t\t\t\n\t\t\tif(context.getTrigger().getNextFireTime()!=null){\n\t\t\t\tsframe.setNexttrigger_time(context.getTrigger().getNextFireTime().getTime());\n\t\t\t}\t\t\t\n\t\t\n\t\t\t\n\t\t\tif(Config.getValue(\"load_balancing_server\")!=null && Config.getValue(\"load_balancing_server\").equals(P2PService.getComputerName())){\n\t\t\t\tLoadBalancingQueueItem li=new LoadBalancingQueueItem();\n\t\t\t\tli.setSf(sframe);\n\t\t\t\tInteger id=(Integer)data.get(\"id\");\n\t\t\t\tli.setInject_code(inject_code);\n\t\t\t\tli.setSchedulerid(id);\n\t\t\t\tLoadBalancingQueue.getDefault().add(li);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t/*ScheduledTaskQueue.add(sframe);*/\n\t\t\t}\n\t\t\t\n\t\t\tlog.debug(\"adding task to queue: task:\"+data.get(\"name\"));\n \t}catch(Exception e){\n \t\te.printStackTrace(); \t\t\n \t\t//ClientErrorMgmt.reportError(e, \"Error while triggering task\");\n \t} \n\t\t \n\t\t//String status=null;\n\t\t//try{\t\t\n\t\t\t//task.execute();\n\t\t\t//status=task.EXCECUTION_SUCCESS;\n\t\t//}catch(Exception e){\n\t\t//\tstatus=task.EXCECUTION_FAIL;\t\t\t\n\t\t//\tClientErrorMgmt.reportError(e, null);\n\t\t//}finally{\n\t\t//\ttry{\n\t\t//\t\taddLog(sdate,data,status);\n\t\t//\t}catch(Exception e){\n\t\t//\t\tClientErrorMgmt.reportError(e, null);\n\t\t//\t}\t\t\t\n\t\t//}\n\t\t\n \t\n \t\n\t}", "public void setDate(Date newDate) {\n this.currentDate = newDate;\n }", "protected void fireStateChanged() {\n if (listenerList != null) {\n // Guaranteed to return a non-null array\n Object[] listeners = listenerList.getListenerList();\n // Process the listeners last to first, notifying\n // those that are interested in this event\n for (int i = listeners.length - 2; i >= 0; i -= 2) {\n if (listeners[i] == ChangeListener.class) {\n // Lazily create the event:\n if (changeEvent == null) {\n changeEvent = new ChangeEvent(this);\n }\n ((ChangeListener) listeners[i + 1]).stateChanged(changeEvent);\n }\n }\n }\n }", "public interface TriggerContext {\n\n /**\n * Return the last <i>scheduled</i> execution time of the task, or.\n *\n * @return the date\n * {@code null} if not scheduled before.\n */\n Date lastScheduledExecutionTime();\n\n /**\n * Return the last <i>actual</i> execution time of the task, or {@code null}\n * if not scheduled before.\n *\n * @return the date\n */\n Date lastActualExecutionTime();\n\n /**\n * Return the last completion time of the task, or {@code null} if not\n * scheduled before.\n *\n * @return the date\n */\n Date lastCompletionTime();\n}", "@Override\n\t\t\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t\t\tchange();\n\t\t\t\t}", "public native final EditorBaseEvent changedEvent(EventFacade val) /*-{\n\t\tthis.changedEvent = val;\n\t\treturn this;\n\t}-*/;", "public void testSetProperties() throws Exception {\n final JettySolrRunner runner = cluster.getJettySolrRunner(0);\n final SolrResourceLoader resourceLoader = runner.getCoreContainer().getResourceLoader();\n final SolrCloudManager solrCloudManager = runner.getCoreContainer().getZkController().getSolrCloudManager();\n \n try (ScheduledTriggers scheduledTriggers = new ScheduledTriggers(resourceLoader, solrCloudManager)) {\n AutoScalingConfig config = new AutoScalingConfig(Collections.emptyMap());\n scheduledTriggers.setAutoScalingConfig(config);\n\n // Setup a trigger that records the timestamp of each time it was run\n // we only need 2 timestamps for the test, so limit the queue and make the trigger a No-Op if full\n final BlockingQueue<Long> timestamps = new ArrayBlockingQueue<Long>(2);\n final AutoScaling.Trigger t1 = new MockTrigger(TriggerEventType.NODELOST, \"mock-timestamper\") {\n @Override\n public void run() {\n log.info(\"Running {} in {}\", this.getName(), Thread.currentThread().getName());\n timestamps.offer(solrCloudManager.getTimeSource().getTimeNs());\n }\n };\n\n log.info(\"Configuring simple scheduler and adding trigger: {}\", t1.getName());\n t1.configure(resourceLoader, solrCloudManager, Collections.emptyMap());\n scheduledTriggers.add(t1);\n\n waitForAndDiffTimestamps(\"conf(default delay)\",\n ScheduledTriggers.DEFAULT_SCHEDULED_TRIGGER_DELAY_SECONDS, TimeUnit.SECONDS,\n timestamps);\n \n log.info(\"Reconfiguing scheduler to use 4s delay and clearing queue for trigger: {}\", t1.getName());\n config = config.withProperties(Collections.singletonMap\n (AutoScalingParams.TRIGGER_SCHEDULE_DELAY_SECONDS, 4));\n scheduledTriggers.setAutoScalingConfig(config);\n timestamps.clear();\n\n waitForAndDiffTimestamps(\"conf(four sec delay)\", \n 4, TimeUnit.SECONDS, \n timestamps);\n \n log.info(\"Removing trigger: {}\", t1.getName());\n scheduledTriggers.remove(t1.getName());\n \n log.info(\"Reconfiguing scheduler to use default props\");\n config = config.withProperties(ScheduledTriggers.DEFAULT_PROPERTIES);\n scheduledTriggers.setAutoScalingConfig(config);\n\n \n assertTrue(\"Test sanity check, need default thread pool to be at least 3 so we can\" +\n \"test lowering it by 2\", ScheduledTriggers.DEFAULT_TRIGGER_CORE_POOL_SIZE >= 3);\n final int numTriggers = ScheduledTriggers.DEFAULT_TRIGGER_CORE_POOL_SIZE;\n final int reducedThreadPoolSize = numTriggers - 2;\n \n // Setup X instances of a trigger that:\n // - records it's name as being run\n // - skipping all remaining execution if it's name has already been recorded\n // - records the name of the thread that ran it\n // - blocks on a cyclic barrier untill at Y instances have run (to hog a thread)\n // ...to test that the scheduler will add new threads as needed, up to the configured limit\n //\n // NOTE: the reason we need X unique instances is because the scheduler won't \"re-run\" a single\n // trigger while a previouss \"run\" is still in process\n final List<AutoScaling.Trigger> triggerList = new ArrayList<>(numTriggers);\n \n // Use a cyclic barrier gated by an atomic ref so we can swap it out later\n final AtomicReference<CyclicBarrier> latch = new AtomicReference<>(new CyclicBarrier(numTriggers));\n \n // variables for tracking state as we go\n // NOTE: all read/write must be gated by synchronizing on the barrier (ref),\n // so we we can ensure we are reading a consistent view\n final Set<String> threadNames = Collections.synchronizedSet(new LinkedHashSet<>());\n final Set<String> triggerNames = Collections.synchronizedSet(new LinkedHashSet<>());\n final AtomicLong fails = new AtomicLong(0);\n\n // Use a semaphore to track when each trigger *finishes* so our test thread\n // can know when to check & clear the tracking state\n final Semaphore completionSemaphore = new Semaphore(numTriggers);\n \n for (int i = 0; i < numTriggers; i++) {\n AutoScaling.Trigger trigger = new MockTrigger(TriggerEventType.NODELOST,\n \"mock-blocking-trigger-\" + i) {\n @Override\n public void run() {\n log.info(\"Running {} in {}\", this.getName(), Thread.currentThread().getName());\n CyclicBarrier barrier = null;\n synchronized (latch) {\n if (triggerNames.add(this.getName())) {\n log.info(\"{}: No-Op since we've already recorded a run\", this.getName());\n return;\n }\n threadNames.add(Thread.currentThread().getName());\n barrier = latch.get();\n }\n \n try {\n log.info(\"{}: waiting on barrier to hog a thread\", this.getName());\n barrier.await(30, TimeUnit.SECONDS);\n completionSemaphore.release();\n } catch (Exception e) {\n fails.incrementAndGet();\n log.error(this.getName() + \": failure waiting on cyclic barrier: \" + e.toString(), e);\n }\n }\n };\n\n trigger.configure(resourceLoader, solrCloudManager, Collections.emptyMap());\n triggerList.add(trigger);\n completionSemaphore.acquire();\n log.info(\"Adding trigger {} to scheduler\", trigger.getName());\n scheduledTriggers.add(trigger);\n }\n \n log.info(\"Waiting on semaphore for all triggers to signal completion...\");\n assertTrue(\"Timed out waiting for semaphore count to be released\",\n completionSemaphore.tryAcquire(numTriggers, 60, TimeUnit.SECONDS));\n \n synchronized (latch) {\n assertEquals(\"Unexpected number of trigger names found: \" + triggerNames.toString(),\n numTriggers, triggerNames.size());\n assertEquals(\"Unexpected number of thread ames found: \" + threadNames.toString(),\n numTriggers, threadNames.size());\n assertEquals(\"Unexpected number of trigger fails recorded, check logs?\",\n 0, fails.get());\n\n // before releasing the latch, clear the state and update our config to use a lower number of threads\n log.info(\"Updating scheduler config to use {} threads\", reducedThreadPoolSize);\n config = config.withProperties(Collections.singletonMap(AutoScalingParams.TRIGGER_CORE_POOL_SIZE,\n reducedThreadPoolSize));\n scheduledTriggers.setAutoScalingConfig(config);\n\n log.info(\"Updating cyclic barrier and clearing test state so triggers will 'run' again\");\n latch.set(new CyclicBarrier(reducedThreadPoolSize));\n threadNames.clear();\n triggerNames.clear();\n }\n \n log.info(\"Waiting on semaphore for all triggers to signal completion...\");\n assertTrue(\"Timed out waiting for semaphore count to be released\",\n completionSemaphore.tryAcquire(numTriggers, 60, TimeUnit.SECONDS));\n \n synchronized (latch) {\n assertEquals(\"Unexpected number of trigger names found: \" + triggerNames.toString(),\n numTriggers, triggerNames.size());\n assertEquals(\"Unexpected number of thread names found: \" + threadNames.toString(),\n reducedThreadPoolSize, threadNames.size());\n assertEquals(\"Unexpected number of trigger fails recorded, check logs?\",\n 0, fails.get());\n }\n }\n }", "protected void fireStateChanged() {\n Object[] listeners = changeListeners.getListenerList();\n // Process teh listeners last to first, notifying those that are\n // interested in this event.\n for (int i = listeners.length - 2; i >= 0; i -= 2) {\n if (listeners[i] == ChangeListener.class) {\n if (changeEvent == null) {\n changeEvent = new ChangeEvent(this);\n ((ChangeListener) listeners[i + 1]).stateChanged(changeEvent);\n }\n }\n }\n }", "private boolean checkForNewData ()\n\t{\t\t\n\t\tLOG.info(\"Checking trigger source '\" + config.getTriggerSource() + \".\" + \n\t\t\t\tconfig.getTriggerTable() + \".\" + config.getTriggerColumn() + \"'\");\n\t\t\n\t\t// get value from source\n\t\tObject newValue = null;\n\t\tint colType = -1;\n\t\ttry \n\t\t{\n\t\t\tSourceDatabase sourceDatabase = CopyToolConnectionManager.getInstance().getSourceDatabase(config.getTriggerSource());\n\t\t\t\n\t\t\tStatement selectStmt =\n\t\t\t\t\tCopyToolConnectionManager.getInstance().getSourceConnection(config.getTriggerSource()).createStatement();\n\t\t\t\n\t\t\tString triggerDate = sourceDatabase.getDatabaseType().getSelectTriggerColumnQuery(config.getTriggerTable(), config.getTriggerColumn());\n\t\t\tResultSet res = selectStmt.executeQuery(triggerDate);\n\t\t\t\n\t\t\t// no rows in table? then we cannot determine any indication\n\t\t\t// so we return indication of new data\n\t\t\tif (!res.next()) return true;\t\t\t\n\t\t\t\n\t\t\tResultSetMetaData info = res.getMetaData();\n\t\t\t\n\t\t\tcolType = info.getColumnType(1);\n\t\t\t\t\t\t\n\t\t\tif (colType == Types.BIGINT || colType == Types.INTEGER)\n\t\t\t{\n\t\t\t\tcolType = Types.BIGINT;\n\t\t\t\tnewValue = res.getLong(1);\n\t\t\t}\n\t\t\telse if (colType == Types.DATE)\n\t\t\t{\n\t\t\t\tnewValue = res.getDate(1);\n\t\t\t}\n\t\t\telse if (colType == Types.TIMESTAMP)\n\t\t\t{\n\t\t\t\tnewValue = res.getTimestamp(1);\n\t\t\t}\n\t\t\t\n\t\t\tres.close();\n\t\t\tselectStmt.close();\n\t\t}\n\t\tcatch (SQLException e)\n\t\t{\n\t\t\tLOG.warn(\"SQLException when trying to access scheduling source\", e);\n\t\t\t\n\t\t\t// return indication of new data since we don't know for sure\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (newValue == null)\n\t\t{\n\t\t\t// return indication of new data since we don't know for sure\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// load existing value from disk\n\t\tFile jobFile = getLastRunFile();\n\t\t\n\t\tBufferedReader br = null;\n\t\tString oldValue = null;\n\t\tString oldColType = null;\n\t\tString oldConfigChecksum = null;\n\t\tif (jobFile.exists()) \n\t\t{\n\t\t\ttry {\n\t\t\t\tbr = new BufferedReader(new FileReader(jobFile));\n\t\t\t\toldValue = br.readLine();\n\t\t\t\toldColType = br.readLine();\n\t\t\t\toldConfigChecksum = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// ignore\n\t\t\t\tLOG.warn(\"Unable to read existing lastrun info\", e);\n\t\t\t} finally {\n\t\t try {\n\t\t \tif (br != null)\n\t\t \t\tbr.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// ignore\n\t\t\t\t}\n\t\t }\n\t\t}\n\t\t\n\t\t// set last run properties\n\t\tthis.lastRunValue = newValue;\n\t\tthis.lastRunColType = colType;\n\t \n\t if (StringUtils.isEmpty(oldValue) || StringUtils.isEmpty(oldColType) || StringUtils.isEmpty(oldConfigChecksum))\n\t {\n\t \t// return indication of new data since we don't know for sure\n\t\t\treturn true;\n\t }\n\t \n\t // check if we are dealing with the same type of data\n\t if (!oldColType.equals(String.valueOf(colType)))\n\t {\n\t \t// return indication of new data since we don't know for sure\n\t \treturn true;\n\t }\n\t \n\t // check if we are dealing with the same config\n\t if (!oldConfigChecksum.equals(config.getConfigChecksum()))\n\t {\n\t \t// return indication of new data since we don't know for sure\n\t \treturn true;\n\t }\n\t \n\t LOG.info(\"Stored last run value: \" + oldValue);\n\t LOG.info(\"Current last run value: \" + newValue);\n\t \n\t // check if there is newer data\n\t if (colType == Types.BIGINT)\n\t {\n\t \tLong oldNum = Long.valueOf(oldValue);\n\t \tLong newNum = (Long) newValue;\n\t \t\n\t \t// is new ID / long bigger than current?\n\t \t// then we have new data\n\t \tif (newNum > oldNum)\n\t \t\treturn true;\n\t }\n\t else if (colType == Types.DATE)\n\t {\n\t \tDate oldDate = Date.valueOf(oldValue);\n\t \tDate newDate = (Date) newValue;\n\t \t\n\t \t// is newer date after older date?\n\t \t// then we have new data\n\t \tif (newDate.after(oldDate))\n\t \t\treturn true;\n\t }\n\t else if (colType == Types.TIMESTAMP)\n\t {\n\t \tTimestamp oldTS = Timestamp.valueOf(oldValue);\n\t \tTimestamp newTS = (Timestamp) newValue;\n\t \t\n\t \t// is newer timestamp after older timestamp?\n\t \t// then we have new data\n\t \tif (newTS.after(oldTS))\n\t \t\treturn true;\n\t }\n\t\t\n\t // no new data\n\t\treturn false;\n\t}", "public void onTriggerChange() {\n findViewById(R.id.temp).post(new Runnable() {\n public void run() {\n ConsumerIrManager mCIR = ScaryUtil.getConsumerIRService(getApplicationContext());\n if (m_Inst.power) {\n TransmissionCode data = ScaryUtil.getIRCode(m_Inst.sequence, m_Inst.temp); // (TransmissionCode)samsung.get(m_Inst.temp);\n ScaryUtil.transmit(getApplicationContext(),data);\n }\n }\n });\n }", "protected void fireStateChanged(){\n Object[] listeners=listenerList.getListenerList();\n // Process the listeners last to first, notifying\n // those that are interested in this event\n for(int i=listeners.length-2;i>=0;i-=2){\n if(listeners[i]==ChangeListener.class){\n // Lazily create the event:\n if(changeEvent==null)\n changeEvent=new ChangeEvent(this);\n ((ChangeListener)listeners[i+1]).stateChanged(changeEvent);\n }\n }\n }", "@Override\n public void update() {\n if (timeSource.getTime() >= endTime) {\n logger.debug(\"Final laser cooldown complete laser ready to fire\");\n System.out.println(\"Firing again\");\n laser.changeState(new FiringState(laser, owner));\n }\n }", "public abstract boolean isTrigger();", "ITrigger getTrigger(String sTriggerName);", "@Nonnull\n public JDK8TriggerBuilder <T> startNow ()\n {\n return startAt (PDTFactory.getCurrentLocalDateTime ());\n }", "@Override\n\t\t\t\tpublic void changedUpdate(final DocumentEvent e) {\n\t\t\t\t}", "@Override\n public void adjustStartEventSubscriptions(ProcessDefinitionEntity newLatestProcessDefinition, ProcessDefinitionEntity oldLatestProcessDefinition) {\n super.adjustStartEventSubscriptions(newLatestProcessDefinition, oldLatestProcessDefinition);\n\n LOG.debug(\"Adding start event simulation timers.\");\n removeObsoleteStartEventSimulationJobs(newLatestProcessDefinition);\n addStartEventSimulationJobs(newLatestProcessDefinition);\n }", "private void updateNonRecurringSchedule() {\n int pos = scheduleSpinner.getSelectedItemPosition();\n PHSchedule schedule = nonRecurringSchedules.get(pos);\n\n String timerName = editTvScheduleName.getText().toString().trim();\n if (timerName.length() != 0) {\n schedule.setName(timerName);\n }\n\n if (timeToSend == null) {\n PHWizardAlertDialog.showErrorDialog(\n PHUpdateNonRecurringScheduleActivity.this, getResources()\n .getString(R.string.txt_empty_time),\n R.string.btn_ok);\n return;\n } else {\n schedule.setDate(timeToSend);\n\n }\n\n String lightIdentifier = null;\n String groupIdentifier = null;\n if (rbLightForSchedule.isChecked()) {\n int lightPos = lightSpinner.getSelectedItemPosition();\n PHLight light = lights.get(lightPos);\n lightIdentifier = light.getIdentifier();\n schedule.setLightIdentifier(lightIdentifier);\n schedule.setGroupIdentifier(null);\n\n } else if (rbGroupForSchedule.isChecked()) {\n int groupPos = groupSpinner.getSelectedItemPosition();\n PHGroup group = groups.get(groupPos);\n groupIdentifier = group.getIdentifier();\n schedule.setGroupIdentifier(groupIdentifier);\n schedule.setLightIdentifier(null);\n }\n\n if (stateToSend != null) {\n schedule.setLightState(stateToSend);\n }\n\n String timerDescription = editTvScheduleDescriptor.getText().toString()\n .trim();\n\n if (timerDescription.length() != 0) {\n schedule.setDescription(timerDescription);\n }\n\n String timerRandomTime = editTvScheduleRandomTime.getText().toString()\n .trim();\n if (timerRandomTime.length() != 0) {\n schedule.setRandomTime(Integer.parseInt(timerRandomTime));\n }\n\n final PHWizardAlertDialog dialogManager = PHWizardAlertDialog\n .getInstance();\n dialogManager.showProgressDialog(R.string.sending_progress,\n PHUpdateNonRecurringScheduleActivity.this);\n\n bridge.updateSchedule(schedule, new PHScheduleListener() {\n\n @Override\n public void onSuccess() {\n\n dialogManager.closeProgressDialog();\n PHUpdateNonRecurringScheduleActivity.this.runOnUiThread(new Runnable() {\n public void run() {\n if (isCurrentActivity()) { \n PHWizardAlertDialog.showResultDialog(PHUpdateNonRecurringScheduleActivity.this, getString(R.string.txt_timer_updated), R.string.btn_ok, R.string.txt_result);\n }\n }\n });\n \n }\n\n @Override\n public void onStateUpdate(\n Hashtable<String, String> successAttribute,\n List<PHHueError> errorAttribute) {\n // TODO Auto-generated method stub\n }\n\n @Override\n public void onError(int code, final String msg) {\n dialogManager.closeProgressDialog();\n Log.v(TAG, \"onError : \" + code + \" : \" + msg);\n PHUpdateNonRecurringScheduleActivity.this.runOnUiThread(new Runnable() {\n public void run() {\n if (isCurrentActivity()) { \n PHWizardAlertDialog.showErrorDialog(PHUpdateNonRecurringScheduleActivity.this, msg,R.string.btn_ok);\n }\n }\n });\n \n }\n });\n }", "@Override\n\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t\n\t\t}", "public void aChanged()\r\n throws OpbDataAccessException {\r\n final String methodName = \"aChanged()\";\r\n\r\n logger.entering(CLASS_NAME, methodName);\r\n\r\n final OpbPlsqlCallHelper opbCallHelper = new OpbPlsqlCallHelper(\r\n logger, CLASS_NAME, methodName,\r\n opbConnectionProvider,\r\n \"BEGIN fields.a_changed(); END;\");\r\n\r\n opbCallHelper.execute();\r\n\r\n opbCallHelper.callComplete();\r\n\r\n logger.exiting(CLASS_NAME, methodName);\r\n\r\n }", "@Override\n\tpublic void changeToReleaseRefresh() {\n\n\t}", "public final void run() {\t\n\t\tlong timeStamp = file.lastModified();\n\t if( this.timeStamp != timeStamp ) {\n\t \tthis.timeStamp = timeStamp;\n\t \tonChange(file);\n\t }\n\t}", "protected void fireUpdateEvent(UpdateResult evt) {\n \t\tif (periodModel != null) {\n \t\t\ttry {\n \t\t\t\tperiodModel.update();\n \t\t\t} catch (RaplaException e) {\n \t\t\t\tgetLogger().error(\"Can't update Period Model\", e);\n \t\t\t}\n \t\t}\n \t\t{\n \t\t\tCollection<ModificationListener> modificationListeners = directListenerList;\n \t\t\tif (modificationListeners.size() > 0 ) {\n \t\t\t\tnew UpdateCommandModification(modificationListeners,evt).execute(); \n \t\t\t}\n \t\t}\n \t\t{\n \t\t\tCollection<ModificationListener> modificationListeners = getModificationListeners();\n \t\t\tif (modificationListeners.size() > 0 ) {\n \t\t\t\tnotifyQueue.schedule(new UpdateCommandModification(modificationListeners, evt),0);\n \t\t\t}\n \t\t\tCollection<AllocationChangeListener> allocationChangeListeners = getAllocationChangeListeners();\n \t\t\tif (allocationChangeListeners.size() > 0) {\n \t\t\t\tnotifyQueue.schedule(new UpdateCommandAllocation(allocationChangeListeners, evt),0);\n \t\t\t}\n \t\t}\n \t}", "@Nonnull\n public static JDK8TriggerBuilder <ITrigger> newTrigger ()\n {\n return new JDK8TriggerBuilder <> ();\n }", "public void setRetriggerMode( RetriggerMode retriggerMode );", "@Override\r\n\tpublic void onBeforeUpdate(Record record) throws DeadlineExceededException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tint newStatus = (Integer) record.getValue(\"resignationstatusid\");\r\n\t\tint oldStatus = (Integer) record.getOldValue(\"resignationstatusid\");\r\n\t\tif((oldStatus == HRISConstants.RESIGNATION_NEW || oldStatus == HRISConstants.RESIGNATION_ONHOLD || oldStatus == HRISConstants.RESIGNATION_REJECTED)&& newStatus == HRISConstants.RESIGNATION_ACCEPTED){\r\n\t\t\t\r\n\t\t\tString TODAY_DATE = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(SystemParameters.getCurrentDateTime());\r\n\t\t\trecord.addUpdate(\"approveddate\",TODAY_DATE);\r\n\t\t}\r\n\t}", "@Test\n public void testStartAndEndDateChange() throws Exception {\n EventData deltaEvent = prepareDeltaEvent(createdEvent);\n Calendar date = Calendar.getInstance();\n date.setTimeInMillis(date.getTimeInMillis() + TimeUnit.HOURS.toMillis(2));\n deltaEvent.setStartDate(DateTimeUtil.getDateTime(date));\n date.setTimeInMillis(date.getTimeInMillis() + TimeUnit.HOURS.toMillis(2));\n deltaEvent.setEndDate(DateTimeUtil.getDateTime(date));\n\n updateEventAsOrganizer(deltaEvent);\n\n /*\n * Check that dates has been updated\n */\n AnalyzeResponse analyzeResponse = receiveUpdateAsAttendee(PartStat.NEEDS_ACTION, CustomConsumers.ACTIONS);\n AnalysisChange change = assertSingleChange(analyzeResponse);\n assertSingleDescription(change, \"The appointment was rescheduled.\");\n }" ]
[ "0.5733932", "0.5647571", "0.55533177", "0.5427889", "0.5427256", "0.5407242", "0.52759516", "0.525091", "0.5237475", "0.5225869", "0.51524365", "0.5126995", "0.51075596", "0.5098891", "0.50875586", "0.50854844", "0.50701314", "0.5054463", "0.50265", "0.5023134", "0.5017639", "0.5010261", "0.50006133", "0.499133", "0.4988164", "0.498399", "0.49565995", "0.49283287", "0.492546", "0.492512", "0.4922147", "0.49118492", "0.48879457", "0.48847356", "0.48793572", "0.48777503", "0.48739785", "0.4870798", "0.48656023", "0.48631656", "0.48564723", "0.48456973", "0.4844253", "0.4842084", "0.4841737", "0.4830907", "0.483079", "0.48303345", "0.48289385", "0.48241743", "0.48138958", "0.48056433", "0.4803419", "0.47673002", "0.4766954", "0.47664133", "0.47624788", "0.47599316", "0.47554636", "0.47545236", "0.47493702", "0.47440135", "0.47379294", "0.4737915", "0.4734627", "0.47319773", "0.47225523", "0.47221485", "0.4713831", "0.47087744", "0.47085127", "0.47066286", "0.47020748", "0.46996948", "0.46925575", "0.46897855", "0.46872228", "0.46799818", "0.46687737", "0.46670315", "0.46624714", "0.46533954", "0.46527857", "0.4650504", "0.46494114", "0.4648784", "0.46482775", "0.46482766", "0.46469116", "0.4643965", "0.46398914", "0.46350196", "0.46327484", "0.46255565", "0.46251446", "0.46240497", "0.4621164", "0.46209472", "0.46181095", "0.46169895" ]
0.619571
0
Validates whether the properties of the JobDetail are valid for submission into a Scheduler.
public void validate() throws SchedulerException { if (name == null) { throw new SchedulerException("Trigger's name cannot be null"); } if (group == null) { throw new SchedulerException("Trigger's group cannot be null"); } if (jobName == null) { throw new SchedulerException( "Trigger's related Job's name cannot be null"); } if (jobGroup == null) { throw new SchedulerException( "Trigger's related Job's group cannot be null"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void validateSchedular() {\n boolean startDateCheck = false, cronTimeCheck = false, dateFormatCheck = false;\n /*\n Schedular Properties\n */\n\n System.out.println(\"Date: \" + startDate.getValue());\n if (startDate.getValue() != null) {\n System.out.println(\"Date: \" + startDate.getValue());\n startDateCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Start Date should not be empty.\\n\");\n }\n\n if (!cronTime.getText().isEmpty()) {\n cronTimeCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Cron Time should not be empty.\\n\");\n }\n// if (!dateFormat.getText().isEmpty()) {\n// dateFormatCheck = true;\n// } else {\n// execptionData.append((++exceptionCount) + \". Date Format should not be empty.\\n\");\n// }\n\n if (startDateCheck == true && cronTimeCheck == true) {\n schedularCheck = true;\n } else {\n schedularCheck = false;\n startDateCheck = false;\n cronTimeCheck = false;\n dateFormatCheck = false;\n }\n\n }", "private void validate() throws FlightCreationException {\n validateNotNull(\"number\", number);\n validateNotNull(\"company name\", companyName);\n validateNotNull(\"aircraft\", aircraft);\n validateNotNull(\"pilot\", pilot);\n validateNotNull(\"origin\", origin);\n validateNotNull(\"destination\", destination);\n validateNotNull(\"departure time\", scheduledDepartureTime);\n\n if (scheduledDepartureTime.isPast()) {\n throw new FlightCreationException(\"The departure time cannot be in the past\");\n }\n\n if (origin.equals(destination)) {\n throw new FlightCreationException(\"The origin and destination cannot be the same\");\n }\n }", "private boolean validateMandatoryParameters(QuotationDetailsDTO detail) {\t\n\n\t\tif(detail.getArticleName() == null || detail.getArticleName().equals(EMPTYSTRING)){\t\t\t\n\t\t\tAdminComposite.display(\"Please Enter Article Name\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "protected void validateEntity()\n {\n super.validateEntity();\n \n Date startDate = getStartDate();\n Date endDate = getEndDate();\n \n validateStartDate(startDate);\n validateEndDate(endDate);\n\n // We validate the following here instead of from within an attribute because\n // we need to make sure that both values are set before we perform the test.\n\n if (endDate != null)\n {\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, whenever comparing jbo\n // Date objects, we have to convert to long values.\n \n long endDateLong = endDate.dateValue().getTime();\n\n // We can assume we have a Start Date or the validation of this \n // value would have thrown an exception.\n \n if (endDateLong < startDate.dateValue().getTime())\n {\n throw new OARowValException(OARowValException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(),\n getPrimaryKey(),\n \"AK\", // Message product short name\n \"FWK_TBX_T_START_END_BAD\"); // Message name\n } \n } \n \n }", "private static void testValid() throws Throwable {\n Scheduler userInt = SchedulerTHelper.getSchedulerInterface();\n\n for (int i = 0; i < jobs_valid; i++) {\n String job_path = new File(jobs_path.toURI()).getAbsolutePath() + \"/flow_valid_\" + (i + 1) +\n \".xml\";\n\n Exception exc = null;\n JobId job = null;\n try {\n job = userInt.submit(JobFactory.getFactory().createJob(job_path));\n } catch (Exception e) {\n exc = e;\n } finally {\n userInt.removeJob(job);\n }\n Assert.assertTrue(\"JobFactory returned null for valid job \" + job_path, job != null);\n Assert.assertTrue(\"JobFactory threw an exception for valid job \" + job_path, exc == null);\n }\n SchedulerTHelper.log(jobs_valid + \" valid jobs successfully created\");\n }", "public void validate(Object obj, Errors errors) {\n\t\t\n\t\tBooking booking = (Booking) obj;\n\t\t\n\t\tValidationUtils.rejectIfEmptyOrWhitespace(errors, \"aptNo\", \"error.invalid.aptNo\", \"Apartment Number Required\");\n ValidationUtils.rejectIfEmptyOrWhitespace(errors, \"street\", \"error.invalid.street\", \"Street Required\");\n ValidationUtils.rejectIfEmptyOrWhitespace(errors, \"city\", \"error.invalid.city\", \"City Required\");\n ValidationUtils.rejectIfEmptyOrWhitespace(errors, \"state\", \"error.invalid.state\", \"State Required\");\n ValidationUtils.rejectIfEmptyOrWhitespace(errors, \"zipCode\", \"error.invalid.zipCode\", \"Zipcode Required\");\n \n\t}", "@Override\n public boolean isValid() {\n return dateFrom != null && dateTo != null;\n }", "@Override\n public boolean validate() throws ValidationException\n {\n boolean isValid = super.validate();\n return checkAAField() && isValid;\n }", "public List<ValidationResultInfo> validateSchedule(@WebParam(name = \"validationTypeKey\") String validationTypeKey,\n @WebParam(name = \"scheduleTypeKey\") String scheduleTypeKey,\n @WebParam(name = \"scheduleInfo\") ScheduleInfo scheduleInfo,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws DoesNotExistException,\n InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;", "@Override\n public void validate(TravelHistoryBean bean) throws FormValidationException {\n ErrorList errorList = new ErrorList();\n errorList.addIfNotNull(checkFormat(\"patientMID\", bean.getPatientMID(), ValidationFormat.MID, false));\n errorList.addIfNotNull(checkFormat(\"travelledCities\", bean.getTravelledCities(), ValidationFormat.Travelled_Cities, false));\n if (bean.getStartDate() != null) {\n errorList.addIfNotNull(checkFormat(\"startDate\", bean.getStartDate().toString(), ValidationFormat.START_END_DATE, true));\n }\n if (bean.getEndDate() != null) {\n errorList.addIfNotNull(checkFormat(\"endDate\", bean.getEndDate().toString(), ValidationFormat.START_END_DATE, true));\n }\n if (errorList.hasErrors()) {\n throw new FormValidationException(errorList);\n }\n }", "public static void validateJobParameters(final BatchJob batchJob,\n\t\t\tfinal OabaParameters expected, final OabaParameters params) {\n\t\tassertTrue(params != null);\n\t\tassertTrue(params.getLowThreshold() == expected.getLowThreshold());\n\t\tassertTrue(params.getHighThreshold() == expected.getHighThreshold());\n\t\tassertTrue(params.getOabaLinkageType() == expected.getOabaLinkageType());\n\n\t\tfinal OabaLinkageType linkage = params.getOabaLinkageType();\n\t\tif (OabaLinkageType.STAGING_DEDUPLICATION == linkage) {\n\t\t\tassertTrue(params.getReferenceRsId() == null);\n\t\t\tassertTrue(params.getReferenceRsType() == null);\n\t\t} else {\n\t\t\tassertTrue(params.getReferenceRsId() != null\n\t\t\t\t\t&& params.getReferenceRsId().equals(expected.getReferenceRsId()));\n\t\t\tassertTrue(params.getReferenceRsType() != null\n\t\t\t\t\t&& params.getReferenceRsType().equals(\n\t\t\t\t\t\t\texpected.getReferenceRsType()));\n\t\t}\n\t\tassertTrue(params.getQueryRsId() == expected.getQueryRsId());\n\t\tassertTrue(params.getQueryRsType() != null\n\t\t\t\t&& params.getQueryRsType().equals(expected.getQueryRsType()));\n\t\tassertTrue(params.getModelConfigurationName() != null\n\t\t\t\t&& params.getModelConfigurationName().equals(\n\t\t\t\t\t\texpected.getModelConfigurationName()));\n\n\t}", "public void validate() {\n transportStats.validate(this);\n\n for (String unitName : produces) {\n Args.validate(!UnitFactory.hasUnitForName(unitName), \"Illegal unit name \" + unitName + \" in build unit stats\");\n }\n\n for (Map.Entry<String, String> entry : buildCities.entrySet()) {\n String terrainName = entry.getKey();\n String cityName = entry.getValue();\n Args.validate(!TerrainFactory.hasTerrainForName(terrainName), \"Illegal terrain \" + terrainName + \" in build cities stats\");\n Args.validate(!CityFactory.hasCityForName(cityName), \"Illegal city \" + cityName + \" in build cities stats\");\n }\n\n for (String unitName : supplyUnits) {\n Args.validate(!UnitFactory.hasUnitForName(unitName), \"Illegal unit \" + unitName + \" in supply units stats\");\n }\n\n for (String unitName : supplyUnitsInTransport) {\n Args.validate(!UnitFactory.hasUnitForName(unitName), \"Illegal unit \" + unitName + \" in supply units in transport stats\");\n }\n\n Args.validate(StringUtil.hasContent(primaryWeaponName) && !WeaponFactory.hasWeapon(primaryWeaponName),\n \"Illegal primary weapon \" + primaryWeaponName + \" for unit \" + name);\n Args.validate(StringUtil.hasContent(secondaryWeaponName) && !WeaponFactory.hasWeapon(secondaryWeaponName),\n \"Illegal secondary weapon \" + secondaryWeaponName + \" for unit \" + name);\n }", "public void validate() throws org.apache.thrift.TException {\n if (version == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'version' was not present! Struct: \" + toString());\n }\n if (am_handle == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'am_handle' was not present! Struct: \" + toString());\n }\n if (user == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'user' was not present! Struct: \" + toString());\n }\n if (resources == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'resources' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'gang' because it's a primitive and you chose the non-beans generator.\n // check for sub-struct validity\n if (am_handle != null) {\n am_handle.validate();\n }\n if (reservation_id != null) {\n reservation_id.validate();\n }\n }", "private static void checkSchedulerProperties() throws IOException {\r\n\r\n Properties properties = new Properties();\r\n FileInputStream input = new FileInputStream(SCHEDULER_PROPERTIES_PATH);\r\n properties.load(input);\r\n\r\n if (MongoDB.getAll(Timeframe.class).isEmpty()) {\r\n\r\n int days = Integer\r\n .valueOf(properties.getProperty(\"timeframe.days\"));\r\n int timeSlots = Integer.valueOf(properties\r\n .getProperty(\"timeframe.timeSlots\"));\r\n int startHour = Integer.valueOf(properties\r\n .getProperty(\"timeframe.startHour\"));\r\n String[] weekdays = properties.getProperty(\"timeframe.weekdays\")\r\n .replace(\" \", \"\").split(\",\");\r\n\r\n Timeframe timeframe = new Timeframe(days, timeSlots, startHour,\r\n Arrays.asList(weekdays));\r\n MongoDB.store(timeframe);\r\n System.out.println(\"Created default timeframe.\");\r\n }\r\n\r\n if (MongoDB.getAll(Equipment.class).isEmpty()) {\r\n\r\n String[] items = properties.getProperty(\"equipment\")\r\n .replace(\" \", \"\").split(\",\");\r\n Equipment equipment = new Equipment(items);\r\n MongoDB.store(equipment);\r\n System.out.println(\"Created default equipment\");\r\n }\r\n }", "public void validate() throws org.apache.thrift.TException {\n if (!is_set_destApp()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'destApp' is unset! Struct:\" + toString());\n }\n\n if (!is_set_destPellet()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'destPellet' is unset! Struct:\" + toString());\n }\n\n if (!is_set_data()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'data' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (!isSetResourcePlanName()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'resourcePlanName' is unset! Struct:\" + toString());\n }\n\n if (!isSetPoolPath()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'poolPath' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (partition_exprs == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'partition_exprs' was not present! Struct: \" + toString());\n }\n if (partition_infos == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'partition_infos' was not present! Struct: \" + toString());\n }\n if (rollup_schemas == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'rollup_schemas' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "protected void validate() {\n super.validate();\n\n if (durableConsumers && durableSubscriptionName == null) {\n // JMS topic consumer for JMS destination ''{0}'' is configured to use durable subscriptions but it does not have a durable subscription name.\n ConfigurationException ce = new ConfigurationException();\n ce.setMessage(JMSConfigConstants.MISSING_DURABLE_SUBSCRIPTION_NAME, new Object[]{destinationJndiName});\n throw ce;\n }\n }", "@Override\n\tpublic void validate(OrthopedicSurgeryRecordBean bean) throws FormValidationException {\n\t\tErrorList errorList = new ErrorList();\n\t\tif (bean != null) {\n\t\t\t//at this point, we can assume that all numerical fields have made it into the bean successfully,\n\t\t\t//we still need to check to make sure they are in the right ranges.\n\t\t\t\n\t\t\tif(bean.getVisitDateString() == null || bean.getVisitDateString().equals(\"\")){\n\t\t\t\terrorList.addIfNotNull(\"Date is a required field\");\n\t\t\t}\n\t\t\terrorList.addIfNotNull(checkFormat(\"Visit Date:\", bean.getVisitDateString(), ValidationFormat.DATE, true));\n\t\t\t\n\t\t\terrorList.addIfNotNull(checkFormat(\"Last Name:\", bean.getLastName(), ValidationFormat.NAME, false));\n\t\t\terrorList.addIfNotNull(checkFormat(\"First Name:\", bean.getFirstName(), ValidationFormat.NAME, false));\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t} else {\n\t\t\terrorList.addIfNotNull(\"Bean is null.\");\n\t\t}\n\t\t\n\t\tif (errorList.hasErrors()){\n\t\t\tthrow new FormValidationException(errorList);\n\t\t}\n\t}", "public ListingFormValidationObject() {\n this.titleValid = true;\n this.descriptionValid = true;\n this.initPriceValid = true;\n this.minBidValid = true;\n this.startDateAndTimeValid = true;\n this.categoryValid = true;\n this.endDateAndTimeValid = true;\n }", "public List<ValidationResultInfo> validateScheduleBatch(@WebParam(name = \"validationTypeKey\") String validationTypeKey,\n @WebParam(name = \"scheduleBatchTypeKey\") String scheduleBatchTypeKey,\n @WebParam(name = \"scheduleBatchInfo\") ScheduleBatchInfo scheduleBatchInfo,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws DoesNotExistException,\n InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;", "public void validateComponent() throws org.apache.ant.common.util.ExecutionException {\n if (name == null) {\n throw new org.apache.ant.common.util.ExecutionException(\"\\\"name\\\" attribute of \" + \"<property> must be supplied\");\n }\n if (value == null) {\n throw new org.apache.ant.common.util.ExecutionException(\"\\\"value\\\" attribute of \" + \"<property> must be supplied\");\n }\n }", "JobDetails properties();", "public void validate() throws org.apache.thrift.TException {\n if (emailId == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'emailId' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() throws org.apache.thrift.TException {\n if (stampedeId != null) {\n stampedeId.validate();\n }\n if (runId != null) {\n runId.validate();\n }\n }", "@Override\r\n\tpublic void validate(ValidationContext validationContext)\r\n\t{\r\n\t\tEmpresa empresa =\r\n\t\t\t\t(Empresa)validationContext.getObjectToBeValidated(Empresa.class.getSimpleName());\r\n\r\n\t\t// Do the basic check first: do I even have an Object to validate ?\r\n\t\tif (ValidationUtil.isNull(empresa))\r\n\t\t{\r\n\t\t\tvalidationContext.getMessages().add(\r\n\t\t\t\t\tnew MessageInfo(PROSPERITASGLOBAL_BASE_LOCATIONVALIDATOR_LOCATION_REQUIRED,\r\n\t\t\t\t\t\t\tMessage.MessageSeverity.Error,\r\n\t\t\t\t\t\t\tMessage.MessageLevel.Field));\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// performValidation(validationContext, empresa);\r\n\r\n\t\tif (!validationContext.isStopProcessing()\r\n\t\t\t\t&& !ValidationContextIndicator.FETCH_BY_ID.equals(validationContext.getValidationContextIndicator()))\r\n\t\t{\r\n\t\t\tvalidateAdditionalFields(validationContext.getMessages(), empresa);\r\n\t\t}\r\n\r\n\t}", "void validateProperties() {\n super.validateProperties();\n validatePropertySet(\"token\", getToken());\n }", "public void validate() throws org.apache.thrift.TException {\n if (institutionID == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'institutionID' was not present! Struct: \" + toString());\n }\n if (productids == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'productids' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public boolean isValid(){\n\t\tif (bigstart != null && bigend != null){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public void validateCreateCustomerAndTask() {\n\t\tAttSelectNewCustomerOptionFromListBox.click();\n\t\tAttCustomerNameTextBox.sendKeys(\"TestCust\");\n\t\tAttProjectNameTextBox.sendKeys(\"TestProject\");\n\t\tAttTaskNameTextBox.sendKeys(\"Tast1WCNP\");\n\t\tAttBudgetTimeTextBox.sendKeys(\"3:00\");\n\t\tAttEnterDateInDateField.sendKeys(Keys.ENTER,\"Jan 27, 2019\");\n\t\tAttSelectBillableBillingType.click();\n\t\tAttSelectCheckBoxMarkToBeAdd.click();\n\t\tAttCreateTaskBtn.click();\n\t}", "public Map<String, Object> validateComponentProperties(boolean isJobImported) {\n\t\tboolean componentHasRequiredValues = Boolean.TRUE;\n\t\thydrograph.ui.common.component.config.Component component = XMLConfigUtil.INSTANCE.getComponent(this.getComponentName());\n\t\tMap<String, Object> properties=this.properties;\n\t\tfor (Property configProperty : component.getProperty()) {\n\t\t\tObject propertyValue = properties.get(configProperty.getName());\n\t\t\t\n\t\t\tList<String> validators = ComponentCacheUtil.INSTANCE.getValidatorsForProperty(this.getComponentName(), configProperty.getName());\n\t\t\t\n\t\t\tIValidator validator = null;\n\t\t\tfor (String validatorName : validators) {\n\t\t\t\ttry {\n\t\t\t\t\tvalidator = (IValidator) Class.forName(Constants.VALIDATOR_PACKAGE_PREFIX + validatorName).newInstance();\n\t\t\t\t} catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {\n\t\t\t\t\tlogger.error(\"Failed to create validator\", e);\n\t\t\t\t\tthrow new RuntimeException(\"Failed to create validator\", e);\n\t\t\t\t}\n\t\t\t\tboolean status = validator.validate(propertyValue, configProperty.getName(),new SchemaData().getInputSchema(this),\n\t\t\t\t\t\tisJobImported);\n\t\t\t\t//NOTE : here if any of the property is not valid then whole component is not valid \n\t\t\t\tif(status == false){\n\t\t\t\t\tcomponentHasRequiredValues = Boolean.FALSE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!componentHasRequiredValues && properties.get(Component.Props.VALIDITY_STATUS.getValue()) == null)\n\t\t\tproperties.put(Component.Props.VALIDITY_STATUS.getValue(), Component.ValidityStatus.WARN.name());\n\t\telse if (!componentHasRequiredValues\n\t\t\t\t&& StringUtils.equals((String) properties.get(Component.Props.VALIDITY_STATUS.getValue()),\n\t\t\t\t\t\tComponent.ValidityStatus.WARN.name()))\n\t\t\tproperties.put(Component.Props.VALIDITY_STATUS.getValue(), Component.ValidityStatus.WARN.name());\n\t\telse if (!componentHasRequiredValues\n\t\t\t\t&& StringUtils.equals((String) properties.get(Component.Props.VALIDITY_STATUS.getValue()),\n\t\t\t\t\t\tComponent.ValidityStatus.ERROR.name()))\n\t\t\tproperties.put(Component.Props.VALIDITY_STATUS.getValue(), Component.ValidityStatus.ERROR.name());\n\t\telse if (!componentHasRequiredValues\n\t\t\t\t&& StringUtils.equals((String) properties.get(Component.Props.VALIDITY_STATUS.getValue()),\n\t\t\t\t\t\tComponent.ValidityStatus.VALID.name()))\n\t\t\tproperties.put(Component.Props.VALIDITY_STATUS.getValue(), Component.ValidityStatus.ERROR.name());\n\t\telse if (componentHasRequiredValues)\n\t\t\tproperties.put(Component.Props.VALIDITY_STATUS.getValue(), Component.ValidityStatus.VALID.name());\n\t\treturn properties;\n\t}", "public void validate() throws org.apache.thrift.TException {\n if (functionName == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'functionName' was not present! Struct: \" + toString());\n }\n if (className == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'className' was not present! Struct: \" + toString());\n }\n if (resources == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'resources' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "@Override\r\n\tpublic boolean checkValidity() {\n\t\treturn false;\r\n\t}", "protected void validate() {\n Validator mandatoryValidator = validateMandatoryOptions();\n Validator exclusionsValidator = validateOptionExclusions();\n Validator inapplicableOptionValidator = validateInapplicableOptions();\n Validator optionalValidator = validateOptionalParameters();\n\n List<String> validationMessages = new LinkedList<>();\n\n validationMessages.addAll(mandatoryValidator.getValidationMessages());\n validationMessages.addAll(exclusionsValidator.getValidationMessages());\n validationMessages.addAll(optionalValidator.getValidationMessages());\n validationMessages.addAll(inapplicableOptionValidator.getValidationMessages());\n\n if (!validationMessages.isEmpty()) {\n String tablePathString =\n (tablePath != null) ? SourceUtils.pathToString(tablePath) : \"null\";\n throw new DeltaOptionValidationException(tablePathString, validationMessages);\n }\n }", "public FormValidation doCheckExecutionParameters(@QueryParameter String value, @QueryParameter String agentId) {\n if (StringUtils.isEmpty(value) && StringUtils.isEmpty(agentId))\n return FormValidation.ok();\n\n JsonObject executionParams = null;\n try {\n executionParams = SerializationHelper.fromJson(value, JsonObject.class);\n\n // In case the value parameter is empty\n if (executionParams == null)\n return FormValidation.ok();\n\n } catch (JsonSyntaxException e) {\n return FormValidation.error(\"Invalid JSON object\");\n }\n\n // In case the user did not select agent from the dropdown and/or in the JSON object, return ok.\n if ((executionParams.get(\"agentId\") != null && StringUtils.isEmpty(executionParams.get(\"agentId\").getAsString())) || StringUtils.isEmpty(agentId))\n return FormValidation.ok();\n\n // In case the user has selected the same agentId in the dropdown and in the JSON object, no need to show a warning\n if ((executionParams.get(\"agentId\") != null && StringUtils.equals(executionParams.get(\"agentId\").getAsString(), agentId)))\n return FormValidation.ok();\n\n // In case the user has selected two different agents in the dropdown and in the JSON object, show warning\n if (executionParams.get(\"agentId\") != null &&\n !StringUtils.isEmpty(executionParams.get(\"agentId\").getAsString()) &&\n !StringUtils.isEmpty(agentId))\n return FormValidation.warning(\"You've selected an agent and specified a different one in executionParameters. The job will be executed on the selected agent.\");\n\n return FormValidation.ok();\n }", "public List<ValidationResultInfo> validateScheduleTransaction(@WebParam(name = \"validationTypeKey\") String validationTypeKey,\n @WebParam(name = \"scheduleBatchId\") String scheduleBatchId,\n @WebParam(name = \"scheduleTransactionTypeKey\") String scheduleTransactionTypeKey,\n @WebParam(name = \"scheduleTransactionInfo\") ScheduleRequestInfo scheduleTransactionInfo,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws DoesNotExistException,\n InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;", "public void validateForSave() throws NSValidation.ValidationException {\n\t\tvalidateObjectMetier();\n\t\tvalidateBeforeTransactionSave();\n\t\tsuper.validateForSave();\n\n\t}", "public void validateForSave() throws NSValidation.ValidationException {\n\t\tvalidateObjectMetier();\n\t\tvalidateBeforeTransactionSave();\n\t\tsuper.validateForSave();\n\n\t}", "public void validateForSave() throws NSValidation.ValidationException {\n\t\tvalidateObjectMetier();\n\t\tvalidateBeforeTransactionSave();\n\t\tsuper.validateForSave();\n\n\t}", "@Override\n\tprotected boolean validateRequiredParameters() throws Exception {\n\t\treturn true;\n\t}", "private boolean validateTask(JTextField textFieldName,\r\n JTextField textFieldDescription,\r\n JFormattedTextField textFieldDueDate,\r\n JComboBox<Priority> comboPriority) {\r\n if (textFieldName.getText().equals(\"\") || textFieldDescription.getText().equals(\"\")\r\n || textFieldDueDate.getText().equals(\"\") || (comboPriority.getSelectedIndex() == -1)) {\r\n JOptionPane.showMessageDialog(null, \"Please Enter All Data!\");\r\n return false;\r\n }\r\n if (LocalDate.parse(textFieldDueDate.getText()).isBefore(LocalDate.now())) {\r\n JOptionPane.showMessageDialog(null, \"Enter a due date in the future!\");\r\n return false;\r\n }\r\n return true;\r\n }", "private void check()\n {\n Preconditions.checkArgument(name != null, \"Property name missing\");\n Preconditions.checkArgument(valueOptions != null || valueMethod != null, \"Value method missing\");\n Preconditions.checkArgument(\n !(this.validationRegex != null && this.valueOptions != null && this.valueOptionsMustMatch),\n \"Cant have regexp validator and matching options at the same time\");\n\n if (required == null)\n {\n /*\n If a property has a default value, the common case is that it's required.\n However, we need to allow for redundant calls of required(): defaultOf(x).required();\n and for unusual cases where a property has a default value but it's optional: defaultOf(x).required(false).\n */\n required = this.defaultValue != null;\n }\n\n if (description == null)\n description = \"Property name: \" + name + \", required = \" + required;\n\n if (valueOptions != null && defaultValue != null)\n {\n for (PropertySpec.Value v : valueOptions)\n {\n if (v.value.equals(defaultValue.value))\n v.isDefault = true;\n }\n }\n\n if (dependsOn != null)\n {\n if (category == null)\n throw new IllegalArgumentException(\"category required when dependsOn is set \" + name);\n\n if (!dependsOn.isOptionsOnly())\n throw new IllegalArgumentException(\n \"Invalid dependsOn propertySpec (must be optionsOnly) \" + dependsOn.name());\n }\n }", "public void validate() {\n\t\tClass<?> clazz = this.getModelObject().getClass();\n\t\tif (!ArenaUtils.isObservable(clazz)) {\n\t\t\tthrow new RuntimeException(\"La clase \" + clazz.getName() + \" no tiene alguna de estas annotations \" + ArenaUtils.getRequiredAnnotationForModels() + \" que son necesarias para ser modelo de una vista en Arena\");\n\t\t}\n\t\t// TODO: Validate children bindings?\n\t}", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "@Override\n\tpublic void validate(Object obj, Errors errors) {\n\t\tReservationCommand command = (ReservationCommand)obj; \n\t\tReservation reservation = command.getReservation();\n\t\t\n\t\tValidationUtils.rejectIfEmptyOrWhitespace(errors, \"reservation.numOfPeople\", \"NUMOFPEOPLE_REQUIRED\", \"num of people is required.\");\n\t\tValidationUtils.rejectIfEmptyOrWhitespace(errors, \"reservation.visit_date\", \"VISIT_DATE_REQUIRED\", \"visit date is required.\");\n\t\tValidationUtils.rejectIfEmptyOrWhitespace(errors, \"reservation.visit_time\", \"VISIT_TIME_REQUIRED\", \"visit time is required.\");\n\t\tValidationUtils.rejectIfEmptyOrWhitespace(errors, \"reservation.name\", \"NAME_REQUIRED\", \"name is required.\");\n\t\tValidationUtils.rejectIfEmptyOrWhitespace(errors, \"reservation.phone\", \"PHONE_REQUIRED\", \"Phone number is required.\");\n\n\t\t\n\t}", "@Override\r\n public boolean validate() {\n return true;\r\n }", "public void validate() throws org.apache.thrift.TException {\n if (!is_set_status()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'status' is unset! Struct:\" + toString());\n }\n\n if (!is_set_data()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'data' is unset! Struct:\" + toString());\n }\n\n if (!is_set_feature()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'feature' is unset! Struct:\" + toString());\n }\n\n if (!is_set_predictResult()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'predictResult' is unset! Struct:\" + toString());\n }\n\n if (!is_set_msg()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'msg' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n if (feature != null) {\n feature.validate();\n }\n }", "@Override\n\tpublic void validate() {\n\t\tFormFieldValidator.validateStudent(this, student);\n\t\tFormFieldValidator.validateCourseList(this, courseID);\n\t}", "private boolean validateFields() {\n\t\tList<String> errorMsg = new ArrayList<>();\n\n\t\tif (aliasField.getText().equals(\"\"))\n\t\t\terrorMsg.add(\"Alias cannot be left empty.\\n\");\n\n\t\tif (carComboBox.getValue() == null)\n\t\t\terrorMsg.add(\"A car should be assigned to the trip.\\n\");\n\n\t\tif (routeComboBox.getValue() == null)\n\t\t\terrorMsg.add(\"A route should be assigned to the trip.\\n\");\n\n\t\tfor (StopPoint stopPoint : stopPoints) {\n\t\t\tif (stopPoint.getTime() == null || stopPoint.getTime().equals(\"\"))\n\t\t\t\terrorMsg.add(\"You need to set an arriving time for '\" + stopPoint.toString() + \"'.\\n\");\n\t\t}\n\n\t\tif (endDatePicker.getValue() != null && startDatePicker.getValue() != null)\n\t\t{\n\t\t\tif (startDatePicker.getValue().isBefore(LocalDate.now())) {\n\t\t\t\terrorMsg.add(\"Trip start date should be after current date.\\n\");\n\t\t\t} else if (endDatePicker.getValue().isBefore(startDatePicker.getValue())) {\n\t\t\t\terrorMsg.add(\"Trip end date should be after start date.\\n\");\n\t\t\t} else {\n\t\t\t\tSet<DayOfWeek> recurrence = RecurrenceUtility.parseBitmaskToSet(getRecurrence());\n\t\t\t\tboolean isValidRecurrence = false;\n\t\t\t\tfor (LocalDate now = startDatePicker.getValue(); !now.isAfter(endDatePicker.getValue()); now = now.plusDays(1)) {\n\t\t\t\t\tif (recurrence.contains(now.getDayOfWeek()))\n\t\t\t\t\t\tisValidRecurrence = true;\n\t\t\t\t}\n\t\t\t\tif (!isValidRecurrence) {\n\t\t\t\t\terrorMsg.add(\"No recurrent day exists between trip start date and end date.\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\terrorMsg.add(\"Trip starts date or/and end date is invalid.\\n\");\n\t\t}\n\n\t\t// consistency check\n\t\t// WOF & registration cannot be expired before the end date of recurring trip\n\t\tCar car = carComboBox.getValue();\n\t\tif (endDatePicker.getValue() != null && startDatePicker.getValue() != null && car != null) {\n\t\t\tif (LocalDate.parse(car.getWof()).isBefore(endDatePicker.getValue()) ||\n\t\t\tLocalDate.parse(car.getRegistration()).isBefore(endDatePicker.getValue())) {\n\t\t\t\terrorMsg.add(String.format(\"The expiration date of a recurring trip cannot occur after the expiry date of car's WOF and registration.\\n\" +\n\t\t\t\t\t\t\t\t\"------------------------------------------------\\n\" +\n\t\t\t\t\t\t\t\t\"Details for car [%s]:\\n\" +\n\t\t\t\t\t\t\t\t\" a. WOF expire date is %s.\\n\" +\n\t\t\t\t\t\t\t\t\" b. Registration expire date is %s.\\n\" +\n\t\t\t\t\t\t\t\t\"------------------------------------------------\\n\",\n\t\t\t\t\t\tcar.getPlate(), car.getWof(), car.getRegistration()));\n\t\t\t}\n\t\t}\n\n\t\t// handle and show error message in dialog\n\t\tif (errorMsg.size() != 0) {\n\t\t\tStringBuilder errorString = new StringBuilder(\"Operation failed is caused by: \\n\");\n\t\t\tfor (Integer i = 1; i <= errorMsg.size(); i++) {\n\t\t\t\terrorString.append(i.toString());\n\t\t\t\terrorString.append(\". \");\n\t\t\t\terrorString.append(errorMsg.get(i - 1));\n\t\t\t}\n\t\t\tString headMsg = mode == Mode.ADD_MODE ? \"Failed to add the trip.\" : \"Failed to update the trip.\";\n\t\t\trss.showErrorDialog(headMsg, errorString.toString());\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private void validateData() {\n }", "public void validate() throws org.apache.thrift.TException {\n if (!isSetUserProfileId()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'userProfileId' is unset! Struct:\" + toString());\n }\n\n if (!isSetEntityId()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'entityId' is unset! Struct:\" + toString());\n }\n\n if (!isSetEntityType()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'entityType' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n }", "@Bean\n\tpublic void jobOneDetail() throws SchedulerException {\n\t\tJobDataMap jobDataMap = new JobDataMap();\n\t\tjobDataMap.put(\"jobLauncher\", jobLauncher);\n\t\tjobDataMap.put(\"jobLocator\", jobLocator);\n\n\t\tJobDetail job = JobBuilder.newJob(SimpleJob.class).withIdentity(\"demoJobOne\").setJobData(jobDataMap)\n\t\t\t\t.storeDurably().build();\n\t\tTrigger trigger = TriggerBuilder.newTrigger().forJob(job).withIdentity(\"jobOneTrigger\")\n\t\t\t\t.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInHours(5).repeatForever()).build();\n\t\tschedulerFactoryBean.getScheduler().scheduleJob(job, trigger);\n\n\t\t/*\n\t\t * Payroll calculation job scheduled to calculate salary for Regular employees\n\t\t * on monthly basis\n\t\t */\n\t\tJobDataMap payrollJobParam4Regular = new JobDataMap();\n\t\tpayrollJobParam4Regular.put(\"jobLauncher\", jobLauncher);\n\t\tpayrollJobParam4Regular.put(\"jobLocator\", jobLocator);\n\t\tpayrollJobParam4Regular.put(\"empType\", \"Regular\");\n\t\tJobDetail payrollJob4Regular = JobBuilder.newJob(PayrollCalculationJob.class).withIdentity(\"payrollJob4Regular\")\n\t\t\t\t.setJobData(payrollJobParam4Regular).storeDurably().build();\n\t\tTrigger payrollTrigger4Regular = TriggerBuilder.newTrigger().forJob(payrollJob4Regular)\n\t\t\t\t.withIdentity(\"payrollTrigger4Regular\")\n\t\t\t\t.withSchedule(CronScheduleBuilder.cronSchedule(\"0 0 0 1 1/1 ? *\")).build();\n\t\tschedulerFactoryBean.getScheduler().scheduleJob(payrollJob4Regular, payrollTrigger4Regular);\n\n\t\t/*\n\t\t * Payroll calculation job scheduled to calculate salary for Internship\n\t\t * employees on weekly[Saturday] basis\n\t\t */\n\t\tJobDataMap payrollJobParam4Internship = new JobDataMap();\n\t\tpayrollJobParam4Internship.put(\"jobLauncher\", jobLauncher);\n\t\tpayrollJobParam4Internship.put(\"jobLocator\", jobLocator);\n\t\tpayrollJobParam4Internship.put(\"empType\", \"Internship\");\n\t\tJobDetail payrollJob4Internship = JobBuilder.newJob(PayrollCalculationJob.class)\n\t\t\t\t.withIdentity(\"payrollJob4Internship\").setJobData(payrollJobParam4Internship).storeDurably().build();\n\t\tTrigger payrollTrigger4Internship = TriggerBuilder.newTrigger().forJob(payrollJob4Internship)\n\t\t\t\t.withIdentity(\"payrollTrigger4Internship\")\n\t\t\t\t.withSchedule(CronScheduleBuilder.cronSchedule(\"0 0 0 ? * SAT *\")).build();\n\t\tschedulerFactoryBean.getScheduler().scheduleJob(payrollJob4Internship, payrollTrigger4Internship);\n\n\t\t/*\n\t\t * Payroll calculation job scheduled to calculate salary for Contract employees\n\t\t * on daily basis\n\t\t */\n\t\tJobDataMap payrollJobParam4Contract = new JobDataMap();\n\t\tpayrollJobParam4Contract.put(\"jobLauncher\", jobLauncher);\n\t\tpayrollJobParam4Contract.put(\"jobLocator\", jobLocator);\n\t\tpayrollJobParam4Contract.put(\"empType\", \"Internship\");\n\t\tJobDetail payrollJob4Contract = JobBuilder.newJob(PayrollCalculationJob.class)\n\t\t\t\t.withIdentity(\"payrollJob4Contract\").setJobData(payrollJobParam4Contract).storeDurably().build();\n\t\tTrigger payrollTrigger4Contract = TriggerBuilder.newTrigger().forJob(payrollJob4Contract)\n\t\t\t\t.withIdentity(\"payrollTrigger4Contract\")\n\t\t\t\t.withSchedule(CronScheduleBuilder.cronSchedule(\"0 0 0 1/1 * ? *\")).build();\n\t\tschedulerFactoryBean.getScheduler().scheduleJob(payrollJob4Contract, payrollTrigger4Contract);\n\n\t\t/*\n\t\t * Payroll calculation job scheduled to calculate salary for Freelancer\n\t\t * employees on hourly basis\n\t\t */\n\t\tJobDataMap payrollJobParam4Freelancer = new JobDataMap();\n\t\tpayrollJobParam4Freelancer.put(\"jobLauncher\", jobLauncher);\n\t\tpayrollJobParam4Freelancer.put(\"jobLocator\", jobLocator);\n\t\tpayrollJobParam4Freelancer.put(\"empType\", \"Internship\");\n\t\tJobDetail payrollJob4Freelancer = JobBuilder.newJob(PayrollCalculationJob.class)\n\t\t\t\t.withIdentity(\"payrollJob4Freelancer\").setJobData(payrollJobParam4Freelancer).storeDurably().build();\n\t\tTrigger payrollTrigger4Freelancer = TriggerBuilder.newTrigger().forJob(payrollJob4Freelancer)\n\t\t\t\t.withIdentity(\"payrollTrigger4Freelancer\")\n\t\t\t\t.withSchedule(CronScheduleBuilder.cronSchedule(\"0 0 0/1 1/1 * ? *\")).build();\n\t\tschedulerFactoryBean.getScheduler().scheduleJob(payrollJob4Freelancer, payrollTrigger4Freelancer);\n\n\t}", "@Override\r\n\tpublic void validate() {\n\t\t\r\n\t}", "@Override\r\n public void validate() {\r\n }", "public void validate() throws ValidationException {\n\t}", "void checkJobExecutionEnvironment() throws JobExecutionEnvironmentException;", "protected void validate() throws Exception{\t\n\t\tsuper.validate();\n\t\tvalidateProperty(PROPERTY_KEY_USERNAME);\n\t}", "public void partValidation () throws ValidationException {\n\n // checks for a name to be entered\n if (getPartName().isEmpty() || !getPartName().matches(\"^[a-zA-Z0-9_ ]*$\")){\n throw new ValidationException(\"Name field is invalid. Can't be blank. Must be alphanumeric\");\n\n // checks that minimum stock isn't less than 0\n }else if (getPartStockMin() < 0) {\n throw new ValidationException(\"Inventory minimum can't be less than 0\");\n\n } else if (getPartStockMax() < 0) {\n throw new ValidationException(\"Inventory max must be greater than 0\");\n\n // checks to make sure max stock is not less than the minimum\n }else if (getPartStockMax() < getPartStockMin()) {\n throw new ValidationException(\"Max inventory can't be less than the minimum\");\n\n // checks that stock on hadn is not less than the minimum\n } else if (getPartStock() < getPartStockMin()){\n throw new ValidationException(\"Part inventory can't be less than the minimum\");\n\n // part price can't be 0 or less\n }else if (getPartPrice() < 0){\n throw new ValidationException(\"Price has to be a positive number\");\n\n // max stock can't be less than what you already have\n }else if (getPartStockMax() < getPartStock()){\n throw new ValidationException(\"Max inventory can't be less than what you have on hand\");\n\n // check stock is between min and max\n } else if (getPartStock() < getPartStockMin() || getPartStock() > getPartStockMax()){\n throw new ValidationException(\"Inventory level must be between min and max\");\n\n }\n }", "@Override\r\n\tpublic boolean validate() {\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean validate() {\n\t\treturn true;\r\n\t}", "private boolean validateData() {\r\n TASKAggInfo agg = null;\r\n int index = aggList.getSelectedIndex();\r\n if (index != 0) {\r\n agg = (TASKAggInfo)aggregators.elementAt(aggList.getSelectedIndex()-1);\r\n }\r\n\r\n if (getArgument1() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Argument 1 must be of type: \"+TASKTypes.TypeName[agg.getArgType()], \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n else if (getArgument2() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Argument 2 must be of type: \"+TASKTypes.TypeName[agg.getArgType()], \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n else if (getOperand() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Filter value must be of type integer\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n return true;\r\n }", "public void validate() throws org.apache.thrift.TException {\n if (key_column_name == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'key_column_name' was not present! Struct: \" + toString());\n }\n if (key_column_type == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'key_column_type' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'is_preaggregation' because it's a primitive and you chose the non-beans generator.\n // check for sub-struct validity\n }", "public List<ValidationResultInfo> validateScheduleRequest(@WebParam(name = \"validationTypeKey\") String validationTypeKey,\n @WebParam(name = \"scheduleRequestTypeKey\") String scheduleRequestTypeKey,\n @WebParam(name = \"scheduleRequestInfo\") ScheduleRequestInfo scheduleRequestInfo,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws DoesNotExistException,\n InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;", "private void validate() {\n Validate.notNull(uriLocatorFactory);\n Validate.notNull(preProcessorExecutor);\n }", "private boolean validateData() {\n if (!mCommon.validateData()) return false;\n\n Core core = new Core(this);\n\n // Due Date is required\n if (TextUtils.isEmpty(getRecurringTransaction().getDueDateString())) {\n core.alert(R.string.due_date_required);\n return false;\n }\n\n if (TextUtils.isEmpty(mCommon.viewHolder.dateTextView.getText().toString())) {\n core.alert(R.string.error_next_occurrence_not_populate);\n\n return false;\n }\n\n // Payments Left must have a value\n if (getRecurringTransaction().getPaymentsLeft() == null) {\n core.alert(R.string.payments_left_required);\n return false;\n }\n return true;\n }", "@Override\r\n\tpublic boolean validaObj() {\n\t\treturn false;\r\n\t}", "@Override\n public Boolean validate() throws EwpException {\n List<String> message = new ArrayList<String>();\n Map<EnumsForExceptions.ErrorDataType, String[]> dicError = new HashMap<EnumsForExceptions.ErrorDataType, String[]>();\n if (this.name == null) {\n message.add(AppMessage.NAME_REQUIRED);\n dicError.put(EnumsForExceptions.ErrorDataType.REQUIRED, new String[]{\"Name\"});\n }\n\n if (this.tenantStatus <= 0) {\n message.add(AppMessage.TENANT_STATUS_REQUIRED);\n dicError.put(EnumsForExceptions.ErrorDataType.REQUIRED, new String[]{\"Status\"});\n }\n if (message.isEmpty()) {\n return true;\n } else {\n throw new EwpException(new EwpException(\"Validation Exception in TENANT\"), EnumsForExceptions.ErrorType.VALIDATION_ERROR, message, EnumsForExceptions.ErrorModule.DATA_SERVICE, dicError, 0);\n }\n }", "public void validate() {\n\t\tthis.invalidated = false;\n\t}", "@Test\n public void testAllocationScraperJob() throws Exception {\n AllocationScraperJob j = new AllocationScraperJob();\n j.setStatus( JobStatus.submitted );\n j.setStartDate( Calendar.getInstance().getTime() );\n j.setDaysAhead( 27 );\n int jobId = dao.insertJob( j );\n\n // this should now run the job\n processorService.processJobs();\n\n // verify that the job completed successfully\n Job jobVerify = dao.fetchJobById( jobId );\n Assert.assertEquals( JobStatus.completed, jobVerify.getStatus() );\n }", "public void validate() throws org.apache.thrift.TException {\n if (record != null) {\n record.validate();\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (record != null) {\n record.validate();\n }\n }", "@Override\n\tpublic void validate() {\n\t\tsuper.validate();\n\t}", "@Override\n\tpublic Boolean isValidApplication(ApplicationBean applicationBean) {\n\t\tPattern namePattern=Pattern.compile(\"^[A-Za-z\\\\s]{3,}$\");\n\t\tMatcher nameMatcher=namePattern.matcher(applicationBean.getName());\n\t\tPattern dobPattern=Pattern.compile(\"^[0-3]?[0-9].[0-3]?[0-9].(?:[0-9]{2})?[0-9]{2}$\");\n\t\tMatcher dobMatcher=dobPattern.matcher(applicationBean.getDateOfBirth());\n\t\tPattern goalPattern=Pattern.compile(\"^[A-Za-z\\\\s]{1,}$\");\n\t\tMatcher goalMatcher=goalPattern.matcher(applicationBean.getGoals());\n\t\tPattern marksPattern=Pattern.compile(\"^[1-9][0-9]?$|^100$\");\n\t\tMatcher marksMatcher=marksPattern.matcher(applicationBean.getMarksObtained());\n\t\tPattern scheduleIdPattern=Pattern.compile(\"^[0-9]{1,2}$\");\n\t\tMatcher scheduleIdMatcher=scheduleIdPattern.matcher(applicationBean.getScheduledProgramID());\n\t\tPattern emailPattern=Pattern.compile(\"^[A-Za-z0-9+_.-]+@(.+)$\");\n\t\tMatcher emailMatcher=emailPattern.matcher(applicationBean.getEmailID());\n\t\t\n\t\t\n\t\tif(!(nameMatcher.matches()))\n\t\t{\n\t\t\tSystem.out.println(\"\\nApplicant Name Should Be In Alphabets and minimum 1 characters long.\");\n\t\t\treturn false;\n\t\t}\n\t\tif(!(dobMatcher.matches()))\n\t\t{\n\t\t\tSystem.out.println(\"\\nDate of birth should be in DD/MM/YYYY format.\");\n\t\t\treturn false;\n\t\t}\n\t\tif(!(goalMatcher.matches()))\n\t\t{\n\t\t\tSystem.out.println(\"\\n Goal should be alphabetical and having minimum one letter\");\n\t\t\treturn false;\n\t\t}\n\t\tif(!(marksMatcher.matches()))\n\t\t{\n\t\t\tSystem.out.println(\"\\nMarks should be less than 100\");\n\t\t\treturn false;\n\t\t}\n\t\tif(!(scheduleIdMatcher.matches()))\n\t\t{\n\t\t\tSystem.out.println(\"\\nSchedule Id should be of one or two digit\");\n\t\t\treturn false;\n\t\t}\n\t\tif(!(emailMatcher.matches()))\n\t\t{\n\t\t\tSystem.out.println(\"\\nEnter valid email address\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "@Override\n public void validateSearchParameters(Map fieldValues) {\n List<String> lookupFieldAttributeList = null;\n if (getBusinessObjectMetaDataService().isLookupable(getBusinessObjectClass())) {\n lookupFieldAttributeList = getBusinessObjectMetaDataService().getLookupableFieldNames(getBusinessObjectClass());\n }\n if (ObjectUtils.isNull(lookupFieldAttributeList)) {\n throw new RuntimeException(\"Lookup not defined for business object \" + getBusinessObjectClass());\n }\n\n String agencyNumber = (String) fieldValues.get(KFSPropertyConstants.AGENCY_NUMBER);\n String proposalNumber = (String) fieldValues.get(KFSPropertyConstants.PROPOSAL_NUMBER);\n String invoiceDocumentNumber = (String) fieldValues.get(ArPropertyConstants.INVOICE_DOCUMENT_NUMBER);\n String customerNumber = (String) fieldValues.get(ArPropertyConstants.CustomerInvoiceWriteoffLookupResultFields.CUSTOMER_NUMBER);\n String customerName = (String) fieldValues.get(ArPropertyConstants.CustomerInvoiceWriteoffLookupResultFields.CUSTOMER_NAME);\n\n if ((ObjectUtils.isNull(customerNumber) || StringUtils.isBlank(customerNumber)) && (ObjectUtils.isNull(agencyNumber) || StringUtils.isBlank(agencyNumber)) && (ObjectUtils.isNull(customerName) || StringUtils.isBlank(customerName)) && (ObjectUtils.isNull(proposalNumber) || StringUtils.isBlank(proposalNumber)) && (ObjectUtils.isNull(invoiceDocumentNumber) || StringUtils.isBlank(invoiceDocumentNumber))) {\n GlobalVariables.getMessageMap().putError(KFSPropertyConstants.AGENCY_NUMBER, ArKeyConstants.ReferralToCollectionsDocumentErrors.ERROR_EMPTY_REQUIRED_FIELDS);\n }\n\n if (GlobalVariables.getMessageMap().hasErrors()) {\n throw new ValidationException(\"errors in search criteria\");\n }\n\n }", "public boolean isValid() {\n\t\tboolean result;\n\t\tDate mySD = this.getStartDate();\n\t\tDate myED = this.getEndDate();\n\t\tTime myST = this.getStartTime();\n\t\tTime myET = this.getEndTime();\n\n\t\tif (myED.isBefore(mySD)) { //end is before start\n\t\t\tresult = false;\n\t\t} else if (myED.isEquals(mySD)) { //start and end same day\n\t\t\tif (myET.compareTo(myST) < 0) { //end time before start time\n\t\t\t\tresult = false;\n\t\t\t} else { result = true;\t}\n\t\t} else { result = true;\t}\n\n\t\treturn result;\n\t}", "public boolean validateEmployeePackage() {\n\t\treturn this.validateID() && this.validateFirstName() && this.validateLastName();\n\t}", "public void validate() throws org.apache.thrift.TException {\n if (blogPostVO != null) {\n blogPostVO.validate();\n }\n }", "@Override\n\tpublic void validate()\n\t{\n\n\t}", "@Override\n\tpublic Boolean validate(Object obj) throws BusinessException {\n\t\treturn null;\n\t}", "void calculateValidationRequirement() {\n this.elementRequiringJSR303Validation = Util.hasValidation(this.type);\n\n // Check for JSR 303 or @OnValidate annotations in default group\n if (Util.requiresDefaultValidation(this.type)) {\n this.requiresDefaultValidation = true;\n return;\n }\n\n // Check for any simple index uniqueness constraints\n if (!this.uniqueConstraintFields.isEmpty()) {\n this.requiresDefaultValidation = true;\n return;\n }\n\n // Check for any composite index uniqueness constraints\n if (!this.uniqueConstraintCompositeIndexes.isEmpty()) {\n this.requiresDefaultValidation = true;\n return;\n }\n }", "@Override\n\tpublic void validate() {\n\t}", "public void validate() throws org.apache.thrift.TException {\n if (parseId == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'parseId' was not present! Struct: \" + toString());\n }\n // alas, we cannot check 'constituentIndex' because it's a primitive and you chose the non-beans generator.\n // check for sub-struct validity\n if (parseId != null) {\n parseId.validate();\n }\n }", "public boolean isValid() {\n return _id != null && !_id.isEmpty() &&\n _name != null && !_name.isEmpty() &&\n _created != null && !_created.isEmpty();\n }", "public void validate() throws org.apache.thrift.TException {\n if (is_null == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'is_null' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "public void validate() {}", "@Override\n\t\tprotected boolean validateTrigger(int triggerID, String... arguments) {\n\t\t\treturn false;\n\t\t}", "public void validate(){\r\n\t\ttry{\r\n\t\t\t//First name, last name, date of birth and email are compulsory.\r\n\t\tif(FirstName==null||LastName==null||Dob==null||Email==null) \r\n\t\t\tthrow new Exception(\"One of the field is Empty :\\n(First name / last name / dob / email )\");\r\n\t\tif(TelephoneNumber!=0||MobileNumber!=0)\r\n\t\t\tthrow new Exception(\"Enter Contact Number\");\r\n\t\t\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\t\r\n\t\t/*finally{\r\n\t\t\tSystem.out.println(\"Program Executed\");\r\n\t\t}*/\r\n\t}", "@Override\n public boolean isValid(Claim claim, ConstraintValidatorContext constraintValidatorContext) {\n if (claim == null || claim.getType() == null) \n return true; \n if (claim.getType().equals(ClaimType.Auto) && claim.getAutoClaim() == null) \n return false; \n if (claim.getType().equals(ClaimType.Property) && claim.getPropertyClaim() == null)\n return false;\n \n \n if (claim.getPropertyClaim() != null && claim.getAutoClaim() != null) {\n return false;\n } \n \n return true;\n }", "public void validateInput(Information information) {\n information.validateFirstName();\n information.validateLastName();\n information.validateZipcode();\n information.validateEmployeeID();\n }", "public void validate() {\n\t\terrors.clear();\n\t\t\n\t\tif(!this.id.isEmpty()) {\n\t\t\ttry {\n\t\t\t\tLong.parseLong(this.id);\n\t\t\t} catch(NumberFormatException ex) {\n\t\t\t\terrors.put(\"id\", \"Id is not valid.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(this.firstName.isEmpty()) {\n\t\t\terrors.put(\"firstName\", \"First name is obligatory!\");\n\t\t}\n\t\t\n\t\tif(this.lastName.isEmpty()) {\n\t\t\terrors.put(\"lastName\", \"Last name is obligatory!\");\n\t\t}\n\t\t\n\t\tif(this.nick.isEmpty()) {\n\t\t\terrors.put(\"nick\", \"Nick is obligatory!\");\n\t\t}\n\t\t\n\t\tif(DAOProvider.getDAO().doesNickAlreadyExist(nick)) {\n\t\t\terrors.put(\"nick\", \"Nick already exist!\");\n\t\t}\n\n\t\tif(this.email.isEmpty()) {\n\t\t\terrors.put(\"email\", \"EMail is obligatory!\");\n\t\t} else {\n\t\t\tint l = email.length();\n\t\t\tint p = email.indexOf('@');\n\t\t\tif(l<3 || p==-1 || p==0 || p==l-1) {\n\t\t\t\terrors.put(\"email\", \"EMail is not valid.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(this.password.isEmpty()) {\n\t\t\terrors.put(\"password\", \"Password is obligatory!\");\n\t\t}\n\t}", "public void validate() throws Exception {\r\n\t\tCollection<String> types = getTaskTypes();\r\n\t\tIterator<String> it = types.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tString type = it.next();\r\n\t\t\tString init = getInitialState(type);\r\n\t\t\tCollection<String> states = getStates(type);\r\n\t\t\tif (init.equals(\"OPEN\") && !states.contains(\"OPEN\"))\r\n\t\t\t\tthrow new Exception(Resource.getResourceString(\"NoOpenState\")\r\n\t\t\t\t\t\t+ type);\r\n\t\t}\r\n\t}", "protected void validateEntries(Calendar calendarStart, Calendar calendarEnd, String product) {\n LOG.debug(\"Validating reseller input start, end date with product\");\n validateCalendar(calendarStart, calendarEnd);\n validateInput(product, \"At least one product must be provided\");\n }", "public void validate() throws Exception {\n }", "public boolean isSetJobnumber() {\n return this.jobnumber != null;\n }", "public void validate() throws org.apache.thrift.TException {\n if (object != null) {\n object.validate();\n }\n }", "public boolean validateTime(){\n if(startSpinner.getValue().isAfter(endSpinner.getValue())){\n showError(true, \"The start time can not be greater than the end time.\");\n return false;\n }\n if(startSpinner.getValue().equals(endSpinner.getValue())){\n showError(true, \"The start time can not be the same as the end time.\");\n return false;\n }\n startLDT = convertToTimeObject(startSpinner.getValue());\n endLDT = convertToTimeObject(endSpinner.getValue());\n startZDT = convertToSystemZonedDateTime(startLDT);\n endZDT = convertToSystemZonedDateTime(endLDT);\n\n if (!validateZonedDateTimeBusiness(startZDT)){\n return false;\n }\n if (!validateZonedDateTimeBusiness(endZDT)){\n return false;\n };\n return true;\n }", "public void validate() throws org.apache.thrift.TException {\n if (classification == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'classification' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }", "private void validate() {\n\n if (this.clsname == null)\n throw new IllegalArgumentException();\n if (this.dimension < 0)\n throw new IllegalArgumentException();\n if (this.generics == null)\n throw new IllegalArgumentException();\n }" ]
[ "0.6514474", "0.58681446", "0.57570493", "0.5660065", "0.55481315", "0.5515282", "0.55035526", "0.545766", "0.5412142", "0.5410052", "0.53563106", "0.52398926", "0.52354956", "0.52351445", "0.52307975", "0.52102566", "0.5197347", "0.51844937", "0.5177073", "0.51741934", "0.5173962", "0.5136717", "0.5132671", "0.512139", "0.5094743", "0.50778455", "0.5077258", "0.506951", "0.50653476", "0.5064491", "0.50300735", "0.5025378", "0.5000296", "0.4994233", "0.4993694", "0.49934587", "0.49889854", "0.49889854", "0.49889854", "0.4976824", "0.497211", "0.49666238", "0.49574947", "0.4950637", "0.4950637", "0.4950637", "0.49415883", "0.49390832", "0.49384972", "0.49375662", "0.49325866", "0.4930587", "0.49240017", "0.49232772", "0.49140826", "0.4913898", "0.4910842", "0.49056625", "0.49044958", "0.489187", "0.48913777", "0.48913777", "0.48833847", "0.4880104", "0.48749277", "0.48632324", "0.48584262", "0.48559463", "0.48519406", "0.48275712", "0.48172328", "0.4813982", "0.4813982", "0.4813467", "0.48110667", "0.48102272", "0.47997165", "0.47930717", "0.47923616", "0.47839946", "0.47828063", "0.47814432", "0.47800246", "0.4775131", "0.4774015", "0.4773879", "0.47666147", "0.47581676", "0.47572887", "0.47567502", "0.47565582", "0.47537643", "0.47471717", "0.47428873", "0.47425318", "0.47382993", "0.4737542", "0.47369766", "0.47366127", "0.47294635" ]
0.6512955
1
This method should not be used by the Quartz client.
public String getFireInstanceId() { return fireInstanceId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void scheduleJob() {\n\n }", "protected void beforeJobExecution() {\n\t}", "public void execute(JobExecutionContext context) throws JobExecutionException {\n \tSystem.out.println(\"This is a scheduled job for HRIS using Quartz 2.2.1 running every 10 minutes\");\n \tSystem.out.println(\"Change QuartzListener class to change schedule of execution\");\n \t\n \t/*\n \ttry {\n\t\t\t\tloanEntryList = loanEntryService.getAllActiveLoanEntry();\n\t\t\t\tfor (LoanEntry le: loanEntryList) {\n\t\t\t\t\tSystem.out.println(\"LoanEntry: \" + le.getEmpId());\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Exception encountered when trying to get all active loan entry..\");\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Exception encountered when trying to get all active loan entry..\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t*/ \n \n }", "@Override\n\t\t\tpublic void beforeJob(JobExecution jobExecution) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void doBeforeJob() {\n\r\n\t}", "@Override\n\tpublic void beforeJob(JobExecution arg0) {\n\t\t\n\t}", "@Override\n public void reportScheduler() {\n }", "protected void afterJobExecution() {\n\t}", "@Override\n public void beforeJob(JobExecution jobExecution) {\n super.beforeJob(jobExecution);\n }", "@Override\n public void execute(JobExecutionContext context) {\n\n JobDataMap dataMap = context.getJobDetail().getJobDataMap();\n\n Long dataSourceId = dataMap.getLong(DataVinesConstants.DATASOURCE_ID);\n\n LocalDateTime scheduleTime = DateUtils.date2LocalDateTime(context.getScheduledFireTime());\n LocalDateTime fireTime = DateUtils.date2LocalDateTime(context.getFireTime());\n\n logger.info(\"scheduled fire time :{}, fire time :{}, dataSource id :{}\", scheduleTime, fireTime, dataSourceId);\n logger.info(\"scheduled start work , dataSource id :{} \", dataSourceId);\n\n CatalogMetaDataFetchTaskService catalogMetaDataFetchTaskService = getJobExternalService().getCatalogTaskService();\n CatalogRefresh catalogRefresh = new CatalogRefresh();\n catalogRefresh.setDatasourceId(dataSourceId);\n\n DataSource dataSource = getJobExternalService().getDataSourceService().getDataSourceById(dataSourceId);\n if (dataSource == null) {\n logger.warn(\"dataSource {} is null\", dataSourceId);\n return;\n }\n\n catalogMetaDataFetchTaskService.refreshCatalog(catalogRefresh);\n }", "public static void main(String[] args) {\n\t SimpleDateFormat DateFormat = new SimpleDateFormat(\"yyyyMMddHHmmss\"); \n\t Date d = new Date(); \n\t String returnstr = DateFormat.format(d); \n\t \n\t QuartzPush job = new QuartzPush(); \n\t String job_name =\"11\"; \n\t try {\n\t\t\t\tSystem.out.println(\"★★★★★★★★★★★ \"+\"The QuartzPush Strat,Date is \" +returnstr +\" ★★★★★★★★★★★\");\n\t\t\t\tClass jobClass = Class.forName(\"com.tinytree.job.QuartzPush\");\n\t\t\t\tMap<String ,Object> map = new HashMap<>();\n\t\t\t\tmap.put(\"name\",\"testname\");\n\t\t\t\tmap.put(\"jobName\",\"testname\");\n\t\t\t\tmap.put(\"jobGroup\",\"group\");\n\t\t\t\tmap.put(\"group\",\"group\");\n\t\t\t\tmap.put(\"jobClass\",\"com.tinytree.job.QuartzPush\");\n\t\t\t\t//String cronExpression = \"0 37 16 ? * *\";\n\t\t\t\tString cronExpression = \"0/10 * * * * ?\";//\"0 37 16 ? * *\"\n\t\t\t\tmap.put(\"cronExpression\",cronExpression);\n\n\t QuartzManager.addJob(map);\n\n\t \n\t } catch (Exception e) { \n\t e.printStackTrace(); \n\t } \n\t }", "public void execute(JobExecutionContext context) throws JobExecutionException {\n\t\t\n\t\tint scheduler_id=(Integer)context.getJobDetail().getJobDataMap().get(\"scheduler_id\");\t\t\n \tString taskuid=(String)context.getJobDetail().getJobDataMap().get(\"taskuid\");\n \tString invoked_by=(String)context.getJobDetail().getJobDataMap().get(SchedulerEngine.JOBDATA_INVOKED_BY);\n \tString updatedtime=(String)context.getJobDetail().getJobDataMap().get(SchedulerEngine.JOBDATA_UPDATED_TIME);\n \tNumber trigger_row_id=(Number)context.getJobDetail().getJobDataMap().get(SchedulerEngine.JOBDATA_TRIGGER_ROW_ID);\n \t//System.out.println(\"ScheduledTaskJob.execute() 2be removed later:taskuid:\"+taskuid+\" scheduler_id:\"+scheduler_id);\n \t\n \t\n \t\n \ttry{\n \t\t\n\t \t//Map data=getSchedulerData(scheduler_id);\n \t\tSchedulerDB sdb=SchedulerDB.getSchedulerDB();\n \t\tMap data=null;\n \t\tString inject_code=null;\n \t\ttry{\n \t\t\tsdb.connectDB();\n \t\t\tdata=sdb.getScheduler(scheduler_id); \n \t\t\tif(trigger_row_id!=null){\n \t\t\t\tMap trig=sdb.getOneRowTriggerData(trigger_row_id.longValue());\n \t\t\t\tinject_code=(String)trig.get(\"inject_code\");\n \t\t\t}\n \t\t}catch(Exception e){\n \t\t\tthrow e;\n \t\t}finally {\n \t\t\tsdb.closeDB();\n \t\t}\n \t\t\n \t\tif(data.get(\"deleted\")!=null && ((Number)data.get(\"deleted\")).intValue()==1){\n \t\t\tthrow new Exception(\"Deleted Task can't be executed\");\n \t\t}\n \t\t\n \t\tlog.debug(\"trigger_row_id:\"+trigger_row_id+\" inject_code:\"+inject_code);\n\t \t\n\t \tScheduledTask task=new ScheduledTaskFactory().getTask(taskuid);\n\t \tif(task==null) {\n\t \t\tthrow new Exception(\"Task Group not found for the task:\"+scheduler_id);\n\t \t}\n\t \tStackFrame sframe=new StackFrame(task,data);\n\t \tif(invoked_by!=null && !invoked_by.equals(\"\")) {\n\t \t\tsframe.setInvokedby(invoked_by);\n\t \t}else{\n\t \t\tif(updatedtime!=null){\n\t \t\t\tsframe.setInvokedby(\"Scheduler (\"+updatedtime+\")\");\n\t \t\t}else{\n\t \t\t\tsframe.setInvokedby(\"Scheduler\");\n\t \t\t}\n\t \t}\n\t\t\t\n\t\t\tif(context.getTrigger().getPreviousFireTime()!=null){\n\t\t\t\tsframe.setTrigger_time(context.getTrigger().getPreviousFireTime().getTime());\n\t\t\t}else{\n\t\t\t\tsframe.setTrigger_time(new Date().getTime());\n\t\t\t}\n\t\t\t\n\t\t\tif(context.getTrigger().getNextFireTime()!=null){\n\t\t\t\tsframe.setNexttrigger_time(context.getTrigger().getNextFireTime().getTime());\n\t\t\t}\t\t\t\n\t\t\n\t\t\t\n\t\t\tif(Config.getValue(\"load_balancing_server\")!=null && Config.getValue(\"load_balancing_server\").equals(P2PService.getComputerName())){\n\t\t\t\tLoadBalancingQueueItem li=new LoadBalancingQueueItem();\n\t\t\t\tli.setSf(sframe);\n\t\t\t\tInteger id=(Integer)data.get(\"id\");\n\t\t\t\tli.setInject_code(inject_code);\n\t\t\t\tli.setSchedulerid(id);\n\t\t\t\tLoadBalancingQueue.getDefault().add(li);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t/*ScheduledTaskQueue.add(sframe);*/\n\t\t\t}\n\t\t\t\n\t\t\tlog.debug(\"adding task to queue: task:\"+data.get(\"name\"));\n \t}catch(Exception e){\n \t\te.printStackTrace(); \t\t\n \t\t//ClientErrorMgmt.reportError(e, \"Error while triggering task\");\n \t} \n\t\t \n\t\t//String status=null;\n\t\t//try{\t\t\n\t\t\t//task.execute();\n\t\t\t//status=task.EXCECUTION_SUCCESS;\n\t\t//}catch(Exception e){\n\t\t//\tstatus=task.EXCECUTION_FAIL;\t\t\t\n\t\t//\tClientErrorMgmt.reportError(e, null);\n\t\t//}finally{\n\t\t//\ttry{\n\t\t//\t\taddLog(sdate,data,status);\n\t\t//\t}catch(Exception e){\n\t\t//\t\tClientErrorMgmt.reportError(e, null);\n\t\t//\t}\t\t\t\n\t\t//}\n\t\t\n \t\n \t\n\t}", "@Override\r\n\tprotected void execute() {\r\n\t}", "@Override\n protected void execute() {\n }", "@Override\n protected void execute() {\n }", "@Override\n protected void execute() {\n }", "@Override\n\tpublic void execute(JobExecutionContext arg0) throws JobExecutionException {\n\t\t new SchoolMsgService().writeIntoSchoolMsg_ReceivedStu();\n//\t\t System.out.println(\"just test: \" + new Date());\n\t}", "public T caseQuartz(Quartz object) {\r\n\t\treturn null;\r\n\t}", "@Override\n protected void execute() {\n \n }", "@Override\r\n\tpublic void doAfterJob() {\n\r\n\t}", "@Override\n protected void execute() {\n \n }", "@Override\n @Transactional\n protected void executeInternal(JobExecutionContext context) throws JobExecutionException {\n if (batchProcessEnabled()) {\n StringBuilder builder = new StringBuilder();\n // The cron job runs as this user\n UserSession userSession = new UserSession(user);\n GlobalVariables.setUserSession(userSession);\n try {\n List<ReportTrackingNotificationDetails> results = reportTrackingNotificationService.runReportTrackingNotifications();\n buildMessage(builder, results);\n } catch (Exception e) {\n LOG.error(\"Error running report tracking notification service.\", e);\n builder.append(\"Message: Error running report tracking notification service. See log for more details. \").append(e.getMessage());\n }\n\n String message = builder.toString();\n\n LOG.info(message);\n\n String recipient = getRecipient();\n // Send notification only if recipient has been set in the param\n if (StringUtils.isNotEmpty(recipient)) {\n kcNotificationService.sendNotification(CONTEXT_NAME, SUBJECT, message, Collections.singletonList(recipient));\n }\n }\n }", "public void doExecute(JobExecutionContext context) {\n\t\tSimpleDateFormat format=new SimpleDateFormat(\"yyyy-MM-dd\");\n String endDate=DateHelper.upDate(new Date(), DateHelper.CONST_PARSE_DATETIME).substring(0, 10);\n String beginDate=\"\";\n Map timeMap=null;\n List gsclist=DbUp.upTable(\"gc_subordinate_count\").dataQuery(\"create_time\", \" create_time desc \",\"\", null,0,1);\n if(gsclist!=null&&gsclist.size()>0){\n \ttimeMap=(Map) gsclist.get(0);\n }\n\n if(timeMap==null||timeMap.get(\"create_time\")==null){\n \tMap map=DbUp.upTable(\"gc_member_relation\").dataQuery(\"create_time\", \" create_time \", \"\", null,0,1).get(0);\n \tif(map!=null&&map.get(\"create_time\")!=null){\n \t\tbeginDate=map.get(\"create_time\").toString();\n \t\t\n \t}\n }\n else{\n \tbeginDate=timeMap.get(\"create_time\").toString();\n \tCalendar begin=Calendar.getInstance();\n \t\ttry {\n\t\t\t\tbegin.setTime(format.parse(beginDate));\n\t\t\t} catch (ParseException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n \t\tbegin.add(Calendar.DAY_OF_MONTH, 1);\n \t\tbeginDate=DateHelper.upDate(begin.getTime());\n }\n beginDate=beginDate.substring(0, 10);\n \n Calendar start = Calendar.getInstance();\n Calendar end = Calendar.getInstance();\n try {\n\t\t\tstart.setTime(format.parse(beginDate));\n\t\t\tend.setTime(format.parse(endDate));\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \n while(start.before(end))\n {\n \tMDataMap mDataMap=new MDataMap();\n \tString dateString=DateHelper.upDate(start.getTime()).substring(0,10);\n \tmDataMap.put(\"dateString\", dateString);\n \tList<MDataMap> list=DbUp.upTable(\"gc_member_relation\").queryAll(\"parent_code,count(parent_code) as number \", \"\", \" left(create_time,10)=:dateString group by parent_code\", mDataMap);\n for(MDataMap map:list){\n \tDbUp.upTable(\"gc_subordinate_count\").insert(\"date\",dateString,\"account_code\",map.get(\"parent_code\"),\n \t\t\t\"number\",map.get(\"number\"),\"create_time\",FormatHelper.upDateTime());\n }\n \tstart.add(Calendar.DAY_OF_MONTH,1);\n }\n\t}", "@Override\n protected void execute() {\n\n }", "@Override\r\n\tpublic void executer() {\n\t}", "protected abstract void executeInternal(JobExecutionContext context) throws JobExecutionException;", "public schedulerJob() {\n }", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\n public void execute() {}", "@Override\n public void execute() {\n }", "@Override\n\tpublic void execute() {\n\t\t\n\t}", "public Scheduler getScheduler()\r\n/* 30: */ {\r\n/* 31: 73 */ return this.scheduler;\r\n/* 32: */ }", "JobResponse.Update update();", "protected void onQueued() {}", "public void scheduleJobs();", "@Override\r\n\tpublic void execute() {\n\r\n\t}", "public TriggerEchoJob() {\n\t}", "@Override\r\n\tprotected void processExecute() {\n\r\n\t}", "@Override\r\n\tpublic void execute() {\n\t}", "@Override\r\n\tpublic void execute() {\n\t}", "public GetJobs() {\r\n\t\tsuper();\r\n\t}", "@Override\n public void execute() {\n \n \n }", "@Override\n\tpublic void execute() {\n\t}", "@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}", "private void workOnQueue() {\n }", "@Before\n public void setup() throws SchedulerException {\n quartzScheduler.clear();\n }", "@Override\n protected Scheduler scheduler() {\n return scheduler;\n }", "@Override\n\tpublic void configure(JobConf arg0) {\n\t\t\n\t}", "JobResponse refresh();", "@Override\n public void Execute() {\n\n }", "@Override\r\n\tpublic void execute() {\n }", "public void finalizeJob() {\n // override to implement\n }", "@Override\n public void periodic() {\n // This method will be called once per scheduler run\n }", "public int getJobId() ;", "@Test\n\t@Ignore\n\tpublic void testScheduler() {\n\t\torg.springframework.scheduling.support.CronTrigger trigger = new CronTrigger(\"0 0 0 * * *\");\n\t\tCalendar today = Calendar.getInstance();\n\t\ttoday.add(Calendar.DAY_OF_MONTH, -1);\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss z\");\n\t\tfinal Date yesterday = today.getTime();\n\t\tString lastMessage = (sdf.format(yesterday)) + \" : [Yesterday]\";\n\t\tlog.debug(lastMessage);\n\t\tDate nextExecution = trigger.nextExecutionTime(\n\t\t\t\tnew TriggerContext() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Date lastScheduledExecutionTime() {\n\t\t\t\t\t\treturn yesterday;\n\t\t\t\t\t}\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Date lastActualExecutionTime() {\n\t\t\t\t\t\treturn yesterday;\n\t\t\t\t\t}\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Date lastCompletionTime() {\n\t\t\t\t\t\treturn yesterday;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tString nextMessage = sdf.format(nextExecution) + \" : [Execution] \";\n\t\tlog.debug(nextMessage);\n\t}", "public void execute(JobExecutionContext context) {\n\t\t\n\t\tProcessManagerFactoryBean pmfb = new ProcessManagerFactoryBean();\n\t\t\n\t\tCalendar now = Calendar.getInstance();\n\t\t\n\t\tList<SchedulerItem> schedulerItems = this.getAllSchedule();\n\t\t\n\t\tfor (final SchedulerItem item : schedulerItems) {\n\t\t\t\n\t\t\tif (!(item.getStartDate().getTime() <= now.getTimeInMillis())) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tProcessManagerRemote pm = null;\n\t\t\tProcessInstance instance = null;\n\t\t\t\n\t\t\ttry {\n\t\t\t\tpm = pmfb.getProcessManager();\n\t\t\t\ttry {\n\t\t\t\t\tinstance = pm.getProcessInstance(item.getInstanceId());\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tboolean isError = true;\n\t\t\t\t\n\t\t\t\tif (instance != null) {\n\t\t\t\t\tActivity act = instance.getProcessDefinition().getActivity(item.getTracingTag());\n\n\t\t\t\t\tif (act != null && act instanceof WaitActivity) {\n\t\t\t\t\t\tString status = act.getStatus(instance);\n\t\t\t\t\t\tif (Activity.STATUS_RUNNING.equals(status) || Activity.STATUS_TIMEOUT.equals(status)) {\n\n\t\t\t\t\t\t\tinstance.getProcessTransactionContext().addTransactionListener(new TransactionListener() {\n\n\t\t\t\t\t\t\t\tpublic void beforeRollback(TransactionContext tx) throws Exception {\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tpublic void beforeCommit(TransactionContext tx) throws Exception {\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tpublic void afterRollback(TransactionContext tx) throws Exception {\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tpublic void afterCommit(TransactionContext tx) throws Exception {\n\t\t\t\t\t\t\t\t\tdeleteSchedule(item.getIdx());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tact.fireComplete(instance);\n\t\t\t\t\t\t\tisError = false;\n\n\t\t\t\t\t\t} else if (Activity.STATUS_FAULT.equals(status)\n\t\t\t\t\t\t\t\t|| Activity.STATUS_READY.equals(status) \n\t\t\t\t\t\t\t\t|| Activity.STATUS_STOPPED.equals(status) || Activity.STATUS_CANCELLED.equals(status) ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (isError) {\n\t\t\t\t\tdeleteSchedule(item.getIdx());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpm.applyChanges();\t\n\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\ttry {\n\t\t\t\t\tpm.cancelChanges();\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t} finally{\n\t\t\t\ttry {\n\t\t\t\t\tpm.remove();\n\t\t\t\t} catch (RemoteException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (RemoveException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n//\t\tSystem.out.println(\"scheduler WaitJob execute() end...\");\n\t}", "@Override\n\tvoid startWork() {\n\t\t\n\t}", "@Override\n\tvoid startWork() {\n\t\t\n\t}", "@Override\r\n\tpublic Scheduler getQuartSched() {\n\t\treturn daemonMain.quartzSched;\r\n\t}", "@Override\n public void autonomousPeriodic() {\n \n }", "public AutomaticJob() {\r\n \r\n }", "protected void execute() {\n\t\t\n\t}", "public RunProcDefJob() {\n\t}", "@Override\n\t\t\tpublic String run() {\n\t\t\t\treturn null;\n\t\t\t}", "public AbstractJob(){\n \n }", "@Override\r\n\tpublic void doInitialSchedules() {\n\t}", "protected void execute() {}", "private VisorPortableCollectMetadataJob(Long lastUpdate) {\n super(lastUpdate);\n }", "public void jobToBeExecuted(JobExecutionContext jobExecutionContext) {}", "protected void notificationOnExpiration() {\n }", "@Override\r\n\tpublic void execute() throws Exception {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void run() {\n\n\t\t\t}", "public boolean isJob() {\n return false;\n }", "public abstract void processJob() throws Exception;", "public void scheduleJob() {\n JobInfo.Builder builder = null;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {\n builder = new JobInfo.Builder(mJobId++, mServiceComponent);\n builder.setMinimumLatency(1000);\n builder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY);\n // Extras, work duration.\n PersistableBundle extras = new PersistableBundle();\n extras.putLong(WORK_DURATION_KEY, Long.valueOf(1) * 1000);\n extras.putString(\"gsonData\", gsonDataa);\n extras.putInt(\"servicetype\", 1);\n builder.setExtras(extras);\n // Schedule job\n Log.d(TAG, \"Scheduling job\");\n JobScheduler tm = (JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE);\n tm.schedule(builder.build());\n\n }\n\n\n\n }", "@Override\r\n\tpublic T getJob() {\n\t\treturn super.getJob();\r\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n public void autonomousPeriodic() {\n\n }", "private JobScheduler() {\n // empty\n }", "@Override\n protected Scheduler createScheduler() {\n return new JLScheduler(this) {\n @Override\n public List<Goal> goals(Job job) {\n List<Goal> goals= super.goals(job);\n Goal endGoal = goals.get(goals.size()-1);\n if (!(endGoal.name().equals(\"End\"))) {\n throw new IllegalStateException(\"Last goal is not an End goal?\");\n }\n endGoal.addPrereq(new IRGoal(job, fSourceLoader));\n return goals;\n }\n };\n }", "protected abstract void scheduler_init();", "void deschedule(ScheduledJob job);", "@Override\n\tpublic boolean isJobRunning() {\n\t\treturn false;\n\t}", "public CronJobTrigger() {\n init();\n }", "private TestsResultQueueEntry() {\n\t\t}", "@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}", "@Override\r\n public void run() {}", "protected void execute() {\n\n\t}", "@Override\n public Void run() throws Exception {\n Callable<Job> jobCreator = ReflectionUtils.newInstance(jobConfig.getJobCreator(), jobConfiguration);\n Job job = jobCreator.call();\n job.submit();\n\n // Blocking mode is only for testing\n if(waitForCompletition) {\n job.waitForCompletion(true);\n }\n\n // And generate event with further job details\n EventRecord event = getContext().createEventRecord(\"job-created\", 1);\n Map<String, Field> eventMap = ImmutableMap.of(\n \"tracking-url\", Field.create(job.getTrackingURL()),\n \"job-id\", Field.create(job.getJobID().toString())\n );\n event.set(Field.create(eventMap));\n getContext().toEvent(event);\n return null;\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic boolean onApiMessage(ApiJob job) {\n\t\treturn false;\n\t}", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void teleopPeriodic() {\n }", "@Override\n public void teleopPeriodic() {\n }", "public void setScheduler(Scheduler scheduler)\r\n/* 25: */ {\r\n/* 26: 65 */ this.scheduler = scheduler;\r\n/* 27: */ }", "JobResponse apply();", "@Override\n\t\tpublic void run() {\n\n\t\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}" ]
[ "0.6429403", "0.6362516", "0.60564476", "0.6039762", "0.5967015", "0.59361976", "0.5930101", "0.59184974", "0.5827934", "0.57889247", "0.577941", "0.57676387", "0.575597", "0.57197416", "0.57197416", "0.57197416", "0.57180625", "0.5708841", "0.56926984", "0.5682859", "0.5660635", "0.56185883", "0.55739415", "0.55724066", "0.55231225", "0.54842323", "0.5472371", "0.5459227", "0.54548794", "0.5452565", "0.5449392", "0.54252636", "0.5403197", "0.539094", "0.5381209", "0.5377906", "0.536508", "0.53571147", "0.5356727", "0.5356727", "0.5348634", "0.53427154", "0.53396916", "0.5335493", "0.5335493", "0.5330081", "0.5320397", "0.53050774", "0.53018886", "0.5298569", "0.52953255", "0.52931815", "0.52925676", "0.5273088", "0.52725106", "0.5268857", "0.5259942", "0.525695", "0.525695", "0.52475196", "0.523739", "0.5235877", "0.52336556", "0.5226433", "0.52247083", "0.5224551", "0.5221869", "0.52192783", "0.52081275", "0.52072096", "0.52014846", "0.5197948", "0.51967967", "0.51943004", "0.5192162", "0.5191552", "0.51873636", "0.5182702", "0.51806235", "0.517746", "0.51760226", "0.5170836", "0.5165177", "0.5162073", "0.51612", "0.51524293", "0.5152403", "0.5147542", "0.5147406", "0.51445854", "0.51378477", "0.51321125", "0.5129174", "0.5129174", "0.5129174", "0.5128202", "0.5128202", "0.5112455", "0.51122695", "0.5108918", "0.5105663" ]
0.0
-1
Return a simple string representation of this object.
@Override public String toString() { return "Trigger '" + getFullName() + "': triggerClass: '" + getClass().getName() + " calendar: '" + getCalendarName() + "' misfireInstruction: " + getMisfireInstruction() + " nextFireTime: " + getNextFireTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString() { return stringify(this, true); }", "public String toString() {\n\t\treturn this.toJSON().toString();\n\t}", "public String toString() {\n\t\treturn this.toJSON().toString();\n\t}", "@Override\n public String toString() {\n // TODO: Using Serializer\n return Serializer.toByteArray(this).toString();\n }", "public String toString() {\n StringWriter writer = new StringWriter();\n this.write(writer);\n return writer.toString();\n }", "public String toString() {\n\t\treturn toString(true);\n\t}", "@Override\n\tpublic String toString() {\n\t\ttry {\n\t\t\treturn this.toJSONString(0);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public String toString() {\n return new JSONSerializer().serialize(this);\n }", "public String toString()\n\t{\n\t\treturn Printer.stringify(this, false);\n\t}", "public String toString() {\n\t\treturn toString(this);\n\t}", "@Override\n public String toString() {\n ObjectMapper mapper = new ObjectMapper();\n try {\n return mapper.writeValueAsString(this);\n } catch (JsonProcessingException e) {\n return null;\n }\n }", "public String toString() {\n return ToStringBuilder.reflectionToString(this);\n }", "@Override\n public String toString() {\n return new Gson().toJson(this);\n }", "public String toString() {\n\t\treturn toString(0, 0);\n\t}", "@Override\n public String toString() {\n return new GsonBuilder().serializeNulls().create().toJson(this).toString();\n }", "@Override\n\tpublic String toString() {\n\t\treturn toStringBuilder(new StringBuilder()).toString();\n\t}", "@Override\n public String toString() {\n return toString(false, true, true, null);\n }", "@Override\n\tpublic String toString() {\n\t\treturn toText();\n\t}", "@Override\r\n\tpublic String toString() {\n\t\tString str = \"\";\r\n\t\treturn str;\r\n\t}", "@Override()\n public String toString()\n {\n final StringBuilder buffer = new StringBuilder();\n toString(buffer);\n return buffer.toString();\n }", "@Override\r\n public String toString() {\r\n return JsonSerializer.SerializeObject(this);\r\n }", "@Override\n public String toString() {\n String str = \"\";\n\n //TODO: Complete Method\n\n return str;\n }", "@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }", "@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }", "@Override\n public String toString() {\n return JsonSerializer.SerializeObject(this);\n }", "@Override\n public String toString() {\n return gson.toJson(this);\n }", "public String toString() {\n return \"\";\n }", "public String toString() {\n return \"\";\n }", "@Override\n public String toString() {\n ByteArrayOutputStream bs = new ByteArrayOutputStream();\n PrintStream out = new PrintStream(bs);\n output(out, \"\");\n return bs.toString();\n }", "public String serialize() {\n Gson gson = new Gson();\n return gson.toJson(this);\n }", "public String serialize() {\n Gson gson = new Gson();\n return gson.toJson(this);\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn JSONObject.toJSONString(this);\r\n\t}", "@Override\n public final String toString() {\n return asString(0, 4);\n }", "public String toString() {\n return toDisplayString();\n }", "public final String toString() {\n\t\tStringWriter write = new StringWriter();\n\t\tString out = null;\n\t\ttry {\n\t\t\toutput(write);\n\t\t\twrite.flush();\n\t\t\tout = write.toString();\n\t\t\twrite.close();\n\t\t} catch (UnsupportedEncodingException use) {\n\t\t\tuse.printStackTrace();\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\t\treturn (out);\n\t}", "public String toString() {\r\n return \"\";\r\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn \"\";\r\n\t}", "public String toString()\n\t{\n\t\tString result = \"\";\n\t\tresult += this.data;\n\t\treturn result;\n\t}", "public String toString() {\n\t\treturn EPPUtil.toString(this);\n\t}", "public String toString() {\n\t\treturn EPPUtil.toString(this);\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn Json.pretty( this );\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn toJSON().toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\tif (repr == null)\n\t\t\trepr = toString(null);\n\n\t\treturn repr;\n\t}", "public String toString()\r\n\t{\r\n\t\tStringBuffer OutString = new StringBuffer();\r\n\t\t// Open tag\r\n\t\tOutString.append(\"<\");\r\n\t\t// Add the object's type\r\n\t\tOutString.append(getType());\r\n\t\t// attach the ID if required.\r\n\t\tif (DEBUG)\r\n\t\t\tOutString.append(getObjID());\r\n\t\t// add the class attribute if required; default: don't.\r\n\t\tif (getIncludeClassAttribute() == true)\r\n\t\t\tOutString.append(getClassAttribute());\r\n\t\t// Add any transformation information,\r\n\t\t// probably the minimum is the x and y values.\r\n\t\t// again this is new to Java 1.4;\r\n\t\t// this function returns a StringBuffer.\r\n\t\tOutString.append(getAttributes());\r\n\t\t// close the tag.\r\n\t\tOutString.append(\">\");\r\n\t\tOutString.append(\"&\"+entityReferenceName+\";\");\r\n\t\t// close tag\r\n\t\tOutString.append(\"</\");\r\n\t\tOutString.append(getType());\r\n\t\tOutString.append(\">\");\r\n\r\n\t\treturn OutString.toString();\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"\";\n\t}", "public String toString()\n\t{\n\t\treturn toString(0);\n\t}", "public String toString()\n\t{\n\t\treturn toString(0);\n\t}", "public String toString()\n\t{\n\t\treturn toString(0);\n\t}", "public java.lang.String toString() {\n return this.stringValue;\n }", "public String toString() {\n\t\t//TODO add your own field name here\t\t\n\t\t//return buffer.append(this.yourFieldName).toString();\n\t\treturn \"\";\n\t}", "public String toString() {\n\t\treturn super.toString();\n\t\t// This gives stack overflows:\n\t\t// return ToStringBuilder.reflectionToString(this);\n\t}", "public String toString() { return \"\"; }", "public String toString() { return \"\"; }", "public String toString() {\n\t\treturn this;\n\t}", "@Override\n\tpublic String toString()\n\t{\n\t\treturn this.str;\n\t}", "public String toString() {\n\treturn createString(data);\n }", "@Override\n public String toString()\n {\n return this.toLsString();\n }", "public String toString() {\n \t\treturn null;\n \t}", "@Override\n public String toString() {\n byte[] buffer = toBuffer();\n return (buffer == null) ? null : new String(buffer, StandardCharsets.UTF_8);\n }", "public String toString() {\n if (this.data.isEmpty()) {\n return super.toString();\n }\n return BytesUtil.bytes2HexString(toBinary());\n }", "@Override\n public String toString() {\n return (this.str);\n }", "public String getAsString() {\n\t\treturn new String(this.getAsBytes());\n\t}", "public String toString() {\n\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\n\n\t\tDocument document = XMLUtils.newDocument();\n\t\tdocument.appendChild(toXML(document));\n\t\tXMLUtils.write(bos, document);\n\n\t\treturn bos.toString();\n\t}", "public String toString()\r\n\t{\r\n\t\treturn toCharSequence().toString();\r\n\t}", "public String toString()\n {\n\tif (data() == null) {\n\t return \"null\";\n\t} else {\n\t return data().toString();\n\t}\n }", "public String toSimpleString() {\n\t\treturn null;\n\t}", "@Override public String toString();", "public String toString() {\n\t\treturn str;\n\t}", "@Override\n public String toString() {\n Gson gson = new Gson();\n\n String json = gson.toJson(this);\n System.out.println(\"json \\n\" + json);\n return json;\n }", "public String toString() {\n return \"\" + data;\n }", "public java.lang.String toString(){\n return null; //TODO codavaj!!\n }", "public String toString(){\n return XMLParser.parseObject(this);\n }", "public String toString() {\n\t\treturn data.toString();\n\t}", "public String toString() {\n\t\treturn data.toString();\n\t}", "@Override\r\n public String toString() {\r\n return JAXBToStringBuilder.valueOf(this, JAXBToStringStyle.SIMPLE_STYLE);\r\n }", "@Override\r\n public String toString() {\r\n return toSmartText().toString();\r\n }", "public java.lang.String toString()\n {\n return this.stringValue;\n }", "@Override\r\n\tpublic String toString();", "public String toString() {\n\t\treturn super.toString();\n\t}", "public String toString() {\n\t\treturn super.toString();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn JSON.toJSONString(this,SerializerFeature.WriteMapNullValue,\n\t\t\t\tSerializerFeature.WriteNonStringKeyAsString,\n\t\t\t\tSerializerFeature.WriteNullListAsEmpty,\n\t\t\t\tSerializerFeature.WriteNullNumberAsZero,\n\t\t\t\tSerializerFeature.WriteNullStringAsEmpty);\n\t}", "public String toString() {\r\n return ToStringBuilder.reflectionToString(this,\r\n ToStringStyle.MULTI_LINE_STYLE);\r\n }", "@Override\n public String toString() {\n return value();\n }", "public String toString(){\r\n\t\tString output=\"\";\r\n\t\toutput+=super.toString();\r\n\t\treturn output;\r\n\t}", "public String toString(){\r\n\t\tString superString = super.toString();\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\t//Add the object to the string\r\n\t\tbuilder.append(\". \");\r\n\t\tif (this.error != null) {\r\n\t\t\tbuilder.append(error.toString());\r\n\t\t\tbuilder.append(\". \");\r\n\t\t}\r\n\t\tbuilder.append(\"Object: \");\r\n\t\tbuilder.append(object.toString());\r\n\t\tif (this.recordRoute)\r\n\t\t\tbuilder.append(\", [RECORD_ROUTE]\");\r\n\t\tif (this.reRouting) \r\n\t\t\tbuilder.append(\", [RE-ROUTING]\");\r\n\t\t//Add the masks to the string\r\n\t\tif (this.mask != null) {\r\n\t\t\tbuilder.append(\", label set: \");\r\n\t\t\tbuilder.append(mask.toString());\r\n\t\t}\r\n\t\treturn superString.concat(builder.toString());\r\n\t}", "public String serialize() {\n switch (type) {\n case LIST:\n return serializeList();\n\n case OBJECT:\n return serializeMap();\n\n case UNKNOWN:\n return serializeUnknown();\n }\n return \"\";\n }", "@Override\n \tpublic String toString() {\n \t\treturn toStringHelper(1, \"\");\n \t}", "public String toString() {\r\n\t\t\r\n\t\treturn super.toString();\r\n\t\t\r\n\t}", "public String toString() {\t\t\t\t\t\r\n\t\treturn super.toString();\r\n\t}", "@Override\n public String toString()\n {\n return Arrays.toString(this.toArray());\n }", "public String toString() {\n\t\treturn null;\n\t}", "public String toString() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn value + \"\";\r\n\t}", "@Override\n public String toString() {\n final Map<String, Object> augmentedToStringFields = Reflect.getStringInstanceVarEntries(this);\n augmentToStringFields(augmentedToStringFields);\n return Reflect.joinStringMap(augmentedToStringFields, this);\n }", "@Override\n public String toString() {\n return string;\n }", "@Override\n public String toString() {\n return mString;\n }", "public String toString() {\n\t\treturn (getValue().toString());\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn this.toAnticipatedString();\n\t}", "public String toString();", "public String toString();", "public String toString();" ]
[ "0.85209006", "0.841777", "0.841777", "0.8366974", "0.83522326", "0.82382506", "0.81876093", "0.8168637", "0.8142355", "0.81271034", "0.8122489", "0.8105754", "0.8081656", "0.8078452", "0.8054295", "0.8035403", "0.8006206", "0.7991388", "0.79908043", "0.7911887", "0.7888493", "0.78865266", "0.78695226", "0.78695226", "0.78695226", "0.7868274", "0.7866442", "0.7866442", "0.78640187", "0.7863926", "0.7863926", "0.78452796", "0.78372735", "0.78302526", "0.78253496", "0.78080964", "0.7791785", "0.7762617", "0.7758624", "0.7758624", "0.77570355", "0.775493", "0.7751071", "0.7741629", "0.7740462", "0.77321535", "0.77321535", "0.77321535", "0.7699959", "0.76894474", "0.7687626", "0.7686798", "0.7686798", "0.767516", "0.7671781", "0.7664782", "0.7651196", "0.7649051", "0.7643409", "0.76396096", "0.76377183", "0.7637203", "0.7631748", "0.76242656", "0.76179624", "0.76138186", "0.7613203", "0.76020825", "0.7599599", "0.75964737", "0.75955653", "0.7593517", "0.7590288", "0.7590288", "0.7583509", "0.7579933", "0.75796735", "0.7572112", "0.7566343", "0.7566343", "0.75591755", "0.7551555", "0.75447625", "0.75279564", "0.75271845", "0.7525989", "0.75213397", "0.7521007", "0.7519916", "0.7501695", "0.74896735", "0.74896735", "0.7488869", "0.7487125", "0.7478898", "0.74787325", "0.7468502", "0.7464824", "0.74632865", "0.74632865", "0.74632865" ]
0.0
-1
Compare the next fire time of this Trigger to that of another by comparing their keys, or in other words, sorts them according to the natural (i.e. alphabetical) order of their keys.
public int compareTo(Trigger other) { if(other.getKey() == null && getKey() == null) return 0; if(other.getKey() == null) return -1; if(getKey() == null) return 1; return getKey().compareTo(other.getKey()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\t\tpublic int compare(twi arg0, twi arg1) {\n\t\t\t\t\tif (arg0.timestamp > arg1.timestamp) {\r\n\t\t\t\t\t\treturn -1;\r\n\t\t\t\t\t} else if (arg0.timestamp < arg1.timestamp) {\r\n\t\t\t\t\t\treturn 1;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "@Override\n\t\tpublic int compare(Object a, Object b) {\n\t\t\tif(hm.get(a)>hm.get(b))\n\t\t\t{\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t\n\t\t}", "@Override\n\t\t\tpublic int compare(Entry<Long, String> e1, Entry<Long, String> e2) {\n\t\t\t\t\n\t\t\t\treturn (int) (e1.getKey()-e2.getKey());\n\t\t\t}", "public int compare(Key<Double, Double> a, Key<Double, Double> b){\n\t\t\tif (a.getFirst() < b.getFirst()){\n\t\t\t\treturn -1;\n\t\t\t} else if (a.getFirst() == b.getFirst()){\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}", "@Override\n\tpublic int compare(Map e1, Map e2) {\n\t\tif (!e1.containsKey(\"event_start_time\") && !e2.containsKey(\"event_start_time\")) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (!e1.containsKey(\"event_start_time\")) {\n\t\t\treturn e2.get(\"event_start_time\") == null ? 0 : 1;\n\t\t} else if (!e2.containsKey(\"event_start_time\")) {\n\t\t\treturn e1.get(\"event_start_time\") == null ? 0 : -1;\n\t\t}\n\n\t\tTimestamp e1_event_start_time = Timestamp.valueOf(e1.get(\"event_start_time\").toString());\n\t\tTimestamp e2_event_start_time = Timestamp.valueOf(e2.get(\"event_start_time\").toString());\n\n\t\tif (e1_event_start_time.equals(e2_event_start_time)) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn e1_event_start_time.before(e2_event_start_time) ? -1 : 1;\n\t}", "@Override\n\t\tpublic int compareTo(Event other) {\n\t\t\tif (this.time < other.time + 1.0e-9) return -1;\n\t\t\telse if (this.time > other.time - 1.0e-9) return 1;\n\t\t\telse {\n\t\t\t\tif(this.active > other.active) return 1;\n\t\t\t\telse return -1;\n\t\t\t}\n\t\t}", "public int compare(TimeEntry t1, TimeEntry t2) {\n\t\t\t\t\treturn t1.getTime().compareTo(t2.getTime());\n\t\t\t\t//return 1;\n\t\t\t }", "@Override\n public int compare(Integer a, Integer b) {\n if (base.get(a) >= base.get(b)) {\n return 1;\n } else {\n return -1;\n } // returning 0 would merge keys\n }", "public int compareTo(FlightKey other) {\n\t\t// FILL IN CODE\n\t\tif(this.origin.compareTo(other.origin) < 0) return -1;\n\t\tif(this.origin.compareTo(other.origin) > 0) return 1;\n\n\t\tif(this.dest.compareTo(other.dest) < 0) return -1;\n\t\tif(this.dest.compareTo(other.dest) > 0) return 1;\n\n\t\tif(this.date.compareTo(other.date) < 0) return -1;\n\t\tif(this.date.compareTo(other.date) > 0) return 1;\n\n\t\tif(this.time.compareTo(other.time) < 0) return -1;\n\t\tif(this.time.compareTo(other.time) > 0) return 1;\n\n\t\treturn 0; // don't forget to change it\n\t}", "@Test\n\tpublic void testAssociatorSort() throws Exception {\n\t\t// add out of order to events list\n\t\tJsonEventInfoComparatorTest comparatorTest = new JsonEventInfoComparatorTest();\n\t\tcomparatorTest.setup();\n\t\ttestService.events.add(comparatorTest.farEvent);\n\t\ttestService.events.add(comparatorTest.fartherEvent);\n\t\ttestService.events.add(comparatorTest.closeEvent);\n\n\t\tJsonEventInfo reference = new JsonEventInfo(comparatorTest.referenceEvent);\n\t\tList<JsonEventInfo> sorted = testAssociator.getSortedNearbyEvents(\n\t\t\t\treference, null);\n\t\tAssert.assertEquals(\"closest event first\",\n\t\t\t\tcomparatorTest.closeEvent, sorted.get(0).getEvent());\n\t\tAssert.assertEquals(\"farther event last\",\n\t\t\t\tcomparatorTest.fartherEvent,\n\t\t\t\tsorted.get(testService.events.size() - 1).getEvent());\n\n\t\tSystem.err.println(testAssociator.formatOutput(reference, null, sorted));\n\t}", "@Override\n public int compareTo(Record o) {\n if (this.result - o.result > 0) {\n return 1;\n } else if (this.result - o.result < 0) {\n return -1;\n } else {\n // press time: the less, the better.\n if (this.pressTime < o.pressTime) {\n return 1;\n } else if (this.pressTime > o.pressTime) {\n return -1;\n } else {\n // total times: the more, the better.\n if (this.totalTimes > o.totalTimes) {\n return 1;\n } else if (this.totalTimes < o.totalTimes) {\n return -1;\n }\n return 0;\n }\n }\n }", "@Override\n public int compare(Event o1, Event o2) {\n char[] event1 = o1.getEvent().toCharArray();\n char[] event2 = o2.getEvent().toCharArray();\n\n int i = 0; // Intiialize counter variable i\n\n while (i < event1.length && i < event2.length) // We reached the end, stop\n {\n if (event1[i] - event2[i] == 0) /* if the two elements are the same, tells us nothing about difference */\n {\n i++; // Keep going\n }\n\n else if (event1[i] - event2[i] < 0) // If true, this->str[i] comes first\n {\n return -1; // Return -1 for sorting\n }\n\n else if (event1[i] - event2[i] > 0) // If true,argStr.str[i] comes first\n {\n return 1;\n }\n }\n\n if (event1.length < event2.length)\n {\n return -1;\n }\n\n else if (event1.length > event2.length)\n {\n return 1;\n }\n\n else\n {\n return 0;\n }\n\n }", "public int compare(String a, String b) {\n\t if (base.get(a) >= base.get(b)) {\n\t return -1;\n\t } else {\n\t return 1;\n\t } // returning 0 would merge keys\n\t }", "@Override\n public int compareTo(Record otherRecord) {\n return (int) (otherRecord.mCallEndTimestamp - mCallEndTimestamp);\n }", "private static void compareForIdenticalKeys() {\n Integer[] identical = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};\n\n Insertion insertion = new Insertion();\n insertion.analyzeSort(identical);\n insertion.getStat().printReport();\n\n Selection selection = new Selection();\n selection.analyzeSort(identical);\n selection.getStat().printReport();\n }", "public void sortEventsByTime() {\n for (OrgEvent event : events) {\n event.setCompareByTime(true);\n }\n Collections.sort(events);\n }", "@Override\n\t\t\tpublic int compare(KeyValueData o1, KeyValueData o2) {\n\t\t\t\tif(o1.value < o2.value){\n\t\t\t\t\treturn -1;\n\t\t\t\t}else if(o1.value > o2.value){\n\t\t\t\t\treturn 1;\n\t\t\t\t}else{\n\t\t\t\t\tif(o1.key.compareTo(o2.key) < 0){\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}else if(o1.key.compareTo(o2.key) > 0){\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}", "private int compareTimeSpan(ProcessorDistributionKey key)\n {\n int result = 0;\n result = myTimeSpan.compareTo(key.myTimeSpan);\n\n if (result == 0)\n {\n if (myConstraintKey == null)\n {\n if (key.myConstraintKey != null)\n {\n result = 1;\n }\n }\n else if (key.myConstraintKey == null)\n {\n result = -1;\n }\n else if (!myConstraintKey.equals(key.myConstraintKey))\n {\n result = myConstraintKey.hashCode() - key.myConstraintKey.hashCode();\n\n // Just in case the hash codes are coincident.\n if (result == 0)\n {\n result = System.identityHashCode(myConstraintKey) - System.identityHashCode(key.myConstraintKey);\n }\n }\n }\n\n return result;\n }", "public int compare(String a, String b) {\n if (base.get(a) >= base.get(b)) {\n return -1;\n } else {\n return 1;\n } // returning 0 would merge keys\n }", "public int compare(Element e1, Element e2) {\n return e2.getKey() - e1.getKey();\n }", "@Override\n\tpublic int compare(WritableComparable a, WritableComparable b) {\n\t\tFloatWritable key1 = (FloatWritable) a;\n\t\tFloatWritable key2 = (FloatWritable) b;\n\n\t\t// Implemet sorting in descending order\n\t//\tint result = key1.get() < key2.get() ? 1 : key1.get() == key2.get() ? 0 : -1;\n\t\treturn -1 * key1.compareTo(key2);\n\t}", "@Override\n public int compareTo(Delayed o) {\n DelayedElement de = (DelayedElement) o;\n if (insertTime < de.getInsertTime())\n return -1;\n if (insertTime > de.getInsertTime())\n return 1;\n\n return 0;\n }", "public int compare(Element e1, Element e2) {\n return e1.getKey() - e2.getKey();\n }", "public int compare(KThread s1,KThread s2) { \n if (s1.time > s2.time) \n return 1; \n else if (s1.time < s2.time) \n return -1; \n return 0; \n }", "@Override\n public int compare(Entry<String, Integer> arg0, Entry<String, Integer> arg1) {\n if(arg0.getValue() == arg1.getValue()){\n return arg0.getKey().compareTo(arg1.getKey());\n } else {\n return arg1.getValue() - arg0.getValue();\n }\n }", "public int compare(ThreadWait a, ThreadWait b)\n {\n if(b.wakeUp > a.wakeUp){\n return -1;\n }\n if (b.wakeUp == a.wakeUp){\n return 0;\n }\n \n return 1;\n \n }", "@Override\n public int compare(WordEntity firstWordEntity, WordEntity secondWordEntity) {\n if (firstTheWordIsLessFrequentlyRepeatedThanTheSecond(\n firstWordEntity, secondWordEntity))\n return THAT_THE_FIRST_WORD_HAS_LOWER_FREQUENCY; // greater than\n\n if (firstTheWordIsMoreFrequentlyRepeatedThanTheSecond(\n firstWordEntity, secondWordEntity))\n return THAT_THE_FIRST_WORD_HAS_HIGHER_FREQUENCY; // less than\n\n // equal to\n // same frequency\n // sort alphabetically\n return frequenciesAreSameLetsSortThemByWordsAlphabetically(\n firstWordEntity, secondWordEntity);\n }", "@Override\n\tpublic int compareTo(Key o) {\n\t\tint temp = 0;\n\t\t\t\t\n\t\tif (this.value > o.value) \t\ttemp = 1;\n\t\telse if (this.value < o.value) temp = -1;\n\t\telse \t\t\t\t\t\t\ttemp = 0;\n\t\t\n\t\treturn temp;\n\t}", "public int compare (EventTransitionPair p1, EventTransitionPair p2) {\n int prefixComp = Util.join(substatePrefixOfEvent.get(p1),\"\")\n .compareTo(Util.join(substatePrefixOfEvent.get(p2), \"\"));\n if (prefixComp == 0) { // then, compare on event names\n boolean isP1Null = (p1.getEvent() == null);\n boolean isP2Null = (p2.getEvent() == null);\n if (isP1Null || isP2Null) {\n if (isP1Null && !isP2Null) {\n return 1;\n } else if (!isP1Null && isP2Null) {\n return -1;\n } else { // BOTH null, considered equal\n return 0;\n }\n } else {\n return p1.getEvent().getName().compareTo(p2.getEvent().getName());\n }\n } else {\n return prefixComp;\n }\n }", "private void sortByKeys(LazyMap<ProcessorDistributionKey, Collection<Geometry>> keyToGeoms, Geometry geom,\n Collection<Geometry> unprocessed, ProcessorDistributionKey hull)\n {\n boolean timeless;\n boolean foundKey;\n if (geom instanceof ConstrainableGeometry)\n {\n final Constraints constraints = ((ConstrainableGeometry)geom).getConstraints();\n\n if (constraints == null || constraints.getTimeConstraint() == null)\n {\n timeless = true;\n foundKey = false;\n }\n else\n {\n timeless = false;\n if (myTimeAgnostic)\n {\n addTimeListeners();\n updateTime();\n }\n foundKey = sortByKeys(myActiveTimeSpans, keyToGeoms, (ConstrainableGeometry)geom, hull);\n }\n }\n else\n {\n timeless = true;\n foundKey = false;\n }\n\n if (timeless)\n {\n foundKey = sortByKeys(keyToGeoms, geom, hull, null, TimeSpanList.TIMELESS);\n }\n if (!foundKey && unprocessed != null)\n {\n unprocessed.add(geom);\n }\n }", "public int compareTo(Message other){\n if(time < other.time) {\n return -1;\n } else { // assume one comes before the other in all instances\n return 1;\n }\n }", "@Override\n\t\tpublic int compareTo(Pair newThread) {\n\t\t\t// TODO Auto-generated method stub\n\t\t\tif(this.wakeTime > newThread.wakeTime) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse if(this.wakeTime < newThread.wakeTime) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t}", "@Override\r\n\t\t\tpublic int compare(Entry<Integer, LinkedList<Link>> o1, Entry<Integer, LinkedList<Link>> o2) {\n\t\t\t\treturn o1.getKey() - o2.getKey();\r\n\t\t\t}", "@Override\n \t\t\t\t\tpublic int compare(Entry<Fooable, Integer> o1,\n \t\t\t\t\t\t\tEntry<Fooable, Integer> o2) {\n \t\t\t\t\t\tif (o1.getValue() < o2.getValue())\n \t\t\t\t\t\t\treturn -1;\n \n \t\t\t\t\t\tif (o1.getValue() > o2.getValue())\n \t\t\t\t\t\t\treturn 1;\n \n \t\t\t\t\t\t// Fallback sorting on String comparison\n \t\t\t\t\t\treturn o1.getKey().getName()\n \t\t\t\t\t\t\t\t.compareToIgnoreCase(o2.getKey().getName());\n \t\t\t\t\t}", "public int compareTo(Event other){\n return other.timestamp.compareTo(timestamp);\n }", "void updateSortingComparators(Comparator<ReadOnlyEntry> eventComparator,\n Comparator<ReadOnlyEntry> deadlineComparator,\n Comparator<ReadOnlyEntry> floatingTaskComparator);", "@Override\n\t\t\tpublic int compare(LiveAlarm object1, LiveAlarm object2) {\n\t\t\t\tlong start1 = object1.startT;\n\t\t\t\tlong start2 = object2.startT;\n\t\t\t\t\n\t\t\t\tif (start1 < start2) return -1;\n\t\t\t\tif (start1 == start2) return 0;\n\t\t\t\tif (start1 > start2) return 1;\n\t\t\t\t\n\t\t\t\treturn 0;//to suppress the compiler error;\n\t\t\t}", "private int compararEntradas (Entry<K,V> e1, Entry<K,V> e2)\r\n\t{\r\n\t\treturn (comp.compare(e1.getKey(),e2.getKey()));\r\n\t}", "private void compareDetected() {\n\t\tMap<Integer, Integer> shiftFreq = new HashMap<Integer, Integer>();\n\t\tfor (WordOccurence wordOcc : originalFreq.values()) {\n\t\t\twordOcc.calculateDifferences();\n\t\t\tif (!wordOcc.isValuesSet()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (shiftFreq.containsKey(wordOcc.getPossibleShift())) {\n\t\t\t\tshiftFreq.put(wordOcc.getPossibleShift(),\n\t\t\t\t\t\tshiftFreq.get(wordOcc.getPossibleShift()) + 1);\n\t\t\t} else {\n\t\t\t\tshiftFreq.put(wordOcc.getPossibleShift(), 1);\n\t\t\t}\n\t\t}\n\t\tshift = getMaxValuedKey(shiftFreq);\n\t}", "@Override\n\t\tpublic int compareTo(pair2 o) {\n\t\t\tif (this.time == o.time) {\n\t\t\t\treturn o.status - this.status;\n\t\t\t} else {\n\t\t\t\treturn this.time - o.time;\n\t\t\t}\n\t\t}", "@Override\n\tpublic int compare(WritableComparable a, WritableComparable b) {\n\t\tIntPaire o1 = (IntPaire) a;\n\t\tIntPaire o2 = (IntPaire) b;\n\t\tif(!o1.getFirstKey().equals(o2.getFirstKey())){\n\t\t\treturn o1.getFirstKey().compareTo(o2.getFirstKey());\n\t\t}else{\n\t\t\treturn o1.getSecondKey() - o2.getSecondKey();\n\t\t}\n\t}", "@Override\n public int compareTo(CacheEntry cacheEntry) {\n if (arrivalTime < cacheEntry.arrivalTime) return -1;\n else if (arrivalTime > cacheEntry.arrivalTime) return 1;\n else return 0;\n }", "@Override\n\tpublic int compare(HashMap<K, V> a, HashMap<K, V> b) {\n\t\tint comparison = 0;\n\t\tint counter = 0;\n\t\t/*\n\t\t * If the first keyToSortWith is the same in both HashMaps, sort by the\n\t\t * next keyToSortWith\n\t\t */\n\t\twhile ((comparison == 0) && (counter < keysToSortWith.length)) {\n\t\t\tcomparison = a.get(keysToSortWith[counter]).compareTo(\n\t\t\t\t\tb.get(keysToSortWith[counter]));\n\t\t\tcounter++;\n\t\t}\n\t\t/*\n\t\t * If the current keyToSortWith is supposed to be sorted negatively\n\t\t * (according to the reverse array), returns the opposite result\n\t\t */\n\t\tif (reverse[counter - 1] == true) {\n\t\t\treturn comparison * (-1);\n\t\t}\n\t\treturn comparison;\n\t}", "public int compare(Object o1, Object o2)\r\n/* 237: */ {\r\n/* 238:196 */ DisgustingMoebiusTranslator.ThingTimeTriple x = (DisgustingMoebiusTranslator.ThingTimeTriple)o1;\r\n/* 239:197 */ DisgustingMoebiusTranslator.ThingTimeTriple y = (DisgustingMoebiusTranslator.ThingTimeTriple)o2;\r\n/* 240:198 */ if (DisgustingMoebiusTranslator.this.mode == DisgustingMoebiusTranslator.this.stop)\r\n/* 241: */ {\r\n/* 242:199 */ if (x.to > y.to) {\r\n/* 243:200 */ return 1;\r\n/* 244: */ }\r\n/* 245:203 */ return -1;\r\n/* 246: */ }\r\n/* 247:206 */ if (DisgustingMoebiusTranslator.this.mode == DisgustingMoebiusTranslator.this.start)\r\n/* 248: */ {\r\n/* 249:207 */ if (x.from > y.from) {\r\n/* 250:208 */ return 1;\r\n/* 251: */ }\r\n/* 252:211 */ return -1;\r\n/* 253: */ }\r\n/* 254:214 */ return 0;\r\n/* 255: */ }", "public int compareTo(Key o) {\n int i = f1.compareTo(o.f1);\n if (i != 0) return -i;\n i = f2.compareTo(o.f2);\n if (i != 0) return -i;\n i = f3.compareTo(o.f3);\n if (i != 0) return -i;\n return 0;\n }", "@Override\n\tpublic int compareTo(FreqLocKey o)\n\t{\n\t\tif (this.cityId > o.cityId)\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\telse if (this.cityId < o.cityId)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (this.freq > o.freq)\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse if (this.freq < o.freq)\n\t\t\t{\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (this.pci > o.pci)\n\t\t\t\t{\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\telse if (this.pci < o.pci)\n\t\t\t\t{\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public int compareTo(FingerEntry o) {\n FingerEntry obj = (FingerEntry) o;\n\n if (lastElement > obj.getLastElement()) {\n return 1;\n } else if (lastElement < obj.getLastElement()) {\n return -1;\n } else {\n return this.getKey().getHashKey().compareTo(o.getKey().getHashKey());\n }\n }", "private String[] compareKeys(String currentString) {\n String s1 = \"\";\n String s2 = \"\";\n String[] answer = new String[2];\n for(int i = 0; i < currentString.length(); i++) {\n if(currentString.charAt(i) == '|') {\n s1 = currentString.substring(0,i);\n s2 = currentString.substring(i + 1);\n }\n }\n int compare = s1.compareTo(s2);\n String lesser = \"\";\n String greater = \"\";\n if(compare < 1) {\n lesser = s1;\n greater = s2;\n }\n else{\n lesser = s2;\n greater = s1;\n }\n answer[0] = lesser;\n answer[1] = greater;\n return answer;\n }", "@Override\npublic int compareTo(CompositeKey o) {\n\tif(o == null ||this.key1<o.getKey1()) return -1;\n if(this.key1>o.getKey1())return 1;\n\treturn 0;\n}", "public static void sortEvents(){\n if(events.size()>0){\n Comparator<Event> comp = new Comparator<Event>(){\n public int compare(Event e1, Event e2){\n if(e1.getEventStartTime().before(e2.getEventStartTime())){\n return -1;\n }\n else if(e1.getEventStartTime().after(e2.getEventStartTime())){\n return 1;\n }\n else{\n return 0;\n }\n }\n \n };\n Collections.sort(events, comp);\n \n }}", "@Override\n\tpublic int compare(ExecutionNode o1, ExecutionNode o2) {\n\t\t// compare start times\n\t\tTimePoint s1 = o1.getInterval().getStartTime();\n\t\tTimePoint s2 = o2.getInterval().getStartTime();\n\t\t// compare lower bounds\n\t\treturn s1.getLowerBound() < s2.getLowerBound() ? -1 : s1.getLowerBound() > s2.getLowerBound() ? 1 : 0;\n\t}", "@Override\n public int compare(Map<String, Object> o1, Map<String, Object> o2) {\n if(!descflag){\n return String.valueOf(o2.get(orderField)).compareTo(String.valueOf(o1.get(orderField)));\n }else {\n return String.valueOf(o1.get(orderField)).compareTo(String.valueOf(o2.get(orderField)));\n }\n // return 0;//加一个默认返回\n }", "@Override\n public int compare(Map.Entry<String, Integer> o1,\n Map.Entry<String, Integer> o2) {\n return o1.getValue()-o2.getValue();\n }", "@Override\n\tpublic int compareTo(Time t) {\n\t\tif (this.getIndex() < t.getIndex())\n\t\t\treturn 1;\n\t\telse if (this.getIndex() == t.getIndex())\n\t\t\treturn 0;\n\t\telse\n\t\t\treturn -1;\n\t}", "@SuppressWarnings( \"unchecked\" )\n\tpublic int compare( final KeyedRecord record1, final KeyedRecord record2 ) {\n\t\tint comparison = 0;\n\t\t\n\t\tfor ( int index = 0 ; index < _keys.length ; index++ ) {\n\t\t\tfinal String key = _keys[index];\n final Object value1 = record1.valueForKey( key );\n final Object value2 = record2.valueForKey( key );\n if ( value1 instanceof Comparable && value2 instanceof Comparable ) {\n final Comparable<Object> comp1 = (Comparable<Object>)value1;\n final Comparable<Object> comp2 = (Comparable<Object>)value2;\n comparison = comp1.compareTo( comp2 );\n if ( comparison != 0 ) return comparison; \n }\n else {\n if ( !( value1 instanceof Comparable ) ) {\n throw new IllegalArgumentException( \"Record comparison failed because value 1: \" + value1 + \" is not comparable...\" );\n }\n else { \n throw new IllegalArgumentException( \"Record comparison failed because value 2: \" + value2 + \" is not comparable...\" );\n }\n }\n\t\t}\n\t\treturn comparison;\n\t}", "@Override\n\t\tpublic int compareTo(Job j)\n\t\t{\n\t\t\tJob job = j;\n\t\t\tif (this.getRunTime() < job.getRunTime()) {\n\t\t\t\treturn -1;\n\t\t\t} \n\t\t\treturn 1;\n\t\t}", "@Override\n default int compareTo(KeyValue<K, V> other) {\n return this.getKey().compareTo(other.getKey());\n }", "@Override\r\n public int compare(searchNode e1, searchNode e2) {\r\n //if node 1 has a a lower FScore than node 2, return -1 which will put e1 BEFORE e2\r\n if (e1.getFScore() < e2.getFScore()) {\r\n return -1;\r\n }\r\n //if node 1 has a higher FScore than node 2, return 1 which will put e2 BEFORE e1\r\n if (e1.getFScore() > e2.getFScore()) {\r\n return 1;\r\n }\r\n //else return they are same whichw ill keep order same\r\n return 0;\r\n }", "public int compare(Itemset o1, Itemset o2) {\n long time1 = o1.getTimestamp();\n long time2 = o2.getTimestamp();\n if (time1 < time2) {\n return -1;\n }\n return 1;\n }", "@Override\n public int compare(Score o1, Score o2) {\n\n return o1.getSentId() - o2.getSentId();\n }", "protected int compareTime(Date first, Date second) {\n\t\treturn first.compareTo(second);\n\t}", "@Override\r\n public int compare(Object o1, Object o2){\r\n return ((Record)o1).getField2().compareTo(((Record)o2).getField2());\r\n }", "private static ArrayList<Quest> sortAfterTimestamp(ArrayList<Quest> questListToSort) {\n\t\tfor (int i = 0; i < questListToSort.size() - 1; i++) {\n\t\t\tint index = i;\n\t\t\tfor (int j = i + 1; j < questListToSort.size(); j++) {\n\t\t\t\tif (questListToSort.get(j).getTimestamp() > questListToSort.get(index).getTimestamp()) {\n\t\t\t\t\tindex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tCollections.swap(questListToSort, index, i);\n\t\t}\n\t\treturn questListToSort;\n\t}", "@Override\n public int compare(Task task1, Task task2) {\n return task1.getDate().compareTo(task2.getDate());\n }", "@Override\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// luon duoc sap xep theo thoi gian thuc hien con lai\n\t\t\tpublic int compare(Integer o1, Integer o2) {\t\t\t\t\t\t // tu be den lon sau moi lan add them gia tri vao \n\t\t\t\tif (burstTimeArr[o1] > burstTimeArr[o2]) return 1;\n\t\t\t\tif (burstTimeArr[o1] < burstTimeArr[o2]) return -1;\n\t\t\t\treturn 0;\n\t\t\t}", "@Override\n\tpublic int compareTo(Object o)\n\t{\n\t if(o instanceof Context)\n\t {\n\t \tif (timestamp==null || ((Context) o).timestamp==null)\n\t \t\treturn 0;\n\t return timestamp.compareTo(((Context) o).timestamp);\n\t }\n\t return 0;\n\t}", "private static int compareKeys(\n List<Object> key_group1,\n List<Object> key_group2)\n {\n final int len1 = key_group1.size();\n final int len2 = key_group2.size();\n assert (len1 == len2);\n\n for (int i = 0; i < len1; ++i) {\n int compare =\n FarragoSyslibUtil.compareKeysUsingGroupBySemantics(\n key_group1.get(i),\n key_group2.get(i));\n if (compare != 0) {\n return compare;\n }\n }\n return 0;\n }", "public SortOrdering( final String[] newKeys ) {\n\t\t_keys = new String[newKeys.length];\n\t\tSystem.arraycopy(newKeys, 0, _keys, 0, newKeys.length);\n\t}", "public void sort() {\r\n for (int i = 0; i < namesOfApp.length && i < runTimeOfApp.length; i++) {\r\n for (int j = 0; j < i; j++) {\r\n if (runTimeOfApp[j] < runTimeOfApp[i]) {\r\n String tempName = namesOfApp[i];\r\n long tempRunTime = runTimeOfApp[i];\r\n namesOfApp[i] = namesOfApp[j];\r\n runTimeOfApp[i] = runTimeOfApp[j];\r\n namesOfApp[j] = tempName;\r\n runTimeOfApp[j] = tempRunTime;\r\n }\r\n }\r\n }\r\n\r\n }", "private static int compareEndTimes(TaskItem task1, TaskItem task2) {\n\t\tif (task1 instanceof FloatingTask) {\n\t\t\tif (task2 instanceof FloatingTask) {\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t} else if (task1 instanceof DeadlinedTask) {\n\t\t\tif (task2 instanceof FloatingTask) {\n\t\t\t\treturn 1;\n\t\t\t} else if (task2 instanceof DeadlinedTask) {\n\t\t\t\tDate endTime1 = ((DeadlinedTask) task1).getEndTime();\n\t\t\t\tDate endTime2 = ((DeadlinedTask) task2).getEndTime();\n\t\t\t\treturn endTime2.compareTo(endTime1);\n\t\t\t} else {\n\t\t\t\tDate endTime1 = ((DeadlinedTask) task1).getEndTime();\n\t\t\t\tDate endTime2 = ((TimedTask) task2).getEndTime();\n\t\t\t\treturn endTime2.compareTo(endTime1);\n\t\t\t}\n\t\t} else {\n\t\t\tif (task2 instanceof FloatingTask) {\n\t\t\t\treturn 1;\n\t\t\t} else if (task2 instanceof DeadlinedTask) {\n\t\t\t\tDate endTime1 = ((TimedTask) task1).getEndTime();\n\t\t\t\tDate endTime2 = ((DeadlinedTask) task2).getEndTime();\n\t\t\t\treturn endTime2.compareTo(endTime1);\n\t\t\t} else {\n\t\t\t\tDate endTime1 = ((TimedTask) task1).getEndTime();\n\t\t\t\tDate endTime2 = ((TimedTask) task2).getEndTime();\n\t\t\t\treturn endTime2.compareTo(endTime1);\n\t\t\t}\n\t\t}\n\t}", "public int compare(WritableComparable o1, WritableComparable o2) {\r\n\t\tText key1 = (Text) o1;\r\n\t\tText key2 = (Text) o2;\r\n\t\tint t1char = key1.charAt(0); \r\n\t\tint t2char = key2.charAt(0); \r\n\t\tif (t1char < t2char) return 1;\r\n\t\telse if (t1char > t2char) return -1;\r\n\t\telse return 0;\r\n\t}", "public int compare(EventLog one, EventLog another) {\n\t\t\t\tint comparison = (one.auditStamp.compareTo(another.auditStamp));\n\t\t\t\treturn comparison == 0 ? userIdComparatorEL.compare(one,another) : comparison;\n\t\t\t}", "public void sortBasedPendingJobs();", "public int compareTo(Object o){\n int r;\n if(this.key == ((sortableWord)o).key){ \n r = 0;\n }\n else if(this.key > ((sortableWord)o).key) r = -1;\n else //if(this.peak < ((sortableWordt)o1).peak) \n r = 1;\n return r;\n }", "@Override\n\t\t\t\tpublic int compare(StatisticsItemData o1, StatisticsItemData o2) {\n\t\t\t\t\treturn o2.getDate().compareTo(o1.getDate());\n\t\t\t\t}", "@Override\r\n\tpublic int compare(K o1, K o2) {\n\t\t\r\n\t\treturn ((Comparable<K>) o1).compareTo(o2) ;\r\n\t}", "@SuppressWarnings({ \"rawtypes\"})\n\t\t@Override\n\t\tpublic int compare(WritableComparable a, WritableComparable b) {\n\t\t\tMyKey o1 = (MyKey)a;\n\t\t\tMyKey o2 = (MyKey)b;\n\t\t\treturn o1.getK().compareTo(o2.getK());\n\t\t}", "public int compare(MyQueue first, MyQueue second) {\n\t\t\tif (first.queue.peek().equals(second.queue.peek())) {\n\t\t\t\treturn first.id.compareTo(second.id);\n\t\t\t}\n\t\t\treturn first.queue.peek().compareTo(second.queue.peek());\n\t\t}", "@Override\n public int compare(WritableComparable wc1, WritableComparable wc2) {\n\n StationIdTime record1 = (StationIdTime) wc1;\n StationIdTime record2 = (StationIdTime) wc2;\n return record1.getStationId().compareTo(record2.getStationId());\n\n }", "public int compare(TimeSpan std1, TimeSpan std2) {\n\t\t\t//ascending order\n\t\t\treturn std1.start - std2.start;\n\t\t}", "protected void sortCheck() {\n if (m_instances == null) {\n return;\n }\n \n if (m_simpleConfigPanel.isUsingANativeTimeStamp()) {\n String timeStampF = m_simpleConfigPanel.getSelectedTimeStampField();\n Attribute timeStampAtt = m_instances.attribute(timeStampF); \n if (timeStampAtt != null) {\n \n double lastNonMissing = Utils.missingValue();\n boolean ok = true;\n boolean hasMissing = false;\n for (int i = 0; i < m_instances.numInstances(); i++) {\n Instance current = m_instances.instance(i);\n \n if (Utils.isMissingValue(lastNonMissing)) {\n if (!current.isMissing(timeStampAtt)) {\n lastNonMissing = current.value(timeStampAtt);\n } else {\n hasMissing = true;\n }\n } else {\n if (!current.isMissing(timeStampAtt)) {\n if (current.value(timeStampAtt) - lastNonMissing < 0) {\n ok = false;\n break;\n }\n \n lastNonMissing = current.value(timeStampAtt);\n } else {\n hasMissing = true;\n }\n }\n }\n \n if (!ok && !hasMissing) {\n // ask if we should sort\n int result = JOptionPane.showConfirmDialog(ForecastingPanel.this, \n \"The data does not appear to be in sorted order of \\\"\"\n + timeStampF + \"\\\". Do you want to sort the data?\", \n \"Forecasting\", JOptionPane.YES_NO_OPTION);\n \n if (result == JOptionPane.YES_OPTION) {\n if (m_log != null) {\n m_log.statusMessage(\"Sorting data...\");\n }\n m_instances.sort(timeStampAtt);\n m_sortedCheck = true; \n }\n }\n \n if (!ok && hasMissing) {\n // we can't really proceed in this situation. We can't sort by the timestamp\n // because instances with missing values will be put at the end of the data.\n // The only thing we can do is to remove the instances with missing time\n // stamps but this is likely to screw up the periodicity and majorly impact\n // on results.\n \n int result = JOptionPane.showConfirmDialog(ForecastingPanel.this, \n \"The data does not appear to be in sorted order of \\\"\"\n + timeStampF + \"\\\". \\nFurthermore, there are rows with\\n\" +\n \t\t\"missing timestamp values. We can remove these\\n\" +\n \t\t\"rows and then sort the data but this is likely to\\n\" +\n \t\t\"result in degraded performance. It is strongly\\n\" +\n \t\t\"recommended that you fix these issues in the data\\n\" +\n \t\t\"before continuing. Do you want the system to proceed\\n\" +\n \t\t\"anyway by removing rows with missing timestamps and\\n\" +\n \t\t\"then sorting the data?\", \n \"Forecasting\", JOptionPane.YES_NO_OPTION);\n \n if (result == JOptionPane.YES_OPTION) {\n if (m_log != null) {\n m_log.statusMessage(\"Removing rows with missing time stamps and sorting data...\");\n }\n m_instances.deleteWithMissing(timeStampAtt);\n m_instances.sort(timeStampAtt);\n m_sortedCheck = true; \n }\n }\n }\n }\n }", "@Override\n public int compareTo(Booking other) {\n // Push new on top\n other.updateNewQuestion(); // update NEW button\n this.updateNewQuestion();\n\n\n String[] arr1 = other.time.split(\":\");\n String[] arr2 = this.time.split(\":\");\n// Date thisDate = new Date(this.getCalendarYear(), this.getCalendarMonth(), this.getCalendarDay(), Integer.getInteger(arr2[0]), Integer.getInteger(arr2[1]));\n// if (this.newQuestion != other.newQuestion) {\n// return this.newQuestion ? 1 : -1; // this is the winner\n// }\n\n\n if (this.calendarYear == other.calendarYear) {\n if (this.calendarMonth == other.calendarMonth) {\n if (this.calendarDay == other.calendarDay) {\n if (Integer.parseInt(arr2[0]) == Integer.parseInt(arr1[0])) { // hour\n if (Integer.parseInt(arr2[1]) == Integer.parseInt(arr1[1])) { // minute\n return 0;\n } else {\n return Integer.parseInt(arr1[1]) > Integer.parseInt(arr2[1]) ? -1 : 1;\n }\n } else {\n return Integer.parseInt(arr1[0]) > Integer.parseInt(arr2[0]) ? -1 : 1;\n }\n }\n else\n return other.calendarDay > this.calendarDay ? -1 : 1;\n }\n else\n return other.calendarMonth > this.calendarMonth ? -1 : 1;\n }\n else\n return other.calendarYear > this.calendarYear ? -1 : 1;\n\n\n// if (this.echo == other.echo) {\n// if (other.calendarMonth == this.calendarMonth) {\n// return 0;\n// }\n// return other.calendarMonth > this.calendarMonth ? -1 : 1;\n// }\n// return this.echo - other.echo;\n }", "@Override\n public int compare(Query e1, Query e2) {\n if (e1.getFreq() < e2.getFreq() ||\n (e1.getFreq() == e2.getFreq() && e1.getText().compareTo(e2.getText()) > 0))\n return this.LESS;\n else if (e1.getFreq() > e2.getFreq() ||\n (e1.getFreq() == e2.getFreq() && e1.getText().compareTo(e2.getText()) < 0))\n return this.GREATER;\n return this.EQUAL;\n }", "public void dateHashMapSorted() {\n\t\t//array used to store the key values of the unsorted HashMap\n\t\tLocalDate[] unsortedArr = new LocalDate[SORTINGDATES_SIZE];\n\t\n\t\t//adding all the keys to unsortedArr\n\t\tint i = 0;\n\t\tfor (LocalDate key : map.keySet()) {\n\t\t\t\tunsortedArr[i++] = key;\n\t\t\t}\n\t\t\n\t\tfor (int currIndex = 1; currIndex < unsortedArr.length; currIndex++) {\n\t\t\tLocalDate date = unsortedArr[currIndex];\n\t\t\tint k = currIndex - 1;\n\t\t\t\t\n\t\t\t/*\n\t\t\t * while the index for the array stays above 0 and the element in the previous\n\t\t\t * index is greater than the element at the currentIndex\n\t\t\t */\n\t\t\twhile ((k >= 0) && (unsortedArr[k].isAfter(date))) {\n\t\t\t\t//shifting the elements to the right\n\t\t\t\tunsortedArr[k + 1] = unsortedArr[k];\n\t\t\t\t//decrement x to move the other elements over\n\t\t\t\tk--;\t\n\t\t\t}\n\t\t\tunsortedArr[k + 1] = date;\n\t\t}\n\n\t\tfor (i = 0; i < unsortedArr.length; ++i) {\n\t\t\tSystem.out.println(unsortedArr[i]);\n\t\t}\n\t}", "private TreeSet<Float> getKeyTimes() {\n TreeSet<Float> ret = new TreeSet<>();\n for (XmlNode animation : library_animations.getChildren(\"animation\")) {\n if (animation.getChild(\"animation\") != null) {\n animation = animation.getChild(\"animation\");\n }\n XmlNode timeData = animation.getChild(\"source\").getChild(\"float_array\");\n String[] rawTimes = timeData.getData().trim().split(\"\\\\s+\");\n for (String rawTime : rawTimes) {\n ret.add(Float.parseFloat(rawTime));\n\n }\n }\n return ret;\n }", "public static int compare(Vertex first, Vertex second) {\n if(first.getKey() == second.getKey())\n return 0;\n else if(first.getKey() >= second.getKey())\n return 1;\n else\n return -1;\n }", "public void sort(){\n listOperation.sort(Comparator.comparingInt(Operation::getiStartTime));\n }", "@Override\n\t\t\tpublic int compare(Entry<String, Integer> o1, Entry<String, Integer> o2) {\n\t\t\t\treturn o2.getValue().compareTo(o1.getValue());\n\t\t\t}", "public int compareTo(Actor actor1, Actor actor2) {\n\n List<Event> actorEvents1 = actor1.getEventList();\n List<Event> actorEvents2 = actor2.getEventList();\n\n // it's the same number of events,therefore order further by timestamp\n List<Timestamp> timestampsOfActor1 = DateUtil.getInstance().getTimeStampsOfEventList(actorEvents1);\n Timestamp maxTimestampOfActor1 = DateUtil.getInstance().getMaxTimestamp(timestampsOfActor1);\n\n List<Timestamp> timestampsOfActor2 = DateUtil.getInstance().getTimeStampsOfEventList(actorEvents2);\n Timestamp maxTimestampOfActor2 = DateUtil.getInstance().getMaxTimestamp(timestampsOfActor2);\n\n int resultOfComparingMaxTimestampsOfBothActors = maxTimestampOfActor1.compareTo(maxTimestampOfActor2);\n\n //now since comparing both maximum timestamps and they are the same,we use the login names to compare\n if (resultOfComparingMaxTimestampsOfBothActors == 0) {\n\n String loginNameActor1 = actor1.getLogin().trim();\n String loginNameActor2 = actor2.getLogin().trim();\n\n //finally we compare the strings ignoring case and since the login name is unique,\n // we can be sure that the list will be sorted alphabetically perfectly\n return loginNameActor1.compareToIgnoreCase(loginNameActor2);\n }\n //it will be greater than or equal so we return it,\n // but we need to go vice versa because we need it in ascending order not desceding\n return (resultOfComparingMaxTimestampsOfBothActors == -1) ? 1 : -1;\n }", "@Override\n\t\t\tpublic int compare(Entry<String, Double> o1,\n\t\t\t\t\tEntry<String, Double> o2) {\n\t\t\t\tif(o1.getValue()>o2.getValue()){\n\t\t\t\t\treturn -1;\n\t\t\t\t}else if(o1.getValue()<o2.getValue()){\n\t\t\t\t\treturn 1;\n\t\t\t\t}else{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}", "@Override\n public int compare(Object mMailPersonItem1, Object mMailPersonItem2) {\n Conversation tem1 = (Conversation) mMailPersonItem1;\n Conversation tem2 = (Conversation) mMailPersonItem2;\n String[] array = new String[2];\n int cr = 0;\n int a = tem2.mPriority - tem1.mPriority;\n if (a != 0) {\n cr = (a > 0) ? 2 : -1;\n } else {\n //按薪水降序排列\n array[0] = ((Conversation) mMailPersonItem1).mTime;\n array[1] = ((Conversation) mMailPersonItem2).mTime;\n if (array[0].equals(array[1])) {\n cr = 0;\n }\n Arrays.sort(array);\n if (array[0].equals(((Conversation) mMailPersonItem1).mTime)) {\n cr = -2;\n } else if (array[0].equals(((Conversation) mMailPersonItem2).mTime)) {\n cr = 1;\n }\n }\n return cr;\n }", "public int compareTo(Punch another) {\n return ((new DateTime(time)).compareTo(another.getTime()));\n }", "@Override\r\n\tpublic int compareTo(EmailCheck o) {\n\t\treturn this.memberKey-o.getMemberKey();\r\n\t}", "@Override\r\n\t\t\t\tpublic int compare(Comparendo o1, Comparendo o2) \r\n\t\t\t\t{\n\t\t\t\t\treturn o1.fechaHora.compareTo(o2.fechaHora);\r\n\t\t\t\t}", "public int compare(E a, E b) {\n // Complete this method.\n\t\treturn -1 * ((Map.Entry<String,Integer>)a).getValue().compareTo(((Map.Entry<String,Integer>)b).getValue());\n }", "@Override\n public int compareTo(MappingKey o) {\n\n Integer thisScopeSetScore = (scopeSet == null) ? 0 : scopeSet.hashCode();\n Integer thatScopeSetScore = (o.getScopeSet() == null) ? 0 : o.getScopeSet().hashCode();\n\n return thisScopeSetScore.compareTo(thatScopeSetScore);\n\n }", "@Override\n\tpublic boolean isNextMessage(User from, Vector comparison){\n\n\t\tfor (Object o1 : comparison.getClock().entrySet()) {\n\t\t\tHashMap.Entry pair = (HashMap.Entry) o1;\n\n\t\t\tif(this.clock.containsKey(pair.getKey())){\n\n\t\t\t\tLong reVal = (Long)pair.getValue();\n\t\t\t\tLong myVal = this.clock.get(pair.getKey());\n\t\t\t\tUser userKey = (User)pair.getKey();\n\n\t\t\t\tif(!(userKey.equals(from) && reVal.equals(myVal+1L)) ) {\n\t\t\t\t\tif(! (!userKey.equals(from) && 0 <= myVal.compareTo(reVal) ) ){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tif(!pair.getValue().equals(1L)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (Object o1 : this.clock.entrySet()) {\n\t\t\tHashMap.Entry pair = (HashMap.Entry) o1;\n\n\t\t\tif(comparison.getClock().containsKey(pair.getKey())){\n\n\t\t\t\tLong myVal = (Long)pair.getValue();\n\t\t\t\tLong reVal = comparison.getClock().get(pair.getKey());\n\t\t\t\tUser userKey = (User)pair.getKey();\n\n\t\t\t\tif(!(userKey.equals(from) && reVal.equals(myVal + 1L)) ) {\n\t\t\t\t\tif(! (!userKey.equals(from) && 0 <= myVal.compareTo(reVal) ) ){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Override\n\tpublic int compareTo(TimeInt other) {\n\t\tif (this.time < other.time) {\n\t\t\treturn -1;\n\t\t} else if (this.time > other.time) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\n\t}", "@Override\r\n\t\tpublic int compare(Pair o1, Pair o2) {\r\n\t\t\treturn o2.val.compareTo(o1.val);\r\n\t\t}", "public void sortAppointments() {\n reminders = sort(reminders);\n followup = sort(followup);\n }" ]
[ "0.59415233", "0.58007926", "0.5771608", "0.57273114", "0.5716339", "0.5702798", "0.56408376", "0.55707", "0.55703145", "0.5531499", "0.5496987", "0.5462607", "0.5459532", "0.5453181", "0.54478955", "0.54365873", "0.54150665", "0.5407493", "0.5402779", "0.53999925", "0.5393809", "0.5389038", "0.538481", "0.53701055", "0.5365912", "0.5360882", "0.5346723", "0.533485", "0.53250813", "0.530147", "0.5295586", "0.52863425", "0.52649003", "0.5252033", "0.5234403", "0.5233216", "0.52208245", "0.5213457", "0.5200944", "0.5197469", "0.51708794", "0.51702833", "0.51676553", "0.513911", "0.5108595", "0.510551", "0.51039094", "0.5098628", "0.50849986", "0.5061568", "0.504924", "0.50489795", "0.5021125", "0.5013114", "0.50048846", "0.5004716", "0.49895582", "0.49884516", "0.4976654", "0.49666035", "0.49644846", "0.49621016", "0.49538478", "0.49436155", "0.4942477", "0.4942258", "0.49372962", "0.49321172", "0.49311042", "0.4927438", "0.4916121", "0.4898778", "0.489587", "0.48846602", "0.48832944", "0.48708823", "0.48682883", "0.48611513", "0.48584926", "0.48577863", "0.48556638", "0.4854932", "0.4854644", "0.4853954", "0.4852793", "0.48513067", "0.4849492", "0.48467132", "0.48453617", "0.48425", "0.48413166", "0.4839954", "0.48373994", "0.48364788", "0.48350143", "0.48259747", "0.48255795", "0.482102", "0.4817979", "0.48149824" ]
0.65033805
0
Trigger equality is based upon the equality of the TriggerKey.
@Override public boolean equals(Object o) { if(!(o instanceof Trigger)) return false; Trigger other = (Trigger)o; return !(other.getKey() == null || getKey() == null) && getKey().equals(other.getKey()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean equals(final Object obj) {\n if (obj instanceof FlowTriggerEvent) {\n FlowTriggerEvent te2 = (FlowTriggerEvent) obj;\n if (type == te2.type && name.equals(te2.name)\n && ((payload == null && te2.payload == null)\n || (payload != null && payload.equals(te2.payload)))) {\n return true;\n }\n }\n return false;\n }", "protected abstract boolean equalityTest(Object key, Object key2);", "public boolean isequal(Transition t){\n\t\tif( !this.sourcestate.isequal(t.sourcestate)){\n\t\t\treturn false;\n\t\t}\n\t\tif( !this.targetstate.isequal(t.targetstate)){\n\t\t\treturn false;\n\t\t}\n\t\tint len = this.triggers.size();\n\t\tif( len == t.getTriggers().size()){\n\t\t\tfor(int i = 0; i < len; i ++){\n\t\t\t\tString tempTriggers = this.triggers.get(i);\n\t\t\t\t\n\t\t\t\tboolean temp = false;//This means one condition has the same condition in the other transition.\n\t\t\t\tfor(int j = 0; j < len; j ++){\n\t\t\t\t\tif(tempTriggers.equals(t.getTriggers().get(j))){\n\t\t\t\t\t\ttemp = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(temp == false){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean equals(Object obj) {\n if (this == obj)\n return true;\n if (!(obj instanceof TimeTrigger))\n return false;\n final TimeTrigger that = (TimeTrigger) obj;\n if (AmmoType.differ(this.type, that.type))\n return false;\n switch (this.type) {\n case ABS:\n if (AmmoType.differ(this.abs, that.abs))\n return false;\n return true;\n case REL:\n if (AmmoType.differ(this.rel, that.rel))\n return false;\n return true;\n default:\n return false;\n }\n }", "boolean isTriggerPersistent(String sTriggerName);", "boolean isSimpleTrigger();", "protected boolean equalityTest(Object key, Object key2) {\n\t\t\treturn this.set.equalityTest(key, key2);\n\t\t}", "public boolean equals(TransitionRecord test){\r\n return (fromstate == test.getFromState() && \r\n tostate == test.getToState());\r\n }", "@Test\n\tpublic void equalsSameObject() {\n\t\tProductScanImageURIKey key = this.getDefaultKey();\n\t\tboolean equals = key.equals(key);\n\t\tAssert.assertTrue(equals);\n\t}", "public int compareTo(Trigger other) {\n\n if(other.getKey() == null && getKey() == null)\n return 0;\n if(other.getKey() == null)\n return -1;\n if(getKey() == null)\n return 1;\n \n return getKey().compareTo(other.getKey());\n }", "boolean containsTrigger(String sTriggerName);", "@Test\n public void testEquals() {\n Term t1 = structure(\"abc\", atom(\"a\"), atom(\"b\"), atom(\"c\"));\n Term t2 = structure(\"abc\", integerNumber(), decimalFraction(), variable());\n PredicateKey k1 = PredicateKey.createForTerm(t1);\n PredicateKey k2 = PredicateKey.createForTerm(t2);\n testEquals(k1, k2);\n }", "@Test\n\tpublic void equalsSimilarObjects() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tboolean equals = key1.equals(key2);\n\t\tSystem.out.println();\n\t\tAssert.assertTrue(equals);\n\t}", "@Test\n public void testBackdoorModificationSameKey()\n {\n testBackdoorModificationSameKey(this);\n }", "@Test\n public void equals_SameBuyQuery_Test() {\n Assert.assertTrue(bq1.equals(bq0));\n }", "@Override\n public boolean equals(Object that) {\n if (that instanceof EventParameter) {\n EventParameter other = (EventParameter) that;\n if (!key.equals(other.getKey())) {\n return false;\n }\n return value == other.getValue();\n }\n return false;\n }", "public abstract boolean isTrigger();", "@SuppressWarnings(\"EqualsUnsafeCast\")\n @Override\n public boolean equals(Object o) {\n final Key key = (Key) o;\n return powerComponent == key.powerComponent\n && processState == key.processState;\n }", "@Test\n public void testEqualsReturnsTrueOnSelfArg() {\n boolean equals = record.equals(record);\n\n assertThat(equals, is(true));\n }", "boolean getUserChooseTrigger();", "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof Acquirente)) {\n return false;\n }\n Acquirente that = (Acquirente) other;\n if (this.getIdacquirente() != that.getIdacquirente()) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object obj) {\n if(obj instanceof Operator){\n Operator opObj = (Operator)obj;\n if(obj==this)\n return true;\n return mKey.equals(opObj);\n }\n return false;\n }", "public static FieldMatcher equals() {\n return (columnName, recordOneField, recordTwoField) -> recordOneField.equals(recordTwoField);\n }", "public static boolean getTrigger() {\n\t\treturn true;\r\n\t}", "public boolean getTrigger(){\n \treturn !trigger.get();\n }", "public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (o == null) {\n return false;\n }\n if (o.getClass().equals(SingleFieldKey.class)) {\n SingleFieldKey otherSingleFieldKey = (SingleFieldKey)o;\n return otherSingleFieldKey.keyField == keyField &&\n keyField.valueEqual(otherSingleFieldKey.value, value);\n }\n\n if (!Key.class.isAssignableFrom(o.getClass())) {\n return false;\n }\n Key otherKey = (Key)o;\n return keyField.getGlobType() == otherKey.getGlobType()\n && keyField.valueEqual(value, otherKey.getValue(keyField));\n }", "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof ApptranregFeesAud)) {\n return false;\n }\n ApptranregFeesAud that = (ApptranregFeesAud) other;\n Object myAtrfAudUid = this.getAtrfAudUid();\n Object yourAtrfAudUid = that.getAtrfAudUid();\n if (myAtrfAudUid==null ? yourAtrfAudUid!=null : !myAtrfAudUid.equals(yourAtrfAudUid)) {\n return false;\n }\n return true;\n }", "boolean keyeq(LuaValue key);", "private boolean equals() {\r\n return MARK(EQUALS) && CHAR('=') && gap();\r\n }", "@Override\n protected boolean runInEQ() {\n return true;\n }", "@SuppressWarnings(\"unchecked\")\r\n\t\tpublic boolean equals(Object other) {\r\n\t\t\tboolean flag = false;\r\n\r\n\t\t\tif (other instanceof TableElement) {\r\n\t\t\t\tTableElement<K, V> candidate = (TableElement<K, V>) other;\r\n\r\n\t\t\t\tif ((this.getKey()).equals(candidate.getKey()))\r\n\t\t\t\t\tflag = true;\r\n\t\t\t}\r\n\r\n\t\t\treturn flag;\r\n\t\t}", "public final void testSameObjectEquals() {\n final Transaction copy = testTransaction1;\n assertTrue(testTransaction1.equals(copy)); // pmd doesn't like either\n // way\n\n }", "public boolean triggersNow()\n\t{\n\t\tif(!this.canTrigger())\n\t\t\treturn false;\n\n\t\tfor(GameObject object: this.game.actualState.stack())\n\t\t\tif(object instanceof StateTriggeredAbility)\n\t\t\t\tif(((StateTriggeredAbility)object).printedVersionID == this.ID)\n\t\t\t\t\treturn false;\n\n\t\tIdentified source = this.getSource(this.state);\n\t\tint controller;\n\t\tif(source.isGameObject())\n\t\t\tcontroller = ((GameObject)source).controllerID;\n\t\telse\n\t\t\t// it's a player\n\t\t\tcontroller = source.ID;\n\t\tfor(GameObject object: this.game.actualState.waitingTriggers.get(controller))\n\t\t\tif((object instanceof StateTriggeredAbility) && (((StateTriggeredAbility)object).printedVersionID == this.ID))\n\t\t\t\treturn false;\n\n\t\tfor(SetGenerator condition: this.triggerConditions)\n\t\t\tif(!condition.evaluate(this.game, this).isEmpty())\n\t\t\t\treturn true;\n\n\t\treturn false;\n\t}", "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof BlastingtypeRelationsAud)) {\n return false;\n }\n BlastingtypeRelationsAud that = (BlastingtypeRelationsAud) other;\n Object myBtrAudUid = this.getBtrAudUid();\n Object yourBtrAudUid = that.getBtrAudUid();\n if (myBtrAudUid==null ? yourBtrAudUid!=null : !myBtrAudUid.equals(yourBtrAudUid)) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object that) {\n if (this == that) {\n return true;\n }\n if (that == null) {\n return false;\n }\n if (getClass() != that.getClass()) {\n return false;\n }\n PaymentRecordKey other = (PaymentRecordKey) that;\n return (this.getRecordId() == null ? other.getRecordId() == null : this.getRecordId().equals(other.getRecordId()))\n && (this.getOrdersId() == null ? other.getOrdersId() == null : this.getOrdersId().equals(other.getOrdersId()))\n && (this.getBuildDay() == null ? other.getBuildDay() == null : this.getBuildDay().equals(other.getBuildDay()));\n }", "@Test\n \tpublic void testEqual() {\n \t\tAssert.assertTrue(f1.equals(f1));\n \t}", "@Test\n public void equal() {\n assertTrue(commandItem.equals(commandItemCopy));\n assertTrue(commandItem.isSameCommand(commandItemCopy));\n //not commanditem return false\n assertFalse(commandItem.equals(commandWord));\n }", "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof Sanpham)) {\n return false;\n }\n Sanpham that = (Sanpham) other;\n Object myMasp = this.getMasp();\n Object yourMasp = that.getMasp();\n if (myMasp==null ? yourMasp!=null : !myMasp.equals(yourMasp)) {\n return false;\n }\n return true;\n }", "@Test\n public void equalsWithDifferentName() throws Exception {\n AttributeKey<Number> key1 = new AttributeKey<Number>(Number.class, \"key1\");\n AttributeKey<Number> key2 = new AttributeKey<Number>(Number.class, \"key2\");\n\n assertThat(key1.equals(key2), is(false));\n assertThat(key2.equals(key1), is(false));\n }", "@Override\n public boolean equals(Object other) {\n if (!(other instanceof Acquirente)) return false;\n return this.equalKeys(other) && ((Acquirente)other).equalKeys(this);\n }", "@Test\n public void equalsTest() {\n prepareEntitiesForEqualityTest();\n\n assertEquals(entity0, entity1);\n }", "@Override\n public boolean equals(Object obj) {\n if ( obj == null ) return false;\n if ( this == obj ) return true;\n Keys c = (Keys) obj;\n return Arrays.equals(this.keys, c.keys);\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn instance.equals(((HadoopRecordKey)obj).instance);\n\t}", "@Test\n public void testEqualsReturnsTrueOnIdenticalRecords() {\n boolean equals = record.equals(otherRecord);\n\n assertThat(equals, is(true));\n }", "@Override\n public boolean equals(Object other) {\n if (!(other instanceof Sanpham)) return false;\n return this.equalKeys(other) && ((Sanpham)other).equalKeys(this);\n }", "public static Expression referenceEqual(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.Equal, expression0, expression1);\n }", "private boolean equalKeys(Object other) {\r\n if (this == other) {\r\n return true;\r\n }\r\n if (!(other instanceof Contacto)) {\r\n return false;\r\n }\r\n Contacto that = (Contacto) other;\r\n if (this.getIdContacto() != that.getIdContacto()) {\r\n return false;\r\n }\r\n return true;\r\n }", "private static void compareForIdenticalKeys() {\n Integer[] identical = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};\n\n Insertion insertion = new Insertion();\n insertion.analyzeSort(identical);\n insertion.getStat().printReport();\n\n Selection selection = new Selection();\n selection.analyzeSort(identical);\n selection.getStat().printReport();\n }", "public boolean matchSameColumns(Key key);", "private static boolean Equal(State o, State goal) {\n\t\tif (o==null || goal==null) return false;\n\t\tfor (int i=0;i<3;i++)\n\t\t\tfor (int j=0;j<3;j++)\n\t\t\t\tif (o.d[i][j]!=goal.d[i][j]) return false;\n\t\treturn true;\n\t}", "private static void testKEqual(EventNode e1, EventNode e2, int k) {\n assertTrue(KTails.kEquals(e1, e2, k));\n assertTrue(KTails.kEquals(e2, e1, k));\n }", "public boolean haveSameKeys(Tree<K, V> t, Tree<K, V> otherTree,\n\t\t\tboolean sameKey) {\n\t\tif (!sameKey) {\n\t\t\treturn false;\n\t\t} else if (otherTree.lookup(key) == null) {\n\t\t\tsameKey = false;\n\t\t} else {\n\t\t\tsameKey = left.haveSameKeys(left, otherTree, sameKey);\n\t\t\tsameKey = right.haveSameKeys(right, otherTree, sameKey);\n\t\t}\n\t\treturn sameKey;\n\t}", "public boolean isEqualArrow()\n {\n return Operators.isEqualArrow(getContent());\n }", "public boolean isKeyTriggered ( @NotNull final KeyEvent event )\n {\n return keyCode != null && event.getKeyCode () == keyCode;\n }", "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof User)) {\n return false;\n }\n User that = (User) other;\n if (this.getIduser() != that.getIduser()) {\n return false;\n }\n return true;\n }", "boolean hasSameAs();", "public static BinaryExpression equal(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n\n NameKey nameKey = (NameKey) o;\n return this.analyser.compare(this, nameKey) == 0;\n }", "@Test\n\tpublic void testEqualityCheck() {\n\t\tadd(\"f(x)=x^3\");\n\t\tadd(\"g(x)=-x^3\");\n\t\tt(\"f==g\", \"false\");\n\t\tt(\"f!=g\", \"true\");\n\t\tt(\"f==-g\", \"true\");\n\t\tt(\"f!=-g\", \"false\");\n\t}", "public boolean isEquivalent( Function f )\n {\n if ( name == null || data == null || f.data == null )\n {\n return false;\n }\n return name.equals( f.name )\n && upgrade == f.upgrade\n && data.equals( f.data );\n }", "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof RegistrationItems)) {\n return false;\n }\n RegistrationItems that = (RegistrationItems) other;\n Object myRegItemUid = this.getRegItemUid();\n Object yourRegItemUid = that.getRegItemUid();\n if (myRegItemUid==null ? yourRegItemUid!=null : !myRegItemUid.equals(yourRegItemUid)) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object o) {\n if (!(o instanceof Arrow)) return false;\n\n Arrow a = (Arrow) o;\n return from.equals(a.from) && to.equals(a.to) && color.equals(a.color);\n }", "protected void keyPressedImpl()\n {\n if (key == 'g') {\n trigger = true;\n triggerCount = 1;\n }\n else if (key == 'h') {\n trigger = !trigger;\n }\n }", "@Override\n\tpublic boolean equal() {\n\t\treturn false;\n\t}", "@Override\n public boolean equals(Object other) {\n if (!(other instanceof ApptranregFeesAud)) return false;\n return this.equalKeys(other) && ((ApptranregFeesAud)other).equalKeys(this);\n }", "public boolean isEqual(Edge e){\n if(v1.equals(e.v1) && v2.equals(e.v2)){\n return true;\n }\n else if(v1.equals(e.v2) && v2.equals(e.v1)){\n return true;\n }\n else{\n return false;\n }\n }", "static boolean argEquals(LObjBoolPair the, Object that) {\n return Null.equals(the, that, (one, two) -> {\n // Intentionally all implementations of LObjBoolPair are allowed.\n if (!(two instanceof LObjBoolPair)) {\n return false;\n }\n\n LObjBoolPair other = (LObjBoolPair) two;\n\n return argEquals(one.first(), one.second(), other.first(), other.second());\n });\n }", "@Override\r\n\tpublic boolean equals(Object obj) {\n\t\tAttributeKey ak = (AttributeKey)obj;\r\n\t\treturn this.key.equals(ak.getKey());\r\n\t}", "@Override\n public boolean equals(final Object o) {\n \n if (this == o) {\n return true;\n }\n \n if (o == null) {\n return false;\n }\n \n if (!(o instanceof TemplateElement)) {\n return false;\n }\n \n return key.equals(((TemplateElement) o).key);\n }", "@Test\n public void testEqualsReturnsFalseOnDifferentIdVal() throws Exception {\n setRecordFieldValue(otherRecord, \"id\", 42L);\n\n boolean equals = record.equals(otherRecord);\n\n assertThat(equals, is(false));\n }", "@Override\n @Generated(\"eclipse\")\n public boolean equals(final Object obj) {\n if (this == obj) {\n return true;\n }\n if (obj == null) {\n return false;\n }\n if (getClass() != obj.getClass()) {\n return false;\n }\n @SuppressWarnings(\"unchecked\")\n HolderKey<T> other = (HolderKey<T>) obj;\n if (this.asyncSupported != other.asyncSupported) {\n return false;\n }\n if (this.heldValue == null) {\n if (other.heldValue != null) {\n return false;\n }\n } else if (!this.heldValue.equals(other.heldValue)) {\n return false;\n }\n if (this.initParameters == null) {\n if (other.initParameters != null) {\n return false;\n }\n } else if (!this.initParameters.equals(other.initParameters)) {\n return false;\n }\n if (this.name == null) {\n if (other.name != null) {\n return false;\n }\n } else if (!this.name.equals(other.name)) {\n return false;\n }\n if (this.serviceReference == null) {\n if (other.serviceReference != null) {\n return false;\n }\n } else if (!this.serviceReference.equals(other.serviceReference)) {\n return false;\n }\n return true;\n }", "public final void testDifferentNameEquals() {\n assertFalse(testTransaction1.equals(testTransaction2)); // pmd doesn't\n // like either\n // way\n }", "public boolean isTriggeringToSource() {\n return getFlow().getSignificanceToSource() == Flow.Significance.Triggers;\n }", "@Override public boolean equalsDeep(@Nullable SqlNode node, Litmus litmus) {\n // This is the difference over super.equalsDeep. It skips\n // operands[0] the declared name fo this window. We only want\n // to check the window components.\n return node == this\n || node instanceof SqlWindow\n && SqlNode.equalDeep(\n Util.skip(getOperandList()),\n Util.skip(((SqlWindow) node).getOperandList()), litmus);\n }", "public boolean isEqual(Road r) {\n if (this.targetVertex == r.targetVertex && this.startVertex == r.startVertex || this.targetVertex == r.startVertex && this.startVertex == r.targetVertex) {\n return true;\n } else {\n return false;\n }\n }", "public static void equalsDemo() {\n\n//\t\tSystem.out.printf(\"demo1 == demo2 = %s%n\", demo1 == demo2);\n//\t\tSystem.out.printf(\"demo2 == demo3 = %s%n\", demo2 == demo3);\n//\t\tSystem.out.printf(\"demo2.equals(demo3) = %s%n\", demo2.equals(demo3));\n//\t\tSystem.out.printf(\"%n\");\n\t}", "@Test\n public void testEqualsReturnsFalseOnDifferentStartVal() throws Exception {\n setRecordFieldValue(otherRecord, \"start\", null);\n boolean equals = record.equals(otherRecord);\n\n assertThat(equals, is(false));\n\n equals = otherRecord.equals(record);\n\n assertThat(equals, is(false));\n }", "Equality createEquality();", "@Override\n\tprotected boolean on_trigger_activated(String trigger_name) {\n\t\treturn false;\n\t}", "protected abstract boolean isEqual(E entryA, E entryB);", "@Test\n\tpublic void test_equals1() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertTrue(t1.equals(t2));\n }", "@Test\n\tpublic void equalsNullIdBoth() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tkey1.setId(LONG_ZERO);\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey2.setId(LONG_ZERO);\n\t\tboolean equals = key1.equals(key2);\n\t\tAssert.assertTrue(equals);\n\t}", "private boolean isValuesEqual(BinaryMessage tocmp, BinaryMessage original) {\n\t\tif(tocmp.getValue().equals(original.getValue())) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean areForeignKeysEqual(Schema schema1, DBVersion schema2)\n\t{\n\t\tIterator<foreignkeyshistory.ForeignKey> foreignKeyIterator = schema1.getForeignKeyIterator();\n\t\t\n\t\twhile (foreignKeyIterator.hasNext())\n\t\t{\n\t\t\tforeignkeyshistory.ForeignKey foreignKey = foreignKeyIterator.next();\n\t\t\t\n\t\t\tif (!foreignKeyExists(foreignKey.getSourceTable().getName(), foreignKey.getTargetTable().getName(), schema2)){ return false; }\n\t\t}\n\t\t\n\t\tfor (model.ForeignKey foreignKey : schema2.getVersionForeignKeys())\n\t\t{\n\t\t\tif (!foreignKeyExists(foreignKey.getSourceTable(), foreignKey.getTargetTable(), schema1)){ return false; }\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "String getEqual();", "@Override\r\n\tpublic boolean equals(Object that) {\r\n\t\tTransactionInfo transactionInfo = (TransactionInfo)that;\r\n\t\t//(transactionInfo.transactionId == null || this.transactionId == null) ? false :\r\n\t\treturn transactionInfo.transactionId.equals(this.transactionId);\r\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof FastTrans)) {\n return false;\n }\n FastTrans other = (FastTrans) object;\n if ((this.tranferIdTransfer == null && other.tranferIdTransfer != null) || (this.tranferIdTransfer != null && !this.tranferIdTransfer.equals(other.tranferIdTransfer))) {\n return false;\n }\n return true;\n }", "@Test\n public void testKeyEquivalence() throws Exception {\n ScanResultMatchInfo matchInfo1 = ScanResultMatchInfo.fromWifiConfiguration(mConfig1);\n ScanResultMatchInfo matchInfo1Prime = ScanResultMatchInfo.fromWifiConfiguration(mConfig1);\n ScanResultMatchInfo matchInfo2 = ScanResultMatchInfo.fromWifiConfiguration(mConfig2);\n assertFalse(matchInfo1 == matchInfo1Prime); // Checking assumption\n MacAddress mac1 = MacAddressUtils.createRandomUnicastAddress();\n MacAddress mac2 = MacAddressUtils.createRandomUnicastAddress();\n assertNotEquals(mac1, mac2); // really tiny probability of failing here\n\n WifiCandidates.Key key1 = new WifiCandidates.Key(matchInfo1, mac1, 1);\n\n assertFalse(key1.equals(null));\n assertFalse(key1.equals((Integer) 0));\n // Same inputs should give equal results\n assertEquals(key1, new WifiCandidates.Key(matchInfo1, mac1, 1));\n // Equal inputs should give equal results\n assertEquals(key1, new WifiCandidates.Key(matchInfo1Prime, mac1, 1));\n // Hash codes of equal things should be equal\n assertEquals(key1.hashCode(), key1.hashCode());\n assertEquals(key1.hashCode(), new WifiCandidates.Key(matchInfo1, mac1, 1).hashCode());\n assertEquals(key1.hashCode(), new WifiCandidates.Key(matchInfo1Prime, mac1, 1).hashCode());\n\n // Unequal inputs should give unequal results\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo2, mac1, 1)));\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo1, mac2, 1)));\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo1, mac1, 2)));\n }", "@Nonnull\n public JDK8TriggerBuilder <T> withIdentity (final TriggerKey triggerKey)\n {\n m_aTriggerKey = triggerKey;\n return this;\n }", "@Override\n public boolean equals(Object obj) {\n if (this == obj) {\n return true;\n }\n if (obj == null || getClass() != obj.getClass()) {\n return false;\n }\n Key key = (Key) obj;\n return Objects.equals(exponent, key.exponent)\n && Objects.equals(modulus, key.modulus);\n }", "@Test\n\tpublic void testEqualsVerdadeiro() {\n\t\t\n\t\tassertTrue(contato1.equals(contato3));\n\t}", "ITrigger getTrigger(String sTriggerName);", "default boolean equalsCurrent() {\n return getName().equalsIgnoreCase(current().getName());\n }", "@Test\n\tpublic void equalsNullSequenceNumberBoth() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tkey1.setSequenceNumber(LONG_ZERO);\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey2.setSequenceNumber(LONG_ZERO);\n\t\tboolean equals = key1.equals(key2);\n\t\tAssert.assertTrue(equals);\n\t}", "@Override\n public boolean isLessOrEqual(BindState that) throws CPAException, InterruptedException {\n\n TreeLessEqualComparator<String, BindingPoint> comparator =\n new TreeLessEqualComparator<String, BindingPoint>() {\n @Override\n public boolean isLessEqual(BindingPoint pA, BindingPoint pB) {\n return BindingPoint.isLessEqual(pA, pB);\n }\n };\n\n return PathCopyingPersistentTree.isLessEqual(this.localDefs, that.localDefs, comparator) &&\n PathCopyingPersistentTree.isLessEqual(this.globalDefs, that.globalDefs, comparator);\n }", "@Test\n \tpublic void testf1Equalf3() {\n \t\tAssert.assertTrue(f1.equals(f3));\n \t}", "public boolean equals(Case c){\n\t\treturn (this.posX==c.getPosX() && this.posY==c.getPosY()); \n\t}", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (o == null || getClass() != o.getClass()) {\n return false;\n }\n TestWebhookRequest testWebhookRequest = (TestWebhookRequest) o;\n return Objects.equals(this.notification, testWebhookRequest.notification) &&\n Objects.equals(this.types, testWebhookRequest.types);\n }", "@Test\n public void testEquality() {\n Map<ColumnType, ColumnType> typeMap = new HashMap<ColumnType, ColumnType>();\n ColumnType typeBool = new ColumnType(-7, \"bool\");\n ColumnType typeBoolean = new ColumnType(16, \"boolean\");\n ColumnType typeBool2 = new ColumnType(-7, \"bool\");\n typeMap.put(typeBool, typeBool2);\n typeMap.put(typeBoolean, typeBool2);\n assertEquals(\"Expected bool types are equal\", typeBool, typeMap.get(typeBool));\n assertEquals(\"Expected bool types are equal\", typeBool, typeMap.get(typeBoolean));\n }", "public Trigger getTrigger() {\n \t\treturn trigger;\n \t}" ]
[ "0.6319926", "0.61255985", "0.6032469", "0.60120094", "0.5995465", "0.5732173", "0.57080233", "0.567004", "0.5604735", "0.55966014", "0.5564081", "0.55259854", "0.5508978", "0.54320496", "0.5413017", "0.54028445", "0.54012483", "0.53783774", "0.53758955", "0.5372334", "0.5344026", "0.53239274", "0.5318472", "0.5317489", "0.5288151", "0.52718776", "0.52708906", "0.52558476", "0.52458024", "0.52251756", "0.52149993", "0.51790774", "0.5162333", "0.51621985", "0.5122218", "0.51193374", "0.511643", "0.5112186", "0.50993466", "0.5097676", "0.5095801", "0.50819623", "0.508096", "0.50718313", "0.50268924", "0.50169444", "0.5014023", "0.50082433", "0.5001643", "0.49971557", "0.49938437", "0.49924612", "0.4983268", "0.49537012", "0.49536812", "0.4952315", "0.49509546", "0.4939861", "0.49265924", "0.49177825", "0.4915687", "0.49066547", "0.4905956", "0.49015453", "0.48987192", "0.48893407", "0.48882437", "0.48866042", "0.4884407", "0.4877038", "0.48732212", "0.48729715", "0.48694766", "0.48689356", "0.4866913", "0.48602706", "0.48551905", "0.48528564", "0.48351997", "0.4832969", "0.48290014", "0.4826425", "0.4826095", "0.48157337", "0.4810751", "0.48092186", "0.48060226", "0.4804915", "0.48043507", "0.47925055", "0.47823215", "0.4780839", "0.47789687", "0.4778543", "0.47734195", "0.47709066", "0.47702232", "0.47632584", "0.47630122", "0.47616258" ]
0.7611459
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { buttonGroup1 = new javax.swing.ButtonGroup(); jFrame1 = new javax.swing.JFrame(); mainPanel = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); flds_classname = new javax.swing.JTextField(); btn_constructor = new javax.swing.JRadioButton(); btn_fields = new javax.swing.JRadioButton(); btn_methods = new javax.swing.JRadioButton(); jScrollPane1 = new javax.swing.JScrollPane(); flds_tb = new javax.swing.JTextArea(); statusPanel = new javax.swing.JPanel(); javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator(); statusMessageLabel = new javax.swing.JLabel(); statusAnimationLabel = new javax.swing.JLabel(); progressBar = new javax.swing.JProgressBar(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem(); javax.swing.JMenu helpMenu = new javax.swing.JMenu(); javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem(); jFrame1.setName("jFrame1"); // NOI18N jFrame1.setResizable(false); mainPanel.setName("mainPanel"); // NOI18N org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(addsub.AddSubApp.class).getContext().getResourceMap(AddSubView.class); jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N jLabel1.setName("jLabel1"); // NOI18N flds_classname.setText(resourceMap.getString("flds_classname.text")); // NOI18N flds_classname.setName("flds_classname"); // NOI18N flds_classname.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { flds_classnameKeyReleased(evt); } }); buttonGroup1.add(btn_constructor); btn_constructor.setSelected(true); btn_constructor.setText(resourceMap.getString("btn_constructor.text")); // NOI18N btn_constructor.setName("btn_constructor"); // NOI18N btn_constructor.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btn_constructorMouseClicked(evt); } }); buttonGroup1.add(btn_fields); btn_fields.setText(resourceMap.getString("btn_fields.text")); // NOI18N btn_fields.setName("btn_fields"); // NOI18N btn_fields.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btn_fieldsMouseClicked(evt); } }); buttonGroup1.add(btn_methods); btn_methods.setText(resourceMap.getString("btn_methods.text")); // NOI18N btn_methods.setName("btn_methods"); // NOI18N btn_methods.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btn_methodsMouseClicked(evt); } }); jScrollPane1.setName("jScrollPane1"); // NOI18N flds_tb.setColumns(20); flds_tb.setRows(5); flds_tb.setName("flds_tb"); // NOI18N jScrollPane1.setViewportView(flds_tb); javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(mainPanelLayout.createSequentialGroup() .addGap(33, 33, 33) .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(mainPanelLayout.createSequentialGroup() .addComponent(jLabel1) .addGap(33, 33, 33)) .addGroup(mainPanelLayout.createSequentialGroup() .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(mainPanelLayout.createSequentialGroup() .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(btn_fields) .addComponent(btn_methods)) .addGap(15, 15, 15)) .addComponent(btn_constructor)) .addGap(18, 18, 18))) .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 472, Short.MAX_VALUE) .addComponent(flds_classname, javax.swing.GroupLayout.PREFERRED_SIZE, 472, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(80, Short.MAX_VALUE)) ); mainPanelLayout.setVerticalGroup( mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainPanelLayout.createSequentialGroup() .addGap(29, 29, 29) .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(flds_classname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(mainPanelLayout.createSequentialGroup() .addGap(26, 26, 26) .addComponent(btn_constructor) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btn_fields) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(btn_methods)) .addGroup(mainPanelLayout.createSequentialGroup() .addGap(18, 18, 18) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(30, 30, 30)) ); statusPanel.setName("statusPanel"); // NOI18N statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N statusMessageLabel.setName("statusMessageLabel"); // NOI18N statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N progressBar.setName("progressBar"); // NOI18N javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel); statusPanel.setLayout(statusPanelLayout); statusPanelLayout.setHorizontalGroup( statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 700, Short.MAX_VALUE) .addGroup(statusPanelLayout.createSequentialGroup() .addContainerGap() .addComponent(statusMessageLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 525, Short.MAX_VALUE) .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(statusAnimationLabel) .addContainerGap()) ); statusPanelLayout.setVerticalGroup( statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(statusPanelLayout.createSequentialGroup() .addComponent(statusPanelSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(statusMessageLabel) .addComponent(statusAnimationLabel) .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(3, 3, 3)) ); menuBar.setName("menuBar"); // NOI18N fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(addsub.AddSubApp.class).getContext().getActionMap(AddSubView.class, this); exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N fileMenu.add(exitMenuItem); menuBar.add(fileMenu); helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N aboutMenuItem.setName("aboutMenuItem"); // NOI18N helpMenu.add(aboutMenuItem); menuBar.add(helpMenu); jFrame1.setJMenuBar(menuBar); javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane()); jFrame1.getContentPane().setLayout(jFrame1Layout); jFrame1Layout.setHorizontalGroup( jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(statusPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); jFrame1Layout.setVerticalGroup( jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jFrame1Layout.createSequentialGroup() .addComponent(mainPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 306, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE) .addComponent(statusPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) ); setComponent(mainPanel); setMenuBar(menuBar); setStatusBar(statusPanel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public quotaGUI() {\n initComponents();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public kunde() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public frmVenda() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public FrmMenu() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.73195875", "0.7291065", "0.7291065", "0.7291065", "0.7286258", "0.7248489", "0.7213822", "0.7208757", "0.7195916", "0.7190243", "0.7184025", "0.71591616", "0.7148041", "0.70930153", "0.7080625", "0.7056986", "0.6987694", "0.69770867", "0.6955136", "0.69538426", "0.69452894", "0.6942365", "0.6935255", "0.69317245", "0.6928022", "0.6924961", "0.6924691", "0.6911908", "0.6911051", "0.6892464", "0.6892285", "0.6890819", "0.6890592", "0.688895", "0.6882979", "0.68822217", "0.688142", "0.68779635", "0.68758005", "0.6873809", "0.6871587", "0.68597937", "0.6855975", "0.68553025", "0.685517", "0.68546903", "0.6853679", "0.6852941", "0.6852941", "0.68433666", "0.6837067", "0.68358743", "0.6828493", "0.68284714", "0.6826015", "0.6824099", "0.68229824", "0.68168867", "0.6816564", "0.6810073", "0.68090576", "0.6808398", "0.68083", "0.68070155", "0.6803015", "0.6794736", "0.67938805", "0.6792195", "0.6790488", "0.67894924", "0.67889225", "0.6787931", "0.67813647", "0.6766285", "0.676601", "0.6765171", "0.67574227", "0.6755563", "0.6752438", "0.6752084", "0.6742885", "0.67392796", "0.6737635", "0.6736323", "0.67334515", "0.67276573", "0.67266935", "0.6719731", "0.6715714", "0.6715036", "0.67141175", "0.6708368", "0.6707287", "0.6703903", "0.67010856", "0.6700051", "0.6698535", "0.66982317", "0.66940516", "0.6691627", "0.6689702" ]
0.0
-1
//GENEND:initComponents events due key pressed into textbox.......
private void flds_classnameKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_flds_classnameKeyReleased // only update if class is changed.. if (!AddSubApp.getClassName().equals(this.flds_classname.getText()) ){ AddSubApp.setClassName(this.flds_classname.getText()); /* updatint textbox for info display*/ if (this.btn_constructor.isSelected()){ this.flds_tb.setText(AddSubApp.getConstructorsText()); } else if (this.btn_fields.isSelected()){ this.flds_tb.setText(AddSubApp.getFieldsText()); } else if (this.btn_methods.isSelected()){ this.flds_tb.setText(AddSubApp.getMethodsText()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void jTextField1KeyPressed(java.awt.event.KeyEvent evt) {\n \n }", "private void txtNamaKeyPressed(java.awt.event.KeyEvent evt) {\n\n }", "private void codigoProductoTBKeyPressed(java.awt.event.KeyEvent evt) {\n }", "private void vatTxtKeyTyped(java.awt.event.KeyEvent evt) {\n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e,textField_4);\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e,textField_2_1);\r\n\t\t\t}", "private void event(KeyEvent e ,JTextField textField) {\n\t\tchar n = e.getKeyChar();\r\n\t\tif (!Character.isDigit(n) && n != 8 && n != 46)\r\n\t\t{\r\n\t\t\tlogp(INFO, getClassName(GraphicalUserInterface.class), \"event\", \"Вы ввели не числовое значение\".concat(textField.getText()));\r\n\t\t\ttextField.setEditable(false);\r\n\t\t}else {\r\n\t\t\tlogp(INFO, getClassName(GraphicalUserInterface.class), \"event\", \"Вы ввели числовое значение\".concat(textField.getText()));\r\n\t\t\ttextField.setEditable(true);\r\n\t\t}\r\n\t}", "private void jTextField_Z2KeyReleased(java.awt.event.KeyEvent evt) {\n }", "private void KeyActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void decoySeedTxtKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_decoySeedTxtKeyReleased\n validateInput(false);\n }", "private void tb_TomasRealizadasKeyPressed(java.awt.event.KeyEvent evt) {\n \n \n }", "public void TextFieldEvent();", "@Override\n\tpublic void keyPressed(KeyEvent evt) {\n\t\t\n\t}", "public void keyTyped(KeyEvent e)\r\n\t\t\t\t {\n\t\t\t\t\t char caracter = e.getKeyChar();\r\n\t\t\t\t\t if(((caracter < '0') ||\r\n\t\t\t\t\t\t\t (caracter > '9')) &&\r\n\t\t\t\t\t\t\t (caracter != KeyEvent.VK_BACK_SPACE))\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t e.consume(); // ignorar el evento de teclado\r\n\t\t\t\t\t }\r\n\r\n\t\t\t\t //Controlar el largo del text\r\n\t\t\t\t String s = jTextField3.getText();\r\n\t\t\t\t int n=s.length();\r\n\t\t\t\t if(n >= 8){\r\n\t\t\t\t \t e.consume(); // ignorar el evento de teclado\r\n\t\t\t\t }\r\n\t\t\t\t }", "public void keyTyped(KeyEvent e)\r\n\t\t\t\t {\n\t\t\t\t\t char caracter = e.getKeyChar();\r\n\t\t\t\t\t if(((caracter < '0') ||\r\n\t\t\t\t\t\t\t (caracter > '9')) &&\r\n\t\t\t\t\t\t\t (caracter != KeyEvent.VK_BACK_SPACE))\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t e.consume(); // ignorar el evento de teclado\r\n\t\t\t\t\t }\r\n\r\n\t\t\t\t //Controlar el largo del text\r\n\t\t\t\t String s = jTextField1.getText();\r\n\t\t\t\t int n=s.length();\r\n\t\t\t\t if(n >= 10){\r\n\t\t\t\t \t e.consume(); // ignorar el evento de teclado\r\n\t\t\t\t }\r\n\t\t\t\t }", "public TextBox getTextTB () {\nif (textTB == null) {//GEN-END:|38-getter|0|38-preInit\n // write pre-init user code here\ntextTB = new TextBox (\"Lyric\", \"None\", 500, TextField.ANY | TextField.UNEDITABLE);//GEN-BEGIN:|38-getter|1|38-postInit\ntextTB.addCommand (getBackCommand1 ());\ntextTB.addCommand (getStartC ());\ntextTB.setCommandListener (this);\ntextTB.setInitialInputMode (\"UTF8\");//GEN-END:|38-getter|1|38-postInit\n // write post-init user code here\n}//GEN-BEGIN:|38-getter|2|\nreturn textTB;\n}", "@Override\n public void keyPressed(KeyEvent e) {\n\n\n }", "@Override\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void keyPressed(KeyEvent e) {\n\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\r\n public void keyTyped(KeyEvent ke) {\r\n //To change body of generated methods, choose Tools | Templates.\r\n }", "private void myInit() {\n init_key();\n init_tbl_inventory();\n data_cols();\n focus();\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n jTextField1.grabFocus();\n }\n });\n\n }", "public void keyPressed(KeyEvent e) { }", "@Override\r\n public void keyPressed(KeyEvent e) {\n \r\n }", "public void onKeyPress(Widget sender, char keyCode, int modifiers) {\n }", "private void textField1ActionPerformed(java.awt.event.ActionEvent evt) {\n\t}", "private void txtKQActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\r\n public void keyPressed(KeyEvent e) {\n\r\n }", "private void txtserchActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\n\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t\n\t\t}", "@Override\r\n public void keyTyped(KeyEvent e) {\n\r\n }", "@Override\r\n public void keyTyped(KeyEvent e) {\n\r\n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void keyTyped(KeyEvent event) {\n\n\t}", "@Override\n public void keyPressed(KeyEvent e) {\n \n \n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\r\n\t\t\t}", "@Override\n\tpublic void keyTyped(KeyEvent event) {\n\t\t\n\t}", "@Override\n public void keyTyped(KeyEvent e) {\n \n }", "@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void keyTyped(KeyEvent e) {\n\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent arg0)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void onKeyPressed(KeyEvent event) {\n }", "@Override\r\n public void keyTyped(KeyEvent e)\r\n { \r\n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\r\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\r\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent arg0) {\r\n\t}", "@Override\r\n public void keyTyped(KeyEvent e) {\n \r\n }", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "private void jTextField13ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\r\n public void keyPressed( KeyEvent cIniKeyEvent)\r\n {\n }", "@Override\r\n public void keyPressed(KeyEvent e) {\n }", "public void keyTyped(KeyEvent e) {\n\r\n }", "@Override\n public void keyPressed(KeyEvent e) {\n\n }", "@Override\n public void keyPressed(KeyEvent e) {\n\n }", "private void txtproductoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtproductoKeyTyped\n char c = evt.getKeyChar();\n\n if ((c < 'a' || c > 'z') && (c < 'A' || c > 'Z')) {\n evt.consume();\n }\n }", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void handle(KeyEvent event) {\n\t}", "@Override\n\t\t\t\tpublic void keyPressed(KeyEvent arg0)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t}", "private void jTextField11ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField11ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\n\tpublic void keyPressed(KeyEvent arg0)\n\t{\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\n\t}", "public void keyTyped(KeyEvent e) {\r\n\t\t// user code begin {1}\r\n\t\tswitch (e.getKeyChar()) {\r\n\t\tcase KeyEvent.VK_ENTER:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_BACK_SPACE:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_TAB:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_SHIFT:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_CONTROL:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_ALT:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_CAPS_LOCK:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_END:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_HOME:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_LEFT:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_UP:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_RIGHT:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_DOWN:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_DELETE:\r\n\t\t\tbreak;\r\n\t\tcase KeyEvent.VK_NUM_LOCK:\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tif (getAllowedKey() == TextFieldExt.AllowedKey.AK_ALFANUMERICOS) {\r\n\t\t\t\tif (getMaxLength() == 0) {\r\n\t\t\t\t\tvalidaKeyMask(e);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (getJTextField().getSelectedText() != null || getJTextField().getText().length() < getMaxLength()) {\r\n\t\t\t\t\t\tvalidaKeyMask(e);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\te.setKeyChar('\\0');\r\n\t\t\t\t\t\te.setKeyCode(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tvalidaAllowedKey(e);\r\n\t\t\t\tif (getMaxLength() == 0) {\r\n\t\t\t\t\te.setKeyChar('\\0');\r\n\t\t\t\t\te.setKeyCode(0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (getJTextField().getSelectedText() != null || getJTextField().getText().length() < getMaxLength()) {\r\n\t\t\t\t\t\tvalidaKeyMask(e);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\te.setKeyChar('\\0');\r\n\t\t\t\t\t\te.setKeyCode(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\trestorePainter();\r\n\t}", "@Override\r\n\t\tpublic void keyPressed(KeyEvent e) {\n\t\t}", "public CryptCCInfo()\n{\n\tinitComponents();\n\tbindComponents = new Component[] {lccinfo};\n\t\n\t// Pressing ENTER will initiate search.\n\tccinfo.addKeyListener(new KeyAdapter() {\n\tpublic void keyTyped(KeyEvent e) {\n\t\t//System.out.println(e.getKeyChar());\n\t\tif (e.getKeyChar() == '\\n') bOKActionPerformed(null);\n\t}});\n\n\t\n}", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }", "@Override\n public void keyPressed(KeyEvent e) {\n }" ]
[ "0.7726246", "0.75353587", "0.7188154", "0.7110412", "0.7049336", "0.69670993", "0.69193566", "0.68532306", "0.68193614", "0.67725265", "0.67703027", "0.67635137", "0.6728431", "0.6721809", "0.67057294", "0.66730845", "0.6653765", "0.66517895", "0.66160095", "0.6596082", "0.6594268", "0.65934104", "0.658346", "0.6583416", "0.6566964", "0.65654904", "0.65638554", "0.6561854", "0.65553737", "0.6542647", "0.6542647", "0.6539649", "0.653769", "0.653769", "0.653769", "0.65368646", "0.65366733", "0.65314025", "0.65314025", "0.65314025", "0.65314025", "0.65314025", "0.65314025", "0.65314025", "0.65105605", "0.6507561", "0.649073", "0.64858764", "0.64838284", "0.64753324", "0.64711654", "0.64688444", "0.64651436", "0.64651436", "0.64651436", "0.64651436", "0.64651436", "0.6460472", "0.6460472", "0.64587057", "0.64520365", "0.64502424", "0.64502424", "0.64502424", "0.64502424", "0.6448786", "0.64471436", "0.64459896", "0.64436793", "0.6440605", "0.6440605", "0.6436143", "0.6432231", "0.6432231", "0.6432231", "0.6432231", "0.64282423", "0.64282423", "0.64282423", "0.64282423", "0.64282423", "0.64282423", "0.64282423", "0.6419014", "0.64178205", "0.64173806", "0.64173806", "0.64127266", "0.6410942", "0.6410942", "0.6410942", "0.6410942", "0.6409519", "0.6404634", "0.64030915", "0.64004725", "0.64004725", "0.64004725", "0.64004725", "0.64004725", "0.64004725" ]
0.0
-1
repeated string resource_patterns = 2;
java.util.List<java.lang.String> getResourcePatternsList();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getResourcePatternsCount();", "java.lang.String getResourcePatterns(int index);", "static int getNumPatterns() { return 64; }", "com.google.protobuf.ByteString\n getResourcePatternsBytes(int index);", "public void setPattern(String pattern)\n/* */ {\n/* 71 */ setPatterns(new String[] { pattern });\n/* */ }", "public String[] getPatterns()\n/* */ {\n/* 92 */ return this.patterns;\n/* */ }", "protected abstract void initPatternRepresentation(String[] paramArrayOfString)\n/* */ throws IllegalArgumentException;", "StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }", "private List<Map.Entry<String, Pattern>> addPatterns (String syntax, List<Map.Entry<String, Pattern>> translations) {\n var resources = ResourceBundle.getBundle(syntax);\n for (var key : Collections.list(resources.getKeys())) {\n var regex = resources.getString(key);\n translations.add(new AbstractMap.SimpleEntry<>(key,\n Pattern.compile(regex, Pattern.CASE_INSENSITIVE)));\n }\n return translations;\n }", "@Test\n public void testRemainingResourceStringValid() {\n Matcher mtch = filter.getMatcher(FULL_URI);\n\n filter.isResourceAccess(mtch);\n\n assertEquals(\"resource string differs\", REMAINING_RES_STRING, filter.getRootResourceString(mtch));\n }", "public void addPattern(String pattern) {\n\t\tArrayList<String> patterns = new ArrayList<String>();\n\t\tStringTokenizer entries = new StringTokenizer(pattern, \":,\");\n\t\twhile (entries.hasMoreTokens()) {\n\t\t\tpatterns.add(entries.nextToken());\n\t\t}\n\n\t\taddPatterns((String[]) patterns.toArray(new String[patterns.size()]));\n\t}", "public List<String> loadFile(String filename) {\n\t\tList<String> patterns = new ArrayList<>();\n\t\tString resourceFilename = (filename.indexOf('/') == 0) ? filename : \"/reference/pos/\" + filename;\n URL url = getClass().getResource(resourceFilename);\n if(url == null) {\n throw new IllegalArgumentException(\"Could not load resource: \\\"\" + resourceFilename + \"\\\"\");\n }\n try(InputStream stream = url.openStream()) {\n \tbyte[] bytes = stream.readAllBytes();\n \tStringBuilder sb = new StringBuilder();\n \tfor(byte b : bytes) {\n \t\tsb.append((char)b);\n \t}\n \tString s = sb.toString();\n \tString[] lines = s.split(\"\\\\R\");\t\t// Unicode linebreak sequence\n\t\t\tsb = new StringBuilder();\n \tfor(String line : lines) {\n\t\t\t\tif(line.startsWith(\"//\"))\n\t\t\t\t\tcontinue;\n\t\t\t\tif(line.endsWith(\"+\")) {\n\t\t\t\t\tsb.append(line.substring(0, line.length() - 1));\n\t\t\t\t}\n\t\t\t\telse if(sb.length() > 0 ) {\n\t\t\t\t\tsb.append(line);\n\t\t\t\t\tpatterns.add(sb.toString());\n\t\t\t\t\tsb = new StringBuilder();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tpatterns.add(line);\n \t}\n }\n catch(Exception e) {\n \tSystem.err.println(\"Could not load \" + resourceFilename + \" \" + e.toString());\n }\n\t\treturn patterns;\n\t}", "private void compilePattern() {\r\n\r\n pattern_startOfPage = Pattern.compile(regex_startOfPage);\r\n pattern_headerAttribute = Pattern.compile(regex_headerAttribute);\r\n pattern_messageFirstLine = Pattern.compile(regex_messageFirstLine);\r\n pattern_messageContinuationLine = Pattern.compile(regex_messageContinuationLine);\r\n }", "String getUrlPattern();", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "public void getPatterns(int pack){\n FileHandle file = Gdx.files.internal(\"patterns.txt\");\n String text = file.readString();\n patternPacks = text.split(\";\");\n //System.out.println(patternPacks[pack]);\n }", "abstract boolean matchesResourceName( String resourceName );", "TemplateSubPatternAssociation(ElemTemplate template, StepPattern pattern, String pat) {\n/* 64 */ this.m_pattern = pat;\n/* 65 */ this.m_template = template;\n/* 66 */ this.m_stepPattern = pattern;\n/* 67 */ this.m_targetString = this.m_stepPattern.getTargetString();\n/* 68 */ this.m_wild = this.m_targetString.equals(\"*\");\n/* */ }", "public void setPatterns(String... patterns)\n/* */ {\n/* 80 */ Assert.notEmpty(patterns, \"'patterns' must not be empty\");\n/* 81 */ this.patterns = new String[patterns.length];\n/* 82 */ for (int i = 0; i < patterns.length; i++) {\n/* 83 */ this.patterns[i] = StringUtils.trimWhitespace(patterns[i]);\n/* */ }\n/* 85 */ initPatternRepresentation(this.patterns);\n/* */ }", "public void testResourceURI() throws Exception {\n testResourceURI(\"RELS-EXT\");\n testResourceURI(\"RELS-INT\");\n }", "@Test\n public void testRemainingResourceStringValidDeepString() {\n Matcher mtch = filter.getMatcher(FULL_URI + \"/something/very/deep/nested\");\n\n filter.isResourceAccess(mtch);\n\n assertEquals(\"resource string differs\", REMAINING_RES_STRING, filter.getRootResourceString(mtch));\n }", "private void exercise5() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> nonDuplicateList;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n nonDuplicateList = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .collect(toList());\n }\n\n nonDuplicateList.forEach(System.out::println);\n }", "protected void resourceSet(String resource)\r\n {\r\n // nothing to do\r\n }", "protected abstract void initExcludedPatternRepresentation(String[] paramArrayOfString)\n/* */ throws IllegalArgumentException;", "public interface Constants {\n\n final public static String[] actionTypes = {\n \"ro.pub.cs.systems.eim.practicaltest01.actionType1\",\n \"ro.pub.cs.systems.eim.practicaltest01.actionType2\",\n \"ro.pub.cs.systems.eim.practicaltest01.actionType3\"\n };\n\n}", "String getDelayPattern();", "public ArrayList<Resource> extractResourceListFromText(String rawText) {\n\n ArrayList<Resource> resourceList = new ArrayList<>();\n\n if (!TextUtils.isEmpty(rawText)) {\n\n /* Extraction of all video resource\n * First if text contains '<figure' get list of text from \"<figure\" to \"</figure>\"\n * Then if resource-type=\"video\" is in each figure text that means we need to extract it otherwise no action needed\n * Then split the figure string from 'comma' */\n if (rawText.contains(\"<figure\")) {\n\n ArrayList<String> listFigureVideo = getStringListFromHtmlText(rawText, \"<figure\", \"</figure>\");\n\n if (!listFigureVideo.isEmpty()) {\n\n for (int i = 0; i < listFigureVideo.size(); i++) {\n\n if (listFigureVideo.get(i).contains(\"resource-type=\\\"video\\\"\")) {\n\n String figureVideoString = listFigureVideo.get(i);\n ArrayList<String> commaSeparatedList = new ArrayList<>(Arrays.asList(figureVideoString.split(\",\")));\n\n for (int j = 0; j < commaSeparatedList.size(); j++) {\n\n String separatedText = commaSeparatedList.get(j);\n\n if (!separatedText.contains(\"displayResourceFullScreen\")\n && (separatedText.contains(\".youtube.com/\") || separatedText.contains(\"vimeo.com/\"))) {\n\n String resourceUrlVideo = separatedText;\n\n if (resourceUrlVideo.startsWith(\"&quot;\")) {\n resourceUrlVideo = resourceUrlVideo.replace(\"&quot;\", \"\");\n }\n if (resourceUrlVideo.endsWith(\"&quot;\")) {\n resourceUrlVideo = resourceUrlVideo.replace(\"&quot;\", \"\");\n }\n\n Resource resourceVideo = new Resource();\n resourceVideo.setUrl(resourceUrlVideo);\n resourceVideo.setUrlMain(resourceUrlVideo);\n resourceVideo.setResourceType(Resource.TYPE_RESOURCE_VIDEO);\n\n if (resourceUrlVideo.contains(\".youtube.com/\")) {\n resourceVideo.setType(mContext.getString(R.string.typeYouTubeVideo));\n } else if (resourceUrlVideo.contains(\"vimeo.com/\")) {\n resourceVideo.setType(mContext.getString(R.string.typeVimeoVideo));\n }\n\n if (listFigureVideo.get(i).contains(\"<img\")) {\n String resourceUrlSrc = getStringFromHtmlTextAfterTagRemoval(listFigureVideo.get(i), ConstantUtil.HTML_IMAGE_SRC_TAG, ConstantUtil.HTML_DOUBLE_QUOTE);\n resourceVideo.setUrlThumbnail(resourceUrlSrc);\n }\n\n resourceList.add(resourceVideo);\n\n /* First time we get our desired url of video, we breaks the loop;\n * since after this unnecessary url(s) might add */\n break;\n\n }\n }\n }\n }\n }\n\n\n }\n\n\n /*Extraction of all image resource*/\n ArrayList<String> list = getStringListFromHtmlText(rawText, ConstantUtil.HTML_IMAGE_START_TAG, ConstantUtil.HTML_END_TAG);\n\n if (!list.isEmpty()) {\n for (int i = 0; i < list.size(); i++) {\n\n if (!TextUtils.isEmpty(list.get(i)) && !list.get(i).contains(\"file:\")) {\n\n /*if list.get(i) contains resource-type=\"video\" then do not take\n that image since it is for video resource*/\n if (!list.get(i).contains(\"resource-type=\\\"video\\\"\")) {\n\n String resourceUrl = getStringFromHtmlTextAfterTagRemoval(list.get(i), ConstantUtil.HTML_IMAGE_SRC_TAG, ConstantUtil.HTML_DOUBLE_QUOTE);\n\n Resource resourceQue = new Resource();\n resourceQue.setUrl(resourceUrl);\n resourceQue.setUrlMain(resourceUrl);\n\n String mimeType = URLConnection.guessContentTypeFromName(resourceUrl);\n if (!TextUtils.isEmpty(mimeType) && mimeType.contains(ConstantUtil.TYPE_IMAGE)) {\n\n resourceQue.setUrlThumbnail(resourceUrl);\n resourceQue.setResourceType(Resource.TYPE_RESOURCE_IMAGE);\n\n }\n\n resourceList.add(resourceQue);\n }\n }\n\n }\n }\n\n }\n\n return resourceList;\n\n }", "private void loadResourcesData(){\n //showResourceListView();\n\n String [] resourceData = new String [20];\n\n for(int stringCount = 1; stringCount <= 20; stringCount++) {\n resourceData[stringCount - 1] = \"Title \" + stringCount;\n }\n\n mResourceListAdapter.setResourceData(resourceData);\n }", "private static Map<Integer, List<String>> getIpPatternMap()\n\t{\n\t\tMap<Integer, List<String>> map = new HashMap<>();\n\t\tfor(int a = 1; a <= 3; a++)\n\t\t{\n\t\t\tfor( int b = 1; b <= 3; b++)\n\t\t\t{\n\t\t\t\tfor(int c = 1 ; c <= 3; c++)\n\t\t\t\t{\n\t\t\t\t\tfor( int d = 1; d <= 3; d++)\n\t\t\t\t\t{\n\t\t\t\t\t\tfinal int patternCount = a + b + c + d;\n\t\t\t\t\t\tList<String> patterns;\n\t\t\t\t\t\tif(!map.containsKey(patternCount))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpatterns = new ArrayList<>();\n\t\t\t\t\t\t\tmap.put(patternCount, patterns);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpatterns = map.get(patternCount);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpatterns.add(String.format(\"%1$d%2$d%3$d%4$d\", a,b,c,d));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn map;\n\t}", "@Override\n public List<BannerPattern> getPatterns() {\n return patterns;\n }", "private String getPatterns()\n\t{\n\t\treturn (accepted ? FileSet.patternsToString(patternListPanel.getElements()) : null);\n\t}", "UsagePattern getUsagePattern();", "private void addPatterns(String[] patterns) {\n\t\tif (patterns != null) {\n\t\t\tEntry entry = null;\n\t\t\tfor (String pattern : patterns) {\n\t\t\t\tentry = createEntry(pattern);\n\t\t\t\tif (entry != null) {\n\t\t\t\t\tthis.patterns.add(pattern);\n\t\t\t\t\tthis.entries.add(entry);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void applyLocalizedPattern(String pattern) {\n applyPattern(pattern, true);\n }", "private void setPatterns(String[] patterns) {\n\t\tthis.patterns.clear();\n\t\tthis.entries.clear();\n\t\taddPatterns(patterns);\n\t}", "public String listPatterns() {\n return \"Full list of patterns\";\n }", "String combine(String pattern1, String pattern2);", "public static void patterns() {\n\t\ttry {\n\t\t\tList<Pattern> patterns = PlatformClient.patterns(getUser());\n\t\t\trender(patterns);\n\t\t} catch (ApplicationException e) {\n\t\t\te.printStackTrace();\n\t\t\tflash.error(\"Can not get patterns : %s\", e.getMessage());\n\t\t\trender();\n\t\t}\n\t}", "@Test\n public void testCrazyPatterns() {\n assertEquals(\"java\\\\.\\\\{.*\\\\}\\\\.Array\", glob2Pattern(\"java.{**}.Array\").pattern());\n assertEquals(\"java\\\\./.*<>\\\\.Array\\\\$1\", glob2Pattern(\"java./**<>.Array$1\").pattern());\n assertEquals(\"\\\\+\\\\^\\\\$\", glob2Pattern(\"+^$\").pattern());\n }", "List<String> externalResources();", "public List<String> getPatterns() {\n return patterns;\n }", "private void initRegs(){\n\n keyWordReg = \"\";\n\n for (String seg: keyWordMap.keySet()){\n\n keyWordReg += seg + \"|\";\n\n }\n\n symbolReg = \"[\\\\&\\\\*\\\\+\\\\(\\\\)\\\\.\\\\/\\\\,\\\\-\\\\]\\\\;\\\\~\\\\}\\\\|\\\\{\\\\>\\\\=\\\\[\\\\<]\";\n intReg = \"[0-9]+\";\n strReg = \"\\\"[^\\\"\\n]*\\\"\";\n idReg = \"[a-zA-Z_]\\\\w*\";\n\n tokenPatterns = Pattern.compile(idReg + \"|\" + keyWordReg + symbolReg + \"|\" + intReg + \"|\" + strReg);\n }", "private void removeRedundantPatterns() {\n HashSet<String> patternsToRemove = new HashSet<>();\n for (Map.Entry<String, Pattern> entry : patterns.entrySet()) {\n\n Pattern pattern = entry.getValue();\n\n if (!parameters.keepAllPatterns) {\n String suffixStr = getSuffix(pattern);\n PatternsUtils.addSubPatternToRemoveList(patterns, suffixStr, pattern, patternsToRemove);\n }\n\n if (crossStrand) {\n PatternsUtils.removeReverseCompliments(patterns, pattern, patternsToRemove);\n }\n }\n patterns.keySet().removeAll(patternsToRemove);\n }", "@Test\n public void testGetMonitorRegexPatternMap() {\n String system0 = \"system0\", system1 = \"system1\";\n String system0Rewriter0 = \"system-0-rewriter-0\", system0Rewriter1 = \"system-0-rewriter-1\", system1Rewriter =\n \"system-1-rewriter\", systemOnlyRewriter = \"system-only-rewriter\";\n String system0Rewriter0Streams = \"system-0-rewriter-0-.*\", system0Rewriter1Streams = \"system-0-rewriter-1-.*\",\n system1RewriterStreams = \"system-1-rewriter-.*\";\n JobConfig jobConfig = new JobConfig(new MapConfig(\n new ImmutableMap.Builder<String, String>().put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, system0Rewriter0),\n system0)\n .put(String.format(JobConfig.REGEX_RESOLVED_STREAMS, system0Rewriter0), system0Rewriter0Streams)\n .put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, system0Rewriter1), system0)\n .put(String.format(JobConfig.REGEX_RESOLVED_STREAMS, system0Rewriter1), system0Rewriter1Streams)\n .put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, system1Rewriter), system1)\n .put(String.format(JobConfig.REGEX_RESOLVED_STREAMS, system1Rewriter), system1RewriterStreams)\n // not passed in as a rewriter when calling getMonitorRegexPatternMap\n .put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, \"unused-rewriter\"), system0)\n .put(String.format(JobConfig.REGEX_RESOLVED_STREAMS, \"unused-rewriter\"), \"unused-rewriter-.*\")\n // should not be included since there is no regex\n .put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, systemOnlyRewriter), system0)\n .build()));\n // Pattern.equals only checks that the references are the same, so can't compare maps directly\n Map<String, Pattern> actual = jobConfig.getMonitorRegexPatternMap(String.join(\",\",\n ImmutableList.of(system0Rewriter0, system0Rewriter1, system1Rewriter, systemOnlyRewriter,\n \"not-a-regex-rewriter\")));\n // only should have rewriters for system0 and system1\n assertEquals(2, actual.size());\n assertEquals(system0Rewriter0Streams + \"|\" + system0Rewriter1Streams, actual.get(system0).pattern());\n assertEquals(system1RewriterStreams, actual.get(system1).pattern());\n\n // empty configs should produce an empty map\n jobConfig = new JobConfig(new MapConfig());\n assertEquals(Collections.<String, Pattern>emptyMap(), jobConfig.getMonitorRegexPatternMap(system0Rewriter0));\n assertEquals(Collections.<String, Pattern>emptyMap(), jobConfig.getMonitorRegexPatternMap(\"\"));\n }", "public void setPattern (String pattern) {\n this.pattern = pattern;\n }", "default String getPattern() {\n return null;\n }", "private boolean loadOtherPattern() {\n\t\tArrayList<String> listOfAlternativePatterns = new ArrayList<String>();\n\t\tArrayList<Integer> listOfValue = new ArrayList<Integer>();\n\t\t// Open otherPatterns to load\n\t\tString txtFile = \"res/otherPatterns.txt\";\n\t\tString lineRead = \"\";\n\t\tString separator = \"\\\\s*;\\\\s*\";\n\t\tStringBuilder pattern = null;\n\t\ttry (BufferedReader br = new BufferedReader(\n\t\t\t\tnew InputStreamReader(this.getClass().getClassLoader().getResourceAsStream(txtFile), \"UTF-8\"))) {\n\t\t\twhile ((lineRead = br.readLine()) != null) {\n\t\t\t\tpattern = null;\n\t\t\t\t// use comma as separator\n\t\t\t\t// constructing pattern\n\t\t\t\tif (lineRead.indexOf(\";\") >= 0) {\n\t\t\t\t\tString[] mixedTable = lineRead.split(separator);\n\t\t\t\t\t// the first value stands for representative value of the\n\t\t\t\t\t// line\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlistOfValue.add(new Integer(Integer.parseInt(mixedTable[0])));\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\tlistOfValue.add(null);\n\t\t\t\t\t}\n\t\t\t\t\t// the followings are possible cases\n\t\t\t\t\tpattern = new StringBuilder(\"\");\n\t\t\t\t\tfor (int i = 1; i < mixedTable.length; i++) {\n\t\t\t\t\t\tpattern.append(mixedTable[i]);\n\t\t\t\t\t\tif (i < mixedTable.length - 1) {\n\t\t\t\t\t\t\tpattern.append(\"|\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlistOfAlternativePatterns.add(pattern.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\treturn false;\n\t\t}\n\t\tOTHER_PATTERNS = listOfAlternativePatterns.toArray(new String[listOfAlternativePatterns.size()]);\n\t\tVALUE_OF_OTHER_PATTERNS = listOfValue.toArray(new Integer[listOfValue.size()]);\n\t\treturn true;\n\t}", "List<Resource> resources();", "private JBurgPatternMatcher()\n\t{\n\t}", "void setUsagePattern(UsagePattern usagePattern);", "public int getResourceNamesCount() {\n return resourceNames_.size();\n }", "protected String expectedFor( String resource)\n {\n return resource + \"-Expected\";\n }", "default String patternConstraint(String pattern) {\n return switch (getType()) {\n case STRING -> validationPattern(pattern);\n default -> throw new RuntimeException(\"Only String can have a pattern\");\n };\n }", "@Inject(method = \"readPattern\", at = @At(\"TAIL\"))\n private void parseBppPatternDataPost(CallbackInfo info) {\n for(int i = nextLoomPatternIndex; i < loomPatterns.size(); i++) {\n this.patternCacheKey += partialCacheKey(loomPatterns.get(i));\n }\n }", "public void setPattern(Pattern pattern) {\n this.pattern = pattern;\n }", "public String getPattern() {\r\n return \"DEFAULT\";\r\n }", "public final String getPattern() {\n/* 187 */ return this.m_pattern;\n/* */ }", "public IPath[] getAdditionalResources();", "public interface ResourcePaths {\n String imageFolderPath();\n String imageResourcePath();\n String videoFolderPath();\n String videoResourcePath();\n}", "String getResourceName();", "public String toString() {\n/* 666 */ return this.pattern;\n/* */ }", "@ApiModelProperty(value = \"List of the resource name pattern strings to which the policy applies. Must conform to the pattern templates provided by the associated Managing Resource Types resource type\")\n public List<String> getResources() {\n return resources;\n }", "public String getPattern() {\r\n \treturn pattern;\r\n }", "public String toString() {\n/* 664 */ return this.pattern;\n/* */ }", "public void setResources(List<String> resources) {\n this.resources = resources;\n }", "public void setPattern(String pattern) {\r\n\t\tthis.pattern = pattern;\r\n\t}", "public String getPattern() {\n\treturn pattern;\n }", "@Inject(\n method = \"readPattern\",\n at = @At(value = \"JUMP\", ordinal = 0, shift = At.Shift.AFTER),\n slice = @Slice(\n from = @At(\n value = \"INVOKE\",\n target = \"Lnet/minecraft/nbt/ListTag;size()I\"\n )\n )\n )\n private void parseBppPatternDataInline(CallbackInfo info) {\n int nextIndex = this.patterns.size() - 1;\n while(nextLoomPatternIndex < loomPatterns.size()) {\n LoomPatternData data = loomPatterns.get(nextLoomPatternIndex);\n if(data.index == nextIndex) {\n this.patternCacheKey += partialCacheKey(data);\n nextLoomPatternIndex++;\n } else {\n break;\n }\n }\n }", "public void setVarTrPatternCount( String var, Integer count ) ;", "List<ResourceType> resourceTypes();", "private int numberOfConstants() {\n return (int) Stream.of(this.template.split(\"\\\\.\"))\n .filter(s -> !s.equals(\"*\")).count();\n }", "public String[] getPatternsRegEx() {\n return this.patternsRegEx;\n }", "private String[] getPatterns(StreamTokenizer st) throws IOException {\n\t\t// get language\n\t\tString lang = getLanguageFromTokenizer(st);\n\n\t\tif (st.nextToken() != StreamTokenizer.TT_EOF)\n\t\t\tthrow new IOException(\n\t\t\t\t\t\"PATTERNS takes exactly one (language) or no arguments (default language)!\");\n\n\t\treturn ng.getPatterns(lang);\n\t}", "private static String m2631a(int i) {\n return i != 1 ? i != 2 ? i != 3 ? i != 4 ? i != 5 ? \"UNKNOWN\" : \"BITMAP_MASKABLE\" : \"URI\" : \"DATA\" : \"RESOURCE\" : \"BITMAP\";\n }", "static Pattern m36427k(String str) {\n Pattern pattern;\n if (f24496af == null) {\n f24496af = new HashMap<>();\n pattern = null;\n } else {\n pattern = (Pattern) f24496af.get(str);\n }\n if (pattern != null) {\n return pattern;\n }\n if (f24496af.size() == 10) {\n f24496af.clear();\n }\n Pattern compile = Pattern.compile(str, 40);\n f24496af.put(str, compile);\n return compile;\n }", "public Object[] getPattern(){\n return pattern;\n }", "public int getResourceNamesCount() {\n return resourceNames_.size();\n }", "public final void mT__113() throws RecognitionException {\r\n try {\r\n int _type = T__113;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // InternalSpringConfigDsl.g:114:8: ( 'resource-pattern=' )\r\n // InternalSpringConfigDsl.g:114:10: 'resource-pattern='\r\n {\r\n match(\"resource-pattern=\"); \r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }", "private ResourcePackage() {}", "public void setPattern(String pattern) {\n/* 234 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public Builder addAllResourceNames(\n java.lang.Iterable<java.lang.String> values) {\n ensureResourceNamesIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, resourceNames_);\n onChanged();\n return this;\n }", "public interface ResourceAdapter {\n\n public enum Item {\n INPUT_SAME_AS_OUTPUT_ERROR,\n AUTO_KEY_SELECTION_ERROR,\n LOADING_CERTIFICATE_AND_KEY,\n PARSING_CENTRAL_DIRECTORY,\n GENERATING_MANIFEST,\n GENERATING_SIGNATURE_FILE,\n GENERATING_SIGNATURE_BLOCK,\n COPYING_ZIP_ENTRY\n };\n\n public String getString( Item item, Object... args);\n}", "@Test\n public void testGetShareResourceStringValid() {\n Matcher mtch = filter.getMatcher(FULL_URI);\n\n filter.isResourceAccess(mtch);\n\n assertEquals(\"share resource string differs\", SHARE_RES_STRING, filter.getShareResourceString(mtch));\n }", "public void addPattern(String pattern, Handler<Match> handler) {\n Matcher m = Pattern.compile(\":([A-Za-z][A-Za-z0-9]*)\").matcher(pattern);\n StringBuffer sb = new StringBuffer();\n Set<String> groups = new HashSet<>();\n while (m.find()) {\n String group = m.group().substring(1);\n if (groups.contains(group)) {\n throw new IllegalArgumentException(\"Cannot use identifier \" + group + \" more than once in pattern string\");\n }\n m.appendReplacement(sb, \"(?<$1>[^\\\\/]+)\");\n groups.add(group);\n }\n m.appendTail(sb);\n String regex = sb.toString();\n PatternBinding binding = new PatternBinding(Pattern.compile(regex), groups, handler);\n bindings.add(binding);\n }", "String toLocalizedPattern() {\n return toPattern(true);\n }", "private void exercise7() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> result;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n result = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .map(String::toLowerCase)\n .sorted(comparingInt(String::length))\n .collect(toList());\n }\n\n result.forEach(System.out::println);\n }", "public int getPattern() {\n return this.pattern;\n }", "private void createRules(List<PatternToken> elemList,\n List<PatternToken> tmpPatternTokens, int numElement) {\n String shortMessage = \"\";\n if (this.shortMessage != null && this.shortMessage.length() > 0) {\n shortMessage = this.shortMessage.toString();\n } else if (shortMessageForRuleGroup != null && shortMessageForRuleGroup.length() > 0) {\n shortMessage = this.shortMessageForRuleGroup.toString();\n }\n if (numElement >= elemList.size()) {\n AbstractPatternRule rule;\n if (tmpPatternTokens.size() > 0) {\n rule = new PatternRule(id, language, tmpPatternTokens, name,\n message.toString(), shortMessage,\n suggestionsOutMsg.toString(), phrasePatternTokens.size() > 1, interpretPosTagsPreDisambiguation);\n rule.addTags(ruleTags);\n rule.addTags(ruleGroupTags);\n rule.addTags(categoryTags);\n rule.setSourceFile(sourceFile);\n } else if (regex.length() > 0) {\n int flags = regexCaseSensitive ? 0 : Pattern.CASE_INSENSITIVE|Pattern.UNICODE_CASE;\n String regexStr = regex.toString();\n if (regexMode == RegexpMode.SMART) {\n // Note: it's not that easy to add \\b because the regex might look like '(foo)' or '\\d' so we cannot just look at the last character\n regexStr = replaceSpacesInRegex(regexStr);\n }\n if (ruleAntiPatterns.size() > 0 || rulegroupAntiPatterns.size() > 0) {\n throw new RuntimeException(\"<regexp> rules currently cannot be used together with <antipattern>. Rule id: \" + id + \"[\" + subId + \"]\");\n }\n rule = new RegexPatternRule(id, name, message.toString(), shortMessage, suggestionsOutMsg.toString(), language, Pattern.compile(regexStr, flags), regexpMark);\n rule.setSourceFile(sourceFile);\n } else {\n throw new IllegalStateException(\"Neither '<pattern>' tokens nor '<regex>' is set in rule '\" + id + \"'\");\n }\n setRuleFilter(filterClassName, filterArgs, rule);\n prepareRule(rule);\n rules.add(rule);\n } else {\n PatternToken patternToken = elemList.get(numElement);\n if (patternToken.hasOrGroup()) {\n // When creating a new rule, we finally clear the backed-up variables. All the elements in\n // the OR group should share the values of backed-up variables. That's why these variables\n // are backed-up.\n List<Match> suggestionMatchesBackup = new ArrayList<>(suggestionMatches);\n List<Match> suggestionMatchesOutMsgBackup = new ArrayList<>(suggestionMatchesOutMsg);\n int startPosBackup = startPos;\n int endPosBackup = endPos;\n List<DisambiguationPatternRule> ruleAntiPatternsBackup = new ArrayList<>(ruleAntiPatterns);\n for (PatternToken patternTokenOfOrGroup : patternToken.getOrGroup()) {\n List<PatternToken> tmpElements2 = new ArrayList<>();\n tmpElements2.addAll(tmpPatternTokens);\n tmpElements2.add(ObjectUtils.clone(patternTokenOfOrGroup));\n createRules(elemList, tmpElements2, numElement + 1);\n startPos = startPosBackup;\n endPos = endPosBackup;\n suggestionMatches = suggestionMatchesBackup;\n suggestionMatchesOutMsg = suggestionMatchesOutMsgBackup;\n ruleAntiPatterns.addAll(ruleAntiPatternsBackup);\n }\n }\n tmpPatternTokens.add(ObjectUtils.clone(patternToken));\n createRules(elemList, tmpPatternTokens, numElement + 1);\n }\n }", "Set<String> getKeysMatchingPattern(String pattern);", "@Test\r\n\tpublic void testPositiveGenerateStrings_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString[] response = roc.generateStrings(10, 5, \"abcd\", false, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tString[] response2 = roc.generateStrings(10, 5, \"abcd\", false, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\r\n\t\t\t\tresponse = roc.generateStrings(10, 5, \"abcd\", false, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateStrings(10, 5, \"abcd\", false, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "String getRepeatPref();", "public static String findRepetitivePattern(String s) {\n if (s.isEmpty()) {\n return s;\n }\n int n = 0;\n int pLength = 1;\n\n int i = 1;\n char[] arr = s.toCharArray();\n while (i < arr.length) {\n\n boolean patternMatched = true;\n for (int j = 0; j < pLength && i + j < arr.length; ++j) {\n int k = i + j;\n if (k >= arr.length || arr[j] != arr[k]) {\n patternMatched = false;\n break;\n }\n }\n if (patternMatched) {\n n++;\n i += pLength;\n } else {\n i += 1;\n pLength = i;\n n = 0;\n }\n }\n return String.copyValueOf(arr, 0, pLength);\n }", "public boolean useRegisteredSuffixPatternMatch()\n/* */ {\n/* 610 */ return this.registeredSuffixPatternMatch;\n/* */ }", "public String getPattern () {\n return pattern;\n }", "public WildcardPattern(String pattern) {\r\n this.pattern = pattern;\r\n }", "public Integer getVarTrPatternCount( String var ) ;", "public String getPattern() {\n/* 223 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "abstract UrlPatternMatcher create( String pattern );", "public void addResources(Type type, int count) {\n \t\tresources[type.ordinal()] += count;\n \t}", "private Collection<Resource> addMplsLabels(DiscreteResourceId parent) {\n Collection<Resource> resources = new HashSet<>();\n if (!this.availableMplsLabels.isEmpty()) {\n this.availableMplsLabels.forEach(label -> {\n if (label < MplsLabel.MAX_MPLS) {\n resources.add(Resources.discrete(parent).resource().child(MplsLabel.mplsLabel(label)));\n }\n });\n } else {\n for (int i = 1; i < 1000; i++) {\n resources.add(Resources.discrete(parent).resource().child(MplsLabel.mplsLabel(i)));\n }\n }\n return resources;\n }" ]
[ "0.70099646", "0.6625953", "0.63169163", "0.596186", "0.5754644", "0.5639238", "0.55445486", "0.5432659", "0.54206693", "0.5414246", "0.5296294", "0.5295093", "0.5276571", "0.52438676", "0.5226451", "0.5218071", "0.51119006", "0.5101573", "0.5089008", "0.50751805", "0.5065234", "0.5016512", "0.4994788", "0.49768943", "0.49608874", "0.4956734", "0.4952734", "0.49514166", "0.49476507", "0.49302113", "0.4927134", "0.49221253", "0.4918024", "0.4916311", "0.49160498", "0.49049023", "0.49029514", "0.49018756", "0.48952547", "0.48921287", "0.48769984", "0.4858434", "0.48451757", "0.48370573", "0.48367164", "0.4836393", "0.48252895", "0.48230788", "0.48225492", "0.48159978", "0.4813652", "0.4812962", "0.48045546", "0.47973981", "0.47896555", "0.47867012", "0.47863013", "0.47861162", "0.47803444", "0.47759345", "0.47753447", "0.47727692", "0.47696176", "0.47586226", "0.4757181", "0.4754516", "0.47318324", "0.47311318", "0.47260028", "0.47242457", "0.4722457", "0.47143394", "0.471268", "0.46946365", "0.4693181", "0.46865085", "0.46713135", "0.46705714", "0.46670318", "0.46651998", "0.4662082", "0.466083", "0.46522325", "0.46433812", "0.46361062", "0.4635502", "0.46327454", "0.46326986", "0.46322423", "0.4622697", "0.46226808", "0.46208107", "0.4616491", "0.46151608", "0.46106124", "0.46039984", "0.46020454", "0.4601217", "0.46006212", "0.46003804" ]
0.6148779
3
repeated string resource_patterns = 2;
int getResourcePatternsCount();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getResourcePatterns(int index);", "static int getNumPatterns() { return 64; }", "java.util.List<java.lang.String>\n getResourcePatternsList();", "com.google.protobuf.ByteString\n getResourcePatternsBytes(int index);", "public void setPattern(String pattern)\n/* */ {\n/* 71 */ setPatterns(new String[] { pattern });\n/* */ }", "public String[] getPatterns()\n/* */ {\n/* 92 */ return this.patterns;\n/* */ }", "protected abstract void initPatternRepresentation(String[] paramArrayOfString)\n/* */ throws IllegalArgumentException;", "StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }", "private List<Map.Entry<String, Pattern>> addPatterns (String syntax, List<Map.Entry<String, Pattern>> translations) {\n var resources = ResourceBundle.getBundle(syntax);\n for (var key : Collections.list(resources.getKeys())) {\n var regex = resources.getString(key);\n translations.add(new AbstractMap.SimpleEntry<>(key,\n Pattern.compile(regex, Pattern.CASE_INSENSITIVE)));\n }\n return translations;\n }", "@Test\n public void testRemainingResourceStringValid() {\n Matcher mtch = filter.getMatcher(FULL_URI);\n\n filter.isResourceAccess(mtch);\n\n assertEquals(\"resource string differs\", REMAINING_RES_STRING, filter.getRootResourceString(mtch));\n }", "public void addPattern(String pattern) {\n\t\tArrayList<String> patterns = new ArrayList<String>();\n\t\tStringTokenizer entries = new StringTokenizer(pattern, \":,\");\n\t\twhile (entries.hasMoreTokens()) {\n\t\t\tpatterns.add(entries.nextToken());\n\t\t}\n\n\t\taddPatterns((String[]) patterns.toArray(new String[patterns.size()]));\n\t}", "public List<String> loadFile(String filename) {\n\t\tList<String> patterns = new ArrayList<>();\n\t\tString resourceFilename = (filename.indexOf('/') == 0) ? filename : \"/reference/pos/\" + filename;\n URL url = getClass().getResource(resourceFilename);\n if(url == null) {\n throw new IllegalArgumentException(\"Could not load resource: \\\"\" + resourceFilename + \"\\\"\");\n }\n try(InputStream stream = url.openStream()) {\n \tbyte[] bytes = stream.readAllBytes();\n \tStringBuilder sb = new StringBuilder();\n \tfor(byte b : bytes) {\n \t\tsb.append((char)b);\n \t}\n \tString s = sb.toString();\n \tString[] lines = s.split(\"\\\\R\");\t\t// Unicode linebreak sequence\n\t\t\tsb = new StringBuilder();\n \tfor(String line : lines) {\n\t\t\t\tif(line.startsWith(\"//\"))\n\t\t\t\t\tcontinue;\n\t\t\t\tif(line.endsWith(\"+\")) {\n\t\t\t\t\tsb.append(line.substring(0, line.length() - 1));\n\t\t\t\t}\n\t\t\t\telse if(sb.length() > 0 ) {\n\t\t\t\t\tsb.append(line);\n\t\t\t\t\tpatterns.add(sb.toString());\n\t\t\t\t\tsb = new StringBuilder();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tpatterns.add(line);\n \t}\n }\n catch(Exception e) {\n \tSystem.err.println(\"Could not load \" + resourceFilename + \" \" + e.toString());\n }\n\t\treturn patterns;\n\t}", "private void compilePattern() {\r\n\r\n pattern_startOfPage = Pattern.compile(regex_startOfPage);\r\n pattern_headerAttribute = Pattern.compile(regex_headerAttribute);\r\n pattern_messageFirstLine = Pattern.compile(regex_messageFirstLine);\r\n pattern_messageContinuationLine = Pattern.compile(regex_messageContinuationLine);\r\n }", "String getUrlPattern();", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "public void getPatterns(int pack){\n FileHandle file = Gdx.files.internal(\"patterns.txt\");\n String text = file.readString();\n patternPacks = text.split(\";\");\n //System.out.println(patternPacks[pack]);\n }", "abstract boolean matchesResourceName( String resourceName );", "TemplateSubPatternAssociation(ElemTemplate template, StepPattern pattern, String pat) {\n/* 64 */ this.m_pattern = pat;\n/* 65 */ this.m_template = template;\n/* 66 */ this.m_stepPattern = pattern;\n/* 67 */ this.m_targetString = this.m_stepPattern.getTargetString();\n/* 68 */ this.m_wild = this.m_targetString.equals(\"*\");\n/* */ }", "public void setPatterns(String... patterns)\n/* */ {\n/* 80 */ Assert.notEmpty(patterns, \"'patterns' must not be empty\");\n/* 81 */ this.patterns = new String[patterns.length];\n/* 82 */ for (int i = 0; i < patterns.length; i++) {\n/* 83 */ this.patterns[i] = StringUtils.trimWhitespace(patterns[i]);\n/* */ }\n/* 85 */ initPatternRepresentation(this.patterns);\n/* */ }", "public void testResourceURI() throws Exception {\n testResourceURI(\"RELS-EXT\");\n testResourceURI(\"RELS-INT\");\n }", "@Test\n public void testRemainingResourceStringValidDeepString() {\n Matcher mtch = filter.getMatcher(FULL_URI + \"/something/very/deep/nested\");\n\n filter.isResourceAccess(mtch);\n\n assertEquals(\"resource string differs\", REMAINING_RES_STRING, filter.getRootResourceString(mtch));\n }", "private void exercise5() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> nonDuplicateList;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n nonDuplicateList = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .collect(toList());\n }\n\n nonDuplicateList.forEach(System.out::println);\n }", "protected void resourceSet(String resource)\r\n {\r\n // nothing to do\r\n }", "protected abstract void initExcludedPatternRepresentation(String[] paramArrayOfString)\n/* */ throws IllegalArgumentException;", "public interface Constants {\n\n final public static String[] actionTypes = {\n \"ro.pub.cs.systems.eim.practicaltest01.actionType1\",\n \"ro.pub.cs.systems.eim.practicaltest01.actionType2\",\n \"ro.pub.cs.systems.eim.practicaltest01.actionType3\"\n };\n\n}", "String getDelayPattern();", "public ArrayList<Resource> extractResourceListFromText(String rawText) {\n\n ArrayList<Resource> resourceList = new ArrayList<>();\n\n if (!TextUtils.isEmpty(rawText)) {\n\n /* Extraction of all video resource\n * First if text contains '<figure' get list of text from \"<figure\" to \"</figure>\"\n * Then if resource-type=\"video\" is in each figure text that means we need to extract it otherwise no action needed\n * Then split the figure string from 'comma' */\n if (rawText.contains(\"<figure\")) {\n\n ArrayList<String> listFigureVideo = getStringListFromHtmlText(rawText, \"<figure\", \"</figure>\");\n\n if (!listFigureVideo.isEmpty()) {\n\n for (int i = 0; i < listFigureVideo.size(); i++) {\n\n if (listFigureVideo.get(i).contains(\"resource-type=\\\"video\\\"\")) {\n\n String figureVideoString = listFigureVideo.get(i);\n ArrayList<String> commaSeparatedList = new ArrayList<>(Arrays.asList(figureVideoString.split(\",\")));\n\n for (int j = 0; j < commaSeparatedList.size(); j++) {\n\n String separatedText = commaSeparatedList.get(j);\n\n if (!separatedText.contains(\"displayResourceFullScreen\")\n && (separatedText.contains(\".youtube.com/\") || separatedText.contains(\"vimeo.com/\"))) {\n\n String resourceUrlVideo = separatedText;\n\n if (resourceUrlVideo.startsWith(\"&quot;\")) {\n resourceUrlVideo = resourceUrlVideo.replace(\"&quot;\", \"\");\n }\n if (resourceUrlVideo.endsWith(\"&quot;\")) {\n resourceUrlVideo = resourceUrlVideo.replace(\"&quot;\", \"\");\n }\n\n Resource resourceVideo = new Resource();\n resourceVideo.setUrl(resourceUrlVideo);\n resourceVideo.setUrlMain(resourceUrlVideo);\n resourceVideo.setResourceType(Resource.TYPE_RESOURCE_VIDEO);\n\n if (resourceUrlVideo.contains(\".youtube.com/\")) {\n resourceVideo.setType(mContext.getString(R.string.typeYouTubeVideo));\n } else if (resourceUrlVideo.contains(\"vimeo.com/\")) {\n resourceVideo.setType(mContext.getString(R.string.typeVimeoVideo));\n }\n\n if (listFigureVideo.get(i).contains(\"<img\")) {\n String resourceUrlSrc = getStringFromHtmlTextAfterTagRemoval(listFigureVideo.get(i), ConstantUtil.HTML_IMAGE_SRC_TAG, ConstantUtil.HTML_DOUBLE_QUOTE);\n resourceVideo.setUrlThumbnail(resourceUrlSrc);\n }\n\n resourceList.add(resourceVideo);\n\n /* First time we get our desired url of video, we breaks the loop;\n * since after this unnecessary url(s) might add */\n break;\n\n }\n }\n }\n }\n }\n\n\n }\n\n\n /*Extraction of all image resource*/\n ArrayList<String> list = getStringListFromHtmlText(rawText, ConstantUtil.HTML_IMAGE_START_TAG, ConstantUtil.HTML_END_TAG);\n\n if (!list.isEmpty()) {\n for (int i = 0; i < list.size(); i++) {\n\n if (!TextUtils.isEmpty(list.get(i)) && !list.get(i).contains(\"file:\")) {\n\n /*if list.get(i) contains resource-type=\"video\" then do not take\n that image since it is for video resource*/\n if (!list.get(i).contains(\"resource-type=\\\"video\\\"\")) {\n\n String resourceUrl = getStringFromHtmlTextAfterTagRemoval(list.get(i), ConstantUtil.HTML_IMAGE_SRC_TAG, ConstantUtil.HTML_DOUBLE_QUOTE);\n\n Resource resourceQue = new Resource();\n resourceQue.setUrl(resourceUrl);\n resourceQue.setUrlMain(resourceUrl);\n\n String mimeType = URLConnection.guessContentTypeFromName(resourceUrl);\n if (!TextUtils.isEmpty(mimeType) && mimeType.contains(ConstantUtil.TYPE_IMAGE)) {\n\n resourceQue.setUrlThumbnail(resourceUrl);\n resourceQue.setResourceType(Resource.TYPE_RESOURCE_IMAGE);\n\n }\n\n resourceList.add(resourceQue);\n }\n }\n\n }\n }\n\n }\n\n return resourceList;\n\n }", "private void loadResourcesData(){\n //showResourceListView();\n\n String [] resourceData = new String [20];\n\n for(int stringCount = 1; stringCount <= 20; stringCount++) {\n resourceData[stringCount - 1] = \"Title \" + stringCount;\n }\n\n mResourceListAdapter.setResourceData(resourceData);\n }", "private static Map<Integer, List<String>> getIpPatternMap()\n\t{\n\t\tMap<Integer, List<String>> map = new HashMap<>();\n\t\tfor(int a = 1; a <= 3; a++)\n\t\t{\n\t\t\tfor( int b = 1; b <= 3; b++)\n\t\t\t{\n\t\t\t\tfor(int c = 1 ; c <= 3; c++)\n\t\t\t\t{\n\t\t\t\t\tfor( int d = 1; d <= 3; d++)\n\t\t\t\t\t{\n\t\t\t\t\t\tfinal int patternCount = a + b + c + d;\n\t\t\t\t\t\tList<String> patterns;\n\t\t\t\t\t\tif(!map.containsKey(patternCount))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpatterns = new ArrayList<>();\n\t\t\t\t\t\t\tmap.put(patternCount, patterns);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpatterns = map.get(patternCount);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpatterns.add(String.format(\"%1$d%2$d%3$d%4$d\", a,b,c,d));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn map;\n\t}", "@Override\n public List<BannerPattern> getPatterns() {\n return patterns;\n }", "private String getPatterns()\n\t{\n\t\treturn (accepted ? FileSet.patternsToString(patternListPanel.getElements()) : null);\n\t}", "UsagePattern getUsagePattern();", "private void addPatterns(String[] patterns) {\n\t\tif (patterns != null) {\n\t\t\tEntry entry = null;\n\t\t\tfor (String pattern : patterns) {\n\t\t\t\tentry = createEntry(pattern);\n\t\t\t\tif (entry != null) {\n\t\t\t\t\tthis.patterns.add(pattern);\n\t\t\t\t\tthis.entries.add(entry);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void applyLocalizedPattern(String pattern) {\n applyPattern(pattern, true);\n }", "private void setPatterns(String[] patterns) {\n\t\tthis.patterns.clear();\n\t\tthis.entries.clear();\n\t\taddPatterns(patterns);\n\t}", "public String listPatterns() {\n return \"Full list of patterns\";\n }", "String combine(String pattern1, String pattern2);", "public static void patterns() {\n\t\ttry {\n\t\t\tList<Pattern> patterns = PlatformClient.patterns(getUser());\n\t\t\trender(patterns);\n\t\t} catch (ApplicationException e) {\n\t\t\te.printStackTrace();\n\t\t\tflash.error(\"Can not get patterns : %s\", e.getMessage());\n\t\t\trender();\n\t\t}\n\t}", "@Test\n public void testCrazyPatterns() {\n assertEquals(\"java\\\\.\\\\{.*\\\\}\\\\.Array\", glob2Pattern(\"java.{**}.Array\").pattern());\n assertEquals(\"java\\\\./.*<>\\\\.Array\\\\$1\", glob2Pattern(\"java./**<>.Array$1\").pattern());\n assertEquals(\"\\\\+\\\\^\\\\$\", glob2Pattern(\"+^$\").pattern());\n }", "List<String> externalResources();", "public List<String> getPatterns() {\n return patterns;\n }", "private void initRegs(){\n\n keyWordReg = \"\";\n\n for (String seg: keyWordMap.keySet()){\n\n keyWordReg += seg + \"|\";\n\n }\n\n symbolReg = \"[\\\\&\\\\*\\\\+\\\\(\\\\)\\\\.\\\\/\\\\,\\\\-\\\\]\\\\;\\\\~\\\\}\\\\|\\\\{\\\\>\\\\=\\\\[\\\\<]\";\n intReg = \"[0-9]+\";\n strReg = \"\\\"[^\\\"\\n]*\\\"\";\n idReg = \"[a-zA-Z_]\\\\w*\";\n\n tokenPatterns = Pattern.compile(idReg + \"|\" + keyWordReg + symbolReg + \"|\" + intReg + \"|\" + strReg);\n }", "private void removeRedundantPatterns() {\n HashSet<String> patternsToRemove = new HashSet<>();\n for (Map.Entry<String, Pattern> entry : patterns.entrySet()) {\n\n Pattern pattern = entry.getValue();\n\n if (!parameters.keepAllPatterns) {\n String suffixStr = getSuffix(pattern);\n PatternsUtils.addSubPatternToRemoveList(patterns, suffixStr, pattern, patternsToRemove);\n }\n\n if (crossStrand) {\n PatternsUtils.removeReverseCompliments(patterns, pattern, patternsToRemove);\n }\n }\n patterns.keySet().removeAll(patternsToRemove);\n }", "@Test\n public void testGetMonitorRegexPatternMap() {\n String system0 = \"system0\", system1 = \"system1\";\n String system0Rewriter0 = \"system-0-rewriter-0\", system0Rewriter1 = \"system-0-rewriter-1\", system1Rewriter =\n \"system-1-rewriter\", systemOnlyRewriter = \"system-only-rewriter\";\n String system0Rewriter0Streams = \"system-0-rewriter-0-.*\", system0Rewriter1Streams = \"system-0-rewriter-1-.*\",\n system1RewriterStreams = \"system-1-rewriter-.*\";\n JobConfig jobConfig = new JobConfig(new MapConfig(\n new ImmutableMap.Builder<String, String>().put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, system0Rewriter0),\n system0)\n .put(String.format(JobConfig.REGEX_RESOLVED_STREAMS, system0Rewriter0), system0Rewriter0Streams)\n .put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, system0Rewriter1), system0)\n .put(String.format(JobConfig.REGEX_RESOLVED_STREAMS, system0Rewriter1), system0Rewriter1Streams)\n .put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, system1Rewriter), system1)\n .put(String.format(JobConfig.REGEX_RESOLVED_STREAMS, system1Rewriter), system1RewriterStreams)\n // not passed in as a rewriter when calling getMonitorRegexPatternMap\n .put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, \"unused-rewriter\"), system0)\n .put(String.format(JobConfig.REGEX_RESOLVED_STREAMS, \"unused-rewriter\"), \"unused-rewriter-.*\")\n // should not be included since there is no regex\n .put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, systemOnlyRewriter), system0)\n .build()));\n // Pattern.equals only checks that the references are the same, so can't compare maps directly\n Map<String, Pattern> actual = jobConfig.getMonitorRegexPatternMap(String.join(\",\",\n ImmutableList.of(system0Rewriter0, system0Rewriter1, system1Rewriter, systemOnlyRewriter,\n \"not-a-regex-rewriter\")));\n // only should have rewriters for system0 and system1\n assertEquals(2, actual.size());\n assertEquals(system0Rewriter0Streams + \"|\" + system0Rewriter1Streams, actual.get(system0).pattern());\n assertEquals(system1RewriterStreams, actual.get(system1).pattern());\n\n // empty configs should produce an empty map\n jobConfig = new JobConfig(new MapConfig());\n assertEquals(Collections.<String, Pattern>emptyMap(), jobConfig.getMonitorRegexPatternMap(system0Rewriter0));\n assertEquals(Collections.<String, Pattern>emptyMap(), jobConfig.getMonitorRegexPatternMap(\"\"));\n }", "public void setPattern (String pattern) {\n this.pattern = pattern;\n }", "default String getPattern() {\n return null;\n }", "private boolean loadOtherPattern() {\n\t\tArrayList<String> listOfAlternativePatterns = new ArrayList<String>();\n\t\tArrayList<Integer> listOfValue = new ArrayList<Integer>();\n\t\t// Open otherPatterns to load\n\t\tString txtFile = \"res/otherPatterns.txt\";\n\t\tString lineRead = \"\";\n\t\tString separator = \"\\\\s*;\\\\s*\";\n\t\tStringBuilder pattern = null;\n\t\ttry (BufferedReader br = new BufferedReader(\n\t\t\t\tnew InputStreamReader(this.getClass().getClassLoader().getResourceAsStream(txtFile), \"UTF-8\"))) {\n\t\t\twhile ((lineRead = br.readLine()) != null) {\n\t\t\t\tpattern = null;\n\t\t\t\t// use comma as separator\n\t\t\t\t// constructing pattern\n\t\t\t\tif (lineRead.indexOf(\";\") >= 0) {\n\t\t\t\t\tString[] mixedTable = lineRead.split(separator);\n\t\t\t\t\t// the first value stands for representative value of the\n\t\t\t\t\t// line\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlistOfValue.add(new Integer(Integer.parseInt(mixedTable[0])));\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\tlistOfValue.add(null);\n\t\t\t\t\t}\n\t\t\t\t\t// the followings are possible cases\n\t\t\t\t\tpattern = new StringBuilder(\"\");\n\t\t\t\t\tfor (int i = 1; i < mixedTable.length; i++) {\n\t\t\t\t\t\tpattern.append(mixedTable[i]);\n\t\t\t\t\t\tif (i < mixedTable.length - 1) {\n\t\t\t\t\t\t\tpattern.append(\"|\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlistOfAlternativePatterns.add(pattern.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\treturn false;\n\t\t}\n\t\tOTHER_PATTERNS = listOfAlternativePatterns.toArray(new String[listOfAlternativePatterns.size()]);\n\t\tVALUE_OF_OTHER_PATTERNS = listOfValue.toArray(new Integer[listOfValue.size()]);\n\t\treturn true;\n\t}", "List<Resource> resources();", "private JBurgPatternMatcher()\n\t{\n\t}", "void setUsagePattern(UsagePattern usagePattern);", "public int getResourceNamesCount() {\n return resourceNames_.size();\n }", "protected String expectedFor( String resource)\n {\n return resource + \"-Expected\";\n }", "default String patternConstraint(String pattern) {\n return switch (getType()) {\n case STRING -> validationPattern(pattern);\n default -> throw new RuntimeException(\"Only String can have a pattern\");\n };\n }", "@Inject(method = \"readPattern\", at = @At(\"TAIL\"))\n private void parseBppPatternDataPost(CallbackInfo info) {\n for(int i = nextLoomPatternIndex; i < loomPatterns.size(); i++) {\n this.patternCacheKey += partialCacheKey(loomPatterns.get(i));\n }\n }", "public void setPattern(Pattern pattern) {\n this.pattern = pattern;\n }", "public String getPattern() {\r\n return \"DEFAULT\";\r\n }", "public final String getPattern() {\n/* 187 */ return this.m_pattern;\n/* */ }", "public IPath[] getAdditionalResources();", "public interface ResourcePaths {\n String imageFolderPath();\n String imageResourcePath();\n String videoFolderPath();\n String videoResourcePath();\n}", "String getResourceName();", "public String toString() {\n/* 666 */ return this.pattern;\n/* */ }", "@ApiModelProperty(value = \"List of the resource name pattern strings to which the policy applies. Must conform to the pattern templates provided by the associated Managing Resource Types resource type\")\n public List<String> getResources() {\n return resources;\n }", "public String getPattern() {\r\n \treturn pattern;\r\n }", "public String toString() {\n/* 664 */ return this.pattern;\n/* */ }", "public void setResources(List<String> resources) {\n this.resources = resources;\n }", "public void setPattern(String pattern) {\r\n\t\tthis.pattern = pattern;\r\n\t}", "public String getPattern() {\n\treturn pattern;\n }", "@Inject(\n method = \"readPattern\",\n at = @At(value = \"JUMP\", ordinal = 0, shift = At.Shift.AFTER),\n slice = @Slice(\n from = @At(\n value = \"INVOKE\",\n target = \"Lnet/minecraft/nbt/ListTag;size()I\"\n )\n )\n )\n private void parseBppPatternDataInline(CallbackInfo info) {\n int nextIndex = this.patterns.size() - 1;\n while(nextLoomPatternIndex < loomPatterns.size()) {\n LoomPatternData data = loomPatterns.get(nextLoomPatternIndex);\n if(data.index == nextIndex) {\n this.patternCacheKey += partialCacheKey(data);\n nextLoomPatternIndex++;\n } else {\n break;\n }\n }\n }", "public void setVarTrPatternCount( String var, Integer count ) ;", "List<ResourceType> resourceTypes();", "private int numberOfConstants() {\n return (int) Stream.of(this.template.split(\"\\\\.\"))\n .filter(s -> !s.equals(\"*\")).count();\n }", "public String[] getPatternsRegEx() {\n return this.patternsRegEx;\n }", "private String[] getPatterns(StreamTokenizer st) throws IOException {\n\t\t// get language\n\t\tString lang = getLanguageFromTokenizer(st);\n\n\t\tif (st.nextToken() != StreamTokenizer.TT_EOF)\n\t\t\tthrow new IOException(\n\t\t\t\t\t\"PATTERNS takes exactly one (language) or no arguments (default language)!\");\n\n\t\treturn ng.getPatterns(lang);\n\t}", "private static String m2631a(int i) {\n return i != 1 ? i != 2 ? i != 3 ? i != 4 ? i != 5 ? \"UNKNOWN\" : \"BITMAP_MASKABLE\" : \"URI\" : \"DATA\" : \"RESOURCE\" : \"BITMAP\";\n }", "static Pattern m36427k(String str) {\n Pattern pattern;\n if (f24496af == null) {\n f24496af = new HashMap<>();\n pattern = null;\n } else {\n pattern = (Pattern) f24496af.get(str);\n }\n if (pattern != null) {\n return pattern;\n }\n if (f24496af.size() == 10) {\n f24496af.clear();\n }\n Pattern compile = Pattern.compile(str, 40);\n f24496af.put(str, compile);\n return compile;\n }", "public Object[] getPattern(){\n return pattern;\n }", "public int getResourceNamesCount() {\n return resourceNames_.size();\n }", "public final void mT__113() throws RecognitionException {\r\n try {\r\n int _type = T__113;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // InternalSpringConfigDsl.g:114:8: ( 'resource-pattern=' )\r\n // InternalSpringConfigDsl.g:114:10: 'resource-pattern='\r\n {\r\n match(\"resource-pattern=\"); \r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }", "private ResourcePackage() {}", "public void setPattern(String pattern) {\n/* 234 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public Builder addAllResourceNames(\n java.lang.Iterable<java.lang.String> values) {\n ensureResourceNamesIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, resourceNames_);\n onChanged();\n return this;\n }", "public interface ResourceAdapter {\n\n public enum Item {\n INPUT_SAME_AS_OUTPUT_ERROR,\n AUTO_KEY_SELECTION_ERROR,\n LOADING_CERTIFICATE_AND_KEY,\n PARSING_CENTRAL_DIRECTORY,\n GENERATING_MANIFEST,\n GENERATING_SIGNATURE_FILE,\n GENERATING_SIGNATURE_BLOCK,\n COPYING_ZIP_ENTRY\n };\n\n public String getString( Item item, Object... args);\n}", "@Test\n public void testGetShareResourceStringValid() {\n Matcher mtch = filter.getMatcher(FULL_URI);\n\n filter.isResourceAccess(mtch);\n\n assertEquals(\"share resource string differs\", SHARE_RES_STRING, filter.getShareResourceString(mtch));\n }", "public void addPattern(String pattern, Handler<Match> handler) {\n Matcher m = Pattern.compile(\":([A-Za-z][A-Za-z0-9]*)\").matcher(pattern);\n StringBuffer sb = new StringBuffer();\n Set<String> groups = new HashSet<>();\n while (m.find()) {\n String group = m.group().substring(1);\n if (groups.contains(group)) {\n throw new IllegalArgumentException(\"Cannot use identifier \" + group + \" more than once in pattern string\");\n }\n m.appendReplacement(sb, \"(?<$1>[^\\\\/]+)\");\n groups.add(group);\n }\n m.appendTail(sb);\n String regex = sb.toString();\n PatternBinding binding = new PatternBinding(Pattern.compile(regex), groups, handler);\n bindings.add(binding);\n }", "String toLocalizedPattern() {\n return toPattern(true);\n }", "private void exercise7() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> result;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n result = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .map(String::toLowerCase)\n .sorted(comparingInt(String::length))\n .collect(toList());\n }\n\n result.forEach(System.out::println);\n }", "public int getPattern() {\n return this.pattern;\n }", "private void createRules(List<PatternToken> elemList,\n List<PatternToken> tmpPatternTokens, int numElement) {\n String shortMessage = \"\";\n if (this.shortMessage != null && this.shortMessage.length() > 0) {\n shortMessage = this.shortMessage.toString();\n } else if (shortMessageForRuleGroup != null && shortMessageForRuleGroup.length() > 0) {\n shortMessage = this.shortMessageForRuleGroup.toString();\n }\n if (numElement >= elemList.size()) {\n AbstractPatternRule rule;\n if (tmpPatternTokens.size() > 0) {\n rule = new PatternRule(id, language, tmpPatternTokens, name,\n message.toString(), shortMessage,\n suggestionsOutMsg.toString(), phrasePatternTokens.size() > 1, interpretPosTagsPreDisambiguation);\n rule.addTags(ruleTags);\n rule.addTags(ruleGroupTags);\n rule.addTags(categoryTags);\n rule.setSourceFile(sourceFile);\n } else if (regex.length() > 0) {\n int flags = regexCaseSensitive ? 0 : Pattern.CASE_INSENSITIVE|Pattern.UNICODE_CASE;\n String regexStr = regex.toString();\n if (regexMode == RegexpMode.SMART) {\n // Note: it's not that easy to add \\b because the regex might look like '(foo)' or '\\d' so we cannot just look at the last character\n regexStr = replaceSpacesInRegex(regexStr);\n }\n if (ruleAntiPatterns.size() > 0 || rulegroupAntiPatterns.size() > 0) {\n throw new RuntimeException(\"<regexp> rules currently cannot be used together with <antipattern>. Rule id: \" + id + \"[\" + subId + \"]\");\n }\n rule = new RegexPatternRule(id, name, message.toString(), shortMessage, suggestionsOutMsg.toString(), language, Pattern.compile(regexStr, flags), regexpMark);\n rule.setSourceFile(sourceFile);\n } else {\n throw new IllegalStateException(\"Neither '<pattern>' tokens nor '<regex>' is set in rule '\" + id + \"'\");\n }\n setRuleFilter(filterClassName, filterArgs, rule);\n prepareRule(rule);\n rules.add(rule);\n } else {\n PatternToken patternToken = elemList.get(numElement);\n if (patternToken.hasOrGroup()) {\n // When creating a new rule, we finally clear the backed-up variables. All the elements in\n // the OR group should share the values of backed-up variables. That's why these variables\n // are backed-up.\n List<Match> suggestionMatchesBackup = new ArrayList<>(suggestionMatches);\n List<Match> suggestionMatchesOutMsgBackup = new ArrayList<>(suggestionMatchesOutMsg);\n int startPosBackup = startPos;\n int endPosBackup = endPos;\n List<DisambiguationPatternRule> ruleAntiPatternsBackup = new ArrayList<>(ruleAntiPatterns);\n for (PatternToken patternTokenOfOrGroup : patternToken.getOrGroup()) {\n List<PatternToken> tmpElements2 = new ArrayList<>();\n tmpElements2.addAll(tmpPatternTokens);\n tmpElements2.add(ObjectUtils.clone(patternTokenOfOrGroup));\n createRules(elemList, tmpElements2, numElement + 1);\n startPos = startPosBackup;\n endPos = endPosBackup;\n suggestionMatches = suggestionMatchesBackup;\n suggestionMatchesOutMsg = suggestionMatchesOutMsgBackup;\n ruleAntiPatterns.addAll(ruleAntiPatternsBackup);\n }\n }\n tmpPatternTokens.add(ObjectUtils.clone(patternToken));\n createRules(elemList, tmpPatternTokens, numElement + 1);\n }\n }", "Set<String> getKeysMatchingPattern(String pattern);", "@Test\r\n\tpublic void testPositiveGenerateStrings_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString[] response = roc.generateStrings(10, 5, \"abcd\", false, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tString[] response2 = roc.generateStrings(10, 5, \"abcd\", false, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\r\n\t\t\t\tresponse = roc.generateStrings(10, 5, \"abcd\", false, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateStrings(10, 5, \"abcd\", false, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "String getRepeatPref();", "public static String findRepetitivePattern(String s) {\n if (s.isEmpty()) {\n return s;\n }\n int n = 0;\n int pLength = 1;\n\n int i = 1;\n char[] arr = s.toCharArray();\n while (i < arr.length) {\n\n boolean patternMatched = true;\n for (int j = 0; j < pLength && i + j < arr.length; ++j) {\n int k = i + j;\n if (k >= arr.length || arr[j] != arr[k]) {\n patternMatched = false;\n break;\n }\n }\n if (patternMatched) {\n n++;\n i += pLength;\n } else {\n i += 1;\n pLength = i;\n n = 0;\n }\n }\n return String.copyValueOf(arr, 0, pLength);\n }", "public boolean useRegisteredSuffixPatternMatch()\n/* */ {\n/* 610 */ return this.registeredSuffixPatternMatch;\n/* */ }", "public String getPattern () {\n return pattern;\n }", "public WildcardPattern(String pattern) {\r\n this.pattern = pattern;\r\n }", "public Integer getVarTrPatternCount( String var ) ;", "public String getPattern() {\n/* 223 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "abstract UrlPatternMatcher create( String pattern );", "public void addResources(Type type, int count) {\n \t\tresources[type.ordinal()] += count;\n \t}", "private Collection<Resource> addMplsLabels(DiscreteResourceId parent) {\n Collection<Resource> resources = new HashSet<>();\n if (!this.availableMplsLabels.isEmpty()) {\n this.availableMplsLabels.forEach(label -> {\n if (label < MplsLabel.MAX_MPLS) {\n resources.add(Resources.discrete(parent).resource().child(MplsLabel.mplsLabel(label)));\n }\n });\n } else {\n for (int i = 1; i < 1000; i++) {\n resources.add(Resources.discrete(parent).resource().child(MplsLabel.mplsLabel(i)));\n }\n }\n return resources;\n }" ]
[ "0.6625953", "0.63169163", "0.6148779", "0.596186", "0.5754644", "0.5639238", "0.55445486", "0.5432659", "0.54206693", "0.5414246", "0.5296294", "0.5295093", "0.5276571", "0.52438676", "0.5226451", "0.5218071", "0.51119006", "0.5101573", "0.5089008", "0.50751805", "0.5065234", "0.5016512", "0.4994788", "0.49768943", "0.49608874", "0.4956734", "0.4952734", "0.49514166", "0.49476507", "0.49302113", "0.4927134", "0.49221253", "0.4918024", "0.4916311", "0.49160498", "0.49049023", "0.49029514", "0.49018756", "0.48952547", "0.48921287", "0.48769984", "0.4858434", "0.48451757", "0.48370573", "0.48367164", "0.4836393", "0.48252895", "0.48230788", "0.48225492", "0.48159978", "0.4813652", "0.4812962", "0.48045546", "0.47973981", "0.47896555", "0.47867012", "0.47863013", "0.47861162", "0.47803444", "0.47759345", "0.47753447", "0.47727692", "0.47696176", "0.47586226", "0.4757181", "0.4754516", "0.47318324", "0.47311318", "0.47260028", "0.47242457", "0.4722457", "0.47143394", "0.471268", "0.46946365", "0.4693181", "0.46865085", "0.46713135", "0.46705714", "0.46670318", "0.46651998", "0.4662082", "0.466083", "0.46522325", "0.46433812", "0.46361062", "0.4635502", "0.46327454", "0.46326986", "0.46322423", "0.4622697", "0.46226808", "0.46208107", "0.4616491", "0.46151608", "0.46106124", "0.46039984", "0.46020454", "0.4601217", "0.46006212", "0.46003804" ]
0.70099646
0
repeated string resource_patterns = 2;
java.lang.String getResourcePatterns(int index);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getResourcePatternsCount();", "static int getNumPatterns() { return 64; }", "java.util.List<java.lang.String>\n getResourcePatternsList();", "com.google.protobuf.ByteString\n getResourcePatternsBytes(int index);", "public void setPattern(String pattern)\n/* */ {\n/* 71 */ setPatterns(new String[] { pattern });\n/* */ }", "public String[] getPatterns()\n/* */ {\n/* 92 */ return this.patterns;\n/* */ }", "protected abstract void initPatternRepresentation(String[] paramArrayOfString)\n/* */ throws IllegalArgumentException;", "StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }", "private List<Map.Entry<String, Pattern>> addPatterns (String syntax, List<Map.Entry<String, Pattern>> translations) {\n var resources = ResourceBundle.getBundle(syntax);\n for (var key : Collections.list(resources.getKeys())) {\n var regex = resources.getString(key);\n translations.add(new AbstractMap.SimpleEntry<>(key,\n Pattern.compile(regex, Pattern.CASE_INSENSITIVE)));\n }\n return translations;\n }", "@Test\n public void testRemainingResourceStringValid() {\n Matcher mtch = filter.getMatcher(FULL_URI);\n\n filter.isResourceAccess(mtch);\n\n assertEquals(\"resource string differs\", REMAINING_RES_STRING, filter.getRootResourceString(mtch));\n }", "public void addPattern(String pattern) {\n\t\tArrayList<String> patterns = new ArrayList<String>();\n\t\tStringTokenizer entries = new StringTokenizer(pattern, \":,\");\n\t\twhile (entries.hasMoreTokens()) {\n\t\t\tpatterns.add(entries.nextToken());\n\t\t}\n\n\t\taddPatterns((String[]) patterns.toArray(new String[patterns.size()]));\n\t}", "public List<String> loadFile(String filename) {\n\t\tList<String> patterns = new ArrayList<>();\n\t\tString resourceFilename = (filename.indexOf('/') == 0) ? filename : \"/reference/pos/\" + filename;\n URL url = getClass().getResource(resourceFilename);\n if(url == null) {\n throw new IllegalArgumentException(\"Could not load resource: \\\"\" + resourceFilename + \"\\\"\");\n }\n try(InputStream stream = url.openStream()) {\n \tbyte[] bytes = stream.readAllBytes();\n \tStringBuilder sb = new StringBuilder();\n \tfor(byte b : bytes) {\n \t\tsb.append((char)b);\n \t}\n \tString s = sb.toString();\n \tString[] lines = s.split(\"\\\\R\");\t\t// Unicode linebreak sequence\n\t\t\tsb = new StringBuilder();\n \tfor(String line : lines) {\n\t\t\t\tif(line.startsWith(\"//\"))\n\t\t\t\t\tcontinue;\n\t\t\t\tif(line.endsWith(\"+\")) {\n\t\t\t\t\tsb.append(line.substring(0, line.length() - 1));\n\t\t\t\t}\n\t\t\t\telse if(sb.length() > 0 ) {\n\t\t\t\t\tsb.append(line);\n\t\t\t\t\tpatterns.add(sb.toString());\n\t\t\t\t\tsb = new StringBuilder();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tpatterns.add(line);\n \t}\n }\n catch(Exception e) {\n \tSystem.err.println(\"Could not load \" + resourceFilename + \" \" + e.toString());\n }\n\t\treturn patterns;\n\t}", "private void compilePattern() {\r\n\r\n pattern_startOfPage = Pattern.compile(regex_startOfPage);\r\n pattern_headerAttribute = Pattern.compile(regex_headerAttribute);\r\n pattern_messageFirstLine = Pattern.compile(regex_messageFirstLine);\r\n pattern_messageContinuationLine = Pattern.compile(regex_messageContinuationLine);\r\n }", "String getUrlPattern();", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "public void getPatterns(int pack){\n FileHandle file = Gdx.files.internal(\"patterns.txt\");\n String text = file.readString();\n patternPacks = text.split(\";\");\n //System.out.println(patternPacks[pack]);\n }", "abstract boolean matchesResourceName( String resourceName );", "TemplateSubPatternAssociation(ElemTemplate template, StepPattern pattern, String pat) {\n/* 64 */ this.m_pattern = pat;\n/* 65 */ this.m_template = template;\n/* 66 */ this.m_stepPattern = pattern;\n/* 67 */ this.m_targetString = this.m_stepPattern.getTargetString();\n/* 68 */ this.m_wild = this.m_targetString.equals(\"*\");\n/* */ }", "public void setPatterns(String... patterns)\n/* */ {\n/* 80 */ Assert.notEmpty(patterns, \"'patterns' must not be empty\");\n/* 81 */ this.patterns = new String[patterns.length];\n/* 82 */ for (int i = 0; i < patterns.length; i++) {\n/* 83 */ this.patterns[i] = StringUtils.trimWhitespace(patterns[i]);\n/* */ }\n/* 85 */ initPatternRepresentation(this.patterns);\n/* */ }", "public void testResourceURI() throws Exception {\n testResourceURI(\"RELS-EXT\");\n testResourceURI(\"RELS-INT\");\n }", "@Test\n public void testRemainingResourceStringValidDeepString() {\n Matcher mtch = filter.getMatcher(FULL_URI + \"/something/very/deep/nested\");\n\n filter.isResourceAccess(mtch);\n\n assertEquals(\"resource string differs\", REMAINING_RES_STRING, filter.getRootResourceString(mtch));\n }", "private void exercise5() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> nonDuplicateList;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n nonDuplicateList = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .collect(toList());\n }\n\n nonDuplicateList.forEach(System.out::println);\n }", "protected void resourceSet(String resource)\r\n {\r\n // nothing to do\r\n }", "protected abstract void initExcludedPatternRepresentation(String[] paramArrayOfString)\n/* */ throws IllegalArgumentException;", "public interface Constants {\n\n final public static String[] actionTypes = {\n \"ro.pub.cs.systems.eim.practicaltest01.actionType1\",\n \"ro.pub.cs.systems.eim.practicaltest01.actionType2\",\n \"ro.pub.cs.systems.eim.practicaltest01.actionType3\"\n };\n\n}", "String getDelayPattern();", "public ArrayList<Resource> extractResourceListFromText(String rawText) {\n\n ArrayList<Resource> resourceList = new ArrayList<>();\n\n if (!TextUtils.isEmpty(rawText)) {\n\n /* Extraction of all video resource\n * First if text contains '<figure' get list of text from \"<figure\" to \"</figure>\"\n * Then if resource-type=\"video\" is in each figure text that means we need to extract it otherwise no action needed\n * Then split the figure string from 'comma' */\n if (rawText.contains(\"<figure\")) {\n\n ArrayList<String> listFigureVideo = getStringListFromHtmlText(rawText, \"<figure\", \"</figure>\");\n\n if (!listFigureVideo.isEmpty()) {\n\n for (int i = 0; i < listFigureVideo.size(); i++) {\n\n if (listFigureVideo.get(i).contains(\"resource-type=\\\"video\\\"\")) {\n\n String figureVideoString = listFigureVideo.get(i);\n ArrayList<String> commaSeparatedList = new ArrayList<>(Arrays.asList(figureVideoString.split(\",\")));\n\n for (int j = 0; j < commaSeparatedList.size(); j++) {\n\n String separatedText = commaSeparatedList.get(j);\n\n if (!separatedText.contains(\"displayResourceFullScreen\")\n && (separatedText.contains(\".youtube.com/\") || separatedText.contains(\"vimeo.com/\"))) {\n\n String resourceUrlVideo = separatedText;\n\n if (resourceUrlVideo.startsWith(\"&quot;\")) {\n resourceUrlVideo = resourceUrlVideo.replace(\"&quot;\", \"\");\n }\n if (resourceUrlVideo.endsWith(\"&quot;\")) {\n resourceUrlVideo = resourceUrlVideo.replace(\"&quot;\", \"\");\n }\n\n Resource resourceVideo = new Resource();\n resourceVideo.setUrl(resourceUrlVideo);\n resourceVideo.setUrlMain(resourceUrlVideo);\n resourceVideo.setResourceType(Resource.TYPE_RESOURCE_VIDEO);\n\n if (resourceUrlVideo.contains(\".youtube.com/\")) {\n resourceVideo.setType(mContext.getString(R.string.typeYouTubeVideo));\n } else if (resourceUrlVideo.contains(\"vimeo.com/\")) {\n resourceVideo.setType(mContext.getString(R.string.typeVimeoVideo));\n }\n\n if (listFigureVideo.get(i).contains(\"<img\")) {\n String resourceUrlSrc = getStringFromHtmlTextAfterTagRemoval(listFigureVideo.get(i), ConstantUtil.HTML_IMAGE_SRC_TAG, ConstantUtil.HTML_DOUBLE_QUOTE);\n resourceVideo.setUrlThumbnail(resourceUrlSrc);\n }\n\n resourceList.add(resourceVideo);\n\n /* First time we get our desired url of video, we breaks the loop;\n * since after this unnecessary url(s) might add */\n break;\n\n }\n }\n }\n }\n }\n\n\n }\n\n\n /*Extraction of all image resource*/\n ArrayList<String> list = getStringListFromHtmlText(rawText, ConstantUtil.HTML_IMAGE_START_TAG, ConstantUtil.HTML_END_TAG);\n\n if (!list.isEmpty()) {\n for (int i = 0; i < list.size(); i++) {\n\n if (!TextUtils.isEmpty(list.get(i)) && !list.get(i).contains(\"file:\")) {\n\n /*if list.get(i) contains resource-type=\"video\" then do not take\n that image since it is for video resource*/\n if (!list.get(i).contains(\"resource-type=\\\"video\\\"\")) {\n\n String resourceUrl = getStringFromHtmlTextAfterTagRemoval(list.get(i), ConstantUtil.HTML_IMAGE_SRC_TAG, ConstantUtil.HTML_DOUBLE_QUOTE);\n\n Resource resourceQue = new Resource();\n resourceQue.setUrl(resourceUrl);\n resourceQue.setUrlMain(resourceUrl);\n\n String mimeType = URLConnection.guessContentTypeFromName(resourceUrl);\n if (!TextUtils.isEmpty(mimeType) && mimeType.contains(ConstantUtil.TYPE_IMAGE)) {\n\n resourceQue.setUrlThumbnail(resourceUrl);\n resourceQue.setResourceType(Resource.TYPE_RESOURCE_IMAGE);\n\n }\n\n resourceList.add(resourceQue);\n }\n }\n\n }\n }\n\n }\n\n return resourceList;\n\n }", "private void loadResourcesData(){\n //showResourceListView();\n\n String [] resourceData = new String [20];\n\n for(int stringCount = 1; stringCount <= 20; stringCount++) {\n resourceData[stringCount - 1] = \"Title \" + stringCount;\n }\n\n mResourceListAdapter.setResourceData(resourceData);\n }", "private static Map<Integer, List<String>> getIpPatternMap()\n\t{\n\t\tMap<Integer, List<String>> map = new HashMap<>();\n\t\tfor(int a = 1; a <= 3; a++)\n\t\t{\n\t\t\tfor( int b = 1; b <= 3; b++)\n\t\t\t{\n\t\t\t\tfor(int c = 1 ; c <= 3; c++)\n\t\t\t\t{\n\t\t\t\t\tfor( int d = 1; d <= 3; d++)\n\t\t\t\t\t{\n\t\t\t\t\t\tfinal int patternCount = a + b + c + d;\n\t\t\t\t\t\tList<String> patterns;\n\t\t\t\t\t\tif(!map.containsKey(patternCount))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpatterns = new ArrayList<>();\n\t\t\t\t\t\t\tmap.put(patternCount, patterns);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpatterns = map.get(patternCount);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpatterns.add(String.format(\"%1$d%2$d%3$d%4$d\", a,b,c,d));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn map;\n\t}", "@Override\n public List<BannerPattern> getPatterns() {\n return patterns;\n }", "private String getPatterns()\n\t{\n\t\treturn (accepted ? FileSet.patternsToString(patternListPanel.getElements()) : null);\n\t}", "UsagePattern getUsagePattern();", "private void addPatterns(String[] patterns) {\n\t\tif (patterns != null) {\n\t\t\tEntry entry = null;\n\t\t\tfor (String pattern : patterns) {\n\t\t\t\tentry = createEntry(pattern);\n\t\t\t\tif (entry != null) {\n\t\t\t\t\tthis.patterns.add(pattern);\n\t\t\t\t\tthis.entries.add(entry);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void setPatterns(String[] patterns) {\n\t\tthis.patterns.clear();\n\t\tthis.entries.clear();\n\t\taddPatterns(patterns);\n\t}", "void applyLocalizedPattern(String pattern) {\n applyPattern(pattern, true);\n }", "public String listPatterns() {\n return \"Full list of patterns\";\n }", "String combine(String pattern1, String pattern2);", "public static void patterns() {\n\t\ttry {\n\t\t\tList<Pattern> patterns = PlatformClient.patterns(getUser());\n\t\t\trender(patterns);\n\t\t} catch (ApplicationException e) {\n\t\t\te.printStackTrace();\n\t\t\tflash.error(\"Can not get patterns : %s\", e.getMessage());\n\t\t\trender();\n\t\t}\n\t}", "@Test\n public void testCrazyPatterns() {\n assertEquals(\"java\\\\.\\\\{.*\\\\}\\\\.Array\", glob2Pattern(\"java.{**}.Array\").pattern());\n assertEquals(\"java\\\\./.*<>\\\\.Array\\\\$1\", glob2Pattern(\"java./**<>.Array$1\").pattern());\n assertEquals(\"\\\\+\\\\^\\\\$\", glob2Pattern(\"+^$\").pattern());\n }", "List<String> externalResources();", "public List<String> getPatterns() {\n return patterns;\n }", "private void initRegs(){\n\n keyWordReg = \"\";\n\n for (String seg: keyWordMap.keySet()){\n\n keyWordReg += seg + \"|\";\n\n }\n\n symbolReg = \"[\\\\&\\\\*\\\\+\\\\(\\\\)\\\\.\\\\/\\\\,\\\\-\\\\]\\\\;\\\\~\\\\}\\\\|\\\\{\\\\>\\\\=\\\\[\\\\<]\";\n intReg = \"[0-9]+\";\n strReg = \"\\\"[^\\\"\\n]*\\\"\";\n idReg = \"[a-zA-Z_]\\\\w*\";\n\n tokenPatterns = Pattern.compile(idReg + \"|\" + keyWordReg + symbolReg + \"|\" + intReg + \"|\" + strReg);\n }", "private void removeRedundantPatterns() {\n HashSet<String> patternsToRemove = new HashSet<>();\n for (Map.Entry<String, Pattern> entry : patterns.entrySet()) {\n\n Pattern pattern = entry.getValue();\n\n if (!parameters.keepAllPatterns) {\n String suffixStr = getSuffix(pattern);\n PatternsUtils.addSubPatternToRemoveList(patterns, suffixStr, pattern, patternsToRemove);\n }\n\n if (crossStrand) {\n PatternsUtils.removeReverseCompliments(patterns, pattern, patternsToRemove);\n }\n }\n patterns.keySet().removeAll(patternsToRemove);\n }", "default String getPattern() {\n return null;\n }", "public void setPattern (String pattern) {\n this.pattern = pattern;\n }", "@Test\n public void testGetMonitorRegexPatternMap() {\n String system0 = \"system0\", system1 = \"system1\";\n String system0Rewriter0 = \"system-0-rewriter-0\", system0Rewriter1 = \"system-0-rewriter-1\", system1Rewriter =\n \"system-1-rewriter\", systemOnlyRewriter = \"system-only-rewriter\";\n String system0Rewriter0Streams = \"system-0-rewriter-0-.*\", system0Rewriter1Streams = \"system-0-rewriter-1-.*\",\n system1RewriterStreams = \"system-1-rewriter-.*\";\n JobConfig jobConfig = new JobConfig(new MapConfig(\n new ImmutableMap.Builder<String, String>().put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, system0Rewriter0),\n system0)\n .put(String.format(JobConfig.REGEX_RESOLVED_STREAMS, system0Rewriter0), system0Rewriter0Streams)\n .put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, system0Rewriter1), system0)\n .put(String.format(JobConfig.REGEX_RESOLVED_STREAMS, system0Rewriter1), system0Rewriter1Streams)\n .put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, system1Rewriter), system1)\n .put(String.format(JobConfig.REGEX_RESOLVED_STREAMS, system1Rewriter), system1RewriterStreams)\n // not passed in as a rewriter when calling getMonitorRegexPatternMap\n .put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, \"unused-rewriter\"), system0)\n .put(String.format(JobConfig.REGEX_RESOLVED_STREAMS, \"unused-rewriter\"), \"unused-rewriter-.*\")\n // should not be included since there is no regex\n .put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, systemOnlyRewriter), system0)\n .build()));\n // Pattern.equals only checks that the references are the same, so can't compare maps directly\n Map<String, Pattern> actual = jobConfig.getMonitorRegexPatternMap(String.join(\",\",\n ImmutableList.of(system0Rewriter0, system0Rewriter1, system1Rewriter, systemOnlyRewriter,\n \"not-a-regex-rewriter\")));\n // only should have rewriters for system0 and system1\n assertEquals(2, actual.size());\n assertEquals(system0Rewriter0Streams + \"|\" + system0Rewriter1Streams, actual.get(system0).pattern());\n assertEquals(system1RewriterStreams, actual.get(system1).pattern());\n\n // empty configs should produce an empty map\n jobConfig = new JobConfig(new MapConfig());\n assertEquals(Collections.<String, Pattern>emptyMap(), jobConfig.getMonitorRegexPatternMap(system0Rewriter0));\n assertEquals(Collections.<String, Pattern>emptyMap(), jobConfig.getMonitorRegexPatternMap(\"\"));\n }", "private boolean loadOtherPattern() {\n\t\tArrayList<String> listOfAlternativePatterns = new ArrayList<String>();\n\t\tArrayList<Integer> listOfValue = new ArrayList<Integer>();\n\t\t// Open otherPatterns to load\n\t\tString txtFile = \"res/otherPatterns.txt\";\n\t\tString lineRead = \"\";\n\t\tString separator = \"\\\\s*;\\\\s*\";\n\t\tStringBuilder pattern = null;\n\t\ttry (BufferedReader br = new BufferedReader(\n\t\t\t\tnew InputStreamReader(this.getClass().getClassLoader().getResourceAsStream(txtFile), \"UTF-8\"))) {\n\t\t\twhile ((lineRead = br.readLine()) != null) {\n\t\t\t\tpattern = null;\n\t\t\t\t// use comma as separator\n\t\t\t\t// constructing pattern\n\t\t\t\tif (lineRead.indexOf(\";\") >= 0) {\n\t\t\t\t\tString[] mixedTable = lineRead.split(separator);\n\t\t\t\t\t// the first value stands for representative value of the\n\t\t\t\t\t// line\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlistOfValue.add(new Integer(Integer.parseInt(mixedTable[0])));\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\tlistOfValue.add(null);\n\t\t\t\t\t}\n\t\t\t\t\t// the followings are possible cases\n\t\t\t\t\tpattern = new StringBuilder(\"\");\n\t\t\t\t\tfor (int i = 1; i < mixedTable.length; i++) {\n\t\t\t\t\t\tpattern.append(mixedTable[i]);\n\t\t\t\t\t\tif (i < mixedTable.length - 1) {\n\t\t\t\t\t\t\tpattern.append(\"|\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlistOfAlternativePatterns.add(pattern.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\treturn false;\n\t\t}\n\t\tOTHER_PATTERNS = listOfAlternativePatterns.toArray(new String[listOfAlternativePatterns.size()]);\n\t\tVALUE_OF_OTHER_PATTERNS = listOfValue.toArray(new Integer[listOfValue.size()]);\n\t\treturn true;\n\t}", "List<Resource> resources();", "private JBurgPatternMatcher()\n\t{\n\t}", "void setUsagePattern(UsagePattern usagePattern);", "public int getResourceNamesCount() {\n return resourceNames_.size();\n }", "protected String expectedFor( String resource)\n {\n return resource + \"-Expected\";\n }", "default String patternConstraint(String pattern) {\n return switch (getType()) {\n case STRING -> validationPattern(pattern);\n default -> throw new RuntimeException(\"Only String can have a pattern\");\n };\n }", "@Inject(method = \"readPattern\", at = @At(\"TAIL\"))\n private void parseBppPatternDataPost(CallbackInfo info) {\n for(int i = nextLoomPatternIndex; i < loomPatterns.size(); i++) {\n this.patternCacheKey += partialCacheKey(loomPatterns.get(i));\n }\n }", "public void setPattern(Pattern pattern) {\n this.pattern = pattern;\n }", "public final String getPattern() {\n/* 187 */ return this.m_pattern;\n/* */ }", "public String getPattern() {\r\n return \"DEFAULT\";\r\n }", "public IPath[] getAdditionalResources();", "public interface ResourcePaths {\n String imageFolderPath();\n String imageResourcePath();\n String videoFolderPath();\n String videoResourcePath();\n}", "String getResourceName();", "public String toString() {\n/* 666 */ return this.pattern;\n/* */ }", "@ApiModelProperty(value = \"List of the resource name pattern strings to which the policy applies. Must conform to the pattern templates provided by the associated Managing Resource Types resource type\")\n public List<String> getResources() {\n return resources;\n }", "public String getPattern() {\r\n \treturn pattern;\r\n }", "public String toString() {\n/* 664 */ return this.pattern;\n/* */ }", "public void setResources(List<String> resources) {\n this.resources = resources;\n }", "public void setPattern(String pattern) {\r\n\t\tthis.pattern = pattern;\r\n\t}", "public String getPattern() {\n\treturn pattern;\n }", "@Inject(\n method = \"readPattern\",\n at = @At(value = \"JUMP\", ordinal = 0, shift = At.Shift.AFTER),\n slice = @Slice(\n from = @At(\n value = \"INVOKE\",\n target = \"Lnet/minecraft/nbt/ListTag;size()I\"\n )\n )\n )\n private void parseBppPatternDataInline(CallbackInfo info) {\n int nextIndex = this.patterns.size() - 1;\n while(nextLoomPatternIndex < loomPatterns.size()) {\n LoomPatternData data = loomPatterns.get(nextLoomPatternIndex);\n if(data.index == nextIndex) {\n this.patternCacheKey += partialCacheKey(data);\n nextLoomPatternIndex++;\n } else {\n break;\n }\n }\n }", "public void setVarTrPatternCount( String var, Integer count ) ;", "List<ResourceType> resourceTypes();", "private int numberOfConstants() {\n return (int) Stream.of(this.template.split(\"\\\\.\"))\n .filter(s -> !s.equals(\"*\")).count();\n }", "public String[] getPatternsRegEx() {\n return this.patternsRegEx;\n }", "private String[] getPatterns(StreamTokenizer st) throws IOException {\n\t\t// get language\n\t\tString lang = getLanguageFromTokenizer(st);\n\n\t\tif (st.nextToken() != StreamTokenizer.TT_EOF)\n\t\t\tthrow new IOException(\n\t\t\t\t\t\"PATTERNS takes exactly one (language) or no arguments (default language)!\");\n\n\t\treturn ng.getPatterns(lang);\n\t}", "private static String m2631a(int i) {\n return i != 1 ? i != 2 ? i != 3 ? i != 4 ? i != 5 ? \"UNKNOWN\" : \"BITMAP_MASKABLE\" : \"URI\" : \"DATA\" : \"RESOURCE\" : \"BITMAP\";\n }", "static Pattern m36427k(String str) {\n Pattern pattern;\n if (f24496af == null) {\n f24496af = new HashMap<>();\n pattern = null;\n } else {\n pattern = (Pattern) f24496af.get(str);\n }\n if (pattern != null) {\n return pattern;\n }\n if (f24496af.size() == 10) {\n f24496af.clear();\n }\n Pattern compile = Pattern.compile(str, 40);\n f24496af.put(str, compile);\n return compile;\n }", "public Object[] getPattern(){\n return pattern;\n }", "public int getResourceNamesCount() {\n return resourceNames_.size();\n }", "public final void mT__113() throws RecognitionException {\r\n try {\r\n int _type = T__113;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // InternalSpringConfigDsl.g:114:8: ( 'resource-pattern=' )\r\n // InternalSpringConfigDsl.g:114:10: 'resource-pattern='\r\n {\r\n match(\"resource-pattern=\"); \r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }", "private ResourcePackage() {}", "public void setPattern(String pattern) {\n/* 234 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public Builder addAllResourceNames(\n java.lang.Iterable<java.lang.String> values) {\n ensureResourceNamesIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, resourceNames_);\n onChanged();\n return this;\n }", "public interface ResourceAdapter {\n\n public enum Item {\n INPUT_SAME_AS_OUTPUT_ERROR,\n AUTO_KEY_SELECTION_ERROR,\n LOADING_CERTIFICATE_AND_KEY,\n PARSING_CENTRAL_DIRECTORY,\n GENERATING_MANIFEST,\n GENERATING_SIGNATURE_FILE,\n GENERATING_SIGNATURE_BLOCK,\n COPYING_ZIP_ENTRY\n };\n\n public String getString( Item item, Object... args);\n}", "@Test\n public void testGetShareResourceStringValid() {\n Matcher mtch = filter.getMatcher(FULL_URI);\n\n filter.isResourceAccess(mtch);\n\n assertEquals(\"share resource string differs\", SHARE_RES_STRING, filter.getShareResourceString(mtch));\n }", "public void addPattern(String pattern, Handler<Match> handler) {\n Matcher m = Pattern.compile(\":([A-Za-z][A-Za-z0-9]*)\").matcher(pattern);\n StringBuffer sb = new StringBuffer();\n Set<String> groups = new HashSet<>();\n while (m.find()) {\n String group = m.group().substring(1);\n if (groups.contains(group)) {\n throw new IllegalArgumentException(\"Cannot use identifier \" + group + \" more than once in pattern string\");\n }\n m.appendReplacement(sb, \"(?<$1>[^\\\\/]+)\");\n groups.add(group);\n }\n m.appendTail(sb);\n String regex = sb.toString();\n PatternBinding binding = new PatternBinding(Pattern.compile(regex), groups, handler);\n bindings.add(binding);\n }", "private void exercise7() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> result;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n result = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .map(String::toLowerCase)\n .sorted(comparingInt(String::length))\n .collect(toList());\n }\n\n result.forEach(System.out::println);\n }", "String toLocalizedPattern() {\n return toPattern(true);\n }", "public int getPattern() {\n return this.pattern;\n }", "private void createRules(List<PatternToken> elemList,\n List<PatternToken> tmpPatternTokens, int numElement) {\n String shortMessage = \"\";\n if (this.shortMessage != null && this.shortMessage.length() > 0) {\n shortMessage = this.shortMessage.toString();\n } else if (shortMessageForRuleGroup != null && shortMessageForRuleGroup.length() > 0) {\n shortMessage = this.shortMessageForRuleGroup.toString();\n }\n if (numElement >= elemList.size()) {\n AbstractPatternRule rule;\n if (tmpPatternTokens.size() > 0) {\n rule = new PatternRule(id, language, tmpPatternTokens, name,\n message.toString(), shortMessage,\n suggestionsOutMsg.toString(), phrasePatternTokens.size() > 1, interpretPosTagsPreDisambiguation);\n rule.addTags(ruleTags);\n rule.addTags(ruleGroupTags);\n rule.addTags(categoryTags);\n rule.setSourceFile(sourceFile);\n } else if (regex.length() > 0) {\n int flags = regexCaseSensitive ? 0 : Pattern.CASE_INSENSITIVE|Pattern.UNICODE_CASE;\n String regexStr = regex.toString();\n if (regexMode == RegexpMode.SMART) {\n // Note: it's not that easy to add \\b because the regex might look like '(foo)' or '\\d' so we cannot just look at the last character\n regexStr = replaceSpacesInRegex(regexStr);\n }\n if (ruleAntiPatterns.size() > 0 || rulegroupAntiPatterns.size() > 0) {\n throw new RuntimeException(\"<regexp> rules currently cannot be used together with <antipattern>. Rule id: \" + id + \"[\" + subId + \"]\");\n }\n rule = new RegexPatternRule(id, name, message.toString(), shortMessage, suggestionsOutMsg.toString(), language, Pattern.compile(regexStr, flags), regexpMark);\n rule.setSourceFile(sourceFile);\n } else {\n throw new IllegalStateException(\"Neither '<pattern>' tokens nor '<regex>' is set in rule '\" + id + \"'\");\n }\n setRuleFilter(filterClassName, filterArgs, rule);\n prepareRule(rule);\n rules.add(rule);\n } else {\n PatternToken patternToken = elemList.get(numElement);\n if (patternToken.hasOrGroup()) {\n // When creating a new rule, we finally clear the backed-up variables. All the elements in\n // the OR group should share the values of backed-up variables. That's why these variables\n // are backed-up.\n List<Match> suggestionMatchesBackup = new ArrayList<>(suggestionMatches);\n List<Match> suggestionMatchesOutMsgBackup = new ArrayList<>(suggestionMatchesOutMsg);\n int startPosBackup = startPos;\n int endPosBackup = endPos;\n List<DisambiguationPatternRule> ruleAntiPatternsBackup = new ArrayList<>(ruleAntiPatterns);\n for (PatternToken patternTokenOfOrGroup : patternToken.getOrGroup()) {\n List<PatternToken> tmpElements2 = new ArrayList<>();\n tmpElements2.addAll(tmpPatternTokens);\n tmpElements2.add(ObjectUtils.clone(patternTokenOfOrGroup));\n createRules(elemList, tmpElements2, numElement + 1);\n startPos = startPosBackup;\n endPos = endPosBackup;\n suggestionMatches = suggestionMatchesBackup;\n suggestionMatchesOutMsg = suggestionMatchesOutMsgBackup;\n ruleAntiPatterns.addAll(ruleAntiPatternsBackup);\n }\n }\n tmpPatternTokens.add(ObjectUtils.clone(patternToken));\n createRules(elemList, tmpPatternTokens, numElement + 1);\n }\n }", "Set<String> getKeysMatchingPattern(String pattern);", "@Test\r\n\tpublic void testPositiveGenerateStrings_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString[] response = roc.generateStrings(10, 5, \"abcd\", false, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tString[] response2 = roc.generateStrings(10, 5, \"abcd\", false, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\r\n\t\t\t\tresponse = roc.generateStrings(10, 5, \"abcd\", false, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateStrings(10, 5, \"abcd\", false, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "String getRepeatPref();", "public static String findRepetitivePattern(String s) {\n if (s.isEmpty()) {\n return s;\n }\n int n = 0;\n int pLength = 1;\n\n int i = 1;\n char[] arr = s.toCharArray();\n while (i < arr.length) {\n\n boolean patternMatched = true;\n for (int j = 0; j < pLength && i + j < arr.length; ++j) {\n int k = i + j;\n if (k >= arr.length || arr[j] != arr[k]) {\n patternMatched = false;\n break;\n }\n }\n if (patternMatched) {\n n++;\n i += pLength;\n } else {\n i += 1;\n pLength = i;\n n = 0;\n }\n }\n return String.copyValueOf(arr, 0, pLength);\n }", "public boolean useRegisteredSuffixPatternMatch()\n/* */ {\n/* 610 */ return this.registeredSuffixPatternMatch;\n/* */ }", "public String getPattern () {\n return pattern;\n }", "public WildcardPattern(String pattern) {\r\n this.pattern = pattern;\r\n }", "public Integer getVarTrPatternCount( String var ) ;", "public String getPattern() {\n/* 223 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "abstract UrlPatternMatcher create( String pattern );", "public void addResources(Type type, int count) {\n \t\tresources[type.ordinal()] += count;\n \t}", "private Collection<Resource> addMplsLabels(DiscreteResourceId parent) {\n Collection<Resource> resources = new HashSet<>();\n if (!this.availableMplsLabels.isEmpty()) {\n this.availableMplsLabels.forEach(label -> {\n if (label < MplsLabel.MAX_MPLS) {\n resources.add(Resources.discrete(parent).resource().child(MplsLabel.mplsLabel(label)));\n }\n });\n } else {\n for (int i = 1; i < 1000; i++) {\n resources.add(Resources.discrete(parent).resource().child(MplsLabel.mplsLabel(i)));\n }\n }\n return resources;\n }" ]
[ "0.70102745", "0.63171977", "0.614899", "0.5962302", "0.5754785", "0.56401736", "0.55445844", "0.5433226", "0.5420315", "0.54146755", "0.52962816", "0.52954173", "0.5276438", "0.5243955", "0.5226408", "0.52184", "0.51119876", "0.5101496", "0.5089172", "0.5075194", "0.5065478", "0.50172096", "0.49947426", "0.4977734", "0.4960261", "0.49572387", "0.49529272", "0.4951533", "0.49468723", "0.493134", "0.4927026", "0.49217722", "0.49176815", "0.4916252", "0.49152333", "0.49046466", "0.49036616", "0.49013546", "0.48951182", "0.48927814", "0.48776942", "0.48581624", "0.4845226", "0.48369414", "0.4836779", "0.48363224", "0.4825833", "0.48235518", "0.48227564", "0.4815328", "0.48142624", "0.4813393", "0.48041287", "0.47981343", "0.4789593", "0.4787117", "0.478682", "0.4786645", "0.47802305", "0.47760022", "0.47754738", "0.4773078", "0.47703007", "0.47587705", "0.47576186", "0.4754656", "0.47325623", "0.47322747", "0.47259414", "0.47245532", "0.47231907", "0.47148213", "0.4712929", "0.46950665", "0.469325", "0.46874264", "0.46718886", "0.46701548", "0.46674272", "0.46657866", "0.4661663", "0.4660688", "0.4653125", "0.46434873", "0.46356067", "0.46354443", "0.4633432", "0.46322495", "0.4632242", "0.46229067", "0.46223512", "0.46203703", "0.46166226", "0.46157253", "0.46106082", "0.46039262", "0.46029228", "0.46010435", "0.46010396", "0.45997438" ]
0.662616
1
repeated string resource_patterns = 2;
com.google.protobuf.ByteString getResourcePatternsBytes(int index);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getResourcePatternsCount();", "java.lang.String getResourcePatterns(int index);", "static int getNumPatterns() { return 64; }", "java.util.List<java.lang.String>\n getResourcePatternsList();", "public void setPattern(String pattern)\n/* */ {\n/* 71 */ setPatterns(new String[] { pattern });\n/* */ }", "public String[] getPatterns()\n/* */ {\n/* 92 */ return this.patterns;\n/* */ }", "protected abstract void initPatternRepresentation(String[] paramArrayOfString)\n/* */ throws IllegalArgumentException;", "StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }", "private List<Map.Entry<String, Pattern>> addPatterns (String syntax, List<Map.Entry<String, Pattern>> translations) {\n var resources = ResourceBundle.getBundle(syntax);\n for (var key : Collections.list(resources.getKeys())) {\n var regex = resources.getString(key);\n translations.add(new AbstractMap.SimpleEntry<>(key,\n Pattern.compile(regex, Pattern.CASE_INSENSITIVE)));\n }\n return translations;\n }", "@Test\n public void testRemainingResourceStringValid() {\n Matcher mtch = filter.getMatcher(FULL_URI);\n\n filter.isResourceAccess(mtch);\n\n assertEquals(\"resource string differs\", REMAINING_RES_STRING, filter.getRootResourceString(mtch));\n }", "public void addPattern(String pattern) {\n\t\tArrayList<String> patterns = new ArrayList<String>();\n\t\tStringTokenizer entries = new StringTokenizer(pattern, \":,\");\n\t\twhile (entries.hasMoreTokens()) {\n\t\t\tpatterns.add(entries.nextToken());\n\t\t}\n\n\t\taddPatterns((String[]) patterns.toArray(new String[patterns.size()]));\n\t}", "public List<String> loadFile(String filename) {\n\t\tList<String> patterns = new ArrayList<>();\n\t\tString resourceFilename = (filename.indexOf('/') == 0) ? filename : \"/reference/pos/\" + filename;\n URL url = getClass().getResource(resourceFilename);\n if(url == null) {\n throw new IllegalArgumentException(\"Could not load resource: \\\"\" + resourceFilename + \"\\\"\");\n }\n try(InputStream stream = url.openStream()) {\n \tbyte[] bytes = stream.readAllBytes();\n \tStringBuilder sb = new StringBuilder();\n \tfor(byte b : bytes) {\n \t\tsb.append((char)b);\n \t}\n \tString s = sb.toString();\n \tString[] lines = s.split(\"\\\\R\");\t\t// Unicode linebreak sequence\n\t\t\tsb = new StringBuilder();\n \tfor(String line : lines) {\n\t\t\t\tif(line.startsWith(\"//\"))\n\t\t\t\t\tcontinue;\n\t\t\t\tif(line.endsWith(\"+\")) {\n\t\t\t\t\tsb.append(line.substring(0, line.length() - 1));\n\t\t\t\t}\n\t\t\t\telse if(sb.length() > 0 ) {\n\t\t\t\t\tsb.append(line);\n\t\t\t\t\tpatterns.add(sb.toString());\n\t\t\t\t\tsb = new StringBuilder();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tpatterns.add(line);\n \t}\n }\n catch(Exception e) {\n \tSystem.err.println(\"Could not load \" + resourceFilename + \" \" + e.toString());\n }\n\t\treturn patterns;\n\t}", "private void compilePattern() {\r\n\r\n pattern_startOfPage = Pattern.compile(regex_startOfPage);\r\n pattern_headerAttribute = Pattern.compile(regex_headerAttribute);\r\n pattern_messageFirstLine = Pattern.compile(regex_messageFirstLine);\r\n pattern_messageContinuationLine = Pattern.compile(regex_messageContinuationLine);\r\n }", "String getUrlPattern();", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "public void getPatterns(int pack){\n FileHandle file = Gdx.files.internal(\"patterns.txt\");\n String text = file.readString();\n patternPacks = text.split(\";\");\n //System.out.println(patternPacks[pack]);\n }", "abstract boolean matchesResourceName( String resourceName );", "TemplateSubPatternAssociation(ElemTemplate template, StepPattern pattern, String pat) {\n/* 64 */ this.m_pattern = pat;\n/* 65 */ this.m_template = template;\n/* 66 */ this.m_stepPattern = pattern;\n/* 67 */ this.m_targetString = this.m_stepPattern.getTargetString();\n/* 68 */ this.m_wild = this.m_targetString.equals(\"*\");\n/* */ }", "public void setPatterns(String... patterns)\n/* */ {\n/* 80 */ Assert.notEmpty(patterns, \"'patterns' must not be empty\");\n/* 81 */ this.patterns = new String[patterns.length];\n/* 82 */ for (int i = 0; i < patterns.length; i++) {\n/* 83 */ this.patterns[i] = StringUtils.trimWhitespace(patterns[i]);\n/* */ }\n/* 85 */ initPatternRepresentation(this.patterns);\n/* */ }", "public void testResourceURI() throws Exception {\n testResourceURI(\"RELS-EXT\");\n testResourceURI(\"RELS-INT\");\n }", "@Test\n public void testRemainingResourceStringValidDeepString() {\n Matcher mtch = filter.getMatcher(FULL_URI + \"/something/very/deep/nested\");\n\n filter.isResourceAccess(mtch);\n\n assertEquals(\"resource string differs\", REMAINING_RES_STRING, filter.getRootResourceString(mtch));\n }", "private void exercise5() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> nonDuplicateList;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n nonDuplicateList = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .collect(toList());\n }\n\n nonDuplicateList.forEach(System.out::println);\n }", "protected void resourceSet(String resource)\r\n {\r\n // nothing to do\r\n }", "protected abstract void initExcludedPatternRepresentation(String[] paramArrayOfString)\n/* */ throws IllegalArgumentException;", "public interface Constants {\n\n final public static String[] actionTypes = {\n \"ro.pub.cs.systems.eim.practicaltest01.actionType1\",\n \"ro.pub.cs.systems.eim.practicaltest01.actionType2\",\n \"ro.pub.cs.systems.eim.practicaltest01.actionType3\"\n };\n\n}", "String getDelayPattern();", "public ArrayList<Resource> extractResourceListFromText(String rawText) {\n\n ArrayList<Resource> resourceList = new ArrayList<>();\n\n if (!TextUtils.isEmpty(rawText)) {\n\n /* Extraction of all video resource\n * First if text contains '<figure' get list of text from \"<figure\" to \"</figure>\"\n * Then if resource-type=\"video\" is in each figure text that means we need to extract it otherwise no action needed\n * Then split the figure string from 'comma' */\n if (rawText.contains(\"<figure\")) {\n\n ArrayList<String> listFigureVideo = getStringListFromHtmlText(rawText, \"<figure\", \"</figure>\");\n\n if (!listFigureVideo.isEmpty()) {\n\n for (int i = 0; i < listFigureVideo.size(); i++) {\n\n if (listFigureVideo.get(i).contains(\"resource-type=\\\"video\\\"\")) {\n\n String figureVideoString = listFigureVideo.get(i);\n ArrayList<String> commaSeparatedList = new ArrayList<>(Arrays.asList(figureVideoString.split(\",\")));\n\n for (int j = 0; j < commaSeparatedList.size(); j++) {\n\n String separatedText = commaSeparatedList.get(j);\n\n if (!separatedText.contains(\"displayResourceFullScreen\")\n && (separatedText.contains(\".youtube.com/\") || separatedText.contains(\"vimeo.com/\"))) {\n\n String resourceUrlVideo = separatedText;\n\n if (resourceUrlVideo.startsWith(\"&quot;\")) {\n resourceUrlVideo = resourceUrlVideo.replace(\"&quot;\", \"\");\n }\n if (resourceUrlVideo.endsWith(\"&quot;\")) {\n resourceUrlVideo = resourceUrlVideo.replace(\"&quot;\", \"\");\n }\n\n Resource resourceVideo = new Resource();\n resourceVideo.setUrl(resourceUrlVideo);\n resourceVideo.setUrlMain(resourceUrlVideo);\n resourceVideo.setResourceType(Resource.TYPE_RESOURCE_VIDEO);\n\n if (resourceUrlVideo.contains(\".youtube.com/\")) {\n resourceVideo.setType(mContext.getString(R.string.typeYouTubeVideo));\n } else if (resourceUrlVideo.contains(\"vimeo.com/\")) {\n resourceVideo.setType(mContext.getString(R.string.typeVimeoVideo));\n }\n\n if (listFigureVideo.get(i).contains(\"<img\")) {\n String resourceUrlSrc = getStringFromHtmlTextAfterTagRemoval(listFigureVideo.get(i), ConstantUtil.HTML_IMAGE_SRC_TAG, ConstantUtil.HTML_DOUBLE_QUOTE);\n resourceVideo.setUrlThumbnail(resourceUrlSrc);\n }\n\n resourceList.add(resourceVideo);\n\n /* First time we get our desired url of video, we breaks the loop;\n * since after this unnecessary url(s) might add */\n break;\n\n }\n }\n }\n }\n }\n\n\n }\n\n\n /*Extraction of all image resource*/\n ArrayList<String> list = getStringListFromHtmlText(rawText, ConstantUtil.HTML_IMAGE_START_TAG, ConstantUtil.HTML_END_TAG);\n\n if (!list.isEmpty()) {\n for (int i = 0; i < list.size(); i++) {\n\n if (!TextUtils.isEmpty(list.get(i)) && !list.get(i).contains(\"file:\")) {\n\n /*if list.get(i) contains resource-type=\"video\" then do not take\n that image since it is for video resource*/\n if (!list.get(i).contains(\"resource-type=\\\"video\\\"\")) {\n\n String resourceUrl = getStringFromHtmlTextAfterTagRemoval(list.get(i), ConstantUtil.HTML_IMAGE_SRC_TAG, ConstantUtil.HTML_DOUBLE_QUOTE);\n\n Resource resourceQue = new Resource();\n resourceQue.setUrl(resourceUrl);\n resourceQue.setUrlMain(resourceUrl);\n\n String mimeType = URLConnection.guessContentTypeFromName(resourceUrl);\n if (!TextUtils.isEmpty(mimeType) && mimeType.contains(ConstantUtil.TYPE_IMAGE)) {\n\n resourceQue.setUrlThumbnail(resourceUrl);\n resourceQue.setResourceType(Resource.TYPE_RESOURCE_IMAGE);\n\n }\n\n resourceList.add(resourceQue);\n }\n }\n\n }\n }\n\n }\n\n return resourceList;\n\n }", "private void loadResourcesData(){\n //showResourceListView();\n\n String [] resourceData = new String [20];\n\n for(int stringCount = 1; stringCount <= 20; stringCount++) {\n resourceData[stringCount - 1] = \"Title \" + stringCount;\n }\n\n mResourceListAdapter.setResourceData(resourceData);\n }", "private static Map<Integer, List<String>> getIpPatternMap()\n\t{\n\t\tMap<Integer, List<String>> map = new HashMap<>();\n\t\tfor(int a = 1; a <= 3; a++)\n\t\t{\n\t\t\tfor( int b = 1; b <= 3; b++)\n\t\t\t{\n\t\t\t\tfor(int c = 1 ; c <= 3; c++)\n\t\t\t\t{\n\t\t\t\t\tfor( int d = 1; d <= 3; d++)\n\t\t\t\t\t{\n\t\t\t\t\t\tfinal int patternCount = a + b + c + d;\n\t\t\t\t\t\tList<String> patterns;\n\t\t\t\t\t\tif(!map.containsKey(patternCount))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpatterns = new ArrayList<>();\n\t\t\t\t\t\t\tmap.put(patternCount, patterns);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpatterns = map.get(patternCount);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpatterns.add(String.format(\"%1$d%2$d%3$d%4$d\", a,b,c,d));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn map;\n\t}", "@Override\n public List<BannerPattern> getPatterns() {\n return patterns;\n }", "private String getPatterns()\n\t{\n\t\treturn (accepted ? FileSet.patternsToString(patternListPanel.getElements()) : null);\n\t}", "UsagePattern getUsagePattern();", "private void addPatterns(String[] patterns) {\n\t\tif (patterns != null) {\n\t\t\tEntry entry = null;\n\t\t\tfor (String pattern : patterns) {\n\t\t\t\tentry = createEntry(pattern);\n\t\t\t\tif (entry != null) {\n\t\t\t\t\tthis.patterns.add(pattern);\n\t\t\t\t\tthis.entries.add(entry);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void applyLocalizedPattern(String pattern) {\n applyPattern(pattern, true);\n }", "private void setPatterns(String[] patterns) {\n\t\tthis.patterns.clear();\n\t\tthis.entries.clear();\n\t\taddPatterns(patterns);\n\t}", "public String listPatterns() {\n return \"Full list of patterns\";\n }", "String combine(String pattern1, String pattern2);", "public static void patterns() {\n\t\ttry {\n\t\t\tList<Pattern> patterns = PlatformClient.patterns(getUser());\n\t\t\trender(patterns);\n\t\t} catch (ApplicationException e) {\n\t\t\te.printStackTrace();\n\t\t\tflash.error(\"Can not get patterns : %s\", e.getMessage());\n\t\t\trender();\n\t\t}\n\t}", "@Test\n public void testCrazyPatterns() {\n assertEquals(\"java\\\\.\\\\{.*\\\\}\\\\.Array\", glob2Pattern(\"java.{**}.Array\").pattern());\n assertEquals(\"java\\\\./.*<>\\\\.Array\\\\$1\", glob2Pattern(\"java./**<>.Array$1\").pattern());\n assertEquals(\"\\\\+\\\\^\\\\$\", glob2Pattern(\"+^$\").pattern());\n }", "List<String> externalResources();", "public List<String> getPatterns() {\n return patterns;\n }", "private void initRegs(){\n\n keyWordReg = \"\";\n\n for (String seg: keyWordMap.keySet()){\n\n keyWordReg += seg + \"|\";\n\n }\n\n symbolReg = \"[\\\\&\\\\*\\\\+\\\\(\\\\)\\\\.\\\\/\\\\,\\\\-\\\\]\\\\;\\\\~\\\\}\\\\|\\\\{\\\\>\\\\=\\\\[\\\\<]\";\n intReg = \"[0-9]+\";\n strReg = \"\\\"[^\\\"\\n]*\\\"\";\n idReg = \"[a-zA-Z_]\\\\w*\";\n\n tokenPatterns = Pattern.compile(idReg + \"|\" + keyWordReg + symbolReg + \"|\" + intReg + \"|\" + strReg);\n }", "private void removeRedundantPatterns() {\n HashSet<String> patternsToRemove = new HashSet<>();\n for (Map.Entry<String, Pattern> entry : patterns.entrySet()) {\n\n Pattern pattern = entry.getValue();\n\n if (!parameters.keepAllPatterns) {\n String suffixStr = getSuffix(pattern);\n PatternsUtils.addSubPatternToRemoveList(patterns, suffixStr, pattern, patternsToRemove);\n }\n\n if (crossStrand) {\n PatternsUtils.removeReverseCompliments(patterns, pattern, patternsToRemove);\n }\n }\n patterns.keySet().removeAll(patternsToRemove);\n }", "@Test\n public void testGetMonitorRegexPatternMap() {\n String system0 = \"system0\", system1 = \"system1\";\n String system0Rewriter0 = \"system-0-rewriter-0\", system0Rewriter1 = \"system-0-rewriter-1\", system1Rewriter =\n \"system-1-rewriter\", systemOnlyRewriter = \"system-only-rewriter\";\n String system0Rewriter0Streams = \"system-0-rewriter-0-.*\", system0Rewriter1Streams = \"system-0-rewriter-1-.*\",\n system1RewriterStreams = \"system-1-rewriter-.*\";\n JobConfig jobConfig = new JobConfig(new MapConfig(\n new ImmutableMap.Builder<String, String>().put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, system0Rewriter0),\n system0)\n .put(String.format(JobConfig.REGEX_RESOLVED_STREAMS, system0Rewriter0), system0Rewriter0Streams)\n .put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, system0Rewriter1), system0)\n .put(String.format(JobConfig.REGEX_RESOLVED_STREAMS, system0Rewriter1), system0Rewriter1Streams)\n .put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, system1Rewriter), system1)\n .put(String.format(JobConfig.REGEX_RESOLVED_STREAMS, system1Rewriter), system1RewriterStreams)\n // not passed in as a rewriter when calling getMonitorRegexPatternMap\n .put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, \"unused-rewriter\"), system0)\n .put(String.format(JobConfig.REGEX_RESOLVED_STREAMS, \"unused-rewriter\"), \"unused-rewriter-.*\")\n // should not be included since there is no regex\n .put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, systemOnlyRewriter), system0)\n .build()));\n // Pattern.equals only checks that the references are the same, so can't compare maps directly\n Map<String, Pattern> actual = jobConfig.getMonitorRegexPatternMap(String.join(\",\",\n ImmutableList.of(system0Rewriter0, system0Rewriter1, system1Rewriter, systemOnlyRewriter,\n \"not-a-regex-rewriter\")));\n // only should have rewriters for system0 and system1\n assertEquals(2, actual.size());\n assertEquals(system0Rewriter0Streams + \"|\" + system0Rewriter1Streams, actual.get(system0).pattern());\n assertEquals(system1RewriterStreams, actual.get(system1).pattern());\n\n // empty configs should produce an empty map\n jobConfig = new JobConfig(new MapConfig());\n assertEquals(Collections.<String, Pattern>emptyMap(), jobConfig.getMonitorRegexPatternMap(system0Rewriter0));\n assertEquals(Collections.<String, Pattern>emptyMap(), jobConfig.getMonitorRegexPatternMap(\"\"));\n }", "public void setPattern (String pattern) {\n this.pattern = pattern;\n }", "default String getPattern() {\n return null;\n }", "private boolean loadOtherPattern() {\n\t\tArrayList<String> listOfAlternativePatterns = new ArrayList<String>();\n\t\tArrayList<Integer> listOfValue = new ArrayList<Integer>();\n\t\t// Open otherPatterns to load\n\t\tString txtFile = \"res/otherPatterns.txt\";\n\t\tString lineRead = \"\";\n\t\tString separator = \"\\\\s*;\\\\s*\";\n\t\tStringBuilder pattern = null;\n\t\ttry (BufferedReader br = new BufferedReader(\n\t\t\t\tnew InputStreamReader(this.getClass().getClassLoader().getResourceAsStream(txtFile), \"UTF-8\"))) {\n\t\t\twhile ((lineRead = br.readLine()) != null) {\n\t\t\t\tpattern = null;\n\t\t\t\t// use comma as separator\n\t\t\t\t// constructing pattern\n\t\t\t\tif (lineRead.indexOf(\";\") >= 0) {\n\t\t\t\t\tString[] mixedTable = lineRead.split(separator);\n\t\t\t\t\t// the first value stands for representative value of the\n\t\t\t\t\t// line\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlistOfValue.add(new Integer(Integer.parseInt(mixedTable[0])));\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\tlistOfValue.add(null);\n\t\t\t\t\t}\n\t\t\t\t\t// the followings are possible cases\n\t\t\t\t\tpattern = new StringBuilder(\"\");\n\t\t\t\t\tfor (int i = 1; i < mixedTable.length; i++) {\n\t\t\t\t\t\tpattern.append(mixedTable[i]);\n\t\t\t\t\t\tif (i < mixedTable.length - 1) {\n\t\t\t\t\t\t\tpattern.append(\"|\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlistOfAlternativePatterns.add(pattern.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\treturn false;\n\t\t}\n\t\tOTHER_PATTERNS = listOfAlternativePatterns.toArray(new String[listOfAlternativePatterns.size()]);\n\t\tVALUE_OF_OTHER_PATTERNS = listOfValue.toArray(new Integer[listOfValue.size()]);\n\t\treturn true;\n\t}", "List<Resource> resources();", "private JBurgPatternMatcher()\n\t{\n\t}", "void setUsagePattern(UsagePattern usagePattern);", "public int getResourceNamesCount() {\n return resourceNames_.size();\n }", "protected String expectedFor( String resource)\n {\n return resource + \"-Expected\";\n }", "default String patternConstraint(String pattern) {\n return switch (getType()) {\n case STRING -> validationPattern(pattern);\n default -> throw new RuntimeException(\"Only String can have a pattern\");\n };\n }", "@Inject(method = \"readPattern\", at = @At(\"TAIL\"))\n private void parseBppPatternDataPost(CallbackInfo info) {\n for(int i = nextLoomPatternIndex; i < loomPatterns.size(); i++) {\n this.patternCacheKey += partialCacheKey(loomPatterns.get(i));\n }\n }", "public void setPattern(Pattern pattern) {\n this.pattern = pattern;\n }", "public String getPattern() {\r\n return \"DEFAULT\";\r\n }", "public final String getPattern() {\n/* 187 */ return this.m_pattern;\n/* */ }", "public IPath[] getAdditionalResources();", "public interface ResourcePaths {\n String imageFolderPath();\n String imageResourcePath();\n String videoFolderPath();\n String videoResourcePath();\n}", "String getResourceName();", "public String toString() {\n/* 666 */ return this.pattern;\n/* */ }", "@ApiModelProperty(value = \"List of the resource name pattern strings to which the policy applies. Must conform to the pattern templates provided by the associated Managing Resource Types resource type\")\n public List<String> getResources() {\n return resources;\n }", "public String getPattern() {\r\n \treturn pattern;\r\n }", "public String toString() {\n/* 664 */ return this.pattern;\n/* */ }", "public void setResources(List<String> resources) {\n this.resources = resources;\n }", "public void setPattern(String pattern) {\r\n\t\tthis.pattern = pattern;\r\n\t}", "public String getPattern() {\n\treturn pattern;\n }", "@Inject(\n method = \"readPattern\",\n at = @At(value = \"JUMP\", ordinal = 0, shift = At.Shift.AFTER),\n slice = @Slice(\n from = @At(\n value = \"INVOKE\",\n target = \"Lnet/minecraft/nbt/ListTag;size()I\"\n )\n )\n )\n private void parseBppPatternDataInline(CallbackInfo info) {\n int nextIndex = this.patterns.size() - 1;\n while(nextLoomPatternIndex < loomPatterns.size()) {\n LoomPatternData data = loomPatterns.get(nextLoomPatternIndex);\n if(data.index == nextIndex) {\n this.patternCacheKey += partialCacheKey(data);\n nextLoomPatternIndex++;\n } else {\n break;\n }\n }\n }", "public void setVarTrPatternCount( String var, Integer count ) ;", "List<ResourceType> resourceTypes();", "private int numberOfConstants() {\n return (int) Stream.of(this.template.split(\"\\\\.\"))\n .filter(s -> !s.equals(\"*\")).count();\n }", "public String[] getPatternsRegEx() {\n return this.patternsRegEx;\n }", "private String[] getPatterns(StreamTokenizer st) throws IOException {\n\t\t// get language\n\t\tString lang = getLanguageFromTokenizer(st);\n\n\t\tif (st.nextToken() != StreamTokenizer.TT_EOF)\n\t\t\tthrow new IOException(\n\t\t\t\t\t\"PATTERNS takes exactly one (language) or no arguments (default language)!\");\n\n\t\treturn ng.getPatterns(lang);\n\t}", "private static String m2631a(int i) {\n return i != 1 ? i != 2 ? i != 3 ? i != 4 ? i != 5 ? \"UNKNOWN\" : \"BITMAP_MASKABLE\" : \"URI\" : \"DATA\" : \"RESOURCE\" : \"BITMAP\";\n }", "static Pattern m36427k(String str) {\n Pattern pattern;\n if (f24496af == null) {\n f24496af = new HashMap<>();\n pattern = null;\n } else {\n pattern = (Pattern) f24496af.get(str);\n }\n if (pattern != null) {\n return pattern;\n }\n if (f24496af.size() == 10) {\n f24496af.clear();\n }\n Pattern compile = Pattern.compile(str, 40);\n f24496af.put(str, compile);\n return compile;\n }", "public Object[] getPattern(){\n return pattern;\n }", "public int getResourceNamesCount() {\n return resourceNames_.size();\n }", "public final void mT__113() throws RecognitionException {\r\n try {\r\n int _type = T__113;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // InternalSpringConfigDsl.g:114:8: ( 'resource-pattern=' )\r\n // InternalSpringConfigDsl.g:114:10: 'resource-pattern='\r\n {\r\n match(\"resource-pattern=\"); \r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }", "private ResourcePackage() {}", "public void setPattern(String pattern) {\n/* 234 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public Builder addAllResourceNames(\n java.lang.Iterable<java.lang.String> values) {\n ensureResourceNamesIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, resourceNames_);\n onChanged();\n return this;\n }", "public interface ResourceAdapter {\n\n public enum Item {\n INPUT_SAME_AS_OUTPUT_ERROR,\n AUTO_KEY_SELECTION_ERROR,\n LOADING_CERTIFICATE_AND_KEY,\n PARSING_CENTRAL_DIRECTORY,\n GENERATING_MANIFEST,\n GENERATING_SIGNATURE_FILE,\n GENERATING_SIGNATURE_BLOCK,\n COPYING_ZIP_ENTRY\n };\n\n public String getString( Item item, Object... args);\n}", "@Test\n public void testGetShareResourceStringValid() {\n Matcher mtch = filter.getMatcher(FULL_URI);\n\n filter.isResourceAccess(mtch);\n\n assertEquals(\"share resource string differs\", SHARE_RES_STRING, filter.getShareResourceString(mtch));\n }", "public void addPattern(String pattern, Handler<Match> handler) {\n Matcher m = Pattern.compile(\":([A-Za-z][A-Za-z0-9]*)\").matcher(pattern);\n StringBuffer sb = new StringBuffer();\n Set<String> groups = new HashSet<>();\n while (m.find()) {\n String group = m.group().substring(1);\n if (groups.contains(group)) {\n throw new IllegalArgumentException(\"Cannot use identifier \" + group + \" more than once in pattern string\");\n }\n m.appendReplacement(sb, \"(?<$1>[^\\\\/]+)\");\n groups.add(group);\n }\n m.appendTail(sb);\n String regex = sb.toString();\n PatternBinding binding = new PatternBinding(Pattern.compile(regex), groups, handler);\n bindings.add(binding);\n }", "String toLocalizedPattern() {\n return toPattern(true);\n }", "private void exercise7() throws IOException {\n final Path resourcePath = retrieveResourcePath();\n List<String> result;\n try (BufferedReader reader = newBufferedReader(resourcePath)) {\n result = reader.lines()\n .flatMap(line -> of(line.split(WORD_REGEXP)))\n .distinct()\n .map(String::toLowerCase)\n .sorted(comparingInt(String::length))\n .collect(toList());\n }\n\n result.forEach(System.out::println);\n }", "public int getPattern() {\n return this.pattern;\n }", "private void createRules(List<PatternToken> elemList,\n List<PatternToken> tmpPatternTokens, int numElement) {\n String shortMessage = \"\";\n if (this.shortMessage != null && this.shortMessage.length() > 0) {\n shortMessage = this.shortMessage.toString();\n } else if (shortMessageForRuleGroup != null && shortMessageForRuleGroup.length() > 0) {\n shortMessage = this.shortMessageForRuleGroup.toString();\n }\n if (numElement >= elemList.size()) {\n AbstractPatternRule rule;\n if (tmpPatternTokens.size() > 0) {\n rule = new PatternRule(id, language, tmpPatternTokens, name,\n message.toString(), shortMessage,\n suggestionsOutMsg.toString(), phrasePatternTokens.size() > 1, interpretPosTagsPreDisambiguation);\n rule.addTags(ruleTags);\n rule.addTags(ruleGroupTags);\n rule.addTags(categoryTags);\n rule.setSourceFile(sourceFile);\n } else if (regex.length() > 0) {\n int flags = regexCaseSensitive ? 0 : Pattern.CASE_INSENSITIVE|Pattern.UNICODE_CASE;\n String regexStr = regex.toString();\n if (regexMode == RegexpMode.SMART) {\n // Note: it's not that easy to add \\b because the regex might look like '(foo)' or '\\d' so we cannot just look at the last character\n regexStr = replaceSpacesInRegex(regexStr);\n }\n if (ruleAntiPatterns.size() > 0 || rulegroupAntiPatterns.size() > 0) {\n throw new RuntimeException(\"<regexp> rules currently cannot be used together with <antipattern>. Rule id: \" + id + \"[\" + subId + \"]\");\n }\n rule = new RegexPatternRule(id, name, message.toString(), shortMessage, suggestionsOutMsg.toString(), language, Pattern.compile(regexStr, flags), regexpMark);\n rule.setSourceFile(sourceFile);\n } else {\n throw new IllegalStateException(\"Neither '<pattern>' tokens nor '<regex>' is set in rule '\" + id + \"'\");\n }\n setRuleFilter(filterClassName, filterArgs, rule);\n prepareRule(rule);\n rules.add(rule);\n } else {\n PatternToken patternToken = elemList.get(numElement);\n if (patternToken.hasOrGroup()) {\n // When creating a new rule, we finally clear the backed-up variables. All the elements in\n // the OR group should share the values of backed-up variables. That's why these variables\n // are backed-up.\n List<Match> suggestionMatchesBackup = new ArrayList<>(suggestionMatches);\n List<Match> suggestionMatchesOutMsgBackup = new ArrayList<>(suggestionMatchesOutMsg);\n int startPosBackup = startPos;\n int endPosBackup = endPos;\n List<DisambiguationPatternRule> ruleAntiPatternsBackup = new ArrayList<>(ruleAntiPatterns);\n for (PatternToken patternTokenOfOrGroup : patternToken.getOrGroup()) {\n List<PatternToken> tmpElements2 = new ArrayList<>();\n tmpElements2.addAll(tmpPatternTokens);\n tmpElements2.add(ObjectUtils.clone(patternTokenOfOrGroup));\n createRules(elemList, tmpElements2, numElement + 1);\n startPos = startPosBackup;\n endPos = endPosBackup;\n suggestionMatches = suggestionMatchesBackup;\n suggestionMatchesOutMsg = suggestionMatchesOutMsgBackup;\n ruleAntiPatterns.addAll(ruleAntiPatternsBackup);\n }\n }\n tmpPatternTokens.add(ObjectUtils.clone(patternToken));\n createRules(elemList, tmpPatternTokens, numElement + 1);\n }\n }", "Set<String> getKeysMatchingPattern(String pattern);", "@Test\r\n\tpublic void testPositiveGenerateStrings_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString[] response = roc.generateStrings(10, 5, \"abcd\", false, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tString[] response2 = roc.generateStrings(10, 5, \"abcd\", false, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\r\n\t\t\t\tresponse = roc.generateStrings(10, 5, \"abcd\", false, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateStrings(10, 5, \"abcd\", false, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "String getRepeatPref();", "public static String findRepetitivePattern(String s) {\n if (s.isEmpty()) {\n return s;\n }\n int n = 0;\n int pLength = 1;\n\n int i = 1;\n char[] arr = s.toCharArray();\n while (i < arr.length) {\n\n boolean patternMatched = true;\n for (int j = 0; j < pLength && i + j < arr.length; ++j) {\n int k = i + j;\n if (k >= arr.length || arr[j] != arr[k]) {\n patternMatched = false;\n break;\n }\n }\n if (patternMatched) {\n n++;\n i += pLength;\n } else {\n i += 1;\n pLength = i;\n n = 0;\n }\n }\n return String.copyValueOf(arr, 0, pLength);\n }", "public boolean useRegisteredSuffixPatternMatch()\n/* */ {\n/* 610 */ return this.registeredSuffixPatternMatch;\n/* */ }", "public String getPattern () {\n return pattern;\n }", "public WildcardPattern(String pattern) {\r\n this.pattern = pattern;\r\n }", "public Integer getVarTrPatternCount( String var ) ;", "public String getPattern() {\n/* 223 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "abstract UrlPatternMatcher create( String pattern );", "public void addResources(Type type, int count) {\n \t\tresources[type.ordinal()] += count;\n \t}", "private Collection<Resource> addMplsLabels(DiscreteResourceId parent) {\n Collection<Resource> resources = new HashSet<>();\n if (!this.availableMplsLabels.isEmpty()) {\n this.availableMplsLabels.forEach(label -> {\n if (label < MplsLabel.MAX_MPLS) {\n resources.add(Resources.discrete(parent).resource().child(MplsLabel.mplsLabel(label)));\n }\n });\n } else {\n for (int i = 1; i < 1000; i++) {\n resources.add(Resources.discrete(parent).resource().child(MplsLabel.mplsLabel(i)));\n }\n }\n return resources;\n }" ]
[ "0.70099646", "0.6625953", "0.63169163", "0.6148779", "0.5754644", "0.5639238", "0.55445486", "0.5432659", "0.54206693", "0.5414246", "0.5296294", "0.5295093", "0.5276571", "0.52438676", "0.5226451", "0.5218071", "0.51119006", "0.5101573", "0.5089008", "0.50751805", "0.5065234", "0.5016512", "0.4994788", "0.49768943", "0.49608874", "0.4956734", "0.4952734", "0.49514166", "0.49476507", "0.49302113", "0.4927134", "0.49221253", "0.4918024", "0.4916311", "0.49160498", "0.49049023", "0.49029514", "0.49018756", "0.48952547", "0.48921287", "0.48769984", "0.4858434", "0.48451757", "0.48370573", "0.48367164", "0.4836393", "0.48252895", "0.48230788", "0.48225492", "0.48159978", "0.4813652", "0.4812962", "0.48045546", "0.47973981", "0.47896555", "0.47867012", "0.47863013", "0.47861162", "0.47803444", "0.47759345", "0.47753447", "0.47727692", "0.47696176", "0.47586226", "0.4757181", "0.4754516", "0.47318324", "0.47311318", "0.47260028", "0.47242457", "0.4722457", "0.47143394", "0.471268", "0.46946365", "0.4693181", "0.46865085", "0.46713135", "0.46705714", "0.46670318", "0.46651998", "0.4662082", "0.466083", "0.46522325", "0.46433812", "0.46361062", "0.4635502", "0.46327454", "0.46326986", "0.46322423", "0.4622697", "0.46226808", "0.46208107", "0.4616491", "0.46151608", "0.46106124", "0.46039984", "0.46020454", "0.4601217", "0.46006212", "0.46003804" ]
0.596186
4
Call the menu class and the show function The show function outputs the menu for the user and allows the user to pick an option and change the picture around
public static void main(String[] args) throws Throwable { System.out.println(); System.out.println("|Please read the README.txt for instructions |"); System.out.println("|Or please follow steps 1 - 4 to generate image |"); System.out.println("|=============================================================|"); System.out.println(); new Menu().show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void show() {\n texturaFondo = new Texture(\"fondoMenu.jpg\");\n\n crearMenu();\n }", "private static void showMenu(){\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"What would you like to do?\");\r\n\t\tSystem.out.println(\"0) Show Shape information\");\r\n\t\tSystem.out.println(\"1) Create Shape\");\r\n\t\tSystem.out.println(\"2) Calculate perimeter\");\r\n\t\tSystem.out.println(\"3) Calculate area\");\r\n\t\tSystem.out.println(\"4) Scale shape\");\r\n\t}", "public void menu() {\n m.add(\"Go adventuring!!\", this::goAdventuring );\n m.add(\"Display information about your character\", this::displayCharacter );\n m.add(\"Visit shop\", this::goShopping);\n m.add (\"Exit game...\", this::exitGame);\n }", "public abstract void displayMenu();", "private void displayMenu() {\r\n System.out.println(\"\\nSelect an option from below:\");\r\n System.out.println(\"\\t1. View current listings\");\r\n System.out.println(\"\\t2. List your vehicle\");\r\n System.out.println(\"\\t3. Remove your listing\");\r\n System.out.println(\"\\t4. Check if you won bid\");\r\n System.out.println(\"\\t5. Save listings file\");\r\n System.out.println(\"\\t6. Exit application\");\r\n\r\n }", "private void displayMenu() {\n\t\tint option = MenuView.getMenuOption(\n\t\t\t\"Welcome \" + movieGoer.getName() + \"!\",\n\t\t\t\"View movie showtimes\",\n\t\t\t\"Book a ticket\",\n\t\t\t\"View movie details\",\n\t\t\t\"List top 5 movies\",\n\t\t\t\"View booking history\",\n\t\t\t\"Exit\"\n\t\t);\n\t\t\n\t\tswitch (option) {\n\t\t\tcase 1:\n\t\t\t\tNavigationController.load(new ShowTimeController());\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\tNavigationController.load(new BookingController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 3:\n\t\t\t\tNavigationController.load(new MovieController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\t\tNavigationController.load(new TopMoviesController());\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 5:\n\t\t\t\tNavigationController.load(new BookingHistoryController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 6:\n\t\t\t\tNavigationController.goBack();\n\t\t\t\tbreak;\n\t\t}\n\t}", "@Override\n public void show() {\n\n skin = new Skin(Gdx.files.internal(\"menu/menu.json\"),new TextureAtlas(\"menu/menu.pack\"));\n\n Image background = new Image(skin, \"menuscreen\");\n background.setPosition(0,0);\n stage.addActor(background);\n\n Image gameOver = new Image(skin,\"gameOver\");\n gameOver.setPosition( ( 800 - 484)/2 , (480 - 345)/2 ) ;\n stage.addActor(gameOver);\n\n Button gameOverSim = new Button(skin,\"gameOverSim\");\n gameOverSim.setPosition(265,100);\n stage.addActor(gameOverSim);\n\n Button gameOverNao = new Button(skin,\"gameOverNao\");\n gameOverNao.setPosition(425,100);\n stage.addActor(gameOverNao);\n\n gameOverSim.addListener(new ClickListener() {\n @Override\n public void clicked(InputEvent event, float x, float y) {\n // TO DO passar o level como parametro no construtor\n selecionado.play();\n ((Game) Gdx.app.getApplicationListener()).setScreen(new PlayScreen(game, level));\n dispose();\n }\n });\n\n gameOverNao.addListener(new ClickListener() {\n @Override\n public void clicked(InputEvent event, float x, float y) {\n selecionado.play();\n ((Game) Gdx.app.getApplicationListener()).setScreen(new MenuScreen(game));\n dispose();\n }\n });\n\n }", "public void displayMenu() {\n \n menuFrame = new JFrame(\"SnakeTrain\");\n menuFrame.setSize(1024, 768);\n menuFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n JPanel menuPanel = new JPanel();\n \n Play.setPreferredSize(new Dimension(250, 100));\n Instructions.setPreferredSize(new Dimension(250, 100));\n Exit.setPreferredSize(new Dimension(250, 100));\n \n Play.addActionListener(this);\n Instructions.addActionListener(this);\n Exit.addActionListener(this);\n \n //c = new JLabel(/*background image*/);\n menuFrame.setLayout(new FlowLayout());\n menuFrame.add(Play);\n menuFrame.add(Instructions);\n menuFrame.add(Exit);\n menuFrame.setVisible(true);\n \n }", "@Override\n\tpublic void showmenu() {\n\t\t\n\t\tint choice;\n \n System.out.println(\"请选择1.查询 2.退出\");\n choice=console.nextInt();\n \n switch (choice){\n \n case 1:\n Menu.searchMenu();\n break;\n default:\n \tSystem.out.println(\"感谢您使用本系统 欢迎下次使用!\");\n System.exit(0);\n }\n \n \n\t}", "private static void showMenu() {\n System.out.println(\"1. Dodaj zadanie\");\n System.out.println(\"2. Wykonaj zadanie.\");\n System.out.println(\"3. Zamknij program\");\n }", "private void menu() { \r\n\t\tSystem.out.println(\" ---------WHAT WOULD YOU LIKE TO DO?---------\");\r\n\t\tSystem.out.println(\"1) Move\");\r\n\t\tSystem.out.println(\"2) Save\");\r\n\t\tSystem.out.println(\"3) Quit\");\r\n\t\t\r\n\t}", "private void displayMenu()\r\n {\r\n System.out.println(\"\\nWelcome to Car Park System\");\r\n System.out.println(\"=============================\");\r\n System.out.println(\"(1)Add a Slot \");\r\n System.out.println(\"(2)Delete a Slot\");\r\n System.out.println(\"(3)List all Slots\");\r\n System.out.println(\"(4)Park a Car\");\r\n System.out.println(\"(5)Find a Car \");\r\n System.out.println(\"(6)Remove a Car\");\r\n System.out.println(\"(7)Exit \");\r\n System.out.println(\"\\nSelect an Option: \");\r\n }", "public void menu()\n {\n System.out.println(\"\\n\\t\\t============================================\");\n System.out.println(\"\\t\\t|| Welcome to the Movie Database ||\");\n System.out.println(\"\\t\\t============================================\");\n System.out.println(\"\\t\\t|| (1) Search Movie ||\");\n System.out.println(\"\\t\\t|| (2) Add Movie ||\");\n System.out.println(\"\\t\\t|| (3) Delete Movie ||\");\n System.out.println(\"\\t\\t|| (4) Display Favourite Movies ||\");\n System.out.println(\"\\t\\t|| (5) Display All Movies ||\");\n System.out.println(\"\\t\\t|| (6) Edit movies' detail ||\");\n System.out.println(\"\\t\\t|| (7) Exit System ||\");\n System.out.println(\"\\t\\t=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n System.out.print( \"\\t\\tPlease insert your option: \");\n }", "void Menu();", "private static void menuSelector(){\r\n\t\tint answer= getNumberAnswer();\r\n\t\tswitch (answer) {\r\n\t\tcase 0:\r\n\t\t\tshowShapeInfo(shapes[0]);\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tcreateShape();\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tSystem.out.println(\"Its Perimeter is equal to: \" +calcShapePerimeter(shapes[0]));\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tSystem.out.println(\"Its Area is equal to: \" +calcShapeArea(shapes[0]));\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tSystem.out.println(\"Provide integer to use for scaling shape: \");\r\n\t\t\tscaleShape(shapes[0], getNumberAnswer());\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"That's not actually an option.\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "private void displayMenu() {\n\t\tSystem.out.println(\"********Loan Approval System***********\");\n\t\tSystem.out.println(\"\\n\");\n\t\tSystem.out.println(\n\t\t\t\t\"Choose the following options:\\n(l)Load Applicaitons\\n(s)Set the Budget\\n(m)Make a decision\\n(p)Print\\n(u)Update the application\");\n\n\t}", "private void displayMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"--------- Main Menu -------------\");\r\n System.out.println(\"(1) Search Cars\");\r\n System.out.println(\"(2) Add Car\");\r\n System.out.println(\"(3) Delete Car\");\r\n System.out.println(\"(4) Exit System\");\r\n System.out.println(\"(5) Edit Cars\");\r\n }", "public static void mainMenu() {\n\t\tStdDraw.setCanvasSize(600, 600);\n\t\tStdDraw.setScale(0, 1000);\n\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\tStdDraw.filledRectangle(500, 500, 1000, 1000);\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tFont font = new Font(\"Sans Serif\", 20, 20);\n\t\tStdDraw.setFont(font);\n\t\tStdDraw.text(500, 850, \"Six Men Morris Game\");\n\t\tStdDraw.text(500, 750, \"Game Created By: \");\n\t\tStdDraw.text(500, 700, \"Phillip Pavlich, Prakhar Jalan, Dinesh Balakrishnan\");\n\t\tStdDraw.filledRectangle(500, 500, 205, 75);\n\t\tStdDraw.filledRectangle(500, 300, 205, 75);\n\t\tStdDraw.filledRectangle(500, 100, 205, 75);\n\t\t\n\t\tStdDraw.setFont();\n\t\tStdDraw.setPenColor(StdDraw.ORANGE);\n\t\tStdDraw.setPenRadius(0.05);\n\n\t\tStdDraw.filledRectangle(500, 500, 200, 70);\n\t\tStdDraw.filledRectangle(500, 300, 200, 70);\n\t\tStdDraw.filledRectangle(500, 100, 200, 70);\n\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tStdDraw.text(500, 500, \"Start New Game\");\n\t\tStdDraw.text(500, 300, \"Continue Game\");\n\t\tStdDraw.text(500, 100, \"Load Saved Game\");\n\t}", "void askMenu();", "public void menu(){\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"<=======|\" + name + \"|=======>\");\n\t\tSystem.out.println(\"------------------------------------------------\");\n\t\tSystem.out.println(\"1 -> Jouer\");\n\t\tSystem.out.println(\"2 -> Creer votre personnage\");\n\t\tSystem.out.println(\"3 -> Charger\");\n\t\tSystem.out.println(\"4 -> Best Score\");\n\t\tSystem.out.println(\"5 -> Instruction\");\n\t\tSystem.out.println(\"6 -> Quitter\");\n\t\tSystem.out.println(\"------------------------------------------------\");\n\t\tint choice = in.nextInt();\n\n\t\t\tswitch (choice){\n\t\t\t\tcase 1:\n\t\t\t\t\tstartPlay();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tcreateChar();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\tchargeGame();\n\t\t\t\tcase 4:\n\t\t\t\t\tSystem.out.print(\" NOM -\");\n\t\t\t\t\tSystem.out.print(\" GENRE -\");\n\t\t\t\t\tSystem.out.print(\" SANTEE -\");\n\t\t\t\t\tSystem.out.print(\" FORCE -\");\n\t\t\t\t\tSystem.out.print(\" ARMES -\");\n\t\t\t\t\tSystem.out.println(\" ARGENT -\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tbdd.dbQuery(\"SELECT * FROM score ORDER BY health DESC\");\n\t\t\t\t\tmenu();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\trules();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\texit();\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Choix non valide\");\n\t\t\t\t\tmenu();\n\t\t\t}\n\t}", "public void openMenu() {\r\n\t\tJFrame current_frame = this;\r\n\t\tContainer content_pane = getContentPane();\r\n\t\ttop_panel = new PicPanel(\"trials.png\");\r\n\t\tmiddle_panel = new PicPanel(\"trials2.png\");\r\n\t\tlower_panel = new PicPanel(\"trials3.png\");\r\n\t\t//add panels to the content pane\r\n\t\tcontent_pane.add(top_panel);\r\n\t\tcontent_pane.add(middle_panel);\r\n\t\tcontent_pane.add(lower_panel);\r\n\t\t//*******\r\n\t\tJLabel control_keys_label = createLabel(\"controlkeys.png\");\r\n\t\tmiddle_panel.add(control_keys_label);\r\n\t\t//****\r\n\t\tJButton return_button = createButton(\"returntomenu.png\");\r\n\t\treturn_button.addActionListener(new ActionListener(){\r\n\t\t public void actionPerformed(ActionEvent e){\r\n\t\t \tcurrent_frame.dispose();\r\n\t\t \tStartMenuScreen start_menu = new StartMenuScreen();\r\n\t\t }\r\n\t\t});\r\n\t\tlower_panel.add(return_button);\r\n\t}", "public void showMenu()\r\n {\r\n System.out.println(\"Enter Truck order: \");\r\n \r\n super.showCommon();\r\n \r\n \r\n super.showMenu(\"What size truck is this? \", SIZE);\r\n \r\n \r\n \r\n \r\n \r\n \r\n super.showMenu(\"What is the engine size of the truck?\", ENGINE_SIZE);\r\n \r\n \r\n \r\n }", "public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\");\n\t\tSystem.out.println(\"\");\n\t}", "@Override\n\tpublic void showContents() {\n\t\tt1.start();\n\t\tif (menuAnimation.title_showing())\n\t\t{\n\t\t\tprogram.add(Play);\n\t\t\tprogram.add(Settings);\n\t\t\tprogram.add(Credits);\n\t\t\tprogram.add(Exit);\n\t\t\tprogram.add(barrel);\n\t\t\tprogram.add(tank);\n\t\t\ttitle.setLocation(30,80);\n\t\t\ttitle.changeTransparent(1);\n\t\t\tprogram.add(title);\n\t\t\tbackground.setImage(\"otherImages/background.png\");\n\t\t\tbackground.setSize(900,620);\n\t\t\tbackground.setLocation(-50,0);\n\t\t\tbg.start();\n\t\t\tbackground.sendToBack();\n\t\t\tprogram.add(background);\n\t\t}\n\t}", "public void userForm(){\n\t\tSystem.out.print(menu);\n\t\tScanner input = new Scanner(System.in);\n\t\tselection = input.nextInt();\n\t\tmenuActions(selection);\n\t\t}", "static void displayMenu(){\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"Select operation:\");\n\t\tSystem.out.println(\"1-List movies\");\n\t\tSystem.out.println(\"2-Show movie details\");\n\t\tSystem.out.println(\"3-Add a movie\");\n\t\tSystem.out.println(\"4-Add an example set of 5 movies\");\n\t\tSystem.out.println(\"5-Exit\");\n\t}", "public static void f_menu() {\n System.out.println(\"----------------------------------------\");\n System.out.println(\"--------------DIGITALSOFT---------------\");\n System.out.println(\"-----version:1.0------28/04/2020.-------\");\n System.out.println(\"-----Angel Manuel Correa Rivera---------\");\n System.out.println(\"----------------------------------------\");\n }", "public void menu() {\n\t\tstate.menu();\n\t}", "public static void f_menu(){\n System.out.println(\"╔══════════════════════╗\");\r\n System.out.println(\"║ SoftAverageHeight ║\");\r\n System.out.println(\"║Version 1.0 20200428 ║\");\r\n System.out.println(\"║Created by:Andres Diaz║\");\r\n System.out.println(\"╚══════════════════════╝\");\r\n\r\n }", "private void displayMenu() {\n System.out.println(\"\\nSelect from:\");\n System.out.println(\"\\t1 -> add item to to-do list\");\n System.out.println(\"\\t2 -> remove item from to-do list\");\n System.out.println(\"\\t3 -> view to-do list\");\n System.out.println(\"\\t4 -> save work room to file\");\n System.out.println(\"\\t5 -> load work room from file\");\n System.out.println(\"\\t6 -> quit\");\n }", "public void branchMenu(int option){\n switch(option){\n case 1:\n System.out.println(\"Starting security view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.SECURITY);\n break;\n case 2:\n System.out.println(\"Starting application view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.APPLICATION);\n break;\n case 3:\n System.out.println(\"Starting manager view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.MANAGER);\n break;\n case 4:\n System.out.println(\"Starting swipe view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.SWIPE);\n break;\n case 5:\n System.out.println(\"Quitting application...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.QUIT);\n break;\n }\n }", "@Override public void doAction(int option)\n {\n switch(option)\n {\n case 1: // create and start a new game\n // display the Game menu\n startNewGame();\n break;\n case 2: // get and start a saved game\n startSavedGame();\n break;\n case 3: // get help menu\n //runs the help menu\n HelpMenuView hmv = new HelpMenuView();\n hmv.displayMenu();\n break;\n case 4: // save game\n displaySaveGameView();\n break;\n case 5:\n System.out.println(\"Thanks for playing ... goodbye.\");\n break; // Fix Invalid Value. \n }\n }", "public FondoMenu () {\r\n\t\tthis.setVisible(true);\r\n\t\timagen = new ImageIcon(getClass().getResource(\"/imagenes/fondoJuego.png\"));\r\n\t}", "public void setMenu() {\n\t \n\t\ttop = new JPanel(new FlowLayout(FlowLayout.LEFT));\n\t add(top, BorderLayout.CENTER);\n\t \n\t lPro = new JLabel(\"Projects: \");\n\t top.add(lPro);\n\t \n\t cPro = new JComboBox();\n\t getProject();\n\t\ttop.add(cPro);\n\t\t\n\t\tview = new JButton(\"View Sample\");\n\t\ttop.add(view);\n\t\t\n\t\tbottom = new JPanel(new FlowLayout(FlowLayout.CENTER));\n\t\tadd(bottom, BorderLayout.SOUTH);\n\t\t\n\t\tcancel = new JButton(\"Cancel\");\n\t\tbottom.add(cancel);\n\t\t\n\t\tdownload = new JButton(\"Download\");\n\t\tbottom.add(download);\n\t\t\n\t\tsetActionListener();\t\n\t}", "public void main_menu()\n\t{\n\t\tSystem.out.println(\"===========================================================\");\n\t\tSystem.out.println(\"Please Select an option\");\n\t\tSystem.out.println(\"===========================================================\");\n\t\tSystem.out.print(\"1.Add 2.Update 3.Delete 4.Exit\\n\");\n\t\tSystem.out.println(\"===========================================================\");\n\t\tchoice=me.nextInt();\n\t\tthis.check_choice(choice);\n\t}", "public void showMenu() {\n\t\tSystem.out.println(\"Please, choose one option!\");\n\t\tSystem.out.println(\"[ 1 ] - Highest Company Capital\");\n\t\tSystem.out.println(\"[ 2 ] - Lowest Company Capital\");\n\t\tSystem.out.println(\"[ 3 ] - Best Investor of the Day\");\n\t\tSystem.out.println(\"[ 4 ] - Worst Investor of the Day\");\n\t\tSystem.out.println(\"[ 0 ] - Exit\");\n\t}", "private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }", "private void displayMenu() {\r\n\t\tif (this.user instanceof Administrator) {\r\n\t\t\tnew AdminMenu(this.database, (Administrator) this.user);\r\n\t\t} else {\r\n\t\t\tnew BorrowerMenu(this.database);\r\n\t\t}\r\n\t}", "static void mainMenu ()\r\n \t{\r\n \t\tfinal byte width = 45; //Menu is 45 characters wide.\r\n \t\tString label [] = {\"Welcome to my RedGame 2 compiler\"};\r\n \t\t\r\n \t\tMenu front = new Menu(label, \"Main Menu\", (byte) width);\r\n \t\t\r\n \t\tMenu systemTests = systemTests(); //Gen a test object.\r\n \t\tMenu settings = settings(); //Gen a setting object.\r\n \t\t\r\n \t\tfront.addOption (systemTests);\r\n \t\tfront.addOption (settings);\r\n \t\t\r\n \t\tfront.select();\r\n \t\t//The program should exit after this menu has returned. CLI-specific\r\n \t\t//exit operations should be here:\r\n \t\t\r\n \t\tprint (\"\\nThank you for using my program.\");\r\n \t}", "public static void displayMenu() {\n while (true) {\n m.display();\n int i = m.choice();\n m.execute1(i);\n }\n }", "protected void printMenu() {\n System.out.println(\"\\nChoose an option:\");\n }", "private void mainMenuDetails() {\r\n try {\r\n System.out.println(\"Enter your choice:\");\r\n int menuOption = option.nextInt();\r\n switch (menuOption) {\r\n case 1:\r\n showFullMenu();\r\n break;\r\n case 2:\r\n empLogin();\r\n break;\r\n case 3:\r\n venLogin();\r\n // sub menu should not be this\r\n break;\r\n case 4:\r\n Runtime.getRuntime().halt(0);\r\n default:\r\n System.out.println(\"Choose either 1,2,3\");\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"enter a valid value\");\r\n }\r\n option.nextLine();\r\n mainMenu();\r\n }", "private void mainMenu() {\r\n System.out.println(\"Please choose an option: \");\r\n System.out.println(\"1. New Player\");\r\n System.out.println(\"2. New VIP Player\");\r\n System.out.println(\"3. Quit\");\r\n }", "public static void mainMenu() \n\t{\n\t\t// display menu\n\t\tSystem.out.print(\"\\nWhat would you like to do?\" +\n\t\t\t\t\"\\n1. Enter a new pizza order (password required)\" +\n\t\t\t\t\"\\n2. Change information of a specific order (password required)\" +\n\t\t\t\t\"\\n3. Display details for all pizzas of a specific size (s/m/l)\" +\n\t\t\t\t\"\\n4. Statistics of today's pizzas\" +\n\t\t\t\t\"\\n5. Quit\" +\n\t\t\t\t\"\\nPlease enter your choice: \");\t\n\t}", "private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }", "public void showOptions()\n {\n //make the options window visible\n optionsScreen.setVisible(true);\n }", "public void showMenu(){\n\t\tSystem.out.println(\"******************************************************\");\n\t\tSystem.out.println(\"************Welcome to the holding program************\");\n\t\tSystem.out.println(\"******************************************************\");\n\t\tint option = -1;\n\t\twhile(option != 0){\n\t\t\tSystem.out.println(\"******************************************************\");\n\t\t\tSystem.out.println(\"***************Please, select an option***************\");\n\t\t\tSystem.out.println(\"******************************************************\");\n\t\t\tSystem.out.println(\"0. To exit of the program\");\n\t\t\tSystem.out.println(\"1. To add a public service company\");\n\t\t\tSystem.out.println(\"2. To add an university company\");\n\t\t\tSystem.out.println(\"3. To add a high school company\");\n\t\t\tSystem.out.println(\"4. To add a technological company\");\n\t\t\tSystem.out.println(\"5. To add a food company\");\n\t\t\tSystem.out.println(\"6. To add a medicine company\");\n\t\t\tSystem.out.println(\"7. Show the information of the holding\");\n\t\t\tSystem.out.println(\"8. Register a poll\");\n\t\t\tSystem.out.println(\"9. To add a employee\");\n\t\t\tSystem.out.println(\"10. Find the extension of a employee\");\n\t\t\tSystem.out.println(\"11. Find the mails of all the employees that are occupied a position\");\n\t\t\tSystem.out.println(\"12. To add a product\");\n\t\t\toption = reader.nextInt();\n\t\t\treader.nextLine();\n\t\t\tswitch(option){\n\t\t\t\tcase 0:\n\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\tpublicService();\n\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\tuniversity();\n\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\thighSchool();\n\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\ttechnological();\n\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\tfood();\n\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\tmedicine();\n\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\tSystem.out.println(theHolding.wholeInformation());\n\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\tregisterPoll();\n\t\t\t\tbreak;\n\t\t\t\tcase 9:\n\t\t\t\taddEmployee();\n\t\t\t\tbreak;\n\t\t\t\tcase 10:\n\t\t\t\textensionEmployee();\n\t\t\t\tbreak;\n\t\t\t\tcase 11:\n\t\t\t\tmailsPosition();\n\t\t\t\tbreak;\n\t\t\t\tcase 12:\n\t\t\t\taddProduct();\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Select a correct option\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public Menu() {\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tMenu.setAlwaysOnTop(true);\r\n\t\tMenu.setBackground(Color.LIGHT_GRAY);\r\n\t\tMenu.setResizable(false);\r\n\t\t\r\n\t\tMenu.setIconImage(Toolkit.getDefaultToolkit().getImage(Menu.class.getResource(\"/images/iconoTT.png\")));\r\n\t\t\r\n\t\tMenu.setTitle(\"TText v1.0\");\r\n\t\tMenu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tMenu.setBounds(100, 100, 405, 293);\r\n\t\t\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBackground(Color.DARK_GRAY);\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tcontentPane.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\tMenu.setContentPane(contentPane);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\t\r\n\t\tpanel.setBackground(Color.DARK_GRAY);\r\n\t\tcontentPane.add(panel, BorderLayout.CENTER);\r\n\t\tpanel.setLayout(null);\r\n\t\t\r\n\t\tJButton btnNewFile = new JButton(\"\");\r\n\t\tbtnNewFile.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tfunc.NewFile(Menu);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tbtnNewFile.setToolTipText(\"New file...\");\r\n\t\tbtnNewFile.setIcon(new ImageIcon(Menu.class.getResource(\"/images/new_document.png\")));\r\n\t\tbtnNewFile.setBounds(72, 35, 42, 51);\r\n\t\tpanel.add(btnNewFile);\r\n\t\t\r\n\t\tJButton Button_OpenFile = new JButton(\"\");\r\n\t\tButton_OpenFile.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tfunc.OpenFileIni(Menu);\r\n\t\t\t}\r\n\t\t});\r\n\t\tButton_OpenFile.setToolTipText(\"Open file...\");\r\n\t\tButton_OpenFile.setIcon(new ImageIcon(Menu.class.getResource(\"/images/open_document.png\")));\r\n\t\tButton_OpenFile.setBounds(276, 35, 62, 51);\r\n\t\tpanel.add(Button_OpenFile);\r\n\t\t\r\n\t\tJLabel label = new JLabel(\"\");\r\n\t\tlabel.setToolTipText(\"Menu\");\r\n\t\tlabel.setBounds(0, 0, 389, 255);\r\n\t\tlabel.setIcon(new ImageIcon(Menu.class.getResource(\"/images/home.png\")));\r\n\t\tpanel.add(label);\r\n\t\t\r\n\t\tImageIcon background = new ImageIcon(Menu.class.getResource(\"/images/home.png\"));\r\n\t\t\r\n\t\tMenu.setVisible(true);\r\n\t}", "public Menu() {\n initComponents();\n getContentPane().setBackground(Color.WHITE);\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(messageIcons.getFrameIcon())));\n Customer_Panel.setVisible(false);\n Employee_Panel.setVisible(false);\n Report_Panel.setVisible(false);\n Report_Summary.setVisible(false);\n }", "public menu(){\n\t\tsuper(\"Panter Map!\"); //setTitle(\"Map Counter\"); // \"super\" Frame sets its title\n\t\tthis.setBounds(0,0,getWidth(),getHeight()); //setSize(1433,700); // \"super\" Frame sets its initial window size\n\t\t// Exit the program when the close-window button clicked\n\t\ttry {\n\t\t\tString path = \"Ariel.jpg\";\n\t\t\tif(!path.endsWith(\"jpg\") && !path.endsWith(\"png\")) {\n\t\t\t\tthrow new IOException(\"Can't read input file!\");\n\t\t\t}\n\t\t\tthis.image =ImageIO.read(new File(path));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\n\t\t//cf = new ConvertFactory(this.getImg());\n\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t//\tpack();\n\n\t\tgame =new Game();\n\t\topenFileChosser= new JFileChooser();\n\t\topenFileChosser.setCurrentDirectory(new File(\"C:\\\\Users\\\\n&e\\\\eclipse-workspace\\\\second_year\\\\GeoLnfo_System\\\\csvFile\"));\n\t\t//openFileChosser.setFileFilter(new FileNameExtensionFilter(\"csv\"));\n\t\t//map=new Map();\n\t\t//this.image=map.getImg();\n\t}", "@Override\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t\tsplash.setVisible(false);\n\t\t\t\t\t\t\tKabasuji game = new Kabasuji();\n\t\t\t\t\t\t\tLevelSelectorView window = new LevelSelectorView(game);\n\n\t\t\t\t\t\t\t// allow controller to set up GUI based on the levels loaded by 'game'\n\t\t\t\t\t\t\tStartLevelSelectorController selectorController = new StartLevelSelectorController(window, game);\n\t\t\t\t\t\t\tselectorController.process();\n\n\t\t\t\t\t\t\t// show window\n\t\t\t\t\t\t\twindow.setVisible(true);\n\t\t\t\t\t\t\tImageIcon image = new ImageIcon(StartKabasuji.class.getResource(\"/images/heineman.jpg\"));\n\t\t\t\t\t\t\twindow.setIconImage(image.getImage().getScaledInstance(40, 40, 0));\n\t\t\t\t\t\t\tSystem.out.println(image);\t\n\t\t\t\t\t\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}", "public void showMenu() {\n menuController.showMenuPanel();\n }", "public static void f_menu(){\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n System.out.println(\"_/_/_/_/_/_/softvectorwhith/_/_/_/_/_/_/\");\n System.out.println(\"/_/_/_/version 1.0 2020-oct-29_/_/_/_/_/\");\n System.out.println(\"/_/maked by Andres Felipe Torres Lopez_/\");\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n }", "static void listerMenu() {\n System.out.println(\n \"-------------------------------------\\n\" +\n \"Saisir une option :\\n\" +\n \"1 : Liste des hôtes\\n\" +\n \"2 : Liste des logements\\n\" +\n \"3 : Liste des voyageurs\\n\" +\n \"4 : Liste des réservations\\n\" +\n \"5 : Fermer le programme\"\n );\n switch (Menu.choix(5)) {\n case 1:\n GestionHotes.listerHotes();\n break;\n case 2:\n GestionLogements.listerLogements();\n break;\n case 3:\n GestionVoyageurs.listerVoyageurs();\n break;\n case 4:\n GestionReservations.listerReservations();\n break;\n case 5:\n System.exit(0);\n break;\n }\n }", "private void displayEditMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"--------- Edit Menu ------------\");\r\n System.out.println(\"(1) Edit Car Colour\");\r\n System.out.println(\"(2) Edit Car Price\");\r\n System.out.println(\"(3) Back to Main Menu\");\r\n }", "private void renderMenu() {\n StdDraw.setCanvasSize(START_WIDTH * TILE_SIZE, START_HEIGHT * TILE_SIZE);\n Font font = new Font(\"Monaco\", Font.BOLD, 20);\n StdDraw.setFont(font);\n StdDraw.setXscale(0, START_WIDTH );\n StdDraw.setYscale(0, START_HEIGHT );\n StdDraw.clear(Color.BLACK);\n StdDraw.setPenColor(Color.WHITE);\n StdDraw.enableDoubleBuffering();\n StdDraw.text(START_WIDTH / 2, START_HEIGHT * 2 / 3, \"CS61B The Game\");\n StdDraw.text(START_WIDTH / 2, START_HEIGHT / 2 + 2, \"New Game (N)\");\n StdDraw.text(START_WIDTH / 2, START_HEIGHT / 2, \"Load Game (L)\");\n StdDraw.text(START_WIDTH / 2, START_HEIGHT / 2 - 2 , \"Quit (Q)\");\n StdDraw.show();\n }", "public void display() {\n push();\n noStroke();\n\n // creates the Box around the menus\n fill(backgroundColor); // light grey\n rect(0, 0, sidebarWidth, height);\n\n // for loops that draws each scenes icon\n for (int i = 0; i < sceneAmount; i++) {\n\n //checks the for loop has reach the icon for the current scene\n if (i == scene) {\n push();\n\n // Draws a rectancle in the place where the icon is gonna be\n fill(chosenColor); // light blue color\n rect(0, (i * height / sceneAmount ), sidebarWidth, height / sceneAmount);\n pop();\n }\n \n\n // Draws the icons one after the others with a determined distance between them\n image(sidebarLogos[i], 0, (i * height / sceneAmount ), sidebarWidth, height / sceneAmount);\n\n // if chosen scene draws glow effect ontop\n if (i == scene) {\n image(glow, 0, (i * height / sceneAmount ), sidebarWidth, height / sceneAmount);\n }\n }\n\n // draws shadow image ontop of all the icons\n image(shadow, 0, 0);\n pop();\n }", "private void menuSetup()\n {\n menuChoices = new String []\n {\n \"Add a new product\",\n \"Remove a product\",\n \"Rename a product\",\n \"Print all products\",\n \"Deliver a product\",\n \"Sell a product\",\n \"Search for a product\",\n \"Find low-stock products\",\n \"Restock low-stock products\",\n \"Quit the program\" \n };\n }", "private void mainMenuDetails() {\n try {\n System.out.println(\"Enter your choice:\");\n final int menuOption = option.nextInt();\n switch (menuOption) {\n case 1:\n showFullMenu();\n break;\n case 2:\n acceptRejectResponse();\n break;\n case 3:\n placeOrder();\n break;\n case 4:\n showFullOrder();\n break;\n case 5:\n Runtime.getRuntime().halt(0);\n default:\n System.out.println(\"Choose either 1 or 2\");\n }\n } catch (final Exception e) {\n e.printStackTrace();\n System.out.println(\"enter a valid value\");\n }\n option.nextLine();\n mainMenu();\n }", "public StartMenu(){\n\t\tmenu.setTitle(\"COP4331 Spring '14 - Battle Ship!\");\n\t\t\n\t\t//startGame JButton will begin a new game\n\t\tstartEasyGame = new JButton(\"Start Easy Game\");\n\t\tstartEasyGame.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tsetSkill(0);\n\t\t\t\tplay = true;\n\t\t\t}\n\t\t});\n\t\t\n\t\tstartAdvancedGame = new JButton(\"Start Advanced Game\");\n\t\tstartAdvancedGame.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tsetSkill(1);\n\t\t\t\tplay = true;\n\t\t\t}\n\t\t});\n\t\t\n\t\t\t\n\t\t//exitGame JButton will end the program\n\t\texitGame = new JButton(\"Exit Game\");\n\t\texitGame.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0){\n\t\t\t\tclose = true;\n\t\t\t}\n\t\t});\n\t\t\n\t\tmenu.add(startEasyGame);\n\t\tmenu.add(startAdvancedGame);\n\t\tmenu.add(exitGame);\t\t\n\t}", "private void loadGUI() {\n JMenuItem tmp;\n Font font = new Font(\"Arial\", Font.ITALIC, 10);\n \n // Project menu\n projectMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Selected project\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n projectMenu.add(tmp);\n projectMenu.addSeparator();\n \n properties = new JMenuItem(\"Properties\");\n properties.addActionListener(this);\n projectMenu.add(properties);\n \n reimport = new JMenuItem(\"Re-Import Files\");\n reimport.addActionListener(this);\n projectMenu.add(reimport);\n \n removeProject = new JMenuItem(\"Remove project\");\n removeProject.addActionListener(this);\n projectMenu.add(removeProject);\n \n // Directory menu\n dirMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Selected directory\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n dirMenu.add(tmp);\n dirMenu.addSeparator();\n \n removeDir = new JMenuItem(\"Remove from project\");\n removeDir.addActionListener(this);\n dirMenu.add(removeDir);\n \n deleteDir = new JMenuItem(\"Delete from disk\");\n deleteDir.addActionListener(this);\n dirMenu.add(deleteDir);\n \n renameDir = new JMenuItem(\"Rename\");\n renameDir.addActionListener(this);\n dirMenu.add(renameDir);\n \n // File menu\n fileMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Selected file\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n fileMenu.add(tmp);\n fileMenu.addSeparator();\n \n removeFile = new JMenuItem(\"Remove from project\");\n removeFile.addActionListener(this);\n fileMenu.add(removeFile);\n \n deleteFile = new JMenuItem(\"Delete from disk\");\n deleteFile.addActionListener(this);\n fileMenu.add(deleteFile);\n \n renameFile = new JMenuItem(\"Rename\");\n renameFile.addActionListener(this);\n fileMenu.add(renameFile);\n\t\n\t // sutter2k: need to tap in here for preview in browser\n miLaunchBrowser= new JMenuItem(\"Preview in Browser\");\n miLaunchBrowser.addActionListener(this);\n fileMenu.add(miLaunchBrowser);\n\t\n // Menu to show when multiple nodes are selected\n multipleSelMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Multiple selection\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n multipleSelMenu.add(tmp);\n multipleSelMenu.addSeparator();\n \n removeMulti = new JMenuItem(\"Remove from project\");\n removeMulti.addActionListener(this);\n multipleSelMenu.add(removeMulti);\n \n deleteMulti = new JMenuItem(\"Delete from disk\");\n deleteMulti.addActionListener(this);\n multipleSelMenu.add(deleteMulti);\n \n }", "public void menuDisplay() {\n\t\t\n\t\tjava.lang.System.out.println(\"\");\n\t\tjava.lang.System.out.println(\"~~~~~~~~~~~~Display System Menu~~~~~~~~~~~~\");\n\t\tjava.lang.System.out.println(\"**** Enter a Number from the Options Below ****\");\n\t\tjava.lang.System.out.println(\"Choice 1 – Print System Details\\n\" + \n\t\t\t\t\t\t \"Choice 2 - Display System Properties\\n\" +\n\t\t\t\t\t\t \"Choice 3 – Diagnose System\\n\" + \n\t\t\t\t\t\t \"Choice 4 – Set Details\\n\" + \n\t\t\t\t\t\t \"Choice 5 – Quit the program\");\n\t\t\n\t}", "private void use() {\n switch (choices.get(selection)) {\n case INFO : { \n AbstractInMenu newMenu = new ItemInfo(sourceMenu, item);\n this.sourceMenu.setMenu(newMenu);\n newMenu.setVisible(true);\n } break;\n case USE : {\n entity.use(item); \n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case EQUIP : {\n entity.equip(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case ACTIVE : {\n entity.setActiveItem(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case UNEQUIP : {\n entity.equip(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case UNACTIVE : {\n entity.setActiveItem(null);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case DROP : {\n entity.drop(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break; \n case PLACE : {\n entity.placeItem(item);\n entity.removeItem(item); \n sourceMenu.activate();\n sourceMenu.setState(true); \n } break;\n case CLOSE : { \n sourceMenu.activate();\n } break;\n case DESTROY : {\n entity.removeItem(item);\n sourceMenu.activate();\n sourceMenu.setState(true); \n } break;\n }\n }", "private void printMenu() {\n\t\tSystem.out.printf(\"\\n********** MiRide System Menu **********\\n\\n\");\n\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Create Car\", \"CC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Book Car\", \"BC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Complete Booking\", \"CB\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Display ALL Cars\", \"DA\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Search Specific Car\", \"SS\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Search Available Cars\", \"SA\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Seed Data\", \"SD\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Load Cars\", \"LC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Exit Program\", \"EX\");\n\t\tSystem.out.println(\"\\nEnter your selection: \");\n\t\tSystem.out.println(\"(Hit enter to cancel any operation)\");\n\t}", "public static void startMenu() {\n\t\tSystem.out.println(\"|**********************************|\");\n\t\tSystem.out.println(\"| |\");\n\t\tSystem.out.println(\"| Welcome to the Anny BankingApp! |\");\n\t\tSystem.out.println(\"| |\");\n\t\tSystem.out.println(\"************************************\");\n\n\t\tSystem.out.println(\"Please select your option:\");\n\t\tSystem.out.println(\"\\t[c]reate a new Account\");\n\t\tSystem.out.println(\"\\t[l]ogin to Your Account!\");\n\t\tSystem.out.println(\"\\t[a]dmin Menu\");\n\t\tSystem.out.println(\"\\t[e]mployee Menu\");\n\t\tSystem.out.println(\"\\t[o]Log Out\");\n\n\t\t//create variable to grab the input\n\t\tString option =scan.nextLine();\n\n\n\t\t//this switch case will based on chioce the users made////can be lowercase or uppercase letter\n\n\t\tswitch(option.toLowerCase()) {\n\t\tcase \"c\":\n\t\t\tcreateNewAccount();\n\t\t\tbreak;\n\t\tcase \"l\":\n\t\t\tloginToAccount();\n\t\t\t\n\t\t\tbreak;\n\t\tcase \"a\":\n\t\t\tadminMenu();\n\t\t\tbreak;\n\t\tcase \"e\":\n\t\t\temployeeMenu();\n\t\t\tbreak;\n\t\tcase \"o\":\n\t\t\tSystem.out.println(\"You Successfully logged out, back to main menu!!!\");\n\t\t\tstartMenu();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Try again\");\n\t\t\tstartMenu();//Return to startmenu if choice not match\n\t\t\tbreak;\n\t\t}\n\n\t}", "public void initMenu() {\n\t\t\r\n\t\treturnToGame = new JButton(\"Return to Game\");\r\n\t\treturnToGame.setBounds(900, 900, 0, 0);\r\n\t\treturnToGame.setBackground(Color.BLACK);\r\n\t\treturnToGame.setForeground(Color.WHITE);\r\n\t\treturnToGame.setVisible(false);\r\n\t\treturnToGame.addActionListener(this);\r\n\t\t\r\n\t\treturnToStart = new JButton(\"Main Menu\");\r\n\t\treturnToStart.setBounds(900, 900, 0, 0);\r\n\t\treturnToStart.setBackground(Color.BLACK);\r\n\t\treturnToStart.setForeground(Color.WHITE);\r\n\t\treturnToStart.setVisible(false);\r\n\t\treturnToStart.addActionListener(this);\r\n\t\t\r\n\t\t//add(menubackground);\r\n\t\tadd(returnToGame);\r\n\t\tadd(returnToStart);\r\n\t}", "public OptionsMenu() {\n\t\tsuper(OPTIONS_WINDOW_TITLE);\n\t\tQ = new Quoridor();\n\t\tinitialize();\n\t\tsetVisible(true);\n\t}", "public ClassMaker(MenuLanguage ml, String Image, JTextArea textArea, JMenu menu)\r\n {\r\n f=this;\r\n img2 = Image;\r\n area = textArea;\r\n changeMenu = menu; \r\n this.ml = ml;\r\n labels = ml.getTrainingSetMakerLabels();\r\n \r\n try\r\n {\r\n jbInit();\r\n }\r\n catch(Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n this.show(); \r\n }", "@Override\n public void show() {\n MenuMusic.play();\n MenuMusic.setLooping(true);\n MenuMusic.setVolume(0.4f);\n }", "public Menu() { //Menu pannel constructor\n\t\tmenuBar = new JMenuBar();\n\t\tmenu = new JMenu(\"Menu\");\n\t\tabout = new JMenu(\"About\");\n\t\tabout.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Ragnarock Web Browser 2017\\nIvan Mykolenko\\u00AE\", \"About\",\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\thistory = new JMenu(\"History\");\n\t\thistory.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tcreateList(\"history\");\n\t\t\t\taddBackButton();\n\t\t\t\tuserViewPort.add(new JScrollPane(list), \"History\");\n\t\t\t\tlayer.show(userViewPort, \"History\");\n\t\t\t\tmenuBar.remove(removeButton);\n\t\t\t\tmenuBar.revalidate();\n\t\t\t\tviewMode = 2;\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\tbookmarks = new JMenu(\"Bookmarks\");\n\t\tbookmarks.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tcreateList(\"bookmarks\");\n\t\t\t\taddBackButton();\n\t\t\t\tuserViewPort.add(new JScrollPane(list), \"Bookmarks\");\n\t\t\t\tlayer.show(userViewPort, \"Bookmarks\");\n\t\t\t\tmenuBar.remove(removeButton);\n\t\t\t\tmenuBar.revalidate();\n\t\t\t\tviewMode = 3;\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\tsettingsMenuItem = new JMenuItem(\"Settings\", KeyEvent.VK_X);\n\t\tsettingsMenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tcreateSettings();\n\t\t\t\tsettings.setVisible(true);\n\t\t\t}\n\t\t});\n\t\texitMenuItem = new JMenuItem(\"Exit\");\n\t\texitMenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\t\tbackButton = new JButton(\"Back\");\n\t\tremoveButton = new JButton(\"Remove\");\n\t\tmenu.add(settingsMenuItem);\n\t\tmenu.add(exitMenuItem);\n\t\tmenuBar.add(menu);\n\t\tmenuBar.add(history);\n\t\tmenuBar.add(bookmarks);\n\t\tmenuBar.add(about);\n\t\tmenuBar.add(Box.createHorizontalGlue()); // Changing backButton's alignment to right\n\t\tsettings = new JDialog();\n\t\tadd(menuBar);\n\t\tsaveButton = new JButton(\"Save\");\n\t\tclearHistory = new JButton(\"Clear History\");\n\t\tclearBookmarks = new JButton(\"Clear Bookmarks\");\n\t\tbuttonsPanel = new JPanel();\n\t\tpanel = new JPanel();\n\t\turlField = new JTextField(15);\n\t\tedit = new JLabel(\"Edit Homepage:\");\n\t\tviewMode = 1;\n\t\tlistModel = new DefaultListModel<String>();\n\t\tlist = new JList<String>(listModel);\n\t\tlist.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);\n\t\tlist.setLayoutOrientation(JList.VERTICAL);\n\t}", "public static void menu()\r\n {\n\t\t Scanner scan = new Scanner(System.in);\r\n\t\t System.out.println(\"Please enter your choice : \");\r\n\t\t int choice = scan.nextInt();\r\n\t\t switch(choice)\r\n\t\t {\r\n\t\t case 1:\r\n\t\t\t viewFiles();\r\n\t\t\t goback();\r\n\t\t\t break;\r\n\t\t case 2: \r\n\t\t\t createNew();\r\n\t\t\t goback();\r\n\t\t\t break;\r\n\t\t case 3: \r\n\t\t\t searchFile();\r\n\t\t\t goback();\r\n\t\t\t break;\r\n\t\t case 4: \r\n\t\t deleteFile();\r\n\t\t goback();\r\n\t\t break;\r\n\t\t case 5: \r\n\t\t\t exit();\r\n\t\t\t goback();\r\n\t\t\t break;\r\n\t\t \r\n\t\t default :\r\n\t\t\t System.out.println(\"please enter a only 1,2,3 or 4\");\r\n\t\t\t goback();\r\n\t }\r\n\t }", "private void initMenu() {\n\t\tloadImage();\r\n\t\t// Add listeners to buttons\r\n\t\tstartGame.addActionListener(new StartGameListener());\r\n\t\texitGame.addActionListener(new ExitGameListener());\r\n\t\t// Setting buttons in the middle of the screen\r\n\t\tsetLayout(new GridBagLayout());\r\n\t\tGridBagConstraints gbc = new GridBagConstraints();\r\n\t\tgbc.gridx = 0;\r\n\t\tgbc.gridy = 0;\r\n\t\tadd(startGame, gbc);\r\n\r\n\t\tgbc.gridx = 0;\r\n\t\tgbc.gridy = 1;\r\n\t\t// Resize \"exitGame\" button to \"startGame\" button size\r\n\t\texitGame.setPreferredSize(startGame.getPreferredSize());\r\n\t\t// Set insets between two buttons in 100 px\r\n\t\tgbc.insets = new Insets(100, 0, 0, 0);\r\n\t\tadd(exitGame, gbc);\r\n\t}", "public void displayMenu()\n {\n System.out.println(\"-----------------Welcome to 256 Game------------------\");\n System.out.println(\"press 1 to register a player\");\n System.out.println(\"press 2 to start a new game\");\n System.out.println(\"press 3 to view a help menu\");\n System.out.println(\"press 4 to exist\");\n System.out.println(\"------------------------------------------------------\");\n }", "public Menu() {\n initComponents();\n setResizable(false);\n \n selectInsc.setVisible(false);\n selectCarrera.setVisible(false);\n selectCursado.setVisible(false);\n selectInsc.setVisible(false);\n selectMat.setVisible(false);\n selectProf.setVisible(false);\n\n }", "public static void displayMenu(){\n //*Displays the Menu\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"Food Item\", \"Size\", \"Options\", \"Price\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"---------\", \"----\", \"-------\", \"-----\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"Drink\", \"S,M,L\", \"Sprite, Rootbeer, and Orange Fanta\", \"$5.50 for small, +$.50 for each size increase\\n\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"Burger\", \"N/A\", \"Extra Patty, bacon, cheese, lettuce\", \"$3.00 for a burger, +$.50 for additional toppings\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"\", \"\", \"tomato, pickles, onions\", \"\\n\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"Pizza\", \"S,M,L\", \"Pepperoni, sausage, peppers, chicken\", \"$5.00 for small, +$2.50 for each size increase,\" );\n System.out.printf( \"%-15s%-10s%-40s%-5s\\n\", \"\", \"\", \"salami, tomatoes, olives, anchovies\", \"+$1.00 for each extra topping\" );\n }", "private void goToMenu() {\n game.setScreen(new MainMenuScreen(game));\n\n }", "public startingMenu() {\r\n initComponents();\r\n }", "private void goToMenu() {\n\t\tgame.setScreen(new MainMenuScreen(game));\n\n\t}", "private static void mostrarMenu() {\n\t\tSystem.out.println(\"AVAILABLE ORDERS\");\n\t\tSystem.out.println(\"================\");\n\t\tSystem.out\n\t\t\t\t.println(\"HELP - shows information on \" +\n\t\t\t\t\t\t\"available orders\");\n\t\tSystem.out\n\t\t\t\t.println(\"DIR - displays the content \" +\n\t\t\t\t\t\t\"of current directory\");\n\t\tSystem.out\n\t\t .println(\"DIRGALL - displays the content\" +\n\t\t\t\t \" of current directory\");\n System.out\n\t\t .println(\" and all its internal\" +\n\t\t\t\t \" subdirectories\"); \t\t\n\t\tSystem.out\n\t\t\t\t.println(\"CD dir - changes the current \" +\n\t\t\t\t\t\t\"directory to its subdirectory [dir]\");\n\t\tSystem.out\n\t\t\t\t.println(\"CD .. - changes the current \" +\n\t\t\t\t\t\t\"directory to its father directory\");\n\t\tSystem.out\n\t\t\t\t.println(\"WHERE - shows the path and name \" +\n\t\t\t\t\t\t\"of current directory\");\n\t\tSystem.out\n\t\t\t\t.println(\"FIND text - shows all the images \" +\n\t\t\t\t\t\t\"whose name includes [text]\");\n\t\tSystem.out\n\t\t\t\t.println(\"DEL text - information and delete \" +\n\t\t\t\t\t\t\"a picture named [text] of current \" +\n\t\t\t\t\t\t\"directory\");\n\t\tSystem.out\n\t\t\t\t.println(\"MOVE text - move an image named \" +\n\t\t\t\t\t\t\"[text] to another directory\");\n\t\tSystem.out\n\t\t\t\t.println(\"IMG time - displays a carousel \" +\n\t\t\t\t\t\t\"with the images in current directory;\");\n\t\tSystem.out\n\t\t\t\t.println(\" each image is displayed\" +\n\t\t\t\t\t\t\" [time] seconds\");\n\t\tSystem.out\n\t\t\t\t.println(\"IMGALL time - displays a carousel with\" +\n\t\t\t\t\t\t\" the images in current directory;\");\n\t\tSystem.out\n\t\t\t\t.println(\" and in all its internal\" +\n\t\t\t\t\t\t\" subdirectories; each image is\");\n\t\tSystem.out.println(\" displayed [time] \" +\n\t\t\t\t\"seconds\");\n\t\tSystem.out.println(\"BIGIMG - displays the bigest image int the current\" +\n\t\t\t\t\"directory\");\n\t\tSystem.out.println(\"END - ends of program \" +\n\t\t\t\t\"execution\");\n\t}", "private void paintMenu(){ \n\t\t\n\t\t//Idee: Vllt. lieber Menü auf unsichtbar setzen und immer wieder anzeigen, wenn benötigt? Vllt. auch praktisch für Pause...Aber was mit entsprechenden Labels?\n\t\tif(spiel_status == 3){ //Spiel noch gar nicht gestartet\n\t\t\tframe3 = new JFrame(\"Spiel starten?\");\n\t\t\tframe3.setLocation(650,300);\n\t\t\tframe3.setSize(100, 100);\n\t\t\tJButton b1 = new JButton(\"Einzelspieler\");\n\t\t\tb1.setMnemonic(KeyEvent.VK_ENTER);//Shortcut Enter\n\t\t\tJButton b2 = new JButton(\"Beenden\");\n\t\t\tb2.setMnemonic(KeyEvent.VK_ESCAPE);//Shortcut Escape\n\t\t\tJButton b3 = new JButton(\"Mehrspieler\");\n\t\t\tJButton b4 = new JButton(\"Einstellungen\");\n\t\t\tJButton b5 = new JButton(\"Handbuch\");\n\t\t\t\n\t\t\t//Neues Layout. 4 Zeilen, 1 Spalte. \n\t\t\tframe3.setLayout(new GridLayout(5,1));\n\t\t\tframe3.add(b1);\n\t\t\tframe3.add(b3);\n\t\t\tframe3.add(b4);\n\t\t\tframe3.add(b5);\n\t\t\tframe3.add(b2);\n\n\t\t\tframe3.pack();\n\t\t\tframe3.setVisible(true);\n\t\t\t\n\t\t\t\n\t\t\tb1.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0){\n\t\t\t\t\tsingleplayer = true;\n\t\t\t\t\tdoInitializations(frame3);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t\tb2.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\tb3.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\t\tmultiplayer = true;\n\t\t\t\t\tpaintNetworkMenu();\n\t\t\t\t}\n\t\t\t});\t\t\t\n\t\t\t\n\t\t\tb4.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\t\tpaintSettingMenu();\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tb5.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tRuntime.getRuntime().exec(\"rundll32 url.dll,FileProtocolHandler \"+ \"resources\\\\handbuch\\\\Handbuch.pdf\");\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t}\n\t\t\n\t\tif(spiel_status == 1|| spiel_status == 0){ //Wenn Spiel gewonnen oder verloren\n//\t\t\tif (!multiplayer){\n\t\t\t\tframe2 = new JFrame(\"Neues Einzelspielerspiel?\");\n\t\t\t\tframe2.setLocation(500,300);\n\t\t\t\tframe2.setSize(100, 100);\n\t\t\t\tJLabel label;\n\t\t\t\tif(spiel_status == 1){\n\t\t\t\t\tlabel = new JLabel(\"Bravo, du hast gewonnen! Neues Einzelspielerspiel?\");\n\t\t\t\t}else{\n\t\t\t\t\tif(player.getLifes() == 0){\n\t\t\t\t\t\tlabel = new JLabel(\"Schade, du hast verloren! Neues Einzelspielerspiel?\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tlabel = new JLabel(\"Du hast gewonnen! Neues Einzelspielerspiel?\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tframe2.add(BorderLayout.NORTH, label);\n\t\t\t\tJButton b1 = new JButton(\"Neues Einzelspielerspiel\");\n\t\t\t\tb1.setMnemonic(KeyEvent.VK_ENTER);//Shortcut Enter\n\t\t\t\tb1.addActionListener(new ActionListener(){\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0){ //bzgl. Starten\n\t\t\t\t\t\tsoundlib.stopLoopingSound();\n\t\t\t\t\t\tdoInitializations(frame2);\n\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tJButton b2 = new JButton(\"Zurück zum Hauptmenü\");\n\t\t\t\tb2.setMnemonic(KeyEvent.VK_ESCAPE);//Shortcut Escape\n\t\t\t\tb2.addActionListener(new ActionListener(){\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\t\t\tsoundlib.stopLoopingSound();\n\t\t\t\t\t\tspiel_status=3;\n\t\t\t\t\t\tpaintMenu();\n\t\t\t\t\t\tframe2.setVisible(false);\n\t\t\t\t\t\t\n\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\t\t\t\tframe2.add(BorderLayout.CENTER, b1);\n\t\t\t\tframe2.add(BorderLayout.SOUTH, b2);\n\t\t\t\tframe2.pack();\n\t\t\t\tframe2.setVisible(true);\n\t\t\t\tspiel_status = 0;\n\t\t\t}\n//\t\t}else{\n//\t\t\tframe2 = new JFrame(\"Ende\");\n//\t\t\tframe2.setLocation(500,300);\n//\t\t\tframe2.setSize(100, 100);\n//\t\t\tJLabel label;\n//\t\t\tif(player.getLifes() == 0){\n//\t\t\t\tlabel = new JLabel(\"Du Lusche hast verloren!\");\n//\t\t\t}else{\n//\t\t\t\tlabel = new JLabel(\"Boom-Headshot! Du hast gewonnen!\");\n//\t\t\t}\n//\t\t\t\n//\t\t\tframe2.add(BorderLayout.NORTH, label);\n//\t\t\t\n//\t\t\tJButton b2 = new JButton(\"Zurück zum Hauptmenü\");\n//\t\t\tb2.setMnemonic(KeyEvent.VK_ESCAPE);//Shortcut Escape\n//\t\t\tb2.addActionListener(new ActionListener(){\n//\t\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n//\t\t\t\t\tif(sound_running){\n//\t\t\t\t\t\tsoundlib.stopLoopingSound();\n//\t\t\t\t\t}\n//\t\t\t\t\tspiel_status=3;\n//\t\t\t\t\tpaintMenu();\n//\t\t\t\t\tframe2.setVisible(false);\n//\t\t\t\t\tframe2.dispose();\n//\t\t\t\t\t\n//\t\t\t\n//\t\t\t\t\t\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t});\n//\t\t\tframe2.add(BorderLayout.CENTER, b2);\n//\t\t\tframe2.pack();\n//\t\t\tframe2.setVisible(true);\n//\t\t\tspiel_status = 0;\n//\t\t}\n\t\tspiel_status = 0; // Daraus folgt, dass wenn man das Spiel per ESC-taste verlässt, man verliert.\n\t\t\n\t}", "public Menu() {\n initComponents();\n setSize(822, 539);\n setLocationRelativeTo(this);\n setVisible(true);\n }", "private void designGUI() {\n\t\tmnb= new JMenuBar();\r\n\t\tFileMenu=new JMenu(\"file\");\r\n\t\tEditMenu=new JMenu(\"edit\");\r\n\t\timg1=new ImageIcon(\"s.gif\");\r\n\t\tNew=new JMenuItem(\"new\",img1);\r\n\t\topen=new JMenuItem(\"open\");\r\n\t\tsave=new JMenuItem(\"save\");\r\n\t\tquit=new JMenuItem(\"quit\");\r\n\t\tcut=new JMenuItem(\"cut\");\r\n\t\tcopy=new JMenuItem(\"copy\");\r\n\t\tpaste=new JMenuItem(\"paste\");\r\n\t\t\r\n\t\tFileMenu.add(New);\r\n\t\tFileMenu.add(save);\r\n\t\tFileMenu.add(open);\r\n\t\tFileMenu.add(new JSeparator());\r\n\t\tFileMenu.add(quit);\r\n\t\tEditMenu.add(cut);\r\n\t\tEditMenu.add(copy);\r\n\t\tEditMenu.add(paste);\r\n\t\t\r\n\t\tmnb.add(FileMenu);\r\n\t\tmnb.add(EditMenu);\r\n\t\tsetJMenuBar(mnb);\r\n\t\t\r\n\t\t//to add shortcut\r\n\t\tquit.setMnemonic('q');\r\n\t\t//quit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_W,ActionEvent.CTRL_MASK));\r\n\t\tquit.addActionListener((ActionEvent e)->\r\n\t\t\t\t{\r\n\t\t\tSystem.exit(0);\r\n\t\t\t\t});\r\n\t\t\r\n\t\t//moving the mouse near to it we get this\r\n\t\tcut.setToolTipText(\"cut the text\");\r\n\t\t//new way fro get domension\r\n\t\tdim=getToolkit().getScreenSize();\r\n\t\tint x=(int) dim.getHeight();\r\n\t\tint y=(int) dim.getWidth();\r\n\t\tc=getContentPane();\r\n\t\tc.setLayout(new BorderLayout());\r\n\t\tmainpanel=new JPanel();\r\n\t\tta1=new JTextArea(x/18,y/12);\r\n\t\tmainpanel.add(new JScrollPane(ta1));\r\n\t\tc.add(mainpanel,BorderLayout.CENTER);\r\n\t\tmymethods();\r\n\t\topen.addActionListener(this);\r\n\t\tsave.addActionListener(this);\r\n\t\tcut.addActionListener(this);\r\n\t\tcopy.addActionListener(this);\r\n\t\tpaste.addActionListener(this);\r\n\t\t\r\n\t}", "public menu() {\n initComponents();\n }", "public menu() {\n initComponents();\n }", "@Override\r\n\tpublic void menu() {\n\t\tSystem.out.println(\"go to menu\");\r\n\t\t\r\n\t}", "public void initMenu(){\n\t}", "public void menu(){\n menuMusic.loop(pitch, volume);\n }", "@Override\n \tpublic void menu()\n \t{\n \t\tint random = PublicFunctions.getRandomNumberPiece();\n \n \t\twhile(true)\n \t\t{\t\t\t\n \t\t\tbuilder.setLength(0);\n \t\t\t\n \t\t\t//Print out the status\n \t\t\tif(random == 8)\n \t\t\t{\n \t\t\t\tbuilder.append(\"The new piece is mystery piece\").append(\"\\n\");\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tbuilder.append(\"The new piece is \").append(random).append(\"\\n\");\n \t\t\t}\n \t\t\tbuilder.append(board.toString());\n \t\t\tSystem.out.println(builder);\n \t\t\t\n \n \t\t\t//Prompt starts here\n \t\t\tSystem.out.println(\"Where do you want to place the piece?\");\n \t\t\t\n \t\t\tString position = scanner.nextLine();\n \t\t\t\n \t\t\tif(position.equalsIgnoreCase(\"exit\"))\n \t\t\t{\n \t\t\t\tSystem.out.println(\"Exiting...\");\n \t\t\t\t//dump stats here\n \t\t\t\tSystem.exit(0);\n \t\t\t}\n \t\t\telse if(position.equalsIgnoreCase(\"help\"))\n \t\t\t{\n \t\t\t\tSystem.out.println(\"Help here!\");\n \t\t\t}\n \t\t\telse if(PublicFunctions.isValidPosition(position))\n \t\t\t{\n \t\t\t\tif(!board.insert(Integer.parseInt(position), random))\n \t\t\t\t{\n \t\t\t\t\tSystem.out.println(\"You lose\");\n \t\t\t\t\t//dump statistics here\n \t\t\t\t\tSystem.exit(0);\n \t\t\t\t}\n \t\t\t\tSystem.out.println(\"Inserting piece...\");\n \n \t\t\t\t//Generate random number for next interation\n \t\t\t\trandom = PublicFunctions.getRandomNumberPiece();\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tSystem.out.println(\"Invalid Entry\");\n \t\t\t}\n \t\t}\n \t}", "public void InitializeMenu(){\n\t\tmnbBar = new JMenuBar();\n\t\tmnuFile = new JMenu(\"File\");\n\t\tmnuFormat = new JMenu(\"Format\");\n\t\tmniOpen = new JMenuItem(\"Open\");\n\t\tmniExit = new JMenuItem(\"Exit\");\n\t\tmniSave = new JMenuItem(\"Save\");\n\t\tmniSaveAs = new JMenuItem(\"Save as\");\n\t\tmniSaveAs.setMnemonic(KeyEvent.VK_A);\n\t\tmniSave.setMnemonic(KeyEvent.VK_S);\n\t\tmniChangeBgColor = new JMenuItem(\"Change Backgroud Color\");\n\t\tmniChangeFontColor = new JMenuItem(\"Change Font Color\");\n\t\t//them menu item vao menu file\n\t\tmnuFile.add(mniOpen);\n\t\tmnuFile.addSeparator();\n\t\tmnuFile.add(mniExit);\n\t\tmnuFile.add(mniSaveAs);\n\t\tmnuFile.add(mniSave);\n\t\t//them menu item vao menu format\n\t\tmnuFormat.add(mniChangeBgColor);\n\t\tmnuFormat.addSeparator();\n\t\tmnuFormat.add(mniChangeFontColor);\n\t\t//them menu file va menu format vao menu bar\n\t\tmnbBar.add(mnuFile);\n\t\tmnbBar.add(mnuFormat);\n\t\t//thiet lap menubar thanh menu chinh cua frame\n\t\tsetJMenuBar(mnbBar);\n\t}", "public static void f_menu(){\n System.out.println(\"------------------------------------------------\");\n System.out.println(\"------------------------------------------------\");\n System.out.println(\"-------------Soft_AVERAGE_HEIGHT-----------------\");\n System.out.println(\"-------------version 1.0 23-oct-2020------------\");\n System.out.println(\"-------------make by Esteban Gaona--------------\");\n System.out.println(\"-------------------------------------------------\");\n System.out.println(\"-------------------------------------------------\");\n}", "static void mostrarMenu(){\n \t\t\n\t\tout.println();\n\t\tout.println(\"1. Crear lavadora.\");\n\t\tout.println(\"2. Mostrar lavadoras.\");\n\t\tout.println(\"3. Seleccionar lavadora.\");\n\t\tout.println(\"4. Cargar agua.\");\n\t\tout.println(\"5. Cargar ropa.\");\n\t\tout.println(\"6. Cargar detergente.\");\n\t\tout.println(\"7. Especificar tiempo.\");\n\t\tout.println(\"8. Drenar.\");\n\t\tout.println(\"9. Mostrar estado de la lavadora.\");\n\t\tout.println(\"10. Mostrar estado de la ropa.\");\n\t\tout.println(\"11. Pausar o Reanudar lavadora\");\n\t\tout.println(\"12. Probar sistema.\");\n\t\tout.println(\"13. Reiniciar sistema.\");\n\t\tout.println(\"22. Salir\");\n\t\tout.println((SELECTNOW != -1) ? \"!/*!/* Lv seleccionada: \" + SELECTNOW + \" !/*!/*\": \"\");\n\t\tout.println();\n\t}", "private void changeMenu()\n {\n if (_menuMode)\n {\n menuLayout.getChildAt(0).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(1).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(2).setVisibility(View.GONE);\n menuLayout.getChildAt(3).setVisibility(View.GONE);\n menuLayout.getChildAt(4).setVisibility(View.VISIBLE);\n _switchMode.setText(\"Watch Mode\");\n\n }\n else\n {\n menuLayout.getChildAt(0).setVisibility(View.GONE);\n menuLayout.getChildAt(1).setVisibility(View.VISIBLE);\n _switchMode.setText(\"Paint Mode\");\n menuLayout.getChildAt(2).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(3).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(4).setVisibility(View.GONE);\n _timeBar.setProgress((int) (_paintArea.getPercent() * 100f));\n }\n _paintArea.setPaintMode(_menuMode);\n _menuMode = !_menuMode;\n }", "public void menu() {\n System.out.println(\n \" Warehouse System\\n\"\n + \" Stage 3\\n\\n\"\n + \" +--------------------------------------+\\n\"\n + \" | \" + ADD_CLIENT + \")\\tAdd Client |\\n\"\n + \" | \" + ADD_PRODUCT + \")\\tAdd Product |\\n\"\n + \" | \" + ADD_SUPPLIER + \")\\tAdd Supplier |\\n\"\n + \" | \" + ACCEPT_SHIPMENT + \")\\tAccept Shipment from Supplier |\\n\"\n + \" | \" + ACCEPT_ORDER + \")\\tAccept Order from Client |\\n\"\n + \" | \" + PROCESS_ORDER + \")\\tProcess Order |\\n\"\n + \" | \" + CREATE_INVOICE + \")\\tInvoice from processed Order |\\n\"\n + \" | \" + PAYMENT + \")\\tMake a payment |\\n\"\n + \" | \" + ASSIGN_PRODUCT + \")\\tAssign Product to Supplier |\\n\"\n + \" | \" + UNASSIGN_PRODUCT + \")\\tUnssign Product to Supplier |\\n\"\n + \" | \" + SHOW_CLIENTS + \")\\tShow Clients |\\n\"\n + \" | \" + SHOW_PRODUCTS + \")\\tShow Products |\\n\"\n + \" | \" + SHOW_SUPPLIERS + \")\\tShow Suppliers |\\n\"\n + \" | \" + SHOW_ORDERS + \")\\tShow Orders |\\n\"\n + \" | \" + GET_TRANS + \")\\tGet Transaction of a Client |\\n\"\n + \" | \" + GET_INVOICE + \")\\tGet Invoices of a Client |\\n\"\n + \" | \" + SAVE + \")\\tSave State |\\n\"\n + \" | \" + MENU + \")\\tDisplay Menu |\\n\"\n + \" | \" + EXIT + \")\\tExit |\\n\"\n + \" +--------------------------------------+\\n\");\n }", "public void mainMenu()\n {\n\n System.out.println('\\u000C'); //clears screen\n System.out.println(\"<------------- Press 0 to return.\");\n System.out.println();\n System.out.println();\n System.out.println(\"\\t\\tTeacher Menu\");\n System.out.println(\"\\t1. View Names\");\n System.out.println(\"\\t2. Change Name\");\n System.out.println(\"\\t3. Add Teacher\");\n input = in.nextInt();\n in.nextLine();\n\n switch(input)\n {\n case 0: //call main menu -- create instance of menu class here to pass in current state of arraylist\n returnTo = new StartMenu(teachers);\n returnTo.enterId(teachers);\n break;\n\n case 1: //view names -- a subclass class that extends StudentMenu \n //temporary method that will view all names\n viewNames();\n break;\n\n case 2: //change names\n changeName();\n break;\n\n case 3: //change grade\n addNewPerson();\n break;\n\n } //ends switch statement\n\n }", "@FXML\n\tpublic void handleMenu(){\n\t\tFile file2 = mainApp.getProspectFilePath();\n if (file2 != null) {\n mainApp.saveProspectDataToFile(file2);}\n\t\tmainApp.showMenuPrincipale();\n\t}", "public menu() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "private void showMenu() {\n\t Scanner sc = new Scanner(System.in);\n\t Arguments argument = Arguments.INVALID;\n\t System.out.println(\"Enter command of your choice in the correct format\");\n\t do\n\t {\n\t \tString command = sc.nextLine();\n\t \tString[] arguments = command.split(\" +\");\n\t \targument = validateAndReturnType(arguments);\n\t \tswitch(argument) {\n\t\t \tcase INCREASE:\n\t\t \t\tincrease(arguments);\n\t\t \t\tbreak;\n\t\t \tcase REDUCE:\n\t\t \t\treduce(arguments);\n\t\t \t\tbreak;\n\t\t\t\tcase COUNT:\n\t\t\t\t\tcount(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase INRANGE:\n\t\t\t\t\tinRange(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase NEXT:\n\t\t\t\t\tnext(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PREVIOUS:\n\t\t\t\t\tprevious(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase QUIT:\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\tcase INVALID:\n\t\t\t\t\tSystem.out.println(\"Please enter a valid command\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Invalid command. Enter a command in the correct format\");\n\t \t}\n\t } while(argument != Arguments.QUIT);\n\t}", "public void menu(){\n super.goToMenuScreen();\n }", "public void options() {\n\n audio.playSound(LDSound.SMALL_CLICK);\n if (canViewOptions()) {\n Logger.info(\"HUD Presenter: options\");\n uiStateManager.setState(GameUIState.OPTIONS);\n }\n }", "public void display() {\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new ProviderMenu().setVisible(true);\n\n }\n });\n }" ]
[ "0.7436625", "0.735524", "0.7094734", "0.70544606", "0.6986207", "0.69772977", "0.6937371", "0.6895071", "0.6884481", "0.6847553", "0.67663294", "0.6745555", "0.6732764", "0.67188853", "0.67084473", "0.66819066", "0.6678628", "0.6645895", "0.66456914", "0.66396034", "0.663193", "0.66164213", "0.6613859", "0.6609877", "0.65935403", "0.6591272", "0.6589563", "0.65882593", "0.65880364", "0.65620065", "0.65576875", "0.65507436", "0.65496796", "0.6541674", "0.65392065", "0.65368676", "0.65177095", "0.6513916", "0.6493521", "0.64880574", "0.6487279", "0.6484344", "0.64839053", "0.6482811", "0.6477424", "0.64707804", "0.64658225", "0.6465139", "0.6461437", "0.646111", "0.64598924", "0.6455139", "0.64488125", "0.64475876", "0.6445749", "0.64429104", "0.6434656", "0.64295286", "0.6420558", "0.6413022", "0.6403621", "0.6397918", "0.63848734", "0.63844955", "0.63828045", "0.6379835", "0.6372957", "0.6372358", "0.6365037", "0.63627154", "0.6359263", "0.63559574", "0.6354571", "0.63472635", "0.6343918", "0.63426924", "0.63403755", "0.6331398", "0.63305557", "0.6324303", "0.63241667", "0.6323441", "0.63184077", "0.63127", "0.63127", "0.63051975", "0.630461", "0.63017726", "0.6298622", "0.6293283", "0.62890655", "0.6286138", "0.6282034", "0.6277636", "0.6276195", "0.62731624", "0.6270347", "0.62688684", "0.62667286", "0.6259526", "0.6252351" ]
0.0
-1
Constructor defaults to left join
public FetchJoinInformation(String property) { this(property, JoinType.LEFT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void leftJoin(){\n\t\t\n\t\tCriteriaBuilder criteriaBuilder = em.getCriteriaBuilder();\n\t\tCriteriaQuery<Course> criteriaQuery = criteriaBuilder.createQuery(Course.class);\n\t\t\n\t\t//Define Roots\n\t\tRoot<Course> courseRoot = criteriaQuery.from(Course.class);\n\t\t\n\t\t//Define Predicates\n\t\tJoin<Object, Object> leftJoin = courseRoot.join(\"students\",JoinType.LEFT);\n\t\t\n\t\t//Add predicates\n\t\t\n\t\t//Define TypedQuery\n\t\tTypedQuery<Course> query = em.createQuery(criteriaQuery.select(courseRoot));\n\t\t\n\t\tList<Course> resultList = query.getResultList();\n\t\t\n\t\tlogger.info(\"LEFT JOINED COURSES ==> {}\", resultList);\n\t\t\n\t}", "<V1, R> KTable<K, R> leftJoin(KTable<K, V1> other, ValueJoiner<V, V1, R> joiner);", "public Joins()\n {\n joins = new ArrayList<Join>();\n }", "private LeftJoin convertToLeftJoin(GraphPattern gp, ElementOptional optional) throws SemQAException {\n\t\tGraphPattern right = sparqlToSemQA(optional.getOptionalElement());\r\n\t\treturn new LeftJoin(gp, right);\r\n\t}", "@Test(timeout = 4000)\n public void test010() throws Throwable {\n String[] stringArray0 = new String[1];\n String string0 = SQLUtil.leftJoin(\"aT7W`oI)N(jLl^oF<HQ\", stringArray0, \"aT7W`oI)N(jLl^oF<HQ\", \"aT7W`oI)N(jLl^oF<HQ\", stringArray0);\n assertEquals(\"left join aT7W`oI)N(jLl^oF<HQ as aT7W`oI)N(jLl^oF<HQ on aT7W`oI)N(jLl^oF<HQ.null = aT7W`oI)N(jLl^oF<HQ.null\", string0);\n }", "@Override\n public void visit(final OpLeftJoin opLeftJoin) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpLeftJoin\");\n }\n final OpRewriter rewriter = new OpRewriter(securityEvaluator, graphIRI);\n addOp(OpLeftJoin.create(rewriteOp2(opLeftJoin, rewriter), rewriter.getResult(), opLeftJoin.getExprs()));\n }", "Join createJoin();", "public LeftJoin(final String datasetSchemaName,\n\t\t\t\tfinal String datasetTableName) {\n\t\t\tsuper(datasetSchemaName, datasetTableName);\n\t\t}", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n String[] stringArray0 = new String[5];\n String string0 = SQLUtil.leftJoin(\"*nT\", stringArray0, \"tYr\", (String) null, stringArray0);\n assertEquals(\"left join tYr as null on *nT.null = null.null and *nT.null = null.null and *nT.null = null.null and *nT.null = null.null and *nT.null = null.null\", string0);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n String[] stringArray0 = new String[8];\n String string0 = SQLUtil.leftJoin(\"r45_Ruks|DMzE=\", stringArray0, \"\", \" join \", stringArray0);\n assertEquals(\"left join as join on r45_Ruks|DMzE=.null = join .null and r45_Ruks|DMzE=.null = join .null and r45_Ruks|DMzE=.null = join .null and r45_Ruks|DMzE=.null = join .null and r45_Ruks|DMzE=.null = join .null and r45_Ruks|DMzE=.null = join .null and r45_Ruks|DMzE=.null = join .null and r45_Ruks|DMzE=.null = join .null\", string0);\n }", "@Test\n public void testLeftJoinWithAliases() throws Exception {\n String sql = \"Select myG.a myA, myH.b from g myG left outer join h myH on myG.x=myH.x\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verifyAliasSymbolWithElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, 1, \"myA\", \"myG.a\");\n verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, 2, \"myH.b\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n\n Node jpNode = verify(fromNode, From.CLAUSES_REF_NAME, JoinPredicate.ID);\n verifyJoin(jpNode, JoinTypeTypes.JOIN_LEFT_OUTER);\n\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"myG\", \"g\");\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"myH\", \"h\");\n\n Node criteriaNode = verify(jpNode, JoinPredicate.JOIN_CRITERIA_REF_NAME, CompareCriteria.ID);\n verifyProperty(criteriaNode, AbstractCompareCriteria.OPERATOR_PROP_NAME, CriteriaOperator.Operator.EQ.name());\n\n Node leftExpression = verify(criteriaNode, AbstractCompareCriteria.LEFT_EXPRESSION_REF_NAME, ElementSymbol.ID);\n verifyProperty(leftExpression, Symbol.NAME_PROP_NAME, \"myG.x\");\n\n Node rightExpression = verify(criteriaNode, CompareCriteria.RIGHT_EXPRESSION_REF_NAME, ElementSymbol.ID);\n verifyProperty(rightExpression, Symbol.NAME_PROP_NAME, \"myH.x\");\n \n verifySql(\"SELECT myG.a AS myA, myH.b FROM g AS myG LEFT OUTER JOIN h AS myH ON myG.x = myH.x\", fileNode);\n }", "public <KL, KR> DataSet<T> leftOuterJoinOnEquals(DataSet<T> rightDs,\n Function<T, KL> leftKeyFunction,\n Function<T, KR> rightKeyFunction) {\n return leftOuterJoinOnEquals(rightDs, leftKeyFunction, rightKeyFunction, DataSet::joinDefaultOneToOneCombiner);\n }", "public JavaPairRDD<String, Tuple2<Integer, org.apache.spark.api.java.Optional<Integer>>> leftJoinExample(){\n return firstSet\n .leftOuterJoin(secondSet);\n }", "@Test\r\n public void testLeftJoinWhenSynonymHasOneEntryWhileAntonymHasMany() {\r\n synonym.put(\"fond\", \"enamored\");\r\n\r\n antonym.put(\"fond\", \"averse\");\r\n antonym.put(\"wrath\", \"delight\");\r\n antonym.put(\"diligent\", \"idle\");\r\n antonym.put(\"guide\", \"follow\");\r\n\r\n String[][] result = leftJoin(synonym, antonym);\r\n String[][] expected = new String[][]{ {\"fond\", \"enamored\", \"averse\"} };\r\n\r\n assertArrayEquals(expected, result);\r\n }", "@Test\r\n public void testLeftJoinWhenAntonymDoNotHaveAnyKeysMatchWithSynonym() {\r\n synonym.put(\"fond\", \"enamored\");\r\n synonym.put(\"wrath\", \"anger\");\r\n synonym.put(\"diligent\", \"employed\");\r\n synonym.put(\"outfit\", \"garb\");\r\n synonym.put(\"guide\", \"usher\");\r\n\r\n antonym.put(\"love\", \"hate\");\r\n\r\n String[][] result = leftJoin(synonym, antonym);\r\n String[][] expected = new String[][]{ {\"diligent\", \"employed\", null},\r\n {\"outfit\", \"garb\", null},\r\n {\"wrath\", \"anger\", null},\r\n {\"guide\", \"usher\", null},\r\n {\"fond\", \"enamored\", null} };\r\n assertArrayEquals(expected, result);\r\n }", "@Test\n public void testJoinTypeLeftWhenParentEffectiveJoinTypeIsLeft() {\n Person parent = query.from(Person.class);\n Relation relation = query.join(parent.getChildRelations(), JoinType.Left);\n \n query.select(relation.getChild().getAge());\n \n validate(\"select hobj3.age from Person hobj1 left join hobj1.childRelations hobj2 left join hobj2.child hobj3\");\n }", "@Test\n public void testJoinTypeLeftWhenParentEffectiveJoinTypeIsLeftEvenWhenOnlyIdSelected() {\n Person parent = query.from(Person.class);\n Relation relation = query.join(parent.getChildRelations(), JoinType.Left);\n \n query.select(relation.getChild().getId());\n \n validate(\"select hobj3.id from Person hobj1 left join hobj1.childRelations hobj2 left join hobj2.child hobj3\");\n }", "abstract protected Object joinClause(Object o1, Object o2);", "@Test\r\n public void testLeftJoinWhenBothHashMapAreEmpty() {\r\n String[][] result = leftJoin(synonym, antonym);\r\n String[][] expected = new String[][]{};\r\n\r\n assertArrayEquals(expected, result);\r\n }", "@Test\r\n public void testLeftJoinWhenAntonymHaveAllKeysMatchWithSynonym() {\r\n synonym.put(\"fond\", \"enamored\");\r\n synonym.put(\"wrath\", \"anger\");\r\n synonym.put(\"diligent\", \"employed\");\r\n synonym.put(\"guide\", \"usher\");\r\n\r\n antonym.put(\"fond\", \"averse\");\r\n antonym.put(\"wrath\", \"delight\");\r\n antonym.put(\"diligent\", \"idle\");\r\n antonym.put(\"guide\", \"follow\");\r\n\r\n String[][] result = leftJoin(synonym, antonym);\r\n String[][] expected = new String[][]{ {\"diligent\", \"employed\", \"idle\"},\r\n {\"wrath\", \"anger\", \"delight\"},\r\n {\"guide\", \"usher\", \"follow\"},\r\n {\"fond\", \"enamored\", \"averse\"} };\r\n\r\n assertArrayEquals(expected, result);\r\n }", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n String[] stringArray0 = new String[8];\n String string0 = SQLUtil.leftJoin(\"\", stringArray0, \"9b41-\", \"\", stringArray0);\n assertEquals(\"left join 9b41- as on .null = .null and .null = .null and .null = .null and .null = .null and .null = .null and .null = .null and .null = .null and .null = .null\", string0);\n }", "@Test\n public void testLeftOuterJoinWithAliases() throws Exception {\n String sql = \"Select myG.a myA, myH.b from g myG left outer join h myH on myG.x=myH.x\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verifyAliasSymbolWithElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, 1, \"myA\", \"myG.a\");\n verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, 2, \"myH.b\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n\n Node jpNode = verify(fromNode, From.CLAUSES_REF_NAME, JoinPredicate.ID);\n verifyJoin(jpNode, JoinTypeTypes.JOIN_LEFT_OUTER);\n\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"myG\", \"g\");\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"myH\", \"h\");\n\n Node criteriaNode = verify(jpNode, JoinPredicate.JOIN_CRITERIA_REF_NAME, CompareCriteria.ID);\n verifyProperty(criteriaNode, AbstractCompareCriteria.OPERATOR_PROP_NAME, CriteriaOperator.Operator.EQ.name());\n\n Node leftExpression = verify(criteriaNode, AbstractCompareCriteria.LEFT_EXPRESSION_REF_NAME, ElementSymbol.ID);\n verifyProperty(leftExpression, Symbol.NAME_PROP_NAME, \"myG.x\");\n\n Node rightExpression = verify(criteriaNode, CompareCriteria.RIGHT_EXPRESSION_REF_NAME, ElementSymbol.ID);\n verifyProperty(rightExpression, Symbol.NAME_PROP_NAME, \"myH.x\");\n \n verifySql(\"SELECT myG.a AS myA, myH.b FROM g AS myG LEFT OUTER JOIN h AS myH ON myG.x = myH.x\", fileNode);\n }", "@Test\r\n public void testLeftJoinKeysInSynonymBothExistAndNotExistInAntonym() {\r\n synonym.put(\"fond\", \"enamored\");\r\n synonym.put(\"wrath\", \"anger\");\r\n synonym.put(\"diligent\", \"employed\");\r\n synonym.put(\"outfit\", \"garb\");\r\n synonym.put(\"guide\", \"usher\");\r\n\r\n antonym.put(\"fond\", \"averse\");\r\n antonym.put(\"wrath\", \"delight\");\r\n antonym.put(\"diligent\", \"idle\");\r\n antonym.put(\"guide\", \"follow\");\r\n antonym.put(\"flow\", \"jam\");\r\n\r\n String[][] result = leftJoin(synonym, antonym);\r\n String[][] expected = new String[][]{ {\"diligent\", \"employed\", \"idle\"},\r\n {\"outfit\", \"garb\", null},\r\n {\"wrath\", \"anger\", \"delight\"},\r\n {\"guide\", \"usher\", \"follow\"},\r\n {\"fond\", \"enamored\", \"averse\"} };\r\n\r\n assertArrayEquals(expected, result);\r\n }", "FromTableJoin createFromTableJoin();", "public void testJoinOuter() {\n\n String\tsql\t= \"SELECT t.AD_Table_ID, t.TableName, c.AD_Column_ID, c.ColumnName \" + \"FROM AD_Table t LEFT OUTER JOIN AD_Column c ON (t.AD_Table_ID=c.AD_Table_ID) WHERE t.IsActive='Y'\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[AD_Table=t,AD_Column=c|0]\", fixture.toString());\n }", "@Test(timeout = 4000)\n public void test120() throws Throwable {\n String[] stringArray0 = new String[8];\n String string0 = SQLUtil.leftJoin(\"@H VqbTNp872Q\", stringArray0, (String) null, \"\\nLIMIT \", stringArray0);\n assertEquals(\"left join null as \\nLIMIT on @H VqbTNp872Q.null = \\nLIMIT .null and @H VqbTNp872Q.null = \\nLIMIT .null and @H VqbTNp872Q.null = \\nLIMIT .null and @H VqbTNp872Q.null = \\nLIMIT .null and @H VqbTNp872Q.null = \\nLIMIT .null and @H VqbTNp872Q.null = \\nLIMIT .null and @H VqbTNp872Q.null = \\nLIMIT .null and @H VqbTNp872Q.null = \\nLIMIT .null\", string0);\n }", "JoinCondition createJoinCondition();", "@Test\n \tpublic void whereClauseForNodeLeftAlignment() {\n \t\tnode23.addJoin(new LeftAlignment(node42));\n \t\tcheckWhereCondition(\n \t\t\t\tjoin(\"=\", \"_node23.text_ref\", \"_node42.text_ref\"),\n \t\t\t\tjoin(\"=\", \"_node23.left\", \"_node42.left\")\n \t\t);\n \t}", "@VisibleForTesting\n protected void appendJoinOnKeyClause(String leftAlias,\n JoinKey leftKey,\n String rightAlias,\n JoinKey rightKey,\n boolean joinOnNullKeys) {\n // ... ON [left.l1 = right.r1]\n appendEquals(leftAlias, leftKey.getFields().get(0), rightAlias, rightKey.getFields().get(0), joinOnNullKeys);\n\n for (int i = 1; i < leftKey.getFields().size(); i++) {\n // ... [AND left.rN = right.rN]\n builder.append(AND);\n appendEquals(leftAlias, leftKey.getFields().get(i), rightAlias, rightKey.getFields().get(i), joinOnNullKeys);\n }\n }", "@Test\n public void testFullJoin() throws Exception {\n String sql = \"Select myG.a myA, myH.b from g myG full join h myH on myG.x=myH.x\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verifyAliasSymbolWithElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, 1, \"myA\", \"myG.a\");\n verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, 2, \"myH.b\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n\n Node jpNode = verify(fromNode, From.CLAUSES_REF_NAME, JoinPredicate.ID);\n verifyJoin(jpNode, JoinTypeTypes.JOIN_FULL_OUTER);\n\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"myG\", \"g\");\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"myH\", \"h\");\n\n Node criteriaNode = verify(jpNode, JoinPredicate.JOIN_CRITERIA_REF_NAME, CompareCriteria.ID);\n verifyProperty(criteriaNode, AbstractCompareCriteria.OPERATOR_PROP_NAME, CriteriaOperator.Operator.EQ.name());\n\n Node leftExpression = verify(criteriaNode, AbstractCompareCriteria.LEFT_EXPRESSION_REF_NAME, ElementSymbol.ID);\n verifyProperty(leftExpression, Symbol.NAME_PROP_NAME, \"myG.x\");\n\n Node rightExpression = verify(criteriaNode, CompareCriteria.RIGHT_EXPRESSION_REF_NAME, ElementSymbol.ID);\n verifyProperty(rightExpression, Symbol.NAME_PROP_NAME, \"myH.x\");\n\n verifySql(\"SELECT myG.a AS myA, myH.b FROM g AS myG FULL OUTER JOIN h AS myH ON myG.x = myH.x\", fileNode);\n }", "private void appendJoinStatement(JoinStage left,\n JoinStage right) {\n String joinType;\n\n if (left.isRequired() && right.isRequired()) {\n joinType = \"INNER\";\n } else if (left.isRequired() && !right.isRequired()) {\n joinType = \"LEFT OUTER\";\n } else if (!left.isRequired() && right.isRequired()) {\n joinType = \"RIGHT OUTER\";\n } else {\n joinType = \"FULL OUTER\";\n }\n\n // ... <join_type> JOIN <right_table> ON ...\n builder.append(joinType);\n builder.append(JOIN);\n appendFullTableNameAndAlias(right.getStageName());\n builder.append(ON);\n }", "@SuppressWarnings(\"SuspiciousMethodCalls\")\n public <KL, KR> DataSet<T> leftOuterJoinOnEquals(DataSet<T> rightDs,\n Function<T, KL> leftKeyFunction,\n Function<T, KR> rightKeyFunction,\n BiFunction<T, T, T> combiner) {\n int rightSize = rightDs.getData().size();\n Map<KR, T> rightSet = rightDs.getDataStream()\n .collect(Collectors\n .toMap(rightKeyFunction, e -> e, (v1, v2) -> v2, () -> new HashMap<>(rightSize)));\n Stream<T> stream = this.getDataStream()\n .peek(row -> combiner.apply(row, rightSet.get(leftKeyFunction.apply(row))));\n return new DataSet<>(stream);\n }", "private static void DoJoin()\n\t{\n\n\t\tArrayList<Attribute> inAttsRight = new ArrayList<Attribute>();\n\t\tinAttsRight.add(new Attribute(\"Int\", \"o_orderkey\"));\n\t\tinAttsRight.add(new Attribute(\"Int\", \"o_custkey\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_orderstatus\"));\n\t\tinAttsRight.add(new Attribute(\"Float\", \"o_totalprice\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_orderdate\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_orderpriority\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_clerk\"));\n\t\tinAttsRight.add(new Attribute(\"Int\", \"o_shippriority\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_comment\"));\n\n\t\tArrayList<Attribute> inAttsLeft = new ArrayList<Attribute>();\n\t\tinAttsLeft.add(new Attribute(\"Int\", \"c_custkey\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_name\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_address\"));\n\t\tinAttsLeft.add(new Attribute(\"Int\", \"c_nationkey\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_phone\"));\n\t\tinAttsLeft.add(new Attribute(\"Float\", \"c_acctbal\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_mktsegment\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Str\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att4\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att5\"));\n\n\t\tArrayList<String> leftHash = new ArrayList<String>();\n\t\tleftHash.add(\"c_custkey\");\n\n\t\tArrayList<String> rightHash = new ArrayList<String>();\n\t\trightHash.add(\"o_custkey\");\n\n\t\tString selection = \"right.o_custkey == left.c_custkey && right.o_custkey > Int (1000)\";\n\n\t\tHashMap<String, String> exprs = new HashMap<String, String>();\n\t\texprs.put(\"att1\", \"right.o_comment + Str(\\\" \\\") + left.c_comment\");\n\t\texprs.put(\"att2\", \"right.o_custkey\");\n\t\texprs.put(\"att3\", \"left.c_custkey\");\n\t\texprs.put(\"att4\", \"left.c_name\");\n\t\texprs.put(\"att5\", \"right.o_orderkey\");\n\n\t\t// run the join\n\t\ttry\n\t\t{\n\t\t\tnew Join(inAttsLeft, inAttsRight, outAtts, leftHash, rightHash, selection, exprs, \"customer.tbl\", \"orders.tbl\",\n\t\t\t\t\t\"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t}", "public void testMember(){\n\r\n parser.sqltext = \"select f from t1\";\r\n assertTrue(parser.parse() == 0);\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getKind() == TBaseType.join_source_fake );\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getTable().toString().compareToIgnoreCase(\"t1\") == 0);\r\n\r\n parser.sqltext = \"select f from t as t1 join t2 on t1.f1 = t2.f1\";\r\n assertTrue(parser.parse() == 0);\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getKind() == TBaseType.join_source_table );\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getTable().toString().compareToIgnoreCase(\"t\") == 0);\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getTable().getAliasClause().toString().compareToIgnoreCase(\"t1\") == 0);\r\n\r\n\r\n parser.sqltext = \"select a_join.f1 from (a as a_alias left join a1 on a1.f1 = a_alias.f1 ) as a_join join b on a_join.f1 = b.f1;\";\r\n assertTrue(parser.parse() == 0);\r\n TJoin lcJoin = parser.sqlstatements.get(0).joins.getJoin(0);\r\n //System.out.println(lcJoin.getKind());\r\n assertTrue(lcJoin.getKind() == TBaseType.join_source_join );\r\n\r\n assertTrue(lcJoin.getJoin().toString().compareToIgnoreCase(\"(a as a_alias left join a1 on a1.f1 = a_alias.f1 )\") == 0);\r\n assertTrue(lcJoin.getJoin().getAliasClause().toString().compareToIgnoreCase(\"a_join\") == 0);\r\n assertTrue(lcJoin.getJoin().getJoinItems().getJoinItem(0).getJoinType() == EJoinType.left);\r\n\r\n assertTrue(lcJoin.getJoinItems().getJoinItem(0).getJoinType() == EJoinType.join);\r\n\r\n parser.sqltext = \"select a_join.f1 from (a as a_alias left join a1 on a1.f1 = a_alias.f1 ) as a_join\";\r\n assertTrue(parser.parse() == 0);\r\n TJoin lcJoin1 = parser.sqlstatements.get(0).joins.getJoin(0);\r\n assertTrue(lcJoin1.getKind() == TBaseType.join_source_join );\r\n assertTrue(lcJoin1.getJoin().toString().compareToIgnoreCase(\"(a as a_alias left join a1 on a1.f1 = a_alias.f1 )\") == 0);\r\n assertTrue(lcJoin1.getJoin().getAliasClause().toString().compareToIgnoreCase(\"a_join\") == 0);\r\n\r\n }", "public ChangeDetectionByJoin(Fields fields) {\n\t\tsuper(fields);\n\t}", "IDbQuery<R> setStraightJoin(boolean straightJoin);", "<V1, R> KTable<K, R> outerJoin(KTable<K, V1> other, ValueJoiner<V, V1, R> joiner);", "@VisibleForTesting\n protected void appendJoinOnKeyOperation(JoinStage left,\n JoinStage right,\n Map<String, JoinKey> stageNameToJoinKeyMap,\n boolean joinOnNullKeys) {\n // Append Join Statement for these 2 stages\n appendJoinStatement(left, right);\n\n String leftAlias = getTableAlias(left.getStageName());\n String rightAlias = getTableAlias(right.getStageName());\n\n JoinKey leftKey = stageNameToJoinKeyMap.get(left.getStageName());\n JoinKey rightKey = stageNameToJoinKeyMap.get(right.getStageName());\n\n // Append Join on key conditions\n appendJoinOnKeyClause(leftAlias, leftKey, rightAlias, rightKey, joinOnNullKeys);\n }", "public static <K, E0, E1> JoinClause<K, E0, E1, E1> onKeys(\n DistributedFunction<E0, K> leftKeyFn,\n DistributedFunction<E1, K> rightKeyFn\n ) {\n return new JoinClause<>(leftKeyFn, rightKeyFn, DistributedFunction.identity());\n }", "@Test(timeout = 4000)\n public void test121() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.leftJoin(\"8\", (String[]) null, \"6>tpBolA_iS93{\\\"H\", \"6>tpBolA_iS93{\\\"H\", (String[]) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "public Left(L left) {\n x = left;\n }", "private ExampleSetBuilder performLeftJoin(ExampleSet leftExampleSet, ExampleSet rightExampleSet,\n\t\t\tList<AttributeSource> originalAttributeSources, List<Attribute> unionAttributeList,\n\t\t\tPair<Attribute[], Attribute[]> keyAttributes, Set<DoubleArrayWrapper> matchedExamplesInRightTable)\n\t\t\t\t\tthrows ProcessStoppedException {\n\t\tExampleSetBuilder builder = ExampleSets.from(unionAttributeList);\n\n\t\tAttribute[] leftKeyAttributes = null;\n\t\tAttribute[] rightKeyAttributes = null;\n\t\tMap<DoubleArrayWrapper, List<Example>> rightKeyMapping = null;\n\t\tboolean useId = getParameterAsBoolean(PARAMETER_USE_ID);\n\n\t\tleftKeyAttributes = keyAttributes.getFirst();\n\t\trightKeyAttributes = keyAttributes.getSecond();\n\t\tif (!useId) {\n\t\t\t// create key mapping for right example set\n\t\t\trightKeyMapping = createKeyMapping(rightExampleSet, rightKeyAttributes, leftKeyAttributes);\n\t\t}\n\n\t\tint progressCounter = 0;\n\t\t// iterate over all example from left table and search for matching examples in right table:\n\t\tfor (Example leftExample : leftExampleSet) {\n\t\t\tList<Example> matchingRightExamples = getMatchingExamples(leftExampleSet, rightExampleSet, leftKeyAttributes,\n\t\t\t\t\trightKeyMapping, useId, leftExample);\n\n\t\t\tif (matchingRightExamples != null) {\n\t\t\t\t// add combination of left example and all matching right examples\n\t\t\t\tfor (Example rightExample : matchingRightExamples) {\n\t\t\t\t\taddCombinedOccurence(originalAttributeSources, unionAttributeList, builder, leftExample, rightExample);\n\t\t\t\t\tif (matchedExamplesInRightTable != null) {\n\t\t\t\t\t\tmatchedExamplesInRightTable\n\t\t\t\t\t\t.add(new DoubleArrayWrapper(getKeyValues(rightExample, rightKeyAttributes)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else { // no rows with this key in right table\n\t\t\t\t// insert this row with null values for the right table\n\t\t\t\taddLeftOnlyOccurence(originalAttributeSources, unionAttributeList, builder, leftExample);\n\t\t\t}\n\t\t\t// trigger operator progress every 100 examples\n\t\t\t++progressCounter;\n\t\t\tif (progressCounter % 100 == 0) {\n\t\t\t\tgetProgress().step(100);\n\t\t\t\tprogressCounter = 0;\n\t\t\t}\n\t\t}\n\t\treturn builder;\n\t}", "public Join(JoinPredicate p, DbIterator child1, DbIterator child2) {\n this._p = p;\n this._child1 = child1;\n this._child2 = child2;\n this._hj = new HashJoin();\n }", "@Test\n\tpublic void join(){\n\t\t\n\t\tCriteriaBuilder criteriaBuilder = em.getCriteriaBuilder();\n\t\tCriteriaQuery<Course> criteriaQuery = criteriaBuilder.createQuery(Course.class);\n\t\t\n\t\t\n\t\t// Define roots\n\t\tRoot<Course> courseRoot = criteriaQuery.from(Course.class);\n\t\t\n\t\t// Define Predicate\n\t\tJoin<Object, Object> join = courseRoot.join(\"students\");\n\t\t\n\t\t// Add Predicate\n\t\n\t\t//5. Defined Typed Query\n\t\t\t\tTypedQuery<Course> query = em.createQuery(criteriaQuery.select(courseRoot));\n\t\t\t\t\n\t\t\t\tList<Course> resultList = query.getResultList();\n\t\t\t\t\n\t\t\t\tlogger.info(\"JOINED COURSES ==> {}\", resultList);\n\t\t\t\t\t\n\t}", "@Override\n\tpublic String getJoinTable() {\n\t\treturn null;\n\t}", "<V1, R> KTable<K, R> join(KTable<K, V1> other, ValueJoiner<V, V1, R> joiner);", "@Test(timeout = 4000)\n public void test038() throws Throwable {\n String[] stringArray0 = new String[1];\n String[] stringArray1 = new String[3];\n // Undeclared exception!\n try { \n SQLUtil.leftJoin(\"aT7W`oI)N(jLl^oF<HQ.null\", stringArray1, \"aT7W`oI)N(jLl^oF<HQ\", \"aT7W`oI)N(jLl^oF<HQ\", stringArray0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "private ExampleSetBuilder performOuterJoin(ExampleSet leftExampleSet, ExampleSet rightExampleSet,\n\t\t\tList<AttributeSource> originalAttributeSources, List<Attribute> unionAttributeList,\n\t\t\tPair<Attribute[], Attribute[]> keyAttributes) throws ProcessStoppedException {\n\t\tExampleSetBuilder builder;\n\n\t\tAttribute[] leftKeyAttributes = keyAttributes.getFirst();\n\t\tAttribute[] rightKeyAttributes = keyAttributes.getSecond();\n\n\t\t// perform left join (an outer join is the union of a left join and a right join on the same\n\t\t// tables)\n\t\tSet<DoubleArrayWrapper> mappedRightExamples = new HashSet<>();\n\t\tbuilder = performLeftJoin(leftExampleSet, rightExampleSet, originalAttributeSources, unionAttributeList,\n\t\t\t\tkeyAttributes, mappedRightExamples);\n\n\t\tboolean keepBoth = getParameterAsBoolean(PARAMETER_KEEP_BOTH_JOIN_ATTRIBUTES);\n\t\tboolean removeDoubleAttributes = getParameterAsBoolean(PARAMETER_REMOVE_DOUBLE_ATTRIBUTES);\n\t\tint progressCounter = 0;\n\t\tfor (Example rightExample : rightExampleSet) {\n\t\t\t// perform right join, but add example only if it has not been matched during left join\n\t\t\t// above\n\t\t\tif (!mappedRightExamples.contains(new DoubleArrayWrapper(getKeyValues(rightExample, rightKeyAttributes)))) {\n\t\t\t\taddRightOnlyOccurence(originalAttributeSources, unionAttributeList, builder, rightExample, leftKeyAttributes,\n\t\t\t\t\t\trightKeyAttributes, keepBoth, removeDoubleAttributes);\n\t\t\t}\n\t\t\t// trigger operator progress every 100 examples\n\t\t\t++progressCounter;\n\t\t\tif (progressCounter % 100 == 0) {\n\t\t\t\tgetProgress().step(100);\n\t\t\t\tprogressCounter = 0;\n\t\t\t}\n\t\t}\n\t\treturn builder;\n\t}", "public T caseFromJoin(FromJoin object)\n {\n return null;\n }", "@Override\n public long getJoinPositionCount()\n {\n return 0;\n }", "protected abstract Object calcJoinRow();", "@Test\n public void testFullOuterJoinWithAliases() throws Exception {\n String sql = \"Select myG.a myA, myH.b from g myG full outer join h myH on myG.x=myH.x\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verifyAliasSymbolWithElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, 1, \"myA\", \"myG.a\");\n verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, 2, \"myH.b\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n\n Node jpNode = verify(fromNode, From.CLAUSES_REF_NAME, JoinPredicate.ID);\n verifyJoin(jpNode, JoinTypeTypes.JOIN_FULL_OUTER);\n\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"myG\", \"g\");\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"myH\", \"h\");\n\n Node criteriaNode = verify(jpNode, JoinPredicate.JOIN_CRITERIA_REF_NAME, CompareCriteria.ID);\n verifyProperty(criteriaNode, AbstractCompareCriteria.OPERATOR_PROP_NAME, CriteriaOperator.Operator.EQ.name());\n\n Node leftExpression = verify(criteriaNode, AbstractCompareCriteria.LEFT_EXPRESSION_REF_NAME, ElementSymbol.ID);\n verifyProperty(leftExpression, Symbol.NAME_PROP_NAME, \"myG.x\");\n\n Node rightExpression = verify(criteriaNode, CompareCriteria.RIGHT_EXPRESSION_REF_NAME, ElementSymbol.ID);\n verifyProperty(rightExpression, Symbol.NAME_PROP_NAME, \"myH.x\");\n \n verifySql(\"SELECT myG.a AS myA, myH.b FROM g AS myG FULL OUTER JOIN h AS myH ON myG.x = myH.x\", fileNode);\n }", "public void setJoined() {\n\t\tstate = State.JOINED;\n\t}", "public Expression getJoins() {\r\n\t\tif (joins == null) {\r\n\t\t\tjoins = buildNullExpression();\r\n\t\t}\r\n\t\treturn joins;\r\n\t}", "public boolean autoJoinAllowed() {\n return _autoJoin;\n }", "@Test\n \tpublic void whereClauseForNodeLeftOverlap() {\n \t\tnode23.addJoin(new LeftOverlap(node42));\n \t\tcheckWhereCondition(\n \t\t\t\tjoin(\"=\", \"_node23.text_ref\", \"_node42.text_ref\"),\n \t\t\t\tjoin(\"<=\", \"_node23.left\", \"_node42.left\"),\n \t\t\t\tjoin(\"<=\", \"_node42.left\", \"_node23.right\"),\n \t\t\t\tjoin(\"<=\", \"_node23.right\", \"_node42.right\")\n \t\t);\n \t}", "public QueryCore buildQuery() throws SQLException\n {\n if(l != null)\n {\n for(int i=0;i<l.size();i++)\n {\n prepStm.setObject(i+1,l.get(i));\n }\n }\n return this;\n }", "@VisibleForTesting\n protected void appendEquals(String leftTable,\n String leftField,\n String rightTable,\n String rightField,\n boolean joinOnNullKeys) {\n if (joinOnNullKeys) {\n builder.append(OPEN_GROUP);\n }\n\n // ...table1.column1 = table2.column2...\n builder.append(leftTable).append(DOT).append(leftField);\n builder.append(EQ);\n builder.append(rightTable).append(DOT).append(rightField);\n\n if (joinOnNullKeys) {\n // ... OR (table1.column1 IS NULL AND table2.column2 IS NULL))...\n builder.append(OR).append(OPEN_GROUP);\n builder.append(leftTable).append(DOT).append(leftField).append(IS_NULL);\n builder.append(AND);\n builder.append(rightTable).append(DOT).append(rightField).append(IS_NULL);\n builder.append(CLOSE_GROUP).append(CLOSE_GROUP);\n }\n }", "protected Expression buildBSRJoinQuery() {\n try {\n final InputStream input = ResourceUtil.getResourceAsStream(QUERY_FILE);\n final QueryExpression query = QueryExpressionParser.parse(input);\n return query.toExpression(new ReferenceTable(catalog));\n } catch (final Exception e) {\n throw new RuntimeException(e);\n }\n }", "private void appendTempTableRightSideJoin(\r\n Object source,\r\n Attribute[] prototypeAttributes,\r\n MithraFastList<Attribute> nullAttributes,\r\n int pkAttributeCount,\r\n TupleTempContext tempContext,\r\n StringBuilder builder)\r\n {\r\n builder.append(tempContext.getFullyQualifiedTableName(source, this.getMithraObjectPortal().getPersisterId()));\r\n builder.append(\" t1 where \");\r\n this.constructJoin(prototypeAttributes, nullAttributes, pkAttributeCount, builder);\r\n }", "public KoleksiRelationExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }", "private void putInLeftMap(Register[] register) {\n Object key = register[leftJoinAttributeIndex].getObject();\n List<Register[]> found = leftMap.get(key);\n if (found == null) {\n found = new ArrayList<>();\n leftMap.put(key, found);\n }\n\n found.add(register);\n }", "@Test\r\n\tvoid join() {\r\n\t\tQuery query = entityManager.createQuery(\"Select c,s from Course c JOIN c.students s\");\r\n\t\tList<Object[]> resultList = query.getResultList();\r\n\t\tlog.info(\"Result Size -> {}\", resultList.size());\r\n\t\tfor (Object[] result : resultList) {\r\n\t\t\tlog.info(\"Course -> {}\", result[0]);\r\n\t\t\tlog.info(\"Student -> {}\", result[1]);\r\n\t\t}\r\n\t}", "public Builder autoJoin(boolean autoJoin) {\n _autoJoin = autoJoin;\n return this;\n }", "private void appendPrimaryTableName() {\n super.appendTableName(Constants.FROM, joinQueryInputs.primaryTableName);\n }", "public Object caseJoin(Join object) {\r\n\t\treturn null;\r\n\t}", "public Join dup (Join self)\n {\n if (self == null)\n return null;\n\n Join copy = new Join ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.group = self.group;\n copy.status = self.status;\n return copy;\n }", "@Test\n public void testMixedJoin3() throws Exception {\n String sql = \"SELECT * FROM g1, g2 inner join g3 on g2.a=g3.a\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n\n verify(selectNode, Select.SYMBOLS_REF_NAME, MultipleElementSymbol.ID);\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"g1\");\n\n Node jpNode = verify(fromNode, From.CLAUSES_REF_NAME, 2, JoinPredicate.ID);\n verifyJoin(jpNode, JoinTypeTypes.JOIN_INNER);\n\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g2\");\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"g3\");\n\n Node criteriaNode = verify(jpNode, JoinPredicate.JOIN_CRITERIA_REF_NAME, CompareCriteria.ID);\n verifyProperty(criteriaNode, AbstractCompareCriteria.OPERATOR_PROP_NAME, CriteriaOperator.Operator.EQ.name());\n\n Node leftExpression = verify(criteriaNode, AbstractCompareCriteria.LEFT_EXPRESSION_REF_NAME, ElementSymbol.ID);\n verifyProperty(leftExpression, Symbol.NAME_PROP_NAME, \"g2.a\");\n\n Node rightExpression = verify(criteriaNode, CompareCriteria.RIGHT_EXPRESSION_REF_NAME, ElementSymbol.ID);\n verifyProperty(rightExpression, Symbol.NAME_PROP_NAME, \"g3.a\");\n \n verifySql(\"SELECT * FROM g1, g2 INNER JOIN g3 ON g2.a = g3.a\", fileNode);\n }", "@Override\n @Test\n public void testSimpleJoin() throws Exception { }", "@Test\n public void testMixedJoin() throws Exception {\n String sql = \"SELECT * FROM g1 cross join (g2 cross join g3), g4\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verify(selectNode, Select.SYMBOLS_REF_NAME, MultipleElementSymbol.ID);\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n\n Node jpNode1 = verify(fromNode, From.CLAUSES_REF_NAME, JoinPredicate.ID);\n verifyJoin(jpNode1, JoinTypeTypes.JOIN_CROSS);\n\n Node jpNode2 = verify(jpNode1, JoinPredicate.RIGHT_CLAUSE_REF_NAME, JoinPredicate.ID);\n verifyJoin(jpNode2, JoinTypeTypes.JOIN_CROSS);\n\n verifyUnaryFromClauseGroup(jpNode1, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g1\");\n verifyUnaryFromClauseGroup(jpNode2, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g2\");\n verifyUnaryFromClauseGroup(jpNode2, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"g3\");\n \n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 2, \"g4\");\n \n verifySql(\"SELECT * FROM g1 CROSS JOIN (g2 CROSS JOIN g3), g4\", fileNode);\n }", "public void addJoinOn(boolean enabled, String join) {\r\n\t\tif (enabled) {\r\n\t\t\taddJoinOn(join);\r\n\t\t}\r\n\t}", "@Test\n public void testMixedJoin2() throws Exception {\n String sql = \"SELECT * FROM g1 cross join (g2 cross join g3), g4, g5 cross join g6\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verify(selectNode, Select.SYMBOLS_REF_NAME, MultipleElementSymbol.ID);\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n\n Node jpNode1 = verify(fromNode, From.CLAUSES_REF_NAME, 1, JoinPredicate.ID);\n verifyJoin(jpNode1, JoinTypeTypes.JOIN_CROSS);\n\n verifyUnaryFromClauseGroup(jpNode1, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g1\");\n \n Node jpNode2 = verify(jpNode1, JoinPredicate.RIGHT_CLAUSE_REF_NAME, JoinPredicate.ID);\n verifyJoin(jpNode2, JoinTypeTypes.JOIN_CROSS);\n \n verifyUnaryFromClauseGroup(jpNode2, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g2\");\n verifyUnaryFromClauseGroup(jpNode2, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"g3\");\n\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 2, \"g4\");\n\n Node jpNode3 = verify(fromNode, From.CLAUSES_REF_NAME, 3, JoinPredicate.ID);\n verifyJoin(jpNode3, JoinTypeTypes.JOIN_CROSS);\n\n verifyUnaryFromClauseGroup(jpNode3, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g5\");\n verifyUnaryFromClauseGroup(jpNode3, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"g6\");\n \n verifySql(\"SELECT * FROM g1 CROSS JOIN (g2 CROSS JOIN g3), g4, g5 CROSS JOIN g6\", fileNode);\n }", "Table noCommonJoin(String name, Table t1, Table t2) {\n {\n String[] names = new String[t1.colSize() + t2.colSize()];\n String[] types = new String[t1.colSize() + t2.colSize()];\n\n System.arraycopy(t1.getColNames(), 0, names, 0, t1.colSize());\n System.arraycopy(t2.getColNames(), 0, names, t1.colSize(), t2.colSize());\n System.arraycopy(t1.getColTypes(), 0, types, 0, t1.colSize());\n System.arraycopy(t2.getColTypes(), 0, types, t1.colSize(), t2.colSize());\n\n Table t = new Table(name, names, types);\n\n for (int i = 0; i < t1.rowSize(); i += 1) {\n for (int j = 0; j < t2.rowSize(); j += 1) {\n t.insertLastRow(t1.combineRows(t2, i, j));\n }\n }\n return t;\n }\n }", "public RepoSQL() { // constructor implicit\r\n\t\t super();\r\n\t }", "public String getHqlJoinString(String rootKey, String entityKey) {\n ArrayList<String> joinTables = new ArrayList<>();\n for (FieldDefinition definition : this.fieldDefinitions) {\n joinTables.addAll(this.getHqlJoinParts(rootKey, definition));\n }\n if (!joinTables.isEmpty()) {\n String joinString = \" LEFT JOIN \";\n StringJoiner s = new StringJoiner(joinString);\n for (String table : joinTables) {\n s.add(table);\n }\n return joinString + s.toString();\n }\n return \"\";\n }", "@Test\n public void testCrossJoin() throws Exception {\n String sql = \"SELECT * FROM g1 cross join g2\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verify(selectNode, Select.SYMBOLS_REF_NAME, MultipleElementSymbol.ID);\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n\n Node jpNode = verify(fromNode, From.CLAUSES_REF_NAME, JoinPredicate.ID);\n verifyJoin(jpNode, JoinTypeTypes.JOIN_CROSS);\n\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"g1\");\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"g2\");\n \n verifySql(\"SELECT * FROM g1 CROSS JOIN g2\", fileNode);\n }", "@Test(timeout = 4000)\n public void test029() throws Throwable {\n String[] stringArray0 = new String[5];\n String string0 = SQLUtil.join(\"l+YW\", \"pvs\", stringArray0, \"/*\", stringArray0[4], stringArray0);\n assertEquals(\"l+YW join /* as null on pvs.null = null.null and pvs.null = null.null and pvs.null = null.null and pvs.null = null.null and pvs.null = null.null\", string0);\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n String[] stringArray0 = new String[7];\n String string0 = SQLUtil.join(\"calloeqdkmcg0dtw\", \"4$\", stringArray0, stringArray0[3], \"insert\", stringArray0);\n assertEquals(\"calloeqdkmcg0dtw join null as insert on 4$.null = insert.null and 4$.null = insert.null and 4$.null = insert.null and 4$.null = insert.null and 4$.null = insert.null and 4$.null = insert.null and 4$.null = insert.null\", string0);\n }", "private Register[] createJoinResult(Register[] left, Register[] right) {\n Register[] result = new Register[left.length + right.length - 1]; // -1 because of joining key\n\n int pos = 0;\n for (int i = 0; i < left.length; i++) {\n result[pos++] = left[i];\n }\n\n for (int i = 0; i < right.length; i++) {\n if (i != rightJoinAttributeIndex) {\n result[pos++] = right[i];\n }\n }\n\n return result;\n }", "public static void main(String[] args) {\r\n\t\tJoiner joiner = Joiner.on(\",\").skipNulls();\r\n\r\n\t\tSystem.out.println(joiner.join(\"One\", \"Two\", null, \"Four\", \"Five\", null, \"Seven\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// returns the string \"One,Two,Four,Five,Seven\".\r\n\r\n\t\t/**\r\n\t\t * Alternative to the use of skipNulls(), we can also use\r\n\t\t * useForNull(String) to specify a string instead of null.\r\n\t\t */\r\n\t\tJoiner joiner1 = Joiner.on(\",\").useForNull(\"Sample\");\r\n\t\tSystem.out.println(joiner1.join(\"One\", \"Two\", null, \"Four\", \"Five\", null, \"Seven\"));\r\n\t\t\t\t\t\t\t\t\t\t\t// returns the string \"One,Two,Sample,Four,Five,Sample,Seven\".\r\n\t\t\t\t\t\t\t\t\t\t\t// It replace null value with 'Sample'\r\n\r\n\t\t/**\r\n\t\t * Using Joiner, we have seen joining variable number of Objects. we can\r\n\t\t * also join all the Objects in an Iterable, also all the elements in an\r\n\t\t * array.\r\n\t\t * \r\n\t\t */\r\n\t\tSystem.out.println(Joiner.on(\",\").join(Arrays.asList(1, 5, 7)));\t// returns 1,5,7\r\n\t\t\r\n\t\t/**\r\n\t\t * NOTE:\r\n\t\t * \r\n\t\t * \t\t1. joiner instances are always Immutable. \r\n\t\t * \t\t2. The joiner configuration methods will always return a new Joiner, which you must use to get\r\n\t\t * \t\t\tthe desired semantics. This makes Joiner thread-safe, and usable as static final constant.\r\n\t\t * \r\n\t\t */\r\n\t\t\r\n\t\t/**\r\n\t\t * Below is the comparison of using Joiner's join and joining typical java api style:\r\n\t\t * \r\n\t\t */\r\n\t\tList<String> stringList = new ArrayList<String>();\r\n\t\tstringList.add(\"One\");\r\n\t\tstringList.add(\"Two\");\r\n\t\tstringList.add(\"Three\");\r\n\t\tstringList.add(\"Four\");\r\n\t\tstringList.add(\"Five\");\r\n\r\n\t\tSystem.out.println(\"String Joined typical style: \" + buildString(stringList, \",\"));\r\n\r\n\t\tSystem.out.println(\"String Joined using Joiner class: \" + Joiner.on(\",\").skipNulls().join(stringList));\r\n\t}", "public QueryBuilder()\n {\n\tlabel = null;\n\tqueryCondition = null;\n\tselectionLimiter = null;\n\tselectionSorter = null;\n\n\tvariablesMap = new HashMap<String, Expression>();\n\tselectionLabelsReferencedByStats = new HashSet<String>();\n }", "private void loadCriteriaLeft() {\n for (Criteria criteria : criteriaList) {\n criteriaLeft.add(criteria.getKey());\n }\n }", "<R> R join(Function<First, R> mapFirst);", "public OwJoinedTable(OwTableReference tableReference1_p, OwTableReference tableReference2_p, OwJoinSpecification joinSpecification_p)\r\n {\r\n this(tableReference1_p, DEFAULT_JOIN_TYPE, tableReference2_p, joinSpecification_p);\r\n }", "@Test(timeout = 4000)\n public void test044() throws Throwable {\n String[] stringArray0 = new String[12];\n String string0 = SQLUtil.innerJoin(\".z$m\", stringArray0, \"\", \"h?%,\", stringArray0);\n assertEquals(\" as h?%, on .z$m.null = h?%,.null and .z$m.null = h?%,.null and .z$m.null = h?%,.null and .z$m.null = h?%,.null and .z$m.null = h?%,.null and .z$m.null = h?%,.null and .z$m.null = h?%,.null and .z$m.null = h?%,.null and .z$m.null = h?%,.null and .z$m.null = h?%,.null and .z$m.null = h?%,.null and .z$m.null = h?%,.null\", string0);\n }", "public PseudoQuery() {\r\n\t}", "@Test(timeout = 4000)\n public void test134() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.leftJoin(\"deletesetci\", (String[]) null, \"deletesetci\", \"BouncyCastleProvider\", (String[]) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test\n public void testRightOuterJoinWithAliases() throws Exception {\n String sql = \"Select myG.a myA, myH.b from g myG right outer join h myH on myG.x=myH.x\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verifyAliasSymbolWithElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, 1, \"myA\", \"myG.a\");\n verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, 2, \"myH.b\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n\n Node jpNode = verify(fromNode, From.CLAUSES_REF_NAME, JoinPredicate.ID);\n verifyJoin(jpNode, JoinTypeTypes.JOIN_RIGHT_OUTER);\n\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"myG\", \"g\");\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"myH\", \"h\");\n\n Node criteriaNode = verify(jpNode, JoinPredicate.JOIN_CRITERIA_REF_NAME, CompareCriteria.ID);\n verifyProperty(criteriaNode, AbstractCompareCriteria.OPERATOR_PROP_NAME, CriteriaOperator.Operator.EQ.name());\n\n Node leftExpression = verify(criteriaNode, AbstractCompareCriteria.LEFT_EXPRESSION_REF_NAME, ElementSymbol.ID);\n verifyProperty(leftExpression, Symbol.NAME_PROP_NAME, \"myG.x\");\n\n Node rightExpression = verify(criteriaNode, CompareCriteria.RIGHT_EXPRESSION_REF_NAME, ElementSymbol.ID);\n verifyProperty(rightExpression, Symbol.NAME_PROP_NAME, \"myH.x\");\n \n verifySql(\"SELECT myG.a AS myA, myH.b FROM g AS myG RIGHT OUTER JOIN h AS myH ON myG.x = myH.x\", fileNode);\n }", "private String getJoins() {\r\n\t\treturn joins;\r\n\t}", "public Relation join(Relation r, Condition c, String name) throws RelationException;", "@NotNull\n DfType join(@NotNull DfType other);", "public void addJoin(String left, String right, boolean outer, int reltype) {\r\n DSJoinDescriptor d = new DSJoinDescriptor(left, right, outer, reltype);\r\n _joins.addElement(d);\r\n }", "public Delta setAutoJoin(boolean autoJoin) {\n _builder.autoJoin(autoJoin);\n _updateFields.add(Fields.AUTO_JOIN);\n return this;\n }", "public Query() {\n\n// oriToRwt = new HashMap();\n// oriToRwt.put(); // TODO\n }", "public boolean isJoin()\r\n { return type == JOIN; }", "@Override\n protected PlanNode clone() throws CloneNotSupportedException {\n NestedLoopsJoinNode node = (NestedLoopsJoinNode) super.clone();\n\n // Clone the predicate.\n if (predicate != null)\n node.predicate = predicate.duplicate();\n else\n node.predicate = null;\n\n return node;\n }", "protected AbstractJoSQLFilter ()\n {\n\n }", "public RelationPredicate(){}", "@Test\n public void testRightJoinWithAliases() throws Exception {\n String sql = \"Select myG.a myA, myH.b from g myG right join h myH on myG.x=myH.x\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verifyAliasSymbolWithElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, 1, \"myA\", \"myG.a\");\n verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, 2, \"myH.b\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n\n Node jpNode = verify(fromNode, From.CLAUSES_REF_NAME, JoinPredicate.ID);\n verifyJoin(jpNode, JoinTypeTypes.JOIN_RIGHT_OUTER);\n\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.LEFT_CLAUSE_REF_NAME, \"myG\", \"g\");\n verifyUnaryFromClauseGroup(jpNode, JoinPredicate.RIGHT_CLAUSE_REF_NAME, \"myH\", \"h\");\n\n Node criteriaNode = verify(jpNode, JoinPredicate.JOIN_CRITERIA_REF_NAME, CompareCriteria.ID);\n verifyProperty(criteriaNode, AbstractCompareCriteria.OPERATOR_PROP_NAME, CriteriaOperator.Operator.EQ.name());\n\n Node leftExpression = verify(criteriaNode, AbstractCompareCriteria.LEFT_EXPRESSION_REF_NAME, ElementSymbol.ID);\n verifyProperty(leftExpression, Symbol.NAME_PROP_NAME, \"myG.x\");\n\n Node rightExpression = verify(criteriaNode, CompareCriteria.RIGHT_EXPRESSION_REF_NAME, ElementSymbol.ID);\n verifyProperty(rightExpression, Symbol.NAME_PROP_NAME, \"myH.x\");\n \n verifySql(\"SELECT myG.a AS myA, myH.b FROM g AS myG RIGHT OUTER JOIN h AS myH ON myG.x = myH.x\", fileNode);\n }", "public CoalesceSQLListFunction()\n {\n throw new NullPointerException(\"parameters required\");\n }" ]
[ "0.6853452", "0.66320306", "0.65926135", "0.6185741", "0.60928905", "0.60616994", "0.60538393", "0.5994545", "0.59095925", "0.5887951", "0.5833282", "0.57745874", "0.5764654", "0.57643", "0.57513636", "0.57206243", "0.57035136", "0.56855255", "0.56672937", "0.55381423", "0.55339587", "0.55131555", "0.5510134", "0.54306763", "0.54286504", "0.5395308", "0.5339138", "0.52543956", "0.52248037", "0.5223032", "0.5221232", "0.5194969", "0.5172489", "0.5156968", "0.5155794", "0.51493454", "0.5138006", "0.5125248", "0.50658876", "0.50576365", "0.50549966", "0.5050701", "0.49749562", "0.49595737", "0.49476442", "0.49391815", "0.4925777", "0.492098", "0.49176368", "0.48993525", "0.48826256", "0.48690203", "0.48632842", "0.48539978", "0.48374227", "0.4829812", "0.48294336", "0.48288754", "0.4817258", "0.48166168", "0.48010492", "0.47965008", "0.47821727", "0.4776249", "0.47757718", "0.47709766", "0.4767967", "0.47676617", "0.47652468", "0.4758081", "0.47543123", "0.4739217", "0.47381738", "0.4729896", "0.4729726", "0.4697904", "0.468815", "0.4684604", "0.4674594", "0.46733767", "0.46731225", "0.46622047", "0.46411455", "0.46356645", "0.46329534", "0.46173006", "0.459322", "0.45910951", "0.45869383", "0.4571755", "0.45707843", "0.4570435", "0.45665067", "0.4566064", "0.4557783", "0.4552107", "0.4549292", "0.4542588", "0.45390835", "0.45353833" ]
0.56077474
19
Creates an array based on the specified vararg
public static FetchJoinInformation[] of(FetchJoinInformation... joins) { return joins; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Array createArray();", "ArrayValue createArrayValue();", "public static <T> T[] createArray (T... args) {\n\tif (args == null) { return (T[]) new Object[0]; };\n\treturn args;\n }", "public static IntegerVarArray make(int[] buffer) {\n\t\treturn new IntegerVarArray(buffer);\n\t}", "static <T> T[] toArray(T... args) {\n return args;\n }", "public static <T> T[] f(T[] arg){\n return arg;\n }", "static public JSObject createArgumentsObject(JSEnvironment env, Object[] arr) throws Exception {\r\n\t\tJSArray arguments = new JSArray(env, arr.length);\r\n\t\tfor (int i = 0; i < arr.length; i++)\r\n\t\t\targuments.set(i, arr[i]);\r\n\t\targuments.defineProperty(\"length\", new Double(arr.length));\r\n\t\treturn arguments;\r\n\t}", "Object createArray(int capacity);", "public Stmt\ninitiateArray(\n Exp pArray, Exp pInitExp,\n Exp pFrom, Exp pTo, Subp pSubp );", "public static int[] create(int n, int v) {\r\n\t\tint[] x = new int[n];\r\n\t\tfor( int i=0; i<n; i++ ) x[i] = v;\r\n\t\treturn x;\r\n\t}", "private int[] createArrays(int size) {//creating method, using variable \"SIZE\"\n\t\tint [] array = new int[size];\n\t\treturn array;\n\t}", "public static IntegerVarArray make(int count) {\n\t\treturn new IntegerVarArray(count);\n\t}", "public static Person[] createList(Person... persons){\n Person[] people = persons;\n return people;\n }", "public void makeArray(int size) {\n\t\t\n\t}", "@Test\n public void testIndirectArrayCreation() {\n final String[] array = toArrayPropagatingType(\"foo\", \"bar\");\n assertEquals(2, array.length);\n assertEquals(\"foo\", array[0]);\n assertEquals(\"bar\", array[1]);\n }", "@Test\n public void testArrayCreation() {\n final String[] array = ArrayUtils.toArray(\"foo\", \"bar\");\n assertEquals(2, array.length);\n assertEquals(\"foo\", array[0]);\n assertEquals(\"bar\", array[1]);\n }", "public void makeArray(int num)\n {\n \tmakeArray(num,0);\n }", "public static IntegerVarArray make(int size, PrimArray from, int sourceOffset, int count, int destOffset) {\n\t\treturn new IntegerVarArray(size, from, sourceOffset, count, destOffset);\n\t}", "Array(int[] n) {\n\t\tarray = n;\n\t}", "@SuppressWarnings(\"unchecked\")\n protected static <V> V[] toVarArgs(List<V> list, Class<V> cls) {\n return list != null ? list.toArray((V[]) Array.newInstance(cls, list.size())) : (V[]) null;\n }", "SAFEARRAY.ByReference SafeArrayCreate(VARTYPE vt, UINT cDims,\n\t\t\tSAFEARRAYBOUND[] rgsabound);", "@Test\n public void testArrayCreationWithDifferentTypes() {\n final Number[] array = ArrayUtils.<Number>toArray(Integer.valueOf(42), Double.valueOf(Math.PI));\n assertEquals(2, array.length);\n assertEquals(Integer.valueOf(42), array[0]);\n assertEquals(Double.valueOf(Math.PI), array[1]);\n }", "@SuppressWarnings(\"null\")\n @Override\n public Object[] apply(Object[] input) {\n if (input == null) {\n input = new Object[0];\n }\n Object ret[] = new Object[candidateArgsLen];\n if (candidateArgsLen > 1) {\n System.arraycopy(input, 0, ret, 0, candidateArgsLen - 1);\n }\n int varArgLen = input.length - candidateArgsLen + 1;\n Object incomingVarArgs[] = doAppendVarArgs ? (Object[]) input[input.length - 1]\n : null;\n Object varArgValues[];\n if (doAppendVarArgs) {\n varArgLen--; // skip the last arg, which is the incoming var arg array\n varArgValues = (Object[]) Array.newInstance(varArgType, varArgLen +\n incomingVarArgs.length);\n } else {\n varArgValues = (Object[]) Array.newInstance(varArgType, varArgLen);\n }\n System.arraycopy(input, candidateArgsLen - 1, varArgValues, 0, varArgLen);\n if (doAppendVarArgs) {\n System.arraycopy(incomingVarArgs, 0, varArgValues, varArgLen,\n incomingVarArgs.length);\n }\n ret[ret.length - 1] = varArgValues;\n return ret;\n }", "public static int[] createArray(int n) {\r\n\t\tmyOriginalArray = new int[n];\r\n\t\treturn myOriginalArray;\r\n\t}", "private Function1<Seq<String>, String[]> arrayFunction() {\n return new AbstractFunction1<Seq<String>, String[]>() {\n @Override\n public String[] apply(Seq<String> v1) {\n String[] array = new String[v1.size()];\n v1.copyToArray(array);\n return array;\n }\n };\n }", "T[] toArray(T[] a);", "public <T> T[] toArray(T[] arr);", "ArrayTypeRule createArrayTypeRule();", "public a[] newArray(int i) {\n return new a[i];\n }", "@Override\n public String visit(ArrayCreationExpr n, Object arg) {\n return null;\n }", "public Object[] getInitArgs(String[] input){\n Object result[] = new Object[input.length];\n for (int i = 0; i < input.length; i++){\n if (isNumeric(input[i])){\n result[i] = Integer.parseInt(input[i]);\n }else{\n result[i] = input[i];\n }\n }\n return result;\n }", "@SuppressWarnings(\"unchecked\")\n private T[] createArray(int size) {\n return (T[]) Array.newInstance(type, size);\n }", "public <T> T[] toArray(T[] arg0) {\n\t\treturn null;\n\t}", "FunWithArrays(int size){\r\n\t\tnumbers = new int[size];\r\n\t}", "Exp getArrayExp();", "public abstract int[] toIntArray();", "void mo12207a(int[] iArr);", "public static void main(String[] args) {\n\n for(int i=0; i<3;i++){\n // arr[i] = new Array1(i+3,i*2);\n //arr[0] = arr.getArray(3,5);\n\n }\n\n }", "public <Q> Q[] asDataArray(Q[] a);", "@Test\n public void testArrayCreationWithGeneralReturnType() {\n final Object obj = ArrayUtils.toArray(\"foo\", \"bar\");\n assertTrue(obj instanceof String[]);\n }", "public static NewArrayExpression newArrayInit(Class type, Iterable<Expression> expressions) { throw Extensions.todo(); }", "public static NewArrayExpression newArrayInit(Class type, Expression[] expressions) { throw Extensions.todo(); }", "public Integer[] createArray() {\n Integer[] value = new Integer[defaultLaenge];\n\n for (int i = 0; i < value.length; i++) {\n value[i] = (int)(value.length*Math.random());\n }\n\n return value;\n }", "private void newArrayInitialize(NewArrayIRTuple instr) throws IOException{\n\n String type = (String)instr.getArg0();\n ArgumentVariable arg1 = new ArgumentVariable(instr.getArg1());\n ArgumentVariable result = new ArgumentVariable(instr.getResult());\n\n //Store $ra on stack\n writer.write(\"addi $sp, $sp, -20\\n\");\n writer.write(\"sw $ra, 16($sp)\\n\");\n\n //Store $a0\n writer.write(\"sw $a0, 12($sp)\\n\");\n\n //Store $t0-$t1 on the stack\n for(int i = 0; i < 2; i++)\n {\n writer.write(\"sw $t\" + i + \", \" + (8 - (4*i)) + \"($sp)\\n\");\n }\n\n //Store $v0 on the stack\n writer.write(\"sw $v0, 0($sp)\\n\");\n\n if(arg1.type.equals(\"constant\"))\n writer.write(\"li $a0, \" + arg1.getValue(curAddTable) + \"\\n\");\n else\n writer.write(\"move $a0, \" + arg1.getValue(curAddTable) + \"\\n\");\n if(type.equals(\"int\"))\n writer.write(\"sll $a0, $a0, 2\\n\");\n\n //Call the function of \"_new_array\"\n writer.write(\"jal _new_array\\n\");\n writer.write(\"lw $t0, 8($sp)\\n\");\n writer.write(\"lw $t1, 4($sp)\\n\");\n\n writer.write(\"lw $a0, 12($sp)\\n\");\n writer.write(\"move \" + result.getValue(curAddTable) + \", $v0\\n\");\n\n writer.write(\"lw $v0, 0($sp)\\n\");\n writer.write(\"lw $ra, 16($sp)\\n\");\n writer.write(\"addi $sp, $sp, 20\\n\");\n\n }", "void mo3807a(C0985po[] poVarArr);", "private static int[] createArray(int n) {\n\t \tint[] array = new int[n];\n\t \tfor(int i=0; i<n; i++){\n\t \t\tarray[i] = (int)(Math.random()*10);\n\t \t}\n\t\t\treturn array;\n\t\t}", "@Override\r\n\t\tpublic Array createArrayOf(String typeName, Object[] elements)\r\n\t\t\t\tthrows SQLException {\n\t\t\treturn null;\r\n\t\t}", "public o000000ooo[] newArray(int i) {\n return new o000000ooo[i];\n }", "public String visit(ArrayAllocationExpression n, Object argu) \n\t{\n\t\tString _ret=null;\n\t\t\n\t if (n.f3.accept(this, argu).equals(\"int\"))\n\t {\n\t \t_ret = \"int[]\";\n\t }\n\n\t return _ret;\n\t}", "private static int[] arrayInitializer(int length) {\n int[] myArray = new int[length];\n Random rand = new Random();\n for (int i = 0; i < length; i++) {\n myArray[i] = rand.nextInt(1000);\n }\n return myArray;\n }", "public MutableArray(int paramInt, int[] paramArrayOfInt, ORADataFactory paramORADataFactory)\n/* */ {\n/* 122 */ this.sqlType = paramInt;\n/* 123 */ this.factory = paramORADataFactory;\n/* 124 */ this.isNChar = false;\n/* */ \n/* 126 */ setArray(paramArrayOfInt);\n/* */ }", "public static void arrayCreation() {\n int[] arr = new int[3];\n // as we are using new operator and that is how we create objects hence arrays\n // are called objects\n // every array in java is an object\n System.out.println(arr.getClass()\n .getSimpleName()); // int[]\n System.out.println(arr.getClass()\n .getName()); // [I\n\n int[] a1 = new int[3];\n int[][] a2 = new int[3][3];\n double[] a3 = new double[3];\n short[] a4 = new short[3];\n byte[] a5 = new byte[3];\n boolean[] a6 = new boolean[3];\n long[] a7 = new long[3];\n float[] a8 = new float[3];\n Integer[] a9 = new Integer[3];\n\n System.out.println(a1.getClass()\n .getName()); // [I\n System.out.println(a2.getClass()\n .getName()); // [[I\n System.out.println(a3.getClass()\n .getName()); // [D\n System.out.println(a4.getClass()\n .getName()); // [S\n System.out.println(a5.getClass()\n .getName()); // [B\n System.out.println(a6.getClass()\n .getName()); // [Z\n System.out.println(a7.getClass()\n .getName()); // [J\n System.out.println(a8.getClass()\n .getName()); // [F\n System.out.println(a9.getClass()\n .getName()); // [Ljava.lang.Integer;\n\n // at the time of the array initialization we should compulsory specify the size\n // new int[3] we should specify the size else it will lead to compilation error\n\n // It is legal to have size zero in java\n int[] a = new int[0];\n System.out.println(a);\n\n }", "public static RubyArray newArray(Ruby ruby, long len) {\n \t\treturn new RubyArray(ruby, new ArrayList((int) len));\n \t}", "int[] mo12208a(int i);", "public MutableArray(int paramInt, double[] paramArrayOfDouble, ORADataFactory paramORADataFactory)\n/* */ {\n/* 111 */ this.sqlType = paramInt;\n/* 112 */ this.factory = paramORADataFactory;\n/* 113 */ this.isNChar = false;\n/* */ \n/* 115 */ setArray(paramArrayOfDouble);\n/* */ }", "Object[] args();", "private String[] toArray(String str) { String arr[] = new String[1]; arr[0] = str; return arr; }", "public static int[] vector(int x, int y) { return new int[] {x,y}; }", "@Test\n public void testToArray_0args() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n Integer[] expResult = { 1, 2, 3, 4, 5, 6 };\n Object[] result = instance.toArray();\n assertArrayEquals(expResult, result);\n\n }", "public VariType visit(ArrayAllocationExpression n, Table argu) { \n\t VariType _ret = new VariType();\n\t n.f0.accept(this, argu);\n\t n.f1.accept(this, argu);\n\t n.f2.accept(this, argu);\n\t VariType t3 = n.f3.accept(this, argu);\n\t n.f4.accept(this, argu);\n\t if(t3.type != \"Integer\") {\n\t \t PrintError.errorexist = true;\n\t \t String emsg = \"array length type does not match type Integer\";\n\t \t PrintError.print(emsg, n.f2.beginLine, n.f2.beginColumn, 1);\n\t }\n\t _ret.type = \"Array\";\n\t if(t3.ifintegerliteral == true) {\n\t \t _ret.ifintegerliteral = true;\n\t \t _ret.integerliteral = t3.integerliteral;\n\t }\n\t return _ret;\n\t }", "public DynamicArray(){\n\t \n\t array = (E[]) new Object[dim];\n }", "private static int[] buildArray(int num) {\n\t\t// TODO build an array with num elements\n\t\tif(num ==0) return null;\n\t\t\n\t\tint[] array = new int[num];\n\t\tfor(int i=0; i<num; i++){\n\t\t\t\n\t\t\tarray[i] = (int)(Math.random()*15);\n\t\t}\n\t\t\n\t\treturn array;\n\t}", "private void createArray() {\n\t\tdata = new Integer[userInput];\n\t\tRandom rand = new Random();\n\n\t\t// load the array with random numbers\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tdata[i] = rand.nextInt(maximumNumberInput);\n\t\t}\n\n\t\t// copy the array to the sorting method\n\t\tinsertionData = data.clone();\n\t\tquickData = data.clone();\n\n\t}", "private Object[] getArguments (String className, Object field)\n\t{\n\t\treturn ((field == null) ? new Object[]{className} : \n\t\t\tnew Object[]{className, field});\n\t}", "public <T> T[] a(T[] tArr, T[] tArr2) {\n int length = tArr.length;\n int length2 = tArr2.length;\n T[] tArr3 = (Object[]) Array.newInstance(tArr.getClass().getComponentType(), length + length2);\n System.arraycopy(tArr, 0, tArr3, 0, length);\n System.arraycopy(tArr2, 0, tArr3, length, length2);\n return tArr3;\n }", "@SuppressWarnings(\"unchecked\")\r\n \tprivate Entry<K,V>[] newArray(int length) {\r\n \treturn new Entry[length];\r\n }", "public C0902id[] newArray(int i) {\n return new C0902id[i];\n }", "private static int[] createArray() {\n\t\trnd = new Random();\r\n\t\trandomArray = new int[8];\r\n\t\tfor (int i = 0; i < 8; i++) {\r\n\t\t\trandomArray[i] = rnd.nextInt(45);\r\n\t\t}\r\n\t\treturn randomArray;\r\n\t}", "public MutableArray(int paramInt, Object[] paramArrayOfObject, ORADataFactory paramORADataFactory)\n/* */ {\n/* 100 */ this.sqlType = paramInt;\n/* 101 */ this.factory = paramORADataFactory;\n/* 102 */ this.isNChar = false;\n/* */ \n/* 104 */ setObjectArray(paramArrayOfObject);\n/* */ }", "public MutableArray(int[] paramArrayOfInt, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 202 */ this.sqlType = paramInt;\n/* 203 */ this.old_factory = paramCustomDatumFactory;\n/* 204 */ this.isNChar = false;\n/* */ \n/* 206 */ setArray(paramArrayOfInt);\n/* */ }", "public f[] newArray(int i) {\r\n return new f[i];\r\n }", "private static Sequence createAnArray(SimpleList<Sequence> candidates, ConcreteType elementType, int length) {\n\t\tint totStatements = 0;\n\t\tList<Sequence> inputSequences = new ArrayList<>();\n\t\tList<Integer> variables = new ArrayList<>();\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tSequence inputSeq = candidates.get(Randomness.nextRandomInt(candidates.size()));\n\t\t\tVariable inputVar = inputSeq.randomVariableForTypeLastStatement(elementType);\n\n\t\t\tassert inputVar != null;\n\t\t\tvariables.add(totStatements + inputVar.index);\n\t\t\tinputSequences.add(inputSeq);\n\t\t\ttotStatements += inputSeq.size();\n\t\t}\n\t\tSequence inputSequence = Sequence.concatenate(inputSequences);\n\t\tList<Variable> inputs = new ArrayList<>();\n\t\tfor (Integer inputIndex : variables) {\n\t\t\tVariable v = inputSequence.getVariable(inputIndex);\n\t\t\tinputs.add(v);\n\t\t}\n\n\t\treturn inputSequence.extend(ConcreteOperation.createArrayCreation(new ConcreteArrayType(elementType), length),\n\t\t\t\tinputs);\n\t}", "public String[] camposDivididos3(String[] vars){\r\nString[] args=vars;\r\nreturn args;\r\n}", "public MutableArray(int paramInt, Datum[] paramArrayOfDatum, ORADataFactory paramORADataFactory)\n/* */ {\n/* 89 */ this.sqlType = paramInt;\n/* 90 */ this.factory = paramORADataFactory;\n/* 91 */ this.isNChar = false;\n/* */ \n/* 93 */ setDatumArray(paramArrayOfDatum);\n/* */ }", "public MType visit(ArrayAllocationExpression n, MType argu) {\n \tMType _ret = new MArray(argu);\n \t\n \tn.f3.accept(this, argu);\n \t\n \treturn _ret;\n \t}", "public Object getValueArray(int offset, int length);", "protected abstract Object[] getValue(Object ... inputs) throws InvalidNumberOfArgumentsException;", "public static void main(String[] args) {\n ObjectArray[] objectArray = new ObjectArray[3];\n //Add new ObjectArray objects to the array\n objectArray[0] = new ObjectArray(\"ONE\");\n objectArray[1] = new ObjectArray(\"TWO\");\n objectArray[2] = new ObjectArray(\"THREE\");\n }", "public static Object createArray(TypeList type) {\n\t\tList<Integer> listDimensions = type.getDimensions();\n\t\tint[] dimensions = new int[listDimensions.size()];\n\t\tfor (int i = 0; i < dimensions.length; i++) {\n\t\t\tdimensions[i] = listDimensions.get(i);\n\t\t}\n\n\t\tType eltType = type.getInnermostType();\n\t\treturn createArray(eltType, dimensions);\n\t}", "public o0000o000o[] newArray(int i) {\n return new o0000o000o[i];\n }", "public static int[] generateSequence(String arguments[]){\n int size = Integer.parseInt(arguments[1]);\n int i;\n int primeArray[] = new int[size];\n PrimeSequence prime = new PrimeSequence(Integer.parseInt(arguments[0]));\n \n for(i = 0; i < size; i++){\n primeArray[i] = prime.next();\n } \n return primeArray;\n \n }", "public static int[] createAndFillArray( int N ) {\n\tint [] A = new int[N];\n\tfor( int i = 0; i < N ;i++ ) A[i] = i + 1;\n\treturn A;\n }", "private final int[] initializeInstanceVariable() {\n\t\tint n = 10;\n\t\tint[] temp = new int[n];\n\t\tfor (int i = 0; i < n; i++) {temp[i] = i;}\n\t\treturn temp;\n\t}", "public void makeArray() {\r\n for (int i = 0; i < A.length; i++) {\r\n A[i] = i;\r\n }\r\n }", "public static int[] constructor(int n) {\r\n int v[] = new int[n];\r\n\r\n for (int i = 0; i < v.length; i++) {\r\n int dato = (int) (Math.random() * 20);\r\n v[i] = dato;\r\n }\r\n return v;\r\n }", "public MutableArray(int paramInt, short[] paramArrayOfShort, ORADataFactory paramORADataFactory)\n/* */ {\n/* 144 */ this.sqlType = paramInt;\n/* 145 */ this.factory = paramORADataFactory;\n/* 146 */ this.isNChar = false;\n/* */ \n/* 148 */ setArray(paramArrayOfShort);\n/* */ }", "C48230g<T> mo120465a(C48226c<T, ?>... cVarArr);", "static int[] singleArrayGenerator(int num){\n int[] arr = new int[num];\n for(int i = 0; i < num; i++)\n arr[i] = new Random().nextInt(100);\n return arr;\n }", "public static void arrayDemo() {\n\t}", "@Override\n public String visit(ArrayCreationLevel n, Object arg) {\n return null;\n }", "private int [] createXArray(){\r\n\t\tint [] xCoord = {\r\n\t\t\t\txStart,\r\n\t\t\t\txStart + 50,\r\n\t\t\t\txStart + 65,\r\n\t\t\t\txStart + 65,\r\n\t\t\t\txStart + 50, \r\n\t\t\t\txStart,\r\n\t\t\t\txStart,\r\n\t\t\t\txStart + 50,\r\n\t\t\t\txStart + 50,\r\n\t\t\t\txStart,\r\n\t\t\t\txStart\r\n\t\t};\r\n\t\treturn xCoord;\r\n\t}", "public static void main(String[] args){\n\t\tint[] anArray;\n\t\tanArray = new int[10];\n\t\t\n\t\tanArray[1] = 10;\n\t}", "public JsArrayString generateArray(String[] array){\r\n\t\tif ( array==null||array.length==0)\r\n\t\t\treturn null ;\r\n\t\t\r\n\t\tJsArrayString retval = (JsArrayString)JavaScriptObject.createArray();\r\n\t\tfor ( String scn : array){\r\n\t\t\tretval.push(scn);\r\n\t\t}\r\n\t\treturn retval;\r\n\t\t\r\n\t}", "Datatype[] internalize(Datatype[] args) throws CCAException;", "public void testCrearArrayEspecificado(int size) {\n\t\tint[] array = new int[size]; //tempLocal = size : size >=1\n\t}", "private Countable[] generateArray(int rank){\n var numbers = new Countable[rank];\n for (int i = 0; i < rank; i++) {\n numbers[i] = getRandomCountable();\n }\n return numbers;\n }", "public Object invokeArrayArgs(String name, Object[] argsArray) throws Exception;", "public Item[] newArray(int size) {\n return new Item[size]; \n }", "public MutableArray(int paramInt, float[] paramArrayOfFloat, ORADataFactory paramORADataFactory)\n/* */ {\n/* 133 */ this.sqlType = paramInt;\n/* 134 */ this.factory = paramORADataFactory;\n/* 135 */ this.isNChar = false;\n/* */ \n/* 137 */ setArray(paramArrayOfFloat);\n/* */ }", "public ArrayVariable getPrefixedArray(String methodName, String className, String unprefixedName, int ssaNum) {\n\t\treturn (ArrayVariable)getPrefixed(methodName, className, unprefixedName,ssaNum);\n\t}", "private ArrayOps() {\r\n }" ]
[ "0.7400976", "0.6651443", "0.6500103", "0.63160306", "0.62472653", "0.62185", "0.620125", "0.6171681", "0.6023878", "0.59461343", "0.5917444", "0.59154373", "0.5843981", "0.5833815", "0.58202326", "0.5809798", "0.579081", "0.57698816", "0.5767366", "0.5734805", "0.57313615", "0.5730121", "0.56825197", "0.56725407", "0.56637335", "0.56529206", "0.5648431", "0.5635045", "0.56202716", "0.5587554", "0.55525166", "0.55487376", "0.55406773", "0.5534271", "0.55179363", "0.55139637", "0.5513369", "0.5511841", "0.5499441", "0.5485985", "0.54814667", "0.5479048", "0.54504037", "0.54185444", "0.53940654", "0.5390896", "0.53895766", "0.5386177", "0.53416723", "0.53348863", "0.53301114", "0.5319519", "0.5316597", "0.53099644", "0.5309704", "0.53006476", "0.5298006", "0.5294431", "0.52934724", "0.52865195", "0.5282216", "0.52788305", "0.5278679", "0.5271678", "0.52713484", "0.52664083", "0.52643454", "0.52627957", "0.5261988", "0.52573013", "0.5249971", "0.52496856", "0.5242147", "0.52267677", "0.5216114", "0.52151984", "0.5215038", "0.5208685", "0.52058446", "0.5200936", "0.5200911", "0.5194232", "0.51897115", "0.5185662", "0.51802075", "0.5174145", "0.5164079", "0.515136", "0.5147291", "0.51467025", "0.51422375", "0.5141649", "0.5139979", "0.5124864", "0.5111005", "0.510351", "0.5100762", "0.510019", "0.509289", "0.5090898", "0.5089707" ]
0.0
-1
Create a FetchJoinInformation based on the provided property
public static FetchJoinInformation of(String property) { return new FetchJoinInformation(property); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static FetchJoinInformation of(String property, JoinType joinType) {\n\t\treturn new FetchJoinInformation(property, joinType);\n\t}", "public FetchJoinInformation(String property) {\n\t\tthis(property, JoinType.LEFT);\n\t}", "Join createJoin();", "private void handleJoinColumns(JsonNode propertyNode, JAnnotationUse jAnnotationUse, String annotationKey) {\n if (propertyNode.has(JpaConstants.JOIN_COLUMNS)) {\n JsonNode node = propertyNode.get(annotationKey);\n if (Objects.isNull(node)) {\n return;\n }\n\n // Create Join Column\n JAnnotationUse joinColumn = jAnnotationUse.annotationParam(annotationKey, JoinColumn.class);\n // Get name value\n if (node.has(JpaConstants.NAME)) {\n String joinColumnName = node.get(JpaConstants.NAME).asText();\n joinColumn.param(JpaConstants.NAME, joinColumnName);\n }\n // Get REFERENCED_COLUMN_NAME value and append\n if (node.has(JpaConstants.REFERENCED_COLUMN_NAME)) {\n joinColumn.param(JpaConstants.REFERENCED_COLUMN_NAME, node.get(JpaConstants.REFERENCED_COLUMN_NAME).asText());\n }\n }\n }", "@Override\n public ActualProperties visitIndexJoin(IndexJoinNode node, List<ActualProperties> inputProperties)\n {\n ActualProperties probeProperties = inputProperties.get(0);\n ActualProperties indexProperties = inputProperties.get(1);\n\n switch (node.getType()) {\n case INNER:\n return ActualProperties.builderFrom(probeProperties)\n .constants(ImmutableMap.<VariableReferenceExpression, ConstantExpression>builder()\n .putAll(probeProperties.getConstants())\n .putAll(indexProperties.getConstants())\n .build())\n .build();\n case SOURCE_OUTER:\n return ActualProperties.builderFrom(probeProperties)\n .constants(probeProperties.getConstants())\n .build();\n default:\n throw new UnsupportedOperationException(\"Unsupported join type: \" + node.getType());\n }\n }", "JoinCondition createJoinCondition();", "protected FetchJoinInformation[] getFetchJoins() {\n\t\treturn new FetchJoinInformation[] {};\n\t}", "FromTableJoin createFromTableJoin();", "protected void createSubQueryJoinTable() throws ODataApplicationException {\r\n try {\r\n final List<JPAOnConditionItem> left = association\r\n .getJoinTable()\r\n .getJoinColumns(); // Team -->\r\n final List<JPAOnConditionItem> right = association\r\n .getJoinTable()\r\n .getInverseJoinColumns(); // Person -->\r\n createSelectClauseJoin(subQuery, queryRoot, right);\r\n Expression<Boolean> whereCondition = createWhereByAssociation(from, queryJoinTable, left);\r\n whereCondition = cb.and(whereCondition, createWhereByAssociation(queryJoinTable, queryRoot, right));\r\n subQuery.where(applyAdditionalFilter(whereCondition));\r\n } catch (final ODataJPAModelException e) {\r\n throw new ODataJPAQueryException(e, HttpStatusCode.INTERNAL_SERVER_ERROR);\r\n }\r\n\r\n }", "protected abstract Object calcJoinRow();", "private void handleJoinTable(JFieldVar field, JDefinedClass clazz, String propertyName, JsonNode propertyNode) {\n if (propertyNode.has(JpaConstants.JOIN_TABLE)) {\n JAnnotationUse jAnnotationUse = field.annotate(JoinTable.class);\n JsonNode node = propertyNode.get(JpaConstants.JOIN_TABLE);\n\n if (node.has(JpaConstants.NAME)) {\n String tableName = node.get(JpaConstants.NAME).asText();\n jAnnotationUse.param(JpaConstants.NAME, tableName);\n }\n\n if (node.has(JpaConstants.JOIN_COLUMNS)) {\n handleJoinColumns(node, jAnnotationUse, JpaConstants.JOIN_COLUMNS);\n handleJoinColumns(node, jAnnotationUse, JpaConstants.INVERSE_JOIN_COLUMNS);\n }\n }\n }", "@Query(\"SELECT new com.demos.jpajoins.springdatajpamapping.dto.OrderResponse(c.firstName , p.name) FROM Customer c JOIN c.products p\")\n public List<OrderResponse> getJoinInformation();", "public static FetchJoinInformation[] of(FetchJoinInformation... joins) {\n\t\treturn joins;\n\t}", "private void createNonRelationalMapping(PropertyDescriptor property)\n throws Exception {\n ClassDescriptor declaringClassDescriptor = property.parent();\n JavaModel javaModel = du.getJavaModel();\n Object propertyType = getJavaType(property);\n if (javaModel.isBasic(propertyType)) {\n BasicDescriptor basic = of.createBasicDescriptor();\n basic.setFetch(FetchType.EAGER);\n property.setMapping(basic);\n return;\n } else if (declaringClassDescriptor.isEmbeddable()) {\n property.setEmbedded(of.createEmbeddedDescriptor());\n return;\n } else if (javaModel.isAssignable(\n javaModel.getJavaType(Clob.class.getName()), propertyType)) {\n LobDescriptor lob = of.createLobDescriptor();\n lob.setType(LobType.CLOB);\n lob.setFetch(FetchType.LAZY);\n property.setMapping(lob);\n } else if (javaModel.isAssignable(\n javaModel.getJavaType(Blob.class.getName()), propertyType)) {\n LobDescriptor lob = of.createLobDescriptor();\n lob.setType(LobType.BLOB);\n lob.setFetch(FetchType.LAZY);\n property.setMapping(lob);\n } else if (javaModel.isAssignable(\n javaModel.getJavaType(Serializable.class.getName()),\n propertyType)) {\n SerializedDescriptor serialized = of.createSerializedDescriptor();\n serialized.setFetch(FetchType.EAGER);\n property.setMapping(serialized);\n } else {\n // Should this be caught by verifier in an earlier step?\n throw new DeploymentException(\n i18NHelper.msg(\"EXC_NotAbleToDefaultMappingForProperty\", // NOI18N\n property.getName(),\n declaringClassDescriptor.getName()));\n }\n }", "@Override\n public EntitiesResponse getNavProperty(String entitySetName, OEntityKey entityKey, String navProp, QueryInfo queryInfo) {\n ExtendedPropertyModel.setQueryInfo(queryInfo);\n try {\n final List<OEntity> entities = Lists.newArrayList();\n \n // work-around for a OData4J bug whereby URLs like this: http://win7-32:8080/ovodata/Ovodata.svc/&query=Sources('674dd7f3-6a1f-4f5a-a88f-86711b725921')/EpochGroups\n // product calls like this: getNavProperty(set:&query=Sources, key:('674dd7f3-6a1f-4f5a-a88f-86711b725921'), nav:EpochGroups, \n // query:{{inlineCnt:null, top:null, skip:null, filter:null, orderBy:null, skipToken:null, customOptions:{}, expand:[], select:[]}}), model:null\n if (entitySetName != null && entitySetName.startsWith(\"&query=\")) {\n entitySetName = entitySetName.substring(\"&query=\".length());\n }\n \n // find the property-model associated with this entity set name\n ExtendedPropertyModel<?> model = ExtendedPropertyModel.getPropertyModel(entitySetName);\n \n if (_log.isInfoEnabled()) {\n _log.info(\"getNavProperty(set:\" + entitySetName + \", key:\" + entityKey + \", nav:\" + navProp \n + \", query:{\" + OData4JServerUtils.toString(queryInfo) + \"}), model:\" + model);\n }\n \n if (model == null) {\n _log.warn(\"Unable to find model for entitySetName '\" + entitySetName + \"'\");\n throw new NotFoundException(entitySetName + \" type is not found\");\n }\n \n // find root entity \n Object entity = model.getEntityByKey(entityKey);\n if (entity == null) {\n if (_log.isInfoEnabled()) {\n _log.info(\"Unable to find entity in \" + model + \" with key \" + entityKey);\n }\n throw new NotFoundException(entitySetName + \"(\" + entityKey + \") was not found\");\n }\n \n // navProp is the NAME of the entity within the element in entitySetName - need to resolve it to a TYPE\n // not ALWAYS a collection, tho, so we also have to check properties (tho it can't be both)\n Class<?> navPropType = model.getCollectionElementType(navProp);\n boolean isCollection = true;\n if (navPropType == null) {\n navPropType = model.getPropertyType(navProp);\n isCollection = false;\n if (navPropType == null) {\n _log.warn(\"Unrecognized collection/property '\" + navProp + \"' within '\" + entitySetName + \"'\");\n throw new NotFoundException(navProp + \" collection not found in '\" + entitySetName + \"'\");\n }\n }\n ExtendedPropertyModel<?> subModel = ExtendedPropertyModel.getPropertyModel(navPropType);\n if (subModel == null) {\n _log.warn(\"Unrecognized type '\" + navPropType + \"' of '\" + navProp + \"' within '\" + entitySetName + \"'\");\n throw new NotFoundException(navProp + \" collection type '\" + navPropType + \"' is not known\");\n }\n\n final EdmEntitySet subEntitySet = getMetadata().getEdmEntitySet(subModel.entityName());\n // iterate over each sub-entity of entity which matches the navProp - they will all be of the same type\n Iterable<?> iterable = isCollection ? model.getCollectionValue(entity, navProp) : CollectionUtils.makeIterable(model.getPropertyValue(entity, navProp));\n Iterator<?> iter = iterable != null ? iterable.iterator() : null;\n if (iter != null) {\n if (queryInfo.skip != null) {\n for (int numToSkip = queryInfo.skip.intValue(); numToSkip > 0 && iter.hasNext(); --numToSkip) {\n iter.next(); // skip\n }\n }\n \n // TODO - this should influence how data is returned\n//TODO List<EntitySimpleProperty> expand = queryInfo.expand; - whether or not to expand out sub-elements or leave them as references\n// BoolCommonExpression filter = queryInfo.filter; - should be used by model\n// List<OrderByExpression> orderBy = queryInfo.orderBy; - should be used by model?\n\n for (int numToReturn = queryInfo.top != null ? queryInfo.top.intValue() : Integer.MAX_VALUE; numToReturn > 0 && iter.hasNext(); --numToReturn) {\n Object o = iter.next();\n /* \n List<OProperty<?>> properties = Lists.newArrayList();\n for (String propName : subModel.getPropertyNames()) {\n Class<?> propType = subModel.getPropertyType(propName);\n EdmSimpleType edmType = EdmSimpleType.forJavaType(propType);\n String propValue = String.valueOf(subModel.getPropertyValue(o, propName));\n // FIXME - seems weird to dumb this down to a string...\n properties.add(OProperties.parse(propName, edmType.getFullyQualifiedTypeName(), propValue));\n }\n \n List<OLink> links = Lists.newArrayList();\n for (String linkName : subModel.getCollectionNames()) {\n // Class<?> linkType = subModel.getCollectionElementType(linkName);\n // Iterable<?> linkValue = subModel.getCollectionValue(o, linkName);\n String relation = \"unknown\"; // FIXME - need values for relation\n String title = linkName;\n String href = \"/\" + linkName; // FIXME absolute or relative to current URL?\n links.add(OLinks.relatedEntities(relation, title, href));\n //FIXME OLinks.relatedEntitiesInline(relation, title, href, relatedEntities); // controlled via queryInfo $inline/$expand\n //FIXME - how to select this one? OLinks.relatedEntity(relation, title, href);\n //FIXME OLinks.relatedEntityInline(relation, title, href, relatedEntity); // controlled via queryInfo $inline/$expand\n }\n */\n if (o != null) {\n entities.add(toOEntity(subEntitySet, o, queryInfo.expand));\n }\n }\n \n } else {\n // FIXME no elments found to iterate the navProp is invalid?\n _log.info(\"no elments found to iterate the navProp is invalid?\");\n }\n \n return Responses.entities(entities, subEntitySet, Integer.valueOf(entities.size()), queryInfo.skipToken);\n } finally {\n // make sure to detach the QueryInfo from the thread when we're done\n ExtendedPropertyModel.setQueryInfo(null);\n }\n }", "private void handleMultiplicityFields(JFieldVar field, JsonNode propertyNode) {\n JAnnotationUse jAnnotationUse = null;\n JsonNode internalNode = null;\n\n if (propertyNode.has(JpaConstants.ONE_TO_ONE)) {\n jAnnotationUse = field.annotate(OneToOne.class);\n internalNode = propertyNode.get(JpaConstants.ONE_TO_ONE);\n } else if (propertyNode.has(JpaConstants.MANY_TO_MANY)) {\n jAnnotationUse = field.annotate(ManyToMany.class);\n internalNode = propertyNode.get(JpaConstants.MANY_TO_MANY);\n } else if (propertyNode.has(JpaConstants.ONE_TO_MANY)) {\n jAnnotationUse = field.annotate(OneToMany.class);\n internalNode = propertyNode.get(JpaConstants.ONE_TO_MANY);\n } else if (propertyNode.has(JpaConstants.MANY_TO_ONE)) {\n jAnnotationUse = field.annotate(ManyToOne.class);\n internalNode = propertyNode.get(JpaConstants.MANY_TO_ONE);\n }\n\n if (Objects.nonNull(internalNode) && internalNode.has(JpaConstants.FETCH) && Objects.nonNull(jAnnotationUse)) {\n String fetch = internalNode.get(JpaConstants.FETCH).asText();\n FetchType fetchType = FetchType.valueOf(fetch);\n jAnnotationUse.param(JpaConstants.FETCH, fetchType);\n }\n }", "private RuntimeFilterInfo generateRuntimeFilterInfo (HashJoinPrel hashJoinPrel) throws RuntimeException {\n List<RuntimeFilterEntry> partitionColumns = new ArrayList<>();\n List<RuntimeFilterEntry> nonPartitionColumns = new ArrayList<>();\n\n JoinRelType joinRelType = hashJoinPrel.getJoinType();\n JoinInfo joinInfo = hashJoinPrel.analyzeCondition();\n if (!joinInfo.isEqui()) {\n return null;\n }\n\n if ((joinRelType == JoinRelType.LEFT && !hashJoinPrel.isSwapped())\n || (joinRelType == JoinRelType.RIGHT && hashJoinPrel.isSwapped())\n || joinRelType == JoinRelType.FULL) {\n return null;\n }\n\n final RelNode currentProbe;\n final RelNode currentBuild;\n final List<Integer> probeKeys;\n final List<Integer> buildKeys;\n\n //identify probe sie and build side prel tree\n if (hashJoinPrel.isSwapped()) {\n currentProbe = hashJoinPrel.getRight();\n currentBuild = hashJoinPrel.getLeft();\n probeKeys = hashJoinPrel.getRightKeys();\n buildKeys = hashJoinPrel.getLeftKeys();\n } else {\n currentProbe = hashJoinPrel.getLeft();\n currentBuild = hashJoinPrel.getRight();\n probeKeys = hashJoinPrel.getLeftKeys();\n buildKeys = hashJoinPrel.getRightKeys();\n }\n\n // find exchange node from build side\n ExchangePrel buildExchangePrel = findExchangePrel(currentBuild);\n ExchangePrel probeExchangePrel = findExchangePrel(currentProbe);\n if(buildExchangePrel == null && probeExchangePrel == null) {\n //does not support single fragment mode, that is the right build side can\n //only be BroadcastExchangePrel or HashToRandomExchangePrel\n return null;\n }\n List<String> rightFields = currentBuild.getRowType().getFieldNames();\n\n for (Pair<Integer,Integer> keyPair : Pair.zip(probeKeys, buildKeys)) {\n Integer probeKey = keyPair.left;\n Integer buildKey = keyPair.right;\n String buildFieldName = rightFields.get(buildKey);\n\n //This also avoids the left field of the join condition with a function call.\n if (!(currentProbe instanceof Prel)) {\n return null;\n }\n List<ColumnOriginScan> columnOrigins = ((Prel) currentProbe).accept(new FindScanVisitor(), probeKey);\n columnOrigins.stream()\n .filter(Objects::nonNull)\n .forEach(columnOrigin -> {\n Prel scanPrel = columnOrigin.getScan();\n String leftFieldName = columnOrigin.getField();\n PrelSequencer.OpId opId = prelOpIdMap.get(scanPrel);\n int probeScanMajorFragmentId = opId.getFragmentId();\n int probeScanOperatorId = opId.getAsSingleInt();\n RuntimeFilterEntry runtimeFilterEntry = new RuntimeFilterEntry(leftFieldName, buildFieldName, probeScanMajorFragmentId, probeScanOperatorId);\n if (isPartitionColumn(scanPrel, leftFieldName)) {\n partitionColumns.add(runtimeFilterEntry);\n } else {\n nonPartitionColumns.add(runtimeFilterEntry);\n }\n });\n }\n if(!partitionColumns.isEmpty() || !nonPartitionColumns.isEmpty()) {\n return new RuntimeFilterInfo.Builder()\n .nonPartitionJoinColumns(nonPartitionColumns)\n .partitionJoinColumns(partitionColumns)\n .isBroadcastJoin((buildExchangePrel instanceof BroadcastExchangePrel))\n .build();\n } else {\n return null;\n }\n\n }", "private void checkMappedByOneToOne(DeployBeanPropertyAssocOne<?> prop) {\n String mappedBy = prop.getMappedBy();\n // get the mappedBy property\n DeployBeanDescriptor<?> targetDesc = targetDescriptor(prop);\n DeployBeanPropertyAssocOne<?> mappedAssocOne = mappedOneToOne(prop, mappedBy, targetDesc);\n DeployTableJoin tableJoin = prop.getTableJoin();\n if (!tableJoin.hasJoinColumns()) {\n // define Join as the inverse of the mappedBy property\n DeployTableJoin otherTableJoin = mappedAssocOne.getTableJoin();\n otherTableJoin.copyWithoutType(tableJoin, true, tableJoin.getTable());\n }\n\n if (mappedAssocOne.isPrimaryKeyJoin()) {\n // bi-directional PrimaryKeyJoin ...\n mappedAssocOne.setPrimaryKeyJoin(false);\n prop.setPrimaryKeyExport();\n addPrimaryKeyJoin(prop);\n }\n }", "@Test\n public void test() {\n manager.clear();\n TypedQuery<MasterEntity> query2 = manager.createQuery(\"select m from MasterEntity m join fetch m.ref\", MasterEntity.class);\n logger.debug(query2.getResultList().toString());\n// manager.clear();\n// CriteriaBuilder cb = manager.getCriteriaBuilder();\n// CriteriaQuery<MasterEntity> q = cb.createQuery(MasterEntity.class);\n// Root<MasterEntity> root = q.from(MasterEntity.class);\n// root.fetch(\"ref\");\n// manager.createQuery(q).getResultList();\n\n }", "protected String getJoin( LogicalModel businessModel, LogicalRelationship relation,\n Map<LogicalTable, String> tableAliases, Map<String, Object> parameters, boolean genAsPreparedStatement,\n DatabaseMeta databaseMeta, String locale ) throws PentahoMetadataException {\n String join = \"\"; //$NON-NLS-1$\n if ( relation.isComplex() ) {\n try {\n // parse join as MQL\n SqlOpenFormula formula =\n new SqlOpenFormula( businessModel, databaseMeta, relation.getComplexJoin(), tableAliases, parameters,\n genAsPreparedStatement );\n formula.parseAndValidate();\n join = formula.generateSQL( locale );\n } catch ( PentahoMetadataException e ) {\n // backward compatibility, deprecate\n // FIXME: we need to get rid of this and just throw an exception\n logger.warn( Messages.getErrorString(\n \"SqlGenerator.ERROR_0017_FAILED_TO_PARSE_COMPLEX_JOIN\", relation.getComplexJoin() ), e ); //$NON-NLS-1$\n join = relation.getComplexJoin();\n }\n } else if ( relation.getFromTable() != null && relation.getToTable() != null && relation.getFromColumn() != null\n && relation.getToColumn() != null ) {\n // Left side\n String leftTableAlias = null;\n if ( tableAliases != null ) {\n leftTableAlias = tableAliases.get( relation.getFromColumn().getLogicalTable() );\n } else {\n leftTableAlias = relation.getFromColumn().getLogicalTable().getId();\n }\n\n join = databaseMeta.quoteField( leftTableAlias );\n join += \".\"; //$NON-NLS-1$\n join +=\n databaseMeta.quoteField( (String) relation.getFromColumn().getProperty( SqlPhysicalColumn.TARGET_COLUMN ) );\n\n // Equals\n join += \" = \"; //$NON-NLS-1$\n\n // Right side\n String rightTableAlias = null;\n if ( tableAliases != null ) {\n rightTableAlias = tableAliases.get( relation.getToColumn().getLogicalTable() );\n } else {\n rightTableAlias = relation.getToColumn().getLogicalTable().getId();\n }\n\n join += databaseMeta.quoteField( rightTableAlias );\n join += \".\"; //$NON-NLS-1$\n join += databaseMeta.quoteField( (String) relation.getToColumn().getProperty( SqlPhysicalColumn.TARGET_COLUMN ) );\n } else {\n throw new PentahoMetadataException( Messages.getErrorString(\n \"SqlGenerator.ERROR_0003_INVALID_RELATION\", relation.toString() ) ); //$NON-NLS-1$\n }\n\n return join;\n }", "private static void DoJoin()\n\t{\n\n\t\tArrayList<Attribute> inAttsRight = new ArrayList<Attribute>();\n\t\tinAttsRight.add(new Attribute(\"Int\", \"o_orderkey\"));\n\t\tinAttsRight.add(new Attribute(\"Int\", \"o_custkey\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_orderstatus\"));\n\t\tinAttsRight.add(new Attribute(\"Float\", \"o_totalprice\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_orderdate\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_orderpriority\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_clerk\"));\n\t\tinAttsRight.add(new Attribute(\"Int\", \"o_shippriority\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_comment\"));\n\n\t\tArrayList<Attribute> inAttsLeft = new ArrayList<Attribute>();\n\t\tinAttsLeft.add(new Attribute(\"Int\", \"c_custkey\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_name\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_address\"));\n\t\tinAttsLeft.add(new Attribute(\"Int\", \"c_nationkey\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_phone\"));\n\t\tinAttsLeft.add(new Attribute(\"Float\", \"c_acctbal\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_mktsegment\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Str\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att4\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att5\"));\n\n\t\tArrayList<String> leftHash = new ArrayList<String>();\n\t\tleftHash.add(\"c_custkey\");\n\n\t\tArrayList<String> rightHash = new ArrayList<String>();\n\t\trightHash.add(\"o_custkey\");\n\n\t\tString selection = \"right.o_custkey == left.c_custkey && right.o_custkey > Int (1000)\";\n\n\t\tHashMap<String, String> exprs = new HashMap<String, String>();\n\t\texprs.put(\"att1\", \"right.o_comment + Str(\\\" \\\") + left.c_comment\");\n\t\texprs.put(\"att2\", \"right.o_custkey\");\n\t\texprs.put(\"att3\", \"left.c_custkey\");\n\t\texprs.put(\"att4\", \"left.c_name\");\n\t\texprs.put(\"att5\", \"right.o_orderkey\");\n\n\t\t// run the join\n\t\ttry\n\t\t{\n\t\t\tnew Join(inAttsLeft, inAttsRight, outAtts, leftHash, rightHash, selection, exprs, \"customer.tbl\", \"orders.tbl\",\n\t\t\t\t\t\"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t}", "public interface IEntry extends IRelation {\r\n\r\n String getJoinColumnName();\r\n\r\n\r\n void setJoinColumnName(String joinColumnName);\r\n\r\n\r\n String getJoinAttributeName();\r\n\r\n\r\n void setJoinAttributeName(String joinAttributeName);\r\n\r\n\r\n String getJoinEntityIdentifier();\r\n\r\n\r\n void setJoinEntityIdentifier(String joinEntityIdentifier);\r\n\r\n \r\n Entity getJoinEntity();\r\n}", "public static FetchStyle determineFetchStyleByProfile(\n\t\t\tLoadQueryInfluencers loadQueryInfluencers,\n\t\t\tEntityPersister persister,\n\t\t\tPropertyPath path,\n\t\t\tint propertyNumber) {\n\t\tif ( !loadQueryInfluencers.hasEnabledFetchProfiles() ) {\n\t\t\t// perf optimization\n\t\t\treturn null;\n\t\t}\n\n\t\t// ugh, this stuff has to be made easier...\n\t\tfinal String fullPath = path.getFullPath();\n\t\tfinal String rootPropertyName = ( (OuterJoinLoadable) persister ).getSubclassPropertyName( propertyNumber );\n\t\tint pos = fullPath.lastIndexOf( rootPropertyName );\n\t\tfinal String relativePropertyPath = pos >= 0\n\t\t\t\t? fullPath.substring( pos )\n\t\t\t\t: rootPropertyName;\n\t\tfinal String fetchRole = persister.getEntityName() + \".\" + relativePropertyPath;\n\n\t\tIterator profiles = loadQueryInfluencers.getEnabledFetchProfileNames().iterator();\n\t\twhile ( profiles.hasNext() ) {\n\t\t\tfinal String profileName = ( String ) profiles.next();\n\t\t\tfinal FetchProfile profile = loadQueryInfluencers.getSessionFactory().getFetchProfile( profileName );\n\t\t\tfinal Fetch fetch = profile.getFetchByRole( fetchRole );\n\t\t\tif ( fetch != null && Fetch.Style.JOIN == fetch.getStyle() ) {\n\t\t\t\treturn FetchStyle.JOIN;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private void buildRowMapping() {\n final Map<String, ColumnDescriptor> targetSource = new TreeMap<>();\n\n // build a DB path .. find parent node that terminates the joint group...\n PrefetchTreeNode jointRoot = this;\n while (jointRoot.getParent() != null && !jointRoot.isDisjointPrefetch()\n && !jointRoot.isDisjointByIdPrefetch()) {\n jointRoot = jointRoot.getParent();\n }\n\n final String prefix;\n if (jointRoot != this) {\n Expression objectPath = ExpressionFactory.pathExp(getPath(jointRoot));\n ASTPath translated = (ASTPath) ((PrefetchProcessorNode) jointRoot)\n .getResolver()\n .getEntity()\n .translateToDbPath(objectPath);\n\n // make sure we do not include \"db:\" prefix\n prefix = translated.getOperand(0) + \".\";\n } else {\n prefix = \"\";\n }\n\n // find propagated keys, assuming that only one-step joins\n // share their column(s) with parent\n\n if (getParent() != null\n && !getParent().isPhantom()\n && getIncoming() != null\n && !getIncoming().getRelationship().isFlattened()) {\n\n DbRelationship r = getIncoming()\n .getRelationship()\n .getDbRelationships()\n .get(0);\n for (final DbJoin join : r.getJoins()) {\n appendColumn(targetSource, join.getTargetName(), prefix\n + join.getTargetName());\n }\n }\n\n ClassDescriptor descriptor = resolver.getDescriptor();\n\n descriptor.visitAllProperties(new PropertyVisitor() {\n\n public boolean visitAttribute(AttributeProperty property) {\n String target = property.getAttribute().getDbAttributePath();\n if(!property.getAttribute().isLazy()) {\n appendColumn(targetSource, target, prefix + target);\n }\n return true;\n }\n\n public boolean visitToMany(ToManyProperty property) {\n return visitRelationship(property);\n }\n\n public boolean visitToOne(ToOneProperty property) {\n return visitRelationship(property);\n }\n\n private boolean visitRelationship(ArcProperty arc) {\n DbRelationship dbRel = arc.getRelationship().getDbRelationships().get(0);\n for (DbAttribute attribute : dbRel.getSourceAttributes()) {\n String target = attribute.getName();\n\n appendColumn(targetSource, target, prefix + target);\n }\n return true;\n }\n });\n\n // append id columns ... (some may have been appended already via relationships)\n for (String pkName : descriptor.getEntity().getPrimaryKeyNames()) {\n appendColumn(targetSource, pkName, prefix + pkName);\n }\n\n // append inheritance discriminator columns...\n for (ObjAttribute column : descriptor.getDiscriminatorColumns()) {\n String target = column.getDbAttributePath();\n appendColumn(targetSource, target, prefix + target);\n }\n\n int size = targetSource.size();\n this.rowCapacity = (int) Math.ceil(size / 0.75);\n this.columns = new ColumnDescriptor[size];\n targetSource.values().toArray(columns);\n }", "@Override\n\tvoid addOneToManyJoin(QueryBuilder sb, Relation relation, EFieldAccessType fieldReferenceType, SourceReference from, SourceReference to) {\n\t\t\n\t\t\n\t\tfinal String entityAliasName = from.getVarName();\n\t\tfinal String collectionAttrName = relation.getFrom().getAttribute().getName();\n\n\t\t// final String joinVarName = \"join\" + joinParamIdx++;\n\n\t\tfinal String joinVarName = to.getVarName();\n\t\t\n\t\taddOneToManyJoin(sb, entityAliasName, collectionAttrName, joinVarName);\n\t}", "protected void createSubQueryJoinTableAggregation() throws ODataApplicationException {\r\n try {\r\n final List<JPAOnConditionItem> left = association\r\n .getJoinTable()\r\n .getJoinColumns(); // Person -->\r\n final List<JPAOnConditionItem> right = association\r\n .getJoinTable()\r\n .getInverseJoinColumns(); // Team -->\r\n createSelectClauseAggregation(subQuery, queryJoinTable, left);\r\n final Expression<Boolean> whereCondition = createWhereByAssociation(from, queryJoinTable, parentQuery.jpaEntity);\r\n subQuery.where(applyAdditionalFilter(whereCondition));\r\n handleAggregation(subQuery, queryJoinTable, right);\r\n } catch (final ODataJPAModelException e) {\r\n throw new ODataJPAQueryException(e, HttpStatusCode.INTERNAL_SERVER_ERROR);\r\n }\r\n }", "String getObjectByPropertyQuery(String subject, String property);", "public Join(JoinPredicate p, DbIterator child1, DbIterator child2) {\n this._p = p;\n this._child1 = child1;\n this._child2 = child2;\n this._hj = new HashJoin();\n }", "private void addOneToManyJoin(QueryBuilder sb, String entityAliasName, String collectionAttrName, String joinVarName) {\n\t\tsb.append(\" \")\n\t\t .append(entityAliasName).append(\".\").append(collectionAttrName)\n\t\t .append(\" \")\n\t\t .append(joinVarName);\n\t}", "public Object caseJoin(Join object) {\r\n\t\treturn null;\r\n\t}", "abstract protected Object joinClause(Object o1, Object o2);", "protected DelegatingFetchConfiguration newDelegatingFetchConfiguration(FetchConfiguration fetch) {\n return new DelegatingFetchConfiguration(fetch, PersistenceExceptions.TRANSLATOR);\n }", "public RelationshipPrefetcher createRelationshipPrefetcher(ObjectReferenceDescriptor ord)\r\n {\r\n if (ord instanceof CollectionDescriptor)\r\n {\r\n CollectionDescriptor cds = (CollectionDescriptor)ord;\r\n if (cds.isMtoNRelation())\r\n {\r\n return new MtoNCollectionPrefetcher(broker, cds);\r\n }\r\n else\r\n {\r\n return new CollectionPrefetcher(broker, cds);\r\n }\r\n }\r\n else\r\n { \r\n return new ReferencePrefetcher(broker, ord);\r\n }\r\n }", "public T caseFromJoin(FromJoin object)\n {\n return null;\n }", "ReferenceProperty createReferenceProperty();", "public Builder autoJoin(boolean autoJoin) {\n _autoJoin = autoJoin;\n return this;\n }", "public InnerQuery addJoinTableCondition(int index, Condition groupHead, JoinOperator joinOperator, String methodDesc, \r\n\t\t\tEntityDetails joinTableDetails, FieldDetails conditionFieldDetails, FieldDetails fetchFieldDetails)\r\n\t{\r\n\t\tInnerQuery innerQuery = new InnerQuery(entityDetails.getIdField(), fetchFieldDetails, joinTableDetails, joinOperator, this);\r\n\t\t\r\n\t\tinnerQuery.subqueryBuilder.addResultField(null, Object.class, null, fetchFieldDetails.getName(), methodDesc);\r\n\t\tinnerQuery.subqueryBuilder.addCondition(null, Operator.EQ, index, null, conditionFieldDetails.getName(), JoinOperator.AND, methodDesc, false, false, null);\r\n\t\t\r\n\t\tif(groupHead != null)\r\n\t\t{\r\n\t\t\tgroupHead.addCondition(innerQuery);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tconditions.add(innerQuery);\r\n\t\t}\r\n\t\t\r\n\t\treturn innerQuery;\r\n\t}", "@Test\n public void testSqlExistsBasedJoin() {\n Query<Car> carsQuery = and(\n in(Car.FEATURES, \"sunroof\", \"convertible\"),\n existsIn(garages,\n Car.NAME,\n Garage.BRANDS_SERVICED,\n equal(Garage.LOCATION, \"Dublin\")\n )\n );\n\n Map<Car, Set<Garage>> results = new LinkedHashMap<Car, Set<Garage>>();\n for (Car car : cars.retrieve(carsQuery)) {\n Query<Garage> garagesWhichServiceThisCarInDublin\n = and(equal(Garage.BRANDS_SERVICED, car.name), equal(Garage.LOCATION, \"Dublin\"));\n for (Garage garage : garages.retrieve(garagesWhichServiceThisCarInDublin)) {\n Set<Garage> garagesWhichCanServiceThisCar = results.get(car);\n if (garagesWhichCanServiceThisCar == null) {\n garagesWhichCanServiceThisCar = new LinkedHashSet<Garage>();\n results.put(car, garagesWhichCanServiceThisCar);\n }\n garagesWhichCanServiceThisCar.add(garage);\n }\n }\n\n assertEquals(\"join results should contain 2 cars\", 2, results.size());\n Assert.assertTrue(\"join results should contain car1\", results.containsKey(car1));\n Assert.assertTrue(\"join results should contain car4\", results.containsKey(car4));\n\n assertEquals(\"join results for car1\", asSet(garage3, garage4), results.get(car1));\n assertEquals(\"join results for car4\", asSet(garage2), results.get(car4));\n }", "PropertyReference createPropertyReference();", "public void testMember(){\n\r\n parser.sqltext = \"select f from t1\";\r\n assertTrue(parser.parse() == 0);\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getKind() == TBaseType.join_source_fake );\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getTable().toString().compareToIgnoreCase(\"t1\") == 0);\r\n\r\n parser.sqltext = \"select f from t as t1 join t2 on t1.f1 = t2.f1\";\r\n assertTrue(parser.parse() == 0);\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getKind() == TBaseType.join_source_table );\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getTable().toString().compareToIgnoreCase(\"t\") == 0);\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getTable().getAliasClause().toString().compareToIgnoreCase(\"t1\") == 0);\r\n\r\n\r\n parser.sqltext = \"select a_join.f1 from (a as a_alias left join a1 on a1.f1 = a_alias.f1 ) as a_join join b on a_join.f1 = b.f1;\";\r\n assertTrue(parser.parse() == 0);\r\n TJoin lcJoin = parser.sqlstatements.get(0).joins.getJoin(0);\r\n //System.out.println(lcJoin.getKind());\r\n assertTrue(lcJoin.getKind() == TBaseType.join_source_join );\r\n\r\n assertTrue(lcJoin.getJoin().toString().compareToIgnoreCase(\"(a as a_alias left join a1 on a1.f1 = a_alias.f1 )\") == 0);\r\n assertTrue(lcJoin.getJoin().getAliasClause().toString().compareToIgnoreCase(\"a_join\") == 0);\r\n assertTrue(lcJoin.getJoin().getJoinItems().getJoinItem(0).getJoinType() == EJoinType.left);\r\n\r\n assertTrue(lcJoin.getJoinItems().getJoinItem(0).getJoinType() == EJoinType.join);\r\n\r\n parser.sqltext = \"select a_join.f1 from (a as a_alias left join a1 on a1.f1 = a_alias.f1 ) as a_join\";\r\n assertTrue(parser.parse() == 0);\r\n TJoin lcJoin1 = parser.sqlstatements.get(0).joins.getJoin(0);\r\n assertTrue(lcJoin1.getKind() == TBaseType.join_source_join );\r\n assertTrue(lcJoin1.getJoin().toString().compareToIgnoreCase(\"(a as a_alias left join a1 on a1.f1 = a_alias.f1 )\") == 0);\r\n assertTrue(lcJoin1.getJoin().getAliasClause().toString().compareToIgnoreCase(\"a_join\") == 0);\r\n\r\n }", "private RuntimeFilterInfo generateRuntimeFilterInfo (HashJoinPrel hashJoinPrel) throws RuntimeException {\n List<RuntimeFilterEntry> partitionColumns = new ArrayList<>();\n List<RuntimeFilterEntry> nonPartitionColumns = new ArrayList<>();\n\n JoinRelType joinRelType = hashJoinPrel.getJoinType();\n JoinInfo joinInfo = hashJoinPrel.analyzeCondition();\n boolean allowRuntimeFilter = (joinInfo.isEqui()) && (joinRelType == JoinRelType.INNER || joinRelType == JoinRelType.RIGHT);\n if (!allowRuntimeFilter) {\n return null;\n }\n\n final RelNode currentLeft;\n final RelNode currentRight;\n final List<Integer> leftKeys;\n final List<Integer> rightKeys;\n\n //identify probe sie and build side prel tree\n if (hashJoinPrel.isSwapped()) {\n currentLeft = hashJoinPrel.getRight();\n currentRight = hashJoinPrel.getLeft();\n leftKeys = hashJoinPrel.getRightKeys();\n rightKeys = hashJoinPrel.getLeftKeys();\n } else {\n currentLeft = hashJoinPrel.getLeft();\n currentRight = hashJoinPrel.getRight();\n leftKeys = hashJoinPrel.getLeftKeys();\n rightKeys = hashJoinPrel.getRightKeys();\n }\n\n // find exchange node from build side\n ExchangePrel rightExchangePrel = findExchangePrel(currentRight);\n ExchangePrel leftExchangePrel = findExchangePrel(currentLeft);\n if(rightExchangePrel == null && leftExchangePrel == null) {\n //does not support single fragment mode, that is the right build side can\n //only be BroadcastExchangePrel or HashToRandomExchangePrel\n return null;\n }\n List<String> leftFields = currentLeft.getRowType().getFieldNames();\n List<String> rightFields = currentRight.getRowType().getFieldNames();\n\n int keyIndex = 0;\n for (Integer leftKey : leftKeys) {\n String leftFieldName = leftFields.get(leftKey);\n Integer rightKey = rightKeys.get(keyIndex++);\n String rightFieldName = rightFields.get(rightKey);\n\n //This also avoids the left field of the join condition with a function call.\n ScanPrelBase scanPrel = findLeftScanPrel(leftFieldName, currentLeft);\n if (scanPrel != null) {\n //if contains block node on path from join to scan, we may not push down runtime filter\n if(hasBlockNode((Prel) currentLeft, scanPrel)) {\n return null;\n }\n PrelSequencer.OpId opId = prelOpIdMap.get(scanPrel);\n int probeScanMajorFragmentId = opId.getFragmentId();\n int probeScanOperatorId = opId.getAsSingleInt();\n RuntimeFilterEntry runtimeFilterEntry = new RuntimeFilterEntry(leftFieldName, rightFieldName, probeScanMajorFragmentId, probeScanOperatorId);\n if (isPartitionColumn(scanPrel, leftFieldName)) {\n partitionColumns.add(runtimeFilterEntry);\n } else {\n nonPartitionColumns.add(runtimeFilterEntry);\n }\n } else {\n return null;\n }\n }\n\n return new RuntimeFilterInfo.Builder()\n .nonPartitionJoinColumns(nonPartitionColumns)\n .partitionJoinColumns(partitionColumns)\n .isBroadcastJoin((rightExchangePrel instanceof BroadcastExchangePrel))\n .build();\n }", "public void setup(Context context) {\n\t\t\tjoinType = context.getConfiguration().get(\"join.type\");\n\t\t}", "FetchFirst createFetchFirst();", "private void buildQueryReqInfo(RequestInfo rInfo, String requestType, String[] fetchParam, String projId, String[] filterArray){\r\n\t\trInfo.setRequestType(requestType);\r\n\t\trInfo.setProjectOID(projId);\r\n\t\trInfo.setScopeDown(true);\r\n\t\trInfo.setFetch(fetchParam);\r\n\t\tArrayList<String> filterList = new ArrayList<String>(Arrays.asList(filterArray));\r\n\t\trInfo.setQueryFilter(filterList);\t\r\n\t\tSystem.out.println(requestType + \" -- \" + projId + \" -- \" + fetchParam + \" -- \" +filterList);\r\n\t}", "@Override\n\tpublic Identifier determineJoinColumnName(ImplicitJoinColumnNameSource source) {\n\n\t\tfinal String name;\n\n\t\tif ( source.getNature() == ImplicitJoinColumnNameSource.Nature.ELEMENT_COLLECTION\n\t\t\t\t|| source.getAttributePath() == null ) {\n\t\t\tname = transformEntityName( source.getEntityNaming() )\n\t\t\t\t\t+ '_'\n\t\t\t\t\t+ source.getReferencedColumnName().getText();\n\t\t}\n\t\telse {\n\t\t\tname = transformAttributePath( source.getAttributePath() )\n\t\t\t\t\t+ '_'\n\t\t\t\t\t+ source.getReferencedColumnName().getText();\n\t\t}\n\n\t\treturn toIdentifier( name, source.getBuildingContext() );\n\t}", "protected List<Selection<?>> createSelectClause(final Map<String, From<?, ?>> joinTables, // NOSONAR\r\n final Collection<JPAPath> requestedProperties, final From<?, ?> target, final List<String> groups)\r\n throws ODataApplicationException { // NOSONAR Allow subclasses to throw an exception\r\n\r\n final int handle = debugger.startRuntimeMeasurement(this, \"createSelectClause\");\r\n final List<Selection<?>> selections = new ArrayList<>();\r\n\r\n // Build select clause\r\n for (final JPAPath jpaPath : requestedProperties) {\r\n if (jpaPath.isPartOfGroups(groups)) {\r\n final Path<?> p = ExpressionUtil.convertToCriteriaPath(joinTables, target, jpaPath.getPath());\r\n p.alias(jpaPath.getAlias());\r\n selections.add(p);\r\n }\r\n }\r\n debugger.stopRuntimeMeasurement(handle);\r\n return selections;\r\n }", "public Delta setAutoJoin(boolean autoJoin) {\n _builder.autoJoin(autoJoin);\n _updateFields.add(Fields.AUTO_JOIN);\n return this;\n }", "FetchRequest<Customer> byId(String id);", "private void checkMappedBy(DeployBeanInfo<?> info, List<DeployBeanPropertyAssocOne<?>> primaryKeyJoinCheck) {\n for (DeployBeanPropertyAssocOne<?> oneProp : info.getDescriptor().propertiesAssocOne()) {\n if (!oneProp.isTransient()) {\n if (oneProp.getMappedBy() != null) {\n checkMappedByOneToOne(oneProp);\n } else if (oneProp.isPrimaryKeyJoin()) {\n primaryKeyJoinCheck.add(oneProp);\n }\n }\n }\n\n for (DeployBeanPropertyAssocMany<?> manyProp : info.getDescriptor().propertiesAssocMany()) {\n if (!manyProp.isTransient()) {\n if (manyProp.isManyToMany()) {\n checkMappedByManyToMany(manyProp);\n } else {\n checkMappedByOneToMany(info, manyProp);\n }\n }\n }\n }", "public boolean isJoin()\r\n { return type == JOIN; }", "public void setDrawingJoin(JOIN join);", "private void optimizeEdgePropFlag() {\n TreeNode currentTreeNode = treeLeaf;\n while (!(currentTreeNode instanceof SourceTreeNode)) {\n if (currentTreeNode instanceof EdgeTreeNode) {\n EdgeTreeNode edgeTreeNode = EdgeTreeNode.class.cast(currentTreeNode);\n TreeNode nextTreeNode = edgeTreeNode.getOutputNode();\n if (null != nextTreeNode &&\n edgeTreeNode.beforeRequirementList.isEmpty() &&\n edgeTreeNode.afterRequirementList.isEmpty()) {\n if (nextTreeNode instanceof EdgeVertexTreeNode ||\n (nextTreeNode.getNodeType() == NodeType.AGGREGATE &&\n !(nextTreeNode instanceof GroupTreeNode))) {\n edgeTreeNode.setFetchPropFlag(true);\n }\n\n }\n }\n currentTreeNode = UnaryTreeNode.class.cast(currentTreeNode).getInputNode();\n }\n }", "@Override\n public EntityResponse createEntity(String entitySetName, OEntityKey entityKey, String navProp, OEntity entity) {\n return super.createEntity(entitySetName, entityKey, navProp, entity);\n }", "public Train getJoin() {\n\t\treturn join;\n\t}", "public ChangeDetectionByJoin(Fields fields) {\n\t\tsuper(fields);\n\t}", "@Transactional(readOnly = true)\n public void associationsAndJoinsExamples() {\n List<Customer> customersWithOrders = getSession().createQuery(\"from Customer as customer inner join customer.orders as ord with ord.shipCountry = 'UK'\").list();\n System.out.println(customersWithOrders.size());\n\n List<Customer> customersWithFetchOrders = getSession().createQuery(\"from Customer as customer inner join fetch customer.orders as ord where ord.shipCountry = 'UK'\").list();\n System.out.println(customersWithOrders.size());\n\n //FETCH keyword - dociąganie obiektów - iloczyn kartezjanski - sa 2 kolekcje\n //List<Customer> customersWithOrderDetails = getSession().createQuery(\"from Customer as customer inner join fetch customer.orders as ord inner join fetch ord.orderDetails as orderDetail\").list();\n //System.out.println(customersWithOrderDetails.size());\n }", "@Test\n\tpublic void join(){\n\t\t\n\t\tCriteriaBuilder criteriaBuilder = em.getCriteriaBuilder();\n\t\tCriteriaQuery<Course> criteriaQuery = criteriaBuilder.createQuery(Course.class);\n\t\t\n\t\t\n\t\t// Define roots\n\t\tRoot<Course> courseRoot = criteriaQuery.from(Course.class);\n\t\t\n\t\t// Define Predicate\n\t\tJoin<Object, Object> join = courseRoot.join(\"students\");\n\t\t\n\t\t// Add Predicate\n\t\n\t\t//5. Defined Typed Query\n\t\t\t\tTypedQuery<Course> query = em.createQuery(criteriaQuery.select(courseRoot));\n\t\t\t\t\n\t\t\t\tList<Course> resultList = query.getResultList();\n\t\t\t\t\n\t\t\t\tlogger.info(\"JOINED COURSES ==> {}\", resultList);\n\t\t\t\t\t\n\t}", "private String getJoinType() {\n if (joinQueryInputs.queryType == null) {\n return null;\n }\n switch (joinQueryInputs.queryType) {\n case Constants.JOIN_TYPE_INNER_JOIN:\n return Constants.JOIN_INNER_JOIN;\n case Constants.JOIN_TYPE_LEFT_JOIN:\n return Constants.JOIN_LEFT_JOIN;\n case Constants.JOIN_TYPE_RIGHT_JOIN:\n return Constants.JOIN_RIGHT_JOIN;\n case Constants.JOIN_TYPE_FULL_JOIN:\n return Constants.JOIN_FULL_JOIN;\n }\n return null;\n }", "private void loadCorrespondingFlats(String prop) {\n Firebase flatRef = new Firebase(getResources().getString(R.string.flats_location));\n Query flatsOfPropertyQuery = flatRef.orderByChild(\"addressLine1\").equalTo(prop);\n flatsOfPropertyQuery.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n flatList.clear();\n flatNums.clear();\n for (DataSnapshot childSnapShot : dataSnapshot.getChildren()) {\n Flat flt = childSnapShot.getValue(Flat.class);\n flatList.add(flt);\n flatNums.add(flt.getFlatNum());\n }\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n\n }\n });\n }", "public void addJoinIfNotPresent(String joinPart) {\r\n\t\tif (this.joins.toLowerCase().indexOf(joinPart.toLowerCase())==-1) {\r\n\t\t\taddJoinOn(joinPart);\r\n\t\t}\r\n\t}", "private static final String FIND_BY_PK(boolean fetchDewars) {\r\n\t\treturn \"from Shipping3VO vo \" + (fetchDewars ? \"left join fetch vo.dewarVOs \" : \"\")\r\n\t\t\t\t+ \"where vo.shippingId = :pk\";\r\n\r\n\t}", "void generateReadPropertyFromCursor(SQLiteEntity tableEntity, Builder methodBuilder, TypeName beanClass, String beanName, ModelProperty property, String cursorName, String indexName);", "@Test\r\n\tvoid join() {\r\n\t\tQuery query = entityManager.createQuery(\"Select c,s from Course c JOIN c.students s\");\r\n\t\tList<Object[]> resultList = query.getResultList();\r\n\t\tlog.info(\"Result Size -> {}\", resultList.size());\r\n\t\tfor (Object[] result : resultList) {\r\n\t\t\tlog.info(\"Course -> {}\", result[0]);\r\n\t\t\tlog.info(\"Student -> {}\", result[1]);\r\n\t\t}\r\n\t}", "WithCreate withProperties(JobDetails properties);", "public Beneficios fetchBeneficiosById(FetchByIdRequest request);", "@Override\n public DebuggerRuleInfo getDebuggerRuleInfo() {\n return new DebuggerRuleInfo(\"JOIN\", \"Generate variations for every type of JOIN (INNER JOIN | LEFT JOIN | IGHT JOIN).\");\n }", "private Register[] createJoinResult(Register[] left, Register[] right) {\n Register[] result = new Register[left.length + right.length - 1]; // -1 because of joining key\n\n int pos = 0;\n for (int i = 0; i < left.length; i++) {\n result[pos++] = left[i];\n }\n\n for (int i = 0; i < right.length; i++) {\n if (i != rightJoinAttributeIndex) {\n result[pos++] = right[i];\n }\n }\n\n return result;\n }", "public abstract String metadata(String property);", "void buildFromEntity(E entity);", "private List<T> fetch(Filter filter, Pageable pageable, SortOrders sortOrders, FetchJoinInformation... joins) {\n\t\tTypedQuery<T> query = JpaQueryBuilder.createSelectQuery(filter, entityManager, getEntityClass(),\n\t\t\t\t(joins == null || joins.length == 0) ? getFetchJoins() : joins,\n\t\t\t\tsortOrders == null ? null : sortOrders.toArray());\n\n\t\tif (pageable != null) {\n\t\t\tquery.setFirstResult(pageable.getOffset());\n\t\t\tquery.setMaxResults(pageable.getPageSize());\n\t\t}\n\t\treturn query.getResultList();\n\t}", "DefinedProperty relAddProperty( long relId, int propertyKey, Object value );", "protected Expression buildBSRJoinQuery() {\n try {\n final InputStream input = ResourceUtil.getResourceAsStream(QUERY_FILE);\n final QueryExpression query = QueryExpressionParser.parse(input);\n return query.toExpression(new ReferenceTable(catalog));\n } catch (final Exception e) {\n throw new RuntimeException(e);\n }\n }", "@Override\n public Map<String, String> createFieldToPropertyMapping() {\n final Map<String, String> mapping = super.createFieldToPropertyMapping();\n mapping.put(this.tableName + \".rsres_id\", \"id\");\n mapping.put(this.tableName + \".resource_id\", \"resourceId\");\n mapping.put(this.tableName + \".quantity\", QUANTITY);\n mapping.put(this.tableName + \".cost_rsres\", \"cost\");\n\n return mapping;\n }", "void generateWriteProperty2WhereCondition(Builder methodBuilder, String beanName, TypeName beanClass, ModelProperty property);", "public SymmetricHashJoin(JoinPredicate p, DbIterator child1, DbIterator child2) {\n this.pred = p;\n this.child1 = child1;\n this.child2 = child2;\n comboTD = TupleDesc.merge(child1.getTupleDesc(), child2.getTupleDesc());\n }", "private Class<? extends Populate> getStrategy(ColumnName annotation) {\n try {\n String[] nameDefaultValue = (String[]) ColumnName.class.getDeclaredMethod(\"name\").getDefaultValue();\n String[] foreignNameDefaultValue = (String[]) ColumnName.class.getDeclaredMethod(\"foreignName\").getDefaultValue();\n String tableDefaultValue = (String) ColumnName.class.getDeclaredMethod(\"table\").getDefaultValue();\n\n boolean nameEqualsDefaultValue = Arrays.equals(annotation.name(), nameDefaultValue);\n boolean foreignNameEqualsDefaultValue = Arrays.equals(annotation.foreignName(), foreignNameDefaultValue);\n if (!nameEqualsDefaultValue && !foreignNameEqualsDefaultValue)\n throw new DataMapperException(\"The annotation ColumnName shouldn't have both name and foreignName defined!\");\n\n boolean p1 = !Arrays.equals(annotation.name(), nameDefaultValue);\n boolean p2 = !Arrays.equals(annotation.foreignName(), foreignNameDefaultValue);\n boolean p3 = p2 && !annotation.table().equals(tableDefaultValue) && !Arrays.equals(annotation.externalName(), nameDefaultValue);\n\n return Stream.of(new Pair<>(PopulateSingleReference.class, p1), new Pair<>(PopulateWithExternalTable.class, p3), new Pair<>(PopulateMultiReference.class, p2))\n .filter(Pair::getValue)\n .findFirst()\n .map(Pair::getKey)\n .orElseThrow(() -> new DataMapperException(\"The annotation is invalid \" + annotation));\n\n } catch (NoSuchMethodException e) {\n throw new DataMapperException(e);\n }\n }", "private void setInheritanceInfo(DeployBeanInfo<?> info) {\n for (DeployBeanPropertyAssocOne<?> oneProp : info.getDescriptor().propertiesAssocOne()) {\n if (!oneProp.isTransient()) {\n DeployBeanInfo<?> assoc = deployInfoMap.get(oneProp.getTargetType());\n if (assoc != null) {\n oneProp.getTableJoin().setInheritInfo(assoc.getDescriptor().getInheritInfo());\n }\n }\n }\n for (DeployBeanPropertyAssocMany<?> manyProp : info.getDescriptor().propertiesAssocMany()) {\n if (!manyProp.isTransient()) {\n DeployBeanInfo<?> assoc = deployInfoMap.get(manyProp.getTargetType());\n if (assoc != null) {\n manyProp.getTableJoin().setInheritInfo(assoc.getDescriptor().getInheritInfo());\n }\n }\n }\n }", "private void createLookup() {\r\n\t\tcreateLooupMap(lookupMap, objectdef, objectdef.getName());\r\n\t\tcreateChildIndex(childIndex, objectdef, objectdef.getName());\r\n\r\n\t}", "A createAttribute( @NonNull final String p_id, @Nonnull final String p_property );", "void relLoadProperties( long relId, boolean light, PropertyReceiver receiver );", "public Boolean getIsJoin () {\r\n\t\treturn isJoin;\r\n\t}", "Property createProperty();", "private PropertyRecord getPropertyRecord(PropertyIdValue property) {\n\t\tInteger id = getNumId(property.getId(), false);\n\t\tif (!this.propertyRecords.containsKey(id)) {\n\t\t\tPropertyRecord propertyRecord = new PropertyRecord();\n\t\t\tthis.propertyRecords.put(id, propertyRecord);\n\t\t\treturn propertyRecord;\n\t\t} else {\n\t\t\treturn this.propertyRecords.get(id);\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic static <ROOT, JOIN> Join<ROOT, JOIN> getJoin(Root<ROOT> root, SetAttribute<ROOT, JOIN> attribute) {\n\t\tfor (Join<ROOT, ?> join : root.getJoins()) {\n\t\t\tif (join.getAttribute().equals(attribute)) {\n\t\t\t\treturn (Join<ROOT, JOIN>) join;\n\t\t\t}\n\t\t}\n\t\treturn root.join(attribute);\n\t}", "public void setJoinCondition(org.cagrid.data.dcql.JoinCondition joinCondition) {\r\n this.joinCondition = joinCondition;\r\n }", "void visit(final Join join);", "public final MF enableSpeculativePropertyLookupOnObject() {\n \treturn addColumnProperty(ConstantPredicate.truePredicate(), SpeculativeObjectLookUpProperty.INSTANCE);\n\t}", "Relationship createRelationship();", "RelationalDependency createRelationalDependency();", "private synchronized Association buildAssociationObject(ResultSet results) {\n\n Association assoc = null;\n String assocHandle = null;\n\n try {\n\n assocHandle = results.getString(1);\n String assocType = results.getString(2);\n java.util.Date expireIn = new java.util.Date(results.getTimestamp(3).getTime());\n String macKey = results.getString(4);\n String assocStore = results.getString(5);\n\n // we check if params are missing\n if (assocHandle == null || assocType == null || expireIn == null || macKey == null || assocStore == null) {\n log.error(\"Required data missing. Cannot build the Association object\");\n return null;\n }\n\n // Here we check if we are loading the correct associations\n if (associationStore.equals(OpenIDServerConstants.ASSOCIATION_STORE_TYPE_PRIVATE) &&\n assocStore.equals(OpenIDServerConstants.ASSOCIATION_STORE_TYPE_SHARED)) {\n log.error(\n \"Invalid association data found. Tried to load a Private Association but found a Shared Association\");\n return null;\n } else if (associationStore.equals(OpenIDServerConstants.ASSOCIATION_STORE_TYPE_SHARED) &&\n assocStore.equals(OpenIDServerConstants.ASSOCIATION_STORE_TYPE_PRIVATE)) {\n log.error(\n \"Invalid association data found. Tried to load a Shared Association but found a Private Association\");\n return null;\n }\n\n // Checks for association handle\n if (Association.TYPE_HMAC_SHA1.equals(assocType)) {\n assoc = Association.createHmacSha1(assocHandle, Base64.decode(macKey), expireIn);\n\n } else if (Association.TYPE_HMAC_SHA256.equals(assocType)) {\n assoc = Association.createHmacSha256(assocHandle, Base64.decode(macKey), expireIn);\n\n } else {\n log.error(\"Invalid association type \" + assocType + \" loaded from database\");\n return null;\n }\n\n } catch (SQLException e) {\n log.error(\"Failed to build the Association for \" + assocHandle + \". Error while accessing the database.\",\n e);\n } finally {\n IdentityDatabaseUtil.closeResultSet(results);\n }\n\n log.debug(\"Association \" + assocHandle + \" loaded successfully from the database.\");\n return assoc;\n }", "private void checkMappedByOneToMany(DeployBeanInfo<?> info, DeployBeanPropertyAssocMany<?> prop) {\n if (prop.isElementCollection()) {\n // skip mapping check\n return;\n }\n DeployBeanDescriptor<?> targetDesc = targetDescriptor(prop);\n if (targetDesc.isDraftableElement()) {\n // automatically turning on orphan removal and CascadeType.ALL\n prop.setModifyListenMode(BeanCollection.ModifyListenMode.REMOVALS);\n prop.getCascadeInfo().setSaveDelete(true, true);\n }\n\n if (prop.hasOrderColumn()) {\n makeOrderColumn(prop);\n }\n\n if (prop.getMappedBy() == null) {\n // if we are doc store only we are done\n // this allows the use of @OneToMany in @DocStore - Entities\n if (info.getDescriptor().isDocStoreOnly()) {\n prop.setUnidirectional();\n return;\n }\n\n if (!findMappedBy(prop)) {\n if (!prop.isO2mJoinTable()) {\n makeUnidirectional(prop);\n }\n return;\n }\n }\n\n // check that the mappedBy property is valid and read\n // its associated join information if it is available\n String mappedBy = prop.getMappedBy();\n\n // get the mappedBy property\n DeployBeanPropertyAssocOne<?> mappedAssocOne = mappedManyToOne(prop, targetDesc, mappedBy);\n DeployTableJoin tableJoin = prop.getTableJoin();\n if (!tableJoin.hasJoinColumns()) {\n // define Join as the inverse of the mappedBy property\n DeployTableJoin otherTableJoin = mappedAssocOne.getTableJoin();\n otherTableJoin.copyTo(tableJoin, true, tableJoin.getTable());\n }\n\n PropertyForeignKey foreignKey = mappedAssocOne.getForeignKey();\n if (foreignKey != null) {\n ConstraintMode onDelete = foreignKey.getOnDelete();\n switch (onDelete) {\n case SET_DEFAULT:\n case SET_NULL:\n case CASCADE: {\n // turn off cascade delete when we are using the foreign\n // key constraint to cascade the delete or set null\n prop.getCascadeInfo().setDelete(false);\n }\n }\n }\n }", "private String[] getRelationshipQuery(Predicate p,\n\t HashMap<String, String> keyObjects) throws MediatorException {\n\tString query[] = new String[2];\n\tString tableName = p.getName();\n\tif (p.getVars().size() != 2) {\n\t throw new MediatorException(\n\t\t \"A relationship predicate must have exactly 2 attributes.\");\n\t}\n\tString var1 = p.getVars().get(0);\n\tString var2 = p.getVars().get(1);\n\tString obj = keyObjects.get(var1);\n\tif (obj != null)\n\t var1 = obj;\n\tobj = keyObjects.get(var2);\n\tif (obj != null)\n\t var2 = obj;\n\t// I don't know which way the relationship is, so go both ways\n\tquery[0] = \" ?\" + var2 + \" vocab:\" + dbName + tableName + \" ?\" + var1\n\t\t+ \" . \\n\";\n\tquery[1] = \" ?\" + var1 + \" vocab:\" + dbName + tableName + \" ?\" + var2\n\t\t+ \" . \\n\";\n\n\t// System.out.println(\"PQ=\" + query);\n\treturn query;\n }", "public static <T extends AbstractEntity<?>> void addToResultIfApplicableFromActivatablePerspective(final T entity, final Set<String> keyMembers, final Set<MetaProperty<? extends ActivatableAbstractEntity<?>>> result, final MetaProperty<?> prop) {\n // let's first identify whether entity belongs to the deactivatable type of the referenced property type\n // if so, it should not inflict any ref counts for this property\n final Class<? extends ActivatableAbstractEntity<?>> type = (Class<? extends ActivatableAbstractEntity<?>>) prop.getType();\n final DeactivatableDependencies ddAnnotation = type.getAnnotation(DeactivatableDependencies.class);\n boolean belongsToDeactivatableDependencies;\n if (ddAnnotation != null) {\n // if the main type belongs to dependent deactivatables of the type for the current property,\n // and that property is a key member then such property should be excluded from standard processing of dirty activatables\n belongsToDeactivatableDependencies = keyMembers.contains(prop.getName()) && Arrays.asList(ddAnnotation.value()).contains(entity.getType());\n } else {\n belongsToDeactivatableDependencies = false;\n }\n // null values correspond to dereferencing and should be allowed only for already persisted entities\n // checking prop.isProxy() is really just to prevent calling prop.getValue() on proxied properties, which fails with StrictProxyException\n // this also assumes that proxied properties might actually have a value and need to be included for further processing\n // values for proxied properties are then retrieved in a lazy fashion by Hibernate\n if (!belongsToDeactivatableDependencies && (prop.isProxy() || prop.getValue() != null || entity.isPersisted())) {\n result.add((MetaProperty<? extends ActivatableAbstractEntity<?>>) prop);\n }\n }", "static KeyExtractor.Factory forSingleMember(Function<Class<?>, Member> keyLookupFn) {\n Objects.requireNonNull(keyLookupFn, \"keyLookupFn\");\n return entityType -> new KeyExtractors.SingleMember(entityType, keyLookupFn.apply(entityType));\n }", "@Override\n protected final Map<String, String> createFieldToPropertyMapping() {\n // get super class mapping\n final Map<String, String> mapping = super.createFieldToPropertyMapping();\n \n mapping.put(this.tableName + \".rmres_id\", \"id\");\n mapping.put(this.tableName + \".cost_rmres\", \"cost\");\n mapping.put(this.tableName + \".config_id\", \"configId\");\n mapping.put(this.tableName + \".rm_arrange_type_id\", \"arrangeTypeId\");\n mapping.put(this.tableName + \".guests_external\", \"externalGuests\");\n mapping.put(this.tableName + \".guests_internal\", \"internalGuests\");\n \n return mapping;\n }", "RelationshipRecord relLoadLight( long id );", "public CreateJoinTableResponse createJoinTable(CreateJoinTableRequest request) throws GPUdbException {\n CreateJoinTableResponse actualResponse_ = new CreateJoinTableResponse();\n submitRequest(\"/create/jointable\", request, actualResponse_, false);\n return actualResponse_;\n }", "private void addOrUpdatePropertiesEdge(GraphTraversalSource g, LineageRelationship lineageRelationship) {\n Map<String, Object> properties = lineageRelationship.getProperties().entrySet().stream().collect(Collectors.toMap(\n e -> PROPERTY_KEY_PREFIX_ELEMENT + PROPERTY_KEY_PREFIX_INSTANCE_PROPERTY + e.getKey(),\n Map.Entry::getValue\n ));\n\n properties.values().remove(null);\n properties.computeIfAbsent(PROPERTY_KEY_ENTITY_CREATE_TIME, val -> lineageRelationship.getCreateTime());\n properties.computeIfAbsent(PROPERTY_KEY_ENTITY_CREATED_BY, val -> lineageRelationship.getCreatedBy());\n properties.computeIfAbsent(PROPERTY_KEY_ENTITY_UPDATE_TIME, val -> lineageRelationship.getUpdateTime());\n properties.computeIfAbsent(PROPERTY_KEY_ENTITY_UPDATED_BY, val -> lineageRelationship.getUpdatedBy());\n properties.computeIfAbsent(PROPERTY_KEY_LABEL, val -> lineageRelationship.getTypeDefName());\n properties.computeIfAbsent(PROPERTY_KEY_ENTITY_VERSION, val -> lineageRelationship.getVersion());\n properties.computeIfAbsent(PROPERTY_KEY_METADATA_ID, val -> lineageRelationship.getMetadataCollectionId());\n\n g.inject(properties)\n .as(PROPERTIES)\n .V(lineageRelationship.getSourceEntity().getGuid())\n .outE()\n .where(inV().hasId(lineageRelationship.getTargetEntity().getGuid()))\n .as(EDGE)\n .sideEffect(__.select(PROPERTIES)\n .unfold()\n .as(KV)\n .select(EDGE)\n .property(__.select(KV).by(Column.keys), __.select(KV).by(Column.values))).iterate();\n\n\n }", "public org.cagrid.data.dcql.JoinCondition getJoinCondition() {\r\n return joinCondition;\r\n }", "@Query(\"SELECT c from CarEntity c INNER JOIN c.wareHouseEntity w WHERE w.warehouseId=:warehouseId AND c.carId=:carId\")\n CarEntity findWareHouseAndCarId(@Param(\"warehouseId\") Long warehouseId, @Param(\"carId\") Long carId);" ]
[ "0.72232527", "0.7179222", "0.59034336", "0.56891525", "0.5679078", "0.55855596", "0.534519", "0.52904266", "0.5061375", "0.5043494", "0.5036525", "0.49917153", "0.49821115", "0.47902575", "0.4785159", "0.47505865", "0.46812624", "0.46495903", "0.46239984", "0.45934758", "0.45650402", "0.45602342", "0.45113224", "0.4481548", "0.44775358", "0.4477299", "0.4476121", "0.44717705", "0.4432781", "0.4416329", "0.4398199", "0.43821177", "0.43616468", "0.4350815", "0.43281704", "0.43118677", "0.4307664", "0.43044174", "0.43010753", "0.42821473", "0.42693475", "0.42658773", "0.42630103", "0.4258533", "0.42575508", "0.42476887", "0.4244514", "0.42310587", "0.4223742", "0.421528", "0.42061162", "0.4191707", "0.4190017", "0.41872233", "0.41695276", "0.4164361", "0.41626117", "0.41586962", "0.41371748", "0.41371676", "0.41364253", "0.41331205", "0.41244632", "0.41172114", "0.4114122", "0.41081744", "0.41042352", "0.40968248", "0.40911275", "0.40833366", "0.4078762", "0.40762693", "0.40642628", "0.40595028", "0.40578288", "0.40558916", "0.40540978", "0.40514836", "0.40463018", "0.404238", "0.40412", "0.40397605", "0.40165696", "0.40135902", "0.40100595", "0.40080494", "0.40069464", "0.40032226", "0.3992641", "0.39920172", "0.3985695", "0.39816058", "0.39794052", "0.39735126", "0.39713502", "0.39649844", "0.39646646", "0.39584574", "0.39570644", "0.39551914" ]
0.8072848
0
Create a FetchJoinInformation based on the provided property and join type
public static FetchJoinInformation of(String property, JoinType joinType) { return new FetchJoinInformation(property, joinType); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static FetchJoinInformation of(String property) {\n\t\treturn new FetchJoinInformation(property);\n\t}", "public FetchJoinInformation(String property) {\n\t\tthis(property, JoinType.LEFT);\n\t}", "@Override\n public ActualProperties visitIndexJoin(IndexJoinNode node, List<ActualProperties> inputProperties)\n {\n ActualProperties probeProperties = inputProperties.get(0);\n ActualProperties indexProperties = inputProperties.get(1);\n\n switch (node.getType()) {\n case INNER:\n return ActualProperties.builderFrom(probeProperties)\n .constants(ImmutableMap.<VariableReferenceExpression, ConstantExpression>builder()\n .putAll(probeProperties.getConstants())\n .putAll(indexProperties.getConstants())\n .build())\n .build();\n case SOURCE_OUTER:\n return ActualProperties.builderFrom(probeProperties)\n .constants(probeProperties.getConstants())\n .build();\n default:\n throw new UnsupportedOperationException(\"Unsupported join type: \" + node.getType());\n }\n }", "Join createJoin();", "private void handleJoinColumns(JsonNode propertyNode, JAnnotationUse jAnnotationUse, String annotationKey) {\n if (propertyNode.has(JpaConstants.JOIN_COLUMNS)) {\n JsonNode node = propertyNode.get(annotationKey);\n if (Objects.isNull(node)) {\n return;\n }\n\n // Create Join Column\n JAnnotationUse joinColumn = jAnnotationUse.annotationParam(annotationKey, JoinColumn.class);\n // Get name value\n if (node.has(JpaConstants.NAME)) {\n String joinColumnName = node.get(JpaConstants.NAME).asText();\n joinColumn.param(JpaConstants.NAME, joinColumnName);\n }\n // Get REFERENCED_COLUMN_NAME value and append\n if (node.has(JpaConstants.REFERENCED_COLUMN_NAME)) {\n joinColumn.param(JpaConstants.REFERENCED_COLUMN_NAME, node.get(JpaConstants.REFERENCED_COLUMN_NAME).asText());\n }\n }\n }", "JoinCondition createJoinCondition();", "private void handleJoinTable(JFieldVar field, JDefinedClass clazz, String propertyName, JsonNode propertyNode) {\n if (propertyNode.has(JpaConstants.JOIN_TABLE)) {\n JAnnotationUse jAnnotationUse = field.annotate(JoinTable.class);\n JsonNode node = propertyNode.get(JpaConstants.JOIN_TABLE);\n\n if (node.has(JpaConstants.NAME)) {\n String tableName = node.get(JpaConstants.NAME).asText();\n jAnnotationUse.param(JpaConstants.NAME, tableName);\n }\n\n if (node.has(JpaConstants.JOIN_COLUMNS)) {\n handleJoinColumns(node, jAnnotationUse, JpaConstants.JOIN_COLUMNS);\n handleJoinColumns(node, jAnnotationUse, JpaConstants.INVERSE_JOIN_COLUMNS);\n }\n }\n }", "FromTableJoin createFromTableJoin();", "protected FetchJoinInformation[] getFetchJoins() {\n\t\treturn new FetchJoinInformation[] {};\n\t}", "public static FetchJoinInformation[] of(FetchJoinInformation... joins) {\n\t\treturn joins;\n\t}", "private String getJoinType() {\n if (joinQueryInputs.queryType == null) {\n return null;\n }\n switch (joinQueryInputs.queryType) {\n case Constants.JOIN_TYPE_INNER_JOIN:\n return Constants.JOIN_INNER_JOIN;\n case Constants.JOIN_TYPE_LEFT_JOIN:\n return Constants.JOIN_LEFT_JOIN;\n case Constants.JOIN_TYPE_RIGHT_JOIN:\n return Constants.JOIN_RIGHT_JOIN;\n case Constants.JOIN_TYPE_FULL_JOIN:\n return Constants.JOIN_FULL_JOIN;\n }\n return null;\n }", "default <U, G, V, H> EntityMapper<V, H> join(EntityMapper<U, G> secondMapper, List<Condition> onConditions, BiFunction<T, U, V> composeEntity, Function<H, Pair<F, G>> decomposeFilter, JoinType joinType) {\n\t\treturn new JoinEntityMapper(this, secondMapper, onConditions, composeEntity, decomposeFilter, joinType);\n\t}", "private RuntimeFilterInfo generateRuntimeFilterInfo (HashJoinPrel hashJoinPrel) throws RuntimeException {\n List<RuntimeFilterEntry> partitionColumns = new ArrayList<>();\n List<RuntimeFilterEntry> nonPartitionColumns = new ArrayList<>();\n\n JoinRelType joinRelType = hashJoinPrel.getJoinType();\n JoinInfo joinInfo = hashJoinPrel.analyzeCondition();\n if (!joinInfo.isEqui()) {\n return null;\n }\n\n if ((joinRelType == JoinRelType.LEFT && !hashJoinPrel.isSwapped())\n || (joinRelType == JoinRelType.RIGHT && hashJoinPrel.isSwapped())\n || joinRelType == JoinRelType.FULL) {\n return null;\n }\n\n final RelNode currentProbe;\n final RelNode currentBuild;\n final List<Integer> probeKeys;\n final List<Integer> buildKeys;\n\n //identify probe sie and build side prel tree\n if (hashJoinPrel.isSwapped()) {\n currentProbe = hashJoinPrel.getRight();\n currentBuild = hashJoinPrel.getLeft();\n probeKeys = hashJoinPrel.getRightKeys();\n buildKeys = hashJoinPrel.getLeftKeys();\n } else {\n currentProbe = hashJoinPrel.getLeft();\n currentBuild = hashJoinPrel.getRight();\n probeKeys = hashJoinPrel.getLeftKeys();\n buildKeys = hashJoinPrel.getRightKeys();\n }\n\n // find exchange node from build side\n ExchangePrel buildExchangePrel = findExchangePrel(currentBuild);\n ExchangePrel probeExchangePrel = findExchangePrel(currentProbe);\n if(buildExchangePrel == null && probeExchangePrel == null) {\n //does not support single fragment mode, that is the right build side can\n //only be BroadcastExchangePrel or HashToRandomExchangePrel\n return null;\n }\n List<String> rightFields = currentBuild.getRowType().getFieldNames();\n\n for (Pair<Integer,Integer> keyPair : Pair.zip(probeKeys, buildKeys)) {\n Integer probeKey = keyPair.left;\n Integer buildKey = keyPair.right;\n String buildFieldName = rightFields.get(buildKey);\n\n //This also avoids the left field of the join condition with a function call.\n if (!(currentProbe instanceof Prel)) {\n return null;\n }\n List<ColumnOriginScan> columnOrigins = ((Prel) currentProbe).accept(new FindScanVisitor(), probeKey);\n columnOrigins.stream()\n .filter(Objects::nonNull)\n .forEach(columnOrigin -> {\n Prel scanPrel = columnOrigin.getScan();\n String leftFieldName = columnOrigin.getField();\n PrelSequencer.OpId opId = prelOpIdMap.get(scanPrel);\n int probeScanMajorFragmentId = opId.getFragmentId();\n int probeScanOperatorId = opId.getAsSingleInt();\n RuntimeFilterEntry runtimeFilterEntry = new RuntimeFilterEntry(leftFieldName, buildFieldName, probeScanMajorFragmentId, probeScanOperatorId);\n if (isPartitionColumn(scanPrel, leftFieldName)) {\n partitionColumns.add(runtimeFilterEntry);\n } else {\n nonPartitionColumns.add(runtimeFilterEntry);\n }\n });\n }\n if(!partitionColumns.isEmpty() || !nonPartitionColumns.isEmpty()) {\n return new RuntimeFilterInfo.Builder()\n .nonPartitionJoinColumns(nonPartitionColumns)\n .partitionJoinColumns(partitionColumns)\n .isBroadcastJoin((buildExchangePrel instanceof BroadcastExchangePrel))\n .build();\n } else {\n return null;\n }\n\n }", "protected void createSubQueryJoinTable() throws ODataApplicationException {\r\n try {\r\n final List<JPAOnConditionItem> left = association\r\n .getJoinTable()\r\n .getJoinColumns(); // Team -->\r\n final List<JPAOnConditionItem> right = association\r\n .getJoinTable()\r\n .getInverseJoinColumns(); // Person -->\r\n createSelectClauseJoin(subQuery, queryRoot, right);\r\n Expression<Boolean> whereCondition = createWhereByAssociation(from, queryJoinTable, left);\r\n whereCondition = cb.and(whereCondition, createWhereByAssociation(queryJoinTable, queryRoot, right));\r\n subQuery.where(applyAdditionalFilter(whereCondition));\r\n } catch (final ODataJPAModelException e) {\r\n throw new ODataJPAQueryException(e, HttpStatusCode.INTERNAL_SERVER_ERROR);\r\n }\r\n\r\n }", "protected abstract Object calcJoinRow();", "public void setup(Context context) {\n\t\t\tjoinType = context.getConfiguration().get(\"join.type\");\n\t\t}", "@Query(\"SELECT new com.demos.jpajoins.springdatajpamapping.dto.OrderResponse(c.firstName , p.name) FROM Customer c JOIN c.products p\")\n public List<OrderResponse> getJoinInformation();", "private static void DoJoin()\n\t{\n\n\t\tArrayList<Attribute> inAttsRight = new ArrayList<Attribute>();\n\t\tinAttsRight.add(new Attribute(\"Int\", \"o_orderkey\"));\n\t\tinAttsRight.add(new Attribute(\"Int\", \"o_custkey\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_orderstatus\"));\n\t\tinAttsRight.add(new Attribute(\"Float\", \"o_totalprice\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_orderdate\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_orderpriority\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_clerk\"));\n\t\tinAttsRight.add(new Attribute(\"Int\", \"o_shippriority\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_comment\"));\n\n\t\tArrayList<Attribute> inAttsLeft = new ArrayList<Attribute>();\n\t\tinAttsLeft.add(new Attribute(\"Int\", \"c_custkey\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_name\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_address\"));\n\t\tinAttsLeft.add(new Attribute(\"Int\", \"c_nationkey\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_phone\"));\n\t\tinAttsLeft.add(new Attribute(\"Float\", \"c_acctbal\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_mktsegment\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Str\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att4\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att5\"));\n\n\t\tArrayList<String> leftHash = new ArrayList<String>();\n\t\tleftHash.add(\"c_custkey\");\n\n\t\tArrayList<String> rightHash = new ArrayList<String>();\n\t\trightHash.add(\"o_custkey\");\n\n\t\tString selection = \"right.o_custkey == left.c_custkey && right.o_custkey > Int (1000)\";\n\n\t\tHashMap<String, String> exprs = new HashMap<String, String>();\n\t\texprs.put(\"att1\", \"right.o_comment + Str(\\\" \\\") + left.c_comment\");\n\t\texprs.put(\"att2\", \"right.o_custkey\");\n\t\texprs.put(\"att3\", \"left.c_custkey\");\n\t\texprs.put(\"att4\", \"left.c_name\");\n\t\texprs.put(\"att5\", \"right.o_orderkey\");\n\n\t\t// run the join\n\t\ttry\n\t\t{\n\t\t\tnew Join(inAttsLeft, inAttsRight, outAtts, leftHash, rightHash, selection, exprs, \"customer.tbl\", \"orders.tbl\",\n\t\t\t\t\t\"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t}", "public boolean isJoin()\r\n { return type == JOIN; }", "protected String getJoin( LogicalModel businessModel, LogicalRelationship relation,\n Map<LogicalTable, String> tableAliases, Map<String, Object> parameters, boolean genAsPreparedStatement,\n DatabaseMeta databaseMeta, String locale ) throws PentahoMetadataException {\n String join = \"\"; //$NON-NLS-1$\n if ( relation.isComplex() ) {\n try {\n // parse join as MQL\n SqlOpenFormula formula =\n new SqlOpenFormula( businessModel, databaseMeta, relation.getComplexJoin(), tableAliases, parameters,\n genAsPreparedStatement );\n formula.parseAndValidate();\n join = formula.generateSQL( locale );\n } catch ( PentahoMetadataException e ) {\n // backward compatibility, deprecate\n // FIXME: we need to get rid of this and just throw an exception\n logger.warn( Messages.getErrorString(\n \"SqlGenerator.ERROR_0017_FAILED_TO_PARSE_COMPLEX_JOIN\", relation.getComplexJoin() ), e ); //$NON-NLS-1$\n join = relation.getComplexJoin();\n }\n } else if ( relation.getFromTable() != null && relation.getToTable() != null && relation.getFromColumn() != null\n && relation.getToColumn() != null ) {\n // Left side\n String leftTableAlias = null;\n if ( tableAliases != null ) {\n leftTableAlias = tableAliases.get( relation.getFromColumn().getLogicalTable() );\n } else {\n leftTableAlias = relation.getFromColumn().getLogicalTable().getId();\n }\n\n join = databaseMeta.quoteField( leftTableAlias );\n join += \".\"; //$NON-NLS-1$\n join +=\n databaseMeta.quoteField( (String) relation.getFromColumn().getProperty( SqlPhysicalColumn.TARGET_COLUMN ) );\n\n // Equals\n join += \" = \"; //$NON-NLS-1$\n\n // Right side\n String rightTableAlias = null;\n if ( tableAliases != null ) {\n rightTableAlias = tableAliases.get( relation.getToColumn().getLogicalTable() );\n } else {\n rightTableAlias = relation.getToColumn().getLogicalTable().getId();\n }\n\n join += databaseMeta.quoteField( rightTableAlias );\n join += \".\"; //$NON-NLS-1$\n join += databaseMeta.quoteField( (String) relation.getToColumn().getProperty( SqlPhysicalColumn.TARGET_COLUMN ) );\n } else {\n throw new PentahoMetadataException( Messages.getErrorString(\n \"SqlGenerator.ERROR_0003_INVALID_RELATION\", relation.toString() ) ); //$NON-NLS-1$\n }\n\n return join;\n }", "public T caseFromJoin(FromJoin object)\n {\n return null;\n }", "private RuntimeFilterInfo generateRuntimeFilterInfo (HashJoinPrel hashJoinPrel) throws RuntimeException {\n List<RuntimeFilterEntry> partitionColumns = new ArrayList<>();\n List<RuntimeFilterEntry> nonPartitionColumns = new ArrayList<>();\n\n JoinRelType joinRelType = hashJoinPrel.getJoinType();\n JoinInfo joinInfo = hashJoinPrel.analyzeCondition();\n boolean allowRuntimeFilter = (joinInfo.isEqui()) && (joinRelType == JoinRelType.INNER || joinRelType == JoinRelType.RIGHT);\n if (!allowRuntimeFilter) {\n return null;\n }\n\n final RelNode currentLeft;\n final RelNode currentRight;\n final List<Integer> leftKeys;\n final List<Integer> rightKeys;\n\n //identify probe sie and build side prel tree\n if (hashJoinPrel.isSwapped()) {\n currentLeft = hashJoinPrel.getRight();\n currentRight = hashJoinPrel.getLeft();\n leftKeys = hashJoinPrel.getRightKeys();\n rightKeys = hashJoinPrel.getLeftKeys();\n } else {\n currentLeft = hashJoinPrel.getLeft();\n currentRight = hashJoinPrel.getRight();\n leftKeys = hashJoinPrel.getLeftKeys();\n rightKeys = hashJoinPrel.getRightKeys();\n }\n\n // find exchange node from build side\n ExchangePrel rightExchangePrel = findExchangePrel(currentRight);\n ExchangePrel leftExchangePrel = findExchangePrel(currentLeft);\n if(rightExchangePrel == null && leftExchangePrel == null) {\n //does not support single fragment mode, that is the right build side can\n //only be BroadcastExchangePrel or HashToRandomExchangePrel\n return null;\n }\n List<String> leftFields = currentLeft.getRowType().getFieldNames();\n List<String> rightFields = currentRight.getRowType().getFieldNames();\n\n int keyIndex = 0;\n for (Integer leftKey : leftKeys) {\n String leftFieldName = leftFields.get(leftKey);\n Integer rightKey = rightKeys.get(keyIndex++);\n String rightFieldName = rightFields.get(rightKey);\n\n //This also avoids the left field of the join condition with a function call.\n ScanPrelBase scanPrel = findLeftScanPrel(leftFieldName, currentLeft);\n if (scanPrel != null) {\n //if contains block node on path from join to scan, we may not push down runtime filter\n if(hasBlockNode((Prel) currentLeft, scanPrel)) {\n return null;\n }\n PrelSequencer.OpId opId = prelOpIdMap.get(scanPrel);\n int probeScanMajorFragmentId = opId.getFragmentId();\n int probeScanOperatorId = opId.getAsSingleInt();\n RuntimeFilterEntry runtimeFilterEntry = new RuntimeFilterEntry(leftFieldName, rightFieldName, probeScanMajorFragmentId, probeScanOperatorId);\n if (isPartitionColumn(scanPrel, leftFieldName)) {\n partitionColumns.add(runtimeFilterEntry);\n } else {\n nonPartitionColumns.add(runtimeFilterEntry);\n }\n } else {\n return null;\n }\n }\n\n return new RuntimeFilterInfo.Builder()\n .nonPartitionJoinColumns(nonPartitionColumns)\n .partitionJoinColumns(partitionColumns)\n .isBroadcastJoin((rightExchangePrel instanceof BroadcastExchangePrel))\n .build();\n }", "public void testMember(){\n\r\n parser.sqltext = \"select f from t1\";\r\n assertTrue(parser.parse() == 0);\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getKind() == TBaseType.join_source_fake );\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getTable().toString().compareToIgnoreCase(\"t1\") == 0);\r\n\r\n parser.sqltext = \"select f from t as t1 join t2 on t1.f1 = t2.f1\";\r\n assertTrue(parser.parse() == 0);\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getKind() == TBaseType.join_source_table );\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getTable().toString().compareToIgnoreCase(\"t\") == 0);\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getTable().getAliasClause().toString().compareToIgnoreCase(\"t1\") == 0);\r\n\r\n\r\n parser.sqltext = \"select a_join.f1 from (a as a_alias left join a1 on a1.f1 = a_alias.f1 ) as a_join join b on a_join.f1 = b.f1;\";\r\n assertTrue(parser.parse() == 0);\r\n TJoin lcJoin = parser.sqlstatements.get(0).joins.getJoin(0);\r\n //System.out.println(lcJoin.getKind());\r\n assertTrue(lcJoin.getKind() == TBaseType.join_source_join );\r\n\r\n assertTrue(lcJoin.getJoin().toString().compareToIgnoreCase(\"(a as a_alias left join a1 on a1.f1 = a_alias.f1 )\") == 0);\r\n assertTrue(lcJoin.getJoin().getAliasClause().toString().compareToIgnoreCase(\"a_join\") == 0);\r\n assertTrue(lcJoin.getJoin().getJoinItems().getJoinItem(0).getJoinType() == EJoinType.left);\r\n\r\n assertTrue(lcJoin.getJoinItems().getJoinItem(0).getJoinType() == EJoinType.join);\r\n\r\n parser.sqltext = \"select a_join.f1 from (a as a_alias left join a1 on a1.f1 = a_alias.f1 ) as a_join\";\r\n assertTrue(parser.parse() == 0);\r\n TJoin lcJoin1 = parser.sqlstatements.get(0).joins.getJoin(0);\r\n assertTrue(lcJoin1.getKind() == TBaseType.join_source_join );\r\n assertTrue(lcJoin1.getJoin().toString().compareToIgnoreCase(\"(a as a_alias left join a1 on a1.f1 = a_alias.f1 )\") == 0);\r\n assertTrue(lcJoin1.getJoin().getAliasClause().toString().compareToIgnoreCase(\"a_join\") == 0);\r\n\r\n }", "abstract protected Object joinClause(Object o1, Object o2);", "public final AstValidator.join_clause_return join_clause() throws RecognitionException {\n join_clause_stack.push(new join_clause_scope());\n AstValidator.join_clause_return retval = new AstValidator.join_clause_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree JOIN324=null;\n AstValidator.join_sub_clause_return join_sub_clause325 =null;\n\n AstValidator.join_type_return join_type326 =null;\n\n AstValidator.partition_clause_return partition_clause327 =null;\n\n\n CommonTree JOIN324_tree=null;\n\n\n ((join_clause_scope)join_clause_stack.peek()).arity = 0;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:517:2: ( ^( JOIN join_sub_clause ( join_type )? ( partition_clause )? ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:517:4: ^( JOIN join_sub_clause ( join_type )? ( partition_clause )? )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n JOIN324=(CommonTree)match(input,JOIN,FOLLOW_JOIN_in_join_clause2736); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n JOIN324_tree = (CommonTree)adaptor.dupNode(JOIN324);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(JOIN324_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_join_sub_clause_in_join_clause2738);\n join_sub_clause325=join_sub_clause();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, join_sub_clause325.getTree());\n\n\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:517:28: ( join_type )?\n int alt92=2;\n int LA92_0 = input.LA(1);\n\n if ( (LA92_0==QUOTEDSTRING) ) {\n alt92=1;\n }\n switch (alt92) {\n case 1 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:517:28: join_type\n {\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_join_type_in_join_clause2740);\n join_type326=join_type();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, join_type326.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n\n }\n\n\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:517:39: ( partition_clause )?\n int alt93=2;\n int LA93_0 = input.LA(1);\n\n if ( (LA93_0==PARTITION) ) {\n alt93=1;\n }\n switch (alt93) {\n case 1 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:517:39: partition_clause\n {\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_partition_clause_in_join_clause2743);\n partition_clause327=partition_clause();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, partition_clause327.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n\n }\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n join_clause_stack.pop();\n }\n return retval;\n }", "public void addJoin(String left, String right, boolean outer, int reltype) {\r\n DSJoinDescriptor d = new DSJoinDescriptor(left, right, outer, reltype);\r\n _joins.addElement(d);\r\n }", "@Override\n\tvoid addOneToManyJoin(QueryBuilder sb, Relation relation, EFieldAccessType fieldReferenceType, SourceReference from, SourceReference to) {\n\t\t\n\t\t\n\t\tfinal String entityAliasName = from.getVarName();\n\t\tfinal String collectionAttrName = relation.getFrom().getAttribute().getName();\n\n\t\t// final String joinVarName = \"join\" + joinParamIdx++;\n\n\t\tfinal String joinVarName = to.getVarName();\n\t\t\n\t\taddOneToManyJoin(sb, entityAliasName, collectionAttrName, joinVarName);\n\t}", "private void handleMultiplicityFields(JFieldVar field, JsonNode propertyNode) {\n JAnnotationUse jAnnotationUse = null;\n JsonNode internalNode = null;\n\n if (propertyNode.has(JpaConstants.ONE_TO_ONE)) {\n jAnnotationUse = field.annotate(OneToOne.class);\n internalNode = propertyNode.get(JpaConstants.ONE_TO_ONE);\n } else if (propertyNode.has(JpaConstants.MANY_TO_MANY)) {\n jAnnotationUse = field.annotate(ManyToMany.class);\n internalNode = propertyNode.get(JpaConstants.MANY_TO_MANY);\n } else if (propertyNode.has(JpaConstants.ONE_TO_MANY)) {\n jAnnotationUse = field.annotate(OneToMany.class);\n internalNode = propertyNode.get(JpaConstants.ONE_TO_MANY);\n } else if (propertyNode.has(JpaConstants.MANY_TO_ONE)) {\n jAnnotationUse = field.annotate(ManyToOne.class);\n internalNode = propertyNode.get(JpaConstants.MANY_TO_ONE);\n }\n\n if (Objects.nonNull(internalNode) && internalNode.has(JpaConstants.FETCH) && Objects.nonNull(jAnnotationUse)) {\n String fetch = internalNode.get(JpaConstants.FETCH).asText();\n FetchType fetchType = FetchType.valueOf(fetch);\n jAnnotationUse.param(JpaConstants.FETCH, fetchType);\n }\n }", "public Object caseJoin(Join object) {\r\n\t\treturn null;\r\n\t}", "protected void createSubQueryJoinTableAggregation() throws ODataApplicationException {\r\n try {\r\n final List<JPAOnConditionItem> left = association\r\n .getJoinTable()\r\n .getJoinColumns(); // Person -->\r\n final List<JPAOnConditionItem> right = association\r\n .getJoinTable()\r\n .getInverseJoinColumns(); // Team -->\r\n createSelectClauseAggregation(subQuery, queryJoinTable, left);\r\n final Expression<Boolean> whereCondition = createWhereByAssociation(from, queryJoinTable, parentQuery.jpaEntity);\r\n subQuery.where(applyAdditionalFilter(whereCondition));\r\n handleAggregation(subQuery, queryJoinTable, right);\r\n } catch (final ODataJPAModelException e) {\r\n throw new ODataJPAQueryException(e, HttpStatusCode.INTERNAL_SERVER_ERROR);\r\n }\r\n }", "@Override\n public EntitiesResponse getNavProperty(String entitySetName, OEntityKey entityKey, String navProp, QueryInfo queryInfo) {\n ExtendedPropertyModel.setQueryInfo(queryInfo);\n try {\n final List<OEntity> entities = Lists.newArrayList();\n \n // work-around for a OData4J bug whereby URLs like this: http://win7-32:8080/ovodata/Ovodata.svc/&query=Sources('674dd7f3-6a1f-4f5a-a88f-86711b725921')/EpochGroups\n // product calls like this: getNavProperty(set:&query=Sources, key:('674dd7f3-6a1f-4f5a-a88f-86711b725921'), nav:EpochGroups, \n // query:{{inlineCnt:null, top:null, skip:null, filter:null, orderBy:null, skipToken:null, customOptions:{}, expand:[], select:[]}}), model:null\n if (entitySetName != null && entitySetName.startsWith(\"&query=\")) {\n entitySetName = entitySetName.substring(\"&query=\".length());\n }\n \n // find the property-model associated with this entity set name\n ExtendedPropertyModel<?> model = ExtendedPropertyModel.getPropertyModel(entitySetName);\n \n if (_log.isInfoEnabled()) {\n _log.info(\"getNavProperty(set:\" + entitySetName + \", key:\" + entityKey + \", nav:\" + navProp \n + \", query:{\" + OData4JServerUtils.toString(queryInfo) + \"}), model:\" + model);\n }\n \n if (model == null) {\n _log.warn(\"Unable to find model for entitySetName '\" + entitySetName + \"'\");\n throw new NotFoundException(entitySetName + \" type is not found\");\n }\n \n // find root entity \n Object entity = model.getEntityByKey(entityKey);\n if (entity == null) {\n if (_log.isInfoEnabled()) {\n _log.info(\"Unable to find entity in \" + model + \" with key \" + entityKey);\n }\n throw new NotFoundException(entitySetName + \"(\" + entityKey + \") was not found\");\n }\n \n // navProp is the NAME of the entity within the element in entitySetName - need to resolve it to a TYPE\n // not ALWAYS a collection, tho, so we also have to check properties (tho it can't be both)\n Class<?> navPropType = model.getCollectionElementType(navProp);\n boolean isCollection = true;\n if (navPropType == null) {\n navPropType = model.getPropertyType(navProp);\n isCollection = false;\n if (navPropType == null) {\n _log.warn(\"Unrecognized collection/property '\" + navProp + \"' within '\" + entitySetName + \"'\");\n throw new NotFoundException(navProp + \" collection not found in '\" + entitySetName + \"'\");\n }\n }\n ExtendedPropertyModel<?> subModel = ExtendedPropertyModel.getPropertyModel(navPropType);\n if (subModel == null) {\n _log.warn(\"Unrecognized type '\" + navPropType + \"' of '\" + navProp + \"' within '\" + entitySetName + \"'\");\n throw new NotFoundException(navProp + \" collection type '\" + navPropType + \"' is not known\");\n }\n\n final EdmEntitySet subEntitySet = getMetadata().getEdmEntitySet(subModel.entityName());\n // iterate over each sub-entity of entity which matches the navProp - they will all be of the same type\n Iterable<?> iterable = isCollection ? model.getCollectionValue(entity, navProp) : CollectionUtils.makeIterable(model.getPropertyValue(entity, navProp));\n Iterator<?> iter = iterable != null ? iterable.iterator() : null;\n if (iter != null) {\n if (queryInfo.skip != null) {\n for (int numToSkip = queryInfo.skip.intValue(); numToSkip > 0 && iter.hasNext(); --numToSkip) {\n iter.next(); // skip\n }\n }\n \n // TODO - this should influence how data is returned\n//TODO List<EntitySimpleProperty> expand = queryInfo.expand; - whether or not to expand out sub-elements or leave them as references\n// BoolCommonExpression filter = queryInfo.filter; - should be used by model\n// List<OrderByExpression> orderBy = queryInfo.orderBy; - should be used by model?\n\n for (int numToReturn = queryInfo.top != null ? queryInfo.top.intValue() : Integer.MAX_VALUE; numToReturn > 0 && iter.hasNext(); --numToReturn) {\n Object o = iter.next();\n /* \n List<OProperty<?>> properties = Lists.newArrayList();\n for (String propName : subModel.getPropertyNames()) {\n Class<?> propType = subModel.getPropertyType(propName);\n EdmSimpleType edmType = EdmSimpleType.forJavaType(propType);\n String propValue = String.valueOf(subModel.getPropertyValue(o, propName));\n // FIXME - seems weird to dumb this down to a string...\n properties.add(OProperties.parse(propName, edmType.getFullyQualifiedTypeName(), propValue));\n }\n \n List<OLink> links = Lists.newArrayList();\n for (String linkName : subModel.getCollectionNames()) {\n // Class<?> linkType = subModel.getCollectionElementType(linkName);\n // Iterable<?> linkValue = subModel.getCollectionValue(o, linkName);\n String relation = \"unknown\"; // FIXME - need values for relation\n String title = linkName;\n String href = \"/\" + linkName; // FIXME absolute or relative to current URL?\n links.add(OLinks.relatedEntities(relation, title, href));\n //FIXME OLinks.relatedEntitiesInline(relation, title, href, relatedEntities); // controlled via queryInfo $inline/$expand\n //FIXME - how to select this one? OLinks.relatedEntity(relation, title, href);\n //FIXME OLinks.relatedEntityInline(relation, title, href, relatedEntity); // controlled via queryInfo $inline/$expand\n }\n */\n if (o != null) {\n entities.add(toOEntity(subEntitySet, o, queryInfo.expand));\n }\n }\n \n } else {\n // FIXME no elments found to iterate the navProp is invalid?\n _log.info(\"no elments found to iterate the navProp is invalid?\");\n }\n \n return Responses.entities(entities, subEntitySet, Integer.valueOf(entities.size()), queryInfo.skipToken);\n } finally {\n // make sure to detach the QueryInfo from the thread when we're done\n ExtendedPropertyModel.setQueryInfo(null);\n }\n }", "public interface IEntry extends IRelation {\r\n\r\n String getJoinColumnName();\r\n\r\n\r\n void setJoinColumnName(String joinColumnName);\r\n\r\n\r\n String getJoinAttributeName();\r\n\r\n\r\n void setJoinAttributeName(String joinAttributeName);\r\n\r\n\r\n String getJoinEntityIdentifier();\r\n\r\n\r\n void setJoinEntityIdentifier(String joinEntityIdentifier);\r\n\r\n \r\n Entity getJoinEntity();\r\n}", "private void constructJoins(CriteriaBuilderImpl cb, AbstractCriteriaQueryImpl<?> q, RootImpl<Object> r, Tree joins) {\n \t\tfor (int i = 0; i < joins.getChildCount(); i++) {\n \t\t\tfinal Tree join = joins.getChild(i);\n \n \t\t\tJoinType joinType = JoinType.INNER;\n \n \t\t\tfinal int joinSpecification = join.getChild(0).getType();\n \t\t\tint offset = 0;\n \n \t\t\tif (joinSpecification == JpqlParser.INNER) {\n \t\t\t\toffset = 1;\n \t\t\t\tjoinType = JoinType.INNER;\n \t\t\t}\n \t\t\telse if (joinSpecification == JpqlParser.LEFT) {\n \t\t\t\toffset = 1;\n \t\t\t\tjoinType = JoinType.LEFT;\n \t\t\t}\n \n \t\t\tif (join.getChildCount() == (offset + 3)) {\n \t\t\t\tFetchParent<?, ?> parent = this.getAliased(q, join.getChild(offset).getText());\n \n \t\t\t\tfinal Qualified qualified = new Qualified(join.getChild(offset + 1).getChild(0));\n \n \t\t\t\tfor (final String segment : qualified.getSegments()) {\n \t\t\t\t\tparent = parent.fetch(segment, joinType);\n \t\t\t\t}\n \t\t\t}\n \t\t\telse {\n \t\t\t\tAbstractFrom<?, ?> parent = this.getAliased(q, join.getChild(offset).getText());\n \n \t\t\t\tfinal Aliased aliased = new Aliased(join.getChild(offset + 1));\n \n \t\t\t\tint depth = 0;\n \t\t\t\tfor (final String segment : aliased.getQualified().getSegments()) {\n \t\t\t\t\tif ((depth > 0) && (parent instanceof PluralJoin)) {\n \t\t\t\t\t\tthrow new PersistenceException(\"Cannot qualify, only embeddable joins within the path allowed, \" + \"line \" + join.getLine() + \":\"\n \t\t\t\t\t\t\t+ join.getCharPositionInLine());\n \t\t\t\t\t}\n \n \t\t\t\t\tparent = parent.join(segment, joinType);\n \n \t\t\t\t\tdepth++;\n \t\t\t\t}\n \n \t\t\t\tthis.putAlias(q, join.getChild(1), aliased, parent);\n \t\t\t}\n \t\t}\n \t}", "private void createNonRelationalMapping(PropertyDescriptor property)\n throws Exception {\n ClassDescriptor declaringClassDescriptor = property.parent();\n JavaModel javaModel = du.getJavaModel();\n Object propertyType = getJavaType(property);\n if (javaModel.isBasic(propertyType)) {\n BasicDescriptor basic = of.createBasicDescriptor();\n basic.setFetch(FetchType.EAGER);\n property.setMapping(basic);\n return;\n } else if (declaringClassDescriptor.isEmbeddable()) {\n property.setEmbedded(of.createEmbeddedDescriptor());\n return;\n } else if (javaModel.isAssignable(\n javaModel.getJavaType(Clob.class.getName()), propertyType)) {\n LobDescriptor lob = of.createLobDescriptor();\n lob.setType(LobType.CLOB);\n lob.setFetch(FetchType.LAZY);\n property.setMapping(lob);\n } else if (javaModel.isAssignable(\n javaModel.getJavaType(Blob.class.getName()), propertyType)) {\n LobDescriptor lob = of.createLobDescriptor();\n lob.setType(LobType.BLOB);\n lob.setFetch(FetchType.LAZY);\n property.setMapping(lob);\n } else if (javaModel.isAssignable(\n javaModel.getJavaType(Serializable.class.getName()),\n propertyType)) {\n SerializedDescriptor serialized = of.createSerializedDescriptor();\n serialized.setFetch(FetchType.EAGER);\n property.setMapping(serialized);\n } else {\n // Should this be caught by verifier in an earlier step?\n throw new DeploymentException(\n i18NHelper.msg(\"EXC_NotAbleToDefaultMappingForProperty\", // NOI18N\n property.getName(),\n declaringClassDescriptor.getName()));\n }\n }", "void visit(final Join join);", "@Override\n public DebuggerRuleInfo getDebuggerRuleInfo() {\n return new DebuggerRuleInfo(\"JOIN\", \"Generate variations for every type of JOIN (INNER JOIN | LEFT JOIN | IGHT JOIN).\");\n }", "public void setDrawingJoin(JOIN join);", "private void checkMappedByOneToOne(DeployBeanPropertyAssocOne<?> prop) {\n String mappedBy = prop.getMappedBy();\n // get the mappedBy property\n DeployBeanDescriptor<?> targetDesc = targetDescriptor(prop);\n DeployBeanPropertyAssocOne<?> mappedAssocOne = mappedOneToOne(prop, mappedBy, targetDesc);\n DeployTableJoin tableJoin = prop.getTableJoin();\n if (!tableJoin.hasJoinColumns()) {\n // define Join as the inverse of the mappedBy property\n DeployTableJoin otherTableJoin = mappedAssocOne.getTableJoin();\n otherTableJoin.copyWithoutType(tableJoin, true, tableJoin.getTable());\n }\n\n if (mappedAssocOne.isPrimaryKeyJoin()) {\n // bi-directional PrimaryKeyJoin ...\n mappedAssocOne.setPrimaryKeyJoin(false);\n prop.setPrimaryKeyExport();\n addPrimaryKeyJoin(prop);\n }\n }", "public static FetchStyle determineFetchStyleByProfile(\n\t\t\tLoadQueryInfluencers loadQueryInfluencers,\n\t\t\tEntityPersister persister,\n\t\t\tPropertyPath path,\n\t\t\tint propertyNumber) {\n\t\tif ( !loadQueryInfluencers.hasEnabledFetchProfiles() ) {\n\t\t\t// perf optimization\n\t\t\treturn null;\n\t\t}\n\n\t\t// ugh, this stuff has to be made easier...\n\t\tfinal String fullPath = path.getFullPath();\n\t\tfinal String rootPropertyName = ( (OuterJoinLoadable) persister ).getSubclassPropertyName( propertyNumber );\n\t\tint pos = fullPath.lastIndexOf( rootPropertyName );\n\t\tfinal String relativePropertyPath = pos >= 0\n\t\t\t\t? fullPath.substring( pos )\n\t\t\t\t: rootPropertyName;\n\t\tfinal String fetchRole = persister.getEntityName() + \".\" + relativePropertyPath;\n\n\t\tIterator profiles = loadQueryInfluencers.getEnabledFetchProfileNames().iterator();\n\t\twhile ( profiles.hasNext() ) {\n\t\t\tfinal String profileName = ( String ) profiles.next();\n\t\t\tfinal FetchProfile profile = loadQueryInfluencers.getSessionFactory().getFetchProfile( profileName );\n\t\t\tfinal Fetch fetch = profile.getFetchByRole( fetchRole );\n\t\t\tif ( fetch != null && Fetch.Style.JOIN == fetch.getStyle() ) {\n\t\t\t\treturn FetchStyle.JOIN;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public void addJoinIfNotPresent(String joinPart) {\r\n\t\tif (this.joins.toLowerCase().indexOf(joinPart.toLowerCase())==-1) {\r\n\t\t\taddJoinOn(joinPart);\r\n\t\t}\r\n\t}", "public EnumerateJoinsRule(JoinEnum joinEnum) {\n this.joinEnum = joinEnum;\n }", "public void fetchRelative(String tableName, JoinType joinType) {\n JoinType queryJoin = joinType;\n if (queryJoin == null) {\n queryJoin = JoinType.INNER;\n }\n fetchTables.add(new BaseJoin(tableName, queryJoin));\n }", "@SuppressWarnings(\"unchecked\")\n public static <T, K> Join<T, K> findJoinedType(CriteriaQuery<T> query, Class<T> rootClass,\n\t Class<K> joinClass) {\n\tRoot<T> root = findRoot(query, rootClass);\n\tJoin<T, K> join = null;\n\tfor (Join<T, ?> j : root.getJoins()) {\n\t if (j.getJoinType().equals(joinClass)) {\n\t\tjoin = (Join<T, K>) j;\n\t }\n\t}\n\treturn join;\n }", "public Join(JoinPredicate p, DbIterator child1, DbIterator child2) {\n this._p = p;\n this._child1 = child1;\n this._child2 = child2;\n this._hj = new HashJoin();\n }", "private void setInheritanceInfo(DeployBeanInfo<?> info) {\n for (DeployBeanPropertyAssocOne<?> oneProp : info.getDescriptor().propertiesAssocOne()) {\n if (!oneProp.isTransient()) {\n DeployBeanInfo<?> assoc = deployInfoMap.get(oneProp.getTargetType());\n if (assoc != null) {\n oneProp.getTableJoin().setInheritInfo(assoc.getDescriptor().getInheritInfo());\n }\n }\n }\n for (DeployBeanPropertyAssocMany<?> manyProp : info.getDescriptor().propertiesAssocMany()) {\n if (!manyProp.isTransient()) {\n DeployBeanInfo<?> assoc = deployInfoMap.get(manyProp.getTargetType());\n if (assoc != null) {\n manyProp.getTableJoin().setInheritInfo(assoc.getDescriptor().getInheritInfo());\n }\n }\n }\n }", "protected List<Selection<?>> createSelectClause(final Map<String, From<?, ?>> joinTables, // NOSONAR\r\n final Collection<JPAPath> requestedProperties, final From<?, ?> target, final List<String> groups)\r\n throws ODataApplicationException { // NOSONAR Allow subclasses to throw an exception\r\n\r\n final int handle = debugger.startRuntimeMeasurement(this, \"createSelectClause\");\r\n final List<Selection<?>> selections = new ArrayList<>();\r\n\r\n // Build select clause\r\n for (final JPAPath jpaPath : requestedProperties) {\r\n if (jpaPath.isPartOfGroups(groups)) {\r\n final Path<?> p = ExpressionUtil.convertToCriteriaPath(joinTables, target, jpaPath.getPath());\r\n p.alias(jpaPath.getAlias());\r\n selections.add(p);\r\n }\r\n }\r\n debugger.stopRuntimeMeasurement(handle);\r\n return selections;\r\n }", "private void appendJoinStatement(JoinStage left,\n JoinStage right) {\n String joinType;\n\n if (left.isRequired() && right.isRequired()) {\n joinType = \"INNER\";\n } else if (left.isRequired() && !right.isRequired()) {\n joinType = \"LEFT OUTER\";\n } else if (!left.isRequired() && right.isRequired()) {\n joinType = \"RIGHT OUTER\";\n } else {\n joinType = \"FULL OUTER\";\n }\n\n // ... <join_type> JOIN <right_table> ON ...\n builder.append(joinType);\n builder.append(JOIN);\n appendFullTableNameAndAlias(right.getStageName());\n builder.append(ON);\n }", "@Override public List<Node> visitJoin(@NotNull XQueryParser.JoinContext ctx) {\n\t\tHashMap<String, List<Node>> hashJoin = new HashMap<String, List<Node>>();\n\t\tList<Node> result = new ArrayList<Node>();\n\t\tList<Node> left = new ArrayList<Node>(visit(ctx.query(0)));\n\t\tList<Node> right = new ArrayList<Node>(visit(ctx.query(1)));\n\t\tList<String> latt = transform(ctx.attrs(0));\n\t\tList<String> ratt = transform(ctx.attrs(1));\n\t\t\n\t\tif(latt.isEmpty()){\n\t\t\tfor(Node lnode : left){\n\t\t\t\tfor(Node rnode: right){\n\t\t\t\t\tElement container = doc.createElement(\"tuple\");\n\t\t\t\t\tList<Node> child = findChild(lnode);\n\t\t\t\t\tchild.addAll(findChild(rnode));\n\t\t\t\t\tfor(Node childNode: child){\n\t\t\t\t\t\tcontainer.appendChild(doc.importNode(childNode, true));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\t\n\t\tList<Node> small = left.size() < right.size() ? left : right,\n\t\t\t\tlarge = left.size() < right.size() ? right : left;\n\t\tList<String> smatt = left.size() < right.size() ? latt : ratt,\n\t\t\t\tlgatt = left.size() < right.size() ? ratt : latt;\n\t\t\n\t\t// store into hash map\n\t\tfor(Node smnode : small){\n\t\t\tString key = convertChildren(smnode, smatt);\n\t\t\tif(hashJoin.containsKey(key)){\n\t\t\t\thashJoin.get(key).add(smnode);\n\t\t\t} else hashJoin.put(key, new ArrayList<Node>(Arrays.asList(smnode)));\n\t\t}\n\t\t\n\t\t// actual join operation\n\t\tfor(Node lgnode : large){\n\t\t\tString attributes = convertChildren(lgnode, lgatt);\n\t\t\tif(hashJoin.containsKey(attributes)){\n\t\t\t\tfor(Node smnode : hashJoin.get(attributes)){\n\t\t\t\t\tElement container = doc.createElement(\"tuple\");\n\t\t\t\t\tList<Node> child = findChild(smnode);\n\t\t\t\t\tchild.addAll(findChild(lgnode));\n\t\t\t\t\tfor(Node childnode: child){\n\t\t\t\t\t\tcontainer.appendChild(doc.importNode(childnode, true));\n\t\t\t\t\t}\n\t\t\t\t\tresult.add(container);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "@Test\n\tpublic void join(){\n\t\t\n\t\tCriteriaBuilder criteriaBuilder = em.getCriteriaBuilder();\n\t\tCriteriaQuery<Course> criteriaQuery = criteriaBuilder.createQuery(Course.class);\n\t\t\n\t\t\n\t\t// Define roots\n\t\tRoot<Course> courseRoot = criteriaQuery.from(Course.class);\n\t\t\n\t\t// Define Predicate\n\t\tJoin<Object, Object> join = courseRoot.join(\"students\");\n\t\t\n\t\t// Add Predicate\n\t\n\t\t//5. Defined Typed Query\n\t\t\t\tTypedQuery<Course> query = em.createQuery(criteriaQuery.select(courseRoot));\n\t\t\t\t\n\t\t\t\tList<Course> resultList = query.getResultList();\n\t\t\t\t\n\t\t\t\tlogger.info(\"JOINED COURSES ==> {}\", resultList);\n\t\t\t\t\t\n\t}", "private void addOneToManyJoin(QueryBuilder sb, String entityAliasName, String collectionAttrName, String joinVarName) {\n\t\tsb.append(\" \")\n\t\t .append(entityAliasName).append(\".\").append(collectionAttrName)\n\t\t .append(\" \")\n\t\t .append(joinVarName);\n\t}", "@Test\n public void test() {\n manager.clear();\n TypedQuery<MasterEntity> query2 = manager.createQuery(\"select m from MasterEntity m join fetch m.ref\", MasterEntity.class);\n logger.debug(query2.getResultList().toString());\n// manager.clear();\n// CriteriaBuilder cb = manager.getCriteriaBuilder();\n// CriteriaQuery<MasterEntity> q = cb.createQuery(MasterEntity.class);\n// Root<MasterEntity> root = q.from(MasterEntity.class);\n// root.fetch(\"ref\");\n// manager.createQuery(q).getResultList();\n\n }", "private void restoreJoinState(Element joinElement) {\n\n\t\tElement sourceColumnElement = (Element) joinElement\n\t\t\t\t.getElementsByTagName(\"sourceColumn\").item(0); //$NON-NLS-1$\n\t\tString sourceColumnName = sourceColumnElement.getAttribute(\"name\"); //$NON-NLS-1$\n\t\tString sourceColumnTable = sourceColumnElement.getAttribute(\"table\"); //$NON-NLS-1$\n\n\t\tQbTableNode sourceTableNode = findTableNodeByName(sourceColumnTable);\n\t\tQbColumnNode sourceColumnNode = sourceTableNode\n\t\t\t\t.findColumnNodeByName(sourceColumnName);\n\n\t\tElement targetColumnElement = (Element) joinElement\n\t\t\t\t.getElementsByTagName(\"targetColumn\").item(0); //$NON-NLS-1$\n\t\tString targetColumnName = targetColumnElement.getAttribute(\"name\"); //$NON-NLS-1$\n\t\tString targetColumnTable = targetColumnElement.getAttribute(\"table\"); //$NON-NLS-1$\n\n\t\tQbTableNode targetTableNode = findTableNodeByName(targetColumnTable);\n\t\tQbColumnNode targetColumnNode = targetTableNode\n\t\t\t\t.findColumnNodeByName(targetColumnName);\n\n\t\tint type = Integer.parseInt(joinElement.getAttribute(\"type\")); //$NON-NLS-1$\n\n\t\taddJoin(sourceColumnNode, targetColumnNode, type);\n\t}", "public static int numJoinTypes() {\n return 3;\n }", "protected DelegatingFetchConfiguration newDelegatingFetchConfiguration(FetchConfiguration fetch) {\n return new DelegatingFetchConfiguration(fetch, PersistenceExceptions.TRANSLATOR);\n }", "private void checkMappedBy(DeployBeanInfo<?> info, List<DeployBeanPropertyAssocOne<?>> primaryKeyJoinCheck) {\n for (DeployBeanPropertyAssocOne<?> oneProp : info.getDescriptor().propertiesAssocOne()) {\n if (!oneProp.isTransient()) {\n if (oneProp.getMappedBy() != null) {\n checkMappedByOneToOne(oneProp);\n } else if (oneProp.isPrimaryKeyJoin()) {\n primaryKeyJoinCheck.add(oneProp);\n }\n }\n }\n\n for (DeployBeanPropertyAssocMany<?> manyProp : info.getDescriptor().propertiesAssocMany()) {\n if (!manyProp.isTransient()) {\n if (manyProp.isManyToMany()) {\n checkMappedByManyToMany(manyProp);\n } else {\n checkMappedByOneToMany(info, manyProp);\n }\n }\n }\n }", "private void buildRowMapping() {\n final Map<String, ColumnDescriptor> targetSource = new TreeMap<>();\n\n // build a DB path .. find parent node that terminates the joint group...\n PrefetchTreeNode jointRoot = this;\n while (jointRoot.getParent() != null && !jointRoot.isDisjointPrefetch()\n && !jointRoot.isDisjointByIdPrefetch()) {\n jointRoot = jointRoot.getParent();\n }\n\n final String prefix;\n if (jointRoot != this) {\n Expression objectPath = ExpressionFactory.pathExp(getPath(jointRoot));\n ASTPath translated = (ASTPath) ((PrefetchProcessorNode) jointRoot)\n .getResolver()\n .getEntity()\n .translateToDbPath(objectPath);\n\n // make sure we do not include \"db:\" prefix\n prefix = translated.getOperand(0) + \".\";\n } else {\n prefix = \"\";\n }\n\n // find propagated keys, assuming that only one-step joins\n // share their column(s) with parent\n\n if (getParent() != null\n && !getParent().isPhantom()\n && getIncoming() != null\n && !getIncoming().getRelationship().isFlattened()) {\n\n DbRelationship r = getIncoming()\n .getRelationship()\n .getDbRelationships()\n .get(0);\n for (final DbJoin join : r.getJoins()) {\n appendColumn(targetSource, join.getTargetName(), prefix\n + join.getTargetName());\n }\n }\n\n ClassDescriptor descriptor = resolver.getDescriptor();\n\n descriptor.visitAllProperties(new PropertyVisitor() {\n\n public boolean visitAttribute(AttributeProperty property) {\n String target = property.getAttribute().getDbAttributePath();\n if(!property.getAttribute().isLazy()) {\n appendColumn(targetSource, target, prefix + target);\n }\n return true;\n }\n\n public boolean visitToMany(ToManyProperty property) {\n return visitRelationship(property);\n }\n\n public boolean visitToOne(ToOneProperty property) {\n return visitRelationship(property);\n }\n\n private boolean visitRelationship(ArcProperty arc) {\n DbRelationship dbRel = arc.getRelationship().getDbRelationships().get(0);\n for (DbAttribute attribute : dbRel.getSourceAttributes()) {\n String target = attribute.getName();\n\n appendColumn(targetSource, target, prefix + target);\n }\n return true;\n }\n });\n\n // append id columns ... (some may have been appended already via relationships)\n for (String pkName : descriptor.getEntity().getPrimaryKeyNames()) {\n appendColumn(targetSource, pkName, prefix + pkName);\n }\n\n // append inheritance discriminator columns...\n for (ObjAttribute column : descriptor.getDiscriminatorColumns()) {\n String target = column.getDbAttributePath();\n appendColumn(targetSource, target, prefix + target);\n }\n\n int size = targetSource.size();\n this.rowCapacity = (int) Math.ceil(size / 0.75);\n this.columns = new ColumnDescriptor[size];\n targetSource.values().toArray(columns);\n }", "public InnerQuery addJoinTableCondition(int index, Condition groupHead, JoinOperator joinOperator, String methodDesc, \r\n\t\t\tEntityDetails joinTableDetails, FieldDetails conditionFieldDetails, FieldDetails fetchFieldDetails)\r\n\t{\r\n\t\tInnerQuery innerQuery = new InnerQuery(entityDetails.getIdField(), fetchFieldDetails, joinTableDetails, joinOperator, this);\r\n\t\t\r\n\t\tinnerQuery.subqueryBuilder.addResultField(null, Object.class, null, fetchFieldDetails.getName(), methodDesc);\r\n\t\tinnerQuery.subqueryBuilder.addCondition(null, Operator.EQ, index, null, conditionFieldDetails.getName(), JoinOperator.AND, methodDesc, false, false, null);\r\n\t\t\r\n\t\tif(groupHead != null)\r\n\t\t{\r\n\t\t\tgroupHead.addCondition(innerQuery);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tconditions.add(innerQuery);\r\n\t\t}\r\n\t\t\r\n\t\treturn innerQuery;\r\n\t}", "private void buildQueryReqInfo(RequestInfo rInfo, String requestType, String[] fetchParam, String projId, String[] filterArray){\r\n\t\trInfo.setRequestType(requestType);\r\n\t\trInfo.setProjectOID(projId);\r\n\t\trInfo.setScopeDown(true);\r\n\t\trInfo.setFetch(fetchParam);\r\n\t\tArrayList<String> filterList = new ArrayList<String>(Arrays.asList(filterArray));\r\n\t\trInfo.setQueryFilter(filterList);\t\r\n\t\tSystem.out.println(requestType + \" -- \" + projId + \" -- \" + fetchParam + \" -- \" +filterList);\r\n\t}", "@Test\n public void testSqlExistsBasedJoin() {\n Query<Car> carsQuery = and(\n in(Car.FEATURES, \"sunroof\", \"convertible\"),\n existsIn(garages,\n Car.NAME,\n Garage.BRANDS_SERVICED,\n equal(Garage.LOCATION, \"Dublin\")\n )\n );\n\n Map<Car, Set<Garage>> results = new LinkedHashMap<Car, Set<Garage>>();\n for (Car car : cars.retrieve(carsQuery)) {\n Query<Garage> garagesWhichServiceThisCarInDublin\n = and(equal(Garage.BRANDS_SERVICED, car.name), equal(Garage.LOCATION, \"Dublin\"));\n for (Garage garage : garages.retrieve(garagesWhichServiceThisCarInDublin)) {\n Set<Garage> garagesWhichCanServiceThisCar = results.get(car);\n if (garagesWhichCanServiceThisCar == null) {\n garagesWhichCanServiceThisCar = new LinkedHashSet<Garage>();\n results.put(car, garagesWhichCanServiceThisCar);\n }\n garagesWhichCanServiceThisCar.add(garage);\n }\n }\n\n assertEquals(\"join results should contain 2 cars\", 2, results.size());\n Assert.assertTrue(\"join results should contain car1\", results.containsKey(car1));\n Assert.assertTrue(\"join results should contain car4\", results.containsKey(car4));\n\n assertEquals(\"join results for car1\", asSet(garage3, garage4), results.get(car1));\n assertEquals(\"join results for car4\", asSet(garage2), results.get(car4));\n }", "private String whatFormOfJoin(final String sqlTrash, final int indexOfJoin) {\n// 21 pred potrebujem max\n String preSQLTrash = sqlTrash.substring(\n indexOfJoin - 21 < 0 ? 0 : indexOfJoin - 21,\n indexOfJoin).toUpperCase();\n if (preSQLTrash.endsWith(\"_\")) {\n joinTypeBlocks.add(0);\n return \"STRAIGHT_JOIN\";\n } else if (preSQLTrash.contains(\"INNER\")) {\n joinTypeBlocks.add(0);\n return \"INNER JOIN\";\n } else if (preSQLTrash.contains(\"CROSS\")) {\n joinTypeBlocks.add(0);\n return \"CROSS JOIN\";\n } else if (preSQLTrash.contains(\"LEFT\")) {\n joinTypeBlocks.add(1);\n String returnString = \"LEFT\";\n if (preSQLTrash.contains(\"OUTER\")) {\n returnString = returnString + \" OUTER JOIN\";\n } else {\n returnString = returnString + \" JOIN\";\n }\n if (preSQLTrash.contains(\"NATURAL\")) {\n returnString = \"NATURAL \" + returnString;\n }\n return returnString;\n } else if (preSQLTrash.contains(\"RIGHT\")) {\n joinTypeBlocks.add(2);\n String returnString = \"RIGHT\";\n if (preSQLTrash.contains(\"OUTER\")) {\n returnString = returnString + \" OUTER JOIN\";\n } else {\n returnString = returnString + \" JOIN\";\n }\n if (preSQLTrash.contains(\"NATURAL\")) {\n returnString = \"NATURAL \" + returnString;\n }\n return returnString;\n }\n //ak nenajdem nic exte\n joinTypeBlocks.add(0);\n return \"JOIN\";\n }", "@Override\n public void visit(final OpJoin opJoin) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpJoin\");\n }\n final OpRewriter rewriter = new OpRewriter(securityEvaluator, graphIRI);\n addOp(OpJoin.create(rewriteOp2(opJoin, rewriter), rewriter.getResult()));\n }", "@Test\r\n\tvoid join() {\r\n\t\tQuery query = entityManager.createQuery(\"Select c,s from Course c JOIN c.students s\");\r\n\t\tList<Object[]> resultList = query.getResultList();\r\n\t\tlog.info(\"Result Size -> {}\", resultList.size());\r\n\t\tfor (Object[] result : resultList) {\r\n\t\t\tlog.info(\"Course -> {}\", result[0]);\r\n\t\t\tlog.info(\"Student -> {}\", result[1]);\r\n\t\t}\r\n\t}", "private Register[] createJoinResult(Register[] left, Register[] right) {\n Register[] result = new Register[left.length + right.length - 1]; // -1 because of joining key\n\n int pos = 0;\n for (int i = 0; i < left.length; i++) {\n result[pos++] = left[i];\n }\n\n for (int i = 0; i < right.length; i++) {\n if (i != rightJoinAttributeIndex) {\n result[pos++] = right[i];\n }\n }\n\n return result;\n }", "public Train getJoin() {\n\t\treturn join;\n\t}", "public void setJoinCondition(org.cagrid.data.dcql.JoinCondition joinCondition) {\r\n this.joinCondition = joinCondition;\r\n }", "public T caseJoinNode(JoinNode object) {\n\t\treturn null;\n\t}", "protected boolean addFilter4Select(final Parameter _parameter,\n final IFilter _filter,\n final QueryBuilder _queryBldr,\n final Type _type,\n final String _select)\n throws EFapsException\n {\n boolean ret = true;\n if (_filter instanceof IMapFilter) {\n final Map<?, ?> inner = (IMapFilter) _filter;\n final String from = (String) inner.get(\"from\");\n final boolean validFrom = from != null && !from.isEmpty() ? true : false;\n final String to = (String) inner.get(\"to\");\n final boolean validTo = to != null && !to.isEmpty() ? true : false;\n final Object[] filter = getFilter(Field.get(_filter.getFieldId()));\n\n if (validFrom || !validFrom && filter != null || validFrom && validTo || !validFrom && !validTo\n && filter != null) {\n final String[] parts = _select.split(\"\\\\.\");\n final List<String> lstParts = new ArrayList<>();\n for (final String part : parts) {\n lstParts.add(part);\n }\n if (_select.startsWith(\"class\")) {\n final String typeStr = lstParts.get(0).substring(6, lstParts.get(0).length() - 1);\n final Classification classification = (Classification) Type.get(typeStr);\n final AttributeQuery attrQuery = evaluateFilterSelect(_parameter, inner, lstParts, 1,\n classification, from, to, filter);\n\n _queryBldr.addWhereAttrInQuery(\"ID\", attrQuery);\n } else if (_select.startsWith(\"linkto\")) {\n final String attrName = lstParts.get(0).substring(7, lstParts.get(0).length() - 1);\n final Attribute attr = _type.getAttribute(attrName);\n final AttributeQuery attrQuery = evaluateFilterSelect(_parameter, inner, lstParts, 1, attr\n .getLink(), from, to, filter);\n\n _queryBldr.addWhereAttrInQuery(attrName, attrQuery);\n } else if (_select.startsWith(\"linkfrom\")) {\n final String[] parts2 = lstParts.get(0).split(\"#\");\n final String typeStr = parts2[0].substring(9);\n final Type type = Type.get(typeStr);\n final String attrName = parts2[1].substring(0, parts2[1].length() - 1);\n final AttributeQuery attrQuery2 = evaluateFilterSelect(_parameter, inner, lstParts, 1, type, from,\n to, filter);\n\n final QueryBuilder attrQueryBldr = new QueryBuilder(type);\n attrQueryBldr.addWhereAttrInQuery(\"ID\", attrQuery2);\n final AttributeQuery attrQuery = attrQueryBldr.getAttributeQuery(attrName);\n _queryBldr.addWhereAttrInQuery(\"ID\", attrQuery);\n }\n } else {\n ret = false;\n }\n }\n return ret;\n }", "@Override\n\tpublic Identifier determineJoinColumnName(ImplicitJoinColumnNameSource source) {\n\n\t\tfinal String name;\n\n\t\tif ( source.getNature() == ImplicitJoinColumnNameSource.Nature.ELEMENT_COLLECTION\n\t\t\t\t|| source.getAttributePath() == null ) {\n\t\t\tname = transformEntityName( source.getEntityNaming() )\n\t\t\t\t\t+ '_'\n\t\t\t\t\t+ source.getReferencedColumnName().getText();\n\t\t}\n\t\telse {\n\t\t\tname = transformAttributePath( source.getAttributePath() )\n\t\t\t\t\t+ '_'\n\t\t\t\t\t+ source.getReferencedColumnName().getText();\n\t\t}\n\n\t\treturn toIdentifier( name, source.getBuildingContext() );\n\t}", "public DetachedCriteriaX createAlias(String associationPath, String alias, JoinType joinType)\r\n {\r\n\t\tthis.getCriteria().createAlias( associationPath, alias, joinType );\r\n\t\treturn this;\r\n\t}", "public CreateJoinTableResponse createJoinTable(CreateJoinTableRequest request) throws GPUdbException {\n CreateJoinTableResponse actualResponse_ = new CreateJoinTableResponse();\n submitRequest(\"/create/jointable\", request, actualResponse_, false);\n return actualResponse_;\n }", "private void printJoin(ShowlNodeShape shape, NodeNamer namer) {\n\t\t\t\r\n\t\t\tSet<ShowlJoinCondition> set = new HashSet<>();\r\n\t\t\tfor (ShowlDirectPropertyShape direct : shape.getProperties()) {\r\n\t\t\t\tfor (ShowlMapping m : direct.getMappings()) {\r\n\t\t\t\t\tset.add(m.getJoinCondition());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tList<ShowlJoinCondition> list = new ArrayList<>(set);\r\n\t\t\t\r\n\t\t\t// Print FROM clause\r\n\t\t\t\r\n\t\t\tout.indent();\r\n\t\t\tout.print(\"FROM\");\r\n\t\t\tboolean indented = list.size()>1;\r\n\t\t\tif (indented) {\r\n\t\t\t\tout.pushIndent();\r\n\t\t\t}\r\n\t\t\tfor (ShowlJoinCondition join : list) {\r\n\t\t\t\tif (indented) {\r\n\t\t\t\t\tout.println();\r\n\t\t\t\t\tout.indent();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tout.print(' ');\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tShowlNodeShape other = join.otherNode(shape);\r\n\t\t\t\tout.uri(other.getShape().getIri());\r\n\t\t\t\tString varName = join.focusAlias(namer);\r\n\t\t\t\tout.print(\" AS \");\r\n\t\t\t\tout.print(varName);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (indented) {\r\n\t\t\t\tout.popIndent();\r\n\t\t\t}\r\n\t\t\tout.println();\r\n\t\t\t\r\n\t\t\t// Print WHERE clause\r\n\t\t\t\r\n//\t\t\tout.indent();\r\n//\t\t\tout.print(\"WHERE\");\r\n//\r\n//\t\t\tif (indented) {\r\n//\t\t\t\tout.pushIndent();\r\n//\t\t\t}\r\n//\t\t\t\r\n//\t\t\tfor (ShowlJoinCondition join : list) {\r\n//\t\t\t\tif (indented) {\r\n//\t\t\t\t\tout.println();\r\n//\t\t\t\t\tout.indent();\r\n//\t\t\t\t} else {\r\n//\t\t\t\t\tout.print(' ');\r\n//\t\t\t\t}\r\n//\t\t\t\tShowlPropertyShape left = join.getLeft();\r\n//\t\t\t\tShowlPropertyShape right = join.getRight();\r\n//\t\t\t\t\r\n//\t\t\t\tif (right.getDeclaringShape() == shape) {\r\n//\t\t\t\t\tShowlPropertyShape tmp = left;\r\n//\t\t\t\t\tleft = right;\r\n//\t\t\t\t\tright = tmp;\r\n//\t\t\t\t}\r\n//\t\t\t\t\r\n//\t\t\t\tString leftText = joinValue(left, shape, join, namer);\r\n//\t\t\t\tString rightText = joinValue(right, shape, join, namer);\r\n//\t\t\t\t\r\n//\t\t\t\tout.print(leftText);\r\n//\t\t\t\tout.print(\" = \");\r\n//\t\t\t\tout.print(rightText);\r\n//\t\t\t\t\r\n//\t\t\t}\r\n//\r\n//\t\t\tif (indented) {\r\n//\t\t\t\tout.popIndent();\r\n//\t\t\t}\r\n//\t\t\tout.println();\r\n\t\t}", "public void addJoinOn(boolean enabled, String join) {\r\n\t\tif (enabled) {\r\n\t\t\taddJoinOn(join);\r\n\t\t}\r\n\t}", "public static List<Join_Plat_Facture> getJoins(Connection connection) throws SQLException {\n Statement ordreSQL = connection.createStatement();\n ResultSet resultats = ordreSQL.executeQuery(\"SELECT * from join_plat_facture\");\n\n List<Join_Plat_Facture> joinList = new ArrayList<>();\n\n while (resultats.next()) {\n Join_Plat_Facture dbJoin = new Join_Plat_Facture(resultats.getInt(\"idx_plat\"),\n resultats.getInt(\"idx_facture\"),\n resultats.getInt(\"quantite\"));\n joinList.add(dbJoin);\n\n //System.out.println(dbJoin);\n }\n\n resultats.close();\n ordreSQL.close();\n\n return joinList;\n }", "@VisibleForTesting\n static TableMetadata getTableMetadata(EdgeType edgeType) {\n ImmutableList.Builder<ColumnMetadata> columnBuilder = ImmutableList.builder();\n switch (edgeType) {\n case LAYER3:\n columnBuilder.add(\n new ColumnMetadata(\n COL_INTERFACE,\n Schema.INTERFACE,\n \"Interface from which the edge originates\",\n Boolean.TRUE,\n Boolean.FALSE));\n columnBuilder.add(\n new ColumnMetadata(COL_IPS, Schema.set(Schema.IP), \"IPs\", Boolean.FALSE, Boolean.TRUE));\n\n columnBuilder.add(\n new ColumnMetadata(\n COL_REMOTE_INTERFACE,\n Schema.INTERFACE,\n \"Interface at which the edge terminates\",\n Boolean.TRUE,\n Boolean.FALSE));\n columnBuilder.add(\n new ColumnMetadata(\n COL_REMOTE_IPS, Schema.set(Schema.IP), \"Remote IPs\", Boolean.FALSE, Boolean.TRUE));\n break;\n\n case BGP:\n columnBuilder.add(\n new ColumnMetadata(\n COL_NODE, Schema.NODE, \"Node from which the edge originates\", true, false));\n columnBuilder.add(\n new ColumnMetadata(COL_IP, Schema.IP, \"IP at the side of originator\", true, false));\n columnBuilder.add(\n new ColumnMetadata(\n COL_INTERFACE,\n Schema.STRING,\n \"Interface at which the edge originates\",\n Boolean.FALSE,\n Boolean.TRUE));\n columnBuilder.add(\n new ColumnMetadata(\n COL_AS_NUMBER,\n Schema.STRING,\n \"AS Number at the side of originator\",\n Boolean.FALSE,\n Boolean.TRUE));\n columnBuilder.add(\n new ColumnMetadata(\n COL_REMOTE_NODE, Schema.NODE, \"Node at which the edge terminates\", true, false));\n columnBuilder.add(\n new ColumnMetadata(\n COL_REMOTE_IP, Schema.IP, \"IP at the side of the responder\", true, false));\n columnBuilder.add(\n new ColumnMetadata(\n COL_REMOTE_INTERFACE,\n Schema.STRING,\n \"Interface at which the edge terminates\",\n Boolean.FALSE,\n Boolean.TRUE));\n columnBuilder.add(\n new ColumnMetadata(\n COL_REMOTE_AS_NUMBER,\n Schema.STRING,\n \"AS Number at the side of responder\",\n Boolean.FALSE,\n Boolean.TRUE));\n break;\n case VXLAN:\n columnBuilder.add(\n new ColumnMetadata(\n COL_VNI, Schema.INTEGER, \"VNI of the VXLAN tunnel edge\", true, false));\n columnBuilder.add(\n new ColumnMetadata(\n COL_NODE, Schema.NODE, \"Node from which the edge originates\", true, false));\n columnBuilder.add(\n new ColumnMetadata(\n COL_REMOTE_NODE, Schema.NODE, \"Node at which the edge terminates\", true, false));\n columnBuilder.add(\n new ColumnMetadata(\n COL_VTEP_ADDRESS,\n Schema.IP,\n \"VTEP IP of node from which the edge originates\",\n true,\n false));\n columnBuilder.add(\n new ColumnMetadata(\n COL_REMOTE_VTEP_ADDRESS,\n Schema.IP,\n \"VTEP IP of node at which the edge terminates\",\n true,\n false));\n columnBuilder.add(\n new ColumnMetadata(\n COL_VLAN,\n Schema.INTEGER,\n \"VLAN associated with VNI on node from which the edge originates\",\n Boolean.FALSE,\n Boolean.TRUE));\n columnBuilder.add(\n new ColumnMetadata(\n COL_REMOTE_VLAN,\n Schema.INTEGER,\n \"VLAN associated with VNI on node at which the edge terminates\",\n Boolean.FALSE,\n Boolean.TRUE));\n columnBuilder.add(\n new ColumnMetadata(\n COL_UDP_PORT,\n Schema.INTEGER,\n \"UDP port of the VXLAN tunnel transport\",\n Boolean.FALSE,\n Boolean.TRUE));\n columnBuilder.add(\n new ColumnMetadata(\n COL_MULTICAST_GROUP,\n Schema.IP,\n \"Multicast group of the VXLAN tunnel transport\",\n Boolean.FALSE,\n Boolean.TRUE));\n break;\n case IPSEC:\n columnBuilder.add(\n new ColumnMetadata(\n COL_SOURCE_INTERFACE,\n Schema.INTERFACE,\n \"Source interface used in the IPsec session\",\n false,\n true));\n columnBuilder.add(\n new ColumnMetadata(\n COL_TUNNEL_INTERFACE,\n Schema.INTERFACE,\n \"Tunnel interface (if any) used in the IPsec session\",\n true,\n false));\n\n columnBuilder.add(\n new ColumnMetadata(\n COL_REMOTE_SOURCE_INTERFACE,\n Schema.INTERFACE,\n \"Remote source interface used in the IPsec session\",\n false,\n true));\n columnBuilder.add(\n new ColumnMetadata(\n COL_REMOTE_TUNNEL_INTERFACE,\n Schema.INTERFACE,\n \"Remote tunnel interface (if any) used in the IPsec session\",\n true,\n false));\n break;\n case OSPF:\n case ISIS:\n case EIGRP:\n case LAYER1:\n default:\n columnBuilder.add(\n new ColumnMetadata(\n COL_INTERFACE,\n Schema.INTERFACE,\n \"Interface from which the edge originates\",\n true,\n false));\n\n columnBuilder.add(\n new ColumnMetadata(\n COL_REMOTE_INTERFACE,\n Schema.INTERFACE,\n \"Interface at which the edge terminates\",\n true,\n false));\n }\n return new TableMetadata(columnBuilder.build(), \"Display Edges\");\n }", "@VisibleForTesting\n protected void appendJoinOnKeyOperation(JoinStage left,\n JoinStage right,\n Map<String, JoinKey> stageNameToJoinKeyMap,\n boolean joinOnNullKeys) {\n // Append Join Statement for these 2 stages\n appendJoinStatement(left, right);\n\n String leftAlias = getTableAlias(left.getStageName());\n String rightAlias = getTableAlias(right.getStageName());\n\n JoinKey leftKey = stageNameToJoinKeyMap.get(left.getStageName());\n JoinKey rightKey = stageNameToJoinKeyMap.get(right.getStageName());\n\n // Append Join on key conditions\n appendJoinOnKeyClause(leftAlias, leftKey, rightAlias, rightKey, joinOnNullKeys);\n }", "private List<T> fetch(Filter filter, Pageable pageable, SortOrders sortOrders, FetchJoinInformation... joins) {\n\t\tTypedQuery<T> query = JpaQueryBuilder.createSelectQuery(filter, entityManager, getEntityClass(),\n\t\t\t\t(joins == null || joins.length == 0) ? getFetchJoins() : joins,\n\t\t\t\tsortOrders == null ? null : sortOrders.toArray());\n\n\t\tif (pageable != null) {\n\t\t\tquery.setFirstResult(pageable.getOffset());\n\t\t\tquery.setMaxResults(pageable.getPageSize());\n\t\t}\n\t\treturn query.getResultList();\n\t}", "public ChangeDetectionByJoin(Fields fields) {\n\t\tsuper(fields);\n\t}", "private void appendConditions(String joinType) {\n if (joinQueryInputs.conditions == null || joinQueryInputs.conditions.size() < 1) {\n return;\n }\n for (Condition condition : joinQueryInputs.conditions) {\n sqlQueryBuilder.append(Constants.SPACE).append(joinType).append(Constants.SPACE)\n .append(getRightTableName(condition.condition)).append(Constants.SPACE).append(Constants.ON).append(Constants.SPACE)\n .append(condition.tableName).append(Constants.DOT).append(condition.columnName);\n sqlQueryBuilder.append(Constants.SPACE);\n appendOperator(condition.operatorType);\n sqlQueryBuilder.append(Constants.SPACE);\n\n if (condition.condition != null) {\n sqlQueryBuilder.append(condition.condition.tableName).append(Constants.DOT)\n .append(condition.condition.columnName);\n } else {\n appendConditions(condition.operatorType, condition.conditionValues);\n }\n\n }\n }", "private void copyMappings(int joinType, Pair<Attribute[], Attribute[]> keyAttributes,\n\t\t\tList<Attribute> unionAttributes) {\n\t\t// for right and outer the method addRightOnlyOccurences is called which might change the mappings of the union\n\t\t// attribute corresponding to the left keyAttribute\n\t\tif (joinType == JOIN_TYPE_RIGHT || joinType == JOIN_TYPE_OUTER) {\n\t\t\tcopyUnionMappings(keyAttributes, unionAttributes);\n\t\t}\n\n\t\t// no id is used and inner or left then createKeyMapping(right,left) is called and left keyAttribute mappings\n\t\t// changed, outer calls left\n\t\tboolean useId = getParameterAsBoolean(PARAMETER_USE_ID);\n\t\tif (!useId && (joinType == JOIN_TYPE_INNER || joinType == JOIN_TYPE_LEFT || joinType == JOIN_TYPE_OUTER)) {\n\t\t\tcopyMappings(keyAttributes, true);\n\t\t}\n\n\t\t// no id is used and right then createKeyMapping(left,right) is called and right keyAttribute mappings changed\n\t\tif (!useId && joinType == JOIN_TYPE_RIGHT) {\n\t\t\tcopyMappings(keyAttributes, false);\n\t\t}\n\t}", "private void readEntityRelationships() {\n List<DeployBeanPropertyAssocOne<?>> primaryKeyJoinCheck = new ArrayList<>();\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n checkMappedBy(info, primaryKeyJoinCheck);\n }\n for (DeployBeanPropertyAssocOne<?> prop : primaryKeyJoinCheck) {\n checkUniDirectionalPrimaryKeyJoin(prop);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n secondaryPropsJoins(info);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n setInheritanceInfo(info);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n if (!info.isEmbedded()) {\n registerDescriptor(info);\n }\n }\n }", "@Transactional(readOnly = true)\n public void associationsAndJoinsExamples() {\n List<Customer> customersWithOrders = getSession().createQuery(\"from Customer as customer inner join customer.orders as ord with ord.shipCountry = 'UK'\").list();\n System.out.println(customersWithOrders.size());\n\n List<Customer> customersWithFetchOrders = getSession().createQuery(\"from Customer as customer inner join fetch customer.orders as ord where ord.shipCountry = 'UK'\").list();\n System.out.println(customersWithOrders.size());\n\n //FETCH keyword - dociąganie obiektów - iloczyn kartezjanski - sa 2 kolekcje\n //List<Customer> customersWithOrderDetails = getSession().createQuery(\"from Customer as customer inner join fetch customer.orders as ord inner join fetch ord.orderDetails as orderDetail\").list();\n //System.out.println(customersWithOrderDetails.size());\n }", "public T caseFlowToSplitJoinMapping(FlowToSplitJoinMapping object) {\n\t\treturn null;\n\t}", "public final native void setLineJoin(LineJoin type) /*-{\n\t\tthis.setLineJoin([email protected]::toString()().toLowerCase());\n\t}-*/;", "@VisibleForTesting\n protected void appendJoinOnKeyClause(String leftAlias,\n JoinKey leftKey,\n String rightAlias,\n JoinKey rightKey,\n boolean joinOnNullKeys) {\n // ... ON [left.l1 = right.r1]\n appendEquals(leftAlias, leftKey.getFields().get(0), rightAlias, rightKey.getFields().get(0), joinOnNullKeys);\n\n for (int i = 1; i < leftKey.getFields().size(); i++) {\n // ... [AND left.rN = right.rN]\n builder.append(AND);\n appendEquals(leftAlias, leftKey.getFields().get(i), rightAlias, rightKey.getFields().get(i), joinOnNullKeys);\n }\n }", "public RelationshipPrefetcher createRelationshipPrefetcher(ObjectReferenceDescriptor ord)\r\n {\r\n if (ord instanceof CollectionDescriptor)\r\n {\r\n CollectionDescriptor cds = (CollectionDescriptor)ord;\r\n if (cds.isMtoNRelation())\r\n {\r\n return new MtoNCollectionPrefetcher(broker, cds);\r\n }\r\n else\r\n {\r\n return new CollectionPrefetcher(broker, cds);\r\n }\r\n }\r\n else\r\n { \r\n return new ReferencePrefetcher(broker, ord);\r\n }\r\n }", "@Override\n public EntityResponse createEntity(String entitySetName, OEntityKey entityKey, String navProp, OEntity entity) {\n return super.createEntity(entitySetName, entityKey, navProp, entity);\n }", "private void checkMappedByOneToMany(DeployBeanInfo<?> info, DeployBeanPropertyAssocMany<?> prop) {\n if (prop.isElementCollection()) {\n // skip mapping check\n return;\n }\n DeployBeanDescriptor<?> targetDesc = targetDescriptor(prop);\n if (targetDesc.isDraftableElement()) {\n // automatically turning on orphan removal and CascadeType.ALL\n prop.setModifyListenMode(BeanCollection.ModifyListenMode.REMOVALS);\n prop.getCascadeInfo().setSaveDelete(true, true);\n }\n\n if (prop.hasOrderColumn()) {\n makeOrderColumn(prop);\n }\n\n if (prop.getMappedBy() == null) {\n // if we are doc store only we are done\n // this allows the use of @OneToMany in @DocStore - Entities\n if (info.getDescriptor().isDocStoreOnly()) {\n prop.setUnidirectional();\n return;\n }\n\n if (!findMappedBy(prop)) {\n if (!prop.isO2mJoinTable()) {\n makeUnidirectional(prop);\n }\n return;\n }\n }\n\n // check that the mappedBy property is valid and read\n // its associated join information if it is available\n String mappedBy = prop.getMappedBy();\n\n // get the mappedBy property\n DeployBeanPropertyAssocOne<?> mappedAssocOne = mappedManyToOne(prop, targetDesc, mappedBy);\n DeployTableJoin tableJoin = prop.getTableJoin();\n if (!tableJoin.hasJoinColumns()) {\n // define Join as the inverse of the mappedBy property\n DeployTableJoin otherTableJoin = mappedAssocOne.getTableJoin();\n otherTableJoin.copyTo(tableJoin, true, tableJoin.getTable());\n }\n\n PropertyForeignKey foreignKey = mappedAssocOne.getForeignKey();\n if (foreignKey != null) {\n ConstraintMode onDelete = foreignKey.getOnDelete();\n switch (onDelete) {\n case SET_DEFAULT:\n case SET_NULL:\n case CASCADE: {\n // turn off cascade delete when we are using the foreign\n // key constraint to cascade the delete or set null\n prop.getCascadeInfo().setDelete(false);\n }\n }\n }\n }", "void relLoadProperties( long relId, boolean light, PropertyReceiver receiver );", "@Override\n\tpublic void preVisit( TJoinItem joinItem )\n\t{\n\t\tint kind = joinItem.getKind();\n\n\t\tswitch ( kind )\n\t\t{\n\t\t\tcase TBaseType.join_source_table:\n\t\t\t\t//\t\t\t\tLOG.info( \"joinItem ST\" );\n\t\t\t\t//LOG.info( joinItem );\n\t\t\t\tjoinItem.getTable().accept( this );\n\t\t\t\tbreak;\n\t\t\tcase TBaseType.join_source_join:\n\t\t\t\t//\t\t\t\tLOG.info( \"joinItem SJ\" );\n\t\t\t\t//joinItem.getJoin().accept( this );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tLOG.warn( \"Unknown TJoinItem kind: \" + kind );\n\t\t\t\tbreak;\n\t\t}\n\t}", "public void joinRelative(String tableName, JoinType joinType) {\n JoinType queryJoin = joinType;\n if (queryJoin == null) {\n queryJoin = JoinType.INNER;\n }\n joinTables.add(new BaseJoin(tableName, queryJoin));\n }", "public UserJoins getUserJoins(Integer tid, int uid);", "public AnnotationInfo fetchByAnnotationProperties(long DocumentRecordID,\n\t\tString Name, String AnnotationType, String Lead,\n\t\tboolean retrieveFromCache) throws SystemException {\n\t\tObject[] finderArgs = new Object[] {\n\t\t\t\tDocumentRecordID, Name, AnnotationType, Lead\n\t\t\t};\n\n\t\tObject result = null;\n\n\t\tif (retrieveFromCache) {\n\t\t\tresult = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_ANNOTATIONPROPERTIES,\n\t\t\t\t\tfinderArgs, this);\n\t\t}\n\n\t\tif (result instanceof AnnotationInfo) {\n\t\t\tAnnotationInfo annotationInfo = (AnnotationInfo)result;\n\n\t\t\tif ((DocumentRecordID != annotationInfo.getDocumentRecordID()) ||\n\t\t\t\t\t!Validator.equals(Name, annotationInfo.getName()) ||\n\t\t\t\t\t!Validator.equals(AnnotationType,\n\t\t\t\t\t\tannotationInfo.getAnnotationType()) ||\n\t\t\t\t\t!Validator.equals(Lead, annotationInfo.getLead())) {\n\t\t\t\tresult = null;\n\t\t\t}\n\t\t}\n\n\t\tif (result == null) {\n\t\t\tStringBundler query = new StringBundler(5);\n\n\t\t\tquery.append(_SQL_SELECT_ANNOTATIONINFO_WHERE);\n\n\t\t\tquery.append(_FINDER_COLUMN_ANNOTATIONPROPERTIES_DOCUMENTRECORDID_2);\n\n\t\t\tif (Name == null) {\n\t\t\t\tquery.append(_FINDER_COLUMN_ANNOTATIONPROPERTIES_NAME_1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (Name.equals(StringPool.BLANK)) {\n\t\t\t\t\tquery.append(_FINDER_COLUMN_ANNOTATIONPROPERTIES_NAME_3);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tquery.append(_FINDER_COLUMN_ANNOTATIONPROPERTIES_NAME_2);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (AnnotationType == null) {\n\t\t\t\tquery.append(_FINDER_COLUMN_ANNOTATIONPROPERTIES_ANNOTATIONTYPE_1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (AnnotationType.equals(StringPool.BLANK)) {\n\t\t\t\t\tquery.append(_FINDER_COLUMN_ANNOTATIONPROPERTIES_ANNOTATIONTYPE_3);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tquery.append(_FINDER_COLUMN_ANNOTATIONPROPERTIES_ANNOTATIONTYPE_2);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (Lead == null) {\n\t\t\t\tquery.append(_FINDER_COLUMN_ANNOTATIONPROPERTIES_LEAD_1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (Lead.equals(StringPool.BLANK)) {\n\t\t\t\t\tquery.append(_FINDER_COLUMN_ANNOTATIONPROPERTIES_LEAD_3);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tquery.append(_FINDER_COLUMN_ANNOTATIONPROPERTIES_LEAD_2);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tString sql = query.toString();\n\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(sql);\n\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\t\tqPos.add(DocumentRecordID);\n\n\t\t\t\tif (Name != null) {\n\t\t\t\t\tqPos.add(Name);\n\t\t\t\t}\n\n\t\t\t\tif (AnnotationType != null) {\n\t\t\t\t\tqPos.add(AnnotationType);\n\t\t\t\t}\n\n\t\t\t\tif (Lead != null) {\n\t\t\t\t\tqPos.add(Lead);\n\t\t\t\t}\n\n\t\t\t\tList<AnnotationInfo> list = q.list();\n\n\t\t\t\tresult = list;\n\n\t\t\t\tAnnotationInfo annotationInfo = null;\n\n\t\t\t\tif (list.isEmpty()) {\n\t\t\t\t\tFinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_ANNOTATIONPROPERTIES,\n\t\t\t\t\t\tfinderArgs, list);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tannotationInfo = list.get(0);\n\n\t\t\t\t\tcacheResult(annotationInfo);\n\n\t\t\t\t\tif ((annotationInfo.getDocumentRecordID() != DocumentRecordID) ||\n\t\t\t\t\t\t\t(annotationInfo.getName() == null) ||\n\t\t\t\t\t\t\t!annotationInfo.getName().equals(Name) ||\n\t\t\t\t\t\t\t(annotationInfo.getAnnotationType() == null) ||\n\t\t\t\t\t\t\t!annotationInfo.getAnnotationType()\n\t\t\t\t\t\t\t\t\t\t\t .equals(AnnotationType) ||\n\t\t\t\t\t\t\t(annotationInfo.getLead() == null) ||\n\t\t\t\t\t\t\t!annotationInfo.getLead().equals(Lead)) {\n\t\t\t\t\t\tFinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_ANNOTATIONPROPERTIES,\n\t\t\t\t\t\t\tfinderArgs, annotationInfo);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn annotationInfo;\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tif (result == null) {\n\t\t\t\t\tFinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_ANNOTATIONPROPERTIES,\n\t\t\t\t\t\tfinderArgs);\n\t\t\t\t}\n\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (result instanceof List<?>) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn (AnnotationInfo)result;\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testJoinTypeLeftWhenParentEffectiveJoinTypeIsLeftEvenWhenOnlyIdSelected() {\n Person parent = query.from(Person.class);\n Relation relation = query.join(parent.getChildRelations(), JoinType.Left);\n \n query.select(relation.getChild().getId());\n \n validate(\"select hobj3.id from Person hobj1 left join hobj1.childRelations hobj2 left join hobj2.child hobj3\");\n }", "@Override\n public void enterFrom(SQLParser.FromContext ctx) {\n if (supportsJoinUsing) return;\n\n // Initialization\n String name1 = null;\n String name2 = null;\n\n // Get table names (prefer aliases, if available)\n // NOTE: the conditions on tables and using are unnecessary\n List<SQLParser.TableContext> tables = ctx.table();\n if (tables.size()>0) {\n name1 = tables.get(0).getText();\n }\n if (tables.size()>1) {\n name2 = tables.get(1).getText();\n }\n\n List<SQLParser.AliasContext> aliases = ctx.alias();\n if (aliases.size()>0) {\n name1 = aliases.get(0).getText();\n }\n if (aliases.size()>1) {\n name2 = aliases.get(1).getText();\n }\n\n // Deal with \"using\"\n List<SQLParser.UsingContext> usings = ctx.using();\n if (usings.size()>0) {\n transformUsing(usings.get(0), name1, name2);\n }\n }", "private synchronized Association buildAssociationObject(ResultSet results) {\n\n Association assoc = null;\n String assocHandle = null;\n\n try {\n\n assocHandle = results.getString(1);\n String assocType = results.getString(2);\n java.util.Date expireIn = new java.util.Date(results.getTimestamp(3).getTime());\n String macKey = results.getString(4);\n String assocStore = results.getString(5);\n\n // we check if params are missing\n if (assocHandle == null || assocType == null || expireIn == null || macKey == null || assocStore == null) {\n log.error(\"Required data missing. Cannot build the Association object\");\n return null;\n }\n\n // Here we check if we are loading the correct associations\n if (associationStore.equals(OpenIDServerConstants.ASSOCIATION_STORE_TYPE_PRIVATE) &&\n assocStore.equals(OpenIDServerConstants.ASSOCIATION_STORE_TYPE_SHARED)) {\n log.error(\n \"Invalid association data found. Tried to load a Private Association but found a Shared Association\");\n return null;\n } else if (associationStore.equals(OpenIDServerConstants.ASSOCIATION_STORE_TYPE_SHARED) &&\n assocStore.equals(OpenIDServerConstants.ASSOCIATION_STORE_TYPE_PRIVATE)) {\n log.error(\n \"Invalid association data found. Tried to load a Shared Association but found a Private Association\");\n return null;\n }\n\n // Checks for association handle\n if (Association.TYPE_HMAC_SHA1.equals(assocType)) {\n assoc = Association.createHmacSha1(assocHandle, Base64.decode(macKey), expireIn);\n\n } else if (Association.TYPE_HMAC_SHA256.equals(assocType)) {\n assoc = Association.createHmacSha256(assocHandle, Base64.decode(macKey), expireIn);\n\n } else {\n log.error(\"Invalid association type \" + assocType + \" loaded from database\");\n return null;\n }\n\n } catch (SQLException e) {\n log.error(\"Failed to build the Association for \" + assocHandle + \". Error while accessing the database.\",\n e);\n } finally {\n IdentityDatabaseUtil.closeResultSet(results);\n }\n\n log.debug(\"Association \" + assocHandle + \" loaded successfully from the database.\");\n return assoc;\n }", "public Boolean getIsJoin () {\r\n\t\treturn isJoin;\r\n\t}", "private PlanNode planMergeJoin(PlanNode current, PlanNode root) throws QueryMetadataException,\n\t\t\tTeiidComponentException {\n\t\tfloat sourceCost = NewCalculateCostUtil.computeCostForTree(current.getFirstChild(), metadata);\n\t\tCriteria crit = (Criteria)current.getProperty(NodeConstants.Info.SELECT_CRITERIA);\n\t\t\n\t\tPlannedResult plannedResult = findSubquery(crit, true);\n\t\tif (plannedResult.query == null) {\n\t\t\treturn current;\n\t\t}\n\t\tif (sourceCost != NewCalculateCostUtil.UNKNOWN_VALUE \n\t\t\t\t&& sourceCost < RuleChooseDependent.DEFAULT_INDEPENDENT_CARDINALITY && !plannedResult.mergeJoin) {\n\t\t\t//TODO: see if a dependent join applies the other direction\n\t\t\treturn current;\n\t\t}\n\t\t\n\t\tRelationalPlan originalPlan = (RelationalPlan)plannedResult.query.getProcessorPlan();\n Number originalCardinality = originalPlan.getRootNode().getEstimateNodeCardinality();\n if (!plannedResult.mergeJoin && originalCardinality.floatValue() == NewCalculateCostUtil.UNKNOWN_VALUE) {\n //TODO: this check isn't really accurate - exists and scalarsubqueries will always have cardinality 2/1\n \t//if it's currently unknown, removing criteria won't make it any better\n \treturn current;\n }\n \n Collection<GroupSymbol> leftGroups = FrameUtil.findJoinSourceNode(current).getGroups();\n\n\t\tif (!planQuery(leftGroups, false, plannedResult)) {\n\t\t\tif (plannedResult.mergeJoin && analysisRecord != null && analysisRecord.recordAnnotations()) {\n\t\t\t\tthis.analysisRecord.addAnnotation(new Annotation(Annotation.HINTS, \"Could not plan as a merge join: \" + crit, \"ignoring MJ hint\", Priority.HIGH)); //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t}\n\t\t\treturn current;\n\t\t}\n\t\t\n\t\t//check if the child is already ordered. TODO: see if the ordering is compatible.\n\t\tPlanNode childSort = NodeEditor.findNodePreOrder(root, NodeConstants.Types.SORT, NodeConstants.Types.SOURCE | NodeConstants.Types.JOIN);\n\t\tif (childSort != null) {\n\t\t\tif (plannedResult.mergeJoin && analysisRecord != null && analysisRecord.recordAnnotations()) {\n\t\t\t\tthis.analysisRecord.addAnnotation(new Annotation(Annotation.HINTS, \"Could not plan as a merge join since the parent join requires a sort: \" + crit, \"ignoring MJ hint\", Priority.HIGH)); //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t}\n\t\t\treturn current;\n\t\t}\n\t\t\n\t\t//add an order by, which hopefully will get pushed down\n\t\tplannedResult.query.setOrderBy(new OrderBy(plannedResult.rightExpressions).clone());\n\t\tfor (OrderByItem item : plannedResult.query.getOrderBy().getOrderByItems()) {\n\t\t\tint index = plannedResult.query.getProjectedSymbols().indexOf(item.getSymbol());\n\t\t\tif (index >= 0 && !(item.getSymbol() instanceof ElementSymbol)) {\n\t\t\t\titem.setSymbol((Expression) plannedResult.query.getProjectedSymbols().get(index).clone());\n\t\t\t}\n\t\t\titem.setExpressionPosition(index);\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t//clone the symbols as they may change during planning\n\t\t\tList<Expression> projectedSymbols = LanguageObject.Util.deepClone(plannedResult.query.getProjectedSymbols(), Expression.class);\n\t\t\t//NOTE: we could tap into the relationalplanner at a lower level to get this in a plan node form,\n\t\t\t//the major benefit would be to reuse the dependent join planning logic if possible.\n\t\t\tRelationalPlan subPlan = (RelationalPlan)QueryOptimizer.optimizePlan(plannedResult.query, metadata, idGenerator, capFinder, analysisRecord, context);\n\t\t\tNumber planCardinality = subPlan.getRootNode().getEstimateNodeCardinality();\n \n\t\t\tif (!plannedResult.mergeJoin) {\n\t\t\t\t//if we don't have a specific hint, then use costing\n\t if (planCardinality.floatValue() == NewCalculateCostUtil.UNKNOWN_VALUE \n\t \t\t|| planCardinality.floatValue() > 10000000\n\t \t\t|| (sourceCost == NewCalculateCostUtil.UNKNOWN_VALUE && planCardinality.floatValue() > 1000)\n\t \t\t|| (sourceCost != NewCalculateCostUtil.UNKNOWN_VALUE && sourceCost * originalCardinality.floatValue() < planCardinality.floatValue() / (100 * Math.log(Math.max(4, sourceCost))))) {\n\t \t//bail-out if both are unknown or the new plan is too large\n\t \tif (analysisRecord != null && analysisRecord.recordDebug()) {\n\t \t\tcurrent.recordDebugAnnotation(\"cost of merge join plan was not favorable\", null, \"semi merge join will not be used\", analysisRecord, metadata); //$NON-NLS-1$ //$NON-NLS-2$\n\t \t\t\t}\n\t \treturn current;\n\t }\n\t\t\t}\n \n\t\t\t//assume dependent\n\t\t\tif ((sourceCost != NewCalculateCostUtil.UNKNOWN_VALUE && planCardinality.floatValue() != NewCalculateCostUtil.UNKNOWN_VALUE \n\t\t\t\t\t&& planCardinality.floatValue() < sourceCost / 8) || (sourceCost == NewCalculateCostUtil.UNKNOWN_VALUE && planCardinality.floatValue() <= 1000)) {\n\t\t\t\tplannedResult.makeInd = true;\n\t\t\t}\n\t\t\t\n\t\t\t/*if (plannedResult.makeInd \n\t\t\t\t\t&& plannedResult.query.getCorrelatedReferences() == null\n\t\t\t\t\t&& !plannedResult.not\n\t\t\t\t\t&& plannedResult.leftExpressions.size() == 1) {\n \t//TODO: this should just be a dependent criteria node to avoid sorts\n }*/\n\t\t\t\n\t\t\tcurrent.recordDebugAnnotation(\"Conditions met (hint or cost)\", null, \"Converting to a semi merge join\", analysisRecord, metadata); //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\n PlanNode semiJoin = NodeFactory.getNewNode(NodeConstants.Types.JOIN);\n semiJoin.addGroups(current.getGroups());\n Set<GroupSymbol> groups = GroupsUsedByElementsVisitor.getGroups(plannedResult.rightExpressions);\n semiJoin.addGroups(groups);\n semiJoin.setProperty(NodeConstants.Info.JOIN_STRATEGY, JoinStrategyType.MERGE);\n semiJoin.setProperty(NodeConstants.Info.JOIN_TYPE, plannedResult.not?JoinType.JOIN_ANTI_SEMI:JoinType.JOIN_SEMI);\n semiJoin.setProperty(NodeConstants.Info.NON_EQUI_JOIN_CRITERIA, plannedResult.nonEquiJoinCriteria);\n List<Criteria> joinCriteria = new ArrayList<Criteria>();\n joinCriteria.addAll(plannedResult.nonEquiJoinCriteria);\n for (int i = 0; i < plannedResult.leftExpressions.size(); i++) {\n \tjoinCriteria.add(new CompareCriteria((Expression)plannedResult.rightExpressions.get(i), CompareCriteria.EQ, (Expression)plannedResult.leftExpressions.get(i)));\n }\n semiJoin.setProperty(NodeConstants.Info.JOIN_CRITERIA, joinCriteria);\n //nested subqueries are possibly being promoted, so they need their references updated\n List<SymbolMap> refMaps = semiJoin.getAllReferences();\n SymbolMap parentRefs = plannedResult.query.getCorrelatedReferences();\n for (SymbolMap refs : refMaps) {\n \tfor (Map.Entry<ElementSymbol, Expression> ref : refs.asUpdatableMap().entrySet()) {\n \t Expression expr = ref.getValue();\n \t if (expr instanceof ElementSymbol) {\n\t \t Expression convertedExpr = parentRefs.getMappedExpression((ElementSymbol)expr);\n\t \t if (convertedExpr != null) {\n\t \t \tref.setValue(convertedExpr);\n\t \t }\n \t }\n \t semiJoin.getGroups().addAll(GroupsUsedByElementsVisitor.getGroups(ref.getValue()));\n \t }\n }\n semiJoin.setProperty(NodeConstants.Info.LEFT_EXPRESSIONS, plannedResult.leftExpressions);\n semiJoin.getGroups().addAll(GroupsUsedByElementsVisitor.getGroups(plannedResult.leftExpressions));\n semiJoin.setProperty(NodeConstants.Info.RIGHT_EXPRESSIONS, plannedResult.rightExpressions);\n semiJoin.getGroups().addAll(GroupsUsedByElementsVisitor.getGroups(plannedResult.rightExpressions));\n semiJoin.setProperty(NodeConstants.Info.SORT_RIGHT, SortOption.ALREADY_SORTED);\n semiJoin.setProperty(NodeConstants.Info.OUTPUT_COLS, root.getProperty(NodeConstants.Info.OUTPUT_COLS));\n \n List childOutput = (List)current.getFirstChild().getProperty(NodeConstants.Info.OUTPUT_COLS);\n PlanNode toCorrect = root;\n while (toCorrect != current) {\n \ttoCorrect.setProperty(NodeConstants.Info.OUTPUT_COLS, childOutput);\n \ttoCorrect = toCorrect.getFirstChild();\n }\n \n PlanNode node = NodeFactory.getNewNode(NodeConstants.Types.ACCESS);\n node.setProperty(NodeConstants.Info.PROCESSOR_PLAN, subPlan);\n node.setProperty(NodeConstants.Info.OUTPUT_COLS, projectedSymbols);\n node.setProperty(NodeConstants.Info.EST_CARDINALITY, planCardinality);\n node.addGroups(groups);\n root.addAsParent(semiJoin);\n semiJoin.addLastChild(node);\n PlanNode result = current.getParent();\n NodeEditor.removeChildNode(result, current);\n RuleImplementJoinStrategy.insertSort(semiJoin.getFirstChild(), (List<Expression>) plannedResult.leftExpressions, semiJoin, metadata, capFinder, true, context);\n if (plannedResult.makeInd && !plannedResult.not) {\n \t//TODO: would like for an enhanced sort merge with the semi dep option to avoid the sorting\n \t//this is a little different than a typical dependent join in that the right is the independent side\n \tString id = RuleChooseDependent.nextId();\n \tPlanNode dep = RuleChooseDependent.getDependentCriteriaNode(id, plannedResult.rightExpressions, plannedResult.leftExpressions, node, metadata, null, false, null);\n \tsemiJoin.getFirstChild().addAsParent(dep);\n \tsemiJoin.setProperty(NodeConstants.Info.DEPENDENT_VALUE_SOURCE, id);\n \tthis.dependent = true;\n }\n return result;\n\t\t} catch (QueryPlannerException e) {\n\t\t\t//can't be done - probably access patterns - what about dependent\n\t\t\treturn current;\n\t\t}\n\t}", "public static <T extends AbstractEntity<?>> void addToResultIfApplicableFromActivatablePerspective(final T entity, final Set<String> keyMembers, final Set<MetaProperty<? extends ActivatableAbstractEntity<?>>> result, final MetaProperty<?> prop) {\n // let's first identify whether entity belongs to the deactivatable type of the referenced property type\n // if so, it should not inflict any ref counts for this property\n final Class<? extends ActivatableAbstractEntity<?>> type = (Class<? extends ActivatableAbstractEntity<?>>) prop.getType();\n final DeactivatableDependencies ddAnnotation = type.getAnnotation(DeactivatableDependencies.class);\n boolean belongsToDeactivatableDependencies;\n if (ddAnnotation != null) {\n // if the main type belongs to dependent deactivatables of the type for the current property,\n // and that property is a key member then such property should be excluded from standard processing of dirty activatables\n belongsToDeactivatableDependencies = keyMembers.contains(prop.getName()) && Arrays.asList(ddAnnotation.value()).contains(entity.getType());\n } else {\n belongsToDeactivatableDependencies = false;\n }\n // null values correspond to dereferencing and should be allowed only for already persisted entities\n // checking prop.isProxy() is really just to prevent calling prop.getValue() on proxied properties, which fails with StrictProxyException\n // this also assumes that proxied properties might actually have a value and need to be included for further processing\n // values for proxied properties are then retrieved in a lazy fashion by Hibernate\n if (!belongsToDeactivatableDependencies && (prop.isProxy() || prop.getValue() != null || entity.isPersisted())) {\n result.add((MetaProperty<? extends ActivatableAbstractEntity<?>>) prop);\n }\n }", "public final EObject ruleJoinOperator() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token otherlv_1=null;\n Token otherlv_3=null;\n Token otherlv_5=null;\n Token otherlv_7=null;\n EObject lv_parameters_2_0 = null;\n\n EObject lv_parameters_4_0 = null;\n\n EObject lv_parameters_6_0 = null;\n\n\n enterRule(); \n \n try {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:548:28: ( (otherlv_0= 'join' otherlv_1= '(' ( (lv_parameters_2_0= ruleStreamOperatorParameter ) ) otherlv_3= ',' ( (lv_parameters_4_0= ruleStreamOperatorParameter ) ) (otherlv_5= ',' ( (lv_parameters_6_0= ruleStreamOperatorParameter ) ) )* otherlv_7= ')' ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:549:1: (otherlv_0= 'join' otherlv_1= '(' ( (lv_parameters_2_0= ruleStreamOperatorParameter ) ) otherlv_3= ',' ( (lv_parameters_4_0= ruleStreamOperatorParameter ) ) (otherlv_5= ',' ( (lv_parameters_6_0= ruleStreamOperatorParameter ) ) )* otherlv_7= ')' )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:549:1: (otherlv_0= 'join' otherlv_1= '(' ( (lv_parameters_2_0= ruleStreamOperatorParameter ) ) otherlv_3= ',' ( (lv_parameters_4_0= ruleStreamOperatorParameter ) ) (otherlv_5= ',' ( (lv_parameters_6_0= ruleStreamOperatorParameter ) ) )* otherlv_7= ')' )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:549:3: otherlv_0= 'join' otherlv_1= '(' ( (lv_parameters_2_0= ruleStreamOperatorParameter ) ) otherlv_3= ',' ( (lv_parameters_4_0= ruleStreamOperatorParameter ) ) (otherlv_5= ',' ( (lv_parameters_6_0= ruleStreamOperatorParameter ) ) )* otherlv_7= ')'\n {\n otherlv_0=(Token)match(input,20,FOLLOW_20_in_ruleJoinOperator1229); \n\n \tnewLeafNode(otherlv_0, grammarAccess.getJoinOperatorAccess().getJoinKeyword_0());\n \n otherlv_1=(Token)match(input,21,FOLLOW_21_in_ruleJoinOperator1241); \n\n \tnewLeafNode(otherlv_1, grammarAccess.getJoinOperatorAccess().getLeftParenthesisKeyword_1());\n \n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:557:1: ( (lv_parameters_2_0= ruleStreamOperatorParameter ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:558:1: (lv_parameters_2_0= ruleStreamOperatorParameter )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:558:1: (lv_parameters_2_0= ruleStreamOperatorParameter )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:559:3: lv_parameters_2_0= ruleStreamOperatorParameter\n {\n \n \t newCompositeNode(grammarAccess.getJoinOperatorAccess().getParametersStreamOperatorParameterParserRuleCall_2_0()); \n \t \n pushFollow(FOLLOW_ruleStreamOperatorParameter_in_ruleJoinOperator1262);\n lv_parameters_2_0=ruleStreamOperatorParameter();\n\n state._fsp--;\n\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getJoinOperatorRule());\n \t }\n \t\tadd(\n \t\t\tcurrent, \n \t\t\t\"parameters\",\n \t\tlv_parameters_2_0, \n \t\t\"StreamOperatorParameter\");\n \t afterParserOrEnumRuleCall();\n \t \n\n }\n\n\n }\n\n otherlv_3=(Token)match(input,16,FOLLOW_16_in_ruleJoinOperator1274); \n\n \tnewLeafNode(otherlv_3, grammarAccess.getJoinOperatorAccess().getCommaKeyword_3());\n \n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:579:1: ( (lv_parameters_4_0= ruleStreamOperatorParameter ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:580:1: (lv_parameters_4_0= ruleStreamOperatorParameter )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:580:1: (lv_parameters_4_0= ruleStreamOperatorParameter )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:581:3: lv_parameters_4_0= ruleStreamOperatorParameter\n {\n \n \t newCompositeNode(grammarAccess.getJoinOperatorAccess().getParametersStreamOperatorParameterParserRuleCall_4_0()); \n \t \n pushFollow(FOLLOW_ruleStreamOperatorParameter_in_ruleJoinOperator1295);\n lv_parameters_4_0=ruleStreamOperatorParameter();\n\n state._fsp--;\n\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getJoinOperatorRule());\n \t }\n \t\tadd(\n \t\t\tcurrent, \n \t\t\t\"parameters\",\n \t\tlv_parameters_4_0, \n \t\t\"StreamOperatorParameter\");\n \t afterParserOrEnumRuleCall();\n \t \n\n }\n\n\n }\n\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:597:2: (otherlv_5= ',' ( (lv_parameters_6_0= ruleStreamOperatorParameter ) ) )*\n loop6:\n do {\n int alt6=2;\n int LA6_0 = input.LA(1);\n\n if ( (LA6_0==16) ) {\n alt6=1;\n }\n\n\n switch (alt6) {\n \tcase 1 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:597:4: otherlv_5= ',' ( (lv_parameters_6_0= ruleStreamOperatorParameter ) )\n \t {\n \t otherlv_5=(Token)match(input,16,FOLLOW_16_in_ruleJoinOperator1308); \n\n \t \tnewLeafNode(otherlv_5, grammarAccess.getJoinOperatorAccess().getCommaKeyword_5_0());\n \t \n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:601:1: ( (lv_parameters_6_0= ruleStreamOperatorParameter ) )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:602:1: (lv_parameters_6_0= ruleStreamOperatorParameter )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:602:1: (lv_parameters_6_0= ruleStreamOperatorParameter )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:603:3: lv_parameters_6_0= ruleStreamOperatorParameter\n \t {\n \t \n \t \t newCompositeNode(grammarAccess.getJoinOperatorAccess().getParametersStreamOperatorParameterParserRuleCall_5_1_0()); \n \t \t \n \t pushFollow(FOLLOW_ruleStreamOperatorParameter_in_ruleJoinOperator1329);\n \t lv_parameters_6_0=ruleStreamOperatorParameter();\n\n \t state._fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getJoinOperatorRule());\n \t \t }\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"parameters\",\n \t \t\tlv_parameters_6_0, \n \t \t\t\"StreamOperatorParameter\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop6;\n }\n } while (true);\n\n otherlv_7=(Token)match(input,22,FOLLOW_22_in_ruleJoinOperator1343); \n\n \tnewLeafNode(otherlv_7, grammarAccess.getJoinOperatorAccess().getRightParenthesisKeyword_6());\n \n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "RecordPropertyType createRecordPropertyType();" ]
[ "0.73012286", "0.6594061", "0.6180818", "0.6063528", "0.59948725", "0.5612186", "0.54566115", "0.54537135", "0.54219127", "0.54187", "0.5405297", "0.5233083", "0.520949", "0.5182683", "0.501027", "0.49321377", "0.49287683", "0.4924309", "0.4921457", "0.49105287", "0.48371428", "0.48325238", "0.47838095", "0.4780806", "0.47607398", "0.47485405", "0.47363105", "0.47157678", "0.46848002", "0.46834147", "0.46772614", "0.46619225", "0.4661547", "0.46486327", "0.46443027", "0.45917457", "0.45841914", "0.4530145", "0.44851083", "0.44723526", "0.4472111", "0.44638202", "0.4447083", "0.4445818", "0.44238347", "0.44149372", "0.44082624", "0.44009697", "0.44003496", "0.44002393", "0.4395656", "0.43930316", "0.43633172", "0.4339553", "0.43358275", "0.4318088", "0.4317214", "0.43133715", "0.42986223", "0.4298402", "0.42964613", "0.4295402", "0.4287883", "0.42645702", "0.42641363", "0.4245258", "0.42141312", "0.42093378", "0.42012227", "0.4200862", "0.42002004", "0.41992292", "0.41966555", "0.41939127", "0.41799057", "0.41766644", "0.41682014", "0.4161812", "0.41578642", "0.4157034", "0.41513863", "0.41256228", "0.41084456", "0.41074976", "0.41068548", "0.40900427", "0.40871277", "0.408094", "0.40794015", "0.40715605", "0.40691513", "0.4067715", "0.4051463", "0.40507868", "0.40370438", "0.4032644", "0.40314826", "0.4018254", "0.4016904", "0.40124732" ]
0.7848682
0
TODO Autogenerated method stub
public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("XAC DINH SO HOAN HAO"); System.out.println(); int j = 0; while (j < j+1) { int number;//biến số nhập vào do { //nhập số cần xác định System.out.print("Nhap so can xac dinh: "); number = scan.nextInt(); } while (number < 0); //bắt người dùng nhập số dương int i; //khai báo biến i dùng để thực hiện bài toán int sumDivisor = 0; //tổng các ước for (i = 1; i < number ;i++ ) { if (number % i == 0) { sumDivisor += i; } } //xác định số đó có phải số hoàn hảo hay không if (sumDivisor == number) { System.out.println(number +" La so hoan hao."); } else { System.out.println(number + " Khong phai la so hoan hao."); } System.out.println(); } }
{ "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
Initializes the controller class.
@Override public void initialize(URL url, ResourceBundle rb) { // TODO single_count.setItems(options); single_count.setValue(options.get(0)); double_count.setItems(options); double_count.setValue(options.get(0)); from_date.getChronology().dateNow(); from_date.setValue(Trip_plan.city_start); //System.out.println(LocalDate.now()); final Callback<DatePicker, DateCell> dayCellFactory = new Callback<DatePicker, DateCell>() { @Override public DateCell call(final DatePicker datePicker) { return new DateCell() { @Override public void updateItem(LocalDate item, boolean empty) { super.updateItem(item, empty); if (item.isBefore( Trip_plan.city_start)) { // System.out.println("hey"); setDisable(true); setStyle("-fx-background-color: #ffc0cb;"); } } }; } }; from_date.setDayCellFactory(dayCellFactory); final Callback<DatePicker, DateCell> dayCelFactory = new Callback<DatePicker, DateCell>() { @Override public DateCell call(final DatePicker datePicker) { return new DateCell() { @Override public void updateItem(LocalDate item, boolean empty) { super.updateItem(item, empty); if (item.isAfter( Trip_plan.city_end)||(item.isBefore(from_date.getValue()))) { // System.out.println("hey"); setDisable(true); setStyle("-fx-background-color: #ffc0cb;"); } } }; } }; to_date.setDayCellFactory(dayCelFactory); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initialize() {\n\t\tcontroller = Controller.getInstance();\n\t}", "public MainController() {\n\t\tcontroller = new Controller(this);\n\t}", "public abstract void initController();", "public Controller() {\n super();\n }", "public Controller() {\n super();\n }", "public Controller()\n\t{\n\n\t}", "private static CompanyController initializeController() {\n\n controller = new CompanyController();\n return controller;\n }", "public MainController() {\n initializeControllers();\n initializeGui();\n runGameLoop();\n }", "public Controller() {\n this.model = new ModelFacade();\n this.view = new ViewFacade();\n }", "public Controller()\r\n\t{\r\n\t\tview = new View();\r\n\t}", "public Controller() {\n\t\tthis(null);\n\t}", "public void init(){\n\t\t//Makes the view\n\t\tsetUpView();\n\n\t\t//Make the controller. Links the action listeners to the view\n\t\tnew Controller(this);\n\t\t\n\t\t//Initilize the array list\n\t\tgameInput = new ArrayList<Integer>();\n\t\tuserInput = new ArrayList<Integer>();\n\t\thighScore = new HighScoreArrayList();\n\t}", "private void initialize() {\n\t\tinitializeModel();\n\t\tinitializeBoundary();\n\t\tinitializeController();\n\t}", "public void init() {\n\t\tkontrolleri1 = new KolikkoController(this);\n\t}", "protected void initialize() {\n super.initialize(); // Enables \"drive straight\" controller\n }", "public Controller() {\n model = new Model();\n comboBox = new ChannelComboBox();\n initView();\n new ChannelWorker().execute();\n timer = new Timer();\n }", "protected CityController() {\r\n\t}", "public void initialize() {\n warpController = new WarpController(this);\n kitController = new KitController(this);\n crafting = new CraftingController(this);\n mobs = new MobController(this);\n items = new ItemController(this);\n enchanting = new EnchantingController(this);\n anvil = new AnvilController(this);\n blockController = new BlockController(this);\n hangingController = new HangingController(this);\n entityController = new EntityController(this);\n playerController = new PlayerController(this);\n inventoryController = new InventoryController(this);\n explosionController = new ExplosionController(this);\n requirementsController = new RequirementsController(this);\n worldController = new WorldController(this);\n arenaController = new ArenaController(this);\n arenaController.start();\n if (CompatibilityLib.hasStatistics() && !CompatibilityLib.hasJumpEvent()) {\n jumpController = new JumpController(this);\n }\n File examplesFolder = new File(getPlugin().getDataFolder(), \"examples\");\n examplesFolder.mkdirs();\n\n File urlMapFile = getDataFile(URL_MAPS_FILE);\n File imageCache = new File(dataFolder, \"imagemapcache\");\n imageCache.mkdirs();\n maps = new MapController(this, urlMapFile, imageCache);\n\n // Initialize EffectLib.\n if (com.elmakers.mine.bukkit.effect.EffectPlayer.initialize(plugin, getLogger())) {\n getLogger().info(\"EffectLib initialized\");\n } else {\n getLogger().warning(\"Failed to initialize EffectLib\");\n }\n\n // Pre-create schematic folder\n File magicSchematicFolder = new File(plugin.getDataFolder(), \"schematics\");\n magicSchematicFolder.mkdirs();\n\n // One-time migration of legacy configurations\n migrateConfig(\"enchanting\", \"paths\");\n migrateConfig(\"automata\", \"blocks\");\n migrateDataFile(\"automata\", \"blocks\");\n\n // Ready to load\n load();\n resourcePacks.startResourcePackChecks();\n }", "public ClientController() {\n }", "public Controller() {\n\t\tthis.nextID = 0;\n\t\tthis.data = new HashMap<Integer, T>();\n\t}", "public ListaSEController() {\n }", "boolean InitController();", "public MenuController() {\r\n\t \r\n\t }", "@Override\n\tprotected void initController() throws Exception {\n\t\tmgr = orderPickListManager;\n\t}", "public CustomerController() {\n\t\tsuper();\n\n\t}", "public Controller(){\r\n\t\tthis.fabricaJogos = new JogoFactory();\r\n\t\tthis.loja = new Loja();\r\n\t\tthis.preco = 0;\r\n\t\tthis.desconto = 0;\r\n\t}", "public End_User_0_Controller() {\r\n\t\t// primaryStage = Users_Page_Controller.primaryStage;\r\n\t\t// this.Storeinfo = primaryStage.getTitle();\r\n\t}", "private Controller() {\n\t\tthis.gui = GUI.getInstance();\n\t\tthis.gui.setController(this);\n\t}", "public GameController() {\r\n\t\tsuper();\r\n\t\tthis.model = Main.getModel();\r\n\t\tthis.player = this.model.getPlayer();\r\n\t\tthis.timeline = this.model.getIndefiniteTimeline();\r\n\t}", "public PlantillaController() {\n }", "public Controller() {\n\t\tplaylist = new ArrayList<>();\n\t\tshowingMore = false;\n\t\tstage = Main.getStage();\n\t}", "public IfController()\n\t{\n\n\t}", "public TournamentController()\n\t{\n\t\tinitMap();\n\t}", "public GeneralListVueController() {\n\n\t}", "private ClientController() {\n }", "public Controller()\n\t{\n\t\ttheParser = new Parser();\n\t\tstarList = theParser.getStars();\n\t\tmessierList = theParser.getMessierObjects();\n\t\tmoon = new Moon(\"moon\");\n\t\tsun = new Sun(\"sun\");\n\t\tconstellationList = theParser.getConstellations();\n\t\tplanetList = new ArrayList<Planet>();\n\t\ttheCalculator = new Calculator();\n\t\tepoch2000JD = 2451545.0;\n\t}", "private void initialiseController() \r\n {\r\n defaultVectors();\r\n if(grantsByPIForm == null) \r\n {\r\n grantsByPIForm = new GrantsByPIForm(); //(Component) parent,modal);\r\n }\r\n grantsByPIForm.descriptionLabel.setText(UnitName);\r\n grantsByPIForm.descriptionLabel.setFont(new Font(\"SansSerif\",Font.BOLD,14));\r\n queryEngine = QueryEngine.getInstance();\r\n coeusMessageResources = CoeusMessageResources.getInstance();\r\n registerComponents();\r\n try {\r\n setFormData(null);\r\n }\r\n catch(Exception e) {\r\n e.printStackTrace(System.out);\r\n }\r\n }", "public LogMessageController() {\n\t}", "public LoginPageController() {\n\t}", "public ControllerEnfermaria() {\n }", "public ProvisioningEngineerController() {\n super();\n }", "private StoreController(){}", "public GenericController() {\n }", "@Override\n\tpublic void initialize() {\n\t\tinitializeModel(getSeed());\n\t\tinitializeView();\n\t\tinitializeControllers();\n\t\t\n\t\tupdateScore(8);\n\t\tupdateNumberCardsLeft(86);\n\n\t}", "public MapController() {\r\n\t}", "public Controller() {\n\t\tenabled = false;\n\t\tloop = new Notifier(new ControllerTask(this));\n\t\tloop.startPeriodic(DEFAULT_PERIOD);\n\t}", "@Override\r\n\tpublic void initControllerBean() throws Exception {\n\t}", "private void setupController() {\n setupWriter();\n Controller controller1 = new Controller(writer);\n controller = controller1;\n }", "public WfController()\n {\n }", "public Controller() {\n\n lastSearches = new SearchHistory();\n\n }", "private ClientController(){\n\n }", "public LoginController() {\r\n }", "public PersonasController() {\r\n }", "private void initBefore() {\n // Crear Modelo\n model = new Model();\n\n // Crear Controlador\n control = new Controller(model, this);\n\n // Cargar Propiedades Vista\n prpView = UtilesApp.cargarPropiedades(FICHERO);\n\n // Restaurar Estado\n control.restaurarEstadoVista(this, prpView);\n\n // Otras inicializaciones\n }", "public StoreController() {\n }", "public ConsoleController() {\n\t\tcommandDispatch = new CommandDispatch();\n\t}", "public LoginController() {\r\n\r\n }", "public final void init(final MainController mainController) {\n this.mainController = mainController;\n }", "public SMPFXController() {\n\n }", "public Controller()\r\n {\r\n fillBombs();\r\n fillBoard();\r\n scoreBoard = new ScoreBoard();\r\n }", "public GUIController() {\n\n }", "public void init(){\n this.controller = new StudentController();\n SetSection.displayLevelList(grade_comp);\n new DesignSection().designForm(this, editStudentMainPanel, \"mini\");\n }", "public void init(final Controller controller){\n Gdx.app.debug(\"View\", \"Initializing\");\n \n this.controller = controller;\n \n //clear old stuff\n cameras.clear();\n \n //set up renderer\n hudCamera = new OrthographicCamera();\n hudCamera.setToOrtho(false, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n \n batch = new SpriteBatch();\n igShRenderer = new ShapeRenderer();\n shapeRenderer = new ShapeRenderer();\n \n //set up stage\n stage = new Stage();\n \n //laod cursor\n cursor = new Pixmap(Gdx.files.internal(\"com/BombingGames/WurfelEngine/Core/images/cursor.png\"));\n\n controller.getLoadMenu().viewInit(this);\n \n initalized = true;\n }", "@PostConstruct\n public void init() {\n WebsocketController.getInstance().setTemplate(this.template);\n try {\n\t\t\tthis.chatController = ChatController.getInstance();\n } catch (final Exception e){\n LOG.error(e.getMessage(), e);\n }\n }", "public ControllerTest()\r\n {\r\n }", "public SearchedRecipeController() {\n }", "public FilmOverviewController() {\n }", "public CreditPayuiController() {\n\t\tuserbl = new UserController();\n\t}", "private void initComponents() {\r\n\t\temulator = new Chip8();\r\n\t\tpanel = new DisplayPanel(emulator);\r\n\t\tregisterPanel = new EmulatorInfoPanel(emulator);\r\n\t\t\r\n\t\tcontroller = new Controller(this, emulator, panel, registerPanel);\r\n\t}", "public RootLayoutController() {\n }", "public MehController() {\n updateView(null);\n }", "public Controller(int host) {\r\n\t\tsuper(host);\r\n\t}", "public WorkerController(){\r\n\t}", "public TipoInformazioniController() {\n\n\t}", "private void initializeMealsControllers() {\n trNewPetMeal = MealsControllersFactory.createTrNewPetMeal();\n trObtainAllPetMeals = MealsControllersFactory.createTrObtainAllPetMeals();\n trDeleteMeal = MealsControllersFactory.createTrDeleteMeal();\n trUpdateMeal = MealsControllersFactory.createTrUpdateMeal();\n }", "public ProductOverviewController() {\n }", "public ProduktController() {\r\n }", "public Controller(ViewIF view) {\n\t\tthis.view = view;\n\t\tthis.dao = new DAO();\n\t\tthis.stats = new Statistics(this.dao);\n\t\tthis.gameStarted = false;\n\t}", "private void initializeMedicationControllers() {\n trNewPetMedication = MedicationControllersFactory.createTrNewPetMedication();\n trObtainAllPetMedications = MedicationControllersFactory.createTrObtainAllPetMedications();\n trDeleteMedication = MedicationControllersFactory.createTrDeleteMedication();\n trUpdateMedication = MedicationControllersFactory.createTrUpdateMedication();\n }", "public PersonLoginController() {\n }", "public PremiseController() {\n\t\tSystem.out.println(\"Class PremiseController()\");\n\t}", "public TaxiInformationController() {\n }", "public LoginController() {\n\t\treadFromFile();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public Controller(){\n initControl();\n this.getStylesheets().addAll(\"/resource/style.css\");\n }", "public CreateDocumentController() {\n }", "public ControllerRol() {\n }", "public Controller () {\r\n puzzle = null;\r\n words = new ArrayList <String> ();\r\n fileManager = new FileIO ();\r\n }", "Main ()\n\t{\n\t\tview = new View ();\t\t\n\t\tmodel = new Model(view);\n\t\tcontroller = new Controller(model, view);\n\t}", "public void init() {\n \n }", "public Controller() {\n\t\tdoResidu = false;\n\t\tdoTime = false;\n\t\tdoReference = false;\n\t\tdoConstraint = false;\n\t\ttimeStarting = System.nanoTime();\n\t\t\n\t\tsetPath(Files.getWorkingDirectory());\n\t\tsetSystem(true);\n\t\tsetMultithreading(true);\n\t\tsetDisplayFinal(true);\n\t\tsetFFT(FFT.getFastestFFT().getDefaultFFT());\n\t\tsetNormalizationPSF(1);\n\t\tsetEpsilon(1e-6);\n\t\tsetPadding(new Padding());\n\t\tsetApodization(new Apodization());\n\n\t\tmonitors = new Monitors();\n\t\tmonitors.add(new ConsoleMonitor());\n\t\tmonitors.add(new TableMonitor(Constants.widthGUI, 240));\n\n\t\tsetVerbose(Verbose.Log);\n\t\tsetStats(new Stats(Stats.Mode.NO));\n\t\tsetConstraint(Constraint.Mode.NO);\n\t\tsetResiduMin(-1);\n\t\tsetTimeLimit(-1);\n\t\tsetReference(null);\n\t\tsetOuts(new ArrayList<Output>());\n\t}", "public OrderInfoViewuiController() {\n\t\tuserbl = new UserController();\n\t}", "public SessionController() {\n }", "@Override\n\tprotected void setController() {\n\t\t\n\t}", "public MainFrameController() {\n }", "public LicenciaController() {\n }", "public NearestParksController() {\n this.bn = new BicycleNetwork();\n this.pf = new LocationFacade();\n // this.bn.loadData();\n }", "public MotorController() {\n\t\tresetTachometers();\n\t}", "public AwTracingController() {\n mNativeAwTracingController = nativeInit();\n }", "public HomeController() {\n }", "public HomeController() {\n }", "public Controller(IView view) {\n\t\tengine = new Engine(this);\n\t\tclock = new Clock();\n\t\tsoundEmettor = new SoundEmettor();\n\t\tthis.view = view;\n\t}" ]
[ "0.81267494", "0.7854314", "0.7833242", "0.77628046", "0.77628046", "0.7601901", "0.7451344", "0.74380225", "0.74313986", "0.74237424", "0.7406829", "0.73422337", "0.73283935", "0.72643036", "0.72241026", "0.7101988", "0.7059505", "0.6987808", "0.6972957", "0.6943927", "0.6913332", "0.68902034", "0.6881232", "0.6879547", "0.68732715", "0.68682486", "0.6867232", "0.68514246", "0.68466127", "0.68408275", "0.6838399", "0.6834485", "0.6797255", "0.6783604", "0.67677635", "0.6764779", "0.67499435", "0.6748907", "0.6746151", "0.67444116", "0.6740131", "0.6728425", "0.672457", "0.6696491", "0.66905123", "0.66899514", "0.66814613", "0.66780084", "0.6665317", "0.6664291", "0.66623014", "0.66538846", "0.6649753", "0.6646698", "0.6639734", "0.66332626", "0.6631812", "0.6627136", "0.66245544", "0.66111344", "0.6606601", "0.66026706", "0.65977657", "0.6580909", "0.65801454", "0.6576602", "0.65746284", "0.65515345", "0.655113", "0.65479785", "0.6546282", "0.6541278", "0.6529839", "0.6529691", "0.65266365", "0.65234464", "0.6519929", "0.6513061", "0.65085804", "0.6498255", "0.6495384", "0.64938396", "0.6493738", "0.64861697", "0.64836395", "0.64820653", "0.64803785", "0.6478558", "0.64768386", "0.6471758", "0.6465762", "0.6461104", "0.6445191", "0.6437311", "0.64329505", "0.64297783", "0.64267206", "0.6417562", "0.6416869", "0.6416869", "0.64166254" ]
0.0
-1
This method was generated by Abator for iBATIS. This method corresponds to the database table lgk_user_group
Long insert(UserGroup record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<UserGroupImp> fetchUserGroupByName (String userGroupName);", "public void joinGroup(Group group) {\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS_GROUPS WHERE USER_ID=? AND GROUP_ID=?\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\n ps.setString(2, group.toString());\n ResultSet rs = ps.executeQuery();\n if (rs.next()) return;\n\n ps = conn.prepareStatement(\"INSERT INTO USERS_GROUPS(USER_ID, GROUP_ID) VALUES(?, ?)\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\n ps.setString(2, group.toString());\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void setGroup(UserGroup group) {\n this.group = group;\n }", "public List<Usergroup> getUsersInGroup(Long groupKey) throws DAOException;", "UserGroup selectByPrimaryKey(Long id_user_group);", "public String getManageUsersGroup( HttpServletRequest request )\r\n {\r\n setPageTitleProperty( PROPERTY_PAGE_TITLE_MANAGE_USERS_GROUP );\r\n\r\n Map<String, Object> model = new HashMap<>( );\r\n String strURL = AppPathService.getBaseUrl( request ) + JSP_URL_MANAGE_USERS_GROUP;\r\n UrlItem url = new UrlItem( strURL );\r\n\r\n // SELECTED GROUP\r\n Group selectedGroup = getGroupFromRequest( request );\r\n\r\n if ( selectedGroup == null )\r\n {\r\n return getManageGroups( request );\r\n }\r\n\r\n // ASSIGNED USERS\r\n List<DatabaseUser> listAllAssignedUsers = DatabaseHome.findGroupUsersFromGroupKey( selectedGroup.getGroupKey( ), getPlugin( ) );\r\n List<DatabaseUser> listAssignedUsers = getListAssignedUsers( listAllAssignedUsers );\r\n\r\n DatabaseUserFilter duFilter = new DatabaseUserFilter( );\r\n boolean bIsSearch = duFilter.setDatabaseUserFilter( request );\r\n List<DatabaseUser> listFilteredUsers = _databaseService.getFilteredUsersInterface( duFilter, bIsSearch, listAssignedUsers, request, model, url );\r\n\r\n // AVAILABLE USERS\r\n ReferenceList listAvailableUsers = getAvailableUsers( listAssignedUsers );\r\n\r\n // SORT\r\n String strSortedAttributeName = request.getParameter( Parameters.SORTED_ATTRIBUTE_NAME );\r\n String strAscSort = null;\r\n\r\n if ( strSortedAttributeName != null )\r\n {\r\n strAscSort = request.getParameter( Parameters.SORTED_ASC );\r\n\r\n boolean bIsAscSort = Boolean.parseBoolean( strAscSort );\r\n\r\n Collections.sort( listFilteredUsers, new AttributeComparator( strSortedAttributeName, bIsAscSort ) );\r\n }\r\n\r\n _strCurrentPageIndex = AbstractPaginator.getPageIndex( request, AbstractPaginator.PARAMETER_PAGE_INDEX, _strCurrentPageIndex );\r\n _nDefaultItemsPerPage = AppPropertiesService.getPropertyInt( PROPERTY_USERS_PER_PAGE, 50 );\r\n _nItemsPerPage = AbstractPaginator.getItemsPerPage( request, AbstractPaginator.PARAMETER_ITEMS_PER_PAGE, _nItemsPerPage, _nDefaultItemsPerPage );\r\n\r\n if ( strSortedAttributeName != null )\r\n {\r\n url.addParameter( Parameters.SORTED_ATTRIBUTE_NAME, strSortedAttributeName );\r\n }\r\n\r\n if ( strAscSort != null )\r\n {\r\n url.addParameter( Parameters.SORTED_ASC, strAscSort );\r\n }\r\n\r\n // ITEM NAVIGATION\r\n setItemNavigator( PARAMETER_ASSIGN_USER, selectedGroup.getGroupKey( ), url.getUrl( ) );\r\n\r\n LocalizedPaginator<DatabaseUser> paginator = new LocalizedPaginator<>( listFilteredUsers, _nItemsPerPage, url.getUrl( ),\r\n AbstractPaginator.PARAMETER_PAGE_INDEX, _strCurrentPageIndex, getLocale( ) );\r\n\r\n model.put( MARK_GROUP, selectedGroup );\r\n model.put( MARK_ITEM_NAVIGATOR, _itemNavigators.get( PARAMETER_ASSIGN_USER ) );\r\n model.put( MARK_PAGINATOR, paginator );\r\n model.put( MARK_NB_ITEMS_PER_PAGE, Integer.toString( _nItemsPerPage ) );\r\n model.put( MARK_AVAILABLE_USERS, listAvailableUsers );\r\n model.put( MARK_ASSIGNED_USERS, paginator.getPageItems( ) );\r\n model.put( MARK_ASSIGNED_USERS_NUMBER, listAllAssignedUsers.size( ) );\r\n\r\n HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_MANAGE_USERS_GROUP, getLocale( ), model );\r\n\r\n return getAdminPage( template.getHtml( ) );\r\n }", "protected int getTableGroup()\n\t\t{\n\t\t\treturn Group ;\n\t\t}", "public UserGroup getGroup() {\n return group;\n }", "public UsersGroupsRecord() {\n\t\tsuper(org.kallithea.ldap.sync.jooq.tables.UsersGroups.USERS_GROUPS);\n\t}", "public void setGroup(entity.Group value);", "protected abstract Set getUserGroups();", "public List<UserGroup> GetActiveGroups() {\n/* 44 */ return this.userDal.GetActiveGroups();\n/* */ }", "List<UserGroup> findAllGroups(String companyId);", "@Override\n\tpublic void saveOrUpdateUserGroup(HhGroup group) {\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(group);\n\t}", "public Long getGroup_id() {\n return group_id;\n }", "public int getIdGroup() {\n return idGroup;\n }", "UserGroup findById(String groupId);", "public void setGroup_id(Long group_id) {\n this.group_id = group_id;\n }", "GroupUser getGroupUserById(String id);", "java.lang.String getGroupId();", "java.lang.String getGroupId();", "@Override\n\tpublic HhGroup getTheUserGroup(Integer id) {\n\t\tString hql = (\" from HhGroup h where h.isDel = 0 and h.id = \" + id);\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\treturn (HhGroup)query.uniqueResult();\n\t}", "@Schema(description = \"Id(s) of user groups that the user belongs to. This provides access to exclusive assets that are hidden to the public. Id's are agreed upon by TO and MP.\")\n \n public List<String> getUserGroups() {\n return userGroups;\n }", "@Override\n\tpublic List<HhGroupUser> getGroupUserList(Integer id) {\n\t\tString hql = \"from HhGroupUser h where h.groupId = \" + id;\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\treturn query.list();\n\t}", "String getGroupId();", "String getGroupId();", "public void addGroup(GroupUser group) {\n try {\n PreparedStatement s = sql.prepareStatement(\"INSERT INTO Groups (groupName, members) VALUES (?,?);\");\n s.setString(1, group.getId());\n\n s.setString(2, group.getMembers().toString());\n s.execute();\n\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "@Override\r\n\tpublic Collection<AccessFunction> getALLFunctionOfGroup(Users user\r\n\t\t\t ) throws RemoteException {\n\t\tString sql = \" Groupname = '\"+user.getUser_groups()+\"'\";\r\n\t\treturn AccessSQL.selectAccessFunction(sql, dsSQL.getConn());\r\n\t}", "public String getGroupTable() {\n return dbTable.getGroupTable();\n }", "public long getGroup()\r\n { return group; }", "public Long getGroupID()\n {\n return groupID;\n }", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public Set getGroups() { return this.groups; }", "public String doUnAssignUserGroup( HttpServletRequest request )\r\n {\r\n Group selectedGroup = getGroupFromRequest( request );\r\n\r\n if ( selectedGroup == null )\r\n {\r\n return getCreateGroup( request );\r\n }\r\n\r\n int nIdUser = Integer.parseInt( request.getParameter( PARAMETER_MYLUTECE_DATABASE_USER_ID ) );\r\n String strAnchor = request.getParameter( PARAMETER_ANCHOR );\r\n\r\n DatabaseUser user = DatabaseUserHome.findByPrimaryKey( nIdUser, getPlugin( ) );\r\n\r\n if ( user != null )\r\n {\r\n DatabaseHome.removeGroupsForUser( user.getUserId( ), getPlugin( ) );\r\n }\r\n\r\n return JSP_MANAGE_USERS_GROUP + QUESTION_MARK + PARAMETER_GROUP_KEY + EQUAL + selectedGroup.getGroupKey( ) + SHARP + strAnchor;\r\n }", "public boolean isUserInGroup(long idUser, long idGroup);", "void updateGroup(@Nonnull UserGroup group);", "@ApiModelProperty(value = \"Usergroups (only when requesting a single user)\")\n public List<Group> getGroups() {\n return groups;\n }", "public ResultSet getJoinedGroups() {\n try {\n conn = dao.getConnection();\n String SQL =\n \"select groups.name from USERS_GROUPS, GROUPS where users_groups.USER_ID =? AND groups.NAME = users_groups.group_ID\";\n ps = conn.prepareStatement(SQL);\n ps.setString(1, Session.getInstance(\"\").getUserName());\n\n ResultSet rs = ps.executeQuery();\n\n return rs;\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public List<Group> getUserGroups(Long iduser);", "public void setGroupKey(String GroupKey) {\n this.GroupKey = GroupKey;\n }", "UUID getGroupId();", "@ManyToMany\r\n @JoinTable(name = \"users_groups\", joinColumns = { @JoinColumn(name = \"user_id\", referencedColumnName = \"id\") }, inverseJoinColumns = { @JoinColumn(name = \"group_id\", referencedColumnName = \"id\") })\r\n public Set<Group> getGroups() {\r\n if (this.groups == null) {\r\n this.groups = new HashSet<Group>();\r\n }\r\n\r\n return this.groups;\r\n }", "List<User> findUsers(User.UserGroup group, Long id, String fname, String lname, String email) throws Exception;", "public void setGroupTable(String name) throws BuildException {\n dbTable.setGroupTable(name);\n }", "public void updateGroup(GroupUser group) {\n try{\n PreparedStatement s = sql.prepareStatement(\"UPDATE Groups SET members=? WHERE groupName=?\");\n\n s.setString(2, group.getId());\n\n System.out.println(group.getMembers().toString());\n s.setString(1, group.getMembers().toString());\n s.execute();\n\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "public final void rule__BTable__Group__5() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:951:1: ( rule__BTable__Group__5__Impl rule__BTable__Group__6 )\n // InternalBSQL2Java.g:952:2: rule__BTable__Group__5__Impl rule__BTable__Group__6\n {\n pushFollow(FOLLOW_15);\n rule__BTable__Group__5__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__BTable__Group__6();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public List<Group> getUserInfoGroups(User user);", "Integer getGroupId();", "@Override\n public Void call(DBConnection c) throws SQLException {\n DBPreparedStatement groups = c.run(\"select lower(replace(ggd.group_id, ':', '-')) group_id, ggd.description, ggd.ready_for_sync_time\" +\n \" from \" + groupInfoTable + \" ggd \" +\n \" where ggd.ready_for_sync_time >= ?\");\n\n groups.param(time);\n\n for (ResultSet rs : groups.executeQuery()) {\n String groupName = rs.getString(\"group_id\");\n String description = rs.getString(\"description\");\n long lastModifiedTime = rs.getLong(\"ready_for_sync_time\");\n\n Group group = result.createOrGetGroup(new Group(groupName, description));\n group.setLastModifiedTime(lastModifiedTime);\n }\n\n // Populate any members for non-deleted groups\n DBPreparedStatement members = c.run(\"select lower(replace(ggu.group_id, ':', '-')) group_id, ggu.role, ggu.email\" +\n \" from \" + groupInfoTable + \" ggd \" +\n \" inner join \" + memberInfoTable + \" ggu \" +\n \" on ggd.group_id = ggu.group_id\" +\n \" where ggd.ready_for_sync_time >= ? AND ggd.deleted = 0\");\n\n members.param(time);\n\n for (ResultSet rs : members.executeQuery()) {\n String groupName = rs.getString(\"group_id\");\n String email = rs.getString(\"email\");\n String role = mapRole(rs.getString(\"role\"));\n\n if (result.hasGroup(groupName)) {\n Group group = result.get(groupName);\n group.addMembership(email, role);\n } else {\n // This can happen if a membership row is added after we\n // pull our initial group list, and if our database\n // doesn't give us repeatable reads. This should be\n // very rare.\n logger.warn(String.format(\"Got a row referencing group %s but that group wasn't in our set\",\n groupName));\n }\n }\n\n return null;\n }", "@Override\n public String getPath() {\n return \"data/userGroup\";\n }", "public String getGroupName();", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }" ]
[ "0.6799069", "0.6684918", "0.6661789", "0.66499805", "0.65841687", "0.6434915", "0.6379696", "0.63488865", "0.62819076", "0.6262287", "0.617754", "0.6129136", "0.61198545", "0.6110924", "0.6110468", "0.60815245", "0.6073163", "0.6036063", "0.6032267", "0.6031343", "0.6031343", "0.60089463", "0.60028994", "0.59971464", "0.5992071", "0.5992071", "0.5972792", "0.5969795", "0.5952847", "0.5937514", "0.593505", "0.593291", "0.593291", "0.593291", "0.593291", "0.593291", "0.593291", "0.5913553", "0.59130454", "0.5883422", "0.58755654", "0.5862238", "0.5859666", "0.5834805", "0.58275455", "0.5816687", "0.5813323", "0.58103204", "0.5806491", "0.5795343", "0.57952744", "0.5792032", "0.5785397", "0.57846963", "0.5777173", "0.57619244", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624" ]
0.0
-1
This method was generated by Abator for iBATIS. This method corresponds to the database table lgk_user_group
int updateByPrimaryKey(UserGroup record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<UserGroupImp> fetchUserGroupByName (String userGroupName);", "public void joinGroup(Group group) {\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS_GROUPS WHERE USER_ID=? AND GROUP_ID=?\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\n ps.setString(2, group.toString());\n ResultSet rs = ps.executeQuery();\n if (rs.next()) return;\n\n ps = conn.prepareStatement(\"INSERT INTO USERS_GROUPS(USER_ID, GROUP_ID) VALUES(?, ?)\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\n ps.setString(2, group.toString());\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void setGroup(UserGroup group) {\n this.group = group;\n }", "public List<Usergroup> getUsersInGroup(Long groupKey) throws DAOException;", "UserGroup selectByPrimaryKey(Long id_user_group);", "public String getManageUsersGroup( HttpServletRequest request )\r\n {\r\n setPageTitleProperty( PROPERTY_PAGE_TITLE_MANAGE_USERS_GROUP );\r\n\r\n Map<String, Object> model = new HashMap<>( );\r\n String strURL = AppPathService.getBaseUrl( request ) + JSP_URL_MANAGE_USERS_GROUP;\r\n UrlItem url = new UrlItem( strURL );\r\n\r\n // SELECTED GROUP\r\n Group selectedGroup = getGroupFromRequest( request );\r\n\r\n if ( selectedGroup == null )\r\n {\r\n return getManageGroups( request );\r\n }\r\n\r\n // ASSIGNED USERS\r\n List<DatabaseUser> listAllAssignedUsers = DatabaseHome.findGroupUsersFromGroupKey( selectedGroup.getGroupKey( ), getPlugin( ) );\r\n List<DatabaseUser> listAssignedUsers = getListAssignedUsers( listAllAssignedUsers );\r\n\r\n DatabaseUserFilter duFilter = new DatabaseUserFilter( );\r\n boolean bIsSearch = duFilter.setDatabaseUserFilter( request );\r\n List<DatabaseUser> listFilteredUsers = _databaseService.getFilteredUsersInterface( duFilter, bIsSearch, listAssignedUsers, request, model, url );\r\n\r\n // AVAILABLE USERS\r\n ReferenceList listAvailableUsers = getAvailableUsers( listAssignedUsers );\r\n\r\n // SORT\r\n String strSortedAttributeName = request.getParameter( Parameters.SORTED_ATTRIBUTE_NAME );\r\n String strAscSort = null;\r\n\r\n if ( strSortedAttributeName != null )\r\n {\r\n strAscSort = request.getParameter( Parameters.SORTED_ASC );\r\n\r\n boolean bIsAscSort = Boolean.parseBoolean( strAscSort );\r\n\r\n Collections.sort( listFilteredUsers, new AttributeComparator( strSortedAttributeName, bIsAscSort ) );\r\n }\r\n\r\n _strCurrentPageIndex = AbstractPaginator.getPageIndex( request, AbstractPaginator.PARAMETER_PAGE_INDEX, _strCurrentPageIndex );\r\n _nDefaultItemsPerPage = AppPropertiesService.getPropertyInt( PROPERTY_USERS_PER_PAGE, 50 );\r\n _nItemsPerPage = AbstractPaginator.getItemsPerPage( request, AbstractPaginator.PARAMETER_ITEMS_PER_PAGE, _nItemsPerPage, _nDefaultItemsPerPage );\r\n\r\n if ( strSortedAttributeName != null )\r\n {\r\n url.addParameter( Parameters.SORTED_ATTRIBUTE_NAME, strSortedAttributeName );\r\n }\r\n\r\n if ( strAscSort != null )\r\n {\r\n url.addParameter( Parameters.SORTED_ASC, strAscSort );\r\n }\r\n\r\n // ITEM NAVIGATION\r\n setItemNavigator( PARAMETER_ASSIGN_USER, selectedGroup.getGroupKey( ), url.getUrl( ) );\r\n\r\n LocalizedPaginator<DatabaseUser> paginator = new LocalizedPaginator<>( listFilteredUsers, _nItemsPerPage, url.getUrl( ),\r\n AbstractPaginator.PARAMETER_PAGE_INDEX, _strCurrentPageIndex, getLocale( ) );\r\n\r\n model.put( MARK_GROUP, selectedGroup );\r\n model.put( MARK_ITEM_NAVIGATOR, _itemNavigators.get( PARAMETER_ASSIGN_USER ) );\r\n model.put( MARK_PAGINATOR, paginator );\r\n model.put( MARK_NB_ITEMS_PER_PAGE, Integer.toString( _nItemsPerPage ) );\r\n model.put( MARK_AVAILABLE_USERS, listAvailableUsers );\r\n model.put( MARK_ASSIGNED_USERS, paginator.getPageItems( ) );\r\n model.put( MARK_ASSIGNED_USERS_NUMBER, listAllAssignedUsers.size( ) );\r\n\r\n HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_MANAGE_USERS_GROUP, getLocale( ), model );\r\n\r\n return getAdminPage( template.getHtml( ) );\r\n }", "protected int getTableGroup()\n\t\t{\n\t\t\treturn Group ;\n\t\t}", "public UserGroup getGroup() {\n return group;\n }", "public UsersGroupsRecord() {\n\t\tsuper(org.kallithea.ldap.sync.jooq.tables.UsersGroups.USERS_GROUPS);\n\t}", "public void setGroup(entity.Group value);", "protected abstract Set getUserGroups();", "public List<UserGroup> GetActiveGroups() {\n/* 44 */ return this.userDal.GetActiveGroups();\n/* */ }", "List<UserGroup> findAllGroups(String companyId);", "public Long getGroup_id() {\n return group_id;\n }", "@Override\n\tpublic void saveOrUpdateUserGroup(HhGroup group) {\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(group);\n\t}", "public int getIdGroup() {\n return idGroup;\n }", "UserGroup findById(String groupId);", "public void setGroup_id(Long group_id) {\n this.group_id = group_id;\n }", "java.lang.String getGroupId();", "java.lang.String getGroupId();", "GroupUser getGroupUserById(String id);", "@Override\n\tpublic HhGroup getTheUserGroup(Integer id) {\n\t\tString hql = (\" from HhGroup h where h.isDel = 0 and h.id = \" + id);\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\treturn (HhGroup)query.uniqueResult();\n\t}", "@Schema(description = \"Id(s) of user groups that the user belongs to. This provides access to exclusive assets that are hidden to the public. Id's are agreed upon by TO and MP.\")\n \n public List<String> getUserGroups() {\n return userGroups;\n }", "@Override\n\tpublic List<HhGroupUser> getGroupUserList(Integer id) {\n\t\tString hql = \"from HhGroupUser h where h.groupId = \" + id;\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\treturn query.list();\n\t}", "String getGroupId();", "String getGroupId();", "public void addGroup(GroupUser group) {\n try {\n PreparedStatement s = sql.prepareStatement(\"INSERT INTO Groups (groupName, members) VALUES (?,?);\");\n s.setString(1, group.getId());\n\n s.setString(2, group.getMembers().toString());\n s.execute();\n\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "@Override\r\n\tpublic Collection<AccessFunction> getALLFunctionOfGroup(Users user\r\n\t\t\t ) throws RemoteException {\n\t\tString sql = \" Groupname = '\"+user.getUser_groups()+\"'\";\r\n\t\treturn AccessSQL.selectAccessFunction(sql, dsSQL.getConn());\r\n\t}", "public String getGroupTable() {\n return dbTable.getGroupTable();\n }", "public long getGroup()\r\n { return group; }", "public Long getGroupID()\n {\n return groupID;\n }", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public Set getGroups() { return this.groups; }", "public String doUnAssignUserGroup( HttpServletRequest request )\r\n {\r\n Group selectedGroup = getGroupFromRequest( request );\r\n\r\n if ( selectedGroup == null )\r\n {\r\n return getCreateGroup( request );\r\n }\r\n\r\n int nIdUser = Integer.parseInt( request.getParameter( PARAMETER_MYLUTECE_DATABASE_USER_ID ) );\r\n String strAnchor = request.getParameter( PARAMETER_ANCHOR );\r\n\r\n DatabaseUser user = DatabaseUserHome.findByPrimaryKey( nIdUser, getPlugin( ) );\r\n\r\n if ( user != null )\r\n {\r\n DatabaseHome.removeGroupsForUser( user.getUserId( ), getPlugin( ) );\r\n }\r\n\r\n return JSP_MANAGE_USERS_GROUP + QUESTION_MARK + PARAMETER_GROUP_KEY + EQUAL + selectedGroup.getGroupKey( ) + SHARP + strAnchor;\r\n }", "public boolean isUserInGroup(long idUser, long idGroup);", "void updateGroup(@Nonnull UserGroup group);", "@ApiModelProperty(value = \"Usergroups (only when requesting a single user)\")\n public List<Group> getGroups() {\n return groups;\n }", "public ResultSet getJoinedGroups() {\n try {\n conn = dao.getConnection();\n String SQL =\n \"select groups.name from USERS_GROUPS, GROUPS where users_groups.USER_ID =? AND groups.NAME = users_groups.group_ID\";\n ps = conn.prepareStatement(SQL);\n ps.setString(1, Session.getInstance(\"\").getUserName());\n\n ResultSet rs = ps.executeQuery();\n\n return rs;\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public List<Group> getUserGroups(Long iduser);", "public void setGroupKey(String GroupKey) {\n this.GroupKey = GroupKey;\n }", "UUID getGroupId();", "@ManyToMany\r\n @JoinTable(name = \"users_groups\", joinColumns = { @JoinColumn(name = \"user_id\", referencedColumnName = \"id\") }, inverseJoinColumns = { @JoinColumn(name = \"group_id\", referencedColumnName = \"id\") })\r\n public Set<Group> getGroups() {\r\n if (this.groups == null) {\r\n this.groups = new HashSet<Group>();\r\n }\r\n\r\n return this.groups;\r\n }", "public void setGroupTable(String name) throws BuildException {\n dbTable.setGroupTable(name);\n }", "List<User> findUsers(User.UserGroup group, Long id, String fname, String lname, String email) throws Exception;", "public final void rule__BTable__Group__5() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:951:1: ( rule__BTable__Group__5__Impl rule__BTable__Group__6 )\n // InternalBSQL2Java.g:952:2: rule__BTable__Group__5__Impl rule__BTable__Group__6\n {\n pushFollow(FOLLOW_15);\n rule__BTable__Group__5__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__BTable__Group__6();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void updateGroup(GroupUser group) {\n try{\n PreparedStatement s = sql.prepareStatement(\"UPDATE Groups SET members=? WHERE groupName=?\");\n\n s.setString(2, group.getId());\n\n System.out.println(group.getMembers().toString());\n s.setString(1, group.getMembers().toString());\n s.execute();\n\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "public List<Group> getUserInfoGroups(User user);", "Integer getGroupId();", "@Override\n public Void call(DBConnection c) throws SQLException {\n DBPreparedStatement groups = c.run(\"select lower(replace(ggd.group_id, ':', '-')) group_id, ggd.description, ggd.ready_for_sync_time\" +\n \" from \" + groupInfoTable + \" ggd \" +\n \" where ggd.ready_for_sync_time >= ?\");\n\n groups.param(time);\n\n for (ResultSet rs : groups.executeQuery()) {\n String groupName = rs.getString(\"group_id\");\n String description = rs.getString(\"description\");\n long lastModifiedTime = rs.getLong(\"ready_for_sync_time\");\n\n Group group = result.createOrGetGroup(new Group(groupName, description));\n group.setLastModifiedTime(lastModifiedTime);\n }\n\n // Populate any members for non-deleted groups\n DBPreparedStatement members = c.run(\"select lower(replace(ggu.group_id, ':', '-')) group_id, ggu.role, ggu.email\" +\n \" from \" + groupInfoTable + \" ggd \" +\n \" inner join \" + memberInfoTable + \" ggu \" +\n \" on ggd.group_id = ggu.group_id\" +\n \" where ggd.ready_for_sync_time >= ? AND ggd.deleted = 0\");\n\n members.param(time);\n\n for (ResultSet rs : members.executeQuery()) {\n String groupName = rs.getString(\"group_id\");\n String email = rs.getString(\"email\");\n String role = mapRole(rs.getString(\"role\"));\n\n if (result.hasGroup(groupName)) {\n Group group = result.get(groupName);\n group.addMembership(email, role);\n } else {\n // This can happen if a membership row is added after we\n // pull our initial group list, and if our database\n // doesn't give us repeatable reads. This should be\n // very rare.\n logger.warn(String.format(\"Got a row referencing group %s but that group wasn't in our set\",\n groupName));\n }\n }\n\n return null;\n }", "@Override\n public String getPath() {\n return \"data/userGroup\";\n }", "public String getGroupName();", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }" ]
[ "0.67993623", "0.66834444", "0.66610485", "0.6649495", "0.6584011", "0.64348614", "0.63810605", "0.6351145", "0.62821513", "0.6262756", "0.61781013", "0.6129332", "0.61206937", "0.6111906", "0.61097455", "0.6082717", "0.60734475", "0.603536", "0.6034013", "0.6034013", "0.6032356", "0.60128754", "0.600351", "0.59987146", "0.59941006", "0.59941006", "0.59721804", "0.59694004", "0.5953542", "0.5937908", "0.59371525", "0.5934518", "0.5934518", "0.5934518", "0.5934518", "0.5934518", "0.5934518", "0.5915162", "0.5913712", "0.58833724", "0.5874734", "0.5864637", "0.5861857", "0.5835765", "0.5827743", "0.5818949", "0.5817579", "0.58078015", "0.5806375", "0.5795173", "0.57947135", "0.57923645", "0.5787493", "0.5784929", "0.57754356", "0.57632583", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384" ]
0.0
-1
This method was generated by Abator for iBATIS. This method corresponds to the database table lgk_user_group
int updateByPrimaryKeySelective(UserGroup record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<UserGroupImp> fetchUserGroupByName (String userGroupName);", "public void joinGroup(Group group) {\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS_GROUPS WHERE USER_ID=? AND GROUP_ID=?\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\n ps.setString(2, group.toString());\n ResultSet rs = ps.executeQuery();\n if (rs.next()) return;\n\n ps = conn.prepareStatement(\"INSERT INTO USERS_GROUPS(USER_ID, GROUP_ID) VALUES(?, ?)\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\n ps.setString(2, group.toString());\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void setGroup(UserGroup group) {\n this.group = group;\n }", "public List<Usergroup> getUsersInGroup(Long groupKey) throws DAOException;", "UserGroup selectByPrimaryKey(Long id_user_group);", "public String getManageUsersGroup( HttpServletRequest request )\r\n {\r\n setPageTitleProperty( PROPERTY_PAGE_TITLE_MANAGE_USERS_GROUP );\r\n\r\n Map<String, Object> model = new HashMap<>( );\r\n String strURL = AppPathService.getBaseUrl( request ) + JSP_URL_MANAGE_USERS_GROUP;\r\n UrlItem url = new UrlItem( strURL );\r\n\r\n // SELECTED GROUP\r\n Group selectedGroup = getGroupFromRequest( request );\r\n\r\n if ( selectedGroup == null )\r\n {\r\n return getManageGroups( request );\r\n }\r\n\r\n // ASSIGNED USERS\r\n List<DatabaseUser> listAllAssignedUsers = DatabaseHome.findGroupUsersFromGroupKey( selectedGroup.getGroupKey( ), getPlugin( ) );\r\n List<DatabaseUser> listAssignedUsers = getListAssignedUsers( listAllAssignedUsers );\r\n\r\n DatabaseUserFilter duFilter = new DatabaseUserFilter( );\r\n boolean bIsSearch = duFilter.setDatabaseUserFilter( request );\r\n List<DatabaseUser> listFilteredUsers = _databaseService.getFilteredUsersInterface( duFilter, bIsSearch, listAssignedUsers, request, model, url );\r\n\r\n // AVAILABLE USERS\r\n ReferenceList listAvailableUsers = getAvailableUsers( listAssignedUsers );\r\n\r\n // SORT\r\n String strSortedAttributeName = request.getParameter( Parameters.SORTED_ATTRIBUTE_NAME );\r\n String strAscSort = null;\r\n\r\n if ( strSortedAttributeName != null )\r\n {\r\n strAscSort = request.getParameter( Parameters.SORTED_ASC );\r\n\r\n boolean bIsAscSort = Boolean.parseBoolean( strAscSort );\r\n\r\n Collections.sort( listFilteredUsers, new AttributeComparator( strSortedAttributeName, bIsAscSort ) );\r\n }\r\n\r\n _strCurrentPageIndex = AbstractPaginator.getPageIndex( request, AbstractPaginator.PARAMETER_PAGE_INDEX, _strCurrentPageIndex );\r\n _nDefaultItemsPerPage = AppPropertiesService.getPropertyInt( PROPERTY_USERS_PER_PAGE, 50 );\r\n _nItemsPerPage = AbstractPaginator.getItemsPerPage( request, AbstractPaginator.PARAMETER_ITEMS_PER_PAGE, _nItemsPerPage, _nDefaultItemsPerPage );\r\n\r\n if ( strSortedAttributeName != null )\r\n {\r\n url.addParameter( Parameters.SORTED_ATTRIBUTE_NAME, strSortedAttributeName );\r\n }\r\n\r\n if ( strAscSort != null )\r\n {\r\n url.addParameter( Parameters.SORTED_ASC, strAscSort );\r\n }\r\n\r\n // ITEM NAVIGATION\r\n setItemNavigator( PARAMETER_ASSIGN_USER, selectedGroup.getGroupKey( ), url.getUrl( ) );\r\n\r\n LocalizedPaginator<DatabaseUser> paginator = new LocalizedPaginator<>( listFilteredUsers, _nItemsPerPage, url.getUrl( ),\r\n AbstractPaginator.PARAMETER_PAGE_INDEX, _strCurrentPageIndex, getLocale( ) );\r\n\r\n model.put( MARK_GROUP, selectedGroup );\r\n model.put( MARK_ITEM_NAVIGATOR, _itemNavigators.get( PARAMETER_ASSIGN_USER ) );\r\n model.put( MARK_PAGINATOR, paginator );\r\n model.put( MARK_NB_ITEMS_PER_PAGE, Integer.toString( _nItemsPerPage ) );\r\n model.put( MARK_AVAILABLE_USERS, listAvailableUsers );\r\n model.put( MARK_ASSIGNED_USERS, paginator.getPageItems( ) );\r\n model.put( MARK_ASSIGNED_USERS_NUMBER, listAllAssignedUsers.size( ) );\r\n\r\n HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_MANAGE_USERS_GROUP, getLocale( ), model );\r\n\r\n return getAdminPage( template.getHtml( ) );\r\n }", "protected int getTableGroup()\n\t\t{\n\t\t\treturn Group ;\n\t\t}", "public UserGroup getGroup() {\n return group;\n }", "public UsersGroupsRecord() {\n\t\tsuper(org.kallithea.ldap.sync.jooq.tables.UsersGroups.USERS_GROUPS);\n\t}", "public void setGroup(entity.Group value);", "protected abstract Set getUserGroups();", "public List<UserGroup> GetActiveGroups() {\n/* 44 */ return this.userDal.GetActiveGroups();\n/* */ }", "List<UserGroup> findAllGroups(String companyId);", "public Long getGroup_id() {\n return group_id;\n }", "@Override\n\tpublic void saveOrUpdateUserGroup(HhGroup group) {\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(group);\n\t}", "public int getIdGroup() {\n return idGroup;\n }", "UserGroup findById(String groupId);", "public void setGroup_id(Long group_id) {\n this.group_id = group_id;\n }", "java.lang.String getGroupId();", "java.lang.String getGroupId();", "GroupUser getGroupUserById(String id);", "@Override\n\tpublic HhGroup getTheUserGroup(Integer id) {\n\t\tString hql = (\" from HhGroup h where h.isDel = 0 and h.id = \" + id);\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\treturn (HhGroup)query.uniqueResult();\n\t}", "@Schema(description = \"Id(s) of user groups that the user belongs to. This provides access to exclusive assets that are hidden to the public. Id's are agreed upon by TO and MP.\")\n \n public List<String> getUserGroups() {\n return userGroups;\n }", "@Override\n\tpublic List<HhGroupUser> getGroupUserList(Integer id) {\n\t\tString hql = \"from HhGroupUser h where h.groupId = \" + id;\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\treturn query.list();\n\t}", "String getGroupId();", "String getGroupId();", "public void addGroup(GroupUser group) {\n try {\n PreparedStatement s = sql.prepareStatement(\"INSERT INTO Groups (groupName, members) VALUES (?,?);\");\n s.setString(1, group.getId());\n\n s.setString(2, group.getMembers().toString());\n s.execute();\n\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "@Override\r\n\tpublic Collection<AccessFunction> getALLFunctionOfGroup(Users user\r\n\t\t\t ) throws RemoteException {\n\t\tString sql = \" Groupname = '\"+user.getUser_groups()+\"'\";\r\n\t\treturn AccessSQL.selectAccessFunction(sql, dsSQL.getConn());\r\n\t}", "public String getGroupTable() {\n return dbTable.getGroupTable();\n }", "public long getGroup()\r\n { return group; }", "public Long getGroupID()\n {\n return groupID;\n }", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public Set getGroups() { return this.groups; }", "public String doUnAssignUserGroup( HttpServletRequest request )\r\n {\r\n Group selectedGroup = getGroupFromRequest( request );\r\n\r\n if ( selectedGroup == null )\r\n {\r\n return getCreateGroup( request );\r\n }\r\n\r\n int nIdUser = Integer.parseInt( request.getParameter( PARAMETER_MYLUTECE_DATABASE_USER_ID ) );\r\n String strAnchor = request.getParameter( PARAMETER_ANCHOR );\r\n\r\n DatabaseUser user = DatabaseUserHome.findByPrimaryKey( nIdUser, getPlugin( ) );\r\n\r\n if ( user != null )\r\n {\r\n DatabaseHome.removeGroupsForUser( user.getUserId( ), getPlugin( ) );\r\n }\r\n\r\n return JSP_MANAGE_USERS_GROUP + QUESTION_MARK + PARAMETER_GROUP_KEY + EQUAL + selectedGroup.getGroupKey( ) + SHARP + strAnchor;\r\n }", "public boolean isUserInGroup(long idUser, long idGroup);", "void updateGroup(@Nonnull UserGroup group);", "@ApiModelProperty(value = \"Usergroups (only when requesting a single user)\")\n public List<Group> getGroups() {\n return groups;\n }", "public ResultSet getJoinedGroups() {\n try {\n conn = dao.getConnection();\n String SQL =\n \"select groups.name from USERS_GROUPS, GROUPS where users_groups.USER_ID =? AND groups.NAME = users_groups.group_ID\";\n ps = conn.prepareStatement(SQL);\n ps.setString(1, Session.getInstance(\"\").getUserName());\n\n ResultSet rs = ps.executeQuery();\n\n return rs;\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public List<Group> getUserGroups(Long iduser);", "public void setGroupKey(String GroupKey) {\n this.GroupKey = GroupKey;\n }", "UUID getGroupId();", "@ManyToMany\r\n @JoinTable(name = \"users_groups\", joinColumns = { @JoinColumn(name = \"user_id\", referencedColumnName = \"id\") }, inverseJoinColumns = { @JoinColumn(name = \"group_id\", referencedColumnName = \"id\") })\r\n public Set<Group> getGroups() {\r\n if (this.groups == null) {\r\n this.groups = new HashSet<Group>();\r\n }\r\n\r\n return this.groups;\r\n }", "public void setGroupTable(String name) throws BuildException {\n dbTable.setGroupTable(name);\n }", "List<User> findUsers(User.UserGroup group, Long id, String fname, String lname, String email) throws Exception;", "public final void rule__BTable__Group__5() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:951:1: ( rule__BTable__Group__5__Impl rule__BTable__Group__6 )\n // InternalBSQL2Java.g:952:2: rule__BTable__Group__5__Impl rule__BTable__Group__6\n {\n pushFollow(FOLLOW_15);\n rule__BTable__Group__5__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__BTable__Group__6();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void updateGroup(GroupUser group) {\n try{\n PreparedStatement s = sql.prepareStatement(\"UPDATE Groups SET members=? WHERE groupName=?\");\n\n s.setString(2, group.getId());\n\n System.out.println(group.getMembers().toString());\n s.setString(1, group.getMembers().toString());\n s.execute();\n\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "public List<Group> getUserInfoGroups(User user);", "Integer getGroupId();", "@Override\n public Void call(DBConnection c) throws SQLException {\n DBPreparedStatement groups = c.run(\"select lower(replace(ggd.group_id, ':', '-')) group_id, ggd.description, ggd.ready_for_sync_time\" +\n \" from \" + groupInfoTable + \" ggd \" +\n \" where ggd.ready_for_sync_time >= ?\");\n\n groups.param(time);\n\n for (ResultSet rs : groups.executeQuery()) {\n String groupName = rs.getString(\"group_id\");\n String description = rs.getString(\"description\");\n long lastModifiedTime = rs.getLong(\"ready_for_sync_time\");\n\n Group group = result.createOrGetGroup(new Group(groupName, description));\n group.setLastModifiedTime(lastModifiedTime);\n }\n\n // Populate any members for non-deleted groups\n DBPreparedStatement members = c.run(\"select lower(replace(ggu.group_id, ':', '-')) group_id, ggu.role, ggu.email\" +\n \" from \" + groupInfoTable + \" ggd \" +\n \" inner join \" + memberInfoTable + \" ggu \" +\n \" on ggd.group_id = ggu.group_id\" +\n \" where ggd.ready_for_sync_time >= ? AND ggd.deleted = 0\");\n\n members.param(time);\n\n for (ResultSet rs : members.executeQuery()) {\n String groupName = rs.getString(\"group_id\");\n String email = rs.getString(\"email\");\n String role = mapRole(rs.getString(\"role\"));\n\n if (result.hasGroup(groupName)) {\n Group group = result.get(groupName);\n group.addMembership(email, role);\n } else {\n // This can happen if a membership row is added after we\n // pull our initial group list, and if our database\n // doesn't give us repeatable reads. This should be\n // very rare.\n logger.warn(String.format(\"Got a row referencing group %s but that group wasn't in our set\",\n groupName));\n }\n }\n\n return null;\n }", "@Override\n public String getPath() {\n return \"data/userGroup\";\n }", "public String getGroupName();", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }" ]
[ "0.67993623", "0.66834444", "0.66610485", "0.6649495", "0.6584011", "0.64348614", "0.63810605", "0.6351145", "0.62821513", "0.6262756", "0.61781013", "0.6129332", "0.61206937", "0.6111906", "0.61097455", "0.6082717", "0.60734475", "0.603536", "0.6034013", "0.6034013", "0.6032356", "0.60128754", "0.600351", "0.59987146", "0.59941006", "0.59941006", "0.59721804", "0.59694004", "0.5953542", "0.5937908", "0.59371525", "0.5934518", "0.5934518", "0.5934518", "0.5934518", "0.5934518", "0.5934518", "0.5915162", "0.5913712", "0.58833724", "0.5874734", "0.5864637", "0.5861857", "0.5835765", "0.5827743", "0.5818949", "0.5817579", "0.58078015", "0.5806375", "0.5795173", "0.57947135", "0.57923645", "0.5787493", "0.5784929", "0.57754356", "0.57632583", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384" ]
0.0
-1
This method was generated by Abator for iBATIS. This method corresponds to the database table lgk_user_group
List<UserGroup> selectByExample(UserGroupExample example);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<UserGroupImp> fetchUserGroupByName (String userGroupName);", "public void joinGroup(Group group) {\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS_GROUPS WHERE USER_ID=? AND GROUP_ID=?\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\n ps.setString(2, group.toString());\n ResultSet rs = ps.executeQuery();\n if (rs.next()) return;\n\n ps = conn.prepareStatement(\"INSERT INTO USERS_GROUPS(USER_ID, GROUP_ID) VALUES(?, ?)\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\n ps.setString(2, group.toString());\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void setGroup(UserGroup group) {\n this.group = group;\n }", "public List<Usergroup> getUsersInGroup(Long groupKey) throws DAOException;", "UserGroup selectByPrimaryKey(Long id_user_group);", "public String getManageUsersGroup( HttpServletRequest request )\r\n {\r\n setPageTitleProperty( PROPERTY_PAGE_TITLE_MANAGE_USERS_GROUP );\r\n\r\n Map<String, Object> model = new HashMap<>( );\r\n String strURL = AppPathService.getBaseUrl( request ) + JSP_URL_MANAGE_USERS_GROUP;\r\n UrlItem url = new UrlItem( strURL );\r\n\r\n // SELECTED GROUP\r\n Group selectedGroup = getGroupFromRequest( request );\r\n\r\n if ( selectedGroup == null )\r\n {\r\n return getManageGroups( request );\r\n }\r\n\r\n // ASSIGNED USERS\r\n List<DatabaseUser> listAllAssignedUsers = DatabaseHome.findGroupUsersFromGroupKey( selectedGroup.getGroupKey( ), getPlugin( ) );\r\n List<DatabaseUser> listAssignedUsers = getListAssignedUsers( listAllAssignedUsers );\r\n\r\n DatabaseUserFilter duFilter = new DatabaseUserFilter( );\r\n boolean bIsSearch = duFilter.setDatabaseUserFilter( request );\r\n List<DatabaseUser> listFilteredUsers = _databaseService.getFilteredUsersInterface( duFilter, bIsSearch, listAssignedUsers, request, model, url );\r\n\r\n // AVAILABLE USERS\r\n ReferenceList listAvailableUsers = getAvailableUsers( listAssignedUsers );\r\n\r\n // SORT\r\n String strSortedAttributeName = request.getParameter( Parameters.SORTED_ATTRIBUTE_NAME );\r\n String strAscSort = null;\r\n\r\n if ( strSortedAttributeName != null )\r\n {\r\n strAscSort = request.getParameter( Parameters.SORTED_ASC );\r\n\r\n boolean bIsAscSort = Boolean.parseBoolean( strAscSort );\r\n\r\n Collections.sort( listFilteredUsers, new AttributeComparator( strSortedAttributeName, bIsAscSort ) );\r\n }\r\n\r\n _strCurrentPageIndex = AbstractPaginator.getPageIndex( request, AbstractPaginator.PARAMETER_PAGE_INDEX, _strCurrentPageIndex );\r\n _nDefaultItemsPerPage = AppPropertiesService.getPropertyInt( PROPERTY_USERS_PER_PAGE, 50 );\r\n _nItemsPerPage = AbstractPaginator.getItemsPerPage( request, AbstractPaginator.PARAMETER_ITEMS_PER_PAGE, _nItemsPerPage, _nDefaultItemsPerPage );\r\n\r\n if ( strSortedAttributeName != null )\r\n {\r\n url.addParameter( Parameters.SORTED_ATTRIBUTE_NAME, strSortedAttributeName );\r\n }\r\n\r\n if ( strAscSort != null )\r\n {\r\n url.addParameter( Parameters.SORTED_ASC, strAscSort );\r\n }\r\n\r\n // ITEM NAVIGATION\r\n setItemNavigator( PARAMETER_ASSIGN_USER, selectedGroup.getGroupKey( ), url.getUrl( ) );\r\n\r\n LocalizedPaginator<DatabaseUser> paginator = new LocalizedPaginator<>( listFilteredUsers, _nItemsPerPage, url.getUrl( ),\r\n AbstractPaginator.PARAMETER_PAGE_INDEX, _strCurrentPageIndex, getLocale( ) );\r\n\r\n model.put( MARK_GROUP, selectedGroup );\r\n model.put( MARK_ITEM_NAVIGATOR, _itemNavigators.get( PARAMETER_ASSIGN_USER ) );\r\n model.put( MARK_PAGINATOR, paginator );\r\n model.put( MARK_NB_ITEMS_PER_PAGE, Integer.toString( _nItemsPerPage ) );\r\n model.put( MARK_AVAILABLE_USERS, listAvailableUsers );\r\n model.put( MARK_ASSIGNED_USERS, paginator.getPageItems( ) );\r\n model.put( MARK_ASSIGNED_USERS_NUMBER, listAllAssignedUsers.size( ) );\r\n\r\n HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_MANAGE_USERS_GROUP, getLocale( ), model );\r\n\r\n return getAdminPage( template.getHtml( ) );\r\n }", "protected int getTableGroup()\n\t\t{\n\t\t\treturn Group ;\n\t\t}", "public UserGroup getGroup() {\n return group;\n }", "public UsersGroupsRecord() {\n\t\tsuper(org.kallithea.ldap.sync.jooq.tables.UsersGroups.USERS_GROUPS);\n\t}", "public void setGroup(entity.Group value);", "protected abstract Set getUserGroups();", "public List<UserGroup> GetActiveGroups() {\n/* 44 */ return this.userDal.GetActiveGroups();\n/* */ }", "List<UserGroup> findAllGroups(String companyId);", "@Override\n\tpublic void saveOrUpdateUserGroup(HhGroup group) {\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(group);\n\t}", "public Long getGroup_id() {\n return group_id;\n }", "public int getIdGroup() {\n return idGroup;\n }", "UserGroup findById(String groupId);", "GroupUser getGroupUserById(String id);", "public void setGroup_id(Long group_id) {\n this.group_id = group_id;\n }", "java.lang.String getGroupId();", "java.lang.String getGroupId();", "@Override\n\tpublic HhGroup getTheUserGroup(Integer id) {\n\t\tString hql = (\" from HhGroup h where h.isDel = 0 and h.id = \" + id);\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\treturn (HhGroup)query.uniqueResult();\n\t}", "@Schema(description = \"Id(s) of user groups that the user belongs to. This provides access to exclusive assets that are hidden to the public. Id's are agreed upon by TO and MP.\")\n \n public List<String> getUserGroups() {\n return userGroups;\n }", "@Override\n\tpublic List<HhGroupUser> getGroupUserList(Integer id) {\n\t\tString hql = \"from HhGroupUser h where h.groupId = \" + id;\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\treturn query.list();\n\t}", "String getGroupId();", "String getGroupId();", "public void addGroup(GroupUser group) {\n try {\n PreparedStatement s = sql.prepareStatement(\"INSERT INTO Groups (groupName, members) VALUES (?,?);\");\n s.setString(1, group.getId());\n\n s.setString(2, group.getMembers().toString());\n s.execute();\n\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "@Override\r\n\tpublic Collection<AccessFunction> getALLFunctionOfGroup(Users user\r\n\t\t\t ) throws RemoteException {\n\t\tString sql = \" Groupname = '\"+user.getUser_groups()+\"'\";\r\n\t\treturn AccessSQL.selectAccessFunction(sql, dsSQL.getConn());\r\n\t}", "public String getGroupTable() {\n return dbTable.getGroupTable();\n }", "public long getGroup()\r\n { return group; }", "public Long getGroupID()\n {\n return groupID;\n }", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public String doUnAssignUserGroup( HttpServletRequest request )\r\n {\r\n Group selectedGroup = getGroupFromRequest( request );\r\n\r\n if ( selectedGroup == null )\r\n {\r\n return getCreateGroup( request );\r\n }\r\n\r\n int nIdUser = Integer.parseInt( request.getParameter( PARAMETER_MYLUTECE_DATABASE_USER_ID ) );\r\n String strAnchor = request.getParameter( PARAMETER_ANCHOR );\r\n\r\n DatabaseUser user = DatabaseUserHome.findByPrimaryKey( nIdUser, getPlugin( ) );\r\n\r\n if ( user != null )\r\n {\r\n DatabaseHome.removeGroupsForUser( user.getUserId( ), getPlugin( ) );\r\n }\r\n\r\n return JSP_MANAGE_USERS_GROUP + QUESTION_MARK + PARAMETER_GROUP_KEY + EQUAL + selectedGroup.getGroupKey( ) + SHARP + strAnchor;\r\n }", "public Set getGroups() { return this.groups; }", "public boolean isUserInGroup(long idUser, long idGroup);", "void updateGroup(@Nonnull UserGroup group);", "public ResultSet getJoinedGroups() {\n try {\n conn = dao.getConnection();\n String SQL =\n \"select groups.name from USERS_GROUPS, GROUPS where users_groups.USER_ID =? AND groups.NAME = users_groups.group_ID\";\n ps = conn.prepareStatement(SQL);\n ps.setString(1, Session.getInstance(\"\").getUserName());\n\n ResultSet rs = ps.executeQuery();\n\n return rs;\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "@ApiModelProperty(value = \"Usergroups (only when requesting a single user)\")\n public List<Group> getGroups() {\n return groups;\n }", "public List<Group> getUserGroups(Long iduser);", "public void setGroupKey(String GroupKey) {\n this.GroupKey = GroupKey;\n }", "UUID getGroupId();", "@ManyToMany\r\n @JoinTable(name = \"users_groups\", joinColumns = { @JoinColumn(name = \"user_id\", referencedColumnName = \"id\") }, inverseJoinColumns = { @JoinColumn(name = \"group_id\", referencedColumnName = \"id\") })\r\n public Set<Group> getGroups() {\r\n if (this.groups == null) {\r\n this.groups = new HashSet<Group>();\r\n }\r\n\r\n return this.groups;\r\n }", "public void setGroupTable(String name) throws BuildException {\n dbTable.setGroupTable(name);\n }", "List<User> findUsers(User.UserGroup group, Long id, String fname, String lname, String email) throws Exception;", "public final void rule__BTable__Group__5() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:951:1: ( rule__BTable__Group__5__Impl rule__BTable__Group__6 )\n // InternalBSQL2Java.g:952:2: rule__BTable__Group__5__Impl rule__BTable__Group__6\n {\n pushFollow(FOLLOW_15);\n rule__BTable__Group__5__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__BTable__Group__6();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void updateGroup(GroupUser group) {\n try{\n PreparedStatement s = sql.prepareStatement(\"UPDATE Groups SET members=? WHERE groupName=?\");\n\n s.setString(2, group.getId());\n\n System.out.println(group.getMembers().toString());\n s.setString(1, group.getMembers().toString());\n s.execute();\n\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "public List<Group> getUserInfoGroups(User user);", "@Override\n public Void call(DBConnection c) throws SQLException {\n DBPreparedStatement groups = c.run(\"select lower(replace(ggd.group_id, ':', '-')) group_id, ggd.description, ggd.ready_for_sync_time\" +\n \" from \" + groupInfoTable + \" ggd \" +\n \" where ggd.ready_for_sync_time >= ?\");\n\n groups.param(time);\n\n for (ResultSet rs : groups.executeQuery()) {\n String groupName = rs.getString(\"group_id\");\n String description = rs.getString(\"description\");\n long lastModifiedTime = rs.getLong(\"ready_for_sync_time\");\n\n Group group = result.createOrGetGroup(new Group(groupName, description));\n group.setLastModifiedTime(lastModifiedTime);\n }\n\n // Populate any members for non-deleted groups\n DBPreparedStatement members = c.run(\"select lower(replace(ggu.group_id, ':', '-')) group_id, ggu.role, ggu.email\" +\n \" from \" + groupInfoTable + \" ggd \" +\n \" inner join \" + memberInfoTable + \" ggu \" +\n \" on ggd.group_id = ggu.group_id\" +\n \" where ggd.ready_for_sync_time >= ? AND ggd.deleted = 0\");\n\n members.param(time);\n\n for (ResultSet rs : members.executeQuery()) {\n String groupName = rs.getString(\"group_id\");\n String email = rs.getString(\"email\");\n String role = mapRole(rs.getString(\"role\"));\n\n if (result.hasGroup(groupName)) {\n Group group = result.get(groupName);\n group.addMembership(email, role);\n } else {\n // This can happen if a membership row is added after we\n // pull our initial group list, and if our database\n // doesn't give us repeatable reads. This should be\n // very rare.\n logger.warn(String.format(\"Got a row referencing group %s but that group wasn't in our set\",\n groupName));\n }\n }\n\n return null;\n }", "Integer getGroupId();", "@Override\n public String getPath() {\n return \"data/userGroup\";\n }", "public String getGroupName();", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }" ]
[ "0.6799837", "0.6682229", "0.66575456", "0.664809", "0.6582466", "0.6434495", "0.63800645", "0.63456243", "0.62828976", "0.6259785", "0.6176455", "0.6129029", "0.611914", "0.6107853", "0.61077946", "0.6078801", "0.60718995", "0.6031035", "0.6030655", "0.6030534", "0.6030534", "0.600984", "0.6001353", "0.5998697", "0.599097", "0.599097", "0.59701", "0.59687155", "0.5954836", "0.5935023", "0.5932079", "0.5931124", "0.5931124", "0.5931124", "0.5931124", "0.5931124", "0.5931124", "0.5911883", "0.5909939", "0.5880167", "0.58717376", "0.58596873", "0.58595705", "0.583324", "0.5822906", "0.58150595", "0.58130664", "0.58086115", "0.5807383", "0.5795169", "0.57928663", "0.57908386", "0.5784955", "0.5783728", "0.5775168", "0.57617253", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462", "0.5758462" ]
0.0
-1
This method was generated by Abator for iBATIS. This method corresponds to the database table lgk_user_group
UserGroup selectByPrimaryKey(Long id_user_group);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<UserGroupImp> fetchUserGroupByName (String userGroupName);", "public void joinGroup(Group group) {\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS_GROUPS WHERE USER_ID=? AND GROUP_ID=?\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\n ps.setString(2, group.toString());\n ResultSet rs = ps.executeQuery();\n if (rs.next()) return;\n\n ps = conn.prepareStatement(\"INSERT INTO USERS_GROUPS(USER_ID, GROUP_ID) VALUES(?, ?)\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\n ps.setString(2, group.toString());\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void setGroup(UserGroup group) {\n this.group = group;\n }", "public List<Usergroup> getUsersInGroup(Long groupKey) throws DAOException;", "public String getManageUsersGroup( HttpServletRequest request )\r\n {\r\n setPageTitleProperty( PROPERTY_PAGE_TITLE_MANAGE_USERS_GROUP );\r\n\r\n Map<String, Object> model = new HashMap<>( );\r\n String strURL = AppPathService.getBaseUrl( request ) + JSP_URL_MANAGE_USERS_GROUP;\r\n UrlItem url = new UrlItem( strURL );\r\n\r\n // SELECTED GROUP\r\n Group selectedGroup = getGroupFromRequest( request );\r\n\r\n if ( selectedGroup == null )\r\n {\r\n return getManageGroups( request );\r\n }\r\n\r\n // ASSIGNED USERS\r\n List<DatabaseUser> listAllAssignedUsers = DatabaseHome.findGroupUsersFromGroupKey( selectedGroup.getGroupKey( ), getPlugin( ) );\r\n List<DatabaseUser> listAssignedUsers = getListAssignedUsers( listAllAssignedUsers );\r\n\r\n DatabaseUserFilter duFilter = new DatabaseUserFilter( );\r\n boolean bIsSearch = duFilter.setDatabaseUserFilter( request );\r\n List<DatabaseUser> listFilteredUsers = _databaseService.getFilteredUsersInterface( duFilter, bIsSearch, listAssignedUsers, request, model, url );\r\n\r\n // AVAILABLE USERS\r\n ReferenceList listAvailableUsers = getAvailableUsers( listAssignedUsers );\r\n\r\n // SORT\r\n String strSortedAttributeName = request.getParameter( Parameters.SORTED_ATTRIBUTE_NAME );\r\n String strAscSort = null;\r\n\r\n if ( strSortedAttributeName != null )\r\n {\r\n strAscSort = request.getParameter( Parameters.SORTED_ASC );\r\n\r\n boolean bIsAscSort = Boolean.parseBoolean( strAscSort );\r\n\r\n Collections.sort( listFilteredUsers, new AttributeComparator( strSortedAttributeName, bIsAscSort ) );\r\n }\r\n\r\n _strCurrentPageIndex = AbstractPaginator.getPageIndex( request, AbstractPaginator.PARAMETER_PAGE_INDEX, _strCurrentPageIndex );\r\n _nDefaultItemsPerPage = AppPropertiesService.getPropertyInt( PROPERTY_USERS_PER_PAGE, 50 );\r\n _nItemsPerPage = AbstractPaginator.getItemsPerPage( request, AbstractPaginator.PARAMETER_ITEMS_PER_PAGE, _nItemsPerPage, _nDefaultItemsPerPage );\r\n\r\n if ( strSortedAttributeName != null )\r\n {\r\n url.addParameter( Parameters.SORTED_ATTRIBUTE_NAME, strSortedAttributeName );\r\n }\r\n\r\n if ( strAscSort != null )\r\n {\r\n url.addParameter( Parameters.SORTED_ASC, strAscSort );\r\n }\r\n\r\n // ITEM NAVIGATION\r\n setItemNavigator( PARAMETER_ASSIGN_USER, selectedGroup.getGroupKey( ), url.getUrl( ) );\r\n\r\n LocalizedPaginator<DatabaseUser> paginator = new LocalizedPaginator<>( listFilteredUsers, _nItemsPerPage, url.getUrl( ),\r\n AbstractPaginator.PARAMETER_PAGE_INDEX, _strCurrentPageIndex, getLocale( ) );\r\n\r\n model.put( MARK_GROUP, selectedGroup );\r\n model.put( MARK_ITEM_NAVIGATOR, _itemNavigators.get( PARAMETER_ASSIGN_USER ) );\r\n model.put( MARK_PAGINATOR, paginator );\r\n model.put( MARK_NB_ITEMS_PER_PAGE, Integer.toString( _nItemsPerPage ) );\r\n model.put( MARK_AVAILABLE_USERS, listAvailableUsers );\r\n model.put( MARK_ASSIGNED_USERS, paginator.getPageItems( ) );\r\n model.put( MARK_ASSIGNED_USERS_NUMBER, listAllAssignedUsers.size( ) );\r\n\r\n HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_MANAGE_USERS_GROUP, getLocale( ), model );\r\n\r\n return getAdminPage( template.getHtml( ) );\r\n }", "protected int getTableGroup()\n\t\t{\n\t\t\treturn Group ;\n\t\t}", "public UserGroup getGroup() {\n return group;\n }", "public UsersGroupsRecord() {\n\t\tsuper(org.kallithea.ldap.sync.jooq.tables.UsersGroups.USERS_GROUPS);\n\t}", "public void setGroup(entity.Group value);", "protected abstract Set getUserGroups();", "public List<UserGroup> GetActiveGroups() {\n/* 44 */ return this.userDal.GetActiveGroups();\n/* */ }", "List<UserGroup> findAllGroups(String companyId);", "@Override\n\tpublic void saveOrUpdateUserGroup(HhGroup group) {\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(group);\n\t}", "public Long getGroup_id() {\n return group_id;\n }", "public int getIdGroup() {\n return idGroup;\n }", "UserGroup findById(String groupId);", "public void setGroup_id(Long group_id) {\n this.group_id = group_id;\n }", "GroupUser getGroupUserById(String id);", "java.lang.String getGroupId();", "java.lang.String getGroupId();", "@Override\n\tpublic HhGroup getTheUserGroup(Integer id) {\n\t\tString hql = (\" from HhGroup h where h.isDel = 0 and h.id = \" + id);\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\treturn (HhGroup)query.uniqueResult();\n\t}", "@Schema(description = \"Id(s) of user groups that the user belongs to. This provides access to exclusive assets that are hidden to the public. Id's are agreed upon by TO and MP.\")\n \n public List<String> getUserGroups() {\n return userGroups;\n }", "@Override\n\tpublic List<HhGroupUser> getGroupUserList(Integer id) {\n\t\tString hql = \"from HhGroupUser h where h.groupId = \" + id;\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\treturn query.list();\n\t}", "String getGroupId();", "String getGroupId();", "public void addGroup(GroupUser group) {\n try {\n PreparedStatement s = sql.prepareStatement(\"INSERT INTO Groups (groupName, members) VALUES (?,?);\");\n s.setString(1, group.getId());\n\n s.setString(2, group.getMembers().toString());\n s.execute();\n\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "@Override\r\n\tpublic Collection<AccessFunction> getALLFunctionOfGroup(Users user\r\n\t\t\t ) throws RemoteException {\n\t\tString sql = \" Groupname = '\"+user.getUser_groups()+\"'\";\r\n\t\treturn AccessSQL.selectAccessFunction(sql, dsSQL.getConn());\r\n\t}", "public String getGroupTable() {\n return dbTable.getGroupTable();\n }", "public long getGroup()\r\n { return group; }", "public Long getGroupID()\n {\n return groupID;\n }", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public Set getGroups() { return this.groups; }", "public String doUnAssignUserGroup( HttpServletRequest request )\r\n {\r\n Group selectedGroup = getGroupFromRequest( request );\r\n\r\n if ( selectedGroup == null )\r\n {\r\n return getCreateGroup( request );\r\n }\r\n\r\n int nIdUser = Integer.parseInt( request.getParameter( PARAMETER_MYLUTECE_DATABASE_USER_ID ) );\r\n String strAnchor = request.getParameter( PARAMETER_ANCHOR );\r\n\r\n DatabaseUser user = DatabaseUserHome.findByPrimaryKey( nIdUser, getPlugin( ) );\r\n\r\n if ( user != null )\r\n {\r\n DatabaseHome.removeGroupsForUser( user.getUserId( ), getPlugin( ) );\r\n }\r\n\r\n return JSP_MANAGE_USERS_GROUP + QUESTION_MARK + PARAMETER_GROUP_KEY + EQUAL + selectedGroup.getGroupKey( ) + SHARP + strAnchor;\r\n }", "public boolean isUserInGroup(long idUser, long idGroup);", "void updateGroup(@Nonnull UserGroup group);", "@ApiModelProperty(value = \"Usergroups (only when requesting a single user)\")\n public List<Group> getGroups() {\n return groups;\n }", "public ResultSet getJoinedGroups() {\n try {\n conn = dao.getConnection();\n String SQL =\n \"select groups.name from USERS_GROUPS, GROUPS where users_groups.USER_ID =? AND groups.NAME = users_groups.group_ID\";\n ps = conn.prepareStatement(SQL);\n ps.setString(1, Session.getInstance(\"\").getUserName());\n\n ResultSet rs = ps.executeQuery();\n\n return rs;\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public List<Group> getUserGroups(Long iduser);", "public void setGroupKey(String GroupKey) {\n this.GroupKey = GroupKey;\n }", "UUID getGroupId();", "@ManyToMany\r\n @JoinTable(name = \"users_groups\", joinColumns = { @JoinColumn(name = \"user_id\", referencedColumnName = \"id\") }, inverseJoinColumns = { @JoinColumn(name = \"group_id\", referencedColumnName = \"id\") })\r\n public Set<Group> getGroups() {\r\n if (this.groups == null) {\r\n this.groups = new HashSet<Group>();\r\n }\r\n\r\n return this.groups;\r\n }", "List<User> findUsers(User.UserGroup group, Long id, String fname, String lname, String email) throws Exception;", "public void setGroupTable(String name) throws BuildException {\n dbTable.setGroupTable(name);\n }", "public void updateGroup(GroupUser group) {\n try{\n PreparedStatement s = sql.prepareStatement(\"UPDATE Groups SET members=? WHERE groupName=?\");\n\n s.setString(2, group.getId());\n\n System.out.println(group.getMembers().toString());\n s.setString(1, group.getMembers().toString());\n s.execute();\n\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "public final void rule__BTable__Group__5() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:951:1: ( rule__BTable__Group__5__Impl rule__BTable__Group__6 )\n // InternalBSQL2Java.g:952:2: rule__BTable__Group__5__Impl rule__BTable__Group__6\n {\n pushFollow(FOLLOW_15);\n rule__BTable__Group__5__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__BTable__Group__6();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public List<Group> getUserInfoGroups(User user);", "Integer getGroupId();", "@Override\n public Void call(DBConnection c) throws SQLException {\n DBPreparedStatement groups = c.run(\"select lower(replace(ggd.group_id, ':', '-')) group_id, ggd.description, ggd.ready_for_sync_time\" +\n \" from \" + groupInfoTable + \" ggd \" +\n \" where ggd.ready_for_sync_time >= ?\");\n\n groups.param(time);\n\n for (ResultSet rs : groups.executeQuery()) {\n String groupName = rs.getString(\"group_id\");\n String description = rs.getString(\"description\");\n long lastModifiedTime = rs.getLong(\"ready_for_sync_time\");\n\n Group group = result.createOrGetGroup(new Group(groupName, description));\n group.setLastModifiedTime(lastModifiedTime);\n }\n\n // Populate any members for non-deleted groups\n DBPreparedStatement members = c.run(\"select lower(replace(ggu.group_id, ':', '-')) group_id, ggu.role, ggu.email\" +\n \" from \" + groupInfoTable + \" ggd \" +\n \" inner join \" + memberInfoTable + \" ggu \" +\n \" on ggd.group_id = ggu.group_id\" +\n \" where ggd.ready_for_sync_time >= ? AND ggd.deleted = 0\");\n\n members.param(time);\n\n for (ResultSet rs : members.executeQuery()) {\n String groupName = rs.getString(\"group_id\");\n String email = rs.getString(\"email\");\n String role = mapRole(rs.getString(\"role\"));\n\n if (result.hasGroup(groupName)) {\n Group group = result.get(groupName);\n group.addMembership(email, role);\n } else {\n // This can happen if a membership row is added after we\n // pull our initial group list, and if our database\n // doesn't give us repeatable reads. This should be\n // very rare.\n logger.warn(String.format(\"Got a row referencing group %s but that group wasn't in our set\",\n groupName));\n }\n }\n\n return null;\n }", "@Override\n public String getPath() {\n return \"data/userGroup\";\n }", "public String getGroupName();", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }" ]
[ "0.6799069", "0.6684918", "0.6661789", "0.66499805", "0.6434915", "0.6379696", "0.63488865", "0.62819076", "0.6262287", "0.617754", "0.6129136", "0.61198545", "0.6110924", "0.6110468", "0.60815245", "0.6073163", "0.6036063", "0.6032267", "0.6031343", "0.6031343", "0.60089463", "0.60028994", "0.59971464", "0.5992071", "0.5992071", "0.5972792", "0.5969795", "0.5952847", "0.5937514", "0.593505", "0.593291", "0.593291", "0.593291", "0.593291", "0.593291", "0.593291", "0.5913553", "0.59130454", "0.5883422", "0.58755654", "0.5862238", "0.5859666", "0.5834805", "0.58275455", "0.5816687", "0.5813323", "0.58103204", "0.5806491", "0.5795343", "0.57952744", "0.5792032", "0.5785397", "0.57846963", "0.5777173", "0.57619244", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624", "0.57605624" ]
0.65841687
4
This method was generated by Abator for iBATIS. This method corresponds to the database table lgk_user_group
int deleteByPrimaryKey(Long id_user_group);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<UserGroupImp> fetchUserGroupByName (String userGroupName);", "public void joinGroup(Group group) {\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS_GROUPS WHERE USER_ID=? AND GROUP_ID=?\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\n ps.setString(2, group.toString());\n ResultSet rs = ps.executeQuery();\n if (rs.next()) return;\n\n ps = conn.prepareStatement(\"INSERT INTO USERS_GROUPS(USER_ID, GROUP_ID) VALUES(?, ?)\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\n ps.setString(2, group.toString());\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void setGroup(UserGroup group) {\n this.group = group;\n }", "public List<Usergroup> getUsersInGroup(Long groupKey) throws DAOException;", "UserGroup selectByPrimaryKey(Long id_user_group);", "public String getManageUsersGroup( HttpServletRequest request )\r\n {\r\n setPageTitleProperty( PROPERTY_PAGE_TITLE_MANAGE_USERS_GROUP );\r\n\r\n Map<String, Object> model = new HashMap<>( );\r\n String strURL = AppPathService.getBaseUrl( request ) + JSP_URL_MANAGE_USERS_GROUP;\r\n UrlItem url = new UrlItem( strURL );\r\n\r\n // SELECTED GROUP\r\n Group selectedGroup = getGroupFromRequest( request );\r\n\r\n if ( selectedGroup == null )\r\n {\r\n return getManageGroups( request );\r\n }\r\n\r\n // ASSIGNED USERS\r\n List<DatabaseUser> listAllAssignedUsers = DatabaseHome.findGroupUsersFromGroupKey( selectedGroup.getGroupKey( ), getPlugin( ) );\r\n List<DatabaseUser> listAssignedUsers = getListAssignedUsers( listAllAssignedUsers );\r\n\r\n DatabaseUserFilter duFilter = new DatabaseUserFilter( );\r\n boolean bIsSearch = duFilter.setDatabaseUserFilter( request );\r\n List<DatabaseUser> listFilteredUsers = _databaseService.getFilteredUsersInterface( duFilter, bIsSearch, listAssignedUsers, request, model, url );\r\n\r\n // AVAILABLE USERS\r\n ReferenceList listAvailableUsers = getAvailableUsers( listAssignedUsers );\r\n\r\n // SORT\r\n String strSortedAttributeName = request.getParameter( Parameters.SORTED_ATTRIBUTE_NAME );\r\n String strAscSort = null;\r\n\r\n if ( strSortedAttributeName != null )\r\n {\r\n strAscSort = request.getParameter( Parameters.SORTED_ASC );\r\n\r\n boolean bIsAscSort = Boolean.parseBoolean( strAscSort );\r\n\r\n Collections.sort( listFilteredUsers, new AttributeComparator( strSortedAttributeName, bIsAscSort ) );\r\n }\r\n\r\n _strCurrentPageIndex = AbstractPaginator.getPageIndex( request, AbstractPaginator.PARAMETER_PAGE_INDEX, _strCurrentPageIndex );\r\n _nDefaultItemsPerPage = AppPropertiesService.getPropertyInt( PROPERTY_USERS_PER_PAGE, 50 );\r\n _nItemsPerPage = AbstractPaginator.getItemsPerPage( request, AbstractPaginator.PARAMETER_ITEMS_PER_PAGE, _nItemsPerPage, _nDefaultItemsPerPage );\r\n\r\n if ( strSortedAttributeName != null )\r\n {\r\n url.addParameter( Parameters.SORTED_ATTRIBUTE_NAME, strSortedAttributeName );\r\n }\r\n\r\n if ( strAscSort != null )\r\n {\r\n url.addParameter( Parameters.SORTED_ASC, strAscSort );\r\n }\r\n\r\n // ITEM NAVIGATION\r\n setItemNavigator( PARAMETER_ASSIGN_USER, selectedGroup.getGroupKey( ), url.getUrl( ) );\r\n\r\n LocalizedPaginator<DatabaseUser> paginator = new LocalizedPaginator<>( listFilteredUsers, _nItemsPerPage, url.getUrl( ),\r\n AbstractPaginator.PARAMETER_PAGE_INDEX, _strCurrentPageIndex, getLocale( ) );\r\n\r\n model.put( MARK_GROUP, selectedGroup );\r\n model.put( MARK_ITEM_NAVIGATOR, _itemNavigators.get( PARAMETER_ASSIGN_USER ) );\r\n model.put( MARK_PAGINATOR, paginator );\r\n model.put( MARK_NB_ITEMS_PER_PAGE, Integer.toString( _nItemsPerPage ) );\r\n model.put( MARK_AVAILABLE_USERS, listAvailableUsers );\r\n model.put( MARK_ASSIGNED_USERS, paginator.getPageItems( ) );\r\n model.put( MARK_ASSIGNED_USERS_NUMBER, listAllAssignedUsers.size( ) );\r\n\r\n HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_MANAGE_USERS_GROUP, getLocale( ), model );\r\n\r\n return getAdminPage( template.getHtml( ) );\r\n }", "protected int getTableGroup()\n\t\t{\n\t\t\treturn Group ;\n\t\t}", "public UserGroup getGroup() {\n return group;\n }", "public UsersGroupsRecord() {\n\t\tsuper(org.kallithea.ldap.sync.jooq.tables.UsersGroups.USERS_GROUPS);\n\t}", "public void setGroup(entity.Group value);", "protected abstract Set getUserGroups();", "public List<UserGroup> GetActiveGroups() {\n/* 44 */ return this.userDal.GetActiveGroups();\n/* */ }", "List<UserGroup> findAllGroups(String companyId);", "public Long getGroup_id() {\n return group_id;\n }", "@Override\n\tpublic void saveOrUpdateUserGroup(HhGroup group) {\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(group);\n\t}", "public int getIdGroup() {\n return idGroup;\n }", "UserGroup findById(String groupId);", "public void setGroup_id(Long group_id) {\n this.group_id = group_id;\n }", "java.lang.String getGroupId();", "java.lang.String getGroupId();", "GroupUser getGroupUserById(String id);", "@Override\n\tpublic HhGroup getTheUserGroup(Integer id) {\n\t\tString hql = (\" from HhGroup h where h.isDel = 0 and h.id = \" + id);\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\treturn (HhGroup)query.uniqueResult();\n\t}", "@Schema(description = \"Id(s) of user groups that the user belongs to. This provides access to exclusive assets that are hidden to the public. Id's are agreed upon by TO and MP.\")\n \n public List<String> getUserGroups() {\n return userGroups;\n }", "@Override\n\tpublic List<HhGroupUser> getGroupUserList(Integer id) {\n\t\tString hql = \"from HhGroupUser h where h.groupId = \" + id;\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\treturn query.list();\n\t}", "String getGroupId();", "String getGroupId();", "public void addGroup(GroupUser group) {\n try {\n PreparedStatement s = sql.prepareStatement(\"INSERT INTO Groups (groupName, members) VALUES (?,?);\");\n s.setString(1, group.getId());\n\n s.setString(2, group.getMembers().toString());\n s.execute();\n\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "@Override\r\n\tpublic Collection<AccessFunction> getALLFunctionOfGroup(Users user\r\n\t\t\t ) throws RemoteException {\n\t\tString sql = \" Groupname = '\"+user.getUser_groups()+\"'\";\r\n\t\treturn AccessSQL.selectAccessFunction(sql, dsSQL.getConn());\r\n\t}", "public String getGroupTable() {\n return dbTable.getGroupTable();\n }", "public long getGroup()\r\n { return group; }", "public Long getGroupID()\n {\n return groupID;\n }", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public Set getGroups() { return this.groups; }", "public String doUnAssignUserGroup( HttpServletRequest request )\r\n {\r\n Group selectedGroup = getGroupFromRequest( request );\r\n\r\n if ( selectedGroup == null )\r\n {\r\n return getCreateGroup( request );\r\n }\r\n\r\n int nIdUser = Integer.parseInt( request.getParameter( PARAMETER_MYLUTECE_DATABASE_USER_ID ) );\r\n String strAnchor = request.getParameter( PARAMETER_ANCHOR );\r\n\r\n DatabaseUser user = DatabaseUserHome.findByPrimaryKey( nIdUser, getPlugin( ) );\r\n\r\n if ( user != null )\r\n {\r\n DatabaseHome.removeGroupsForUser( user.getUserId( ), getPlugin( ) );\r\n }\r\n\r\n return JSP_MANAGE_USERS_GROUP + QUESTION_MARK + PARAMETER_GROUP_KEY + EQUAL + selectedGroup.getGroupKey( ) + SHARP + strAnchor;\r\n }", "public boolean isUserInGroup(long idUser, long idGroup);", "void updateGroup(@Nonnull UserGroup group);", "@ApiModelProperty(value = \"Usergroups (only when requesting a single user)\")\n public List<Group> getGroups() {\n return groups;\n }", "public ResultSet getJoinedGroups() {\n try {\n conn = dao.getConnection();\n String SQL =\n \"select groups.name from USERS_GROUPS, GROUPS where users_groups.USER_ID =? AND groups.NAME = users_groups.group_ID\";\n ps = conn.prepareStatement(SQL);\n ps.setString(1, Session.getInstance(\"\").getUserName());\n\n ResultSet rs = ps.executeQuery();\n\n return rs;\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public List<Group> getUserGroups(Long iduser);", "public void setGroupKey(String GroupKey) {\n this.GroupKey = GroupKey;\n }", "UUID getGroupId();", "@ManyToMany\r\n @JoinTable(name = \"users_groups\", joinColumns = { @JoinColumn(name = \"user_id\", referencedColumnName = \"id\") }, inverseJoinColumns = { @JoinColumn(name = \"group_id\", referencedColumnName = \"id\") })\r\n public Set<Group> getGroups() {\r\n if (this.groups == null) {\r\n this.groups = new HashSet<Group>();\r\n }\r\n\r\n return this.groups;\r\n }", "public void setGroupTable(String name) throws BuildException {\n dbTable.setGroupTable(name);\n }", "List<User> findUsers(User.UserGroup group, Long id, String fname, String lname, String email) throws Exception;", "public final void rule__BTable__Group__5() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:951:1: ( rule__BTable__Group__5__Impl rule__BTable__Group__6 )\n // InternalBSQL2Java.g:952:2: rule__BTable__Group__5__Impl rule__BTable__Group__6\n {\n pushFollow(FOLLOW_15);\n rule__BTable__Group__5__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__BTable__Group__6();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void updateGroup(GroupUser group) {\n try{\n PreparedStatement s = sql.prepareStatement(\"UPDATE Groups SET members=? WHERE groupName=?\");\n\n s.setString(2, group.getId());\n\n System.out.println(group.getMembers().toString());\n s.setString(1, group.getMembers().toString());\n s.execute();\n\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "public List<Group> getUserInfoGroups(User user);", "Integer getGroupId();", "@Override\n public Void call(DBConnection c) throws SQLException {\n DBPreparedStatement groups = c.run(\"select lower(replace(ggd.group_id, ':', '-')) group_id, ggd.description, ggd.ready_for_sync_time\" +\n \" from \" + groupInfoTable + \" ggd \" +\n \" where ggd.ready_for_sync_time >= ?\");\n\n groups.param(time);\n\n for (ResultSet rs : groups.executeQuery()) {\n String groupName = rs.getString(\"group_id\");\n String description = rs.getString(\"description\");\n long lastModifiedTime = rs.getLong(\"ready_for_sync_time\");\n\n Group group = result.createOrGetGroup(new Group(groupName, description));\n group.setLastModifiedTime(lastModifiedTime);\n }\n\n // Populate any members for non-deleted groups\n DBPreparedStatement members = c.run(\"select lower(replace(ggu.group_id, ':', '-')) group_id, ggu.role, ggu.email\" +\n \" from \" + groupInfoTable + \" ggd \" +\n \" inner join \" + memberInfoTable + \" ggu \" +\n \" on ggd.group_id = ggu.group_id\" +\n \" where ggd.ready_for_sync_time >= ? AND ggd.deleted = 0\");\n\n members.param(time);\n\n for (ResultSet rs : members.executeQuery()) {\n String groupName = rs.getString(\"group_id\");\n String email = rs.getString(\"email\");\n String role = mapRole(rs.getString(\"role\"));\n\n if (result.hasGroup(groupName)) {\n Group group = result.get(groupName);\n group.addMembership(email, role);\n } else {\n // This can happen if a membership row is added after we\n // pull our initial group list, and if our database\n // doesn't give us repeatable reads. This should be\n // very rare.\n logger.warn(String.format(\"Got a row referencing group %s but that group wasn't in our set\",\n groupName));\n }\n }\n\n return null;\n }", "@Override\n public String getPath() {\n return \"data/userGroup\";\n }", "public String getGroupName();", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }" ]
[ "0.67993623", "0.66834444", "0.66610485", "0.6649495", "0.6584011", "0.64348614", "0.63810605", "0.6351145", "0.62821513", "0.6262756", "0.61781013", "0.6129332", "0.61206937", "0.6111906", "0.61097455", "0.6082717", "0.60734475", "0.603536", "0.6034013", "0.6034013", "0.6032356", "0.60128754", "0.600351", "0.59987146", "0.59941006", "0.59941006", "0.59721804", "0.59694004", "0.5953542", "0.5937908", "0.59371525", "0.5934518", "0.5934518", "0.5934518", "0.5934518", "0.5934518", "0.5934518", "0.5915162", "0.5913712", "0.58833724", "0.5874734", "0.5864637", "0.5861857", "0.5835765", "0.5827743", "0.5818949", "0.5817579", "0.58078015", "0.5806375", "0.5795173", "0.57947135", "0.57923645", "0.5787493", "0.5784929", "0.57754356", "0.57632583", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384" ]
0.0
-1
This method was generated by Abator for iBATIS. This method corresponds to the database table lgk_user_group
int countByExample(UserGroupExample example);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<UserGroupImp> fetchUserGroupByName (String userGroupName);", "public void joinGroup(Group group) {\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS_GROUPS WHERE USER_ID=? AND GROUP_ID=?\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\n ps.setString(2, group.toString());\n ResultSet rs = ps.executeQuery();\n if (rs.next()) return;\n\n ps = conn.prepareStatement(\"INSERT INTO USERS_GROUPS(USER_ID, GROUP_ID) VALUES(?, ?)\");\n ps.setString(1, Session.getInstance(\"\").getUserName());\n ps.setString(2, group.toString());\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void setGroup(UserGroup group) {\n this.group = group;\n }", "public List<Usergroup> getUsersInGroup(Long groupKey) throws DAOException;", "UserGroup selectByPrimaryKey(Long id_user_group);", "public String getManageUsersGroup( HttpServletRequest request )\r\n {\r\n setPageTitleProperty( PROPERTY_PAGE_TITLE_MANAGE_USERS_GROUP );\r\n\r\n Map<String, Object> model = new HashMap<>( );\r\n String strURL = AppPathService.getBaseUrl( request ) + JSP_URL_MANAGE_USERS_GROUP;\r\n UrlItem url = new UrlItem( strURL );\r\n\r\n // SELECTED GROUP\r\n Group selectedGroup = getGroupFromRequest( request );\r\n\r\n if ( selectedGroup == null )\r\n {\r\n return getManageGroups( request );\r\n }\r\n\r\n // ASSIGNED USERS\r\n List<DatabaseUser> listAllAssignedUsers = DatabaseHome.findGroupUsersFromGroupKey( selectedGroup.getGroupKey( ), getPlugin( ) );\r\n List<DatabaseUser> listAssignedUsers = getListAssignedUsers( listAllAssignedUsers );\r\n\r\n DatabaseUserFilter duFilter = new DatabaseUserFilter( );\r\n boolean bIsSearch = duFilter.setDatabaseUserFilter( request );\r\n List<DatabaseUser> listFilteredUsers = _databaseService.getFilteredUsersInterface( duFilter, bIsSearch, listAssignedUsers, request, model, url );\r\n\r\n // AVAILABLE USERS\r\n ReferenceList listAvailableUsers = getAvailableUsers( listAssignedUsers );\r\n\r\n // SORT\r\n String strSortedAttributeName = request.getParameter( Parameters.SORTED_ATTRIBUTE_NAME );\r\n String strAscSort = null;\r\n\r\n if ( strSortedAttributeName != null )\r\n {\r\n strAscSort = request.getParameter( Parameters.SORTED_ASC );\r\n\r\n boolean bIsAscSort = Boolean.parseBoolean( strAscSort );\r\n\r\n Collections.sort( listFilteredUsers, new AttributeComparator( strSortedAttributeName, bIsAscSort ) );\r\n }\r\n\r\n _strCurrentPageIndex = AbstractPaginator.getPageIndex( request, AbstractPaginator.PARAMETER_PAGE_INDEX, _strCurrentPageIndex );\r\n _nDefaultItemsPerPage = AppPropertiesService.getPropertyInt( PROPERTY_USERS_PER_PAGE, 50 );\r\n _nItemsPerPage = AbstractPaginator.getItemsPerPage( request, AbstractPaginator.PARAMETER_ITEMS_PER_PAGE, _nItemsPerPage, _nDefaultItemsPerPage );\r\n\r\n if ( strSortedAttributeName != null )\r\n {\r\n url.addParameter( Parameters.SORTED_ATTRIBUTE_NAME, strSortedAttributeName );\r\n }\r\n\r\n if ( strAscSort != null )\r\n {\r\n url.addParameter( Parameters.SORTED_ASC, strAscSort );\r\n }\r\n\r\n // ITEM NAVIGATION\r\n setItemNavigator( PARAMETER_ASSIGN_USER, selectedGroup.getGroupKey( ), url.getUrl( ) );\r\n\r\n LocalizedPaginator<DatabaseUser> paginator = new LocalizedPaginator<>( listFilteredUsers, _nItemsPerPage, url.getUrl( ),\r\n AbstractPaginator.PARAMETER_PAGE_INDEX, _strCurrentPageIndex, getLocale( ) );\r\n\r\n model.put( MARK_GROUP, selectedGroup );\r\n model.put( MARK_ITEM_NAVIGATOR, _itemNavigators.get( PARAMETER_ASSIGN_USER ) );\r\n model.put( MARK_PAGINATOR, paginator );\r\n model.put( MARK_NB_ITEMS_PER_PAGE, Integer.toString( _nItemsPerPage ) );\r\n model.put( MARK_AVAILABLE_USERS, listAvailableUsers );\r\n model.put( MARK_ASSIGNED_USERS, paginator.getPageItems( ) );\r\n model.put( MARK_ASSIGNED_USERS_NUMBER, listAllAssignedUsers.size( ) );\r\n\r\n HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_MANAGE_USERS_GROUP, getLocale( ), model );\r\n\r\n return getAdminPage( template.getHtml( ) );\r\n }", "protected int getTableGroup()\n\t\t{\n\t\t\treturn Group ;\n\t\t}", "public UserGroup getGroup() {\n return group;\n }", "public UsersGroupsRecord() {\n\t\tsuper(org.kallithea.ldap.sync.jooq.tables.UsersGroups.USERS_GROUPS);\n\t}", "public void setGroup(entity.Group value);", "protected abstract Set getUserGroups();", "public List<UserGroup> GetActiveGroups() {\n/* 44 */ return this.userDal.GetActiveGroups();\n/* */ }", "List<UserGroup> findAllGroups(String companyId);", "public Long getGroup_id() {\n return group_id;\n }", "@Override\n\tpublic void saveOrUpdateUserGroup(HhGroup group) {\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(group);\n\t}", "public int getIdGroup() {\n return idGroup;\n }", "UserGroup findById(String groupId);", "public void setGroup_id(Long group_id) {\n this.group_id = group_id;\n }", "java.lang.String getGroupId();", "java.lang.String getGroupId();", "GroupUser getGroupUserById(String id);", "@Override\n\tpublic HhGroup getTheUserGroup(Integer id) {\n\t\tString hql = (\" from HhGroup h where h.isDel = 0 and h.id = \" + id);\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\treturn (HhGroup)query.uniqueResult();\n\t}", "@Schema(description = \"Id(s) of user groups that the user belongs to. This provides access to exclusive assets that are hidden to the public. Id's are agreed upon by TO and MP.\")\n \n public List<String> getUserGroups() {\n return userGroups;\n }", "@Override\n\tpublic List<HhGroupUser> getGroupUserList(Integer id) {\n\t\tString hql = \"from HhGroupUser h where h.groupId = \" + id;\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\treturn query.list();\n\t}", "String getGroupId();", "String getGroupId();", "public void addGroup(GroupUser group) {\n try {\n PreparedStatement s = sql.prepareStatement(\"INSERT INTO Groups (groupName, members) VALUES (?,?);\");\n s.setString(1, group.getId());\n\n s.setString(2, group.getMembers().toString());\n s.execute();\n\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "@Override\r\n\tpublic Collection<AccessFunction> getALLFunctionOfGroup(Users user\r\n\t\t\t ) throws RemoteException {\n\t\tString sql = \" Groupname = '\"+user.getUser_groups()+\"'\";\r\n\t\treturn AccessSQL.selectAccessFunction(sql, dsSQL.getConn());\r\n\t}", "public String getGroupTable() {\n return dbTable.getGroupTable();\n }", "public long getGroup()\r\n { return group; }", "public Long getGroupID()\n {\n return groupID;\n }", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public Set getGroups() { return this.groups; }", "public String doUnAssignUserGroup( HttpServletRequest request )\r\n {\r\n Group selectedGroup = getGroupFromRequest( request );\r\n\r\n if ( selectedGroup == null )\r\n {\r\n return getCreateGroup( request );\r\n }\r\n\r\n int nIdUser = Integer.parseInt( request.getParameter( PARAMETER_MYLUTECE_DATABASE_USER_ID ) );\r\n String strAnchor = request.getParameter( PARAMETER_ANCHOR );\r\n\r\n DatabaseUser user = DatabaseUserHome.findByPrimaryKey( nIdUser, getPlugin( ) );\r\n\r\n if ( user != null )\r\n {\r\n DatabaseHome.removeGroupsForUser( user.getUserId( ), getPlugin( ) );\r\n }\r\n\r\n return JSP_MANAGE_USERS_GROUP + QUESTION_MARK + PARAMETER_GROUP_KEY + EQUAL + selectedGroup.getGroupKey( ) + SHARP + strAnchor;\r\n }", "public boolean isUserInGroup(long idUser, long idGroup);", "void updateGroup(@Nonnull UserGroup group);", "@ApiModelProperty(value = \"Usergroups (only when requesting a single user)\")\n public List<Group> getGroups() {\n return groups;\n }", "public ResultSet getJoinedGroups() {\n try {\n conn = dao.getConnection();\n String SQL =\n \"select groups.name from USERS_GROUPS, GROUPS where users_groups.USER_ID =? AND groups.NAME = users_groups.group_ID\";\n ps = conn.prepareStatement(SQL);\n ps.setString(1, Session.getInstance(\"\").getUserName());\n\n ResultSet rs = ps.executeQuery();\n\n return rs;\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public List<Group> getUserGroups(Long iduser);", "public void setGroupKey(String GroupKey) {\n this.GroupKey = GroupKey;\n }", "UUID getGroupId();", "@ManyToMany\r\n @JoinTable(name = \"users_groups\", joinColumns = { @JoinColumn(name = \"user_id\", referencedColumnName = \"id\") }, inverseJoinColumns = { @JoinColumn(name = \"group_id\", referencedColumnName = \"id\") })\r\n public Set<Group> getGroups() {\r\n if (this.groups == null) {\r\n this.groups = new HashSet<Group>();\r\n }\r\n\r\n return this.groups;\r\n }", "public void setGroupTable(String name) throws BuildException {\n dbTable.setGroupTable(name);\n }", "List<User> findUsers(User.UserGroup group, Long id, String fname, String lname, String email) throws Exception;", "public final void rule__BTable__Group__5() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:951:1: ( rule__BTable__Group__5__Impl rule__BTable__Group__6 )\n // InternalBSQL2Java.g:952:2: rule__BTable__Group__5__Impl rule__BTable__Group__6\n {\n pushFollow(FOLLOW_15);\n rule__BTable__Group__5__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__BTable__Group__6();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void updateGroup(GroupUser group) {\n try{\n PreparedStatement s = sql.prepareStatement(\"UPDATE Groups SET members=? WHERE groupName=?\");\n\n s.setString(2, group.getId());\n\n System.out.println(group.getMembers().toString());\n s.setString(1, group.getMembers().toString());\n s.execute();\n\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "public List<Group> getUserInfoGroups(User user);", "Integer getGroupId();", "@Override\n public Void call(DBConnection c) throws SQLException {\n DBPreparedStatement groups = c.run(\"select lower(replace(ggd.group_id, ':', '-')) group_id, ggd.description, ggd.ready_for_sync_time\" +\n \" from \" + groupInfoTable + \" ggd \" +\n \" where ggd.ready_for_sync_time >= ?\");\n\n groups.param(time);\n\n for (ResultSet rs : groups.executeQuery()) {\n String groupName = rs.getString(\"group_id\");\n String description = rs.getString(\"description\");\n long lastModifiedTime = rs.getLong(\"ready_for_sync_time\");\n\n Group group = result.createOrGetGroup(new Group(groupName, description));\n group.setLastModifiedTime(lastModifiedTime);\n }\n\n // Populate any members for non-deleted groups\n DBPreparedStatement members = c.run(\"select lower(replace(ggu.group_id, ':', '-')) group_id, ggu.role, ggu.email\" +\n \" from \" + groupInfoTable + \" ggd \" +\n \" inner join \" + memberInfoTable + \" ggu \" +\n \" on ggd.group_id = ggu.group_id\" +\n \" where ggd.ready_for_sync_time >= ? AND ggd.deleted = 0\");\n\n members.param(time);\n\n for (ResultSet rs : members.executeQuery()) {\n String groupName = rs.getString(\"group_id\");\n String email = rs.getString(\"email\");\n String role = mapRole(rs.getString(\"role\"));\n\n if (result.hasGroup(groupName)) {\n Group group = result.get(groupName);\n group.addMembership(email, role);\n } else {\n // This can happen if a membership row is added after we\n // pull our initial group list, and if our database\n // doesn't give us repeatable reads. This should be\n // very rare.\n logger.warn(String.format(\"Got a row referencing group %s but that group wasn't in our set\",\n groupName));\n }\n }\n\n return null;\n }", "@Override\n public String getPath() {\n return \"data/userGroup\";\n }", "public String getGroupName();", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }", "public Group getGroup() { return cGroup; }" ]
[ "0.67993623", "0.66834444", "0.66610485", "0.6649495", "0.6584011", "0.64348614", "0.63810605", "0.6351145", "0.62821513", "0.6262756", "0.61781013", "0.6129332", "0.61206937", "0.6111906", "0.61097455", "0.6082717", "0.60734475", "0.603536", "0.6034013", "0.6034013", "0.6032356", "0.60128754", "0.600351", "0.59987146", "0.59941006", "0.59941006", "0.59721804", "0.59694004", "0.5953542", "0.5937908", "0.59371525", "0.5934518", "0.5934518", "0.5934518", "0.5934518", "0.5934518", "0.5934518", "0.5915162", "0.5913712", "0.58833724", "0.5874734", "0.5864637", "0.5861857", "0.5835765", "0.5827743", "0.5818949", "0.5817579", "0.58078015", "0.5806375", "0.5795173", "0.57947135", "0.57923645", "0.5787493", "0.5784929", "0.57754356", "0.57632583", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384", "0.57626384" ]
0.0
-1
Remove row from model
public void removeRow(int row) { data.remove(row); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void actionPerformed(ActionEvent e) {\n model.deleteRow();\n }", "private void tampilkan() {\n int row = table.getRowCount();\n for(int a= 0; a<row;a++){\n model.removeRow(0);\n }\n \n \n }", "private void emptyModel() {\n while (myModel.getRowCount() != 0) {\n myModel.removeRow(0);\n }\n }", "public void removeRowAt(int index) {\n ((DefaultTableModel) getModel()).removeRow(index);\n }", "public void removeBtn(){\r\n\t\t\r\n\t\tWorkflowEntry entryToBeRemoved = (WorkflowEntry) tableView.getSelectionModel().getSelectedItem();\r\n\t\t\r\n\t\tdata.remove(entryToBeRemoved);\r\n\t\t\r\n\t}", "public void removeTableRows(DefaultTableModel model){\n\t\tif(model.getRowCount() > 0){\r\n\t\t\tfor (int i = model.getRowCount()-1; i >= 0; --i) {\r\n\t\t\t\tmodel.removeRow(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void removeRow(String fileName) {\n tableModel.removeRow(fileName);\n }", "public void removeRow(String rowName);", "@Override\n public void removeFromDb() {\n }", "public static void vaciartabla(){\n DefaultTableModel modelo=(DefaultTableModel) jtproveedores.getModel(); \n for (int i = 0; i < jtproveedores.getRowCount(); i++) {\n modelo.removeRow(i);\n i-=1;\n } \n }", "private void removeRow() {\n gridHeight--; \n for (EscapeBlock block : grid.get(gridHeight)) { // for each block from the last row\n block.disconnectAll();\n this.remove(block); // remove it from the UI\n }\n\n grid.remove(gridHeight); // remove the row\n }", "void removeAll() throws ModelRuntimeException;", "@Override\n public void remove() throws IOException {\n int i = listEnterprisePanel.getTableListE().getSelectedRow(); // chọn hàng để xóa\n if (i >= 0) {\n String strID = listEnterprisePanel.getTableListE().getValueAt(i, 1).toString().trim(); // lấy ID\n Enterprise enterprise = enterpriseBN.getEnterpriseByID(strID); // Tìm kiếm Enterprise theo ID\n content.set(Collections.singleton(enterprise), null);\n enterpriseBN.deleteEnterprise(enterprise);\n model.removeRow(i);\n loadData();\n }\n\n }", "public void toDeletIndex()\n {\n try\n { \n //DefaultTableModel model=(DefaultTableModel)jt.getModel(); \n //jt.getModel();\n int num=Integer.parseInt(JOptionPane.showInputDialog(rootPane,\"Enter the row number\")); \n jtModel.removeRow(num-1);\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted selected row number \" +num);\n }\n catch(NumberFormatException ex)\n {\n JOptionPane.showMessageDialog(rootPane,\"Enter integer not alphabet\");\n } \n catch(ArrayIndexOutOfBoundsException ex)\n {\n JOptionPane.showMessageDialog(rootPane,\"This row dosent exist\");\n }\n }", "public Feature removeRow(int row){\n if (debug) logger.info(\"feature added\");\n Feature f = fc.remove(row);\n fcLastEdits.clear();\n fcLastEdits.add(f);\n lastEditType = EDIT_REMOVE;\n fireTableRowsDeleted(row, row);\n return f;\n }", "public boolean exclude(int row, javax.swing.table.TableModel tableModel);", "public void deleteCartRow() {\n CarComponent selectedRow = cartTable.getSelectionModel().getSelectedItem();\n cartTable.getItems().remove(selectedRow);\n componentsCart.remove(selectedRow);\n\n updateTotal();\n }", "@Override\r\n\tpublic void removeRow(int row) {\r\n\t\tsuper.removeRow(row);\r\n\t\telenco = lista.getElenco();\r\n\t\tPersona removable = new Persona();\r\n\t\tremovable.setNome(elenco.elementAt(row).getNome());\r\n\t\tremovable.setCognome(elenco.elementAt(row).getCognome());\r\n\t\tremovable.setTelefono(elenco.elementAt(row).getTelefono());\r\n\t\tremovable.setIndirizzo(elenco.elementAt(row).getIndirizzo());\r\n\t\tremovable.setEta(elenco.elementAt(row).getEta());\r\n\t\ttry {\r\n\t\t\tlista.delete(removable, row);\r\n\t\t\t}\r\n\t\t\tcatch (ArrayIndexOutOfBoundsException aioe) {\r\n\t\t\t\tString message = AIOE_MESSAGE\r\n\t\t\t\t\t\t+row + \" on table \"\r\n\t\t\t\t\t\t+lista.getElenco().indexOf(removable)\r\n\t\t\t\t\t\t+ \" on Lista \";\r\n\t\t\t\tJOptionPane.showMessageDialog(null, message);\r\n\t\t\t}\r\n\t}", "@RequestMapping(\"/removeRow\")\n\tpublic String removeRow(Model model, @RequestParam(value = \"row\") int row, @RequestParam(value = \"id\") int id,\n\t\t\t@CookieValue(value = \"draftid\", defaultValue = \"0\") int draftid) {\n\t\tString jsonStr = \"\";\n\t\tServletRequestAttributes attr = (ServletRequestAttributes) RequestContextHolder.currentRequestAttributes();\n\t\tHttpSession session = attr.getRequest().getSession(true);\n\t\tDataObject dataObj = (DataObject) session.getAttribute(\"CONTAINER\");\n\t\tif (draftid != 0 && dataObj == null) {\n\t\t\tjsonStr = draftDb.getJson(draftid);\n\t\t\tGsonBuilder gsonBilder = new GsonBuilder();\n\n\t\t\tgsonBilder.registerTypeAdapter(ElementData.class, new DataAdapter());\n\n\t\t\tGson gson = gsonBilder.create();\n\n\t\t\t// TuanHMA 1-29-2016 Object held informations of JSON\n\t\t\tdataObj = gson.fromJson(jsonStr, DataObject.class);\n\t\t}\n\n\t\tList<ElementData> elements = dataObj.getElements();\n\t\tCollections.sort(elements);\n\n\t\tfor (ElementData eData : elements) {\n\t\t\tif (eData.getDataType().equals(\"table\") && id == eData.getId()) {\n\t\t\t\tTable table = (Table) eData;\n\t\t\t\tIterator<TableValue> valueIter = table.getData().getValues().iterator();\n\t\t\t\tint i = 0;\n\t\t\t\twhile (valueIter.hasNext()) {\n\t\t\t\t\tTableValue value = valueIter.next();\n\t\t\t\t\tif (value.getRow() == row) {\n\t\t\t\t\t\tvalueIter.remove();\n\t\t\t\t\t\ti--;\n\t\t\t\t\t} else if (value.getRow() > row) {\n\t\t\t\t\t\tvalue.setRow(value.getRow() - 1);\n\t\t\t\t\t\ttable.getData().getValues().set(i, value);\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdataObj.setElements(elements);\n\t\tsession.setAttribute(\"CONTAINER\", dataObj);\n\t\tif (draftid != 0) {\n\t\t\tdraftDb.saveJsonDB(draftid, new Gson().toJson(dataObj, DataObject.class));\n\t\t}\n\t\treturn new Gson().toJson(dataObj, DataObject.class);\n\t}", "private void removeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeButtonActionPerformed\n\n AttlistTableModel tm = (AttlistTableModel) attrTable.getModel();\n \n int sel = attrTable.getSelectedRow();\n if (sel > -1) {\n tm.removeRow(sel);\n if (numRows() > 0) {\n if (sel <= numRows() - 1)\n attrTable.getSelectionModel().setSelectionInterval(sel,sel);\n else\n attrTable.getSelectionModel().setSelectionInterval(sel - 1, sel - 1);\n } else removeButton.setEnabled(false);\n }\n }", "public void removeRow(T obj) {\r\n\t\t\r\n\t\tlogger.trace(\"Enter removeRow - T obj\");\r\n\t\t\r\n\t\tint row = data.indexOf(obj);\r\n\t\tif (row >= 0) {\r\n\t\t\tdata.remove(row);\r\n\t\t\tfireTableRowsDeleted(row, row);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.trace(\"Exit removeRow - T obj\");\r\n\t}", "public void removeRow(int row) {\r\n\t\tdataVector.removeElementAt(row);\r\n\t\tthis.dataObjects.removeElementAt(row);\r\n\r\n\t\t// Generate notification\r\n\t\tfireTableRowsDeleted(row, row);\r\n\t}", "public void removeRow(Patient o)\n\t{\n\t\tthis.data.remove(o);\n\t\tthis.fireTableChanged(null);\n\t}", "private void removeList()\r\n {\n if (tableCheckBinding != null)\r\n {\r\n tableCheckBinding.dispose();\r\n tableCheckBinding = null;\r\n }\r\n\r\n // m_TableViewer.setInput(null);\r\n WritableList newList = new WritableList(SWTObservables.getRealm(Display.getDefault()));\r\n for (int i = 0; i < 10; ++i)\r\n {\r\n newList.add(this.generateNewDataModelItem());\r\n }\r\n m_TableViewer.setInput(newList);\r\n }", "private void removePerson(){\r\n\t\t// can't remove a value if there's nothing there\r\n\t\tif (dataTable.getSelectedRow()== -1)\r\n\t\t\treturn;\r\n\t\tpeople.remove(dataTable.getSelectedRow());\r\n\t\tpersonTableModel.fireTableRowsDeleted(dataTable.getSelectedRow(),dataTable.getSelectedRow());\r\n\t}", "@FXML\n private void setRemoveButton() {\n Coach selectedRow = coachesTable.getSelectionModel().getSelectedItem();\n try {\n Connection conn = DatabaseHandler.getInstance().getConnection();\n try (Statement st = conn.createStatement()) {\n st.execute(\"delete from szkolka.uzytkownik where id_u=\" + selectedRow.getId() + \";\");\n coachesTable.getItems().remove(coachesTable.getSelectionModel().getSelectedItem());\n removeButton.setDisable(true);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "private void clearData() throws SQLException {\n//Lay chi so dong cuoi cung\n int n = tableModel.getRowCount() - 1;\n for (int i = n; i >= 0; i--) {\n tableModel.removeRow(i);//Remove tung dong\n }\n }", "private void delete() {\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\tif (list.get(i).toString().equals(lu.toString())) {\r\n\t\t\t\tlist.remove(i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tll.makeXml(list);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tinitTableView();\r\n\t}", "public void deleteRow(MyItem row) {\n\n\t\tif (MyItemAdapter.rows.contains(row)) {\n\t\t\tMyItemAdapter.rows.remove(row);\n\t\t}\n\n\t}", "void removeRow(int row_index) throws IOException;", "private void btnRemoveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRemoveActionPerformed\n if(tblOrders.getSelectedRow() == -1)\n {\n lblMessage.setText(\"Select Product First\");\n }\n else\n {\n DefaultTableModel model = (DefaultTableModel)tblOrders.getModel();\n int productId = \n Integer.parseInt(String.valueOf(model.getValueAt(tblOrders.getSelectedRow(), 0)));\n \n loggedInCustomer.findLatestOrder().removeOrderLine(productId);\n \n model.removeRow(tblOrders.getSelectedRow());\n \n lblMessage.setText(\"Product Has Been Removed\");\n lblTotalCost.setText(\"£\" + String.format(\"%.02f\",loggedInCustomer.findLatestOrder().getOrderTotal()));\n }\n }", "public void removeRowAt(int row)\r\n throws IllegalStateException {\r\n if(!(Integer.parseInt(((Vector)data.elementAt(row)).elementAt\r\n (numberOfcolumns).toString()) == IS_INSERTED)){\r\n ( (Vector) data.elementAt(row)).\r\n setElementAt(new Integer(IS_DELETED), numberOfcolumns);\r\n dataDeleted.add((Vector)data.elementAt(row));\r\n }\r\n data.removeElementAt(row);\r\n this.deletedStatus = true;\r\n }", "private void removeFromModel(DefaultMutableTreeNode node, DefaultTreeModel model) {\n \t\tmodel.removeNodeFromParent(node);\n \t\tnodeTable.remove(node.getUserObject()); \n \t}", "void remove( ModelObject object );", "@Override\n public void removeFirstObjectInAdapter() {\n Log.d(\"LIST\", \"removed object!\");\n rowItem.remove(0);\n arrayAdapter.notifyDataSetChanged();\n }", "public void removeFromTable(Attribute object) {\n\t\tselectionModel.getSelectedSet().remove(object);\n\t\tIterator<Attribute> it = list.iterator();\n\t\twhile(it.hasNext()) {\n\t\t\tAttribute a = it.next();\n\t\t\tif (a.getId() == object.getId()){\n\t\t\t\tit.remove();\n\t\t\t}\n\t\t}\n\t\tdataProvider.flush();\n\t\tdataProvider.refresh();\n\t}", "private void rydStuderendeJTable() {\n tm = (DefaultTableModel)jTable1.getModel();\n\n // vi rydder alle rækker fra JTable's TableModel\n while (tm.getRowCount()>0) {\n tm.removeRow(0);\n }\n }", "public FeatureCollection removeRows(int[] rows){\n if (debug) logger.info(\"Removing multiple rows\");\n fcLastEdits.clear();\n for (int row : rows){\n Feature f = fc.get(row);\n fcLastEdits.add(f);\n }\n fc.removeAll(fcLastEdits);\n lastEditType = EDIT_REMOVE;\n fireTableDataChanged();//TODO: need to fire something else here to return removed feature to listeners?\n return fcLastEdits;\n }", "void remove(int row, int column) {\n SparseArrayCompat<TObj> array = mData.get(row);\n if (array != null) {\n array.remove(column);\n }\n }", "@Override\n public void clearRowsWithChanges() {\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.out.println(\"btnDelete\");\n\t\t\t\tint i = table.getSelectedRow();\n\t\t\t\tif (i >= 0) {\n\t\t\t\t\tSystem.out.println(\"row-Delete\" + i);\n\t\t\t\t\tSystem.out.println(\"row-Delete\" + textSuppD.getText());\n\t\t\t\t\tint suppID = Integer.parseInt(textSuppD.getText().trim());\n\n\t\t\t\t\tDatabase db = new Database();\n\t\t\t\t\tSuppliersDAO suppDAO = new SuppliersDAO(db);\n\t\t\t\t\tSuppliersModel suppModel = new SuppliersModel();\n\t\t\t\t\tsuppModel.setSuppliers_id(suppID);\n\t\t\t\t\tsuppDAO.Delete(suppModel);\n\t\t\t\t\tdb.commit();\n\t\t\t\t\tdb.close();\n\n\t\t\t\t\tmodel.removeRow(i);\n\t\t\t\t} else {\n\t\t\t\t}\n\t\t\t}", "void removeRowsLock();", "private void deleteSelectedRows() {\n int[] rows = constantsTable.getSelectedRows();\n constantsTable.clearSelection();\n currentCellEditor.cancelCellEditing();\n for (int i = rows.length - 1; i >= 0; i--) {\n if (rows[i] > -1) {\n getTableModel().removeRow(rows[i]);\n }\n }\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdelRow();\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdelRow();\n\t\t\t}", "public void deleteModelAt(int index) {\r\n if (index < models.size()) {\r\n models.removeElementAt(index);\r\n }\r\n }", "public void removeItem(T itemModel) {\n\t\tthis.removeItem(this.getItemIndex(itemModel));\n\t}", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void remove() {\n\n }", "void remove(PK id);", "public void removeFeature(Feature feature) {\n rows.removeElement(feature);\n }", "@Override\n\t\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\t\tint removeIndex = listpag.indexOf(rowb);\n\t\t\t\t\tlistpag.remove(removeIndex);\n\t\t\t\t\tgetView().getPaginaweb().removeRow(removeIndex + 1);\n\t\t\t\t}", "private static void removeAllElementsInContainer()\n {\n DefaultTableModel dm = (DefaultTableModel) JSoundsMainWindowViewController.table.getModel();\n for (int i = dm.getRowCount() - 1; i >= 0; i--) {\n dm.removeRow(i);\n } \n }", "public void remove() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.delete(this);\n\t\tsession.getTransaction().commit();\n\t}", "public TrajectoryTableRow removeByIndex(int index){\r\n\t\treturn this.data.remove(index);\r\n\t}", "public void eliminarTodosLosElementos(){\n\t\tlistModel.removeAllElements();\n\t}", "public void removeFromRowCounts(entity.LoadRowCount element);", "void removeRelationship(DbRelationship rel) {\n objectList.remove(rel);\n fireTableDataChanged();\n }", "int deleteByPrimaryKey(String EQP_MODEL_ID);", "public void clear() {\n\trows.removeAllElements();\n\tfireTableDataChanged();\n}", "public void remove(Record r) \n\t{\n\t\tfilled--; //reduce load factor\n\t\tif (r.placement != -1){ //if r's expected position isnt null\n\t\t\tRecord newRecord = new Record(\"deleted\"); //make a new record with value \"deleted\n\t\t\tnewRecord.placement = -2; //set position to -1 (as is standard for deleted\n\t\t\tTable[r.placement] = newRecord; //puts deleted slot in table\n\t\t}\t\n\t}", "@Override\n\tpublic void deletRow(HongXunWorkNum hongXunWorkNum) {\n\t\tgetHibernateTemplate().delete(hongXunWorkNum);\n\t}", "@Kroll.method\n\tpublic void deleteRow(Object rowObj, @Kroll.argument(optional = true) KrollDict animation)\n\t{\n\t\tif (rowObj instanceof Integer) {\n\t\t\tfinal int index = ((Integer) rowObj).intValue();\n\n\t\t\tdeleteRow(getRowByIndex(index), null);\n\t\t} else {\n\t\t\tfinal TableViewRowProxy row = processRow(rowObj);\n\n\t\t\tif (row == null) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfinal TiViewProxy parent = row.getParent();\n\n\t\t\tif (parent != null) {\n\t\t\t\tif (parent instanceof TableViewSectionProxy) {\n\t\t\t\t\tfinal TableViewSectionProxy section = (TableViewSectionProxy) parent;\n\n\t\t\t\t\t// Row is in section, modify section rows.\n\t\t\t\t\tsection.remove(row);\n\n\t\t\t\t\t// Notify TableView of update.\n\t\t\t\t\tupdate();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\t\tint removeIndex = listema.indexOf(rowb);\n\t\t\t\t\tlistema.remove(removeIndex);\n\t\t\t\t\tgetView().getEmail().removeRow(removeIndex + 1);\n\t\t\t\t}", "void removeUser(String user){\n for (int row = 0; row <= currentUsers.getRowCount()-1; row++){\n if (user.equals(currentUsers.getValueAt(row,0))){\n usersModel.removeRow(row);\n break;\n }\n }\n }", "public void delete(E model) {\n\t\tgetHibernateTemplate().delete(model);\r\n\t}", "public Builder removeRow(int index) {\n if (rowBuilder_ == null) {\n ensureRowIsMutable();\n row_.remove(index);\n onChanged();\n } else {\n rowBuilder_.remove(index);\n }\n return this;\n }", "public Builder removeRow(int index) {\n if (rowBuilder_ == null) {\n ensureRowIsMutable();\n row_.remove(index);\n onChanged();\n } else {\n rowBuilder_.remove(index);\n }\n return this;\n }", "public Builder removeRow(int index) {\n if (rowBuilder_ == null) {\n ensureRowIsMutable();\n row_.remove(index);\n onChanged();\n } else {\n rowBuilder_.remove(index);\n }\n return this;\n }", "public Builder removeRow(int index) {\n if (rowBuilder_ == null) {\n ensureRowIsMutable();\n row_.remove(index);\n onChanged();\n } else {\n rowBuilder_.remove(index);\n }\n return this;\n }", "public Builder removeRow(int index) {\n if (rowBuilder_ == null) {\n ensureRowIsMutable();\n row_.remove(index);\n onChanged();\n } else {\n rowBuilder_.remove(index);\n }\n return this;\n }", "public Builder removeRow(int index) {\n if (rowBuilder_ == null) {\n ensureRowIsMutable();\n row_.remove(index);\n onChanged();\n } else {\n rowBuilder_.remove(index);\n }\n return this;\n }", "public void removeOldRecords();", "void deleteModelElement(EObject modelElement);", "@Override\n\t\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\t\tint removeIndex = listtel.indexOf(rowb);\n\t\t\t\t\tlisttel.remove(removeIndex);\n\t\t\t\t\tgetView().getTelefono().removeRow(removeIndex + 1);\n\t\t\t\t}", "private void toDelete() {\n if(toCount()==0)\n {\n JOptionPane.showMessageDialog(rootPane,\"No paint detail has been currently added\");\n }\n else\n {\n String[] choices={\"Delete First Row\",\"Delete Last Row\",\"Delete With Index\"};\n int option=JOptionPane.showOptionDialog(rootPane, \"How would you like to delete data?\", \"Delete Data\", WIDTH, HEIGHT,null , choices, NORMAL);\n if(option==0)\n {\n jtModel.removeRow(toCount()-toCount());\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted first row\");\n }\n else if(option==1)\n {\n jtModel.removeRow(toCount()-1);\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted last row\");\n }\n else if(option==2)\n {\n toDeletIndex();\n }\n else\n {\n \n }\n }\n }", "private void delete(int selectedRow) {\r\n removing = true;\r\n deletingRow = selectedRow;\r\n //subAwardBudgetTableModel.deleteRow(selectedRow);\r\n deleteRow(selectedRow);\r\n \r\n //Select a Row\r\n int selectRow = 0;\r\n int rowCount = subAwardBudgetTableModel.getRowCount();\r\n if(selectedRow == 0 && rowCount > 0) {\r\n //Select First Row\r\n selectRow = 0;\r\n }else if(selectedRow == rowCount) {\r\n //Select Last Row\r\n selectRow = rowCount - 1;\r\n }else {\r\n //Select This Row\r\n selectRow = selectedRow;\r\n }\r\n removing = false;\r\n if(selectRow != -1) {\r\n subAwardBudget.tblSubAwardBudget.setRowSelectionInterval(selectRow, selectRow);\r\n }else{\r\n //If All rows Deleted, then Details panel should be cleared\r\n displayDetails();\r\n }\r\n deletingRow = -1;\r\n }", "@Override\n public void remove() {\n }", "private void remove() {\n disableButtons();\n clientgui.getClient().sendDeleteEntity(cen);\n cen = Entity.NONE;\n }", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "public void removeItem(int id);", "@Override\n public void remove() {\n }", "public void deleteRow(int row) throws IndexOutOfBoundsException{\r\n data.remove(row);\r\n fireTableRowsDeleted(row,row);\r\n }", "public void removeModel(SimpleModel model) {\n removeModel(model.getFullName());\n }", "@FXML\n private void deleteRow(ActionEvent event){\n if(facilitiesView.getSelectionModel().getSelectedItem()==null){\n errorBox(\"Feil\", \"Det er ingen rader som er markert\", \"Vennligst marker en rad i tabellen\");\n }\n else{\n Alert mb = new Alert(Alert.AlertType.CONFIRMATION);\n mb.setTitle(\"Bekreft\");\n mb.setHeaderText(\"Du har trykket slett på \"+ facilitiesView.getSelectionModel().getSelectedItem().getFacilityName());\n mb.setContentText(\"Ønsker du virkerlig å slette dette lokalet?\");\n mb.showAndWait().ifPresent(response -> {\n if(response== ButtonType.OK){\n observableList.remove(facilitiesView.getSelectionModel().getSelectedItem());\n\n File file = new File(EditedFiles.getActiveFacilityFile());\n file.delete();\n try {\n WriterThreadRunner.WriterThreadRunner(getFacilities(), EditedFiles.getActiveFacilityFile());\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n }\n });\n }\n }", "void eliminar(PK id);", "@Override\n\tpublic int deleteByPrimaryKey(String modelid) {\n\t\treturn equipmentSetvalMapper.deleteByPrimaryKey(modelid);\n\t}", "@Override\n\t\t\t\tpublic void remove() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "public void remove(int index) {\n \tmData.remove(index);\n notifyDataSetChanged();\n }", "public void remove() {\r\n //\r\n }", "@Override\n\tpublic boolean delete(Patient model) {\n\t\treturn false;\n\t}", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }" ]
[ "0.71747833", "0.6910679", "0.68739134", "0.68437433", "0.6794703", "0.6785206", "0.67317927", "0.6693414", "0.6688276", "0.66574764", "0.66291535", "0.662459", "0.65979445", "0.65544486", "0.65534997", "0.65244466", "0.6522041", "0.6508776", "0.6505805", "0.6503614", "0.64712507", "0.6449397", "0.64479303", "0.6447761", "0.64362633", "0.64170796", "0.6390561", "0.6369489", "0.6352834", "0.63446295", "0.6344144", "0.63432527", "0.63307625", "0.62989044", "0.6295562", "0.6255489", "0.6254915", "0.62464136", "0.62304187", "0.6225088", "0.6216012", "0.62130344", "0.62005985", "0.618029", "0.618029", "0.6156787", "0.6145185", "0.61305445", "0.61305445", "0.61305445", "0.61305445", "0.61305445", "0.6130308", "0.61279243", "0.61144704", "0.61064166", "0.61055094", "0.60815775", "0.6075652", "0.60670865", "0.60631293", "0.60577446", "0.60411215", "0.6021947", "0.6013182", "0.6012991", "0.60037917", "0.6000331", "0.5999681", "0.59988683", "0.5998232", "0.5998232", "0.5998232", "0.5998232", "0.5998232", "0.5998232", "0.5987636", "0.5980152", "0.5979966", "0.5972361", "0.5965614", "0.5961398", "0.5959006", "0.59459585", "0.59459585", "0.5939488", "0.59348494", "0.5932361", "0.5932306", "0.59312606", "0.5929882", "0.59288657", "0.5927409", "0.59162045", "0.59162045", "0.5910755", "0.5899069", "0.5892639", "0.5883641", "0.5883641" ]
0.6773077
6
/ Exercise 1: implement Constructor
@Override public List<String> getIngredients() { return ingredients; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Constructor(){\n\t\t\n\t}", "ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "public Student() {\n//\t\tname = \"\";\n//\t\tage = 0;\n\t\t\n\t\t\n\t\t//call constructors inside of other constructors\n\t\tthis(999,0);\n\t}", "@Test\n public void constructorTest() {\n // Given (cat data)\n String givenName = \"Zula\";\n Date givenBirthDate = new Date();\n Integer givenId = 0;\n\n // When (a cat is constructed)\n Cat cat = new Cat(givenName, givenBirthDate, givenId);\n\n // When (we retrieve data from the cat)\n String retrievedName = cat.getName();\n Date retrievedBirthDate = cat.getBirthDate();\n Integer retrievedId = cat.getId();\n\n // Then (we expect the given data, to match the retrieved data)\n Assert.assertEquals(givenName, retrievedName);\n Assert.assertEquals(givenBirthDate, retrievedBirthDate);\n Assert.assertEquals(givenId, retrievedId);\n }", "@Test\n public void constructorTest() {\n // Given (cat data)\n String givenName = \"Zula\";\n Date givenBirthDate = new Date();\n Integer givenId = 0;\n\n // When (a cat is constructed)\n Cat cat = new Cat(givenName, givenBirthDate, givenId);\n\n // When (we retrieve data from the cat)\n String retrievedName = cat.getName();\n Date retrievedBirthDate = cat.getBirthDate();\n Integer retrievedId = cat.getId();\n\n // Then (we expect the given data, to match the retrieved data)\n Assert.assertEquals(givenName, retrievedName);\n Assert.assertEquals(givenBirthDate, retrievedBirthDate);\n Assert.assertEquals(givenId, retrievedId);\n }", "public LearnConstructor(int age,String name,String address){\n this.age=age;\n this.address=address;\n this.name=name;\n System.out.println(this.name+\" \"+this.address+\" \"+this.age);\n }", "public Professor()\n\t{\n\t\t//stuff\n\t}", "public ConstructorsDemo() \n\t {\n\t x = 5; // Set the initial value for the class attribute x\n\t }", "private void __sep__Constructors__() {}", "@Test\n public void constructor(){\n /**Positive tests*/\n Road road = new Road(cityA, cityB, 4);\n assertEquals(road.getFrom(), cityA);\n assertEquals(road.getTo(), cityB);\n assertEquals(road.getLength(), 4);\n }", "public CyanSus() {\n\n }", "public Hacker() {\r\n \r\n }", "public Card() { this(12, 3); }", "ConstuctorOverloading(){\n\t\tSystem.out.println(\"I am non=argument constructor\");\n\t}", "protected abstract void construct();", "public Candy() {\n\t\tthis(\"\");\n\t}", "public Employee()\n\t{\n\t\tthis(\"(2)Invoke Employee's overload constructor\");\n\t\tSystem.out.println(\"(3)Employee's no-arg constructor is invoked\");\n\t}", "public Student(){}", "public Student()\n {\n lname = \"Tantiviramanond\";\n fname = \"Anchalee\";\n grade = 12;\n studentNumber = 2185;\n }", "Constructor(int i,String n ,int x){ //taking three parameters which shows that it is constructor overloaded\r\n\t\t id = i; \r\n\t\t name = n; \r\n\t\t marks =x; \r\n\t\t }", "void DefaultConstructor(){}", "public void testConstructor1() {\n XIntervalDataItem item1 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);\n }", "student(){\r\n \r\n //constructor\r\n //always same as class name\r\n //we can also have code here\r\n //this will be the first method to be intialised\r\n //can never return a value\r\n number++;// default initialisation\r\n }", "@Test\r\n\tpublic void test001_RegularConstructor() {\r\n\t\tCustomer c = new Customer( cEric_id, cEric_name, cEric_contact );\r\n\t\tassertNotNull( c.getId() );\t\t\t\t\t// assert that id is not null\r\n\t\tassertEquals( c.getId(), cEric_id );\t\t// assert that cEric_id is returned\r\n\t\tassertSame( c.getId(), cEric_id );\t\t\t// assert that same (\"==\") id is returned\r\n\t\tassertEquals( c.getFirstName(), \"\" );\t\t// \"name\" is assigned to lastName, firstName: \"\"\r\n\t\tassertEquals( c.getLastName(), \"Eric Schulz-Mueller\" );\r\n\t\tassertEquals( c.getLastName(), cEric_name );\t// better to use constant;\r\n\t\tassertEquals( c.getContact(), cEric_contact );\r\n\t}", "public Student(Person person) {\r\n\t\tsuper(person);\r\n\t}", "public Chauffeur() {\r\n\t}", "public ChaCha()\n\t{\n\t\tsuper();\n\t}", "public TennisCoach () {\n\t\tSystem.out.println(\">> inside default constructor.\");\n\t}", "public Bicycle() {\n // You can also call another constructor:\n // this(1, 50, 5, \"Bontrager\");\n System.out.println(\"Bicycle.Bicycle- no arguments\");\n gear = 1;\n cadence = 50;\n speed = 5;\n name = \"Bontrager\";\n }", "public Clade() {}", "public void testConstructor() {\n Measurement a = new Measurement();\n assertTrue(a.getFeet() == 0);\n assertTrue(a.getInches() == 0);\n \n Measurement b = new Measurement(5);\n assertTrue(b.getFeet() == 5);\n assertTrue(b.getInches() == 0);\n \n Measurement c = new Measurement(4, 3);\n assertTrue(c.getFeet() == 4);\n assertTrue(c.getInches() == 3);\n }", "public Demo3() {}", "public Employee(){\r\n this(\"\", \"\", \"\", 0, \"\", 0.0);\r\n }", "public static void main(String[] args) {\n\t\tthisconstructor rv = new thisconstructor();\n\t\n\t\n\t}", "private Solution() { }", "private Solution() { }", "public void testConstructor() {\n String name = \"moo\";\n String version = \"1.5\";\n\n Agent agent = new Agent(name, version);\n\n assertEquals(agent.getName(), name, \"Unexpected agent name.\");\n assertEquals(agent.getVersion(), version, \"Unexpected agent version.\");\n assertEquals(agent.toString(), name + \"/\" + version, \"Unexpected agent display representation.\");\n }", "public Person1() {\n\t\tsuper();\n\t}", "public Student(String in_name, double in_gpa)\n {\n name = in_name;\n gpa = in_gpa;\n getQuizzes();\n }", "public Naive() {\n\n }", "public Person() {\n\t\t\n\t}", "public static void testConstructors() {\n\t\t\n\t\tSystem.out.println(\"| Testing constructors: \");\n\t\tCustomer greg;\n\t\tAirlineTicket ticketGreg;\n\t\tFlight flightBahamas;\n\n\t\tgreg = new Customer(\"Greg Miller\", \"127 Leeds St, Halifax\", 123456);\n\t\tflightBahamas = new Flight(101, \"Ottawa\", \"Calgary\", \"03/02/99 7:50 pm\");\n\t\tticketGreg = new AirlineTicket(greg, flightBahamas, 747.00);\n\n\t\t// apply points from ticket\n\t\tSystem.out.println(\"| Applying points:\");\n\t\tgreg.applyPoints(ticketGreg);\n\t\t\n\t\t// uses overridden toString methods\n\t\tprintObjects(greg, ticketGreg, flightBahamas);\n\t\t\n\t}", "public student1(int r)\n {\n this();//calling default constructor\n System.out.println(\"rno = \" + r);\n }", "public static void constructor1_name_initialize()\r\n\t{\r\n\t\tString name = \"Dennis\";\r\n\t\tString college = \"Red River College\";\r\n\t\tdouble standardAptitudeTestScore = 222;\r\n\t\tdouble gradePointAverage = 2.2;\r\n\r\n\t\tUndergraduateApplicant target = new UndergraduateApplicant(name, college, standardAptitudeTestScore, gradePointAverage);\r\n\r\n\t\tString expected = name;\r\n\t\tString actual = target.getName();\r\n\r\n\t\tSystem.out.printf(\"Expected: %s%nActual: %s%n%n\", expected, actual);\r\n\t}", "public Sad() {\n }", "public Contructor(int year, String name) {\n // constructor name must match class name and cannot have return type\n // all classes have constructor by default\n // f you do not create a class constructor yourself, Java creates one for you.\n // However, then you are not able to set initial values for object attributes.\n // constructor can also take parameters\n batchYear = year;\n studentName = name;\n }", "public MyPractice()\n\t{\n\t\t//Unless we specify values all data members\n\t\t//are a zero, false, or null\n\t}", "defaultConstructor(){}", "public Student()\r\n {\r\n //This is intended to be empty\r\n }", "public LearnConstrouctor(){\n System.out.println(\" hello\");\n }", "@Test\n public void goalCustomConstructor_isCorrect() throws Exception {\n\n int goalId = 11;\n int userId = 1152;\n String name = \"Test Name\";\n int timePeriod = 1;\n int unit = 2;\n double amount = 1000.52;\n\n\n //Create goal\n Goal goal = new Goal(goalId, userId, name, timePeriod, unit, amount);\n\n // Verify Values\n assertEquals(goalId, goal.getGoalId());\n assertEquals(userId, goal.getUserId());\n assertEquals(name, goal.getGoalName());\n assertEquals(timePeriod, goal.getTimePeriod());\n assertEquals(unit, goal.getUnit());\n assertEquals(amount, goal.getAmount(),0);\n }", "Employees() { \r\n\t\t this(100,\"Hari\",\"TestLeaf\");\r\n\t\t System.out.println(\"default Constructor\"); \r\n\t }", "public Dice() { \n this(6); /* Invoke the above Dice constructor with value 6. */ \n }", "public BookRecord(String NameOfTheBook, String NameofWriter, int isbnNumber, double booksCost) \r\n\r\n{ \r\n\r\nthis.NameOfTheBook = NameOfTheBook; \r\n\r\nthis.NameofWriter = NameofWriter; \r\n\r\nthis.isbnNumber = isbnNumber; \r\n\r\nthis.booksCost = booksCost; \r\n\r\n}", "Reproducible newInstance();", "private Solution() {\n //constructor\n }", "public Pitonyak_09_02() {\r\n }", "public Chapter() {\n }", "@Test\n public void constructorTest(){\n String retrievedName = doggy.getName();\n Date retrievedBirthDate = doggy.getBirthDate();\n Integer retrievedId = doggy.getId();\n\n // Then (we expect the given data, to match the retrieved data)\n Assert.assertEquals(givenName, retrievedName);\n Assert.assertEquals(givenBirthDate, retrievedBirthDate);\n Assert.assertEquals(givenId, retrievedId);\n }", "Student4(int i, String n, int t) {\n id = i;\n name = n;\n age = t;\n\n }", "public Student() {\r\n }", "@Test\r\n public void testBadConstructor() {\r\n try {\r\n SnakeSquare instance = new SnakeSquare(33,44);\r\n fail();\r\n } catch (IllegalArgumentException e) { }\r\n }", "public Book() {\n this.bookName = \"Five Point Someone\";\n this.bookAuthorName = \"Chetan Bhagat\";\n this.bookIsbnNumber = \"9788129104595\";\n\n }", "public Chick() {\n\t}", "public Snippet visit(ConstructorDeclaration n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t Snippet f1 = n.identifier.accept(this, argu);\n\t tPlasmaCode=\"\";\n\t\t\tString constructorName = f1.expType.getTypeName();\n\t\t\tmemberSig = new MethodSignature();\n\t\t\tmemberSig.methodName = constructorName;\n\n\t\t\ttempCounter = tempZero;\n\n\t n.nodeToken1.accept(this, argu);\n\t blockId = 1;\n\t\t\tcurrentBlock = 1;\n\t\t\tSnippet f3 = n.nodeOptional.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t blockId = 0;\n\t\t\tcurrentBlock = 0;\n\n\t\t\tcurrentMethod = currentClass.constructors.get(memberSig.getCompleteMethodSignature());\n\t\t\t\n\t\t\tmemberSig = null;\n\n\t\t\t\n\t\t\tString tempFormalParamList = \"\";\n\t\t\tif(f3!=null){\n\t\t\t\ttempFormalParamList += f3.returnTemp+\",\";\n\t\t\t}\n\t\t\t//f5 is added in tPlasmaCode\n\t\t\t_ret.returnTemp = generateTabs(0)+\"public \"+constructorName+\" ( \"+tempFormalParamList+\" int myUniquePlacePoint)\\n\";//+f5.returnTemp;\n\t\t\t\n\t\t\ttPlasmaCode += _ret.returnTemp;\n\t\t\tinConstructor = true;\n\t\t\t\n\t n.block.accept(this, argu);\n\t \tinConstructor = false;\n\t currentClassBody.constructors += tPlasmaCode;\n\t\t\ttPlasmaCode=\"\";\n\t return _ret;\n\t }", "ConstuctorOverloading(int num){\n\t\tSystem.out.println(\"I am contructor with 1 parameter\");\n\t}", "private TypicalPersons() {}", "private TypicalPersons() {}", "public Orbiter() {\n }", "public void testConstructor() throws Exception {\n\t\tStringWriter source = new StringWriter();\n\t\tthis.compiler.writeConstructor(source, \"Simple\", this.compiler.createField(String.class, \"field\"),\n\t\t\t\tthis.compiler.createField(int.class, \"value\"), this.compiler.createField(boolean[].class, \"flags\"));\n\t\tStringWriter expected = new StringWriter();\n\t\texpected.append(\" private java.lang.String field;\\n\");\n\t\texpected.append(\" private int value;\\n\");\n\t\texpected.append(\" private boolean[] flags;\\n\");\n\t\texpected.append(\" public Simple(java.lang.String field, int value, boolean[] flags) {\\n\");\n\t\texpected.append(\" this.field = field;\\n\");\n\t\texpected.append(\" this.value = value;\\n\");\n\t\texpected.append(\" this.flags = flags;\\n\");\n\t\texpected.append(\" }\\n\");\n\t\tassertEquals(\"Incorrect constructor\", expected.toString(), source.toString());\n\t}", "public Employee() {\r\n\t\t// super should be 1st line \r\n\t\tsuper();\r\n\t\tSystem.out.println(\"Hi i'm from constructor \");\r\n\t}", "AbsDemo1()\r\n\t\t{\r\n\t\t\tSystem.out.println(\"cons of AbsDemo1\");\r\n\t\t}", "@Test\r\n\tpublic void constructorDeclarationTest(){\r\n\t\tint[] pointsToTest = {2,7,9,16,17,18,19,20};\r\n\t\tfor(int i=0;i<pointsToTest.length;i++)\r\n\t\t{\r\n\t\t\tassertEquals(pointsToTest[i],new PointGrade(pointsToTest[i]).getPoints());\r\n\t\t}\r\n\t}", "public Main() {\r\n\t}", "public Book() {\n\t\t// Default constructor\n\t}", "public Person(String name, String address, String postalCode, String city, String phone){\n // initialise instance variables\n this.name = name;\n this.address = address;\n this.postalCode = postalCode;\n this.city = city;\n this.phone = phone;\n }", "public Student(Integer age) {\n\n this.age = age;\n }", "public Spec__1() {\n }", "public Chant(){}", "@Test\n public void incomeCustomConstructor_isCorrect() throws Exception {\n\n int incomeId = 100;\n int userId = 502;\n int accountId = 300;\n String incomeName = \"test income name\";\n double amount = 520.35;\n String date = \"02/02/2091\";\n String payPeriod = \"Monthly\";\n int hours = 1;\n\n //Create empty Income\n Income income = new Income(incomeId,userId,accountId,incomeName,amount,date,payPeriod,hours);\n\n // Verify Values\n assertEquals(incomeId, income.getIncomeId());\n assertEquals(userId, income.getUserId());\n assertEquals(accountId, income.getAccountId());\n assertEquals(incomeName, income.getIncomeName());\n assertEquals(amount, income.getAmount(), 0);\n assertEquals(date, income.getDate());\n assertEquals(payPeriod, income.getPayPeriod());\n assertEquals(hours, income.getHours(), 0);\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tStudentConstructor S=new StudentConstructor(101,\"ABC\");\r\n\t}", "public Book() {}", "@Test\n\tpublic void testProfessorConstructor2params(){\n\t\tString firstname = \"Steven\";\n\t\tString lastName = \"Beaty\";\n\t\tProfessor testProfessor = new Professor(firstname, lastName);\n\t\tAssert.assertEquals(\"Steven\", testProfessor.getFirstName());\n\t\tAssert.assertEquals(\"Beaty\", testProfessor.getLastName());\n\t}", "public Student(int num) {\n//\t\tstuNum = num;\n//\t\tgpa = 0.0;\n\t\tthis(num, 0.0);\n\t}", "public MethodEx2() {\n \n }", "public Main() {\r\n }", "public Main() {\r\n }", "@Test\n\tpublic void testProfessorConstructor3Params(){\n\t\tString firstname = \"Dennis\";\n\t\tString lastName = \"Ritchie\";\n\t\tlong id = 0451;\n\t\tProfessor testProfessor = new Professor(firstname, lastName, id);\n\t\tAssert.assertEquals(\"Dennis\", testProfessor.getFirstName());\n\t\tAssert.assertEquals(\"Ritchie\", testProfessor.getLastName());\n\t\tAssert.assertEquals(Long.valueOf(0451), testProfessor.getId());\n\t}", "Student4(int i, String n) {\n id = i;\n name = n;\n\n }", "public Student() {\n \n }", "public Question(String firstPrompt) {\r\n this(); //Calling method (defualt constuctor) that takes no parameters\r\n this.firstPrompt = firstPrompt;\r\n //or public Question(String p) and firstPrompt = p\r\n }", "public Student (String first, String last)\n {\n firstName = first;\n lastName = last;\n testScore1 = 0;\n testScore2 = 0;\n testScore3 = 0;\n }", "@Before\r\n\tpublic void constructObj (){\r\n\t\tproteinSeq = new ProteinSequence(new char[]{'A','A','T','G','C','C','A','G','T','C','A','G','C','A','T','A','G','C','G'});\r\n\t}", "@Test\n\tpublic void testCtor() {\n\t\tSnacksHot nachos = new SnacksHot(\"Chips\", 3, \"100gr\", \"img/icons/box.png\");\n\t\ttry {\n\t\t\tSnacksHot k = new SnacksHot(\"Chips\", 3, \"100gr\", \"img/icons/box.png\");\n\t\t\tassertNotEquals(null, k);\n\t\t\tassertEquals(\"object should be created with valid Nachos\", nachos, k.getName());\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tfail(\"died calling ctor\");\n\t\t}\n\t}", "DefaultConstructor(int a){}", "@Test\r\n\tpublic void test002_EmptyArgumentConstructor() {\r\n\t\tCustomer c = new Customer( \"\", \"\", \"\" );\r\n\t\tassertEquals( c.getId(), \"\" );\r\n\t\tassertEquals( c.getFirstName(), \"\" );\r\n\t\tassertEquals( c.getLastName(), \"\" );\r\n\t\tassertEquals( c.getContact(), \"\" );\r\n\t}", "public StudentDemo(){\r\n \r\n \r\n \r\n }", "public Individual()\r\n\t{\r\n\t}", "Classroom() {}", "public Student() {\r\n\t\timePrezime = \"Petar Petrovic\";\r\n\t\tfakultet = \"Matematicki\";\r\n\t\tgodina = 1;\r\n\t}" ]
[ "0.7023973", "0.6750279", "0.67439324", "0.66217566", "0.66190034", "0.66190034", "0.65535647", "0.6523366", "0.6507744", "0.6484956", "0.64132625", "0.6392948", "0.6391902", "0.6350868", "0.63322353", "0.63319916", "0.6328856", "0.6324167", "0.63234043", "0.629051", "0.6278773", "0.62534547", "0.6252485", "0.62279063", "0.62244654", "0.62218744", "0.6220746", "0.6204804", "0.6198852", "0.61842173", "0.61840445", "0.61836845", "0.61757874", "0.6167069", "0.6165498", "0.6152606", "0.6152606", "0.61465126", "0.6132808", "0.61325634", "0.6131969", "0.61276877", "0.612474", "0.61204344", "0.6118453", "0.61163026", "0.6109993", "0.6103446", "0.60972095", "0.6095475", "0.6091449", "0.60871667", "0.6083969", "0.60838175", "0.6082499", "0.6076411", "0.60713106", "0.6070515", "0.6067785", "0.6067298", "0.60527897", "0.60496455", "0.60493124", "0.6041646", "0.6039487", "0.6037422", "0.60320306", "0.60266876", "0.60266876", "0.6026318", "0.6025073", "0.6024072", "0.60203266", "0.6018732", "0.601401", "0.6012897", "0.60097003", "0.6007223", "0.60029006", "0.60023713", "0.6001563", "0.5998671", "0.5998148", "0.59942895", "0.59926254", "0.5990739", "0.5990476", "0.5990476", "0.59896606", "0.5988846", "0.5986018", "0.59853", "0.5983891", "0.5983757", "0.5973096", "0.5971801", "0.5967766", "0.59630346", "0.5960185", "0.596016", "0.59540194" ]
0.0
-1
TODO Autogenerated method stub
public Integer getBanana() { 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
TODO Autogenerated method stub
public Integer getApple() { 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
Reset the objects for a new round
@Override public void newGame() { round = 0; newRound(); gameOverSoundPlayed = false; // Reset player scores for (Player player : players) { setPlayerScore(player, 0); } // Reset all button press counters for (IButton button : buttons) { button.resetPressCounter(); } // Start the game timer deltaTimeAlive = getPhysicsTickMillis(); deltaTimeDead = deltaTimeAlive / 4; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void reset() {\n\tthis.pinguins = new ArrayList<>();\n\tthis.pinguinCourant = null;\n\tthis.pret = false;\n\tthis.scoreGlacons = 0;\n\tthis.scorePoissons = 0;\n }", "private void reset() {\n darkSquare.reset();\n lightSquare.reset();\n background.reset();\n border.reset();\n showCoordinates.setSelected(resetCoordinates);\n pieceFont.reset();\n }", "public void reset() {\n\t\tAssets.playSound(\"tweet\");\n\t\tscore = respawnTimer = spawnCount= 0;\n\t\t\n\t\twalls = new ArrayList<Wall>();\n\t\tcheckPoints = new ArrayList<Wall>();\n\t\tground = new ArrayList<Ground>();\n\n\t\tGround g;\n\t\tPoint[] points = new Point[21];\n\t\tfor (int i = 0; i < 21; i++) {\n\t\t\tpoints[i] = new Point(i * 32, 448);\n\t\t}\n\t\tfor (int j = 0; j < points.length; j++) {\n\t\t\tg = new Ground();\n\t\t\tg.setBounds(new Rectangle(points[j].x, 448, 32, 32));\n\t\t\tground.add(g);\n\t\t}\n\n\t\tsky = new Background(-0.2);\n\t\tsky.setImage(Assets.sprite_sky);\n\t\t\n\t\tmountains = new Background(-0.4);\n\t\tmountains.setImage(Assets.sprite_mountains);\n\t\t\n\t\ttrees = new Background(-1.4);\n\t\ttrees.setImage(Assets.sprite_trees);\n\n\t\tstarted = false;\n\t\tplayer.reset();\n\n\t}", "public void resetRenderer() {\n\n\t\tanimationComplete = true;\n\t\tif (pieceMove != null) {\n\t\t\tpieceMove.setPiece(null);\n\t\t\tpieceMove.setSquares(-99);\n\t\t}\n\t\tpieceMove = null;\n\t\tmoveFinalIndex = -999;\n\t\tmoveTempIndex = -999;\n\t\tmoveCount = -999;\n\t\tmoveCountHomeSq = 0;\n\t\trestMovedToStart = false;\n\t\tmovedToRest = false;\n\t\thomeSqMovedToHome = false;\n\n\t\tmoveToRestSq = null;\n\t\tmoveToHome = null;\n\n\t\tdiceList = new ArrayList<>();\n\t\tfor (int d = 0; d < selectedPlayer.getRuleEngine().dicePerGame(); d++) {\n\t\t\tDice newDice = createDiceInstance();\n\t\t\tnewDice.setShake(true);\n\t\t\tdiceList.add(newDice);\n\t\t}\n\n\t}", "public void setUpNewRound(){\n int newRound = getRoundNum() + 1;\n getRound().getPlayer(0).clearPiles();\n getRound().getPlayer(1).clearPiles();\n mRound = new Round(players);\n setRoundNum(newRound);\n mRound.beginRound();\n }", "public void reset()\n\t{\n\t\tassociations = new Vector<Association>();\n\t\tif(hotspots != null)\n\t\t{\n\t\t\tfor(int i=0; i < hotspots.size(); i++)\n\t\t\t{\n\t\t\t\thotspots.elementAt(i).bound = null;\n\t\t\t\thotspots.elementAt(i).setHighlighted(false);\n\t\t\t}\n\t\t}\n\n\t\tif(movableObjects != null)\n\t\t{\n\t\t\tfor(int i=0; i < movableObjects.size(); i++)\n\t\t\t{\n\t\t\t\tmovableObjects.elementAt(i).resetPos();\n\t\t\t\tmovableObjects.elementAt(i).bound = null;\n\t\t\t}\n\t\t}\n\t\tuser_responses=0;\n\t\tmov = null;\n\t\tstart = null;\n\t\tmpos = null;\n\t\tsetFeedback();\n\t\trepaint();\n\t}", "protected void reset() {\n\t\tpush();\n\n\t\t// Clearen, en niet opnieuw aanmaken, om referenties elders\n\t\t// in het programma niet corrupt te maken !\n\t\tcurves.clear();\n\t\tselectedCurves.clear();\n\t\thooveredCurves.clear();\n\t\tselectedPoints.clear();\n\t\thooveredPoints.clear();\n\t\tselectionTool.clear();\n\t}", "public void reset() {\n\t\tpos.tijd = 0;\r\n\t\tpos.xposbal = xposstruct;\r\n\t\tpos.yposbal = yposstruct;\r\n\t\tpos.hoek = Math.PI/2;\r\n\t\tpos.start = 0;\r\n\t\topgespannen = 0;\r\n\t\tpos.snelh = 0.2;\r\n\t\tbooghoek = 0;\r\n\t\tpos.geraakt = 0;\r\n\t\tgeraakt = 0;\r\n\t\t\r\n\t}", "protected void reset() {\r\n super.reset();\r\n this.ring = null;\r\n }", "@Override\n public void reset() {\n this.posx = 0;\n this.posy = 0;\n this.rad = 0;\n this.property = new Property();\n this.property.setColor(new Color(Color.BLUE));\n }", "public void reset(){\n\n boxPositions = new HashMap<>();\n boxWeights = new ArrayList<Stack<Box>>();\n for(int i = 0; i < 16; i++) {\n boxPositions.put(i*40, i);\n }\n for ( int i = 0; i < 16; i++){\n boxWeights.add( new Stack< Box >());\n }\n boxGen = new BoxGenerator();\n\n timeCounter = 100;\n mc.resetLazarusPosition();\n\n }", "@Override\r\n\tpublic void resetObject() {\n\t\t\r\n\t}", "public void reset() {\r\n\t\tfor (int i = 0; i < trees.length; i++)\r\n\t\t\ttrees[i] = new GameTree(i);\r\n\t\tprepare();\r\n\t}", "private void resetRoundVars() {\n\t\tmAttackerDelay = 0;\n\t\tmRoundTimeElapsed = 0;\n\t\tmRoundScore = 0f;\n\t\tmKnightSpawnChance = 0.35f + (0.1f * (mRoundNumber - 1)); // +10% chance per round, starting at 35%\n\t\tif(mKnightSpawnChance > 0.65f) mKnightSpawnChance = 0.65f; // Hard cap at 65%\n\t\tmRoundMaxAttackers = 5 + mRoundNumber * 2;\n\t\tmRoundMaxTime = 50 + (mRoundNumber * 1.5f);\n\t\tmRoundSaved = false;\n\t\tmRoundText = \"Round: \" + mRoundNumber;\n\t\tmSpawnTimeMin = mSpawnTimeMin - (mRoundNumber * 5);\n\t\tmSpawnTimeMax = mSpawnTimeMax - (mRoundNumber * 5);\n\n\t\t// Kill all living attackers\n\t\tfor(int i = 0; i < ATTACKER_ARRAY_SIZE; i++) {\n\t\t\tmAttackers[i].kill();\n\t\t}\n\t}", "public void reset() {\n\t\tsetVisible(false);\n\t\tfor (GameObject gameObject : objects) {\n\t\t\tgameObject.reset();\n\t\t}\n\t}", "public void resetObjects() {\n if (wind1.isOffScreen()) {\n wind1.reset(wind3.getBoundingRectangle().y - buffer - rand.nextInt(AssetHandler.SCREEN_HEIGHT / 4));\n }\n if (wind2.isOffScreen()) {\n wind2.reset(wind1.getBoundingRectangle().y - buffer - rand.nextInt(AssetHandler.SCREEN_HEIGHT / 4));\n }\n if (wind3.isOffScreen()) {\n wind3.reset(wind2.getBoundingRectangle().y - buffer - rand.nextInt(AssetHandler.SCREEN_HEIGHT / 4));\n }\n\n //Again, check if the clouds go off the screen and then reset them.\n cloudBuffer = rand.nextInt(AssetHandler.SCREEN_HEIGHT / 4) + AssetHandler.SCREEN_HEIGHT / 4;\n if (cloud1.isOffScreen()) {\n cloud1.reset(cloud4.y - cloudBuffer);\n }\n if (cloud2.isOffScreen()) {\n cloud2.reset(cloud1.y - cloudBuffer);\n }\n if (cloud3.isOffScreen()) {\n cloud3.reset(cloud2.y - cloudBuffer);\n }\n if (cloud4.isOffScreen()) {\n cloud4.reset(cloud3.y - cloudBuffer);\n }\n\n //Check if birds (drones) go above the screen and reset them\n birdBuffer = rand.nextInt(AssetHandler.SCREEN_HEIGHT / 2 + AssetHandler.SCREEN_HEIGHT / 3) + AssetHandler.SCREEN_HEIGHT / 2;\n if (drone1.isOffScreen()) {\n drone1.reset(drone2.y - birdBuffer);\n }\n birdBuffer = rand.nextInt(AssetHandler.SCREEN_HEIGHT / 2 + AssetHandler.SCREEN_HEIGHT / 3) + AssetHandler.SCREEN_HEIGHT / 2;\n if (drone2.isOffScreen()) {\n drone2.reset(drone1.y - birdBuffer);\n }\n\n }", "public void reset() {\n\t\trabbitcount[1]=8;\n\t\trabbitcount[2]=8;\n\t\tpieces.clear();\n\t\tselectedsquares.clear();\n\t\trepaint();\n\t}", "public final synchronized void reset() {\n\t\tnumTypes = numCoords = 0;\n\t}", "public void reset() {\n\n\t\tazDiff = 0.0;\n\t\taltDiff = 0.0;\n\t\trotDiff = 0.0;\n\n\t\tazMax = 0.0;\n\t\taltMax = 0.0;\n\t\trotMax = 0.0;\n\n\t\tazInt = 0.0;\n\t\taltInt = 0.0;\n\t\trotInt = 0.0;\n\n\t\tazSqInt = 0.0;\n\t\taltSqInt = 0.0;\n\t\trotSqInt = 0.0;\n\n\t\tazSum = 0.0;\n\t\taltSum = 0.0;\n\t\trotSum = 0.0;\n\n\t\tcount = 0;\n\n\t\tstartTime = System.currentTimeMillis();\n\t\ttimeStamp = startTime;\n\n\t\trotTrkIsLost = false;\n\t\tsetEnableAlerts(true);\n\n\t}", "public void resetGame()\r\n\t{\r\n\t\tthis.inProgress = false;\r\n\t\tthis.round = 0;\r\n\t\tthis.phase = 0;\r\n\t\tthis.prices = Share.generate();\r\n\t\tint i = 0;\r\n\t\twhile(i < this.prices.size())\r\n\t\t{\r\n\t\t\tthis.prices.get(i).addShares(Config.StartingStockPrice);\r\n\t\t\t++i;\r\n\t\t}\r\n\t\tint p = 0;\r\n\t\twhile(p < Config.PlayerLimit)\r\n\t\t{\r\n\t\t\tif(this.players[p] != null)\r\n\t\t\t{\r\n\t\t\t\tthis.players[p].reset();\r\n\t\t\t}\r\n\t\t\t++p;\r\n\t\t}\r\n\t\tthis.deck = Card.createDeck();\r\n\t\tthis.onTable = new LinkedList<>();\r\n\t\tCollections.shuffle(this.deck);\r\n\t\tthis.dealToTable();\r\n\t}", "private void reset() {\n ms = s = m = h = 0;\n actualizar();\n }", "private void resetGrid() {\n ObservableList<Node> childrens = grid.getChildren();\n for (Node node : childrens) {\n Circle temp = (Circle) node;\n temp.setFill(Paint.valueOf(\"Black\"));\n }\n }", "public void newRound() {\n //Reset the score\n dealerScore = 0;\n playerScore = 0;\n\n //Take the player's losses\n playerBet = 0;\n\n //Clear the decks\n dealerStack.clear();\n playerStack.clear();\n\n //Clear the talon\n cards = null;\n\n //reset the talon counter\n talonStack = 0;\n\n //Create a new deck and shuffle for next game\n cards = new Card[52 * numDecks];\n cards = initialize(cards, numDecks);\n cards = shuffleDeck(cards, numDecks);\n }", "public void resetGame(){\n removeAll();\n\n brickManager = new BrickManager(BRICKMANAGER_X_POSITION, BRICKMANAGER_Y_POSITION);\n ball = new Ball(BALL_INITIAL_X_POSITION, BALL_INITIAL_Y_POSITION, BALL_RADIUS*2, BALL_RADIUS*2);\n bar = new Bar(BAR_INITIAL_X_POSITION, BAR_INITIAL_Y_POSITION, BAR_LENGTH, BAR_WIDTH);\n\n add(ball);\n add(bar);\n add(brickManager);\n }", "private void reset() {\n // Init-values\n for (int i = 0; i < cells.length; i++) {\n cells[i] = 0;\n }\n\n // Random colors\n for (int i = 0; i < colors.length; i++) {\n colors[i] = Color.color(Math.random(), Math.random(), Math.random());\n }\n\n // mid = 1.\n cells[cells.length / 2] = 1;\n\n // Clearing canvas\n gc.clearRect(0, 0, canvasWidth, canvasHeight);\n }", "public void reset ()\n\t{\n\t\t//The PaperAirplane and the walls (both types) use their reconstruct ()\n\t\t//method to set themselves back to their starting points.\n\t\tp.reconstruct ();\n\t\tfor (int i = 0; i < w.length; i++)\n\t\t\tw[i].reconstruct ();\n\t\t\n\t\tfor (int i = 0; i < sW.length; i++)\n\t\t\tsW[i].reconstruct ();\n\t\t\t\n\t\t//the time is reset using the resetTime () method from the Timer class.\n\t\ttime.resetTime ();\n\t\t\n\t\t//the score is reset using the reconstruct method from the Score class.\n\t\tscore.reconstruct ();\n\t\t\n\t\t//The following variables are set back to their original values set in\n\t\t//the driver class.\n\t\ttimePassed = 0;\t\n\t\tnumClicks = 0;\n\t\teventFrame = 0;\n\t\tlevel = 1;\n\t\txClouds1 = 0;\n\t\txClouds2 = -500;\n\t\tyBkg1 = 0;\n\t\tyBkg2 = 600;\t\t\n\t}", "public void reset()\n {\n playersPiece = -1;\n king = false;\n empty = true;\n setTileColor(-1);\n }", "public void reset(){\n star.clear();\n planet.clear();\n }", "public void reset() {\n\t\tVector2 gravity = new Vector2(world.getGravity() );\n\t\t\n\t\tfor(Obstacle obj : objects) {\n\t\t\tobj.deactivatePhysics(world);\n\t\t}\n\t\tobjects.clear();\n\t\taddQueue.clear();\n\t\tworld.dispose();\n\t\t\n\t\tworld = new World(gravity,false);\n\t\tsetComplete(false);\n\t\tsetFailure(false);\n\t\tpopulateLevel();\n\t}", "public final void reset() {\n\t\tscore = 0;\n\t\tlives = 10;\n\t\tshields = 3;\n\t}", "public Round() {\n\t\tthis.niceMoves = null;\n\t\tthis.roundNo = 1;\n\t}", "private void reset() // reset the game so another game can be played.\n\t{\n\t\tenableControls(); // enable the controls again..\n\n\t\tfor (MutablePocket thisMutPocket: playerPockets) // Reset the pockets to their initial values.\n\t\t{\n\t\t\tthisMutPocket.setDiamondCount(3);\n\t\t}\n\n\t\tfor(ImmutablePocket thisImmPocket: goalPockets)\n\t\t{\n\t\t\tthisImmPocket.setDiamondCount(0);\n\t\t}\n\n\t\tfor(Player thisPlayer: players) // Same for the player..\n\t\t{\n\t\t\tthisPlayer.resetPlayer();\n\t\t}\n\n\t\tupdatePlayerList(); // Update the player list.\n\n\t}", "public void reset(){\r\n\t\tif (moveTimer != null) moveTimer.stop();\r\n\t\tmySnake = new Snake(MAX_WIDTH/2, MAX_HEIGHT/2, MAX_WIDTH, MAX_HEIGHT);\r\n\t\tmoveSpeed = mySnake.getList().size();\r\n\t\tmoveTimer = new Timer(1000/moveSpeed, new MoveTimerHelper());\r\n\t\tmoveTimer.start();\r\n\t\tshrooms = new ArrayList<Mushroom>();\r\n\r\n\t\tignoreStrokes = 0;\r\n\t\t\r\n\t\tif (lives <= 0){\r\n\t\t\tgameOver = true;\r\n\t\t\tendGame();\r\n\t\t}\r\n\t}", "public void reset() {\n\t\tx = 0;\n\t\ty = 0;\n\t\tdir = -90;\n\t\tcoul = 0;\n\t\tcrayon = true;\n\t\tlistSegments.clear();\n \t}", "public void reset() {\n\n players = new Player[numAIPlayers + 1];\n createHumanPlayer();\n createAIPlayers(numAIPlayers);\n wholeDeck.shuffle();\n\n // --- DEBUG LOG ---\n // The contents of the complete deck after it has been shuffled\n Logger.log(\"COMPLETE GAME DECK AFTER SHUFFLE:\", wholeDeck.toString());\n\n assignCards(wholeDeck, players);\n activePlayer = randomlySelectFirstPlayer(players);\n playersInGame = new ArrayList<>(Arrays.asList(players));\n winningCard = null;\n roundWinner = null;\n\n roundNumber = 1;\n drawRound = 0;\n }", "public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}", "public void reset() {\n // corresponding function called in the Board object to reset piece\n // positions\n board.reset();\n // internal logic reset\n lastColor = true;\n gameOver = false;\n opponentSet = false;\n }", "public void reset() {\n points.reset();\n paintPolygon = false;\n paintResult = false;\n repaint();\n }", "private void resetGame() {\n rockList.clear();\n\n initializeGame();\n }", "public void reset() {\n hasWinner = false;\n firstTurn = true;\n for (int row = 0; row < mRowsCount; row++) {\n for (int col = 0; col < mColsCount; col++) {\n mCells[row][col] = new Cell();\n }\n }\n }", "@Override\r\n\tpublic void reset() {\r\n\t\tpilots.clear();\r\n\t\tcabinCrew.clear();\r\n\r\n\t}", "protected void reset() {\n leftSkier.reset();\n rightSkier.reset();\n }", "public void reset(){\n\t\tfrogReposition();\n\t\tlives = 5;\n\t\tend = 0;\n\t}", "public void reset() {\r\n minX = null;\r\n maxX = null;\r\n minY = null;\r\n maxY = null;\r\n\r\n minIn = null;\r\n maxIn = null;\r\n\r\n inverted = false;\r\n }", "private void resetGame() {\r\n\t\t\r\n\t\tif(easy.isSelected()) {\r\n\t\t\tGRID_SIZE = 10;\r\n\t\t\tlbPits = 3;\r\n\t\t\tubPits = 5;\t\t\t\r\n\t\t} else if(medium.isSelected()) {\r\n\t\t\tGRID_SIZE = 15;\r\n\t\t\tlbPits = 8;\r\n\t\t\tubPits = 12;\r\n\t\t} else if(hard.isSelected()) {\r\n\t\t\tGRID_SIZE = 20;\r\n\t\t\tlbPits = 35;\r\n\t\t\tubPits = 45;\r\n\t\t} else {\r\n\t\t\tGRID_SIZE = 10;\r\n\t\t\tlbPits = 3;\r\n\t\t\tubPits = 5;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tvisited = new boolean[GRID_SIZE][GRID_SIZE];\r\n\t\tGameMapFactory mf = new GameMapFactory(new Obstacle[GRID_SIZE][GRID_SIZE], new Random(), GRID_SIZE, lbPits, ubPits);\r\n\t\tmf.setupMap();\r\n\t\tgame.resetGame(GRID_SIZE, mf.getGameMap(), visited, mf.getHunterPosition());\r\n\t\t\r\n\t}", "public void reset() {\n\t\tfor (int x = 0; x < worldWidth; x++) {\n\t\t\tfor (int y = 0; y < worldHeight; y++) {\n\t\t\t\ttileArr[x][y].restart();\n\t\t\t}\n\t\t}\n\t\tlost = false;\n\t\tisFinished = false;\n\t\tplaceBombs();\n\t\tsetNumbers();\n\t}", "private void resetGame()\n {\n createRooms();\n createItems();\n createCharacters();\n\n int itemsToAdd = getRandomNumber(10,items.size());\n addRoomItems(itemsToAdd);\n winItem = createWinItem();\n\n moves = 1;\n currentRoom = getRoom(STARTROOM); // Player's start location.\n }", "private void reset() {\n }", "protected void reset() {\n\t\t}", "public void reset() {\n gameStatus = null;\n userId = null;\n gameId = null;\n gameUpdated = false;\n selectedTile = null;\n moved = false;\n }", "public void reset() {\n // White Pieces\n placePiece(new Rook(Player.White), new Position(\"a1\"));\n placePiece(new Knight(Player.White), new Position(\"b1\"));\n placePiece(new Bishop(Player.White), new Position(\"c1\"));\n placePiece(new Queen(Player.White), new Position(\"d1\"));\n placePiece(new King(Player.White), new Position(\"e1\"));\n placePiece(new Bishop(Player.White), new Position(\"f1\"));\n placePiece(new Knight(Player.White), new Position(\"g1\"));\n placePiece(new Rook(Player.White), new Position(\"h1\"));\n placePiece(new Pawn(Player.White), new Position(\"a2\"));\n placePiece(new Pawn(Player.White), new Position(\"b2\"));\n placePiece(new Pawn(Player.White), new Position(\"c2\"));\n placePiece(new Pawn(Player.White), new Position(\"d2\"));\n placePiece(new Pawn(Player.White), new Position(\"e2\"));\n placePiece(new Pawn(Player.White), new Position(\"f2\"));\n placePiece(new Pawn(Player.White), new Position(\"g2\"));\n placePiece(new Pawn(Player.White), new Position(\"h2\"));\n\n // Black Pieces\n placePiece(new Rook(Player.Black), new Position(\"a8\"));\n placePiece(new Knight(Player.Black), new Position(\"b8\"));\n placePiece(new Bishop(Player.Black), new Position(\"c8\"));\n placePiece(new Queen(Player.Black), new Position(\"d8\"));\n placePiece(new King(Player.Black), new Position(\"e8\"));\n placePiece(new Bishop(Player.Black), new Position(\"f8\"));\n placePiece(new Knight(Player.Black), new Position(\"g8\"));\n placePiece(new Rook(Player.Black), new Position(\"h8\"));\n placePiece(new Pawn(Player.Black), new Position(\"a7\"));\n placePiece(new Pawn(Player.Black), new Position(\"b7\"));\n placePiece(new Pawn(Player.Black), new Position(\"c7\"));\n placePiece(new Pawn(Player.Black), new Position(\"d7\"));\n placePiece(new Pawn(Player.Black), new Position(\"e7\"));\n placePiece(new Pawn(Player.Black), new Position(\"f7\"));\n placePiece(new Pawn(Player.Black), new Position(\"g7\"));\n placePiece(new Pawn(Player.Black), new Position(\"h7\"));\n }", "static void reset() {\n for( Tile x : tiles ) {\n x.setBackground(white);\n }\n tiles.get(0).setBackground(red);\n start = 0;\n flag = 0;\n }", "private void reset() {\n\t\tsnake.setStart();\n\n\t\tfruits.clear();\n\t\tscore = fruitsEaten = 0;\n\n\t}", "public void reset() {\n\t\t\t\t\r\n\t\t\t}", "protected void reset()\n {\n this.shapeDataCache.removeAllEntries();\n this.sector = null;\n }", "public static void reset() {\n\t\tbat1.reset();\n\t\tbat2.reset();\n\t\tball.reset();\n\t}", "public void reset() {\n setValuesInternal(new Date(clock.getTime()), false, true);\n }", "private void resetAll() {\n resetResources();\n resetStory();\n refresh();\n }", "void reset()\n {\n reset(values);\n }", "public static void reset() {\n\t\tE_Location.THIS.reset();\n\t\tE_Resource.THIS.reset();\n\t\t\n\t\tT_Object.reset();\n\t\tT_Location.reset();\n\t\tT_Resource.reset();\n\t\t\n\t}", "public void reset(){\n newGame();\n removeAll();\n repaint();\n ended = false;\n }", "public void reset()\t{\n\t\tthis.snake.clear();\r\n\t\tdir = 1;\r\n\t\tthis.snake.add(new Dimension(2,5));\r\n\t\tthis.snake.add(new Dimension(2,6));\r\n\t\tthis.snake.add(new Dimension(2,7));\r\n\t}", "public void reset () {}", "final void reset() {\r\n\t\t\tsp = 0;\r\n\t\t\thp = 0;\r\n\t\t}", "public synchronized void reset() {\n }", "public synchronized void reset()\n\t{\n\t\tthis.snapshots.clear();\n\t\tthis.selfPositions.clear();\n\t}", "public void resetModel() {\n\t\twhitePieces.removeAll();\n\t\tblackPieces.removeAll();\n\t\tcapturedPieces.removeAll(capturedPieces);\n\t\tmoveList.removeAll(moveList);\n\n\t\tinitializeBoard();\n\t\tpopulateLists();\n\t}", "private void reset(){\n locationFieldX.setText(\"0.00\");\n locationFieldY.setText(\"0.00\");\n locationFieldZ.setText(\"0.00\");\n rotationFieldX.setText(\"0.00\");\n rotationFieldY.setText(\"0.00\");\n rotationFieldZ.setText(\"0.00\");\n scaleField.setText(\"1.00\");\n \n setObjects();\n setImage();\n }", "@Override\r\n\tpublic void reset() {\r\n\t\tsuper.reset();\r\n\t\tresetMomentObservation();\r\n\t\texpectations.reset();\r\n\t}", "public void reset() {\n sum1 = 0;\n sum2 = 0;\n }", "public void resetAll() {\n Random random = new Random();\r\n for (int layer = 0; layer < neurons.length; layer++) {\r\n for (int index = 0; index < neurons[layer].length; index++) {\r\n neurons[layer][index] = new Neuron(random.nextDouble());\r\n }\r\n }\r\n for (int layer = 0; layer < connections.length; layer++) {\r\n for (int startIndex = 0; startIndex < connections[layer].length; startIndex++) {\r\n for (int endIndex = 0; endIndex < connections[layer][startIndex].length; endIndex++) {\r\n connections[layer][startIndex][endIndex] = new Connection(random.nextDouble()*10-5, random.nextDouble()*10-5);\r\n }\r\n }\r\n }\r\n }", "public void reset() {\n next = 0;\n renderList.clear();\n viewList.clear();\n }", "public void reset() {\nsuper.reset();\nsetIncrease_( \"no\" );\nsetSwap_( \"tbr\" );\nsetMultrees_( \"no\" );\nsetRatchetreps_(\"200\");\nsetRatchetprop_(\"0.2\");\nsetRatchetseed_(\"0\");\n}", "public void reset() {\r\n active.clear();\r\n missioncontrollpieces = GameConstants.PIECES_SET;\r\n rolled = 0;\r\n phase = 0;\r\n round = 0;\r\n action = 0;\r\n }", "public void resetgamestate() {\n \tthis.gold = STARTING_GOLD;\n \tthis.crew = STARTING_FOOD;\n \tthis.points = 0;\n \tthis.masterVolume = 0.1f;\n this.soundVolume = 0.5f;\n this.musicVolume = 0.5f;\n \n this.ComputerScience = new Department(COMP_SCI_WEPS.getWeaponList(), COMP_SCI_UPGRADES.getRoomUpgradeList(), this);\n this.LawAndManagement = new Department(LMB_WEPS.getWeaponList(), LMB_UPGRADES.getRoomUpgradeList(), this);\n this.Physics = new Department(PHYS_WEPS.getWeaponList(), PHYS_UPGRADES.getRoomUpgradeList(), this);\n \n this.playerShip = STARTER_SHIP.getShip();\n this.playerShip.setBaseHullHP(700);\n this.playerShip.repairHull(700);\n this.combatPlayer = new CombatPlayer(playerShip);\n }", "public static void reset(){\r\n\t\tx=0;\r\n\t\ty=0;\r\n\t}", "public void reset() {\n super.reset();\n }", "public void reset() {\n\n\t}", "public void resetGame(){\n\t\tPlayer tempPlayer = new Player();\n\t\tui.setPlayer(tempPlayer);\n\t\tui.resetCards();\n\t}", "public void resetGame(){\n\t\tlabyrinth.reset();\n\t\tlabyrinth = Labyrinth.getInstance();\n\t\tplayer.setX(0);\n\t\tplayer.setY(0);\n\n\t\tcandies = new HashMap();\n\t\tenemies = new HashMap();\n\t\tbuttons = new HashMap();\n\n\t\tint coordX = ThreadLocalRandom.current().nextInt(0, 16);\n\t\tint coordY = ThreadLocalRandom.current().nextInt(0, 16);\n\t\tdoor.setX(coordX);\n\t\tdoor.setY(coordY);\n\n\t\tgenerateCandies();\n\t\tgenerateEnemies();\n\n\t}", "public void reset() {\n\t\tfor (int i = 0; i < stats.size(); i++) {\n\t\t\tstats.get(i).reset();\n\t\t}\n\t}", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset()\n\t{\n\t\t\n\t\tif (lifeCount > 1)\n\t\t{\n\t\t\tthis.setCollisionOn(false);\n\t\t\tthis.setEingabe(false);\n\t\t\tthis.reduceLifeCount();\n\t\t\timg.setRotation(0);\n\t\t\tthis.posX = startPosX;\n\t\t\tthis.setPosY(startPosY + 105);\n\t\t\tthis.spdX = startSpdX;\n\t\t\tthis.setSpdY(-60);\n\t\t\tcollisionShape.setCenterX(startPosX);\n\t\t\tcollisionShape.setCenterY(startPosY);\n\t\t\tsetRupeesInBag(0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/*\n\t\t\t * When Gameover\n\t\t\t */\n\t\t\t\n\t\t\tthis.posX = startPosX;\n\t\t\tthis.setPosY(startPosY);\n\t\t\tcollisionShape.setCenterX(startPosX);\n\t\t\tcollisionShape.setCenterY(startPosY);\n\t\t\tthis.reduceLifeCount();\n\t\t}\n\t}", "public void newRound(){\r\n clearRandomDirections();\r\n this.currentAmountToPutIn++;\r\n initializeNewRound();\r\n //reset timer;\r\n }", "public void resetPoints() {\n points = 0;\n }", "void reset() {\n if (myGrass != null) {\n myGrass.reset();\n }\n if (myCowboy != null) {\n myCowboy.reset();\n }\n if (myLeftTumbleweeds != null) {\n for (int i = 0; i < myLeftTumbleweeds.length; i++) {\n myLeftTumbleweeds[i].reset();\n }\n }\n if (myRightTumbleweeds != null) {\n for (int i = 0; i < myRightTumbleweeds.length; i++) {\n myRightTumbleweeds[i].reset();\n }\n }\n myLeft = false;\n myCurrentLeftX = Grass.CYCLE * Grass.TILE_WIDTH;\n }", "private void resetForNextTurn() {\n\t\tremove(ball);\n\t\tdrawBall();\n\t\tsetInitialBallVelocity();\n\t\tpaddleCollisionCount = 0;\n\t\tpause(2000); \t\t\t\t\n }" ]
[ "0.71914", "0.7067845", "0.70637727", "0.70247006", "0.70180666", "0.7007835", "0.7005004", "0.69911677", "0.69903654", "0.69743824", "0.69697684", "0.6958714", "0.695522", "0.6947447", "0.6925117", "0.6860975", "0.6844485", "0.68267983", "0.68046397", "0.6801432", "0.6799833", "0.67990744", "0.679011", "0.6777031", "0.6771659", "0.6751809", "0.67416245", "0.67395365", "0.67390794", "0.6712014", "0.6699251", "0.66941357", "0.6680652", "0.6678996", "0.665354", "0.6652537", "0.66482437", "0.66474676", "0.6644323", "0.6644009", "0.6638829", "0.66203076", "0.6615488", "0.66150665", "0.660846", "0.6597497", "0.659662", "0.6596424", "0.6587977", "0.65757954", "0.65661657", "0.65616304", "0.6556372", "0.6554841", "0.6543613", "0.6539546", "0.6528725", "0.6523396", "0.6521513", "0.6519465", "0.65188533", "0.65183914", "0.65162945", "0.6514334", "0.6498431", "0.6487885", "0.6483247", "0.64802665", "0.64735883", "0.64719105", "0.64707637", "0.6459738", "0.64557606", "0.64483076", "0.64317524", "0.6430393", "0.6430123", "0.64196646", "0.64192677", "0.6416924", "0.64164466", "0.6414378", "0.6414378", "0.6414378", "0.6414378", "0.6414378", "0.6414378", "0.6414378", "0.6414378", "0.6414378", "0.6414378", "0.6414378", "0.6414378", "0.6414378", "0.6414378", "0.6414378", "0.641099", "0.64083433", "0.6408146", "0.6407394", "0.6405818" ]
0.0
-1
Returns true if any button's press counter is greater than zero.
@SuppressWarnings("unused") private boolean wasAnyButtonPressed() { for (ArcadeButton button : buttons) { if (button.getPressCounter() > 0) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isSetClickcount() {\n return __isset_bit_vector.get(__CLICKCOUNT_ISSET_ID);\n }", "public boolean isPressed(int b) {\n if (b >= 0 && b < buttonPressed.length) {\n return buttonPressed[b] && !buttonLastPressed[b];\n } else {\n return false;\n }\n }", "public boolean isButtonPressed(int playerNum) {\r\n return button.pressed;\r\n }", "public boolean wasButtonJustPressed(int playerNum) {\r\n if (button.clicked) {\r\n button.clicked = false;\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public boolean isButtonPushedAtFloor(int floor) {\r\n\r\n return (getNumberOfPeopleWaitingAtFloor(floor) > 0);\r\n }", "public static boolean isButtonPressed() {\n return button.isPressed();\n }", "public boolean wasJustPressed() {\n\t\treturn (mNow && (!mLast));\n\t}", "private boolean releasedInBounds(int button) {\n if (pressedButton == button) {\n return true;\n }\n else {\n return false;\n }\n }", "public boolean hasButton(String key) {\n return !getGUIButtons(key).isEmpty();\n }", "public boolean isReleased(int b) {\n if (b >= 0 && b < buttonPressed.length) {\n return !buttonPressed[b] && buttonLastPressed[b];\n } else {\n return false;\n }\n }", "public boolean buttonPressed(Button button) {\n return (!buttonsPressed.get(button.getId()) && joystick.getRawButton(button.getId()));\n }", "public boolean isPressed() {\n\t\treturn get();\n\t}", "public boolean getButtonPressed(Button button) {\n return getButtonPressed(button.getNumber());\n }", "private boolean playerHasPressed(PlayerView p) {\n\t\treturn (!game.getPlayer(p.getId() - 1).getHasLost()\n\t\t\t\t&& keyListeners.get(p.getKeyCode()));\n\t}", "public boolean canHit() {\n\t\treturn this.hand.countValue().first() < 17;\n\t}", "public boolean hasOrderButtons() {\n return orderButtonImageCount == 4;\n }", "protected boolean hasPositiveButton() {\n return false;\n }", "public boolean get() {\n\t\t\tint i = 0; \n\t\t\twhile(i < buttons.length) {\n\t\t\t\tif (!buttons[i].get()) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "boolean getButtonRelease(Buttons but);", "public int howManyActivated() {\n int cont = 0;\n if(!baseProductionPanel.getProductionButton().isToken())\n cont++;\n for(int i = 0 ; i<3;i++){\n if (!productionButtons[i].isToken())\n cont++;\n }\n return cont;\n }", "boolean checkZero(Button currentButton){\n\n int curIndex = btns.indexOf(currentButton);\n\n if ((curIndex - n) == zeroIndex){\n return true; \n } else if ((curIndex + n) == zeroIndex){\n return true;\n } else if (((curIndex + 1) % n != 0) && curIndex + 1 == zeroIndex){\n return true;\n } else if (((curIndex) % n != 0) && curIndex - 1 == zeroIndex){\n return true;\n } else {\n return false;\n }\n }", "public boolean isClicked() {\n\t\tif(GameMouse.getInstance().getX() < x || GameMouse.getInstance().getX() > x + width) {\n\t\t\treturn false; //X is outside our button\n\t\t}\n\t\tif(GameMouse.getInstance().getY() < y || GameMouse.getInstance().getY() > y + height) {\n\t\t\treturn false; //X is outside our button\n\t\t}\n\t\treturn GameMouse.getInstance().isClicked(GameMouse.LEFT_BUTTON);\n\t}", "public boolean takeControl() {\r\n\t\treturn (StandardRobot.ts.isPressed() || (StandardRobot.us.getRange() < 25));\r\n\t}", "public boolean isOver() {\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n if (!matrix[i][j].isClicked()) {\n return false;\n }\n }\n }\n return true;\n }", "public Boolean IsInterrupt() {\n Random r = new Random();\n int k = r.nextInt(100);\n //10%\n if (k <= 10) {\n return true;\n }\n return false;\n }", "public int checkMenuButtons() {\n\n // computing the coordinates of the cursor\n\n mouseX = (float) ((currentPos.x * 1.0f - window.getWidth() / 2f) / (window.getWidth() / 2f));\n mouseY = (float) ((currentPos.y * 1.0f - window.getHeight() / 2f) / (window.getHeight() / 2f));\n\n float checkX = ((2f - 0.4f * boxRatio) / 2) - 1;\n int checkButton = 0;\n\n if (checkX < mouseX && mouseX < (checkX + 0.4f * boxRatio) && mouseY > -0.24f && mouseY < -0.157f) {\n checkButton = 11;\n }\n\n if (checkX < mouseX && mouseX < (checkX + 0.4f * boxRatio) && mouseY > -0.24f && mouseY < -0.157f && isLeftButtonPressed()) {\n checkButton = 12;\n }\n\n\n // coordinates of the 2nd button\n\n if (checkX < mouseX && mouseX < (checkX + 0.4f * boxRatio) && mouseY > -0.098f && mouseY < -0.0098f) {\n checkButton = 21;\n }\n\n if (checkX < mouseX && mouseX < (checkX + 0.4f * boxRatio) && mouseY > -0.098f && mouseY < -0.0098f && isLeftButtonPressed()) {\n checkButton = 22;\n }\n\n\n // coordinates of the 3rd button\n\n if (checkX < mouseX && mouseX < (checkX + 0.4f * boxRatio) && mouseY > 0.05f && mouseY < 0.144f) {\n checkButton = 31;\n }\n\n if (checkX < mouseX && mouseX < (checkX + 0.4f * boxRatio) && mouseY > 0.05f && mouseY < 0.144f && isLeftButtonPressed()) {\n checkButton = 32;\n }\n\n // coordinates of the 1st button\n\n if (checkX < mouseX && mouseX < (checkX + 0.4f * boxRatio) && mouseY > 0.2f && mouseY < 0.29f) {\n checkButton = 41;\n }\n\n if (checkX < mouseX && mouseX < (checkX + 0.4f * boxRatio) && mouseY > 0.2f && mouseY < 0.29f && isLeftButtonPressed()) {\n checkButton = 42;\n }\n\n if (checkX < mouseX && mouseX < (checkX + 0.4f * boxRatio) && mouseY > 0.35f && mouseY < 0.44f) {\n checkButton = 51;\n }\n\n if (checkX < mouseX && mouseX < (checkX + 0.4f * boxRatio) && mouseY > 0.35f && mouseY < 0.44f && isLeftButtonPressed()) {\n checkButton = 52;\n }\n\n return checkButton;\n }", "public boolean checkToProceed(){\n return getGame().getCurrentPlayer().getRemainingActions() > 0;\n }", "public boolean getButtonHeld(Button button) {\n return getButtonHeld(button.getNumber());\n }", "public boolean canProceedWithTapAction() {\n return ClickDelayHelper.canProceedWithTapAction();\n }", "private boolean hasButtonsEnabled(List<Button> buttonList) {\n\n for (Button button : buttonList\n ) {\n if (button.isEnabled()) {\n return true;\n }\n }\n return false;\n }", "boolean hasPerformAt();", "@Override\r\n\tpublic int buttonPressed() {\n\t\tif ( state == 0)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Total Button Pressed\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t}", "private boolean isPressed(KeyCode key) {\n \t\n return keys.getOrDefault(key, false);\n }", "public boolean getButtonReleased(Button button) {\n return getButtonReleased(button);\n }", "public boolean checkTie() {\n\t\t// if none of winning conditions are true and table is full then it's a tie\n\t\tif (!checkRow() && !checkColumn() && !checkDiagonal()) {\n\t\t\tint cnt = 0;\n\t\t\tfor (i = 0; i < xo.length; i++) {\n\t\t\t\tif (bt[i].getText() != \"\") {\n\t\t\t\t\tcnt++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if all nine of buttons are used\n\t\t\tif (cnt == 9) {\n\t\t\t\tjtf.setText(\" IT'S A TIE!\");\n\t\t\t\tjtf.setForeground(Color.green);\n\t\t\t\tjtf.setFont(new Font(\"Arial Black\", Font.BOLD, 50));\n\t\t\t\tfor (i = 0; i < xo.length; i++) {\n\t\t\t\t\tbt[i].setEnabled(false);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean isPressed(KeyCode key) {\n\t\treturn keys.getOrDefault(key, false);\n\t}", "public boolean getKeyJustPressed(InputKey key) {\n return justPressedKeys.contains(key);\n }", "public boolean isClickEnabled(int id)\n {\n return id < clicks.length && id >= 0 && clicks[id];\n }", "public boolean hasCounter() {\n return counterBuilder_ != null || counter_ != null;\n }", "private boolean didPlayerWin() {\r\n for (int i = 0; i < targets.length; i++) {\r\n if (targets[i].getHitPoints() != 0) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "boolean isShutterPressed();", "boolean hasClickView();", "public boolean hasPointsCount() {\n return pointsCountBuilder_ != null || pointsCount_ != null;\n }", "@Override\n\tpublic boolean takeControl() {\n\t\treturn (touch_r.isPressed() || touch_l.isPressed());\n\t}", "public boolean buttonPets(View v) {\n return (v.getId() == R.id.newest);\n }", "public static int WaitForAnyEvent() {\r\n\t\treturn Button.keys.waitForAnyEvent();\r\n\t}", "public boolean isKeyAvailable(String key) {\n return guiButtons.containsKey(key);\n }", "public boolean limitHit() {\r\n return (count >= maxCount);\r\n }", "protected boolean shouldUseActionsInsteadOfButtonBar() {\n DisplayMetrics metrics = new DisplayMetrics();\n getWindowManager().getDefaultDisplay().getMetrics(metrics);\n\n return convertPxToDip(metrics.heightPixels) < 350;\n }", "public boolean button(int minX, int maxX, int minY, int maxY) {\n if (mouseX > minX && mouseX < maxX && mouseY > minY && mouseY < maxY && mousePressed == true) {\n mousePressed = false;\n return true;\n } else {\n return false;\n }\n }", "public boolean hasPositiveInputTagsCount() {\n return positiveInputTagsCountBuilder_ != null || positiveInputTagsCount_ != null;\n }", "boolean hasCounter();", "public boolean hasMore()\n\t{\n\t\treturn numLeft.compareTo(BigInteger.ZERO) == 1;\n\t}", "public boolean isPressed() {\r\n List<Entity> entities = dungeon.getEntities();\r\n for (Entity e: entities) {\r\n if (e != null && e.getY() == getY() && e.getX() == getX()) {\r\n if (\"Boulder\".equals(e.getClass().getSimpleName()))\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public int howManyActivatedExceptBaseProduction() {\n int cont = 0;\n for(int i = 0 ; i<3;i++){\n if (!productionButtons[i].isToken())\n cont++;\n }\n return cont;\n }", "private boolean isValidClick(Point p)\n {\n final double TOP_CARD_HEIGHT = cards.lastElement().getBounds().getHeight();\n final double OTHER_CARDS_HEIGHT = OFFSET_PIXELS * (cards.size() - 1);\n final double CARD_STACK_HEIGHT = TOP_CARD_HEIGHT + OTHER_CARDS_HEIGHT;\n \n if (!isEmpty() && (int) p.getY() > CARD_STACK_HEIGHT)\n return false;\n else\n return true;\n }", "public boolean hasInputsCount() {\n return inputsCountBuilder_ != null || inputsCount_ != null;\n }", "public boolean hasPositiveFrameTagsCount() {\n return positiveFrameTagsCountBuilder_ != null || positiveFrameTagsCount_ != null;\n }", "public boolean hasNextAction(){\n return bufferIndex < listAction.size;\n }", "public static boolean isKeyPressed(int key) {\r\n\t\treturn keysDown.containsKey(key);\r\n\t}", "public boolean pressed() {\n return pressed;\n }", "private boolean checkRemainingRes() {\n for (int i = 0; i < playingField.getPlayingField().length; i++) {\n for (int j = 0; j < playingField.getPlayingField()[i].length; j++) {\n if (playingField.getPlayingField()[i][j].getResources() > 0) {\n return true;\n }\n }\n }\n return false;\n }", "public int checkAllertBox() {\n mouseX = (float) ((currentPos.x * 1.0f - window.getWidth() / 2f) / (window.getWidth() / 2f));\n mouseY = (float) ((currentPos.y * 1.0f - window.getHeight() / 2f) / (window.getHeight() / 2f));\n\n float checkLeftButtonOnLeft = -0.475f * boxRatio * 0.8f;\n float checkLeftButtonOnRight = -0.075f * boxRatio * 0.8f;\n\n float checkRightButtonOnLeft = 0.075f * boxRatio * 0.8f;\n float checkRightButtonOnRight = 0.475f * boxRatio * 0.8f;\n\n int checkButton = 0;\n\n if (checkLeftButtonOnLeft < mouseX && mouseX < checkLeftButtonOnRight && mouseY > -0.079f && mouseY < -0.003f) {\n checkButton = 11;\n }\n\n if (checkLeftButtonOnLeft < mouseX && mouseX < checkLeftButtonOnRight && mouseY > -0.079f && mouseY < -0.003f && isLeftButtonPressed()) {\n checkButton = 12;\n }\n\n if (checkRightButtonOnLeft < mouseX && mouseX < checkRightButtonOnRight && mouseY > -0.079f && mouseY < -0.003f) {\n checkButton = 21;\n }\n\n if (checkRightButtonOnLeft < mouseX && mouseX < checkRightButtonOnRight && mouseY > -0.079f && mouseY < -0.003f && isLeftButtonPressed()) {\n checkButton = 22;\n }\n\n return checkButton;\n }", "public boolean getRawButton(int i) throws Exception{\n \ti-=1;\n \tif (i >= 0 && i < buttonCount)return (buttonState & (1 << i))!=0;\n \tthrow new Exception(String.format(\"Button %d does not exist\", i));\n }", "public boolean hasMore() {\n return numLeft.compareTo(BigInteger.ZERO) == 1;\n }", "public boolean isDown() {\n return pm.pen.hasPressedButtons();\n }", "public boolean getKeyJustReleased(InputKey key) {\n return justReleasedKeys.contains(key);\n }", "public boolean hasNext() {\n\t\treturn this.onAction.hasNext() || this.offAction.hasNext();\t\t\n\t}", "public boolean shouldGestureWaitForTouchSlop() {\n boolean z = false;\n if (this.mExpectingSynthesizedDown) {\n this.mExpectingSynthesizedDown = false;\n return false;\n }\n if (isFullyCollapsed() || this.mBarState != 0) {\n z = true;\n }\n return z;\n }", "boolean hasActionListener() {\n // Guaranteed to return a non-null array\n Object[] listeners = listenerList.getListenerList();\n // Process the listeners last to first, notifying\n // those that are interested in this event\n for (int i = listeners.length-2; i>=0; i-=2) {\n if (listeners[i]==ActionListener.class) {\n return true;\n } \n }\n return false;\n }", "private boolean hasWaiters()\r\n/* 438: */ {\r\n/* 439:526 */ return this.waiters > 0;\r\n/* 440: */ }", "public boolean isCompleted(int exercise) {\n String reps;\n boolean complete = true;\n if(exercise == 0)\n reps = \"3\";\n else if(exercise == 4 || exercise == 7)\n reps = \"20\";\n else if(exercise == 3 || exercise == 6)\n reps = \"15\";\n else\n reps = \"12\";\n\n for(int i = 0; i < bsButtons[exercise].length; i++) {\n if(bsButtons[exercise][i].getText().toString().equals(reps)) {\n complete = true;\n }\n else {\n complete = false;\n break;\n }\n }\n return complete;\n }", "private void checkButtonVisibility() {\n\n if (leftBlockIndex > 0) {\n buttonLeft.setVisibility(View.VISIBLE);\n } else {\n buttonLeft.setVisibility(View.INVISIBLE);\n }\n\n if (leftBlockIndex < blockCount - 2) {\n buttonRight.setVisibility(View.VISIBLE);\n } else {\n buttonRight.setVisibility(View.INVISIBLE);\n }\n\n }", "public boolean action_allowed(){\r\n\t\treturn action_holds.size()==0;\r\n\t}", "public boolean hasFrameInputsCount() {\n return frameInputsCountBuilder_ != null || frameInputsCount_ != null;\n }", "public boolean test() {\r\n\t\treturn (hit() == size);\r\n\t}", "public boolean hasMoreCards() {\n if (cardHold == 0)\n return false;\n else\n return true;\n }", "public boolean select()\n {\n if ( pin.getTriesRemaining() == 0 )\n return false;\n return true;\n }", "boolean isRunningReactions()\n {\n return 0 != _currentReactionRound;\n }", "public boolean shouldHit() {\r\n\t\tif(getHandVal() < 17) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false; \r\n\t}", "public boolean isTriggered ( @NotNull final KeyEvent event )\n {\n return areControlsTriggered ( event ) && isKeyTriggered ( event );\n }", "public boolean getIsOperator_GearStartSequence_BtnJustPressed()\n\t{\n\t\treturn super.getIsOperatorBlueBtnXJustPressed();\n\t}", "public boolean hasFainted() {\n return hp <= 0;\n }", "public static boolean exceedsMaxCount() {\n final long maxTestCount = HostConfig.getMaxTestCount();\n return (maxTestCount > 0) && (mTestCount >= maxTestCount);\n }", "public boolean isButton() {\n return this.type == Type.BUTTON;\n }", "boolean hasAction();", "boolean hasAction();", "public boolean pointsPullCheck(int points) {\n\n return !(points > getPoints() || points < 0);\n }", "@Override\n public boolean isGameWon(GridPane gridPane)\n {\n // <editor-fold desc=\"Getting and converting GridPane to an useful format\">\n Button btn1 = (Button) gridPane.getChildren().get(0);\n Button btn2 = (Button) gridPane.getChildren().get(1);\n Button btn3 = (Button) gridPane.getChildren().get(2);\n Button btn4 = (Button) gridPane.getChildren().get(3);\n Button btn5 = (Button) gridPane.getChildren().get(4);\n Button btn6 = (Button) gridPane.getChildren().get(5);\n Button btn7 = (Button) gridPane.getChildren().get(6);\n Button btn8 = (Button) gridPane.getChildren().get(7);\n Button btn9 = (Button) gridPane.getChildren().get(8);\n\n String btn1txt = btn1.getText();\n String btn2txt = btn2.getText();\n String btn3txt = btn3.getText();\n String btn4txt = btn4.getText();\n String btn5txt = btn5.getText();\n String btn6txt = btn6.getText();\n String btn7txt = btn7.getText();\n String btn8txt = btn8.getText();\n String btn9txt = btn9.getText();\n // </editor-fold>\n\n return checkMatch(btn1txt, btn2txt, btn3txt)\n || checkMatch(btn4txt, btn5txt, btn6txt)\n || checkMatch(btn7txt, btn8txt, btn9txt)\n || checkMatch(btn1txt, btn4txt, btn7txt)\n || checkMatch(btn2txt, btn5txt, btn8txt)\n || checkMatch(btn3txt, btn6txt, btn9txt)\n || checkMatch(btn1txt, btn5txt, btn9txt)\n || checkMatch(btn3txt, btn5txt, btn7txt);\n }", "public boolean hasMore () {\n\t return numLeft.compareTo (BigInteger.ZERO) == 1;\n\t }", "private boolean checkWindow(List<Integer> timers) {\n for (Integer timer : timers) {\n if (timer != -1)\n return false;\n }\n return true;\n }", "@Override\n\tpublic void CountDownFinish() {\n\t\tcheckButtonsEnable();\n\t}", "@Override\n\tpublic boolean takeControl() {\n\t\tir.fetchSample(irSample, 0);\n\t\treturn isPressed() == true;\n\t}", "boolean isReactionsRunning()\n {\n return 0 != _currentReactionRound;\n }", "@Override\n\tpublic boolean activate() {\n\t\tfinal Component CANCEL_BUTTON = CONSTS.CANCEL_BUTTON;\n\t\treturn ctx.backpack.select().id(CONSTS.fletching.getId()).count() >= 1\n\t\t\t\t&& !CANCEL_BUTTON.valid() \n\t\t\t\t&& !CANCEL_BUTTON.visible();\n\t}", "public boolean hasCardsLeftOver() {\r\n\r\n return !(currentCards.isEmpty());\r\n\r\n }", "@Override\n public boolean isPressed(Action query) {\n for (InputEventTranslator t : translators) {\n if (t.isPressed(query))\n return true;\n }\n\n return false;\n }", "public boolean hasMoreChoices()\n\t{\n\t\treturn (queue.count() > 0);\n\n\t}", "public boolean VerifyButtonStatus() throws InterruptedException {\n\n Thread.sleep(10000);\n if(roundTripButton.isSelected()) {\n System.out.println(\"round trip Button is already selected\");\n wait.until(ExpectedConditions.elementToBeClickable(oneWayButton));\n oneWayButton.click();\n System.out.println(\"Switched to One Way button\");\n }\n else if(oneWayButton.isSelected()){\n System.out.println(\"One way button is already selected\");\n roundTripButton.click();\n System.out.println(\"Switched to Round Trip button\");\n\n }\n return true;\n }", "@OnlyIn(Dist.CLIENT)\n\tprivate boolean isPressing(int key){\n\t\tlong window = Minecraft.getInstance().getMainWindow().getHandle();\n\t\treturn GLFW.glfwGetKey(window, key) == GLFW.GLFW_PRESS;\n\t}" ]
[ "0.70618194", "0.695051", "0.6766239", "0.664711", "0.6604428", "0.657112", "0.64243186", "0.6397696", "0.6391937", "0.6380337", "0.6250231", "0.6231008", "0.6172282", "0.60561496", "0.6054483", "0.6045024", "0.6036459", "0.6033335", "0.6028009", "0.6003954", "0.59728944", "0.59458286", "0.59449685", "0.594298", "0.5872317", "0.5823466", "0.58228713", "0.5810158", "0.580033", "0.57971936", "0.5795899", "0.5776721", "0.576516", "0.5757842", "0.5747044", "0.5746528", "0.5740823", "0.5705092", "0.56894875", "0.56820863", "0.56803006", "0.5677295", "0.56700975", "0.5664414", "0.5660376", "0.56350493", "0.5619217", "0.56161124", "0.56064594", "0.5602179", "0.55953646", "0.55828404", "0.55806035", "0.5579202", "0.5579162", "0.55755544", "0.5569835", "0.5568431", "0.55679584", "0.55487525", "0.55402297", "0.5531502", "0.5530092", "0.55254704", "0.5507194", "0.5506866", "0.5494029", "0.5481226", "0.5479971", "0.547971", "0.5474422", "0.5472469", "0.54626775", "0.54616743", "0.5452287", "0.5445607", "0.5443681", "0.54308915", "0.5428631", "0.54269665", "0.5421934", "0.5421031", "0.5421024", "0.5420788", "0.54188144", "0.5416555", "0.5416555", "0.54151464", "0.5414015", "0.54110616", "0.5409762", "0.5407264", "0.5405588", "0.53997976", "0.53996795", "0.5398195", "0.5397854", "0.5392465", "0.5389544", "0.538854" ]
0.7907218
0
The normal game tick.
private void physicsTickAlive() { // Physics stuff setThrusts(); moveEverything(deltaTimeAlive); ageScoreMarkers(deltaTimeAlive); shootBullets(); collideTankToWall(); collideTankToTank(); collideBulletToWall(); collideBulletToTank(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void tick() {\r\n }", "public void tick() {\n\t}", "public void tick() {\n\t}", "public void tick() {\r\n tick++;\r\n }", "public void tick() {\n\t\ttick(1);\n\t}", "public void tick();", "public void tick();", "public void tick();", "public void tick(){\r\n if(timer != 0)\r\n timer++;\r\n }", "void tick();", "void tick();", "protected abstract void tick();", "public static void tick() {\n if (tickTime == 0L) {\n tickTime = System.currentTimeMillis();\n } else {\n System.err.println(\"Must call tock before tick\");\n System.exit(1);\n }\n }", "private void tick() {\n handler.tick();\n if (gameStart == GAME_STATE.Game) {\n hud.tick();\n menu.tick();\n\n // determines player lives + game over\n if (HUD.LIVES <= 0) {\n HUD.LIVES = 5;\n gameStart = GAME_STATE.GameOver;\n } else if (gameStart == GAME_STATE.Menu || gameStart == GAME_STATE.GameOver || gameStart == GAME_STATE.GameVictory) {\n menu.tick();\n }\n }\n }", "@Override\r\n\tpublic void tick() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tick() {\n\t\t\r\n\t}", "public abstract void tick();", "void tick(long tickSinceStart);", "@Override\n public void tick() {\n super.tick();\n }", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\n\t}", "public void tick() {\n\t\t//If Statement to make sure this section of the code only runs once using the runOnce variable\n\t\tif(runOnce==1) {\n\t\t\t//Set the game state for street fighter to menu\n\t\t\tGame.gameState=STATE.MENU;\n\t\t\t//Instantiante Game class object\n\t\t\tgame = new Game();\n\t\t\trunOnce=2;\n\t\t} \n\t\t\n\t\t//If Statement to make sure this section of the code only runs once using the runOnce variable\n\t\tif(runOnce==2) {\n\t\t\t//Call the game class tick method\n\t\t\tgame.tick();\n\t\t}\n\t\t\n\t\t\n\t\t//Checks if the user quit the game\n\t\tif(KeyInput.quit==true) {\n\t\t\t//Call the resetVariables method to reset all the important variables \n\t\t\tgame.resetVariables();\n\t\t\trunOnce=1;\n\t\t\t\n\t\t\t//Set the game state to the arcade menu state\n\t\t\tState.setState(handler.getGame().startingState);\n\t\t}\n\t}", "public void tick(double dt) {\n }", "public void tick() {\r\n if (this.ticking == true) {\r\n \t this.ticks++;\r\n //Every 100 ticks is 10 seconds.\r\n //Reset the display.\r\n if (this.ticks == 100) {\r\n if (this.isLocked == false) {\r\n this.lockGui.setDisplay(\"Open\");\r\n }\r\n\r\n else {\r\n this.lockGui.setDisplay(\"Locked\");\r\n }\r\n\r\n this.ticking = false;\r\n this.entered = \"\";\r\n }\r\n }\r\n }", "public void cycleDay() {\r\n player.gametick();\r\n }", "public void tick(){\n\t\tinput.tick();\n\t\t\n\t\tif(!this.gameOver){\n\t\t\tthis.updateGame();\n\t\t}else{\n\t\t\tif(input.down){\n\t\t\t\tbird.x = 80;\n\t\t\t\tbird.y = (HEIGHT-50)/2;\n\t\t\t\tthis.numGoals = 0;\n\t\t\t\tthis.obstacles.clear();\n\t\t\t\tthis.goals.clear();\n\t\t\t\tthis.gameOver = false;\n\t\t\t\tthis.begin = true;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public void tick() {\n\t\t//If Statement to make sure this section of the code only runs once using the runOnce variable\n\t\tif(runOnce==1) {\n\t\t\t//Call initialize method\n\t\t\tinit();\n\t\t\trunOnce=2;\n\t\t}\n\t\t\n\t\t\n\t\t//If statement to check if the user presses the space button\n\t\tif(handler.getKeyManager().space==true) {\n\t\t\tspacePressed=true;\n\t\t}\n\t\t\n\t\t//If space pressed is true the program runs the animation\n\t\tif(spacePressed==true) {\n\t\t\t\n\t\t\t//If Statement to make sure this section of the code only runs once using the runOnce variable\n\t\t\tif(runOnce==2) {\n\t\t\t\t//Sets the secondPassed Variable to 0\n\t\t\t\tmenuTimer.setSecondsPassed(0);\n\t\t\t\trunOnce=3;\n\t\t\t}\n\t\t\t\n\t\t\t//Runs the main menu animation for a specific time\n\t\t\tif(menuTimer.getSecondsPassed()>=0&&menuTimer.getSecondsPassed()<=1.2) {\n\t\t\t\tmainMenuAnimation.tick();\n\t\t\t}\n\t\t\t\n\t\t\t//Sets the game state to the starting arcade state after the animation finishes\n\t\t\tif(menuTimer.getSecondsPassed()>=1.1) {\n\t\t\t\tState.setState(handler.getGame().startingState);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t}", "void tick(long ticksSinceStart);", "public Tick() {\n\t\tthis.start = System.currentTimeMillis();\n\t\tthis.last = start;\n\t}", "public void tick()\n\t{\n\t\tif (level == 0)\n\t\t\tcamera.followingPlayer = false;\n\t\telse\n\t\t\tcamera.followingPlayer = true;\n\t\t\n\t\tif (true)\n\t\t{\n\t\t\tgameObjectHandler.tick();\n\t\t\t//System.out.println(\"-all ticks done\");\n\t\t\tphysics.applyGravity();\n\t\t\t//System.out.println(\"-Grav done\");\n\t\t\tcollisionHandler.checkCollisions();\n\t\t\t//System.out.println(\"-collisions checked\");\n\t\t\tcamera.tick();\n\t\t\t//System.out.println(\"-camera ticked\");\n\t\t}\n\t\tif (currTransition != null)\n\t\t{\n\t\t\tif (currTransition.isDone())\n\t\t\t\tcurrTransition = null;\n\t\t\telse\n\t\t\t\tcurrTransition.tick();\n\t\t}\n\t\t\n\t\t\t\n\t\n\t\t\n\t}", "public abstract void update(int tick);", "public void tick() {\r\n\t\thunger += (10 + generateRandom());\r\n\t\tthirst += (10 + generateRandom());\r\n\t\ttemp -= (1 + generateRandom());\r\n\t\tboredom += (1 + generateRandom());\r\n\t\tcageMessiness += (1 + generateRandom());\r\n\t}", "private void tick() {\n\t\tkeyManager.tick(); //Updates our KeyManager object\n\t\t\n\t\tif(State.getState() != null) {\n\t\t\tState.getState().tick();\n\t\t}\n\t}", "public final void onWorldTick() {\n onTick();\n }", "public static void tick() {\n control.tick();\n drive.tick();\n shoot.tick();\n shittake.tick();\n }", "@Override\n public void onTick(long arg0) {\n }", "public boolean tick() {\n/* 55 */ this.affected = true;\n/* 56 */ if (this.round > 0)\n/* 57 */ this.round--; \n/* 58 */ return (this.round == 0);\n/* */ }", "@Override\n public void livingTick() {\n super.livingTick();\n }", "public static void tick() {\r\n\r\n\t\t// Switches on the different states of the game that it could be in\r\n\t\tswitch (gameState) {\r\n\t\tcase MAINMENU:\r\n\t\t\t// If there is not already a Main menu instance that exists\r\n\t\t\tif (mainMenu == null) {\r\n\t\t\t\t// Create a new Menu Instance\r\n\t\t\t\tmainMenu = new MainMenu();\r\n\t\t\t}\r\n\t\t\tmainMenu.tick();\r\n\t\t\tbreak;\r\n\t\tcase GAME:\r\n\t\t\t// If there is not already a game instance that exists\r\n\t\t\tif (game == null) {\r\n\t\t\t\t// Create a new game Instance\r\n\t\t\t\tgame = new Game(map, gm);\r\n\t\t\t}\r\n\t\t\t// Every time the state manager ticks it also ticks the current game state\r\n\t\t\tgame.tick();\r\n\t\t\tbreak;\r\n\t\tcase GAME_ONLINE:\r\n\t\t\tif (gameOnline == null) {\r\n\t\t\t\t// Create a new game Instance\r\n\r\n//\t\t\t\tip = JOptionPane.showInputDialog(\"Enter Server Ip\");\r\n//\t\t\t\tportTCP = Integer.parseInt(JOptionPane.showInputDialog(\"Enter TCP PORT\"));\r\n//\t\t\t\tportUDP = Integer.parseInt(JOptionPane.showInputDialog(\"Enter UDP PORT\"));\r\n//\t\t\t\tusername = JOptionPane.showInputDialog(\"Enter Your username\");\r\n\t\t\t\tgameOnline = new GameOnline(username, ip, portUDP, portTCP);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase LEVEL_EDITOR:\r\n\t\t\t// If there is not already a Editor instance that exists\r\n\t\t\tif (levelEditor == null) {\r\n\t\t\t\t// Create a new Editor Instance\r\n\t\t\t\tlevelEditor = new LevelEditor();\r\n\t\t\t}\r\n\t\t\tlevelEditor.tick();\r\n\t\t\tbreak;\r\n\t\tcase LEADERBOARD:\r\n\t\t\tif (leaderBoard == null) {\r\n\t\t\t\tleaderBoard = new Leaderboard();\r\n\t\t\t}\r\n\t\t\tleaderBoard.tick();\r\n\t\t\tbreak;\r\n\t\tcase SPLASHSCREEN_LOADING:\r\n\t\t\tif (splashScreenLoading == null) {\r\n\t\t\t\tsplashScreenLoading = new SplashScreenLoading();\r\n\t\t\t}\r\n\t\t\tsplashScreenLoading.tick();\r\n\t\t\tbreak;\r\n\t\tcase OPTIONS:\r\n\t\t\tbreak;\r\n\t\tcase TESTSCREEN:\r\n\t\t\tif (testScreen == null) {\r\n\t\t\t\ttestScreen = new TestScreen();\r\n\t\t\t}\r\n\t\t\ttestScreen.tick();\r\n\t\t\tbreak;\r\n\t\tcase MAP_SELECT_SCREEN:\r\n\t\t\tif (mapSelectScreen == null) {\r\n\t\t\t\tmapSelectScreen = new MapSelectScreen();\r\n\t\t\t}\r\n\t\t\tmapSelectScreen.tick();\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tlong currentTime = System.currentTimeMillis();\r\n\t\tif (currentTime > nextSecond) {\r\n\t\t\tnextSecond += 1000;\r\n\t\t\tframesInLastSecond = framesInCurrentSecond;\r\n\t\t\tframesInCurrentSecond = 0;\r\n\r\n\t\t\t// System.out.println(framesInLastSecond + \"fps\");\r\n\t\t}\r\n\r\n\t\tframesInCurrentSecond++;\r\n\r\n\t}", "private void emitTicks() {\n if (gameModel == null || lastTickTime == 0) return; // the game is paused\n\n while (lastTickTime < System.currentTimeMillis()) {\n lastTickTime += 1000f / gameModel.ticksPerSecond();\n ;\n for (Entity go : gameModel.entities) go.tick();\n }\n }", "protected void timerTicked() {\n\t\t// 5% of the time, increment or decrement the counter\n\t\tif (Math.random() >= 0.05) return; // do nothing 95% of the time\n\n\t\t// \"flip a coin\" to determine whether to increment or decrement\n\t\tboolean move = Math.random() >= 0.5;\n\t\t\n\t\t// send the move-action to the game\n\t\tgame.sendAction(new CounterMoveAction(this, move));\n\t}", "public void tick(){\n camera.tick(player);\n handler.tick();\n }", "public void tick()\r\n\t{\r\n\t\tduration = (int) (((Sys.getTime() - lastCall) * resolution) / Sys\r\n\t\t\t\t.getTimerResolution());\r\n\t\tlastCall = Sys.getTime();\r\n\t}", "private void tick() {\n\n\t\t//If the player is not dead, has not won, and is has started the game\n\t\tif(!player.dead && !player.win && startScreen.start && !paused) {\n\t\t\tlevel.tick(); //Call level tick method\n\t\t\tplayer.tick(); //Call player tick method\n\t\t}\n\n\t\t//If the player is dead\n\t\tif(player.dead){\n\t\t\t//If the user presses yes\n\t\t\tif(yes) {\n\t\t\t\tplayer.dead = false; //The player is no longer dead\n\t\t\t\tlevel1(); //Load level 1\n\t\t\t}\n\t\t\t//If the user presses no\n\t\t\tif(no) {\n\t\t\t\tSystem.exit(1); //Exit\n\t\t\t}\n\t\t}\n\t\t//If the player won\n\t\tif(player.win) {\n\t\t\t//If the user presses yes\n\t\t\tif(yes) {\n\t\t\t\tplayer.win = false; //The player has no longer won\n\t\t\t\tlevel1(); //Load level 1\n\t\t\t}\n\t\t\t//If the user persses no\n\t\t\tif(no) {\n\t\t\t\tSystem.exit(1); //Exit\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void tick() {\r\n\t\tif(game.getMouseManager().isLeftPressed()){\r\n\t\t\tif(game.getMouseManager().getMouseX()>=118 && game.getMouseManager().getMouseX()<=282){\r\n\t\t\t\tif(game.getMouseManager().getMouseY()>=233 && game.getMouseManager().getMouseY()<=251){\r\n\t\t\t\t\tgame.PlayingState().gameBegin();\r\n\t\t\t\t\tGameStates.setGameStateTo(game.getPlayingState());\r\n\t\t\t\t\tGameStates.setChangeState(false);\r\n\t\t\t\t}\r\n\t\t\t} \r\n\t\t\tif(game.getMouseManager().getMouseX()>=113 && game.getMouseManager().getMouseX()<=287){\r\n\t\t\t\tif(game.getMouseManager().getMouseY()>=271 && game.getMouseManager().getMouseY()<=289){\r\n\t\t\t\t\tGameStates.setGameStateTo(game.getHighScoreState());\r\n\t\t\t\t\tGameStates.setChangeState(false);\r\n\t\t\t\t}\r\n\t\t\t} \r\n\t\t\tif(game.getMouseManager().getMouseX()>=172 && game.getMouseManager().getMouseX()<=226){\r\n\t\t\t\tif(game.getMouseManager().getMouseY()>=309 && game.getMouseManager().getMouseY()<=327){\r\n\t\t\t\t\tScore.storeHighScores();\r\n\t\t\t\t\tgame.stop(); //need changes\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tGameStates.setChangeState(true);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void onTickInGame() {\n\t\tticksExisted += 1;\n\t}", "@Override\n\t\tpublic void onTick(long arg0) {\n\t\t\t\n\t\t}", "void tick(H host, int systemTick);", "@Override\n\tpublic void tick() {\n\t\tif(game.getKeyManager().up) {\n\t\t\tmoveUp();\n\t\t}\n\t\tif(game.getKeyManager().down) {\n\t\t\tmoveDown();\n\t\t}\n\t\tif(game.getKeyManager().right) {\n\t\t\tmoveRight();\n\t\t}\n\t\tif(game.getKeyManager().left) {\n\t\t\tmoveLeft();\n\t\t}\n\t\tscore(); //calls score method\n\t\thasKey(); //calls hasKey method\n\t\thasHammer(); //calls hasHammer method\n\t\thasEnded(Integer.parseInt(getCurrentPositionX()),Integer.parseInt(getCurrentPositionY())); //calls hasEnded method\n\t\tcheckEnemy(); //calls checkEnemy method\n\t}", "protected void tick() {\n\t\tentities.updateEntities();\n\t\tentities.lateUpdateEntities();\n\t\tentities.killUpdateEntities();\n\t\tif(Game.isServer) entities.updateRespawnEntities();\n\t}", "@Override\n\tpublic boolean tick() {\n\t\treturn false;\n\t}", "public void tick()\n\t{\n\t\tglobal++;\n\t\tSystem.out.println(\"Global: \" + global);\n\t\tif(devMode == false)\n\t\t{\n\t\t\tplaceKeys();\n\t\t\tsetSpot();\n\t\t}\n\t}", "public void timer() \r\n\t{\r\n\t\tSeconds.tick();\r\n\t \r\n\t if (Seconds.getValue() == 0) \r\n\t {\r\n\t \tMinutes.tick();\r\n\t \r\n\t \tif (Minutes.getValue() == 0)\r\n\t \t{\r\n\t \t\tHours.tick();\r\n\t \t\t\r\n\t \t\tif(Hours.getValue() == 0)\r\n\t \t\t{\r\n\t \t\t\tHours.tick();\r\n\t \t\t}\r\n\t \t}\r\n\t }\t\t\r\n\t \r\n\t updateTime();\r\n\t }", "@Override\n\tpublic void tick() {\n\t\tif(fighting) {\n\t\t\t//Mostrar numero de ronda\n\t\t\tif(msjRonda) {\n\t\t\t\ttiempoRondaMsj--;\n\t\t\t\tif(tiempoRondaMsj==0) {\n\t\t\t\t\tmsjRonda=false;\n\t\t\t\t\ttiempoRondaMsj=100;\n\t\t\t\t\tmsjFight=true;\n\t\t\t\t\thandler.getGame().setSoundEffect(6,true);\n\t\t\t\t}\n\t\t\t\thandler.getGame().setTiempoQuieto(true);\n\t\t\t}\n\t\t\t//Mostrar mensaje FIGHT!\n\t\t\telse if(msjFight) {\n\t\t\t\ttiempoFightMsj--;\n\t\t\t\tif(tiempoFightMsj==0) {\n\t\t\t\t\tmsjFight=false;\n\t\t\t\t\ttiempoFightMsj=100;\n\t\t\t\t}\n\t\t\t\thandler.getGame().setTiempoQuieto(true);\n\t\t\t}\n\t\t\t//Mostrar el ganador de la ronda\n\t\t\telse if(msjGanador) {\n\t\t\t\thandler.getGame().setTiempoQuieto(true);\n\t\t\t\ttiempoGanador--;\n\t\t\t\tif(tiempoGanador==0) {\n\t\t\t\t\tmsjGanador=false;\n\t\t\t\t\ttiempoGanador=100;\n\t\t\t\t\t//Si gana la CPU no mostramos los puntos que ha hecho (nos saltamos el estado msjGanador)\n\t\t\t\t\tif((mode==1 && resultado==2) || mode==3) {\n\t\t\t\t\t\ttiempoTime=50;\n\t\t\t\t\t\ttiempoVital=100;\n\t\t\t\t\t\tmsjPuntos=false;\n\t\t\t\t\t\tbonus=0;\n\t\t\t\t\t\thandler.getGame().setFade(true);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Actualizar variables para gestionar el final de ronda\n\t\t\t\t\t\taccionFinRonda();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmsjPuntos=true;\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\t\t\t}\n\t\t\t//Mostrar puntos ganados\n\t\t\telse if(msjPuntos) {\n\t\t\t\ttiempoTime--;\n\t\t\t\ttiempoVital--;\n\t\t\t\t//bonus se usa para controlar el tiempo a mostrar despues de llegar hasta el maximo valor del bonus\n\t\t\t\tif(bonus>=(puntosTime+puntosVital+10000)) {\n\t\t\t\t\ttiempoTime=50;\n\t\t\t\t\ttiempoVital=100;\n\t\t\t\t\tmsjPuntos=false;\n\t\t\t\t\thandler.getGame().setFade(true);\t\n\t\t\t\t\tbonus=0;\n\t\t\t\t\t\n\t\t\t\t\t//Actualizar variables para gestionar el final de ronda\n\t\t\t\t\taccionFinRonda();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Comenzamos a hacer tick de la pelea cuando se han mostrado los mensajes iniciales\n\t\t\telse {\n\t\t\t\tif(handler.getGame().getKeyManager().primeraVez && primeraVez2) {\n\t\t\t\t\tprimeraVez2=false;\n\t\t\t\t\t\n\t\t\t\t\tif(handler.getKeyManager().ESC){ // Salir juego\n\t\t\t\t\t\tpause=!pause;\n\t\t\t\t\t\thandler.getGame().setSoundEffect(25,false);\n\t\t\t\t\t\thandler.getGame().quererSalir=true;\n\t\t\t\t\t\thandler.getGame().posAvion=1;\n\t\t\t\t\t\thandler.getGame().xEsc=590;\n\t\t\t\t\t\thandler.getGame().yEsc=335;\n\t\t\t\t\t\thandler.getGame().widthEsc=100;\n\t\t\t\t\t\thandler.getGame().heightEsc=50;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(handler.getGame().quererSalir) {\n\t\t\t\t\t\tif(handler.getKeyManager().enter && handler.getGame().posAvion==2){ // yes\n\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(handler.getKeyManager().enter && handler.getGame().posAvion==1){ // no\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(25,false);\n\t\t\t\t\t\t\thandler.getGame().quererSalir=false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(handler.getKeyManager().D){ // dcha\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(26,false);\n\t\t\t\t\t\t\tif(handler.getGame().posAvion==2) {\n\t\t\t\t\t\t\t\thandler.getGame().posAvion=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\thandler.getGame().posAvion=2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(handler.getKeyManager().A){ // izq\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(26,false);\n\t\t\t\t\t\t\tif(handler.getGame().posAvion==1) {\n\t\t\t\t\t\t\t\thandler.getGame().posAvion=2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\thandler.getGame().posAvion=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\telse {\n\t\t\t\t\t\tif(handler.getKeyManager().P && mode!=3){ // Pause !!!!\n\t\t\t\t\t\t\t//System.out.println(\"Hola\");\n\t\t\t\t\t\t\tpause=!pause;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(!handler.getGame().getKeyManager().primeraVez) {\n\t\t\t\t\tprimeraVez2=true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(pause) {\n\t\t\t\t\t//que se detenga el tiempo de la pelea\n\t\t\t\t\thandler.getGame().setTiempoQuieto(true);\n\t\t\t\t\thandler.getGame().pauseState=new PauseState(handler);\n\t\t\t\t\tpause=false;\n\t\t\t\t\tState.setState(handler.getGame().pauseState);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//que avance el tiempo de la pelea\n\t\t\t\t\thandler.getGame().setTiempoQuieto(false);\n\t\t\t\t\t\n\t\t\t\t\tworld.tick();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Si se ha acabado el tiempo\n\t\t\t\tif(handler.getGame().tiempoRestante==0) {\n\t\t\t\t\t//Y el player 2 tiene mas vida, gana player 2\n\t\t\t\t\tif(handler.getWorld().getEntityManager().getPlayer_1().getVida()<\n\t\t\t\t\t handler.getWorld().getEntityManager().getPlayer_2().getVida()) {\n\t\t\t\t\t\tmarcador2++;\n\t\t\t\t\t\tresultado=2;\n\t\t\t\t\t}\n\t\t\t\t\t//Y el player 1 tiene mas vida, gana el player 1\n\t\t\t\t\telse {\n\t\t\t\t\t\tresultado=1;\n\t\t\t\t\t\tmarcador1++;\n\t\t\t\t\t}\n\t\t\t\t\tfinRonda=true;\n\t\t\t\t}\n\t\t\t\t//Player 2 ha ganado\n\t\t\t\telse if(handler.getWorld().getEntityManager().getPlayer_1().getVida()<=0) {\n\t\t\t\t\t//Comienza la animacion de KO\n\t\t\t\t\tif (handler.getWorld().getEntityManager().getPlayer_1().getAnimacionActual() != 13) {\n\t\t\t\t\t\t//Sonido de grito\n\t\t\t\t\t\tif (handler.getWorld().getEntityManager().getPlayer_1().getFighter() == 1) {\n\t\t\t\t\t\t\t//Chun\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(30);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t//Ryu y Blanka\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(29);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ko) {\n\t\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().KO = true;\n\t\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().KO = true;\n\t\t\t\t\t\t\tresultado=2;\n\t\t\t\t\t\t\tmarcador2++;\n\t\t\t\t\t\t\tko = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().setAnimacionActual(13);\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().getAnimaciones().get(13).setAnimacionEnCurso(true);\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().getAnimaciones().get(13).resetAnimtaion();\n\t\t\t\t\t}\n\t\t\t\t\t//Finaliza la animacion de KO\n\t\t\t\t\telse if(handler.getWorld().getEntityManager().getPlayer_1().getAnimacionActual() == 13\n\t\t\t\t\t\t\t&& handler.getWorld().getEntityManager().getPlayer_1().getAnimaciones().get(13).getIndex() == 4) {\n\t\t\t\t\t\tfinRonda=true;\n\t\t\t\t\t\tko = true;\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().KO = false;\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().KO = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Player 1 ha ganado\n\t\t\t\telse if(handler.getWorld().getEntityManager().getPlayer_2().getVida()<=0) {\n\t\t\t\t\t//Comienza la animacion de KO\n\t\t\t\t\tif (handler.getWorld().getEntityManager().getPlayer_2().getAnimacionActual() != 13) {\n\t\t\t\t\t\t//Sonido de grito\n\t\t\t\t\t\tif (handler.getWorld().getEntityManager().getPlayer_2().getFighter() == 1) {\n\t\t\t\t\t\t\t//Chun\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(30);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t//Ryu y Blanka\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(29);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ko) {\n\t\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().KO = true;\n\t\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().KO = true;\n\t\t\t\t\t\t\tresultado=1;\n\t\t\t\t\t\t\tmarcador1++;\n\t\t\t\t\t\t\tko = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().setAnimacionActual(13);\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().getAnimaciones().get(13).setAnimacionEnCurso(true);\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().getAnimaciones().get(13).resetAnimtaion();\n\t\t\t\t\t}\n\t\t\t\t\t//Finaliza la animacion de KO\n\t\t\t\t\telse if(handler.getWorld().getEntityManager().getPlayer_2().getAnimacionActual() == 13\n\t\t\t\t\t\t\t&& handler.getWorld().getEntityManager().getPlayer_2().getAnimaciones().get(13).getIndex() == 4) {\n\t\t\t\t\t\tfinRonda=true;\n\t\t\t\t\t\tko = true;\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().KO = false;\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().KO = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//SUMAR LOS PUNTOS AL JUGADOR QUE CORRESPONDA SI HA TERMINADO LA RONDA\n\t\t\t\tif(finRonda) {\n\t\t\t\t\t//Si ha ganado la ronda el jugador 1, se le suman los puntos por tiempo y vida\n\t\t\t\t\tif(resultado==1) {\n\t\t\t\t\t\t//TIEMPO\n\t\t\t\t\t\tpuntosTime=handler.getGame().tiempoRestante*100;\n\t\t\t\t\t\t//VIDA\n\t\t\t\t\t\tpuntosVital=(int)handler.getWorld().getEntityManager().getPlayer_1().getVida()*10;\n\t\t\t\t\t\t//Bonus de dificutad:\n\t\t\t\t\t\tif (handler.getGame().mode == 1) {\n\t\t\t\t\t\t\tif (handler.getGame().getDificultad() == 1 || handler.getGame().getDificultad() == 3) {\n\t\t\t\t\t\t\t\t//Medio o incremental\n\t\t\t\t\t\t\t\tpuntosTime *= 1.2;\n\t\t\t\t\t\t\t\tpuntosVital*=1.2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (handler.getGame().getDificultad() == 2) {\n\t\t\t\t\t\t\t\t//Medio o incremental\n\t\t\t\t\t\t\t\tpuntosTime *= 1.4;\n\t\t\t\t\t\t\t\tpuntosVital*=1.4;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(resultado==2) {\n\t\t\t\t\t\t//TIEMPO\n\t\t\t\t\t\tpuntosTime=handler.getGame().tiempoRestante*100;\n\t\t\t\t\t\t//VIDA\n\t\t\t\t\t\tpuntosVital=(int)handler.getWorld().getEntityManager().getPlayer_2().getVida()*10;\n\t\t\t\t\t}\n\t\t\t\t\tmsjGanador=true;\n\t\t\t\t\tif(mode==1) {\n\t\t\t\t\t\tif(resultado==1) {\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(19);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(20);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//Si ha terminado la pelea y se muestran las caras reventadas\n\t\telse {\n\t\t\ttiempoVS--;\n\t\t\tif(tiempoVS<=0) {\n\t\t\t\ttiempoVS=250;\n\t\t\t\tif(mode==2) {\n\t\t\t\t\thandler.getGame().setPuntos1(0);\n\t\t\t\t\thandler.getGame().setPuntos2(0);\n\t\t\t\t\thandler.getGame().setCurrentSong(3);\n\t\t\t\t\tState.setState(handler.getGame().selectFighterState2);\n\t\t\t\t}\n\t\t\t\telse if(mode==1) {\n\t\t\t\t\t//Si ha ganado la CPU se guarda el score\n\t\t\t\t\tif(mostrarScoreLose) {\n\t\t\t\t\t\tState ScoreState = new ScoreState(handler,fighter1,false);\n\t\t\t\t\t\thandler.getGame().setCurrentSong(0);\n\t\t\t\t\t\tState.setState(ScoreState);\n\t\t\t\t\t}\n\t\t\t\t\t//Si se termina el modo historia se guarda el score\n\t\t\t\t\telse if(mostrarScoreWin) {\n\t\t\t\t\t\tState EndGameState = new EndGameState(handler,fighter1,false);\n\t\t\t\t\t\tif(fighter1==0) {\n\t\t\t\t\t\t\thandler.getGame().setCurrentSong(7);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(fighter1==1) {\n\t\t\t\t\t\t\thandler.getGame().setCurrentSong(8);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\thandler.getGame().setCurrentSong(9);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tAssets.initAssets_EndGameState();\n\t\t\t\t\t\tState.setState(EndGameState);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tState selectFighterState1=new SelectFighterState1(handler,fighterToSelectFighter);\n\t\t\t\t\t\thandler.getGame().setCurrentSong(3);\n\t\t\t\t\t\tState.setState(selectFighterState1);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(mode==3) {\n\t\t\t\t\thandler.getGame().finPeleaDemo=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void tick() {\n\n if (StateManager.getState() != null) {\n StateManager.getState().tick();\n }\n this.backgroundFrames--;\n if (this.backgroundFrames == 0) {\n this.backgroundFrames = Const.TOTAL_BACKGROUND_FRAMES;\n }\n//Check all changed variables for the player\n player.tick();\n long elapsed = (System.nanoTime() - time) / (Const.DRAWING_DELAY - (4000 * Enemy.getDifficulty()));\n//Check if enough time is passed to add new enemy or if spawnSpot is available\n if (elapsed > (this.delay - Enemy.getDifficulty() * 300)&& Road.isSpotAvailable()) {\n enemies.add(new Enemy());\n time = System.nanoTime();\n }\n//Loop for checking all changed variables for the enemies and check if they intersects with the player\n for (int j = 0; j < enemies.size(); j++) {\n enemies.get(j).tick();\n if(enemies.get(j).getY() > Const.ROAD_BOTTOM_BORDER + 200){\n Road.getOccupiedSpawnPoints()[Const.SPAWN_POINTS.indexOf(enemies.get(j).getX())] = false;\n player.setScore(player.getScore() + 50);\n enemies.remove(j);\n continue;\n }\n enemyBoundingBox = enemies.get(j).getEnemyRectangle();\n if (player.getBoundingBox().intersects(enemyBoundingBox)) {\n reset();\n if(player.getLives() == 0){\n gameOver();\n }\n break;\n }\n }\n }", "@Override\r\n\tpublic void gameLoopLogic(double time) {\n\r\n\t}", "private void tick() {\n\n if (state == STATE.PAUSE) {\n return;\n }\n\n if (state == STATE.MENU || state == STATE.INSTRUCTIONS) {\n return;\n }\n\n if (spaceShips.size() == 0) {\n reset();\n state = STATE.MENU;\n return;\n }\n\n if (versus && spaceShips.size() == 1) {\n reset();\n state = STATE.MENU;\n versus = false;\n return;\n }\n\n if (!versus) {\n\n enemyGenerator.tick();\n powerUpGenerator.tick();\n score.tick();\n difficulty.tick();\n collision();\n }\n collisionVS();\n }", "void setTick(int tick);", "public void tick()\n\t{\n\t\tif(cantLeftPress && !leftPressed)\n\t\t{\n\t\t\tcantLeftPress = false;\n\t\t}\n\t\telse if(justLeftPressed)\n\t\t{\n\t\t\tcantLeftPress = true;\n\t\t\tjustLeftPressed = false;\n\t\t}\n\t\telse if(!cantLeftPress && leftPressed)\n\t\t{\n\t\t\tjustLeftPressed = true;\n\t\t}\n\t\t\n\t\t//right pressing\n\t\tif(cantRightPress && !rightPressed)\n\t\t{\n\t\t\tcantRightPress = false;\n\t\t}\n\t\telse if(justRightPressed = true)\n\t\t{\n\t\t\tcantRightPress = true;\n\t\t\tjustRightPressed = false;\n\t\t}\n\t\telse if(!cantRightPress && rightPressed)\n\t\t{\n\t\t\tjustRightPressed = true;\n\t\t}\n\t\t\n\t}", "public void tick() {\r\n if (!paused) {\r\n// if (auto) {\r\n// calculateBestDirection();\r\n// }\r\n snake.move();\r\n if (hasEatenApple()) {\r\n snake.eatApple();\r\n createApple();\r\n score++;\r\n }\r\n if (hasCollided()) {\r\n createSnake();\r\n startGame();\r\n }\r\n drawGame();\r\n }\r\n keyPressedThisTick = false; \r\n }", "@Override\n public void onTick() {\n \n }", "public void tick() {\n\t\tif (timer!=Game.timeCount)\n\t\t\thandler.addObject(new EnemyPlane(Game.WIDTH-38,r.nextInt(Game.HEIGHT-50), ID.Enemy, handler));\n\t\t\ttimer = Game.timeCount;\n\t}", "public void tick() \n {\n //Einfache Bildschirmausgabe. Kann spaeter in Subklasse beliebig ueberschreiben werden.\n zaehler++;\n zaehler = zaehler % 2;\n if ( zaehler == 1 ) \n {\n System.out.println( \"Tick!\" );\n }\n else \n {\n System.out.println( \"Tack!\" );\n }\n }", "void incrementTick();", "public boolean onTick();", "public void tick() \n\t{\n\t\tif (handler.getMouseManager().checkLeftPressed() \n\t\t\t\t&& handler.getMouseManager().getMousePosX() > 285 \n\t\t\t\t&& handler.getMouseManager().getMousePosX() < 515)\n\t\t{\n\t\t\tif (handler.getMouseManager().getMousePosY() > 177 && handler.getMouseManager().getMousePosY() <254)\n\t\t\t{\n\t\t\t\tsetState(handler.getGame().getSelectCharacterState());\n\t\t\t}\n\t\t\telse if (handler.getMouseManager().getMousePosY() > 345 && handler.getMouseManager().getMousePosY() < 422)\n\t\t\t{\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t}", "void drawCurrentTick();", "int getFinalTick();", "public void timeTick()\r\n\t{\r\n\t\tnumberDisplay1.increment();\r\n\t}", "@Override\n public void run() {\n long previousTime = System.currentTimeMillis();\n long timeSinceLastTick = 0L;\n long timeSinceLastDisplayFrame = 0L;\n\n final double millisecondsPerDisplayFrame = 1000.0 / DISPLAY_FPS;\n\n while (this.game.isRunning() && !this.game.isGameOver()) {\n long currentTime = System.currentTimeMillis();\n long elapsedTime = currentTime - previousTime;\n timeSinceLastTick += elapsedTime;\n timeSinceLastDisplayFrame += elapsedTime;\n\n if (timeSinceLastTick >= MILLISECONDS_PER_TICK) { // Check if enough time has passed to update the physics.\n this.updatePhysics(); // Perform one 'step' in the game.\n timeSinceLastTick = 0L;\n }\n if (timeSinceLastDisplayFrame >= millisecondsPerDisplayFrame) { // Check if enough time has passed to refresh the display.\n this.game.notifyListeners(timeSinceLastTick); // Tell the asteroids panel that it should refresh.\n timeSinceLastDisplayFrame = 0L;\n }\n\n previousTime = currentTime;\n }\n }", "public void tick() {\r\n\r\n\t\tif (!targeted) {\r\n\t\t\tTarget = acquireTarget();\r\n\t\t} else if (timeSinceLastShot > firingSpeed) {\r\n\t\t\tangle = calculateAngle();\r\n\t\t\tshoot(Target);\r\n\t\t\ttimeSinceLastShot = 0;\r\n\t\t}\r\n\t\tif (Target == null || Target.isAlive() == false) {\r\n\t\t\ttargeted = false;\r\n\t\t}\r\n\r\n\t\ttimeSinceLastShot += Delta();\r\n\r\n\t\tfor (Dart dart : darts) {\r\n\t\t\tdart.tick();\r\n\t\t}\r\n\r\n\t\tdraw();\r\n\t}", "public void tick() {\n\t\tfor(GameObject object : gameObject) {\n\t\t\tif(object instanceof Opponents) {\n\t\t\t\t((Opponents) object).move(tickTime);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Game has advanced by \" + tickTime + \" ms = \" + tickTime/1000 + \" ticks.\");\n\t}", "public synchronized void tick(){\r\n\t\ttime++;\r\n\t\tnotifyAll();\r\n\t}", "int time()\n\t{\n\t\treturn totalTick;\n\t}", "@Override\r\n\t\tprotected void onTick() {\n\r\n\t\t}", "public void setTick(long tick) {\n this.tick = tick;\n }", "public void setTick(long tick) {\n this.tick = tick;\n }", "public void tick() {\n\t\tmFrameCount++;\n\t\t\n\t\tif (mStopwatch.getElapsedTime() > 1000) {\n\t\t\tmFramesPerSecond = mFrameCount;\n\t\t\tmFrameCount = 0;\n\t\t\t\n\t\t\tmStopwatch.restart();\n\t\t}\n\t}", "public int getTick() {\r\n return tick;\r\n }", "public long getTick() {\n return tick;\n }", "public long getTick() {\n return tick;\n }", "private void tick(boolean catchUp) {\n if (catchUp && lastTick != 0) {\n long sinceLastTick = System.currentTimeMillis() - lastTick;\n long ticksMissed = (sinceLastTick / 50) - 1;\n\n if (ticksMissed > 0) {\n Server.getLogger().warn(\"Trying to catch up! Last server tick took \" + sinceLastTick + \"ms \" +\n \"(or the time of \" + (ticksMissed + 1) + \" ticks)\");\n\n for (int i = 0; i < ticksMissed; i++) {\n tick(false);\n }\n }\n }\n\n lastTick = System.currentTimeMillis();\n PuddingServer.getComponentManager().tickAll();\n }", "public void tick() {\n if (showTutorial) {\n if (backButton.isPressed()) {\n showTutorial = false;\n }\n } else {\n if (tutorialButton.isPressed()) {\n showTutorial = true;\n }\n titleAnimation.tick();\n }\n startButton.tick();\n highscoreButton.tick();\n tutorialButton.tick();\n backButton.tick();\n }", "public void tick(){\n\t\tfor(int i=0;i<object.size(); i++){\n\t\t\ttempObject = object.get(i);\n\t\t\ttempObject.tick(object);\n\t\t\tif(tempObject.getId() == ObjectId.Player){\n\t\t\t\tif(tempObject.position.x == MouseInput.exitPosition.x&&\n\t\t\t\t tempObject.position.y == MouseInput.exitPosition.y){\n\t\t\t\t\tgame.score += game.timeLeft;\n\t\t\t\t\tSystem.out.println(\"exited\");\n\t\t\t\t\tgame.levelCompleted=true;\n\t\t\t\t}\n\t\t\t\tif(game.player.health <= 0){\n\t\t\t\t\tobject.clear();\n\t\t\t\t\tgame.gameLoop=1;\n\t\t\t\t\tgame.State=STATE.GAMEOVER;\n\t\t\t}\n\t\t}\n\t\t// bomb is null when exploded\t\t\n\t\tif(Bomb.exploded(bomb, object)){\n\t\t\tbomb=null;\t\t\t\n\t\t}\n\t\t\n\t\tif(System.currentTimeMillis()-Player.tHit < 3000){\n\t\t\tPlayer.invincible = true;\n\t\t}\n\t\telse{\n\t\t\tPlayer.invincible = false;\n\t\t}\n\t\t\n\t\tif(Power.consumed(power, object)) {\n\t\t\tpower=null;\n\t\t}\n\t\t}\n\t\t\n\t}", "public void onTick()\n\t{\n\t\tsuper.onTick();\n\t\ttime++;\n\t\tif(time>=40)\n\t\t{\n\t\t\tif(direction == 0)\n\t\t\t{\n\t\t\t\tdirection = 1;\n\t\t\t\ttime = 0;\n\t\t\t}\n\t\t\telse if(direction == 1)\n\t\t\t{\n\t\t\t\tdirection = 0;\n\t\t\t\ttime = 0;\n\t\t\t}\n\t\t}\n\t\tif(direction == 0)\n\t\t{\n\t\t\tleft();\n\t\t\tif(hitcher!= null)\n\t\t\t{\n\t\t\t\thitcher.left(speed);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if(direction == 1)\n\t\t{\n\t\t\tright();\n\t\t\tif(hitcher!=null)\n\t\t\t{\n\t\t\t\thitcher.right(speed);\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void tick() {\r\n up = keys[KeyEvent.VK_UP];\r\n left = keys[KeyEvent.VK_LEFT];\r\n right = keys[KeyEvent.VK_RIGHT];\r\n\r\n j = keys[KeyEvent.VK_J];\r\n k = keys[KeyEvent.VK_K];\r\n l = keys[KeyEvent.VK_L];\r\n\r\n q = keys[KeyEvent.VK_Q];\r\n w = keys[KeyEvent.VK_W];\r\n e = keys[KeyEvent.VK_E];\r\n\r\n z = keys[KeyEvent.VK_Z];\r\n x = keys[KeyEvent.VK_X];\r\n c = keys[KeyEvent.VK_C];\r\n\r\n space = keys[KeyEvent.VK_SPACE];\r\n pause = keys[KeyEvent.VK_P];\r\n enter = keys[KeyEvent.VK_ENTER];\r\n\r\n save = keys[KeyEvent.VK_S];\r\n load = keys[KeyEvent.VK_L];\r\n }", "public void tick() {\n\t\thealth = GamePanel.getPlayer().health;\n\t\tmaxhealth = GamePanel.getPlayer().maxHealth;\n\t\tstatus = GamePanel.getPlayer().status;\t\n\t\tmanaLevel = GamePanel.getPlayer().mana;\n\t\tmaxManaLevel = GamePanel.getPlayer().maxMana;\n\t\tinv.tick();\n\t}", "public abstract void onTick(long millisUntilFinished);", "public void tick() {\n --this.peekTime;\n }", "private void tick(){\n \n this.village.tick();\n if(this.village.getTurn() > 1){\n this.lastEventTextBox.setText(this.currentEvent.getEventResultText());\n }\n this.currentEvent = this.getNewEvent();\n this.updateUIAfterTick();\n \n }", "public int getTick() {\r\n\t\treturn tick;\r\n\t}", "@Override\n public void reactTo(Tick tick) {\n\ttry {\n\t Thread.sleep(FRAME_INTERVAL_MILLIS);\n\t} catch (InterruptedException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t}\n\tscreen.update();\n\tmpq.add(new Tick(tick.time() + 1));\n }", "public void tick() {\n\t\t\n\t\t// no longer active, do nothing \n\t\tif (!isActive) { return; }\n\t\t\n\t\t// gather data on surroundings and on bot\n\t\tcloseBots = sens.getCloseBots(sens.getBotSize()+5);\n\t\tseenBots = sens.getCloseBots(100.0);\n\t\tclosestWhiteLED = sens.getClosestWhiteLED();\n\t\t\n\t\t// decide what LEDs need to be on and what colour\n\t\tupdateLEDs();\n\t\t\n\t\t// if white or green LED is on, don't move. Look at the direction only\n\t\tif (this.LEDManager.hasAllLEDsSetOff()) {\n\t\t\tupdateDesiredDirection();\n\t\t\tmoveOrTurn();\n\t\t} else {\n\t\t\tturnIfNeeded();\n\t\t}\n\t\t\n\t}", "public void tick()\n {\n if ( --ticksUntilVSync == 0 )\n {\n ticksUntilVSync = ticksUntilVSyncLatch;\n copper.restart();\n irqController.triggerIRQ( IRQController.IRQSource.VBLANK );\n }\n if ( dmaController.isCopperDMAEnabled() )\n {\n copper.tick();\n }\n\n hpos++;\n if ( hpos == 0xd8 ) { // $d8 = 216 = 8 pixel hblank + 200 pixel + 8 pixel hblank\n hpos = 0;\n\n if ( amiga.isNTSC() )\n {\n // toggle long/short line flag, only applicable for NTSC amigas\n longLine ^= 0b1000_0000;\n }\n\n vpos++;\n /*\n | Normal | Interlaced\nPAL | 283 | 567\nNTSC| 241 | 483\n */\n\n if ( isInterlaced() )\n {\n final int maxY = amiga.isPAL() ? 283 : 241;\n if ( vpos >= maxY )\n {\n longFrame = 0x8000;\n }\n }\n\n int maxY;\n if ( amiga.isPAL() )\n {\n maxY = 29 + (isInterlaced() ? 567 : 283);\n }\n else\n {\n maxY = 21 + (isInterlaced() ? 483 : 241);\n }\n if ( vpos == maxY ) {\n vpos = 0;\n longFrame = 0;\n copper.restart();\n }\n }\n }", "public void tick(){\n if(healthPoints <= 0){\n sprite.setVisible(false);\n }\n if(isInvulnerable){\n invulnTimer++;\n }\n if(invulnTimer >= invulnTicks){\n setInvulnerable(false);\n invulnTimer = 0;\n }\n //System.out.println(stuckCounter);\n //System.out.println(isStuck);\n\n if(isStuck){\n stuckCounter++;\n }\n else{\n stuckCounter = 0;\n }\n\n x += dx;\n\n y += dy;\n sprite.setY((int) y);\n sprite.setX((int) x);\n }" ]
[ "0.8010256", "0.7940257", "0.7940257", "0.7890731", "0.78268564", "0.7754783", "0.7754783", "0.7754783", "0.7743611", "0.7714077", "0.7714077", "0.7702281", "0.7701187", "0.76456577", "0.7613388", "0.7613388", "0.754418", "0.75109124", "0.7500349", "0.7493792", "0.7493792", "0.7493792", "0.7493792", "0.7493792", "0.7493792", "0.7493792", "0.74579096", "0.7441515", "0.74212235", "0.7371672", "0.736729", "0.7364784", "0.72225654", "0.72153157", "0.71886444", "0.7103461", "0.7099643", "0.7097978", "0.70849586", "0.705456", "0.70413303", "0.70357585", "0.7033711", "0.7025753", "0.7024012", "0.70162797", "0.70037556", "0.69984424", "0.69728124", "0.6970506", "0.69599724", "0.6959096", "0.6956502", "0.693895", "0.6933007", "0.6915786", "0.6891712", "0.6882413", "0.6878989", "0.6852387", "0.6848305", "0.68419117", "0.6829056", "0.6825135", "0.68164986", "0.6813144", "0.68105495", "0.68042916", "0.6795758", "0.67923903", "0.67891777", "0.67827696", "0.6775245", "0.67739344", "0.67562723", "0.6754076", "0.6748296", "0.67410624", "0.67365396", "0.67331797", "0.67238796", "0.6719283", "0.6719283", "0.6703332", "0.6699685", "0.66994685", "0.66994685", "0.66987234", "0.66754776", "0.6672873", "0.6654824", "0.66510296", "0.66250587", "0.6594259", "0.6587893", "0.6569793", "0.6565295", "0.65620565", "0.65616363", "0.65517056", "0.65470314" ]
0.0
-1
The game tick after someone has died.
private void physicsTickDead() { // Check the round end counter if (checkRoundEndCounter()) { return; } // Physics stuff setThrusts(); moveEverything(deltaTimeDead); ageScoreMarkers(deltaTimeAlive); shootBullets(); collideTankToWall(); collideBulletToWall(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean deathTick(Game game) {\n\t\treturn false;\n\t}", "public void lifeLost() {\n\n\t\tif (invincipleTimer <= currentTickCount) {\n\t\t\tSystem.out.println(\"Life Lost!\");\n\n\t\t\thealth--;\n\t\t\tinvincipleTimer = currentTickCount + invicibleLength;\n\t\t}\n\t}", "@Override\n \tpublic void notifyDeath() {\n \t\tGame.GAME_STATE = Game.GAME_STATE_DEAD;\n \t\t\n \t}", "public static void tick() {\n if (tickTime == 0L) {\n tickTime = System.currentTimeMillis();\n } else {\n System.err.println(\"Must call tock before tick\");\n System.exit(1);\n }\n }", "@Override\n\tpublic void onTickInGame() {\n\t\tticksExisted += 1;\n\t}", "public void tick(){\n\t\tfor(int i=0;i<object.size(); i++){\n\t\t\ttempObject = object.get(i);\n\t\t\ttempObject.tick(object);\n\t\t\tif(tempObject.getId() == ObjectId.Player){\n\t\t\t\tif(tempObject.position.x == MouseInput.exitPosition.x&&\n\t\t\t\t tempObject.position.y == MouseInput.exitPosition.y){\n\t\t\t\t\tgame.score += game.timeLeft;\n\t\t\t\t\tSystem.out.println(\"exited\");\n\t\t\t\t\tgame.levelCompleted=true;\n\t\t\t\t}\n\t\t\t\tif(game.player.health <= 0){\n\t\t\t\t\tobject.clear();\n\t\t\t\t\tgame.gameLoop=1;\n\t\t\t\t\tgame.State=STATE.GAMEOVER;\n\t\t\t}\n\t\t}\n\t\t// bomb is null when exploded\t\t\n\t\tif(Bomb.exploded(bomb, object)){\n\t\t\tbomb=null;\t\t\t\n\t\t}\n\t\t\n\t\tif(System.currentTimeMillis()-Player.tHit < 3000){\n\t\t\tPlayer.invincible = true;\n\t\t}\n\t\telse{\n\t\t\tPlayer.invincible = false;\n\t\t}\n\t\t\n\t\tif(Power.consumed(power, object)) {\n\t\t\tpower=null;\n\t\t}\n\t\t}\n\t\t\n\t}", "private void tick() {\n handler.tick();\n if (gameStart == GAME_STATE.Game) {\n hud.tick();\n menu.tick();\n\n // determines player lives + game over\n if (HUD.LIVES <= 0) {\n HUD.LIVES = 5;\n gameStart = GAME_STATE.GameOver;\n } else if (gameStart == GAME_STATE.Menu || gameStart == GAME_STATE.GameOver || gameStart == GAME_STATE.GameVictory) {\n menu.tick();\n }\n }\n }", "void die() {\n alive = false;\n setChanged();\n notifyObservers(new Pair<>(\"increaseLives\", -1));\n }", "public void die(){\n \tif (resetdelay<=0){ //if he didn't just die\r\n \t\tresetdelay = 100; //gives the frog 100 frames of invincibility\r\n \t\tlives-=1;\r\n \t}\r\n }", "public void death() {\n\t\t\tif (died==false) {\n\t\t\t\tlives-=1;\n\t\t\t\tdeathSound.play();//play the death sound\n\t\t\t\t\n\t\t\t}\n\t\t\tpauseGame(deathSound.getLength());//pause the game until the death sound is over\n\t\t\tif (lives==0) {//if you have no lives left, you died forever and the flag changes.\n\t\t\t\tdeath=true;\n\t\t\t}\n\t\t\tdied=true;\n\t\t}", "private void tick(boolean catchUp) {\n if (catchUp && lastTick != 0) {\n long sinceLastTick = System.currentTimeMillis() - lastTick;\n long ticksMissed = (sinceLastTick / 50) - 1;\n\n if (ticksMissed > 0) {\n Server.getLogger().warn(\"Trying to catch up! Last server tick took \" + sinceLastTick + \"ms \" +\n \"(or the time of \" + (ticksMissed + 1) + \" ticks)\");\n\n for (int i = 0; i < ticksMissed; i++) {\n tick(false);\n }\n }\n }\n\n lastTick = System.currentTimeMillis();\n PuddingServer.getComponentManager().tickAll();\n }", "public void cycleDay() {\r\n player.gametick();\r\n }", "public void incrementDeathTicks() {\n this.deathTicks++;\n }", "protected void timerTicked() {\n\t\t// 5% of the time, increment or decrement the counter\n\t\tif (Math.random() >= 0.05) return; // do nothing 95% of the time\n\n\t\t// \"flip a coin\" to determine whether to increment or decrement\n\t\tboolean move = Math.random() >= 0.5;\n\t\t\n\t\t// send the move-action to the game\n\t\tgame.sendAction(new CounterMoveAction(this, move));\n\t}", "public void tick(){\n\t\tinput.tick();\n\t\t\n\t\tif(!this.gameOver){\n\t\t\tthis.updateGame();\n\t\t}else{\n\t\t\tif(input.down){\n\t\t\t\tbird.x = 80;\n\t\t\t\tbird.y = (HEIGHT-50)/2;\n\t\t\t\tthis.numGoals = 0;\n\t\t\t\tthis.obstacles.clear();\n\t\t\t\tthis.goals.clear();\n\t\t\t\tthis.gameOver = false;\n\t\t\t\tthis.begin = true;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "protected void onTick() {\n//Count down\nif (w > 0) {\nSystem.out.println(w + \" seconds left.\");\n\nw--;\n} else {\nSystem.out.println(\"Bye, bye\");\nmyAgent.doDelete(); //Delete this agent\n}\n}", "public void tick(){\r\n if(timer != 0)\r\n timer++;\r\n }", "private void tick() {\n\n if (StateManager.getState() != null) {\n StateManager.getState().tick();\n }\n this.backgroundFrames--;\n if (this.backgroundFrames == 0) {\n this.backgroundFrames = Const.TOTAL_BACKGROUND_FRAMES;\n }\n//Check all changed variables for the player\n player.tick();\n long elapsed = (System.nanoTime() - time) / (Const.DRAWING_DELAY - (4000 * Enemy.getDifficulty()));\n//Check if enough time is passed to add new enemy or if spawnSpot is available\n if (elapsed > (this.delay - Enemy.getDifficulty() * 300)&& Road.isSpotAvailable()) {\n enemies.add(new Enemy());\n time = System.nanoTime();\n }\n//Loop for checking all changed variables for the enemies and check if they intersects with the player\n for (int j = 0; j < enemies.size(); j++) {\n enemies.get(j).tick();\n if(enemies.get(j).getY() > Const.ROAD_BOTTOM_BORDER + 200){\n Road.getOccupiedSpawnPoints()[Const.SPAWN_POINTS.indexOf(enemies.get(j).getX())] = false;\n player.setScore(player.getScore() + 50);\n enemies.remove(j);\n continue;\n }\n enemyBoundingBox = enemies.get(j).getEnemyRectangle();\n if (player.getBoundingBox().intersects(enemyBoundingBox)) {\n reset();\n if(player.getLives() == 0){\n gameOver();\n }\n break;\n }\n }\n }", "public void onMushroomTimerTick() {\r\n\t\tgame.tryToPlantMushroom();\r\n\t}", "public boolean gameOverTick(Game game) {\n\t\treturn false;\n\t}", "@Test\n void die() {\n getGame().start();\n getGame().move(getPlayer(), Direction.WEST);\n getGame().move(getPlayer(), Direction.WEST);\n assertThat(getPlayer().isAlive()).isFalse();\n verify(observer).levelLost();\n assertThat(getGame().isInProgress()).isFalse();\n }", "public void die() {\n if (dayCountDown == 0) {\n new Holdable(getLocation()).init();\n }\n }", "public void tick(){\n oilLevel --;\n maintenance --;\n happiness --;\n health --;\n boredom ++;\n }", "protected void kill() {\n\t\tsetDeathTime(0.6);\n\t}", "public void gameEnded() {}", "public void tick() {\r\n }", "public void tick() {\r\n\t\thunger += (10 + generateRandom());\r\n\t\tthirst += (10 + generateRandom());\r\n\t\ttemp -= (1 + generateRandom());\r\n\t\tboredom += (1 + generateRandom());\r\n\t\tcageMessiness += (1 + generateRandom());\r\n\t}", "@Override\n\tpublic boolean isGameTied() {\t\n\t\treturn false;\n\t}", "public void onTick(long i) {\n life--;\n y++;\n }", "public void tick() {\r\n tick++;\r\n }", "public final void dyE() {\n AppMethodBeat.i(29674);\n com.tencent.mm.blink.b.HQ().o(new Runnable() {\n public final void run() {\n AppMethodBeat.i(29666);\n w.this.ynU = true;\n al.af(w.this.ynV);\n al.n(w.this.ynV, 300);\n AppMethodBeat.o(29666);\n }\n });\n AppMethodBeat.o(29674);\n }", "public abstract void systemTurnEnds(long ms);", "public void tick() {\n\t}", "public void tick() {\n\t}", "protected void tick() {\n\t\tentities.updateEntities();\n\t\tentities.lateUpdateEntities();\n\t\tentities.killUpdateEntities();\n\t\tif(Game.isServer) entities.updateRespawnEntities();\n\t}", "public void tick() {\n\t\tif (timer!=Game.timeCount)\n\t\t\thandler.addObject(new EnemyPlane(Game.WIDTH-38,r.nextInt(Game.HEIGHT-50), ID.Enemy, handler));\n\t\t\ttimer = Game.timeCount;\n\t}", "@Override\n public void die() {\n// System.out.println(\"STATE = dead\");\n state = ENEMY_DEAD;\n stateTime = 0;\n velocity.x = 0;\n }", "public void countDown() {\n makeTimer();\n int delay = 100;\n int period = 30;\n timer.scheduleAtFixedRate(new TimerTask() {\n public void run() {\n tick();\n updatePlayerHealthUI();\n }\n }, delay, period);\n }", "public void die() {\n\t\tif (this.isGodModeEnabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.life--;\n\t\tresetPlayerPosition();\n\t\tthis.collisionBox.setRect(this.tilePositionX, this.tilePositionY,\n\t\t\t\tthis.SCALE, this.SCALE);\n\t}", "public void tick(){\n if(healthPoints <= 0){\n sprite.setVisible(false);\n }\n if(isInvulnerable){\n invulnTimer++;\n }\n if(invulnTimer >= invulnTicks){\n setInvulnerable(false);\n invulnTimer = 0;\n }\n //System.out.println(stuckCounter);\n //System.out.println(isStuck);\n\n if(isStuck){\n stuckCounter++;\n }\n else{\n stuckCounter = 0;\n }\n\n x += dx;\n\n y += dy;\n sprite.setY((int) y);\n sprite.setX((int) x);\n }", "public void setDied();", "public void tick()\n{\n y+=speed;\n\n for(int i=0; i<game.ea.size(); i++)\n {\n EntityA tempEnt= game.ea.get(i);\n if(Physics.Coliision(this,tempEnt))\n {\n c.removeEntity(tempEnt); //zeby po trafieniu znikal pocisk\n c.removeEntity(this);\n game.setEnemy_killed(game.getEnemy_killed()+1);\n\n }\n }\n\n/*\n* If Enemy is out of bounds player get - points\n* and loses some stamina.\n*\n* Enemies are removed from list after disapears\n */\n\n if(y>(App.getHEIGHT()-20)*2)\n {\n App.addHealth(-10);\n App.addPOINTS(-3);\n c.removeEntity(this);\n }\n\n anim.runAnimation();\n\n /*\n * If App is not in game state it doesn't\n * need to have any enemies\n */\n\n if(App.State != App.STATE.GAME)\n {\n delEnemies();\n\n }\n}", "@Override\n\tpublic void tick() {\n\t\tif(fighting) {\n\t\t\t//Mostrar numero de ronda\n\t\t\tif(msjRonda) {\n\t\t\t\ttiempoRondaMsj--;\n\t\t\t\tif(tiempoRondaMsj==0) {\n\t\t\t\t\tmsjRonda=false;\n\t\t\t\t\ttiempoRondaMsj=100;\n\t\t\t\t\tmsjFight=true;\n\t\t\t\t\thandler.getGame().setSoundEffect(6,true);\n\t\t\t\t}\n\t\t\t\thandler.getGame().setTiempoQuieto(true);\n\t\t\t}\n\t\t\t//Mostrar mensaje FIGHT!\n\t\t\telse if(msjFight) {\n\t\t\t\ttiempoFightMsj--;\n\t\t\t\tif(tiempoFightMsj==0) {\n\t\t\t\t\tmsjFight=false;\n\t\t\t\t\ttiempoFightMsj=100;\n\t\t\t\t}\n\t\t\t\thandler.getGame().setTiempoQuieto(true);\n\t\t\t}\n\t\t\t//Mostrar el ganador de la ronda\n\t\t\telse if(msjGanador) {\n\t\t\t\thandler.getGame().setTiempoQuieto(true);\n\t\t\t\ttiempoGanador--;\n\t\t\t\tif(tiempoGanador==0) {\n\t\t\t\t\tmsjGanador=false;\n\t\t\t\t\ttiempoGanador=100;\n\t\t\t\t\t//Si gana la CPU no mostramos los puntos que ha hecho (nos saltamos el estado msjGanador)\n\t\t\t\t\tif((mode==1 && resultado==2) || mode==3) {\n\t\t\t\t\t\ttiempoTime=50;\n\t\t\t\t\t\ttiempoVital=100;\n\t\t\t\t\t\tmsjPuntos=false;\n\t\t\t\t\t\tbonus=0;\n\t\t\t\t\t\thandler.getGame().setFade(true);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Actualizar variables para gestionar el final de ronda\n\t\t\t\t\t\taccionFinRonda();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmsjPuntos=true;\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\t\t\t}\n\t\t\t//Mostrar puntos ganados\n\t\t\telse if(msjPuntos) {\n\t\t\t\ttiempoTime--;\n\t\t\t\ttiempoVital--;\n\t\t\t\t//bonus se usa para controlar el tiempo a mostrar despues de llegar hasta el maximo valor del bonus\n\t\t\t\tif(bonus>=(puntosTime+puntosVital+10000)) {\n\t\t\t\t\ttiempoTime=50;\n\t\t\t\t\ttiempoVital=100;\n\t\t\t\t\tmsjPuntos=false;\n\t\t\t\t\thandler.getGame().setFade(true);\t\n\t\t\t\t\tbonus=0;\n\t\t\t\t\t\n\t\t\t\t\t//Actualizar variables para gestionar el final de ronda\n\t\t\t\t\taccionFinRonda();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Comenzamos a hacer tick de la pelea cuando se han mostrado los mensajes iniciales\n\t\t\telse {\n\t\t\t\tif(handler.getGame().getKeyManager().primeraVez && primeraVez2) {\n\t\t\t\t\tprimeraVez2=false;\n\t\t\t\t\t\n\t\t\t\t\tif(handler.getKeyManager().ESC){ // Salir juego\n\t\t\t\t\t\tpause=!pause;\n\t\t\t\t\t\thandler.getGame().setSoundEffect(25,false);\n\t\t\t\t\t\thandler.getGame().quererSalir=true;\n\t\t\t\t\t\thandler.getGame().posAvion=1;\n\t\t\t\t\t\thandler.getGame().xEsc=590;\n\t\t\t\t\t\thandler.getGame().yEsc=335;\n\t\t\t\t\t\thandler.getGame().widthEsc=100;\n\t\t\t\t\t\thandler.getGame().heightEsc=50;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(handler.getGame().quererSalir) {\n\t\t\t\t\t\tif(handler.getKeyManager().enter && handler.getGame().posAvion==2){ // yes\n\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(handler.getKeyManager().enter && handler.getGame().posAvion==1){ // no\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(25,false);\n\t\t\t\t\t\t\thandler.getGame().quererSalir=false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(handler.getKeyManager().D){ // dcha\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(26,false);\n\t\t\t\t\t\t\tif(handler.getGame().posAvion==2) {\n\t\t\t\t\t\t\t\thandler.getGame().posAvion=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\thandler.getGame().posAvion=2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(handler.getKeyManager().A){ // izq\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(26,false);\n\t\t\t\t\t\t\tif(handler.getGame().posAvion==1) {\n\t\t\t\t\t\t\t\thandler.getGame().posAvion=2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\thandler.getGame().posAvion=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\telse {\n\t\t\t\t\t\tif(handler.getKeyManager().P && mode!=3){ // Pause !!!!\n\t\t\t\t\t\t\t//System.out.println(\"Hola\");\n\t\t\t\t\t\t\tpause=!pause;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(!handler.getGame().getKeyManager().primeraVez) {\n\t\t\t\t\tprimeraVez2=true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(pause) {\n\t\t\t\t\t//que se detenga el tiempo de la pelea\n\t\t\t\t\thandler.getGame().setTiempoQuieto(true);\n\t\t\t\t\thandler.getGame().pauseState=new PauseState(handler);\n\t\t\t\t\tpause=false;\n\t\t\t\t\tState.setState(handler.getGame().pauseState);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//que avance el tiempo de la pelea\n\t\t\t\t\thandler.getGame().setTiempoQuieto(false);\n\t\t\t\t\t\n\t\t\t\t\tworld.tick();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Si se ha acabado el tiempo\n\t\t\t\tif(handler.getGame().tiempoRestante==0) {\n\t\t\t\t\t//Y el player 2 tiene mas vida, gana player 2\n\t\t\t\t\tif(handler.getWorld().getEntityManager().getPlayer_1().getVida()<\n\t\t\t\t\t handler.getWorld().getEntityManager().getPlayer_2().getVida()) {\n\t\t\t\t\t\tmarcador2++;\n\t\t\t\t\t\tresultado=2;\n\t\t\t\t\t}\n\t\t\t\t\t//Y el player 1 tiene mas vida, gana el player 1\n\t\t\t\t\telse {\n\t\t\t\t\t\tresultado=1;\n\t\t\t\t\t\tmarcador1++;\n\t\t\t\t\t}\n\t\t\t\t\tfinRonda=true;\n\t\t\t\t}\n\t\t\t\t//Player 2 ha ganado\n\t\t\t\telse if(handler.getWorld().getEntityManager().getPlayer_1().getVida()<=0) {\n\t\t\t\t\t//Comienza la animacion de KO\n\t\t\t\t\tif (handler.getWorld().getEntityManager().getPlayer_1().getAnimacionActual() != 13) {\n\t\t\t\t\t\t//Sonido de grito\n\t\t\t\t\t\tif (handler.getWorld().getEntityManager().getPlayer_1().getFighter() == 1) {\n\t\t\t\t\t\t\t//Chun\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(30);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t//Ryu y Blanka\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(29);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ko) {\n\t\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().KO = true;\n\t\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().KO = true;\n\t\t\t\t\t\t\tresultado=2;\n\t\t\t\t\t\t\tmarcador2++;\n\t\t\t\t\t\t\tko = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().setAnimacionActual(13);\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().getAnimaciones().get(13).setAnimacionEnCurso(true);\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().getAnimaciones().get(13).resetAnimtaion();\n\t\t\t\t\t}\n\t\t\t\t\t//Finaliza la animacion de KO\n\t\t\t\t\telse if(handler.getWorld().getEntityManager().getPlayer_1().getAnimacionActual() == 13\n\t\t\t\t\t\t\t&& handler.getWorld().getEntityManager().getPlayer_1().getAnimaciones().get(13).getIndex() == 4) {\n\t\t\t\t\t\tfinRonda=true;\n\t\t\t\t\t\tko = true;\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().KO = false;\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().KO = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Player 1 ha ganado\n\t\t\t\telse if(handler.getWorld().getEntityManager().getPlayer_2().getVida()<=0) {\n\t\t\t\t\t//Comienza la animacion de KO\n\t\t\t\t\tif (handler.getWorld().getEntityManager().getPlayer_2().getAnimacionActual() != 13) {\n\t\t\t\t\t\t//Sonido de grito\n\t\t\t\t\t\tif (handler.getWorld().getEntityManager().getPlayer_2().getFighter() == 1) {\n\t\t\t\t\t\t\t//Chun\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(30);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t//Ryu y Blanka\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(29);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ko) {\n\t\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().KO = true;\n\t\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().KO = true;\n\t\t\t\t\t\t\tresultado=1;\n\t\t\t\t\t\t\tmarcador1++;\n\t\t\t\t\t\t\tko = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().setAnimacionActual(13);\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().getAnimaciones().get(13).setAnimacionEnCurso(true);\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().getAnimaciones().get(13).resetAnimtaion();\n\t\t\t\t\t}\n\t\t\t\t\t//Finaliza la animacion de KO\n\t\t\t\t\telse if(handler.getWorld().getEntityManager().getPlayer_2().getAnimacionActual() == 13\n\t\t\t\t\t\t\t&& handler.getWorld().getEntityManager().getPlayer_2().getAnimaciones().get(13).getIndex() == 4) {\n\t\t\t\t\t\tfinRonda=true;\n\t\t\t\t\t\tko = true;\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().KO = false;\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().KO = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//SUMAR LOS PUNTOS AL JUGADOR QUE CORRESPONDA SI HA TERMINADO LA RONDA\n\t\t\t\tif(finRonda) {\n\t\t\t\t\t//Si ha ganado la ronda el jugador 1, se le suman los puntos por tiempo y vida\n\t\t\t\t\tif(resultado==1) {\n\t\t\t\t\t\t//TIEMPO\n\t\t\t\t\t\tpuntosTime=handler.getGame().tiempoRestante*100;\n\t\t\t\t\t\t//VIDA\n\t\t\t\t\t\tpuntosVital=(int)handler.getWorld().getEntityManager().getPlayer_1().getVida()*10;\n\t\t\t\t\t\t//Bonus de dificutad:\n\t\t\t\t\t\tif (handler.getGame().mode == 1) {\n\t\t\t\t\t\t\tif (handler.getGame().getDificultad() == 1 || handler.getGame().getDificultad() == 3) {\n\t\t\t\t\t\t\t\t//Medio o incremental\n\t\t\t\t\t\t\t\tpuntosTime *= 1.2;\n\t\t\t\t\t\t\t\tpuntosVital*=1.2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (handler.getGame().getDificultad() == 2) {\n\t\t\t\t\t\t\t\t//Medio o incremental\n\t\t\t\t\t\t\t\tpuntosTime *= 1.4;\n\t\t\t\t\t\t\t\tpuntosVital*=1.4;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(resultado==2) {\n\t\t\t\t\t\t//TIEMPO\n\t\t\t\t\t\tpuntosTime=handler.getGame().tiempoRestante*100;\n\t\t\t\t\t\t//VIDA\n\t\t\t\t\t\tpuntosVital=(int)handler.getWorld().getEntityManager().getPlayer_2().getVida()*10;\n\t\t\t\t\t}\n\t\t\t\t\tmsjGanador=true;\n\t\t\t\t\tif(mode==1) {\n\t\t\t\t\t\tif(resultado==1) {\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(19);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(20);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//Si ha terminado la pelea y se muestran las caras reventadas\n\t\telse {\n\t\t\ttiempoVS--;\n\t\t\tif(tiempoVS<=0) {\n\t\t\t\ttiempoVS=250;\n\t\t\t\tif(mode==2) {\n\t\t\t\t\thandler.getGame().setPuntos1(0);\n\t\t\t\t\thandler.getGame().setPuntos2(0);\n\t\t\t\t\thandler.getGame().setCurrentSong(3);\n\t\t\t\t\tState.setState(handler.getGame().selectFighterState2);\n\t\t\t\t}\n\t\t\t\telse if(mode==1) {\n\t\t\t\t\t//Si ha ganado la CPU se guarda el score\n\t\t\t\t\tif(mostrarScoreLose) {\n\t\t\t\t\t\tState ScoreState = new ScoreState(handler,fighter1,false);\n\t\t\t\t\t\thandler.getGame().setCurrentSong(0);\n\t\t\t\t\t\tState.setState(ScoreState);\n\t\t\t\t\t}\n\t\t\t\t\t//Si se termina el modo historia se guarda el score\n\t\t\t\t\telse if(mostrarScoreWin) {\n\t\t\t\t\t\tState EndGameState = new EndGameState(handler,fighter1,false);\n\t\t\t\t\t\tif(fighter1==0) {\n\t\t\t\t\t\t\thandler.getGame().setCurrentSong(7);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(fighter1==1) {\n\t\t\t\t\t\t\thandler.getGame().setCurrentSong(8);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\thandler.getGame().setCurrentSong(9);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tAssets.initAssets_EndGameState();\n\t\t\t\t\t\tState.setState(EndGameState);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tState selectFighterState1=new SelectFighterState1(handler,fighterToSelectFighter);\n\t\t\t\t\t\thandler.getGame().setCurrentSong(3);\n\t\t\t\t\t\tState.setState(selectFighterState1);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(mode==3) {\n\t\t\t\t\thandler.getGame().finPeleaDemo=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void tick() {\r\n\r\n\t\tif (!targeted) {\r\n\t\t\tTarget = acquireTarget();\r\n\t\t} else if (timeSinceLastShot > firingSpeed) {\r\n\t\t\tangle = calculateAngle();\r\n\t\t\tshoot(Target);\r\n\t\t\ttimeSinceLastShot = 0;\r\n\t\t}\r\n\t\tif (Target == null || Target.isAlive() == false) {\r\n\t\t\ttargeted = false;\r\n\t\t}\r\n\r\n\t\ttimeSinceLastShot += Delta();\r\n\r\n\t\tfor (Dart dart : darts) {\r\n\t\t\tdart.tick();\r\n\t\t}\r\n\r\n\t\tdraw();\r\n\t}", "private void gameTimerOnFinish() {\n if (currentScreenGameState == GameState.PLAYING) {\n stopGame();\n }\n }", "public boolean tick(){\n\t\tif(System.currentTimeMillis() - time > TICK_TIME){\n\t\t\tif(this.getSprite().equals(\"bomb1.gif\")){\n\t\t\t\tthis.setSprite(\"bomb2.gif\");\n\t\t\t}else{\n\t\t\t\tthis.setSprite(\"bomb1.gif\");\n\t\t\t}\n\t\t\ttime = System.currentTimeMillis();\n\t\t\tif(--maxTicks <= 0){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn exploded;\n\t}", "public void tick() {\n if (ShulkerEntity.this.world.getDifficulty() != Difficulty.PEACEFUL) {\n --this.attackTime;\n LivingEntity livingentity = ShulkerEntity.this.getAttackTarget();\n ShulkerEntity.this.getLookController().setLookPositionWithEntity(livingentity, 180.0F, 180.0F);\n double d0 = ShulkerEntity.this.getDistanceSq(livingentity);\n if (d0 < 400.0D) {\n if (this.attackTime <= 0) {\n this.attackTime = 20 + ShulkerEntity.this.rand.nextInt(10) * 20 / 2;\n ShulkerEntity.this.world.addEntity(new ShulkerBulletEntity(ShulkerEntity.this.world, ShulkerEntity.this, livingentity, ShulkerEntity.this.getAttachmentFacing().getAxis()));\n ShulkerEntity.this.playSound(SoundEvents.ENTITY_SHULKER_SHOOT, 2.0F, (ShulkerEntity.this.rand.nextFloat() - ShulkerEntity.this.rand.nextFloat()) * 0.2F + 1.0F);\n }\n } else {\n ShulkerEntity.this.setAttackTarget((LivingEntity)null);\n }\n\n super.tick();\n }\n }", "public void tick() {\n\t\t//If Statement to make sure this section of the code only runs once using the runOnce variable\n\t\tif(runOnce==1) {\n\t\t\t//Set the game state for street fighter to menu\n\t\t\tGame.gameState=STATE.MENU;\n\t\t\t//Instantiante Game class object\n\t\t\tgame = new Game();\n\t\t\trunOnce=2;\n\t\t} \n\t\t\n\t\t//If Statement to make sure this section of the code only runs once using the runOnce variable\n\t\tif(runOnce==2) {\n\t\t\t//Call the game class tick method\n\t\t\tgame.tick();\n\t\t}\n\t\t\n\t\t\n\t\t//Checks if the user quit the game\n\t\tif(KeyInput.quit==true) {\n\t\t\t//Call the resetVariables method to reset all the important variables \n\t\t\tgame.resetVariables();\n\t\t\trunOnce=1;\n\t\t\t\n\t\t\t//Set the game state to the arcade menu state\n\t\t\tState.setState(handler.getGame().startingState);\n\t\t}\n\t}", "@Override\r\n public void timePassed(double dt) {\r\n return;\r\n }", "void lose() {\n System.out.println(\"You have lost the game!!!\" + \"\\n\" + \"You spend: \" + Time.getSecondsPassed() + \" seconds playing the game!\");\n System.exit(0);\n\n }", "@Override\n public void timerTicked() {\n //subtracts one second from the timer of the current team\n if(state.getCurrentTeamsTurn() == Team.RED_TEAM) {\n state.setRedTeamSeconds(state.getRedTeamSeconds() - 1);\n } else {\n state.setBlueTeamSeconds(state.getBlueTeamSeconds() - 1);\n }\n }", "public void justDie()\n\t{\n\t\tsynchronized (this) {\n\t\tcurrentState.justDie();\n\t\t}\n\t}", "public void lifeLost() {\n\t\t--lives;\n\t\tif (lives == 0) {\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public static long tock() {\n if (tickTime == 0L) {\n System.err.println(\"Must call tick before tock\");\n System.exit(1);\n }\n\n long ret = System.currentTimeMillis() - tickTime;\n tickTime = 0L;\n return ret;\n\n }", "private void worldTimerDecrementer() {\n worldTimer--;\n }", "public void die() {\n\t\tthis.hp = 0;\n\t\tthis.currentState = PlayerState.DIED;\n\t\tthis.sword = null;\n\t\tthis.setCurrentAnimation(\"dieing_\" + orientation, FRAME_DURATION);\n\t}", "private void die() {\r\n\t\tisAlive = false;\r\n\t}", "private void tick() {\n\n\t\t//If the player is not dead, has not won, and is has started the game\n\t\tif(!player.dead && !player.win && startScreen.start && !paused) {\n\t\t\tlevel.tick(); //Call level tick method\n\t\t\tplayer.tick(); //Call player tick method\n\t\t}\n\n\t\t//If the player is dead\n\t\tif(player.dead){\n\t\t\t//If the user presses yes\n\t\t\tif(yes) {\n\t\t\t\tplayer.dead = false; //The player is no longer dead\n\t\t\t\tlevel1(); //Load level 1\n\t\t\t}\n\t\t\t//If the user presses no\n\t\t\tif(no) {\n\t\t\t\tSystem.exit(1); //Exit\n\t\t\t}\n\t\t}\n\t\t//If the player won\n\t\tif(player.win) {\n\t\t\t//If the user presses yes\n\t\t\tif(yes) {\n\t\t\t\tplayer.win = false; //The player has no longer won\n\t\t\t\tlevel1(); //Load level 1\n\t\t\t}\n\t\t\t//If the user persses no\n\t\t\tif(no) {\n\t\t\t\tSystem.exit(1); //Exit\n\t\t\t}\n\t\t}\n\t}", "public abstract void onTick(long millisUntilFinished);", "public abstract void userTurnEnds(long ms);", "public void tick() {\n\t\tif (Math.abs(disToPlayerX()) > Math.abs(disToPlayerY())) {\r\n\t\t\tif (disToPlayerX()<0) {\r\n\t\t\t\tx -= speed;\t//moves enemy to the left\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tx += speed; //moves enemy to the right\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (disToPlayerY()<0) {\r\n\t\t\t\ty-=speed; //moves enemy up\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ty+=speed; //moves enemy down\r\n\t\t\t}\r\n\t\t}\r\n\t\tenemyRectangle.setLocation((int)x,(int) y); //updates hitbox of enemy\r\n\r\n\t\t//checks all enemies and see if they run into player\r\n\t\tfor (int i=0;i<c.getEnemys().size();i++) {\r\n\t\t\tif (enemyRectangle.getBounds().intersects(player.getRectangle().getBounds())) {\r\n\t\t\t\tkillEnemy(); //removes the enemy\r\n\t\t\t\tPlayer.health -=10; //removes 10 health\r\n\t\t\t\tbreak; //doesn't work without this BREAK. DO NOT REMOVE\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//checks all bullets if they hit an enemy\r\n\t\tfor (int i = 0;i<c.getBullets().size();i++) {\r\n\t\t\tif (enemyRectangle.getBounds().intersects(c.getBullets().get(i).getRect().getBounds())) {\r\n\t\t\t\tkillEnemy(); //removes enemy\r\n\t\t\t\tc.removeBullet(c.getBullets().get(i)); //removes the bullet\r\n\t\t\t\tPlayer.score += 50; //adds 50 to the score\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public abstract void onDie();", "public void die() {\n\t\tSpriteObject obj = PhysicsObject.getCollidableAt(player1.getX(),player1.getY() + player1.getImage().getHeight() + 3);\n\t\tSpriteObject obj2 = PhysicsObject.getCollidableAt(player1.getX() + player1.getImage().getWidth() ,player1.getY() + player1.getImage().getHeight() + 3);\n\t\tif ((obj instanceof Tile && ((Tile) obj).getType() == TileType.spike) || (obj2 instanceof Tile && ((Tile) obj2).getType() == TileType.spike)) \n\t\t{\n\t\t\tplayer1.death();\n\t\t}\n\n\t\tif (player1.getY() > 1500) {\n\t\t\tplayer1.death();\n\t\t}\n\t}", "@Override\n protected void afterKill() {\n if (timeAfterDeath > 0) {\n --timeAfterDeath;\n } else {\n if (finalAnimation > 0) {\n --finalAnimation;\n } else {\n remove();\n }\n }\n }", "@Override\r\n\tpublic void tick() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tick() {\n\t\t\r\n\t}", "public final void onWorldTick() {\n onTick();\n }", "public void tick() {\n if (this.entity.hurtResistantTime == 19) {\n this.entity.resetActiveHand();\n }\n LivingEntity target = this.entity.getAttackTarget();\n if (target != null) {\n boolean isSee = this.entity.getEntitySenses().canSee(target);\n boolean isSeeTimeFound = this.seeTime > 0;\n if (isSee != isSeeTimeFound) {\n this.seeTime = 0;\n }\n\n if (isSee) {\n ++this.seeTime;\n } else {\n --this.seeTime;\n }\n\n this.entity.getLookController().setLookPositionWithEntity(target, 30.0F, 30.0F);\n\n if (this.entity.isHandActive()) {\n if (!isSee && this.seeTime < -10) {\n this.entity.resetActiveHand();\n } else if (isSee) {\n int i = this.entity.getItemInUseMaxCount();\n if (i >= 20) {\n this.entity.resetActiveHand();\n this.entity.attackEntityWithRangedAttack(target, BowItem.getArrowVelocity(i));\n this.attackTime = this.attackCooldown;\n }\n }\n } else if (--this.attackTime <= 0 && this.seeTime >= -10) {\n this.entity.setActiveHand(ProjectileHelper.getHandWith(this.entity, Items.BOW));\n }\n\n }\n }", "public void livingTick() {\n super.livingTick();\n this.oFlap = this.wingRotation;\n this.oFlapSpeed = this.destPos;\n this.destPos = (float)((double)this.destPos + (double)(this.onGround ? -1 : 4) * 0.3D);\n this.destPos = MathHelper.clamp(this.destPos, 0.0F, 1.0F);\n if (!this.onGround && this.wingRotDelta < 1.0F) {\n this.wingRotDelta = 1.0F;\n }\n\n this.wingRotDelta = (float)((double)this.wingRotDelta * 0.9D);\n Vec3d vec3d = this.getMotion();\n if (!this.onGround && vec3d.y < 0.0D) {\n this.setMotion(vec3d.mul(1.0D, 0.6D, 1.0D));\n }\n\n this.wingRotation += this.wingRotDelta * 2.0F;\n if (!this.world.isRemote && this.isAlive() && !this.isChild() && getGender()==Gender.FEMALE && --this.timeUntilNextEgg <= 0) {\n this.playSound(SoundEvents.ENTITY_CHICKEN_EGG, 1.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);\n this.entityDropItem(Items.EGG);\n this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000;\n }\n\n ++this.eatTicks;\n ItemStack itemstack = this.getItemStackFromSlot(EquipmentSlotType.MAINHAND);\n if (this.canEatItem(itemstack)) {\n if (this.eatTicks > 600) {\n ItemStack itemstack1 = itemstack.onItemUseFinish(this.world, this);\n if (!itemstack1.isEmpty()) {\n this.setItemStackToSlot(EquipmentSlotType.MAINHAND, itemstack1);\n }\n\n this.eatTicks = 0;\n } else if (this.eatTicks > 560 && this.rand.nextFloat() < 0.1F) {\n this.playSound(this.getEatSound(itemstack), 1.0F, 1.0F);\n this.world.setEntityState(this, (byte)45);\n }\n }\n\n }", "public void kill()\n\t{\n\t\tthis.isDead = true;\n\t\tSystem.out.println(name + \" died!\");\n\t\t//GamePanel.player.playerCombatant.awardXP(this.getXP());\n\n\t\t//TODO: Reload last save or Exit\n\t}", "@Override\n public void onTick(long arg0) {\n }", "public void tick() {\n\t\tfor(GameObject object : gameObject) {\n\t\t\tif(object instanceof Opponents) {\n\t\t\t\t((Opponents) object).move(tickTime);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Game has advanced by \" + tickTime + \" ms = \" + tickTime/1000 + \" ticks.\");\n\t}", "protected abstract void tick();", "void tick(long tickSinceStart);", "void endGame () {\n gameOver = true;\n System.out.println(\"Game over\");\n timer.cancel();\n }", "@Override\r\n\tpublic void onDeath() {\n\t\t\r\n\t}", "private void inGame() {\n\n if (!ingame) {\n timer.stop();\n\n }\n }", "public void die()\n\t{\n\t\talive = false;\n\t}", "@Override\r\n\tpublic void gameLoopLogic(double time) {\n\r\n\t}", "@Override\n public void die() {\n _brain.mouth.say(\"aaarrrrrgggh...\");\n }", "public void tick() {\n if (alpha > life ){\n alpha -= (life - 0.0001f);\n }else {\n handler.removeObject(this);\n }\n }", "@Override\n\tpublic boolean tick() {\n\t\treturn false;\n\t}", "@Override\n public void livingTick() {\n super.livingTick();\n }", "public void tick() {\r\n this.platform = new Rectangle(x, y, w, h);\r\n if(y> Java2DGame.SCREENHEIGHT){\r\n delete();\r\n }\r\n if(platform.intersects(Board.darkness.deathZone)){\r\n delete();\r\n }\r\n }", "private void checkDeath() {\n\t\tif (player.getLives() == 0) {\n shooty.setIv(new Image(\"/img/shipdeath.png\"));\n\t\t\tdie();\n\t\t}\n\t\t// another way to die: the blocks hit you\n\t\tif(btnList.get(0).getLayoutY() >= FATAL_BUTTON_DIST) {\n\t\t\tendGame.play();\n\t\t\tdie();\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tSystem.out.println(\"Tempo scaduto.\");\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif(yourTurn) {\r\n\t\t\t\t\t\tendGame(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tendGame(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch(Exception e) {\r\n\t\t\t\t} finally {\r\n\t\t\t\t\ttimer.cancel();\r\n\t\t\t\t\ttimer = null;\r\n\t\t\t\t\tendTurn = null;\r\n\t\t\t\t}\r\n\t\t\t}", "public void tick() {\n\t\ttick(1);\n\t}", "@Override\n\tprotected void onDeathUpdate() {\n\t\thelpers.values().forEach(DragonHelper::onDeathUpdate);\n\n\t\t// unmount any riding entities\n\t\tremovePassengers();\n\n\t\t// freeze at place\n\t\tmotionX = motionY = motionZ = 0;\n\t\trotationYaw = prevRotationYaw;\n\t\trotationYawHead = prevRotationYawHead;\n\n\t\tif (isEgg()) {\n\t\t\tsetDead();\n\t\t} else {\n\t\t\t// actually delete entity after the time is up\n\t\t\tif (deathTime >= getMaxDeathTime()) {\n\t\t\t\tsetDead();\n\t\t\t}\n\t\t}\n\n\t\tdeathTime++;\n\t}", "private void onPingingTimerTick()\r\n {\r\n EneterTrace aTrace = EneterTrace.entering();\r\n try\r\n {\r\n try\r\n {\r\n myConnectionManipulatorLock.lock();\r\n try\r\n {\r\n // Send the ping message.\r\n myUnderlyingOutputChannel.sendMessage(myPreserializedPingMessage);\r\n\r\n // Schedule the next ping.\r\n myPingingTimer.change(myPingFrequency);\r\n }\r\n finally\r\n {\r\n myConnectionManipulatorLock.unlock();\r\n }\r\n }\r\n catch (Exception err)\r\n {\r\n // The sending of the ping message failed - the connection is broken.\r\n cleanAfterConnection(true, true);\r\n }\r\n }\r\n finally\r\n {\r\n EneterTrace.leaving(aTrace);\r\n }\r\n }", "@Override\r\n\t// Corpse is in an inventory\r\n\tpublic void tick(Location currentLocation, Actor actor) {\r\n\t\tif (shouldRise) {\r\n\t\t\tif (riseIn == 0) {\r\n\t\t\t\triseFromTheDead(currentLocation, actor);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\triseIn--; // Decrement\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void onTick(long millisUntilFinished) {\n\t\t }", "public boolean die(){\n //scoreboard incremented by one\n Counter.add(10);\n healthbar.remove();\n getWorld().addObject(new ScoreIndicator(10), getX(),getY());\n getWorld().addObject(new DeadEntity(getImage()),getX(),getY());\n return super.die();\n }", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "void tick();" ]
[ "0.7031289", "0.6989064", "0.6740533", "0.6726203", "0.6720664", "0.6705943", "0.6703104", "0.67015713", "0.664341", "0.6629605", "0.6608252", "0.6597049", "0.65880597", "0.65596473", "0.6521867", "0.6515566", "0.6513339", "0.6487663", "0.64418626", "0.64341563", "0.6422662", "0.6411637", "0.6404172", "0.6396736", "0.6394247", "0.63903594", "0.6375031", "0.6364812", "0.6363135", "0.63533896", "0.6335895", "0.6329187", "0.63248724", "0.63248724", "0.6320173", "0.63012886", "0.6296294", "0.62889224", "0.62812394", "0.6271124", "0.6247564", "0.62466156", "0.6242133", "0.6239631", "0.6234915", "0.62301534", "0.6226825", "0.6216578", "0.62136734", "0.6208119", "0.6206931", "0.61967266", "0.61948323", "0.6177982", "0.6176036", "0.6168542", "0.6167246", "0.61583394", "0.6156389", "0.615377", "0.6153221", "0.61457247", "0.6142858", "0.61418253", "0.6139893", "0.6139893", "0.6138487", "0.61372846", "0.6137057", "0.61343044", "0.6133387", "0.6120949", "0.61132795", "0.61119", "0.6109925", "0.6109457", "0.6104711", "0.60979384", "0.60842335", "0.6079868", "0.6078258", "0.60708916", "0.606954", "0.6065889", "0.60654646", "0.60649306", "0.6051513", "0.60498214", "0.6049272", "0.6040259", "0.60360205", "0.6032952", "0.6030116", "0.6030116", "0.6030116", "0.6030116", "0.6030116", "0.6030116", "0.6030116", "0.6029873" ]
0.65572274
14
Read buttons, set spaceship thrusts
private void setThrusts() { for (int i = 0; i < players.length; i++) { Player player = players[i]; // Apply drag always tanks[i].acceleration = tanks[i].velocity .scalarProduct(-tankDrag); tanks[i].angularAcceleration = -tanks[i].angularVelocity * tankSteeringDrag; // Skip if dead if (!tanks[i].isAlive()) { continue; } // Get skid steer button presses boolean leftPressed = player.getButton(BUTTON_LEFT).isPressed(); boolean rightPressed = player.getButton(BUTTON_RIGHT).isPressed(); if (leftPressed) { if (rightPressed) { // Forward tanks[i].acceleration.add(new Vector2D(tankThrust, tanks[i].angle, true)); } else { // Left // tanks[i].angle -= Math.PI / stepsPerHalfTurn; tanks[i].angularAcceleration -= tankSteeringAccel; } } else { if (rightPressed) { // Right // tanks[i].angle += Math.PI / stepsPerHalfTurn; tanks[i].angularAcceleration += tankSteeringAccel; } else { // Stop } } // Rotate velocity so that the tanks can't slide sideways /*Vector2D unit = new Vector2D(1d, tanks[i].angle, true); double velocityMagnitude = tanks[i].velocity.dotProduct(unit); tanks[i].velocity = new Vector2D(velocityMagnitude, tanks[i].angle, true);*/ tanks[i].velocity.setAngle(tanks[i].angle); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void norm3JS() {\n\n // Drive\n axLeftX.setAxis(leftJoystick, 0); //Mecanum (Arcade) Left/Right turn\n axLeftY.setAxis(leftJoystick, 1); //Mecanum (Arcade) Fwd/Bkwd\n axRightX.setAxis(rightJoystick, 0); //Mecanum Rotate orientation\n axRightY.setAxis(rightJoystick, 1); //unassigned\n\n btnGyroReset.setButton(rightJoystick, 6); // reset gyro to 0\n\n btnHoldLeft.setButton(rightJoystick, 4); //??\n btnHoldCenter.setButton(rightJoystick,3); //??\n btnHoldRight.setButton(rightJoystick, 5); //??\n \n // Gear\n btnPickupGear.setButton(coJoystick, 2); // Pickup gear off floor\n btnPlaceGear.setButton(coJoystick, 5); // Place gear on ship peg\n \n // Shooter\n btnShooter.setButton(coJoystick, 1); // Start shooter then feeder(s)\n btnAgitator.setButton(coJoystick, 3); // Agitate the ball bin\n \n // Climb\n btnClimber.setButton(coJoystick, 8); // Climber rotating\n \n }", "private void getInput() { \n\t\txMove = 0;\n\t\tyMove = 0;\n\t\tif(handler.getKeyManager().pause) {\n\t\t\tMenuState menu = new MenuState(handler);\n\t\t\tState.setState(menu);\n\t\t}\n\t\t\n\t\tif(handler.getKeyManager().pKey) {\n\t\t\tif(gear != 0)\n\t\t\t\tchangeGear(0);\n\t\t}\n\t\tif(handler.getKeyManager().oKey) {\n\t\t\tif(gear != 1 && vector[0] == 0)\n\t\t\t\tchangeGear(1);\n\t\t}\n\t\tif(handler.getKeyManager().iKey) {\n\t\t\tif(gear != 2)\n\t\t\t\tchangeGear(2);\n\t\t}\n\t\tif(handler.getKeyManager().uKey) {\n\t\t\tif(gear != 3 && vector[0] == 0)\n\t\t\t\tchangeGear(3);\n\t\t}\n\t\t\n\t\t\t\n\t\tif(handler.getKeyManager().gas) {\n\t\t\tif(GameState.getGameActive() == 0 || GameState.getGameActive() == 4) {\n\t\t\t\tif(vector[0] < topSpeed && gear != 2 && gear != 0)\n\t\t\t\t\tvector[0] += accel;\n\t\t\t} else if (GameState.getGameActive() == 1 || GameState.getGameActive() == 2) {\n\t\t\t\tif(overSelector == 0) {\n\t\t\t\t\tConfigState config = new ConfigState(handler);\n\t\t\t\t\tState.setState(config);\n\t\t\t\t}else if(overSelector == 1) {\n\t\t\t\t\tMenuState menustate = new MenuState(handler);\n\t\t\t\t\tState.setState(menustate);\n\t\t\t\t}else if(overSelector == 2) {\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(!handler.getKeyManager().gas || gear == 2) {\n\t\t\t\tif(vector[0] > accel)\n\t\t\t\t\tvector[0] -= accel;\n\t\t\t\telse if(vector[0] > 0 && vector [0] <= 5 * accel)\n\t\t\t\t\tvector[0] = 0;\n\t\t}\n\t\t\n\t\tif(handler.getKeyManager().brake || (gear == 0 && vector[0] > 0)) {\n\t\t\tif(vector[0] > 0 && vector[0] - 5 * accel > 0)\n\t\t\t\tvector[0] -= 5 * accel;\n\t\t\telse if(vector[0] > 0)\n\t\t\t\tvector[0] = 0;\n\t\t}\n\t\t\n\t\tif(handler.getKeyManager().left) {\n\t\t\tif((GameState.getGameActive() == 0 || GameState.getGameActive() == 4) && vector[0] > 0) {\n\t\t\t\tif(dTurn < 0.1)\n\t\t\t\t\tdTurn += 0.02;\n\t\t\t\tif(vector[1] - dTurn <= 0)\n\t\t\t\t\tvector[1] = (double)(2 * Math.PI);\n\t\t\t\tvector[1] -= dTurn;\n\t\t\t\tif(dTurn < 0.05)\n\t\t\t\t\tdTurn += 0.01;\n\t\t\t\t//System.out.println(\"R\");\n\t\t\t} else if(GameState.getGameActive() == 1 || GameState.getGameActive() == 2) {\n\t\t\t\tif(overSelector > 0) {\n\t\t\t\t\toverSelector--;\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(!handler.getKeyManager().left && dTurn > 0) {\n\t\t\tdTurn = 0;\n\t\t}\n\t\t\n\t\tif(handler.getKeyManager().right) {\n\t\t\tif((GameState.getGameActive() == 0 || GameState.getGameActive() == 4) && vector[0] > 0) {\n\t\t\t\tif(dTurn < 0.1)\n\t\t\t\t\tdTurn += 0.02;\n\t\t\t\tvector[1] += dTurn;\n\t\t\t\t//System.out.println(dTurn);\n\t\t\t\tif(vector[1] >= (double)(2 * Math.PI))\n\t\t\t\t\tvector[1] = 0;\n\t\t\t}else if(GameState.getGameActive() == 1 || GameState.getGameActive() == 2) {\n\t\t\t\tif(overSelector < buttons.length - 1) {\n\t\t\t\t\toverSelector++;\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(!handler.getKeyManager().right && dTurn > 0) {\n\t\t\tdTurn = 0;\n\t\t}\n\t\t\n\t\tif((gear == 3) || ((gear == 2 || gear== 0) && prevGear == 3)) {\n\t\t\txMove = (double)(vector[0] * Math.cos(vector[1]));\n\t\t\tyMove = (double)(vector[0] * Math.sin(vector[1]));\n\t\t}else if(gear == 1 || ((gear == 2 || gear == 0) && prevGear == 1)) {\n\t\t\txMove = (double)(-vector[0] * Math.cos(vector[1]));\n\t\t\tyMove = (double)(-vector[0] * Math.sin(vector[1]));\n\t\t}\n\t}", "public void liftArm(){armLifty.set(-drivePad.getThrottle());}", "public void update(){\n\t\t//Arm up (spool out cable from winch while going up)\n\t\tif(Robot.stick.getRawButton(4)){\n\t\t\ttalonArm.set(SmartDashboard.getNumber(\"Climber Arm Speed: \", 0.5));\n\t\t\twinchGroup.set(-SmartDashboard.getNumber(\"Climber Winch Speed: \", 0.25));\n\t\t}\n\t\t//Arm down\n\t\telse if(Robot.stick.getRawButton(2)){\n\t\t\ttalonArm.set(-SmartDashboard.getNumber(\"Climber Arm Speed: \", 0.5));\n\t\t}\n\t\t//Stop moving\n\t\telse{\n\t\t\ttalonArm.set(0);\n\t\t\twinchGroup.set(0);\n\t\t}\n\t\t//Climb with winch\n\t\tif(Robot.stick.getRawButton(1)){\n\t\t\twinchGroup.set(SmartDashboard.getNumber(\"Climber Winch Speed: \", 0.25));\n\t\t}\n\t}", "protected void execute() { \t\n \tif (isLowered != Robot.oi.getOperator().getRawButton(2)) {\n \t\tisLowered = Robot.oi.getOperator().getRawButton(2);\n \t\tif (isLowered)\n \t\t\tRobot.gearSubsystem.getRaiser().set(DoubleSolenoid.Value.kForward);\n \t\telse\n \t\t\tRobot.gearSubsystem.getRaiser().set(DoubleSolenoid.Value.kReverse);\n \t}\n \t\n \tif (Robot.oi.getOperator().getRawButton(11))\n \t\tRobot.gearSubsystem.getIntakeMotor().set(0.75);\n \telse if (Robot.oi.getOperator().getRawButton(12))\n \t\tRobot.gearSubsystem.getIntakeMotor().set(0);\n \telse if (Robot.oi.getOperator().getRawButton(10))\n \t\tRobot.gearSubsystem.getIntakeMotor().set(-0.75);\n }", "private static void norm2JS() {\n\n // Drive\n axLeftX.setAxis(leftJoystick, 0); //Mecanum (Arcade) Left/Right turn\n axLeftY.setAxis(leftJoystick, 1); //Mecanum (Arcade) Fwd/Bkwd\n axRightX.setAxis(rightJoystick, 0); //Mecanum Rotate orientation\n axRightY.setAxis(rightJoystick, 1); //unassigned\n\n btnGyroReset.setButton(rightJoystick, 6); // reset gyro to 0\n\n btnHoldLeft.setButton(rightJoystick, 4); //??\n btnHoldCenter.setButton(rightJoystick,3); //??\n btnHoldRight.setButton(rightJoystick, 5); //??\n \n // Gear\n btnPickupGear.setButton(leftJoystick, 2); // Pickup gear off floor\n btnPlaceGear.setButton( leftJoystick, 5); // Place gear on ship peg\n \n // Shooter\n btnShooter.setButton( leftJoystick, 1); // Start shooter then feeder(s)\n btnAgitator.setButton(leftJoystick, 3); // Agitate the ball bin\n \n // Climb\n btnClimber.setButton(leftJoystick, 8); // Climber rotating\n\n }", "public void checkInputs() {\n\n gearShift = driveStick.getXButtonReleased();\n slow = driveStick.getAButtonReleased();\n\n manualClimb = driveStick.getBumper(Hand.kLeft) && driveStick.getBumper(Hand.kRight);\n\n //climbToggle = driveStick.getBumperReleased(Hand.kLeft);\n climbToggle = false;\n climbRelease = driveStick.getStartButton();\n\n resetBalls = gunnerStick.getStartButtonReleased();\n visionShoot = gunnerStick.getBButtonReleased();\n manualShoot = gunnerStick.getYButton();\n distShoot = gunnerStick.getAButton();\n intakeToggle = gunnerStick.getBumperReleased(Hand.kRight);\n hoodToggle = gunnerStick.getBumperReleased(Hand.kLeft);\n intakeReverse = gunnerStick.getXButtonReleased();\n magazineReverse = gunnerStick.getBackButton();\n\n\n //Switch statement to determine controls for the driver\n switch (driverScheme) {\n case \"Reverse Turning\":\n XSpeed = -driveStick.getY(Hand.kLeft);\n ZRotation = driveStick.getX(Hand.kRight);\n break;\n default:\n XSpeed = driveStick.getY(Hand.kLeft);\n ZRotation = -driveStick.getX(Hand.kRight);\n break;\n }\n\n //Switch statement to determine controls for the gunner\n switch (gunnerScheme) {\n case \"Fun Mode\":\n\n discoToggle = gunnerStick.getBackButtonReleased();\n break;\n\n default:\n\n // if ((gunnerStick.getTriggerAxis(Hand.kRight) >= 0.75) && (gunnerStick.getTriggerAxis(Hand.kLeft) >= 0.75) && !overriding) {\n // overrideSafeties = !overrideSafeties;\n // overriding = true;\n // } else if ((gunnerStick.getTriggerAxis(Hand.kRight) <= 0.75) && (gunnerStick.getTriggerAxis(Hand.kLeft) <= 0.75)) {\n // overriding = false;\n // }\n\n break;\n }\n }", "private void setActions(){\n login.setOnAction(e->login());\n simulate.setOnAction(e->simulate());\n scoreBoardButton.setOnAction(e->scoreBoard());\n viewBracket.setOnAction(e->viewBracket(selectedBracket, playerMap));\n clearButton.setOnAction(e->clear());\n resetButton.setOnAction(e->reset());\n finalizeButton.setOnAction(e->finalizeBracket());\n }", "protected void additionalShipActions(SpaceWars game){\n if (game.getGUI().isTeleportPressed()){\n this.teleport();\n }\n if (game.getGUI().isLeftPressed()){\n if (game.getGUI().isUpPressed()){\n this.spaceShipPhysics.move(true,SpaceShip.turnLeft);\n }\n else {\n this.spaceShipPhysics.move(false,SpaceShip.turnLeft);\n }\n }\n if (game.getGUI().isRightPressed()){\n if (game.getGUI().isUpPressed()){\n this.spaceShipPhysics.move(false,SpaceShip.turnRight);\n }\n else{\n this.spaceShipPhysics.move(false,SpaceShip.turnRight);\n }\n }\n if (game.getGUI().isUpPressed()){\n this.spaceShipPhysics.move(true,SpaceShip.noTurn);\n }\n if (game.getGUI().isShieldsPressed()){\n this.shieldOn();\n }\n if (game.getGUI().isShotPressed()){\n this.fire(game);\n }\n }", "private void updateUserBoard()\r\n {\r\n for(int i = 0; i < 3; i++)\r\n {\r\n for(int j = 0; j < 3; j++) {\r\n if ((buttons[i][j].getText().charAt(0) == ' ') && !(buttons[i][j].isEnabled())) {\r\n if (marker.equals(Marker.cross)) {\r\n buttons[i][j].setText(\"X\");\r\n } else {\r\n buttons[i][j].setText(\"O\");\r\n }\r\n }\r\n }\r\n }\r\n }", "@FXML\n public void initialize() {\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 5; j++) {\n bt[i][j] = new Button();\n bt[i][j].setAlignment(Pos.BOTTOM_CENTER);\n bt[i][j].setBackground(Background.EMPTY);\n bt[i][j].setMaxSize(65, 65);\n bt[i][j].setMinSize(65, 65);\n gridPane.add(bt[i][j], j, i);\n GridPane.setHalignment(bt[i][j], HPos.CENTER);\n GridPane.setValignment(bt[i][j], VPos.CENTER);\n }\n }\n submitAction.setDisable(true);\n jumpMove.setDisable(true);\n submitAction.setOnAction(event -> {\n try {\n System.out.println(\"Dettagli mossa: \");\n System.out.println(\"Coords target: \" + currentMove.getTargetX() + \", \" + currentMove.getTargetY());\n System.out.println(\"Pawn: \" + currentMove.getIdPawn());\n System.out.println(\"Action: \" + currentMove.getAction());\n disableButtons(true);\n handlerClient.sendAction(this.currentMove);\n submitAction.setDisable(true);\n lightPause();\n\n } catch (IOException e) {\n setFailed(\"Errore di rete\");\n System.exit(1);\n } finally {\n jumpMove.setDisable(true);\n disableButtons(true);\n }\n });\n jumpMove.setOnAction(ev -> {\n try {\n handlerClient.sendAction(new Mossa(currentMove.getAction(), -1, -1, -1));\n } catch (IOException e) {\n setFailed(\"Errore di rete\");\n System.exit(1);\n } finally {\n jumpMove.setDisable(true);\n effetto = false;\n disableButtons(true);\n lightPause();\n }\n });\n\n firstPl.setEffect(shadow);\n textArea.setEffect(shadow);\n movePawn.setEffect(shadow);\n buildPawn.setEffect(shadow);\n stopPawn.setEffect(shadow);\n submitAction.setEffect(shadow);\n jumpMove.setEffect(shadow);\n lightPause();\n\n }", "@Override\n public void loop() { //Starts this loop after you press the START Button\n /**\n * Functional control of up down lift with no limit switches Meet 0 ready\n */\n double liftposition = robot.liftUpDown.getCurrentPosition();\n double liftrotposition = robot.liftRotate.getCurrentPosition();\n telemetry.addData(\"Lift Position\",\"%5.2f\",liftposition);\n telemetry.addData(\"LiftRot Position\", \"%5.2f\", liftrotposition);\n // telemetry.addData(\"Block Stack\", BlockStack);\n telemetry.update();\n\n/**Main drive controls\n * Driver 1\n */\n\n/**\n * Drag servos\n */\n if (gamepad1.a){ //release\n robot.drag1.setPosition(0);\n robot.drag2.setPosition(1);\n } else if (gamepad1.b){//grab\n robot.drag1.setPosition(1);\n robot.drag2.setPosition(0);\n }\n\n/**Mast and Lift controls\n *\n *\n * Driver Two\n *\n *\n*/\n\n/**\n * Need controls to\n * Maybe predetermined locations based on number of pushes of a button.\n */\n\n /**\n * Functional arm rotation with limit switches and encoder limits. Meet 2 ready\n */\n\n //Twists lift up after verifying that rotate up limit switch is not engaged and that step count is less than 5400\n if ( gamepad2.dpad_up && robot.rotateup.getState() == true){\n robot.liftRotate.setPower(1.0);\n }\n else if (gamepad2.dpad_down && robot.rotatedown.getState() == true){ //Twists lift down\n robot.liftRotate.setPower(-1.0);\n }\n //required or lift rotate motor continues to run in last direction (breaks the motor shaft)\n else robot.liftRotate.setPower(0);\n\n /**\n * claw controls a= open b= close\n * FUNCTIONAL Meet 2 ready\n */\n if (gamepad2.a){\n robot.claw1.setPosition(0);\n robot.claw2.setPosition(1);\n } else if (gamepad2.b){\n robot.claw1.setPosition(1);\n robot.claw2.setPosition(0);\n }\n\n /**\n * Lift controls with limit switches and encoder position Meet 2 ready\n * right_trigger = lift\n * left_trigger = down\n */\n\n if ( gamepad2.right_trigger>= 0.2 && robot.liftup.getState()) {\n triggerpress=true;\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.liftUpDown.setPower(.9);\n robot.liftRotate.setPower(.15);\n }\n if (gamepad2.left_trigger>=0.2){\n triggerpress=true;\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.liftUpDown.setPower(-0.9);\n robot.liftRotate.setPower(-0.15);\n }\n if (gamepad2.left_trigger<.2 && gamepad2.right_trigger<.2 && triggerpress ){\n robot.liftUpDown.setPower(0);\n robot.liftRotate.setPower(0);\n triggerpress=false;\n }\n\n int x;\n int y;\n double motorDelayTime;\n //Necessary Debounce to keep bumper from being seen as multiple touches\n/* motorDelayTime=.1;\n if (robot.liftUpDown.getCurrentPosition()<50){\n BlockStack =0;\n }\n //skips servos unless runtime is greater than 20 ms.\n if( runtime.time() > motorDelayTime ) {\n //Need to move 5.5 inches on position 2, subsequent blocks will only need to move up 4 inches.\n x = robot.liftUpDown.getCurrentPosition();\n y= robot.liftRotate.getCurrentPosition();\n if (gamepad2.right_bumper ) {\n\n BlockStack= BlockStack + 1;\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.liftUpDown.setTargetPosition(x + robot.floorheight);\n robot.liftUpDown.setPower(.9);\n robot.liftRotate.setTargetPosition(y + robot.floorheightrotate);\n robot.liftRotate.setPower(.1);\n bumperpress=true;\n\n //don't want to drive the cable too far loose checks that we can move a full block down\n } else if (gamepad2.left_bumper && x >= robot.floorheight ) {\n BlockStack= BlockStack - 1;\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.liftUpDown.setTargetPosition(x - robot.floorheight);\n robot.liftUpDown.setPower(-.5);\n}\n\n runtime.reset();\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }*/\n\n /**\n * Limit switch tests that reset the encoders Meet 1 ready\n * * liftdown also allows the X button to work\n * * rotatedown also allows the Y button to work\n */\n\n if (robot.rotatedown.getState() == false) {\n robot.liftRotate.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.liftRotate.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }\n }", "public void operatorControl() {\n \tmyRobot.setSafetyEnabled(true);\n while (isOperatorControl() && isEnabled()) {\n \tdouble x = stick2.getRawAxis(0);\n \tdouble y = stick2.getRawAxis(1);\n \tdouble rot = stick.getRawAxis(0);\n \tSmartDashboard.putNumber(\"x1\", x);\n SmartDashboard.putNumber(\"y1\", y);\n SmartDashboard.putNumber(\"rot1\", rot);\n \tif(Math.abs(x) < .2)\n \t\tx = 0;\n \tif(Math.abs(y) < .2)\n \t\ty = 0;\n \tif(Math.abs(rot) < .2)\n \t\trot = 0;\n \tmyRobot.mecanumDrive_Cartesian(x*-1, y*-1,rot*-1, gyro.getAngle());\n double current1 = pdp.getCurrent(0);\n double current2 = pdp.getCurrent(13);\n double current3 = pdp.getCurrent(15);\n double current4 = pdp.getCurrent(12);\n SmartDashboard.putNumber(\"Front Left current\", current1);\n SmartDashboard.putNumber(\"back Left current\", current2);\n SmartDashboard.putNumber(\"Front right current\", current3);\n SmartDashboard.putNumber(\"back right current\", current4);\n SmartDashboard.putNumber(\"x\", x);\n SmartDashboard.putNumber(\"y\", y);\n SmartDashboard.putNumber(\"rot\", rot);\n SmartDashboard.putNumber(\"Gyro\", gyro.getAngle());\n \tTimer.delay(0.005);\t\t// wait for a motor update time\n }\n }", "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 }", "public static void driverControls() {\n\t\tif (driverJoy.getYButton()) {\n\t\t\tif (!yPrevious) {\n\t\t\t\tyEnable = !yEnable;\n\t\t\t\tif (yEnable) {\n\t\t\t\t\tClimber.frontExtend();\n\t\t\t\t} else {\n\t\t\t\t\tClimber.frontRetract();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tyPrevious = driverJoy.getYButton();\n\n\t\t// Toggle switch for the front climbing pneumatics\n\t\tif (driverJoy.getBButton()) {\n\t\t\tif (!bPrevious) {\n\t\t\t\tbEnable = !bEnable;\n\t\t\t\tif (bEnable) {\n\t\t\t\t\tClimber.backExtend();\n\t\t\t\t} else {\n\t\t\t\t\tClimber.backRetract();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbPrevious = driverJoy.getBButton();\n\n\t\t// Toggles for extending and retracting the hatch\n\t\tif (driverJoy.getAButton()) {\n\t\t\tSystem.out.println((Arm.getSetPosition() == Constants.HATCH_ONE) + \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\");\n\t\t\tif (!aPrevious) {\n\t\t\t\taEnable = !aEnable;\n\t\t\t\tif (aEnable) {\n\t\t\t\t\tif (Arm.getSetPosition() == Constants.HATCH_ONE && Arm.isWithinDeadband())// && Arm.isWithinDeadband()) //TODO add this in\n\t\t\t\t\t\tHatchIntake.extend();\n\t\t\t\t} else\n\t\t\t\t\tHatchIntake.retract();\n\t\t\t}\n\t\t}\n\t\taPrevious = driverJoy.getAButton();\n\n\t\t// Start to open servo, back to close\n\t\tif (driverJoy.getStartButton()) {\n\t\t\tHatchIntake.openServo();\n\t\t}\n\t\tif (driverJoy.getBackButton()) {\n\t\t\tHatchIntake.closeServo();\n\t\t}\n\n\t\t// Toggles for extending and retracting the crab\n\t\tif (driverJoy.getXButton()) {\n\t\t\tif (!xPrevious) {\n\t\t\t\txEnable = !xEnable;\n\t\t\t\tif (xEnable) {\n\t\t\t\t\tCrab.extend();\n\t\t\t\t} else {\n\t\t\t\t\tCrab.retract();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\txPrevious = driverJoy.getXButton();\n\n\t\t// Make crab move left or right\n\t\tif (driverJoy.getBumper(Hand.kLeft)) {\n\t\t\tCrab.driveLeft();\n\t\t} else if (driverJoy.getBumper(Hand.kRight)) {\n\t\t\tCrab.driveRight();\n\t\t} else {\n\t\t\tCrab.driveStop();\n\t\t}\n\n\t\t// Intake controls\n\t\tif (driverJoy.getTriggerAxis(Hand.kRight) > .1) {\n\t\t\tIntake.runIntake();\n\t\t} else if (driverJoy.getTriggerAxis(Hand.kLeft) > .1) {\n\t\t\tIntake.runOuttake();\n\t\t} else {\n\t\t\tIntake.stopIntake();\n\t\t}\n\n\t\t// Drive controls front back\n\t\tif (Math.abs(driverJoy.getY(Hand.kLeft)) > .12) {\n\t\t\tspeedStraight = driverJoy.getY(Hand.kLeft);\n\t\t} else {\n\t\t\tspeedStraight = 0;\n\t\t}\n\t\t// Drive controls left right\n\t\tif (Math.abs(driverJoy.getX(Hand.kRight)) > .12) {\n\t\t\tturn = driverJoy.getX(Hand.kRight);\n\t\t} else {\n\t\t\tturn = 0;\n\t\t}\n\t\tDriveTrain.drive(speedStraight, turn);\n\t}", "protected void execute() {\n if (oi.getButton(1,3).get()){\n speedModifier = 0.6;\n }\n else if(oi.getButton(2,3).get()){\n speedModifier = 1;\n }\n else if(oi.getButton(1,2).get()&&oi.getButton(2, 2).get()){\n speedModifier = 0.75;\n }\n chassis.tankDrive((oi.getJoystick(1).getAxis(Joystick.AxisType.kY)*speedModifier), (oi.getJoystick(2).getAxis(Joystick.AxisType.kY)*speedModifier));\n //While no triggers are pressed the robot moves at .75 the joystick input\n }", "private void getInput(){\n\n if (tankNumber == 1) {\n if (handler.getTankControl1().up1) {\n this.moveForwards();\n }\n if (handler.getTankControl1().down1) {\n this.moveBackwards();\n }\n if (handler.getTankControl1().left1) {\n this.rotateLeft();\n }\n if (handler.getTankControl1().right1) {\n this.rotateRight();\n }\n if (handler.getTankControl1().enter){\n this.checkAttacks();\n }\n// if (handler.getTankControl1().checkEntities)\n// {\n// handler.getWorld().getEntityManager().printContents();\n// }\n }\n\n if (tankNumber == 2){\n if (handler.getTankControl1().up2) {\n this.moveForwards();\n }\n if (handler.getTankControl1().down2) {\n this.moveBackwards();\n }\n if (handler.getTankControl1().left2) {\n this.rotateLeft();\n }\n if (handler.getTankControl1().right2) {\n this.rotateRight();\n }\n if (handler.getTankControl1().space){\n this.checkAttacks();\n }\n }\n\n }", "private void ControlType2(int time) {\n\t\tif (GameEngine.isKeyHeld(\"D\")) {\n\t\t\tgraphic.setX(graphic.getX() + speed * time);\n\t\t}\n\t\tif (GameEngine.isKeyHeld(\"A\")) {\n\t\t\tgraphic.setX(graphic.getX() - speed * time);\n\t\t}\n\t\tif (GameEngine.isKeyHeld(\"S\")) {\n\t\t\tgraphic.setY(graphic.getY() + speed * time);\n\t\t}\n\t\tif (GameEngine.isKeyHeld(\"W\")) {\n\t\t\tgraphic.setY(graphic.getY() - speed * time);\n\t\t}\n\t\tgraphic.setDirection(GameEngine.getMouseX(), GameEngine.getMouseY());\n\t\t//set hero facing cursor\n\t}", "public void updateHandFeatures() {\r\n\t\tpoints_hc_low = this.p1view.points_hc_low + this.p2view.points_hc_low;\r\n\t\tpoints_hc_high = this.p1view.points_hc_high + this.p2view.points_hc_high;\r\n\t\tpoints_spade_low = this.p1view.points_spade_low + this.p2view.points_spade_low;\r\n\t\tpoints_spade_high = this.p1view.points_spade_high + this.p2view.points_spade_high; \r\n\t\tpoints_heart_low = this.p1view.points_heart_low + this.p2view.points_heart_low;\r\n\t\tpoints_heart_high = this.p1view.points_heart_high + this.p2view.points_heart_high; \r\n\t\tpoints_dia_low = this.p1view.points_dia_low + this.p2view.points_dia_low;\r\n\t\tpoints_dia_high = this.p1view.points_dia_high + this.p2view.points_dia_high; \t\t\r\n\t\tpoints_club_low = this.p1view.points_club_low + this.p2view.points_club_low;\r\n\t\tpoints_club_high = this.p1view.points_club_high + this.p2view.points_club_high; \r\n\t\t\t\t\r\n\t\tcontrols_low = this.p1view.controls_low + this.p2view.controls_low;\r\n\t\tcontrols_high = this.p1view.controls_high + this.p2view.controls_high;\r\n\t\tcontrols_spade_low = this.p1view.controls_spade_low + this.p2view.controls_spade_low;\r\n\t\tcontrols_spade_high = this.p1view.controls_spade_high + this.p2view.controls_spade_high; \r\n\t\tcontrols_heart_low = this.p1view.controls_heart_low + this.p2view.controls_heart_low;\r\n\t\tcontrols_heart_high = this.p1view.controls_heart_high + this.p2view.controls_heart_high; \r\n\t\tcontrols_dia_low = this.p1view.controls_dia_low + this.p2view.controls_dia_low;\r\n\t\tcontrols_dia_high = this.p1view.controls_dia_high + this.p2view.controls_dia_high; \t\t\r\n\t\tcontrols_club_low = this.p1view.controls_club_low + this.p2view.controls_club_low;\r\n\t\tcontrols_club_high = this.p1view.controls_club_high + this.p2view.controls_club_high; \r\n\t\t\r\n\t\thighCards_low = this.p1view.highCards_low + this.p2view.highCards_low;\r\n\t\thighCards_high = this.p1view.highCards_high + this.p2view.highCards_high;\r\n\t\thighCards_spade_low = this.p1view.highCards_spade_low + this.p2view.highCards_spade_low;\r\n\t\thighCards_spade_high = this.p1view.highCards_spade_high + this.p2view.highCards_spade_high; \r\n\t\thighCards_heart_low = this.p1view.highCards_heart_low + this.p2view.highCards_heart_low;\r\n\t\thighCards_heart_high = this.p1view.highCards_heart_high + this.p2view.highCards_heart_high; \r\n\t\thighCards_dia_low = this.p1view.highCards_dia_low + this.p2view.highCards_dia_low;\r\n\t\thighCards_dia_high = this.p1view.highCards_dia_high + this.p2view.highCards_dia_high; \t\t\r\n\t\thighCards_club_low = this.p1view.highCards_club_low + this.p2view.highCards_club_low;\r\n\t\thighCards_club_high = this.p1view.highCards_club_high + this.p2view.highCards_club_high; \r\n\t\t\r\n\t\thonors_low = this.p1view.honors_low + this.p2view.honors_low;\r\n\t\thonors_high = this.p1view.honors_high + this.p2view.honors_high;\r\n\t\thonors_spade_low = this.p1view.honors_spade_low + this.p2view.honors_spade_low;\r\n\t\thonors_spade_high = this.p1view.honors_spade_high + this.p2view.honors_spade_high; \r\n\t\thonors_heart_low = this.p1view.honors_heart_low + this.p2view.honors_heart_low;\r\n\t\thonors_heart_high = this.p1view.honors_heart_high + this.p2view.honors_heart_high; \r\n\t\thonors_dia_low = this.p1view.honors_dia_low + this.p2view.honors_dia_low;\r\n\t\thonors_dia_high = this.p1view.honors_dia_high + this.p2view.honors_dia_high; \t\t\r\n\t\thonors_club_low = this.p1view.honors_club_low + this.p2view.honors_club_low;\r\n\t\thonors_club_high = this.p1view.honors_club_high + this.p2view.honors_club_high; \r\n\t\t\r\n\t\taces = (this.p1view.aces != -1 && this.p2view.aces != -1) ? this.p1view.aces + this.p2view.aces : -1;\r\n\t\tace_spade = (this.p1view.ace_spade != -1 && this.p2view.ace_spade != -1) ? ((this.p1view.ace_spade == 1 || this.p2view.ace_spade == 1) ? 1 : 0): -1;\r\n\t\tking_spade = (this.p1view.king_spade != -1 && this.p2view.king_spade != -1) ? ((this.p1view.king_spade == 1 || this.p2view.king_spade == 1) ? 1 : 0): -1;\r\n\t\tqueen_spade = (this.p1view.queen_spade != -1 && this.p2view.queen_spade != -1) ? ((this.p1view.queen_spade == 1 || this.p2view.queen_spade == 1) ? 1 : 0): -1;\r\n\t\tjack_spade = (this.p1view.jack_spade != -1 && this.p2view.jack_spade != -1) ? ((this.p1view.jack_spade == 1 || this.p2view.jack_spade == 1) ? 1 : 0): -1;\r\n\t\tten_spade = (this.p1view.ten_spade != -1 && this.p2view.ten_spade != -1) ? ((this.p1view.ten_spade == 1 || this.p2view.ten_spade == 1) ? 1 : 0): -1;\r\n\t\t\r\n\t\taces = (this.p1view.aces != -1 && this.p2view.aces != -1) ? this.p1view.aces + this.p2view.aces : -1;\r\n\t\tkings = (this.p1view.kings != -1 && this.p2view.kings != -1) ? this.p1view.kings + this.p2view.kings : -1;\r\n\t\tqueens = (this.p1view.queens != -1 && this.p2view.queens != -1) ? this.p1view.queens + this.p2view.queens : -1;\r\n\t\tjacks = (this.p1view.jacks != -1 && this.p2view.jacks != -1) ? this.p1view.jacks + this.p2view.jacks : -1;\r\n\t\ttens = (this.p1view.tens != -1 && this.p2view.tens != -1) ? this.p1view.tens + this.p2view.tens : -1;\r\n\t\t\r\n\t\tace_spade = (this.p1view.ace_spade != -1 && this.p2view.ace_spade != -1) ? ((this.p1view.ace_spade == 1 || this.p2view.ace_spade == 1) ? 1 : 0): -1;\r\n\t\tking_spade = (this.p1view.king_spade != -1 && this.p2view.king_spade != -1) ? ((this.p1view.king_spade == 1 || this.p2view.king_spade == 1) ? 1 : 0): -1;\r\n\t\tqueen_spade = (this.p1view.queen_spade != -1 && this.p2view.queen_spade != -1) ? ((this.p1view.queen_spade == 1 || this.p2view.queen_spade == 1) ? 1 : 0): -1;\r\n\t\tjack_spade = (this.p1view.jack_spade != -1 && this.p2view.jack_spade != -1) ? ((this.p1view.jack_spade == 1 || this.p2view.jack_spade == 1) ? 1 : 0): -1;\r\n\t\tten_spade = (this.p1view.ten_spade != -1 && this.p2view.ten_spade != -1) ? ((this.p1view.ten_spade == 1 || this.p2view.ten_spade == 1) ? 1 : 0): -1;\r\n\t\t\r\n\t\tace_heart = (this.p1view.ace_heart != -1 && this.p2view.ace_heart != -1) ? ((this.p1view.ace_heart == 1 || this.p2view.ace_heart == 1) ? 1 : 0): -1;\r\n\t\tking_heart = (this.p1view.king_heart != -1 && this.p2view.king_heart != -1) ? ((this.p1view.king_heart == 1 || this.p2view.king_heart == 1) ? 1 : 0): -1;\r\n\t\tqueen_heart = (this.p1view.queen_heart != -1 && this.p2view.queen_heart != -1) ? ((this.p1view.queen_heart == 1 || this.p2view.queen_heart == 1) ? 1 : 0): -1;\r\n\t\tjack_heart = (this.p1view.jack_heart != -1 && this.p2view.jack_heart != -1) ? ((this.p1view.jack_heart == 1 || this.p2view.jack_heart == 1) ? 1 : 0): -1;\r\n\t\tten_heart = (this.p1view.ten_heart != -1 && this.p2view.ten_heart != -1) ? ((this.p1view.ten_heart == 1 || this.p2view.ten_heart == 1) ? 1 : 0): -1;\r\n\t\t\r\n\t\tace_dia = (this.p1view.ace_dia != -1 && this.p2view.ace_dia != -1) ? ((this.p1view.ace_dia == 1 || this.p2view.ace_dia == 1) ? 1 : 0): -1;\r\n\t\tking_dia = (this.p1view.king_dia != -1 && this.p2view.king_dia != -1) ? ((this.p1view.king_dia == 1 || this.p2view.king_dia == 1) ? 1 : 0): -1;\r\n\t\tqueen_dia = (this.p1view.queen_dia != -1 && this.p2view.queen_dia != -1) ? ((this.p1view.queen_dia == 1 || this.p2view.queen_dia == 1) ? 1 : 0): -1;\r\n\t\tjack_dia = (this.p1view.jack_dia != -1 && this.p2view.jack_dia != -1) ? ((this.p1view.jack_dia == 1 || this.p2view.jack_dia == 1) ? 1 : 0): -1;\r\n\t\tten_dia = (this.p1view.ten_dia != -1 && this.p2view.ten_dia != -1) ? ((this.p1view.ten_dia == 1 || this.p2view.ten_dia == 1) ? 1 : 0): -1;\r\n\t\t\r\n\t\tace_club = (this.p1view.ace_club != -1 && this.p2view.ace_club != -1) ? ((this.p1view.ace_club == 1 || this.p2view.ace_club == 1) ? 1 : 0): -1;\r\n\t\tking_club = (this.p1view.king_club != -1 && this.p2view.king_club != -1) ? ((this.p1view.king_club == 1 || this.p2view.king_club == 1) ? 1 : 0): -1;\r\n\t\tqueen_club = (this.p1view.queen_club != -1 && this.p2view.queen_club != -1) ? ((this.p1view.queen_club == 1 || this.p2view.queen_club == 1) ? 1 : 0): -1;\r\n\t\tjack_club = (this.p1view.jack_club != -1 && this.p2view.jack_club != -1) ? ((this.p1view.jack_club == 1 || this.p2view.jack_club == 1) ? 1 : 0): -1;\r\n\t\tten_club = (this.p1view.ten_club != -1 && this.p2view.ten_club != -1) ? ((this.p1view.ten_club == 1 || this.p2view.ten_club == 1) ? 1 : 0): -1;\r\n\t\t\r\n\t\tnum_spade_low = this.p1view.num_spade_low + this.p2view.num_spade_low;\r\n\t\tnum_spade_high = this.p1view.num_spade_high + this.p2view.num_spade_high; \r\n\t\tnum_heart_low = this.p1view.num_heart_low + this.p2view.num_heart_low;\r\n\t\tnum_heart_high = this.p1view.num_heart_high + this.p2view.num_heart_high; \r\n\t\tnum_dia_low = this.p1view.num_dia_low + this.p2view.num_dia_low;\r\n\t\tnum_dia_high = this.p1view.num_dia_high + this.p2view.num_dia_high;\t\r\n\t\tnum_club_low = this.p1view.num_club_low + this.p2view.num_club_low;\r\n\t\tnum_club_high = this.p1view.num_club_high + this.p2view.num_club_high;\r\n\t\t\r\n\t\ttotal_points_sp_low = p1view.total_points_sp_low + p2view.total_points_sp_low;\r\n\t\ttotal_points_sp_high = p1view.total_points_sp_high + p2view.total_points_sp_high; \r\n\t\ttotal_points_he_low = p1view.total_points_he_low + p2view.total_points_he_low;\r\n\t\ttotal_points_he_high = p1view.total_points_he_high + p2view.total_points_he_high; \r\n\t\ttotal_points_di_low = p1view.total_points_di_low + p2view.total_points_di_low;\r\n\t\ttotal_points_di_high = p1view.total_points_di_high + p2view.total_points_di_high; \t\t\r\n\t\ttotal_points_cl_low = p1view.total_points_cl_low + p2view.total_points_cl_low;\r\n\t\ttotal_points_cl_high = p1view.total_points_cl_high + p2view.total_points_cl_high; \r\n\t\t\r\n\t\t// Hand(s) features done, now check invitation\r\n\t\tif(invited) {\r\n\t\t\tif(!this.player.getDeal().getAuction().getBidHistory().hasGameBeenBid()) {\r\n\t\t\t\tif(this.trumpDecided == BidSuit.NOTRUMP || trumpDecided == null) {\r\n\t\t\t\t\tif(this.points_hc_low >= 26)\r\n\t\t\t\t\t\tinvite_response = true;\r\n\t\t\t\t\telse invite_response = false;\r\n\t\t\t\t\ttrumpDecided = BidSuit.NOTRUMP;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tint num_trump, points;\r\n\t\t\t\t\tpoints = this.points_hc_low;\r\n\t\t\t\t\tif(this.trumpDecided == BidSuit.SPADE) {\r\n\t\t\t\t\t\tnum_trump = this.num_spade_low;\r\n\t\t\t\t\t} else if(this.trumpDecided == BidSuit.HEART) {\r\n\t\t\t\t\t\tnum_trump = this.num_heart_low;\r\n\t\t\t\t\t} else if(this.trumpDecided == BidSuit.DIAMOND) {\r\n\t\t\t\t\t\tnum_trump = this.num_dia_low;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tnum_trump = this.num_club_low;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(points + num_trump >= 33)\r\n\t\t\t\t\t\tinvite_response = true;\r\n\t\t\t\t\telse invite_response = false;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif(this.trumpDecided == BidSuit.NOTRUMP || trumpDecided == null) {\r\n\t\t\t\t\t// Pointless bidding, since game already bid\r\n\t\t\t\t} else {\r\n\t\t\t\t\tint num_trump;\r\n\t\t\t\t\tif(this.trumpDecided == BidSuit.SPADE)\r\n\t\t\t\t\t\tnum_trump = this.num_spade_low;\r\n\t\t\t\t\telse if(this.trumpDecided == BidSuit.HEART)\r\n\t\t\t\t\t\tnum_trump = this.num_heart_low;\r\n\t\t\t\t\telse if(this.trumpDecided == BidSuit.DIAMOND)\r\n\t\t\t\t\t\tnum_trump = this.num_dia_low;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tnum_trump = this.num_club_low;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(num_trump >= 8)\r\n\t\t\t\t\t\tinvite_response = true;\r\n\t\t\t\t\telse invite_response = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void botoes(){\n\t\tbindKeyPressed(\"SPACE\", new KeyboardAction() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent() {\n\t\t\t\tif (!move) {\n\t\t\t\t\tmove = true;\n\t\t\t\t\tpause = false;\n\t\t\t\t} else {\n\t\t\t\t\tmove = false;\n\t\t\t\t\tpause = true;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tbindKeyPressed(\"I\", new KeyboardAction() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent() {\n\t\t\t\tpause = true;\n\t\t\t\tmove = false;\n\t\t\t\ttutorial();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbindKeyPressed(\"R\", new KeyboardAction() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent() {\n\t\t\t\treiniciar();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbindKeyPressed(\"LEFT\", new KeyboardAction() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent() {\n\t\t\t\tPoint posicaoP = paddle.getPosition();\n\n\t\t\t\tif (Resolution.MSX.width - 254 < posicaoP.x && move == true && pause == false) {\n\t\t\t\t\tpaddle.move(-5, 0);\n\t\t\t\t} else if (Resolution.MSX.width - 254 < posicaoP.x && move == false && pause == false) {\n\t\t\t\t\tpaddle.move(-5, 0);\n\t\t\t\t\tbola.move(-5, 0);\n\t\t\t\t} else {\n\t\t\t\t\tpaddle.move(0, 0);\n\t\t\t\t} // fecha else\n\t\t\t}\n\t\t});\n\t\tbindKeyPressed(\"RIGHT\", new KeyboardAction() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent() {\n\t\t\t\tPoint posicaoP = paddle.getPosition();\n\n\t\t\t\tif (Resolution.MSX.width > posicaoP.x + 25 && move == true && pause == false) {\n\t\t\t\t\tpaddle.move(5, 0);\n\t\t\t\t} else if (Resolution.MSX.width > posicaoP.x + 25 && move == false && pause == false) {\n\t\t\t\t\tpaddle.move(5, 0);\n\t\t\t\t\tbola.move(5, 0);\n\t\t\t\t} else {\n\t\t\t\t\tpaddle.move(0, 0);\n\t\t\t\t} // fecha else\n\t\t\t}\n\t\t});\n\t\t\n\t}", "private void makeControls() {\n Label label1 = new Label(\"Placement:\");\n textField = new TextField ();\n textField.setPrefWidth(300);\n\n // Task8 Start the game with the randomly selected piece placement\n textField.setText(\"AAO\");\n makePlacement(\"AAO\");\n\n Button button = new Button(\"Refresh\");\n button.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent e) {\n makePlacement(textField.getText());\n // Task8 Do not clear the textField in order to place pieces step by step.\n // textField.clear();\n }\n });\n HBox hb = new HBox();\n hb.getChildren().addAll(label1, textField, button);\n hb.setSpacing(10);\n hb.setLayoutX(130);\n hb.setLayoutY(VIEWER_HEIGHT - 50);\n controls.getChildren().add(hb);\n }", "protected void resetSideButtons(){\n mFightButton.setText(\"FIGHT\");\n mPokemonButton.setText(\"POKEMON\");\n mBagButton.setText(\"BAG\");\n mRunButton.setText(\"RUN\");\n mFightButton.setBackgroundColor(PokemonApp.FIGHT_COLOR);\n mPokemonButton.setBackgroundColor(PokemonApp.POKEMON_COLOR);\n mBagButton.setBackgroundColor(PokemonApp.BAG_COLOR);\n mRunButton.setBackgroundColor(PokemonApp.RUN_COLOR);\n }", "public void initSkills(){\n\t\tup = false;\n\t\tdown = false;\n\t\tleft = false;\n\t\tright = false;\n\t\tskillmode = true;\n\t\t\n\t\tskills.setLocation(500,300);\n\t\tskills.setSize(400,300);\n\t\t\t\n\t\tt1 = new JButton(\"Dicker Brecher (benötigt 2 Skillpunkte)\");\n\t\tt1.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0){ //bzgl. Starten\n\t\t\t\tif(player.getXP() >= 2){\n\t\t\t\t\tplayer.setXP(player.getXP()-2);\n\t\t\t\t\tplayer.setMaxhealth(player.getMaxhealth() + 50);\n\t\t\t\t\tplayer.setSkillHealth1(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\tt3 = new JButton(\"Kanten-Paule (benötigt 4 Skillpunkte und Dicker Brecher)\");\n\t\tt3.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0){ //bzgl. Starten\n\t\t\t\tif(player.getXP() >= 4){\n\t\t\t\t\tplayer.setXP(player.getXP()-4);\n\t\t\t\t\tplayer.setMaxhealth(player.getMaxhealth() + 50);\n\t\t\t\t\tplayer.setSkillHealth2(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tt2 = new JButton(\"Brutaler Prügelknabe (benötigt 2 Skillpunkte)\");\n\t\tt2.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\tif(player.getXP() >= 2){\n\t\t\t\t\tplayer.setXP(player.getXP()-2);\n\t\t\t\t\tplayer.setDamage(player.getDamage() + 20);\n\t\t\t\t\tplayer.setSkillStrength1(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung!\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t\t\t\n\t\t});\n\t\t\n\t\tt4 = new JButton(\"Mega-Mörder brutaler Prügelknabe (benötigt 4 Skillpunkte und Brutaler Prügelknabe)\");\n\t\tt4.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\tif(player.getXP() >= 4){\n\t\t\t\t\tplayer.setXP(player.getXP()-4);\n\t\t\t\t\tplayer.setDamage(player.getDamage() + 30);\n\t\t\t\t\tplayer.setSkillStrength2(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung!\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tt5 = new JButton(\"Ich will nix - danke\");\n\t\tt5.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\tskills.setLayout(new GridLayout(3,2));\n\t\tskills.add(t1);\n\t\tskills.add(t2);\n\t\tskills.add(t3);\n\t\tskills.add(t4);\n\t\tskills.add(t5);\n\t\n\t\tif(player.hasSkillHealth1()){\n\t\t\tt1.setEnabled(false);\n\t\t\tt3.setEnabled(true);\n\t\t}else{\n\t\t\tt3.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillHealth2()){\n\t\t\tt3.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillStrength1()){\n\t\t\tt2.setEnabled(false);\n\t\t\tt4.setEnabled(true);\n\t\t}else{\n\t\t\tt4.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillStrength2()){\n\t\t\tt4.setEnabled(false);\n\t\t}\n\t\t\n\t\tskills.pack();\n\t\t\n\t}", "private void ControlType1(int time) {\n\t\tif (GameEngine.isKeyHeld(\"D\")) {\n\t\t\tgraphic.setX(graphic.getX() + speed * time);\n\t\t\tgraphic.setDirection(0);\n\t\t}\n\t\tif (GameEngine.isKeyHeld(\"A\")) {\n\t\t\tgraphic.setX(graphic.getX() - speed * time);\n\t\t\tgraphic.setDirection((float)Math.PI);\n\t\t}\n\t\tif (GameEngine.isKeyHeld(\"S\")) {\n\t\t\tgraphic.setY(graphic.getY() + speed * time);\n\t\t\tgraphic.setDirection((float)(Math.PI / 2));\n\t\t}\n\t\tif (GameEngine.isKeyHeld(\"W\")) {\n\t\t\tgraphic.setY(graphic.getY() - speed * time);\n\t\t\tgraphic.setDirection((float)((Math.PI * 3) / 2));\n\t\t}\n\t\t//SET HERO facing WASD direction\n\t}", "private OI() {\n\t\t\n\t\tJoystickButton intakeIn = new JoystickButton(//gunner, \n\t\t\t\tdriver, JOYSTICK_INTAKE);\n\t\tJoystickButton intakeOut = new JoystickButton(//gunner, \n\t\t\t\tdriver, JOYSTICK_REVERSE_INTAKE);\n\t\tJoystickButton pivotOut = new JoystickButton(//gunner,\t\t\t\tThese create officially each button on the driver remote\n\t\t\t\tdriver, JOYSTICK_PIVOT_OUT);\n\t\tJoystickButton pivotIn = new JoystickButton(//gunner,\t\t\t\tusing the button numbers created above\n\t\t\t\tdriver, JOYSTICK_PIVOT_IN);\n\t\tJoystickButton climbRelease = new JoystickButton(//gunner,\n\t\t\t\tdriver, JOYSTICK_ClIMB_RELEASE);\n\t\tJoystickButton climbUp = new JoystickButton(//gunner,\n\t\t\t\tdriver, JOYSTICK_CLIMB_UP);\n\t\tJoystickButton climbBrake = new JoystickButton(\n\t\t\t\tdriver, JOYSTICK_BRAKE);\n\t\tJoystickButton climbUndoBrake = new JoystickButton(\n\t\t\t\tdriver, JOYSTICK_UNDO_BRAKE);\n\t\t\n\t\t/*\n\t\t * JoystickButton intakeIn = new JoystickButton(//left, \n\t\t\t\tright, JOYSTICK_INTAKE);\n\t\t * JoystickButton intakeOut = new JoystickButton(//left, \n\t\t\t\tright, JOYSTICK_REVERSE_INTAKE);\n\t\t * JoystickButton pivotOut = new JoystickButton(//left,\t\t\t\tThese create officially each button on the driver remote\n\t\t\t\tright, JOYSTICK_PIVOT_OUT);\n\t\t * JoystickButton pivotIn = new JoystickButton(//left,\t\t\t\tusing the button numbers created above\n\t\t\t\tright, JOYSTICK_PIVOT_IN);\n\t\t * JoystickButton climbRelease = new JoystickButton(//left,\n\t\t\t\tright, JOYSTICK_ClIMB_RELEASE);\n\t\t * JoystickButton climbUp = new JoystickButton(//left,\n\t\t\t\tright, JOYSTICK_CLIMB_UP);\n\t\t * JoystickButton climbBrake = new JoystickButton(//left,\n\t\t\t\tright, JOYSTICK_BRAKE);\n\t\t * JoystickButton climbUndoBrake = new JoystickButton(//left,\n\t\t\t\tright, JOYSTICK_UNDO_BRAKE);\n\t\t */\n\t\t\n\t\t\n\t\tintakeIn.whileHeld(new IntakeIn());\t\t\t//Executes intakeIn WHILE the button is pressed\n\t\tintakeIn.whenReleased(new IntakeStop());\t//executes intakestop WHEN the button is let go\n\t\t\n\t\tintakeOut.whileHeld(new IntakeOut());\t\n\t\tintakeOut.whenReleased(new IntakeStop());\n\t\t\n\t\tpivotIn.whileHeld(new PivotIn());\n\t\tpivotIn.whenReleased(new PivotStop());\t\t\t\t\t\t\t//These bind the buttons to a specific command\n\t\t\n\t\tpivotOut.whileHeld(new PivotOut());\n\t\tpivotOut.whenReleased(new PivotStop());\n\t\t\n\t\tclimbRelease.whileHeld(new ClimbRelease());\n\t\tclimbRelease.whenReleased(new ClimbStop());\n\t\t\n\t\tclimbUp.whileHeld(new ClimbUp());\n\t\tclimbUp.whenReleased(new ClimbStop());\n\t\t\n\t\tclimbBrake.whileHeld(new ClimbBrake());\n\t\tclimbBrake.whenReleased(new BrakeStop());\n\t\t\n\t\tclimbUndoBrake.whileHeld(new ClimbBrakeUndo());\n\t\tclimbUndoBrake.whenReleased(new BrakeStop());\n\t}", "public OI() {\n\n pilotLS.whenPressed(new ShiftGear(Gear.HIGH));\n pilotLS.whenReleased(new ShiftGear(Gear.OFF));\n pilotRS.whenPressed(new ShiftGear(Gear.LOW));\n pilotRS.whenPressed(new ShiftGear(Gear.OFF));\n\n pilotRTrig.whileActive(new CenterBay());\n\n pilotA.whenPressed(new TrackPipeline(Pipeline.OFF));\n pilotB.whenPressed(new FlipLimelight());\n //pilotY.whenPressed(new FollowPath(Path.TO_PERPENDICULAR, false));\n pilotY.whenPressed(new PlayTrajectory(\"Test\"));\n\n pilotDpadNorth.whileHeld(new ManualClimb(1.0));\n pilotDpadSouth.whileHeld(new ManualClimb(-1.0));\n\n pilotDpadEast.whileHeld(new ClimbSequence());\n pilotDpadWest.whenPressed(new PassThrough());\n\n pilotBack.whenPressed(new KillAll());\n copilotBack.whenPressed(new KillAll());\n\n copilotA.whileHeld(new SpinIntake(1.0));\n copilotA.whenReleased(new SpinIntake(0));\n copilotB.whileHeld(new SpinIntake(-1.0));\n copilotB.whenReleased(new SpinIntake(0));\n\n copilotY.whenPressed(new FireHatch(Value.kForward));\n copilotY.whenReleased(new FireHatch(Value.kOff));\n copilotX.whenPressed(new FireHatch(Value.kReverse));\n copilotX.whenReleased(new FireHatch(Value.kOff));\n\n copilotLb.whileHeld(new WristEndGame());\n copilotLb.whenReleased(new SpinIntake(0));\n\n rbGround.whenPressed(new ToHeight(Height.HOME));\n rbHatchLow.whenPressed(new ToHeight(Height.HATCH_LOW));\n rbHatchMid.whenPressed(new ToHeight(Height.HATCH_MID));\n rbHatchHigh.whenPressed(new ToHeight(Height.HATCH_HIGH));\n rbCargoLow.whenPressed(new ToHeight(Height.CARGO_LOW));\n rbCargoMid.whenPressed(new ToHeight(Height.CARGO_MID));\n rbCargoHigh.whenPressed(new ToHeight(Height.CARGO_HIGH));\n\n copilotDpadNorth.whenPressed(new ToHeight(Height.CARGO_LOAD));\n copilotDpadSouth.whenPressed(new ToHeight(Height.CARGO_FLOOR));\n copilotDpadEast.whenPressed(new ToHeight(Height.CARGO_SHIP));\n copilotDpadWest.whenPressed(new ToHeight(Height.HATCH_LOW));\n\n }", "private Parent createSetGame(){\n\n BorderPane setGame = new BorderPane(); //create BorderPane for the root\n setGame.setPrefSize(1200, 900);\n\n Label user = new Label(\"User\");\n Label computer = new Label(\"Computer\");\n\n VBox vert1 = vertNum();\n VBox vert2 = vertNum();\n\n HBox hor1 = horNum();\n HBox hor2 = horNum();\n\n Label row = new Label(\"Row\");\n Label column = new Label(\"Column\");\n Label direction = new Label(\"Direction\");\n Label table = new Label(\"Prepare Your Table!\");\n Button submit = new Button(\"Submit\");\n Text isOccupied = new Text(); //prints message if position is already occupied\n Text pieceName = new Text(); //prints out the piece name for the user to enter\n\n TextField rows = new TextField();\n TextField columns = new TextField();\n ToggleButton vertical = new ToggleButton(\"Vertical\");\n ToggleButton horizontal = new ToggleButton(\"Horizontal\");\n nextScene.setDisable(true);\n\n //let the user choose the direction of the game pieces to be places on the board\n ToggleGroup group = new ToggleGroup();\n vertical.setToggleGroup(group);\n horizontal.setToggleGroup(group);\n vertical.setSelected(true);\n\n HBox hbox1 = new HBox(500, user, computer);\n\n HBox hbox3 = new HBox(40, vert1, humanBoard);\n HBox hbox4 = new HBox(40, vert2, computerBoard);\n\n VBox human = new VBox(40, hor1, hbox3);\n VBox comp = new VBox(40, hor2, hbox4);\n\n HBox sidebyside = new HBox(100, human, comp);\n\n hbox1.setAlignment(Pos.CENTER);\n hor1.setAlignment(Pos.CENTER);\n hor2.setAlignment(Pos.CENTER);\n human.setAlignment(Pos.CENTER);\n comp.setAlignment(Pos.CENTER);\n sidebyside.setAlignment(Pos.CENTER);\n\n\n\n HBox input1 = new HBox(10, row, rows);\n HBox input2 = new HBox(10, column, columns);\n HBox input3 = new HBox(10, direction, vertical, horizontal);\n HBox input = new HBox(50, input1, input2, input3, submit);\n\n //print the name of the first piece: Carrot\n pieceName.setText(arr[piece].getName());\n\n submit.setOnAction(e -> {\n\n try { //catch if input is not a number\n\n int y = Integer.parseInt(rows.getText());\n int x = Integer.parseInt(columns.getText());\n\n if (vertical.isSelected()) { //if toggle is vertical\n arr[piece].setDirection(\"VERTICAL\");\n\n } else if (horizontal.isSelected()) { //if toggle is horizontal\n arr[piece].setDirection(\"HORIZONTAL\");\n }\n\n\n try { //catch if input is out of range\n\n if (!humanBoard.setPiece(x, y, arr[piece].getDirection(), arr[piece])) { //if attack was not successful, print message\n isOccupied.setText(\"Invalid Location\");\n } else {\n isOccupied.setText(\"\"); //else print nothing\n piece++; //increment index\n if (piece < 4) {\n pieceName.setText(arr[piece].getName()); //print piece name\n }\n }\n } catch (IndexOutOfBoundsException err) { //print message if out of range\n isOccupied.setText(\"Invalid Location\");\n }\n if (piece == 4) { //if final piece, disable submit and enable nextScene for the user to start the game\n submit.setDisable(true);\n vertical.setDisable(true);\n horizontal.setDisable(true);\n rows.setDisable(true);\n columns.setDisable(true);\n piece = 0;\n nextScene.setDisable(false);\n\n }\n }\n catch (NumberFormatException e1) { //print message if input is not a number\n isOccupied.setText(\"Invalid Location\");\n }\n });\n\n\n input1.setAlignment(Pos.CENTER);\n input2.setAlignment(Pos.CENTER);\n input.setAlignment(Pos.CENTER);\n\n HBox buttons = new HBox(40, nextScene, exit);\n\n buttons.setAlignment(Pos.CENTER);\n\n setGame.setStyle(\"-fx-background-color: #B5D3E7\");\n\n VBox vbox = new VBox(30, table, hbox1, sidebyside, pieceName, input, buttons, isOccupied);\n vbox.setAlignment(Pos.CENTER);\n setGame.setCenter(vbox);\n return setGame; //return root\n }", "private void setVariables() {\n vb = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);\n linBoardGame = (LinearLayout) ((Activity) context).findViewById(boardID);\n gridContainer = (RelativeLayout) ((Activity) context).findViewById(R.id.gridContainer);\n shipTV = (TextView) ((Activity) context).findViewById(R.id.shipTV);\n linBoardGame.setOnTouchListener(this);\n sizeOfCell = Math.round(ScreenWidth() / (maxN + (1)));\n occupiedCells = new ArrayList<>();\n playerAttacks = new ArrayList<>();\n hit = false;\n gridID = R.drawable.grid;\n if (!player ) lockGrid = true;\n ships = new ArrayList<>();\n }", "public GUI(){\n\t\tsuper(\"Simori\");\n\t\tthis.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\tthis.getContentPane().setBackground(new Color(215,215,215));\n\t\tthis.setLayout(null);\n\t\t\n\t\t\n\t\tJPanel central = new JPanel();\n\t\tcentral.setSize(690,690);\n\t\tcentral.setLayout(new GridLayout(16,16));\n\t\tcentral.setBackground(new Color(215,215,215));\n\t\t\t\t\n\t\tActionListener modeListener = new ChangeModeListener();\n\t\tActionListener gridListener = new GridListener();\n\n\t\t\n\t\tfor(int i = 0; i < display.length; i++){\n\t\t\tfor(int j = 0; j < display[i].length; j++){\n\t\t\t\tJToggleButton button = new JToggleButton();\n\t\t\t\t\t\t\t\t\n\t\t\t\tbutton.setOpaque(true);\n\t\t\t\tbutton.setContentAreaFilled(true);\n\t\t\t\tbutton.setBorderPainted(false);\n\t\t\t\tbutton.setSelectedIcon(SCANNED);\n\t\t\t\tbutton.setIcon(DEFAULT);\n\t\t\t\t\n\t\t\t\tdisplay[i][j] = button;\t\t\t\t\t\t\t\n\t\t\t\tbutton.addActionListener(gridListener);\t\t\t\t\t\t\n\t\t\t\tcentral.add(button);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i=0;i<36;i++){\n\t\t\tkeyboardIconArray[i] = new ImageIcon(\"imgs//\"+keyboardArray[i]+\".jpg\");\n\t\t\tkeyboardSelectedArray[i] = new ImageIcon(\"imgs//\"+keyboardArray[i]+\"s.jpg\");\n\t\t}\n\t\tthis.add(central);\n\t\tcentral.setBounds(110, 70, 690, 690);\n\t\t\n\t\tChangeLayer.Layers = new Layer[16];\n\t\tfor(int i = 0; i < ChangeLayer.Layers.length; i++){\n\t\t\tChangeLayer.Layers[i] = new Layer();\n\t\t}\n\n\t\t\n\t\tJToggleButton ON = new JToggleButton();\n\t\tON.setToolTipText(\"ON\");;\n\t\tmenuButtons[0] = ON;\n\t\t\n\t\tJToggleButton L1 = new JToggleButton();\n\t\tL1.setToolTipText(\"L1\");\n\t\tmenuButtons[1] = L1;\n\t\tJToggleButton L2 = new JToggleButton();\n\t\tL2.setToolTipText(\"L2\");\n\t\tmenuButtons[2] = L2;\n\t\tJToggleButton L3 = new JToggleButton();\n\t\tL3.setToolTipText(\"L3\");\n\t\tmenuButtons[3] = L3;\n\t\tJToggleButton L4 = new JToggleButton();\n\t\tL4.setToolTipText(\"L4\");\n\t\tmenuButtons[4] = L4;\n\t\t\n\t\tJToggleButton R1 = new JToggleButton();\n\t\tR1.setToolTipText(\"R1\");\n\t\tmenuButtons[5] = R1;\n\t\tJToggleButton R2 = new JToggleButton();\n\t\tR2.setToolTipText(\"R2\");\n\t\tmenuButtons[6] = R2;\n\t\tJToggleButton R3 = new JToggleButton();\n\t\tR3.setToolTipText(\"R3\");\n\t\tmenuButtons[7] = R3;\n\t\tJToggleButton R4 = new JToggleButton();\n\t\tR4.setToolTipText(\"R4\");\n\t\tmenuButtons[8] = R4;\n\t\t\n\t\tJToggleButton OK = new JToggleButton();\n\t\tOK.setToolTipText(\"OK\");\n\t\tmenuButtons[9] = OK;\n\t\t\t\t\t\n\t\t\t\t\n\t\tthis.add(ON);\n\t\tON.setBounds(400, 5, 60, 60);\n\t\tON.setIcon(new ImageIcon(\"imgs//ON.jpg\"));\n\t\tON.setSelectedIcon(new ImageIcon(\"imgs//ONs.jpg\"));\n\t\tON.setBorderPainted(false);\n\t\tON.addActionListener(modeListener);\n\t\t\n\t\tthis.add(L1);\n\t\tL1.setBounds(20, 100, 70, 70);\n\t\tL1.setIcon(new ImageIcon(\"imgs//L1.jpg\"));\n\t\tL1.setSelectedIcon(new ImageIcon(\"imgs//L1s.jpg\"));\n\t\tL1.setBorderPainted(false);\n\t\tL1.addActionListener(modeListener);\n\t\tthis.add(L2);\n\t\tL2.setBounds(20, 250, 70, 70);\n\t\tL2.setIcon(new ImageIcon(\"imgs//L2.jpg\"));\n\t\tL2.setSelectedIcon(new ImageIcon(\"imgs//L2s.jpg\"));\n\t\tL2.setBorderPainted(false);\n\t\tL2.addActionListener(modeListener);\n\t\tthis.add(L3);\n\t\tL3.setBounds(20, 400, 70, 70);\n\t\tL3.setIcon(new ImageIcon(\"imgs//L3.jpg\"));\n\t\tL3.setSelectedIcon(new ImageIcon(\"imgs//L3s.jpg\"));\n\t\tL3.setBorderPainted(false);\n\t\tL3.addActionListener(modeListener);\n\t\tthis.add(L4);\n\t\tL4.setBounds(20, 550, 70, 70);\n\t\tL4.setIcon(new ImageIcon(\"imgs//L4.jpg\"));\n\t\tL4.setSelectedIcon(new ImageIcon(\"imgs//L4s.jpg\"));\n\t\tL4.setBorderPainted(false);\n\t\tL4.addActionListener(modeListener);\n\t\t\n\t\tthis.add(R1);\n\t\tR1.setBounds(820, 100, 70, 70);\n\t\tR1.setIcon(new ImageIcon(\"imgs//R1.jpg\"));\n\t\tR1.setSelectedIcon(new ImageIcon(\"imgs//R1s.jpg\"));\n\t\tR1.setBorderPainted(false);\n\t\tR1.addActionListener(modeListener);\n\t\tthis.add(R2);\n\t\tR2.setBounds(820, 250, 70, 70);\n\t\tR2.setIcon(new ImageIcon(\"imgs//R2.jpg\"));\n\t\tR2.setSelectedIcon(new ImageIcon(\"imgs//R2s.jpg\"));\n\t\tR2.setBorderPainted(false);\n\t\tR2.addActionListener(modeListener);\n\t\tthis.add(R3);\n\t\tR3.setBounds(820, 400, 70, 70);\n\t\tR3.setIcon(new ImageIcon(\"imgs//R3.jpg\"));\n\t\tR3.setSelectedIcon(new ImageIcon(\"imgs//R3s.jpg\"));\n\t\tR3.setBorderPainted(false);\n\t\tR3.addActionListener(modeListener);\n\t\tthis.add(R4);\n\t\tR4.setBounds(820, 550, 70, 70);\n\t\tR4.setIcon(new ImageIcon(\"imgs//R4.jpg\"));\n\t\tR4.setSelectedIcon(new ImageIcon(\"imgs//R4s.jpg\"));\n\t\tR4.setBorderPainted(false);\n\t\tR4.addActionListener(modeListener);\n\t\t\n\t\tthis.add(OK);\n\t\tOK.setBounds(550, 770, 70, 70);\n\t\tOK.setIcon(new ImageIcon(\"imgs//OK.jpg\"));\n\t\tOK.setSelectedIcon(new ImageIcon(\"imgs//OKs.jpg\"));\n\t\tOK.setBorderPainted(false);\n\t\tOK.addActionListener(modeListener);\n\t\t\n\t\tthis.add(textField);\n\t\ttextField.setEditable(false);\n\t\ttextField.setText(\"LCD\");\n\t\ttextField.setBounds(120, 770, 280, 70);\n\t\t\n\n\t\t//sets the initial behaviour\n\t\tOnOff.disableMenuButtons();\n\t\tOnOff.disableGridButtons();\n\t\t\n\t\tthis.setSize(915, 890);\n\t\tthis.setResizable(false);\n\t\tthis.setVisible(true);\n\t\t\n\t}", "public void startTable(Table t, Button[][] bt) {\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 5; j++) {\n if (t.getTableCell(i, j).getPawn() == null) {\n if (!table.getTableCell(i, j).isFree()) {\n continue;\n }\n bt[i][j].setOnMousePressed(e -> {\n Button button;\n button = (Button) e.getSource();\n int x = GridPane.getRowIndex(button);\n int y = GridPane.getColumnIndex(button);\n bt[x][y].setOnMouseEntered(null);\n bt[x][y].setOnMouseExited(null);\n bt[x][y].setStyle(\"-fx-border-color:blue\");\n System.out.println(\"x:\" + x + \"\\ty:\" + y);\n });\n bt[i][j].setOnMouseEntered(e -> {\n Button button;\n button = (Button) e.getSource();\n int x = GridPane.getRowIndex(button);\n int y = GridPane.getColumnIndex(button);\n bt[x][y].setStyle(\"-fx-border-color:yellow\");\n });\n bt[i][j].setOnMouseExited(e -> {\n Button button;\n button = (Button) e.getSource();\n int x = GridPane.getRowIndex(button);\n int y = GridPane.getColumnIndex(button);\n bt[x][y].setStyle(\"-fx-border-color:trasparent\");\n });\n bt[i][j].setOnAction(e -> {\n Button button;\n System.out.println(\"Cliccato\");\n button = (Button) e.getSource();\n int x = GridPane.getRowIndex(button);\n int y = GridPane.getColumnIndex(button);\n bt[x][y].setOnMousePressed(null);\n bt[x][y].setStyle(\"-fx-border-color:red\");\n bt[x][y].setDisable(true);\n pawnPlacedCounter++;\n initCoords = initCoords + x + \",\" + y + \",\";\n if (pawnPlacedCounter == 2) {\n try {\n handlerClient.initializePawns(initCoords);\n System.out.println(\"Invio coordinate al server:\\n\" + initCoords);\n initButtons();\n disableButtons(true);\n lightPause();\n } catch (IOException ioException) {\n setFailed(\"Errore di rete\");\n System.exit(1);\n }\n }\n });\n }\n }\n }\n }", "public boolean[] getActionEx(Environment observation, boolean[] keys) {\n boolean[] action = getAction(observation);\n\n /*if (action == null) {\n System.out.println(\" ROBOT: no action!\");\n } else {\n System.out.print(\" ROBOT: \");\n int i;\n for (i = 0; i < 5; i++) {\n if (action[i])\n System.out.print(Keys.toString(i) + \" \");\n }\n System.out.println(\"\");\n }*/\n \n if (action == null) {\n //System.out.println(\"No action!\");\n manualOverride = true;\n }\n\n if (keys[Keys.LEFT] ||\n keys[Keys.RIGHT] ||\n keys[Keys.DOWN] ||\n keys[Keys.JUMP] ||\n keys[Keys.SPEED])\n {\n manualOverride = true;\n }\n\n if (keys[Keys.SPECIAL]) {\n manualOverride = false;\n }\n\n if (manualOverride)\n action = keys;\n\n /*System.out.println(String.format(\"Action:%s%s%s%s%s Real x:%f Real vx:%f\\n\" +\n \" Sim x:%f Sim vx:%f\",\n action[Keys.LEFT] ? \"L\" : \"-\",\n action[Keys.RIGHT] ? \"R\" : \"-\",\n action[Keys.DOWN] ? \"D\" : \"-\",\n action[Keys.JUMP] ? \"J\" : \"-\",\n action[Keys.SPEED] ? \"S\" : \"-\",\n pos.x, pos.vx, simulator.getX(), simulator.getVX()));*/\n\n /*if (simulator != null) {\n if (simulator.getX() != mario.x) {\n System.out.println(String.format(\"SIMULATION ERROR: x is %f, expected %f\",\n simulator.getX(), mario.x));\n //simulator.setX(pos.x);\n }\n if (simulator.getY() != mario.y) {\n System.out.println(String.format(\"SIMULATION ERROR: y is %f, expected %f\",\n simulator.getY(), mario.y));\n //simulator.setY(pos.y);\n }\n\n simulator.mario.diff(\"###\", mario);\n\n // TODO: also create and update another, single-stepped simulator here.\n // The result should match the continuously running one.\n MotionSimulator oneStep = new MotionSimulator(simulator.getScene(), simulator.mario);\n oneStep.mario.diff(\"Checkpoint 1: oneStep vs. simulator\", simulator.mario);\n \n simulator.update(action);\n // New simulator position will be checked next time around.\n\n oneStep.update(action);\n\n oneStep.mario.diff(\"Checkpoint 2: oneStep vs. simulator\", simulator.mario);\n\n if (oneStep.getX() != simulator.getX()) {\n System.out.println(String.format(\"ONE STEP ERROR: x is %f, expected %f\",\n oneStep.getX(), simulator.getX()));\n }\n if (oneStep.getY() != simulator.getY()) {\n System.out.println(String.format(\"ONE STEP ERROR: y is %f, expected %f\",\n oneStep.getY(), simulator.getY()));\n }\n }*/\n\n return action;\n }", "public void autonomousPeriodic() {\r\n try{\r\n if(joy.getRawButton(2)){\r\n frontLeft.set(1);\r\n }else if(joy.getRawButton(3)){\r\n frontRight.set(1);\r\n }else if(joy.getRawButton(4)){\r\n backRight.set(1);\r\n }else if(joy.getRawButton(5)){\r\n backLeft.set(1);\r\n }\r\n }catch(Exception e){\r\n \r\n }\r\n \r\n }", "public void rumbleInYourPants() {\n double accel_z = RobotMap.helmsman.getAcceleromoterZ();\n Robot.oi.getXBoxJoystick().setRumble(RumbleType.kLeftRumble, (float) Math.abs(accel_z - 1));\n Robot.oi.getXBoxJoystick().setRumble(RumbleType.kRightRumble, (float) Math.abs(accel_z - 1));\n Robot.oi.getXBoxJoystick2().setRumble(RumbleType.kLeftRumble, (float) Math.abs(accel_z - 1));\n Robot.oi.getXBoxJoystick2().setRumble(RumbleType.kRightRumble, (float) Math.abs(accel_z - 1));\n }", "@Override\n public void teleopPeriodic() {\n\t\t/* xbox processing */\n\t\tdouble leftYstick = xbox.getY(Hand.kLeft);\n\t\tboolean buttonA = xbox.getAButton();\n boolean buttonB = xbox.getBButton();\n boolean buttonX = xbox.getXButton();\n boolean buttonY = xbox.getYButton();\n\n\t\t/* Get Talon/Victor's current output percentage */\n\t\tdouble motorOutput = elevator.getMotorOutputPercent();\n\n\t\t/* Deadband gamepad */\n\t\tif (Math.abs(leftYstick) < 0.10) {\n\t\t\t/* Within 10% of zero */\n\t\t\tleftYstick = 0;\n }\n\n\t\t/* Prepare line to print */\n\t\t_sb.append(\"\\tout:\"); _sb.append((int) (motorOutput * 100)); _sb.append(\"%\"); // Percent\n\t\t_sb.append(\"\\tpos:\"); _sb.append(elevator.getSelectedSensorPosition(0)); _sb.append(\"u\"); // Native units\n\n\t\t/**\n\t\t * When button 1 is pressed, perform Position Closed Loop to selected position,\n\t\t * indicated by Joystick position x10, [-10, 10] rotations\n\t\t */\n\t\t//if (!_lastButton1 && buttonA) {\n if (buttonB) {\n\t\t\t/* Position Closed Loop */\n\t\t\t/* 10 Rotations * 4096 u/rev in either direction */\n\t\t\ttargetPositionRotations = 5000; // 2* 4096; //leftYstick * 10.0 * 4096;\n\t\t\televator.set(ControlMode.Position, targetPositionRotations);\n\t\t}\n if (buttonX) {\n\t\t\t/* Position Closed Loop */\n\t\t\t/* 10 Rotations * 4096 u/rev in either direction */\n\t\t\ttargetPositionRotations = 3000; //2* 4096; //leftYstick * 10.0 * 4096;\n\t\t\televator.set(ControlMode.Position, -targetPositionRotations);\n\t\t}\n\n\t\t/* When button 2 is held, just straight drive */\n\t\tif (buttonA) {\n /* Percent Output */\n\t\t elevator.set(ControlMode.PercentOutput, leftYstick);\n }\n \n if (buttonY) {\n elevator.setSelectedSensorPosition(0); // reset to zero\n elevator.getSensorCollection().setQuadraturePosition(0, 10);\n elevator.set(ControlMode.PercentOutput, 0);\n }\n// else{\n //}\n\n\t\t/* If Talon is in position closed-loop, print some more info */\n\t\tif (elevator.getControlMode() == ControlMode.Position) {\n /* Append more signals to print when in speed mode. */\n\t\t\t_sb.append(\"\\terr:\"); _sb.append(elevator.getClosedLoopError(0)); _sb.append(\"u\");\t// Native Units\n\t\t\t_sb.append(\"\\ttrg:\"); _sb.append(targetPositionRotations); _sb.append(\"u\");\t// Native Units\n\t\t}\n\n\t\t/**\n\t\t * Print every ten loops, printing too much too fast is generally bad\n\t\t * for performance.\n\t\t */\n\t\tif (++_loops >= 10) {\n\t\t\t_loops = 0;\n\t\t\tSystem.out.println(_sb.toString());\n\t\t}\n\n\t\t/* Reset built string for next loop */\n\t\t_sb.setLength(0);\n\t\t\n\t\t/* Save button state for on press detect */\n\t\t//_lastButton1 = buttonA;\n }", "public void xboxHatchControl()\n {\n if (RobotMap.assistantDriverController.getStartButtonPressed())\n {\n RobotMap.hatchHolderTalon.set(0);\n }\n if (RobotMap.assistantDriverController.getBumperPressed(Hand.kLeft))\n {\n if (RobotMap.hatchHolderHasHatch)\n new ReleaseHatchCommand().start();\n else\n new GrabHatchCommand().start();\n RobotMap.hatchHolderHasHatch = !RobotMap.hatchHolderHasHatch;\n }\n }", "private void inventoryHandler(){\n final Button TAB = getOwnerArea().getKeyboard().get(Keyboard.TAB);\n final Button SPACE = getOwnerArea().getKeyboard().get(Keyboard.SPACE);\n final Button R = getOwnerArea().getKeyboard().get(Keyboard.R);\n final Button T = getOwnerArea().getKeyboard().get(Keyboard.T);\n final Button Y = getOwnerArea().getKeyboard().get(Keyboard.Y);\n final Button U = getOwnerArea().getKeyboard().get(Keyboard.U);\n final Button I = getOwnerArea().getKeyboard().get(Keyboard.I);\n final Button O = getOwnerArea().getKeyboard().get(Keyboard.O);\n final Button P = getOwnerArea().getKeyboard().get(Keyboard.P);\n final Button K = getOwnerArea().getKeyboard().get(Keyboard.K);\n\n //Used for tests, as asked in the instructions\n if (R.isPressed()) {\n inventory.add(ARPGItem.ARROW, 1);\n } else if (T.isPressed()) {\n inventory.add(ARPGItem.SWORD, 1);\n } else if (Y.isPressed()) {\n inventory.add(ARPGItem.STAFF, 1);\n } else if (U.isPressed()) {\n inventory.add(ARPGItem.BOW, 1);\n } else if (I.isPressed()) {\n inventory.add(ARPGItem.BOMB, 1);\n } else if (O.isPressed()) {\n inventory.add(ARPGItem.CASTLEKEY, 1);\n } else if (P.isPressed()) {\n inventory.add(ARPGItem.WINGS, 1);\n } else if (K.isPressed()) {\n inventory.add(ARPGItem.CHESTKEY, 1);\n }\n\n /*If the player does not have any currentItem anymore we switch it (f. ex. if a player\n uses his last bomb or if the constructor assigns as the player's current item an item\n he does not possess by mistake)\n */\n if(!possess(currentItem)) {\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n }\n\n //Switches item.\n if(TAB.isPressed()){\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n if(currentItem == ARPGItem.ARROW){\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n }\n }\n\n //Uses the item and adapts the animations\n if(SPACE.isPressed() && !isDisplacementOccurs()){\n if(currentItem.use(getOwnerArea(), getOrientation(), getCurrentMainCellCoordinates())){\n switch(currentItem){\n case BOMB:\n inventory.remove(currentItem, 1);\n break;\n case BOW:\n if(actionTimer >= COOLDOWN) {\n animateAction = true;\n currentAnimation = bowAnimations[getOrientation().ordinal()];\n shootArrow = true;\n actionTimer = 0.f;\n }\n break;\n case SWORD:\n animateAction = true;\n currentAnimation = swordAnimations[getOrientation().ordinal()];\n break;\n case STAFF:\n animateAction = true;\n currentAnimation = staffAnimations[getOrientation().ordinal()];\n break;\n }\n\n }\n }\n\n //Wings have a special treatment because SPACE needs to be down and not pressed\n if (currentItem == ARPGItem.WINGS && SPACE.isDown()) {\n //Sets the animation for the current orientation. Make sure it doesn't fly yet\n // so that the animation is not stuck.\n if (!canFly) {\n currentAnimation = flyAnimations[getOrientation().ordinal()];\n }\n canFly = true;\n } else {\n //Resets to idleAnimations\n if (canFly) {\n currentAnimation = idleAnimations[getOrientation().ordinal()];\n }\n canFly = false;\n }\n }", "public void updateController() {\n\t\tjoystickLXAxis = controller.getRawAxis(portJoystickLXAxis);\t\t//returns a value [-1,1]\n\t\tjoystickLYAxis = controller.getRawAxis(portJoystickLYAxis);\t\t//returns a value [-1,1]\n\t\tjoystickLPress = controller.getRawButton(portJoystickLPress);\t//returns a value {0,1}\n\t\t\n\t\t//right joystick update\n\t\tjoystickRXAxis = controller.getRawAxis(portJoystickRXAxis);\t\t//returns a value [-1,1]\n\t\tjoystickRYAxis = controller.getRawAxis(portJoystickRYAxis);\t\t//returns a value [-1,1]\n\t\tjoystickRPress = controller.getRawButton(portJoystickRPress);\t//returns a value {0,1}\n\t\t\n\t\t//trigger updates\n\t\ttriggerL = controller.getRawAxis(portTriggerL);\t\t//returns a value [0,1]\n\t\ttriggerR = controller.getRawAxis(portTriggerR);\t\t//returns a value [0,1]\n\t\t\n\t\t//bumper updates\n\t\tbumperL = controller.getRawButton(portBumperL);\t\t//returns a value {0,1}\n\t\tbumperR = controller.getRawButton(portBumperR);\t\t//returns a value {0,1}\n\t\t\n\t\t//button updates\n\t\tbuttonX = controller.getRawButton(portButtonX);\t\t//returns a value {0,1}\n\t\tbuttonY = controller.getRawButton(portButtonY);\t\t//returns a value {0,1}\n\t\tbuttonA = controller.getRawButton(portButtonA);\t\t//returns a value {0,1}\n\t\tbuttonB = controller.getRawButton(portButtonB);\t\t//returns a value {0,1}\n\t\t\n\t\tbuttonBack = controller.getRawButton(portButtonBack);\t//returns a value {0,1}\n\t\tbuttonStart = controller.getRawButton(portButtonStart);\t//returns a value {0,1}\n\t\t\n\t\t//toggle checks\n\t\ttankDriveBool = checkButton(buttonX, tankDriveBool, portButtonX);\t\t//toggles boolean if button is pressed\n\t\tfastBool = checkButton(buttonB, fastBool, portButtonB);\t\t\t\t\t//toggles boolean if button is pressed\n\t\t\n\t\t\n\t\t//d-pad/POV updates\n\t\tdPad = controller.getPOV(portDPad);\t\t//returns a value {-1,0,45,90,135,180,225,270,315}\n\n\t\t//d-pad/POV turns\n\t\tif (dPad != -1) {\n\t\t\tdPad = 360 - dPad; //Converts the clockwise dPad rotation into a Gyro-readable counterclockwise rotation.\n\t\t\trotateTo(dPad);\n\t\t}\n\t\t\n\t\tjoystickDeadZone();\n\t}", "private void updateShipsAndSpinners() {\n this.simulationSpeed = menuPanel.getSimulationSpeed();\n this.simulation.setSimulationSpeed(simulationSpeed);\n //assign amount of ships requested to the local variable\n int shipsRequested = menuPanel.getShipCount();\n\n //add or remove amount of ships depending on difference\n if(shipCount < shipsRequested) {\n int diff = shipsRequested - shipCount;\n for (int i = 0; i < diff; i++) {\n simulation.addShip();\n }\n }else if (shipCount > shipsRequested) {\n int diff = shipCount - shipsRequested;\n for (int i = 0; i < diff; i++) {\n simulation.removeShip();\n }\n }\n\n //update spinners so that values will not destroy simulation or collide with assumptions given for the task\n if(this.shipCount!=shipsRequested) {\n menuPanel.updateTugSpinner(simulation.getMinimumTugsRequired(), simulation.getCountOfAllTugsRequired());\n menuPanel.updateQuaySpinner(shipsRequested);\n menuPanel.setSpinnerListeners(); //important, because update functions recreate spinners without listeners\n }\n //update local values\n this.quayCount = menuPanel.getQuayCount();\n this.tugCount = menuPanel.getTugCount();\n this.shipCount = shipsRequested;\n\n }", "public void setDirection(){\n\n if (gameStatus != demoPlay)\n client_sb.i_Button = direct;\n\n TankMoveDelay++;\n StarGun_GSR loc=(StarGun_GSR)client_sb.getGameStateRecord();\n\n if (TankMoveDelay >= 1 &&\n loc.getPlayerX() < StarGun_SB.PLAYER_RIGHT_BORDER &&\n\t loc.getPlayerX() > 0) {\n TankMoveDelay = 0;\n switch (direct) {\n\tcase StarGun_SB.DIRECT_LEFT:\n\t if (TankPos==0)TankPos=iTankAmount-1;\n\t else TankPos--;\n\t\t\t\t break;\n case StarGun_SB.DIRECT_RIGHT:\n\t if (TankPos==iTankAmount-1)TankPos=0;\n\t else TankPos++;\n\t\t\t\t break;\n }\n }\n }", "private void feedback_output(){\r\n\t\tif(up){controller_computer.gui_computer.PressedBorderUp();}\r\n\t\tif(down){controller_computer.gui_computer.PressedBorderDown();}\r\n\t\tif(right){controller_computer.gui_computer.PressedBorderRight();}\r\n\t\tif(left){controller_computer.gui_computer.PressedBorderLeft();}\r\n\t}", "public void thrust() {\n // Offset the angle since we drew the ship vertically\n float angle = heading - PI/2;\n // Polar to cartesian for force vector!\n PVector force = new PVector(cos(angle),sin(angle));\n force.mult(5); // original shiffman code =.5\n applyForce(force); \n // To draw booster\n thrust = true;\n }", "public void change_sword_pos() {\n\t\tif (!heroi.isArmado())\n\t\t\tlabirinto.setLabCell(espada.getX_coord(), espada.getY_coord(), 'E');\n\t}", "public void define(){\n\n noOfCredits = Game.level.getCredits();\n unitsToWin = Game.level.getUnitsToWin();\n\n for (int i = 0; i <buttons.length ; i++) {\n buttons[i] = new ShopButton((Game.width/2) -\n ((noOfButtons*buttonsize)/2) -((smallSpace*\n (buttons.length-1)) /2) + ((buttonsize + smallSpace)*i),\n ((GameContainer.rowCount * GameContainer.squareSize )\n + largeSpace), buttonsize , buttonsize, i);\n }\n\n for (int i = 0; i < statsElements.length ; i++) {\n //define where the statselement should be placed.\n statsElements[i] = new ShopButton(((Game.width/2)\n - (GameContainer.columnCount*\n GameContainer.squareSize )/2 + (((GameContainer.columnCount\n *GameContainer.squareSize)/7)*3)*i ),\n (GameContainer.rowCount * GameContainer.squareSize\n ), buttonsize , buttonsize, i);\n }\n }", "public void setTargets(){\n Targot_Button1 = new JButton();\n Targot_Button1.setSize(50,120);\n Targot_Button1.setVisible(true);\n Targot_Button1.setLocation(235,270);\n Targot_Button1.setContentAreaFilled(false);\n Targot_Button1.setBorder(null);\n Targot_Button1.addActionListener(this);\n this.add(Targot_Button1);\n \n // sets up targot 2\n Targot_Button2 = new JButton();\n Targot_Button2.setSize(50,125);\n Targot_Button2.setVisible(true);\n Targot_Button2.setLocation(128,280);\n Targot_Button2.setContentAreaFilled(false);\n Targot_Button2.setBorder(null);\n Targot_Button2.addActionListener(this);\n this.add(Targot_Button2);\n \n // sets up targot 3\n Targot_Button3 = new JButton();\n Targot_Button3.setSize(40,80);\n Targot_Button3.setVisible(true);\n Targot_Button3.setLocation(185,280);\n Targot_Button3.setContentAreaFilled(false);\n Targot_Button3.setBorder(null);\n Targot_Button3.addActionListener(this);\n this.add(Targot_Button3);\n \n // sets up targot 4\n Targot_Button4 = new JButton();\n Targot_Button4.setSize(65,180);\n Targot_Button4.setVisible(true);\n Targot_Button4.setLocation(15,265);\n Targot_Button4.setContentAreaFilled(false);\n Targot_Button4.setBorder(null);\n Targot_Button4.addActionListener(this);\n this.add(Targot_Button4);\n \n // sets up targot 5\n Targot_Button5 = new JButton();\n Targot_Button5.setSize(20,60);\n Targot_Button5.setVisible(true);\n Targot_Button5.setLocation(380,270);\n Targot_Button5.setContentAreaFilled(false);\n Targot_Button5.setBorder(null);\n Targot_Button5.addActionListener(this);\n this.add(Targot_Button5);\n \n // sets up targot 1\n Targot_Button6 = new JButton();\n Targot_Button6.setSize(40,100);\n Targot_Button6.setVisible(true);\n Targot_Button6.setLocation(465,280);\n Targot_Button6.setContentAreaFilled(false);\n Targot_Button6.setBorder(null);\n Targot_Button6.addActionListener(this);\n this.add(Targot_Button6);\n \n }", "public XboxController(int port,double leftDeadZone, double rightDeadZone){\n \tdeadZoneLeft = leftDeadZone * leftDeadZone;\n \tdeadZoneRight = rightDeadZone * rightDeadZone;\n \tdStation = DriverStation.getInstance();\n \tthis.port=port;\n for(int ii=0;ii<10;ii++){\n \tbuttons[ii]=new Button();\n }\n refresh();\n Buttons=new ButtonRemap();\n buttonCount=dStation.getStickButtonCount(port);\n }", "@Override\r\n\tpublic void keyPressed(KeyEvent event) {\r\n\t\tswitch(event.getKeyCode())//iterate over buttons and dispatch command\r\n\t\t{\r\n\t\tcase 38://up\r\n\t\tcase 87://w\r\n\t\t\tforwardV += 2;\r\n\t\t\tbreak;\r\n\t\tcase 40://down\r\n\t\tcase 83://s\r\n\t\t\tforwardV -= 2;\r\n\t\t\tbreak;\r\n\t\tcase 37://left\r\n\t\tcase 65://a\r\n\t\t\thorizV -= 2;\r\n\t\t\tbreak;\r\n\t\tcase 39://right\r\n\t\tcase 68://d\r\n\t\t\thorizV += 2;\r\n\t\t}\r\n\t\t\r\n\t\t//set max and min for character speed\r\n\t\tif(horizV>2)\r\n\t\t\thorizV=2;\r\n\t\tif(forwardV>2)\r\n\t\t\tforwardV=2;\r\n\t\tif(horizV<-2)\r\n\t\t\thorizV=-2;\r\n\t\tif(forwardV<-2)\r\n\t\t\tforwardV=-2;\r\n\t\t\r\n\t\t//set character speed\r\n\t\tVector v = new Vector(forwardV, horizV);\r\n\t\tv = v.rotate(aSquare.getOrientation().getAngle());\r\n\t\taSquare.setVelocity(v);\r\n\t}", "private void updateControlView() {\n // initialize varables with default value\n int thermDrawable = R.drawable.off_thermostat_drawable;\n int mercuryDrawable = R.drawable.clip_mercury_off;\n int upColor = Color.WHITE;\n int downColor = Color.WHITE;\n int thermometerColor = Color.BLACK;\n double targetC = display_temp;\n double ambientC = mThermostat.getAmbientTemperatureC();\n double tempDiffC = targetC - ambientC;\n String state = mStructure.getAway();\n String mode = mThermostat.getHvacMode();\n boolean isAway = state.equals(KEY_AWAY) || state.equals(KEY_AUTO_AWAY);\n boolean isHeating = KEY_HEAT.equals(mode) && tempDiffC > 0;\n boolean isCooling = KEY_COOL.equals(mode) && tempDiffC < 0;\n GradientDrawable shapeBottom1 = (GradientDrawable) mThermometerBottom1.getDrawable();\n GradientDrawable shapeBottom2 = (GradientDrawable) mThermometerBottom2.getDrawable();\n\n Log.v(TAG, \"updateControlView\");\n\n // change varables based on HVAC status\n if (isHeating) { // if the HVAC is heating\n thermDrawable = R.drawable.heat_thermostat_drawable;\n mercuryDrawable = R.drawable.clip_mercury_heat;\n upColor = Color.RED;\n downColor = Color.GREEN;\n thermometerColor = ContextCompat.getColor(context, R.color.heat);\n } else if (isCooling) { // if the HVAC is cooling\n thermDrawable = R.drawable.cool_thermostat_drawable;\n mercuryDrawable = R.drawable.clip_mercury_cool;\n upColor = Color.GREEN;\n downColor = Color.RED;\n thermometerColor =ContextCompat.getColor(context,R.color.cool);\n }\n\n // Update the view.\n if (isAway) {\n mTargetTempText.setText(R.string.thermostat_away);\n }else {\n mTargetTempText.setText(String.format(Locale.CANADA, DEG_C, targetC));\n }\n mThermostatView.setBackgroundResource(thermDrawable);\n mTempUp.setTextColor(upColor);\n mTempDown.setTextColor(downColor);\n\n shapeBottom1.setColor(thermometerColor);\n shapeBottom2.setColor(thermometerColor);\n mMercuryImg.setImageResource(mercuryDrawable);\n\n updateSaving(!isCooling && !isHeating);\n }", "public void mousePressed() //transport mode selected\n{\n if (mouseButton == LEFT)\n {\n if (mouseX >= lx && mouseX <= lx+bw && mouseY >= ly+65 && mouseY <= ly+65+bl)\n {\n tm[0] =! tm[0];\n } else if (mouseX >= lx && mouseX <= lx+bw && mouseY >= ly+65+2*bl && mouseY <= ly+65+3*bl)\n { \n tm[1] =! tm[1];\n } else if (mouseX >= lx && mouseX <= lx+bw && mouseY >= ly+65+4*bl && mouseY <= ly+65+5*bl)\n {\n tm[2] =! tm[2];\n } else if (mouseX >= lx && mouseX <= lx+bw && mouseY >= ly+65+6*bl && mouseY <= ly+65+7*bl)\n {\n tm[3] =! tm[3];\n } else if (mouseX >= lx && mouseX <= lx+bw && mouseY >= ly+65+8*bl && mouseY <= ly+65+9*bl)\n {\n tm[4] =! tm[4];\n } else if (mouseX >= lx && mouseX <= lx+bw && mouseY >= ly+65+10*bl && mouseY <= ly+65+11*bl)\n {\n tm[5] =! tm[5];\n } else if (mouseX >= lx && mouseX <= lx+bw && mouseY >= ly+65+12*bl && mouseY <= ly+65+13*bl)\n {\n tm[6] =! tm[6];\n }\n }\n}", "public void initiateValues() {\n\t\t// initialise states and actions\n\t\toldState = new MarioState(configFile);\n\t\tstate = new MarioState(configFile);\n\t\t\n\t\treturnAction = new boolean[Environment.numberOfButtons];\n\t\tallActions = getAllActions();\n\t\t\n\t\t// hardcoded set the possible actions\n\t\tJUMP[Mario.KEY_JUMP] = true;\n\t\tSPEED[Mario.KEY_SPEED] = true;\n\t\tJUMP_SPEED[Mario.KEY_JUMP] = JUMP_SPEED[Mario.KEY_SPEED] = true;\n\t\tRIGHT[Mario.KEY_RIGHT] = true;\n\t\tRIGHT_JUMP[Mario.KEY_RIGHT] = RIGHT_JUMP[Mario.KEY_JUMP] = true;\n\t\tRIGHT_SPEED[Mario.KEY_RIGHT] = RIGHT_SPEED[Mario.KEY_SPEED] = true;\n\t\tRIGHT_JUMP_SPEED[Mario.KEY_RIGHT] = RIGHT_JUMP_SPEED[Mario.KEY_JUMP] = \n\t\t\t\tRIGHT_JUMP_SPEED[Mario.KEY_SPEED] = true;\n\t\tLEFT[Mario.KEY_LEFT] = true;\n\t\tLEFT_JUMP[Mario.KEY_LEFT] = LEFT_JUMP[Mario.KEY_JUMP] = true;\n\t\tLEFT_SPEED[Mario.KEY_LEFT] = LEFT_SPEED[Mario.KEY_SPEED] = true;\n\t\tLEFT_JUMP_SPEED[Mario.KEY_LEFT] = LEFT_JUMP_SPEED[Mario.KEY_JUMP] = \n\t\t\t\tLEFT_JUMP_SPEED[Mario.KEY_SPEED] = true;\n\n\t}", "private void addButtons() {\r\n\t\troot.getChildren().add(button); // creating the Easy button \r\n\t\tb1 = new Button(\"Easy\");\r\n\t\tb1.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Easy\";\r\n\t\t\t}\r\n\t\t});\r\n\t\troot.getChildren().add(b1); // creating the Normal button\r\n\t\tb2 = new Button(\"Normal\");\r\n\t\tb2.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Normal\";\r\n\t\t\t}\r\n\t\t});\r\n\t\tb2.setLayoutX(50);\r\n\t\troot.getChildren().add(b2); // creating the Hard button\r\n\t\tb3 = new Button(\"Hard\");\r\n\t\tb3.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Hard\";\r\n\t\t\t}\r\n\t\t});\r\n\t\tb3.setLayoutX(115);\r\n\t\troot.getChildren().add(b3);\r\n\t}", "public void act() {\n\t\tsuper.act();\n\t\t//Gracias www.trucoteca.com\n\t\tif(control && shift && n) {\n\t\t\tthis.x = Ventana.getInstancia().getBola().getX();\n\t\t}\n\t\t//Si quieres ser legal\n\t\telse {\n\t\tthis.x += this.vx;\n\t\t}\n\t\tif(this.x < 0)\n\t\t\tthis.x = 0;\n\t\tif(this.x > Stage.WIDTH - getWidth())\n\t\t\tx = Stage.WIDTH - getWidth();\n\t\t}", "public OI(){\n\t\t\n\t//\tc6.whenPressed(new dumpFlapOpen());\n\t\t//c8.whenPressed(new dumpFlapClose()); \n//\t\tl7.whenPressed(new dumpFlapOpen());\n//\n//\t\tx3.whileHeld(new hopperCoil());\n//\t\tx1.whileHeld(new hopperUnCoil());\n//\t\tx2.whileHeld(new climber());\n//\t\tx0.whenPressed(new climberReset());\n//\t\tx8.toggleWhenPressed(new cameraOneInit());\n//\t\tx9.toggleWhenPressed(new cameraTwoInit());\n//\n//\t\tr1.toggleWhenPressed(new driveBaseSwitchDirections());\n\t\t//l1.toggleWhenPressed(new visionSwitchCameras());\n\t\t\n\t\t/* logitech controller */\n\t\tc6.whenPressed(new dumpFlapOpen());\n\t\tc8.whenPressed(new dumpFlapClose()); \n\t\tl7.whenPressed(new dumpFlapOpen());\n\n\t\tc4.whileHeld(new hopperCoil());\n\t\tc3.whileHeld(new hopperUnCoil());\n\t\tc1.whileHeld(new climber());\n\t\tc2.whenPressed(new climberReset());\n\t\tc11.toggleWhenPressed(new cameraOneInit());\n\t\tc12.toggleWhenPressed(new cameraTwoInit());\n\n\t\tr1.toggleWhenPressed(new driveBaseSwitchDirections());\n\t\tl1.toggleWhenPressed(new visionSwitchCameras());\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/* TRASH CONTROLS */\n\t\t//l7.whenPressed(new resetClimberBoolean());\n\t\t//r1.whenPressed(new visionSwitchCameras());\n//\t\tl1.whenPressed(new visionSwitchCameras());\n\t\t//r1.whenActive(new visionSwitchCameras());\n//\t\tc9.whenPressed(new intakeFlapOpen());\n//\t\tc10.whenPressed(new intakeFlapClose()); \n\t\t\n//\t\tc5.whenPressed(new pushGearOut());\n//\t\tc7.whenPressed(new pushGearIn()); \n\t\t\n//\t\tc5.whenActive(new pushGearOut());\n//\t\tc7.whenActive(new pushGearIn()); \n//\t\tc5.toggleWhenPressed(new pushGearOut());\n//\tc7.toggleWhenPressed(new pushGearIn()); \n//\n//\t\tc5.whileHeld(new pushGearOut());\n//\t\tc7.whileHeld(new pushGearIn()); \n\t}", "void move_ship() {\n if (pressed_key_codes.contains(KeyCode.A)) {\n ship.moveLeft();\n ship_image_view.setX(ship.x_position);\n }\n if (pressed_key_codes.contains(KeyCode.D)) {\n ship.moveRight();\n ship_image_view.setX(ship.x_position);\n }\n }", "private void GetInput()\r\n {\r\n ///Implicit eroul nu trebuie sa se deplaseze daca nu este apasata o tasta\r\n xMove = 0;\r\n yMove = 0;\r\n\r\n ///Verificare apasare tasta \"sus\"\r\n if(refLink.GetKeyManager().up_arrow && !isJumping)\r\n {\r\n jumpDirection = -1;\r\n isJumping = true;\r\n jumpSpeed = 0;\r\n }\r\n /*\r\n ///Verificare apasare tasta \"jos\"\r\n if(refLink.GetKeyManager().down)\r\n {\r\n yMove = speed;\r\n }*/\r\n ///Verificare apasare tasta \"left\"\r\n if(refLink.GetKeyManager().left_arrow && x + xMove > 15)\r\n {\r\n xMove = -speed;\r\n }\r\n ///Verificare apasare tasta \"dreapta\"\r\n if(refLink.GetKeyManager().right_arrow && x + xMove < 900)\r\n {\r\n xMove = speed;\r\n }\r\n }", "private void action() {\r\n moveSnake();\r\n if (hasEatenPowerUp() == false) checkForCollisionWithSelf();\r\n if (hasHitBoundry() == false) redraw();\r\n }", "public OI() {\n // Xbox Controller 0 Buttons\n \tButtonMap.xbox0_Y.whileHeld(new TransmissionAscend());\n \tButtonMap.xbox0_A.whileHeld(new TransmissionDescend());\n \tButtonMap.xbox0_R1.whenPressed(new ClawClose());\n \tButtonMap.xbox0_L1.whenPressed(new ClawOpen());\n \t\n \t// Drive Commands\n \tButtonMap.xbox0_B.whileHeld(new DriveFullSpeedWithJoystick());\n ButtonMap.xbox0_B.whenReleased(new ArcadeTriggerDriveWithJoystick());\n \t\n \t// Xbox Controller 1 Buttons\n \tButtonMap.xbox1_R1.whenPressed(new ClawClose());\n \tButtonMap.xbox1_L1.whenPressed(new ClawOpen()); \n \tButtonMap.xbox1_Y.whileHeld(new TransmissionAscend()); \n \tButtonMap.xbox1_A.whileHeld(new TransmissionDescend()); \n }", "public void skills(){\n\t\tup = false;\n\t\tdown = false;\n\t\tleft = false;\n\t\tright = false;\n\t\tskillmode = true;\n\t\t\n\t\tif(player.hasSkillHealth1()){\n\t\t\tt1.setEnabled(false);\n\t\t\tt3.setEnabled(true);\n\t\t}else{\n\t\t\tt3.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillHealth2()){\n\t\t\tt3.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillStrength1()){\n\t\t\tt2.setEnabled(false);\n\t\t\tt4.setEnabled(true);\n\t\t}else{\n\t\t\tt4.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillStrength2()){\n\t\t\tt4.setEnabled(false);\n\t\t}\n\t\tskills.setVisible(true);\n\t\t\n\t}", "private void swhFieldConditions() {\n\n gameScreenBackground.setImageResource(com.ryansplayllc.ryansplay.R.drawable.baseball_field);\n\n swhImageView.setSelected(false);\n baseHitImageView.setSelected(false);\n\n lfTextView.setSelected(false);\n rfTextView.setSelected(false);\n cfTextView.setSelected(false);\n cTextView.setSelected(false);\n pTextView.setSelected(false);\n oneBTextView.setSelected(false);\n twoBTextView.setSelected(false);\n threeBTextView.setSelected(false);\n ssTextView.setSelected(false);\n\n leftFieldPoints.setVisibility(View.GONE);\n rightFieldpoints.setVisibility(View.GONE);\n centerFieldPoints.setVisibility(View.GONE);\n\n hideAllFieldPosBadges();\n swhLabel.setVisibility(View.GONE);\n\n homeRunImageView.setEnabled(true);\n runScore.setEnabled(true);\n possiblePoints.setText(\"0 / 0\");\n baseHitImageView.setBackgroundResource(com.ryansplayllc.ryansplay.R.drawable.base_hit);\n\n positionsEnable();\n\n //disable basehit\n baseHitImageView.setEnabled(false);\n baseHitImageView.setAlpha((float) 0.6);\n\n //enable swh\n swhImageView.setEnabled(true);\n swhImageView.setAlpha((float) 1.0);\n\n\n }", "public void operatorControl() {\n \tdouble ctrlThresh = .2; \n \tdouble minPower = .05; \n \tdouble maxPower = .75; \n \tdouble recip = (1 - ctrlThresh); \n \tdouble mult = (maxPower - minPower); \n \tdouble right; \n \tdouble strafe; \n \tdouble rotate; \n \tdouble rightAxis; \n \tdouble strafeAxis; \n \tdouble rotateAxis; \n \t// \tboolean leftLeft; \n \t// \tboolean leftRight; \n \tdouble rightDir; \n \tdouble strafeDir; \n \tdouble rotateDir; \n \tdouble rightPower; \n \tdouble rotatePower; \n \tdouble strafePower; \n \t\n \tint winchCount;\n \tboolean winchDirection;\n \n \t// \tdouble frontLeftPower; \n \t// \tdouble frontRightPower; \n \t// \tdouble backLeftPower; \n \t// \tdouble backRightPower; \n \n \t//myRobot.setSafetyEnabled(true); \n \t\n \tAccelerometer test = new BuiltInAccelerometer();\n \t\n \twhile (isOperatorControl() && isEnabled()) { \n \t\t// ACCEL TEST CODE\n// \t\tSystem.out.println(test.getX() + \", \" + test.getY() + \", \" + test.getZ());\n \t\t// END ACCEL TEST CODE\n \n \t\t// ********** BEGIN DRIVING CODE ********** \n \t\t// Code for driving using omniwheels and two wheels for strafing \n \t\t// Diagram for the wheels of the robot below. \n \n \t\t// L S R \n \t\t// /--------------------------\\ \n \t\t//\t ||------------------------|| \n \t\t// || [][] || \n \t\t// || [] [] || \n \t\t// || [] [] || \n \t\t// || || \n \t\t// || || \n \t\t// || || \n \t\t// || || \n \t\t// || || \n \t\t// || [] [] || \n \t\t// || [] [] || \n \t\t// || [][] || \n \t\t// ||------------------------|| \n \t\t// \\--------------------------/ \n \t\t// \n \t\t// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ \n \n \t\tctrlThresh = .2; // the point at which we want to sense joystick action \n \t\trecip = 1-ctrlThresh; \t\t // = 0.8 \n \n \t\trightAxis = rightStick.getRawAxis(1);\t\t\t\t// right joystick, y (up/down) axis\n \t\t\n \t\t//System.out.println(\"\"+rightAxis);\n \t\tstrafeAxis = rightStick.getRawAxis(0);\t\t\t\t// right joystick, x (left/right) axis; this is \n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// arbitrary and could have been the left stick\n \t\trotateAxis = rightStick.getRawAxis(4);\t\t\t\t\t// left joystick, y axis\n \n \t\trightDir = rightAxis/Math.abs(rightAxis);\t\t\t// forward or backward (+1 or -1)\n \t\tstrafeDir = strafeAxis/Math.abs(strafeAxis); \t// \t\t\t'' \n \t\trotateDir = rotateAxis/Math.abs(rotateAxis); // \t\t\t'' \n \n \t\tright = 0; // right input formatted for range of detected values [0.2,1] \n \t\trotate = 0; // left input formatted \n \t\tstrafe = 0; // strafe input formatted \n \n \t\tif(Math.abs(rightAxis) > ctrlThresh) \t// user moved stick beyond threshold \n \t\t{right = (rightAxis-ctrlThresh*rightDir)/recip;} // format right: scale back, set direction, proportion it \n \t\tif(Math.abs(strafeAxis) > ctrlThresh) \n \t\t{strafe = (strafeAxis-ctrlThresh*strafeDir)/recip;} // format left... \n \t\tif(Math.abs(rotateAxis) > ctrlThresh) \n \t\t{rotate = (rotateAxis-ctrlThresh*rotateDir)/recip;}\t\t// format strafe... \n \n \n \t\trightDir = right/Math.abs(right); \n \t\trightPower = (Math.abs(right*mult) + minPower) * rightDir; \t\t// re-proportion for power's range, strip direction,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// and then add back threshold and direction. \n \t\trotateDir = rotate/Math.abs(rotate); \n \t\trotatePower = (Math.abs(rotate*mult) + minPower) * rotateDir;\t\t\t// \t\t'' \n \n \t\tstrafeDir = strafe/Math.abs(strafe); \n \t\tstrafePower = (Math.abs(strafe*mult) + minPower) * strafeDir;\t// \t\t'' \n \n \t\tif(Math.abs(rightPower)>0.2){\n \t\t\tfrontRight.set(rightPower);\t\t\t\t\t\t// set all the motors with the powers we \n \t\t\tbackRight.set(rightPower);\t\t\t\t\t\t/// calculated above : drive! \n \t\t\tfrontLeft.set(-1*rightPower); \n \t\t\tbackLeft.set(-1*rightPower);\n \t\t}\n \t\telse{\n \t\t\tfrontRight.set(rotatePower);\n \t\t\tbackRight.set(rotatePower);\n \t\t\tfrontLeft.set(rotatePower);\n \t\t\tbackLeft.set(rotatePower);\n \t\t}\n \t\t\n// \t\tfrontStrafe.set(strafePower); \n// \t\tbackStrafe.set(-1*strafePower); \n \n// \t\tmyRobot.tankDrive(leftStick, rightStick); \n \t\t \n \t\t// ********** END OF DRIVING CODE ********** \n \t\t//======================================================================= \n \t\t// ************ BEGIN WINCH CODE *********** \n \t\t// We need to code the winch to help raise and lower the elevator \n \t\t// This is just one option between the winch and the lead screw. \n \t\t \n \t\t\n \t\t//second winch test\n \t\t/*\n \t\twinchCount = winchEncoder.get();\t\t\t\t// get the pulse count from the encoder\n \t \tSystem.out.println(\"Count: \"+ winchCount);\t\t// print the pulse count \n \t \tif(winchCount<240){\n \t \t\t\n \t \t\twinchCim1.set(.1);\n \t \t\twinchCim2.set(.1);\n \t \t}\n \t \telse{\n \t \t\twinchCim1.set(0);\n \t \t\twinchCim2.set(0);\n \t \t\t\n \t \t}\n \t if(rightStick.getRawButton(5)) \n { \n\t\t\t winchEncoder.reset();// reset the pulse count\n\t\t\t winchCount = 0;\n\t\t\t winchCim1.set(0);\n\t\t\t winchCim2.set(0);\n\t\t\t \n } */ //end of second winch test \n \t \t\n \t\t\n \t\t if(rightStick.getRawButton(5)) \n { \n \t\t\t //winchEncoder.reset();// reset the pulse count\n \tSystem.out.println(\"A\");\n \t winchCim1.set(.5); \t// set winchCim1 to 0.5 power (upwards) \n \t winchCim2.set(.5); \t\t\t\t\t\t\t// set winchCim2 to 0.5 power\n \t\t\t \n } \n \t\telse if(rightStick.getRawButton(4))\n \t\t{\n \t\t\tSystem.out.println(\"B\");\n \t\t\t//winchEncoder.reset();\t\t\t\t\t\t\t// reset the pulse count\n \t \twinchCim1.set(-.3); // set winchCim1 to -0.5 power (downwards) \n \t \twinchCim2.set(-.3);\t \t\t\t\t\t\t\t// set winchCim2 to -0.5 power\n \t\t}\n \n \t \telse// if(rightStick.getRawButton(2)) \n { \n \t winchCim1.set(0); \t\t\t\t\t\t\t// set winchCim1 to 0 power (off/stop) \n \t winchCim2.set(0);\t\t\t\t\t\t\t\t// set winchCim2 to 0 pwoer (off/stop)\n// \t winchCount = winchEncoder.get();\t\t\t\t// get the pulse count from the encoder\n// \t System.out.println(\"Count: \"+ winchCount);\t\t// print the pulse count \n } \n \n \t\t// ********** END OF WINCH CODE ********** \n \t\t//======================================================================= \n \t\t \n \t\t \n \t\tTimer.delay(0.005);\t\t// wait for a motor update time \n } \n }", "public void updateSpace(String type, int y, int x, boolean available) {\r\n\t\t// Get Space\r\n\t\tButton space = carpark[y][x];\r\n\t\t\r\n\t\t// Platform.runLater() is used to prevent thread conflicts\r\n\t\tPlatform.runLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\t// Setup Space\r\n\t\t\t\tspace.setText(type);\r\n\t\t\t\t\r\n\t\t\t\tif (available) {\r\n\t\t\t\t\tspace.setTextFill(Color.GREEN);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tspace.setTextFill(Color.RED);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void actionPerformed(ActionEvent arg0) {\n \t\tfor (int row = 0; row <=2; row++) {\r\n \t\t\tfor (int col = 0; col <=2; col++) {\r\n \t\t\t\t// as the loop continues on each button is getting enabled\r\n \t\t\t\tboxes[row][col].setEnabled(true);\r\n \t\t\t\t// the icon is set to the carback image \r\n \t\t\t\tboxes[row][col].setDisabledIcon(tictac.c);\r\n \t\t\t\t// the check is reset for each box so clicks is 0 to old memory is deleted\r\n \t\t\t\ttictac.check[row][col] = 0;\r\n \t\t\t\t// win is 0 so the gae can be played again\r\n \t\t\t\ttictac.win = 0;\r\n \t\t\t\t// number of clicks = 0 so that the game can be played again\r\n \t\t\t\ttictac.clicks = 0;\r\n \t\t\t\t// set the colours of the txtboxes back to white since they flash yellow when a win in the category is added\r\n \t\t txtAdidas.setBackground(Color.WHITE);\r\n \t\t txtNike.setBackground(Color.WHITE);\r\n \t\t txtTie.setBackground(Color.WHITE);\r\n \t\t\t}\r\n \t\t}\r\n \t}", "private HBox setButtons() {\r\n\r\n\t\tButton btnNewBuild = new Button(\"First Building\"); //button to select the first building\r\n\t\tbtnNewBuild.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\ttheBuilding = new Building(buildingString());\r\n\r\n\t\t\t\tdrawBuilding(); // then redraw the building\r\n\t\t\t}\r\n\t\t});\r\n\t\tButton btnNewBuild2 = new Button(\"Second Building\"); //Button to select the second building\r\n\t\tbtnNewBuild2.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\ttheBuilding = new Building(buildingString2());\r\n\r\n\t\t\t\tdrawBuilding(); // then redraw the building\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tButton btnStart = new Button(\"Start\"); //button to start the animation \r\n\t\tbtnStart.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\ttimer.start(); // whose action is to start the timer\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tButton btnStop = new Button(\"Pause\"); //button to pause the animation\r\n\t\tbtnStop.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\ttimer.stop(); // and its action to stop the timer\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tButton btnRestart = new Button(\"RstBuilding1\"); // new button for restarting the first building\r\n\t\tbtnRestart.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\ttheBuilding = new Building(buildingString()); //calling the first building\r\n\t\t\t\ttimer.stop();\t\t\t\t\t\t\t\t\t//setting the animation to stop\r\n\t\t\t\tdrawBuilding();\t\t\t\t\t\t\t\t\t//redrawing the building\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tButton btnRestart2 = new Button(\"RstBuilding2\"); // new button for restarting building 2\r\n\t\tbtnRestart2.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\ttheBuilding = new Building(buildingString2()); //calling the second building\r\n\t\t\t\ttimer.stop();\t\t\t\t\t\t\t\t\t//setting the animation time to stop\r\n\t\t\t\tdrawBuilding();\t\t\t\t\t\t\t\t\t//redrawing the building\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tButton btnAdd = new Button(\"Another Person\"); // new button for adding person\r\n\t\tbtnAdd.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\ttheBuilding.addPerson(); // and its action to stop the timer\r\n\t\t\t\tdrawBuilding();\t\t\t//re drawing the building \r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tButton btnRemove = new Button(\"Remove A Person\"); // new button for removing person\r\n\t\tbtnRemove.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\ttheBuilding.removePerson(); // and its action to stop the timer\r\n\t\t\t\tdrawBuilding(); // redrawing the buildinf\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// now add these buttons + labels to a HBox\r\n\t\tHBox hbox = new HBox(new Label(\"Config: \"), btnNewBuild, btnNewBuild2, new Label(\"Run: \"), btnStart, btnStop,\r\n\t\t\t\tnew Label(\"Person: \"), btnAdd, btnRemove, new Label(\"RstBuildings: \"), btnRestart, btnRestart2);\r\n\t\treturn hbox;\r\n\t}", "@Override\n public void start(Stage primaryStage) throws Exception {\n buttons = new Button[size][size];\n logic = new FindPairLogic(size);\n\n var pane = new GridPane();\n pane.setAlignment(Pos.CENTER);\n var scene = new Scene(pane, WIDTH, HEIGHT);\n for (int i = 0; i < size; i++) {\n for (int j = 0; j < size; j++) {\n buttons[i][j] = new Button();\n buttons[i][j].setMaxWidth(Double.MAX_VALUE);\n buttons[i][j].setMaxHeight(Double.MAX_VALUE);\n buttons[i][j].setFocusTraversable(false);\n GridPane.setHgrow(buttons[i][j], Priority.ALWAYS);\n GridPane.setVgrow(buttons[i][j], Priority.ALWAYS);\n pane.add(buttons[i][j], i, j);\n int i1 = i;\n int j1 = j;\n buttons[i][j].setOnMouseClicked(event -> {\n if (isGameEnable.get()) {\n dealWithState(logic.getState(i1, j1));\n }\n });\n }\n }\n\n primaryStage.setScene(scene);\n primaryStage.show();\n }", "private void processInput() \n\t{\n\t\tif (keys.get(Keys.RIGHT))\n\t\t{\n\t\t\tworld.getHunter().move_right();\n\t\t}\n\t\t\n\t\tif (keys.get(Keys.UP))\n\t\t{\n\t\t\tworld.getHunter().move_up();\n\t\t}\n\t\t\n\t\tif (keys.get(Keys.LEFT))\n\t\t{\n\t\t\tworld.getHunter().move_left();\n\t\t}\n\t\t\n\t\tif (keys.get(Keys.DOWN))\n\t\t{\n\t\t\tworld.getHunter().move_down();\n\t\t}\n\t\t\n\t\tif (keys.get(Keys.STEALTH))\n\t\t{\n\t\t\tworld.getHunter().setNoisiness(false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tworld.getHunter().setNoisiness(true);\n\t\t}\n\t\t\n\t\tif (keys.get(Keys.RELOAD))\n\t\t{\n\t\t\tworld.getHunter().do_reload();\n\t\t}\n\t\t\n\t\tif (keys.get(Keys.FIRE))\n\t\t{\n\t\t\tworld.getHunter().do_fire();\n\t\t}\n\t}", "public void click(int mouseButton){\n\n if(mouseButton ==1){\n for (int i = 0; i <buttons.length ; i++) {\n //if click was registered on a button\n if(buttons[i].contains(Game.mousePoint)){\n int j = i +1;\n\n if(i == 0 && !(noOfCredits - Translator.pitifullPrice < 0)){\n noOfCredits -= Translator.pitifullPrice;\n army.addToArmyQueue(TrooperType.PITIFUL);\n\n }\n if(i == 1 && !(noOfCredits -\n Translator.armoredTrooperPrice < 0)){\n noOfCredits -= Translator.armoredTrooperPrice;\n army.addToArmyQueue(TrooperType.ARMORED);\n }\n if(i == 2 && !(noOfCredits -\n Translator.teleporterPrice < 0)){\n noOfCredits -= Translator.teleporterPrice;\n army.addToArmyQueue(TrooperType.TELEPORTER);\n }\n if(i==3){\n for (Trooper t:army.getArmy()) {\n if(t.getClass().equals(TeleportTrooper.class)){\n TeleportTrooper tp = (TeleportTrooper)t;\n if(tp.hasTeleport()) {\n Game.air[t.getPosition().getX()]\n [t.getPosition().getY()] =\n Translator.indexTeleportZone;\n tp.placePortal(tp.getDirection());\n Game.air[t.getPosition().getX()]\n [t.getPosition().getY()] =\n Translator.indexTeleporterZoneOut;\n }\n }\n }\n }\n if(i==4){\n if(army != null && army.getPreferred() == null\n || army.getPreferred() == Direction.RIGHT) {\n buttons[i].setIsSelected(true);\n buttons[i+1].setIsSelected(false);\n army.setPreferred(Direction.LEFT);\n }\n else if(army.getPreferred().equals(Direction.LEFT)){\n buttons[i].setIsSelected(false);\n army.setPreferred(null);\n }\n }\n if(i==5){\n if(army != null && army.getPreferred() == null\n || army.getPreferred() == Direction.LEFT) {\n army.setPreferred(Direction.RIGHT);\n buttons[i].setIsSelected(true);\n buttons[i-1].setIsSelected(false);\n }\n else if(army.getPreferred().equals(Direction.RIGHT)){\n army.setPreferred(null);\n buttons[i].setIsSelected(false);\n }\n }\n }\n }\n }\n }", "private void setButtons()\n\t{\n\t\tstartSim = new JButton(\"Start Sim\");\n\t\tstartSim.addActionListener(this);\n\t\tpauseSim = new JButton(\"Pause Sim\");\n\t\tpauseSim.addActionListener(this);\n\t\taddEat = new JButton(\"Add Eatery\");\n\t\taddEat.addActionListener(this);\n\t\tsubEat = new JButton(\"Subtract Eatery\");\n\t\tsubEat.addActionListener(this);\n\t\taddCash = new JButton(\"Add Cashier\");\n\t\taddCash.addActionListener(this);\n\t\tsubCash = new JButton(\"Subtract Cashier\");\n\t\tsubCash.addActionListener(this);\n\t}", "public void action() {\n\t\tsuppressed = false;\r\n\t\tpilot.setLinearSpeed(8);\r\n\t\tpilot.setLinearAcceleration(4);\r\n\t\tColorThread.updatePos = false;\r\n\t\tColorThread.updateCritical = false;\r\n\t\t//create a array to save the map information\r\n\t\tfor (int a = 0; a < 8; a++) {\r\n\t\t\tfor (int b = 0; b < 8; b++) {\r\n\t\t\t\trobot.probability[a][b] = -1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int a = 0; a < 8; a++) {\r\n\t\t\tfor (int b = 0; b < 8; b++) {\r\n\t\t\t\tif (a == 0 || a == 7 || b == 0 || b == 7) {\r\n\t\t\t\t\trobot.probability[a][b] = 100;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int a = 0; a < 6; a++) {\r\n\t\t\tfor (int b = 0; b < 6; b++) {\r\n\t\t\t\tif (robot.map[a][b].getOccupied() == 1) {\r\n\t\t\t\t\trobot.probability[a + 1][b + 1] = 100;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Step1: use ArrayList to save all of the probability situation.\r\n\t\tfloat front, left, right, back;\r\n\t\tfront = USThread.disSample[0];\r\n\t\trobot.setmotorM(90);\r\n\t\tDelay.msDelay(1000);\r\n\t\tleft = USThread.disSample[0];\r\n\t\trobot.setmotorM(-180);\r\n\t\tDelay.msDelay(1000);\r\n\t\tright = USThread.disSample[0];\r\n\t\trobot.setmotorM(90);\r\n\t\tDelay.msDelay(1000);\r\n\t\trobot.correctHeading(180);\r\n\t\tDelay.msDelay(1000);\r\n\t\tback = USThread.disSample[0];\r\n\t\trobot.correctHeading(180);\r\n\t\tfor (int a = 1; a < 7; a++) {\r\n\t\t\tfor (int b = 1; b < 7; b++) {\r\n\t\t\t\tif (robot.probability[a][b] == -1) {\r\n\t\t\t\t\tif (((robot.probability[a][b + 1] == 100 && front < 0.25)\r\n\t\t\t\t\t\t\t|| (robot.probability[a][b + 1] == -1 && front > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a + 1][b] == 100 && right < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a + 1][b] == -1 && right > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b - 1] == 100 && back < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b - 1] == -1 && back > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a - 1][b] == 100 && left < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a - 1][b] == -1 && left > 0.25))) {\r\n\t\t\t\t\t\t//direction is north\r\n\t\t\t\t\t\trobot.listOfPro.add(new ProPoint(0, 0, a, b));\r\n\t\t\t\t\t\t//System.out.println(\"0 \"+a+\" \"+b);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (((robot.probability[a + 1][b] == 100 && front < 0.25)\r\n\t\t\t\t\t\t\t|| (robot.probability[a + 1][b] == -1 && front > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b - 1] == 100 && right < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b - 1] == -1 && right > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a - 1][b] == 100 && back < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a - 1][b] == -1 && back > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b + 1] == 100 && left < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b + 1] == -1 && left > 0.25))) {\r\n\t\t\t\t\t\t// direction is east\r\n\t\t\t\t\t\trobot.listOfPro.add(new ProPoint(1, 0, a, b));\r\n\t\t\t\t\t\t//System.out.println(\"1 \"+a+\" \"+b);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (((robot.probability[a][b - 1] == 100 && front < 0.25)\r\n\t\t\t\t\t\t\t|| (robot.probability[a][b - 1] == -1 && front > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a - 1][b] == 100 && right < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a - 1][b] == -1 && right > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b + 1] == 100 && back < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b + 1] == -1 && back > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a + 1][b] == 100 && left < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a + 1][b] == -1 && left > 0.25))) {\r\n\t\t\t\t\t\t// direction is sourth\r\n\t\t\t\t\t\trobot.listOfPro.add(new ProPoint(2, 0, a, b));\r\n\t\t\t\t\t\t//System.out.println(\"2 \"+a+\" \"+b);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (((robot.probability[a - 1][b] == 100 && front < 0.25)\r\n\t\t\t\t\t\t\t|| (robot.probability[a - 1][b] == -1 && front > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b + 1] == 100 && right < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b + 1] == -1 && right > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a + 1][b] == 100 && back < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a + 1][b] == -1 && back > 0.25))\r\n\t\t\t\t\t\t\t&& ((robot.probability[a][b - 1] == 100 && left < 0.25)\r\n\t\t\t\t\t\t\t\t\t|| (robot.probability[a][b - 1] == -1 && left > 0.25))) {\r\n\t\t\t\t\t\t// direction is west\r\n\t\t\t\t\t\trobot.listOfPro.add(new ProPoint(3, 0, a, b));\r\n\t\t\t\t\t\t//System.out.println(\"3 \"+a+\" \"+b);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Step 2: use loop to take control of robot walk and check the location correction\r\n\t\tboolean needLoop = true;\r\n\t\tint loopRound = 0;\r\n\t\twhile (needLoop) {\r\n\t\t\t// One of way to leave the loop is at the hospital\r\n\t\t\tif ((ColorThread.leftColSample[0] >= 0.2 && ColorThread.leftColSample[1] < 0.2\r\n\t\t\t\t\t&& ColorThread.leftColSample[1] >= 0.14 && ColorThread.leftColSample[2] <= 0.8)\r\n\t\t\t\t\t&& (ColorThread.rightColSample[0] >= 0.2 && ColorThread.rightColSample[1] < 0.2\r\n\t\t\t\t\t\t\t&& ColorThread.rightColSample[1] >= 0.11 && ColorThread.rightColSample[2] <= 0.08)) {\r\n\t\t\t\trobot.updatePosition(0, 0);\r\n\t\t\t\tint numOfAtYellow = 0;\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getNowX() == 1 && robot.listOfPro.get(i).getNowY() == 1) {\r\n\t\t\t\t\t\tnumOfAtYellow++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(numOfAtYellow == 1) {\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getNowX() == 1 && robot.listOfPro.get(i).getNowY() == 1) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 3) {\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\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\t}else {\r\n\t\t\t\t\t//have two way to go to the yellow part\r\n\t\t\t\t\tfront = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(90);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tleft = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(-180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tright = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(90);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tback = USThread.disSample[0];\r\n\t\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tif(front<0.25 && right<0.25 && left>0.25 && back>0.25) {\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t}else if(front<0.25 && right>0.25 && back>0.25 && left<0.25) {\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t}else if(front>0.25 && right>0.25 && back<0.25 && left<0.25) {\r\n\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tneedLoop = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t//Another way to leave the loop is the robot arrive the green cell.\r\n\t\t\tif ((ColorThread.leftColSample[0] <= 0.09 && ColorThread.leftColSample[1] >= 0.17\r\n\t\t\t\t\t&& ColorThread.leftColSample[2] <= 0.09)\r\n\t\t\t\t\t&& (ColorThread.rightColSample[0] <= 0.09 && ColorThread.rightColSample[1] >= 0.014\r\n\t\t\t\t\t\t\t&& ColorThread.rightColSample[2] <= 0.11)) {\r\n\t\t\t\trobot.updatePosition(5, 0);\r\n\t\t\t\tint numOfAtGreen = 0;\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getNowX() == 6 && robot.listOfPro.get(i).getNowY() == 1) {\r\n\t\t\t\t\t\tnumOfAtGreen++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(numOfAtGreen==1) {\r\n\t\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowX() == 6 && robot.listOfPro.get(i).getNowY() == 1) {\r\n\t\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 3) {\r\n\t\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\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}else {\r\n\t\t\t\t\tfront = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(90);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tleft = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(-180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tright = USThread.disSample[0];\r\n\t\t\t\t\trobot.setmotorM(90);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tback = USThread.disSample[0];\r\n\t\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\t\tDelay.msDelay(1000);\r\n\t\t\t\t\tif(front<0.25 && right<0.25 && left>0.25 && back>0.25) {\r\n\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t}else if(front<0.25 && right>0.25 && back>0.25 && left<0.25) {\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t}else if(front>0.25 && right>0.25 && back<0.25 && left<0.25) {\r\n\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tneedLoop = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t//The third way of leave the loop is the robot have already know his position and direction.\r\n\t\t\tint maxStepNumber = 0;\r\n\t\t\tint numberOfMaxSteps = 0;\r\n\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\tif (robot.listOfPro.get(i).getSteps() > maxStepNumber) {\r\n\t\t\t\t\tmaxStepNumber = robot.listOfPro.get(i).getSteps();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\tif (robot.listOfPro.get(i).getSteps() == maxStepNumber) {\r\n\t\t\t\t\tnumberOfMaxSteps++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (numberOfMaxSteps == 1) {\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getSteps() == maxStepNumber) {\r\n\t\t\t\t\t\trobot.updatePosition(robot.listOfPro.get(i).getNowX() - 1,\r\n\t\t\t\t\t\t\t\trobot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.setDirection(false);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 3) {\r\n\t\t\t\t\t\t\trobot.setDirection(true);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// do not to set the heading, because the default value is 0.\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\tneedLoop = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t//The below part are the loops.\r\n\t\t\tfront = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(90);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tleft = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(-180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tright = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(90);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\trobot.correctHeading(180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tback = USThread.disSample[0];\r\n\t\t\trobot.correctHeading(180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\t// move\r\n\t\t\t\r\n\t\t\tif (front > 0.25) {\r\n\t\t\t\trobot.getPilot().travel(25);\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif(robot.listOfPro.get(i).getSteps()==loopRound) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() + 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() + 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() - 1);\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} else if (left > 0.25) {\r\n\t\t\t\trobot.correctHeading(-90);\r\n\t\t\t\trobot.getPilot().travel(25);\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif(robot.listOfPro.get(i).getSteps()==loopRound) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(3);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() - 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(0);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() + 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(1);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() + 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(2);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() - 1);\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} else if (right > 0.25) {\r\n\t\t\t\trobot.correctHeading(90);\r\n\t\t\t\trobot.getPilot().travel(25);\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif(robot.listOfPro.get(i).getSteps()==loopRound) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(1);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() + 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(2);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(3);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() - 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(0);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() + 1);\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} else {\r\n\t\t\t\trobot.correctHeading(180);\r\n\t\t\t\trobot.getPilot().travel(25);\r\n\t\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t\tif(robot.listOfPro.get(i).getSteps()==loopRound) {\r\n\t\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(2);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() - 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(3);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() - 1);\r\n\t\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(0);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowY(robot.listOfPro.get(i).getNowY() + 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowHeading(1);\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setNowX(robot.listOfPro.get(i).getNowX() + 1);\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\t// It time to check the around situation\r\n\t\t\tfront = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(90);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tleft = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(-180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tright = USThread.disSample[0];\r\n\t\t\trobot.setmotorM(90);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\trobot.correctHeading(180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tback = USThread.disSample[0];\r\n\t\t\trobot.correctHeading(180);\r\n\t\t\tDelay.msDelay(1000);\r\n\t\t\tfor (int i = 0; i < robot.listOfPro.size(); i++) {\r\n\t\t\t\t//System.out.println(robot.listOfPro.get(i).getSteps());\r\n\t\t\t\t\tif (robot.listOfPro.get(i).getNowHeading() == 0) {\r\n\t\t\t\t\t\tif (((front < 0.25\r\n\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro.get(i).getNowY()\r\n\t\t\t\t\t\t\t\t\t\t+ 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (front > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() + 1] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((left < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (left > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() - 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((right < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (right > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() + 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((back < 0.25 && robot.probability[robot.listOfPro.get(i)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getNowX()][robot.listOfPro.get(i).getNowY() - 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (back > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() - 1] == -1))) {\r\n\t\t\t\t\t\t\t//It is correct when the robot have the same data information with estimate information\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setSteps(robot.listOfPro.get(i).getSteps() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 1) {\r\n\t\t\t\t\t\tif (((left < 0.25\r\n\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro.get(i).getNowY()\r\n\t\t\t\t\t\t\t\t\t\t+ 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (left > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() + 1] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((back < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (back > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() - 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((front < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (front > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() + 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((right < 0.25 && robot.probability[robot.listOfPro.get(i)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getNowX()][robot.listOfPro.get(i).getNowY() - 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (right > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() - 1] == -1))) {\r\n\t\t\t\t\t\t\t//It is correct when the robot have the same data information with estimate information\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setSteps(robot.listOfPro.get(i).getSteps() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (robot.listOfPro.get(i).getNowHeading() == 2) {\r\n\t\t\t\t\t\tif (((back < 0.25\r\n\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro.get(i).getNowY()\r\n\t\t\t\t\t\t\t\t\t\t+ 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (back > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() + 1] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((right < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (right > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() - 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((left < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (left > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() + 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((front < 0.25 && robot.probability[robot.listOfPro.get(i)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getNowX()][robot.listOfPro.get(i).getNowY() - 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (front > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() - 1] == -1))) {\r\n\t\t\t\t\t\t\t//It is correct when the robot have the same data information with estimate information\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setSteps(robot.listOfPro.get(i).getSteps() + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (((right < 0.25\r\n\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro.get(i).getNowY()\r\n\t\t\t\t\t\t\t\t\t\t+ 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (right > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() + 1] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((front < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (front > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() - 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((back < 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ 1][robot.listOfPro.get(i).getNowY()] == 100)\r\n\t\t\t\t\t\t\t\t|| (back > 0.25\r\n\t\t\t\t\t\t\t\t\t\t&& robot.probability[robot.listOfPro.get(i).getNowX() + 1][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t\t\t.get(i).getNowY()] == -1))\r\n\t\t\t\t\t\t\t\t\t\t&& ((left < 0.25 && robot.probability[robot.listOfPro.get(i)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getNowX()][robot.listOfPro.get(i).getNowY() - 1] == 100)\r\n\t\t\t\t\t\t\t\t|| (left > 0.25 && robot.probability[robot.listOfPro.get(i).getNowX()][robot.listOfPro\r\n\t\t\t\t\t\t\t\t\t\t.get(i).getNowY() - 1] == -1))) {\r\n\t\t\t\t\t\t\t//It is correct when the robot have the same data information with estimate information\r\n\t\t\t\t\t\t\trobot.listOfPro.get(i).setSteps(robot.listOfPro.get(i).getSteps() + 1);\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\tloopRound++;\r\n\t\t}\r\n\t\t// if is out the while loop, it will find the heading and the position of robot right now.\r\n\t\t//Step 3: It is time to use wavefront to come back to the hospital\r\n\t\trobot.restoreDefault();\r\n\t\trobot.RunMode = 1;\r\n\t\tColorThread.updatePos = true;\r\n\t\tColorThread.updateCritical = true;\r\n\t}", "public void setControls() {\r\n System.out.println(\"wire data is \" + this.controllerWire.getData());\r\n String operation = this.controlMemory.get(this.controllerWire.getData());\r\n System.out.println(\"Setting the controls for \" + operation);\r\n if (operation.equalsIgnoreCase(\"add\")) {\r\n //alu.setControl(1);\r\n this.ALUControl.setData(1);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n //aluMUX.setSelect(0);\r\n //regMUX.setSelect(0);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"addi\")) {\r\n //alu.setControl(1);\r\n this.ALUControl.setData(1);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"sub\")) {\r\n //alu.setControl(2);\r\n this.ALUControl.setData(2);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"lw\")) {\r\n// alu.setControl(8); // TODO \r\n this.ALUControl.setData(8);\r\n this.REG_MUXControl.setData(1);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.readWire.setData(1);\r\n memory.setReadWire(this.readWire);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"sw\")) {\r\n //alu.setControl(9); // TODO\r\n this.ALUControl.setData(9);\r\n //regMUX.setSelect(1);\r\n this.writeWire.setData(1);\r\n memory.setWriteWire(writeWire);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"sll\")) {\r\n //alu.setControl(6);\r\n this.ALUControl.setData(6);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"srl\")) {\r\n //alu.setControl(5);\r\n this.ALUControl.setData(5);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"and\")) {\r\n //alu.setControl(4);\r\n this.ALUControl.setData(4);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"andi\")) {\r\n //alu.setControl(4);\r\n this.ALUControl.setData(4);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"or\")) {\r\n //alu.setControl(3);\r\n this.ALUControl.setData(3);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"ori\")) {\r\n //alu.setControl(3);\r\n this.ALUControl.setData(3);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"nor\")) {\r\n //alu.setControl(7);\r\n this.ALUControl.setData(7);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"beq\")) {\r\n this.PC_MUXControl.setData(0);\r\n this.ALUControl.setData(10);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.ALU_MUXControl.setData(0);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n } else if (operation.equalsIgnoreCase(\"bne\")) {\r\n this.PC_MUXControl.setData(0);\r\n this.ALUControl.setData(11);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.ALU_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n\r\n } else if (operation.equalsIgnoreCase(\"jr\")) {\r\n this.PC_MUXControl.setData(1);\r\n this.ALUControl.setData(12);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.ALU_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"j\")) {\r\n this.PC_MUXControl.setData(1);\r\n this.ALUControl.setData(12);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.ALU_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n\r\n } else if (operation.equalsIgnoreCase(\"jal\")) {\r\n this.PC_MUXControl.setData(1);\r\n this.ALUControl.setData(16);\r\n this.PC_MUXControl.setData(1);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.ALU_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n this.REG_MUXControl.setData(0);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n\r\n } else if (operation.equalsIgnoreCase(\"slt\")) {\r\n this.ALUControl.setData(13);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"slti\")) {\r\n this.ALUControl.setData(13);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n this.PC_MUXControl.setData(0);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n } else if (operation.equalsIgnoreCase(\"sltu\")) {\r\n this.ALUControl.setData(14);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n } else if (operation.equalsIgnoreCase(\"sltui\")) {\r\n this.ALUControl.setData(14);\r\n this.ALU_MUXControl.setData(1);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n } else if (operation.equalsIgnoreCase(\"beq\")) {\r\n this.ALUControl.setData(14);\r\n this.ALU_MUXControl.setData(1);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n }\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"ALU CONTROL: \" + this.ALUControl.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"ALU MUX CONTROL: \" + this.ALU_MUXControl.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"PC MUX CONTROL: \" + this.PC_MUXControl.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"REG MUX CONTROL: \" + this.REG_MUXControl.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"MEMORY READ: \" + this.readWire.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"MEMORY WRITE: \" + this.writeWire.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"REGISTER WRITE: \" + this.registerWrite.toString());\r\n this.setRegisterWriteControl();\r\n }", "@Override\n public void teleopPeriodic() {\n double x = xcontroller2.getX(Hand.kLeft);\n //double y = xcontroller1.getTriggerAxis(Hand.kRight) - xcontroller1.getTriggerAxis(Hand.kLeft);\n // For testing just use left joystick. Use trigger axis code for GTA Drive/\n double y = -xcontroller2.getY(Hand.kLeft);\n double z = xcontroller2.getX(Hand.kRight);\n double yaw = imu.getAngleZ();\n RobotDT.driveCartesian(x, y, 0, 0);\n \n\n // After you spin joystick R3 press A button to reset gyro angle\n if (xcontroller1.getAButtonPressed()) {\n imu.reset();\n }\n \n if (xcontroller2.getBButtonPressed()){\n mGPM.goSpongeHatch();\n }\n\n if (xcontroller2.getXButtonPressed()){\n mGPM.goPineHome();\n \n }\n\n\n /** \n * If Bumpers are pressed then Cargo Intake Motor = -1 for Intake \n *if Triggers are pressed set value to 1 for Outtake\n *If triggers are released set value to 0*/\n if(xcontroller2.getBumperPressed(Hand.kLeft) && xcontroller2.getBumperPressed(Hand.kRight)) {\n mGPM.setCargoMotor(-1);\n } else if((xcontroller2.getTriggerAxis(Hand.kLeft) >0.75) && (xcontroller2.getTriggerAxis(Hand.kRight) >0.75)) {\n mGPM.setCargoMotor(1);\n } else{\n mGPM.setCargoMotor(0);\n }\n }", "private void createSwitches() {\n \t\tswitches = new Point[4];\n \t\tswitches[0] = new Point(centreMin, centreMin);\n \t\tswitches[1] = new Point(centreMin, centreMax-1);\n \t\tswitches[2] = new Point(centreMax-1, centreMin);\n \t\tswitches[3] = new Point(centreMax-1, centreMax-1);\n \t}", "public void action() {\r\n\t\tLCD.drawString(\"Avoid Behavior!\", 0, 7);\r\n\r\n\t\tMapUpdate.updateWithoutObject(0);\r\n\t\tMapUpdate.updateWithObject(StandardRobot.us.getRange());\r\n\r\n\t\tif (StandardRobot.ts.isPressed()) {\r\n\t\t\tStandardRobot.pilot.setTravelSpeed(7);\r\n\t\t\tStandardRobot.pilot.travel(-5);\r\n\t\t\tcounter.countTravel();\r\n\r\n\t\t\tif (store.getFlag() == 0) {\r\n\t\t\t\tStandardRobot.pilot.rotate(-90);\r\n\t\t\t\tcounter.countTurn();\r\n\t\t\t} else {\r\n\t\t\t\tStandardRobot.pilot.rotate(90);\r\n\t\t\t\tcounter.countTurn();\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\tif (store.getFlag() == 0) {\r\n\t\t\t\tStandardRobot.pilot.rotate(-90);\r\n\t\t\t\tcounter.countTurn();\r\n\t\t\t} else {\r\n\t\t\t\tStandardRobot.pilot.rotate(90);\r\n\t\t\t\tcounter.countTurn();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@FXML\n public void initialize(){\n ArrayList<Launcher> planes = this.launcherFacade.getAll(\"plane\");\n\n for(int i = 0; i < planes.size(); i++) {\n gridPlanes.addRow(0);\n\n Label l1 = new Label(planes.get(i).getRegistrationLauncher());\n gridPlanes.add(l1,0, i + 1);\n GridPane.setHalignment(l1, javafx.geometry.HPos.CENTER);\n\n Label l2 = new Label(planes.get(i).getMaxLaunchWeight()+\"\");\n gridPlanes.add(l2,1, i + 1);\n GridPane.setHalignment(l2, javafx.geometry.HPos.CENTER);\n\n Label l3 = new Label(planes.get(i).getRenewalDate().toString());\n gridPlanes.add(l3,2, i + 1);\n GridPane.setHalignment(l3, javafx.geometry.HPos.CENTER);\n\n Label l4 = new Label(((Plane)planes.get(i)).getSpan()+\"\");\n gridPlanes.add(l4,3, i + 1);\n GridPane.setHalignment(l4, javafx.geometry.HPos.CENTER);\n\n Button b2 = new Button(\"Update\");\n int finalI = i;\n\n b2.setOnAction(event -> {\n updatePlane(planes.get(finalI).getRegistrationLauncher());\n });\n\n\n gridPlanes.add(b2,6,i + 1);\n GridPane.setHalignment(b2, javafx.geometry.HPos.CENTER);\n\n Button b1 = new Button(\"X\");\n\n b1.setOnAction(event -> {\n deletePlane(planes.get(finalI).getRegistrationLauncher());\n });\n\n gridPlanes.add(b1,7,i + 1);\n GridPane.setHalignment(b1, javafx.geometry.HPos.CENTER);\n }\n }", "protected void execute() {\n \tthis.LiftVertAxis.manualOverride(-(this.oi.getBMGamepadAxis5() * .75));\n }", "public void onStartNewGame(View view) {\n\n grid.setVisibility(View.VISIBLE);\n\n button1.setText(\"·\");\n button2.setText(\"·\");\n button3.setText(\"·\");\n button4.setText(\"·\");\n button5.setText(\"·\");\n button6.setText(\"·\");\n button7.setText(\"·\");\n button8.setText(\"·\");\n button9.setText(\"·\");\n }", "@Override\r\n public void update(MiniGame game){\r\n PathXDataModel data = (PathXDataModel) game.getDataModel();\r\n \r\n //Check if 10 seconds has past since activating steal\r\n if (getSpecialState().equals(PathXSpriteState.STEALING.toString())){\r\n GregorianCalendar newTime = new GregorianCalendar();\r\n long timePast = newTime.getTimeInMillis() - getSpecialTimer().getTimeInMillis();\r\n if ((timePast / 1000) >= 10){\r\n game.getGUIButtons().get(PathXConstants.STEAL_BUTTON_TYPE).setState(PathXSpriteState.VISIBLE.toString());\r\n setSpecialState(\"\");\r\n setSpecialTimer(null);\r\n }\r\n \r\n }\r\n \r\n //Check if 10 seconds has past since activating Intangibility\r\n if (getSpecialState().equals(PathXSpriteState.INTANGIBLE.toString())){\r\n GregorianCalendar newTime = new GregorianCalendar();\r\n long timePast = newTime.getTimeInMillis() - getSpecialTimer().getTimeInMillis();\r\n if ((timePast / 1000) >= 10){\r\n game.getGUIButtons().get(PathXConstants.INTANGIBILITY_BUTTON_TYPE).setState(PathXSpriteState.VISIBLE.toString());\r\n setSpecialState(\"\");\r\n setSpecialTimer(null);\r\n }\r\n \r\n }\r\n \r\n //Check if 10 seconds has past since activating God Mode\r\n if (getSpecialState().equals(PathXSpriteState.GOD_MODE.toString())){\r\n GregorianCalendar newTime = new GregorianCalendar();\r\n long timePast = newTime.getTimeInMillis() - getSpecialTimer().getTimeInMillis();\r\n if ((timePast / 1000) >= 10){\r\n game.getGUIButtons().get(PathXConstants.GOD_MODE_BUTTON_TYPE).setState(PathXSpriteState.VISIBLE.toString());\r\n setSpecialState(\"\");\r\n setSpecialTimer(null);\r\n }\r\n \r\n }\r\n\r\n if (getSpecialState().equals(PathXSpriteState.STEALING.toString())) {\r\n ArrayList<Car> otherCars = new ArrayList();\r\n otherCars.addAll(data.getCops());\r\n otherCars.addAll(data.getBandits());\r\n otherCars.addAll(data.getZombies());\r\n\r\n for (Car car : otherCars) {\r\n if (aabbsOverlap(car)) {\r\n if (!car.isStolen()) {\r\n data.getRecord().balance += 20;\r\n car.setStolen(true);\r\n }\r\n }\r\n }\r\n }\r\n \r\n super.update(game);\r\n \r\n PathXDataModel dataModel = (PathXDataModel) game.getDataModel();\r\n PathXNode safeHouse = dataModel.getNodes().get(1);\r\n if (getIntersection() == safeHouse)\r\n dataModel.endGameAsWin();\r\n }", "public void UpdateCommandsUI(){\n Button B;\n try{\n for (int i = 0; i < f.getNumComp(); i++) {\n B = (Button) findViewById(300000 + i); //Buy Button\n if(dayOpen & (p.getMoney()>0)) {\n B.setEnabled(true);\n B.setTextColor(0xffffffff);\n } else if(dayOpen & (p.getLevel()>= 4)){\n B.setEnabled(true);\n B.setTextColor(0xffff0000);\n } else {\n B.setEnabled(false);\n B.setTextColor(0xff000000);\n }\n\n B = (Button) findViewById(400000 + i); //Sell Button\n if (dayOpen & (f.getSharesOwned(i) > 0)) {\n B.setEnabled(true);\n B.setTextColor(0xffffffff);\n } else if(p.getLevel()>=4 & !f.isShorted(i) & dayOpen){\n B.setEnabled(true);\n B.setTextColor(0xffff0000); //Red Color for short positions\n } else {\n B.setEnabled(false);\n B.setTextColor(0xff000000);\n }\n }\n } catch (Exception e){\n e.printStackTrace();\n }\n }", "private void lightAvailable(Cell myCell, Button myButton) {\n Platform.runLater(() -> {\n ArrayList<Cell> cells = new ArrayList<>();\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 5; j++) {\n bt[i][j].setDisable(true);\n }\n }\n int x = myCell.getX();\n int y = myCell.getY();\n myButton.setDisable(false);\n myButton.setStyle(\"-fx-border-color:red\");\n myButton.setDisable(true);\n for (int i = x - 1; i < x + 2; i++) {\n for (int j = y - 1; j < y + 2; j++) {\n //control if the cell exists\n if (((i != x) || (j != y)) && (i >= 0) && (i <= 4) && (j >= 0) && (j <= 4)) {\n //control there is not dome\n if ((!getTable().getTableCell(i, j).isComplete())) {\n //control there is not a pawn of my same team\n if (!((getTable().getTableCell(i, j).getPawn() != null) &&\n (getTable().getTableCell(i, j).getPawn().getIdGamer() == myCell.getPawn().getIdGamer()))) {\n cells.add(getTable().getTableCell(i, j));\n }\n }\n }\n }\n }\n if (getGod().getName().equalsIgnoreCase(\"zeus\") && effetto && currentMove.getAction() == Mossa.Action.BUILD) {\n myButton.setStyle(\"-fx-border-color:blue\");\n myButton.setDisable(false);\n myButton.setOnMouseEntered(e -> {\n Button button;\n button = (Button) e.getSource();\n button.setStyle(\"-fx-border-color:yellow\");\n });\n myButton.setOnMouseExited(e -> {\n Button button;\n button = (Button) e.getSource();\n button.setStyle(\"-fx-border-color:blue\");\n });\n } else {\n for (Cell lightMe : cells) {\n\n bt[lightMe.getX()][lightMe.getY()].setDisable(false);\n bt[lightMe.getX()][lightMe.getY()].setStyle(\"-fx-border-color:yellow\");\n int a = lightMe.getX();\n int b = lightMe.getY();\n initButtons();\n bt[a][b].setOnAction(e -> {\n for (int c = 0; c < 5; c++) {\n for (int d = 0; d < 5; d++) {\n bt[c][d].setStyle(\"-fx-border-color:trasparent\");\n initButtons();\n }\n }\n Button button;\n button = (Button) e.getSource();\n button.setStyle(\"-fx-border-color:red\");\n button.setOnMouseClicked(null);\n button.setOnMouseEntered(null);\n button.setOnMouseExited(null);\n int x1 = GridPane.getRowIndex(button);\n int y1 = GridPane.getColumnIndex(button);\n aggiornaMossa(table.getTableCell(x1, y1));\n Platform.runLater(() -> {\n submitAction.setDisable(false);\n });\n });\n\n }\n }\n });\n }", "public void setSpaceType(String type, int y, int x) {\r\n\t\t// Get Space\r\n\t\tButton space = carpark[y][x];\r\n\t\t\r\n\t\t// Platform.runLater() is used to prevent thread conflicts\r\n\t\tPlatform.runLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\t// Setup Space\r\n\t\t\t\tspace.setText(type);\r\n\t\t\t\tspace.setStyle(space.getStyle() + \"-fx-background-color: #000000;\");\r\n\t\t\t\tspace.setTextFill(Color.GREEN);\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public GameView(GameModel gameModel, GameController gameController) {\n \n // ADD YOU CODE HERE\n\n this.gameModel=gameModel;\n\n setTitle(\"MineSweeper it -- the ITI 1121 version\");\n\n // For minesweeper matrix\n JPanel p1 = new JPanel();\n p1.setLayout(new GridLayout(gameModel.getHeigth(),gameModel.getWidth(),0,0));\n\n board = new DotButton[gameModel.getHeigth()][gameModel.getWidth()];\n\n // Integer temp used to store the tile's setActionCommand number so we can identify which tile is being clicked\n int temp=0;\n\n // Adding buttons to board matrix\n for (int i=0; i<gameModel.getHeigth(); i++) {\n\n for (int j=0; j<gameModel.getWidth(); j++) {\n\n board[i][j] = new DotButton(j,i,11);\n\n board[i][j].setPreferredSize(new Dimension(28,28));\n \n board[i][j].addActionListener(gameController);\n board[i][j].setActionCommand(Integer.toString(temp));\n \n temp++;\n\n p1.add(board[i][j]);\n \n }\n \n }\n\n // For buttons and text field\n JPanel p2 = new JPanel();\n\n JButton reset = new JButton(\"Reset\");\n reset.addActionListener(gameController);\n \n JButton quit = new JButton(\"Quit\");\n quit.addActionListener(gameController);\n\n nbreOfStepsLabel = new JLabel(\"Number of steps: \" + Integer.toString(gameModel.getNumberOfSteps()));\n\n p2.add(nbreOfStepsLabel);\n p2.add(reset);\n p2.add(quit);\n \n // Frame related stuff\n add(p1, BorderLayout.NORTH);\n add(p2, BorderLayout.SOUTH);\n pack();\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setResizable(false); // Window isn't resizable so it doesnt look bad when stretched out\n setVisible(true);\n }", "@Override\r\n public void keyPressed(KeyEvent e)\r\n {\r\n if (mode == 0){\r\n mode = 1; //starts the game\r\n }\r\n\r\n if(e.getKeyChar() == 'w')\r\n {\r\n buttons[0][0] = true;\r\n }\r\n if(e.getKeyChar() == 'a')\r\n {\r\n buttons[0][1] = true;\r\n }\r\n if(e.getKeyChar() == 's')\r\n {\r\n buttons[0][2] = true;\r\n }\r\n if(e.getKeyChar() == 'd')\r\n {\r\n buttons[0][3] = true;\r\n }\r\n if(e.getKeyChar() == 'f')\r\n {\r\n buttons[0][4] = true;\r\n }\r\n if(e.getKeyChar() == 'g')\r\n {\r\n buttons[0][5] = true;\r\n }\r\n if(e.getKeyCode() == KeyEvent.VK_UP)\r\n {\r\n buttons[1][0] = true;\r\n }\r\n if(e.getKeyCode() == KeyEvent.VK_LEFT)\r\n {\r\n buttons[1][1] = true;\r\n }\r\n if(e.getKeyCode() == KeyEvent.VK_DOWN)\r\n {\r\n buttons[1][2] = true;\r\n }\r\n if(e.getKeyCode() == KeyEvent.VK_RIGHT)\r\n {\r\n buttons[1][3] = true;\r\n }\r\n if(e.getKeyChar() == '.')\r\n {\r\n buttons[1][4] = true;\r\n }\r\n if(e.getKeyChar() == '/')\r\n {\r\n buttons[1][5] = true;\r\n }\r\n }", "public void actionPerformed(ActionEvent event) { //action performed method (goes here when a button is pressed); most of the logic goes inside here because the buttons dictate the flow of execution\r\n String command = event.getActionCommand(); //storing the text of the button into a string variable\r\n \r\n if(command.equals(\"OK\")){\r\n name1 = input.getText(); //getting the name and storing it when the first button, OK, is pressed\r\n welcome.remove(okButton);\r\n welcome.remove(welcomelabel); //removing unecessary labels\r\n \r\n instructions.setText((\"<html> Hi \" + \"</br>\"+name1 + \", which mode would you like to play? </html>\")); //changing the text of the label\r\n \r\n welcome.add(pvp);\r\n welcome.add(Box.createRigidArea(new Dimension(0,75))); //adding the 2 buttons and formatting them \r\n pvp.setAlignmentX(Component.CENTER_ALIGNMENT); \r\n \r\n welcome.add(pvai); \r\n pvai.setAlignmentX(Component.CENTER_ALIGNMENT); \r\n }\r\n \r\n if(command.equals(\"Player vs Player\")){ //if pvp button was clicked\r\n instructions.setText(\"<html> You chose Player vs Player! \" +\"</br>\"+ name1 + \", which colour would you like your checker to be? </html>\"); \r\n mode =1;\r\n welcome.remove(pvp);\r\n welcome.remove(pvai); //removing the buttons from the screen and updating the user interface\r\n welcome.updateUI(); \r\n addColor();\r\n }\r\n \r\n else if(command.equals(\"Player vs AI\")){ //if pvai button was clicked\r\n instructions.setText(\"<html> You chose Player vs AI! \" + \"</br>\"+name1 + \", which colour would you like your checker to be? </html>\"); \r\n mode = 2;\r\n welcome.remove(pvp);\r\n welcome.remove(pvai); \r\n welcome.updateUI();\r\n addColor(); //calling the method which puts the color options on to the screen\r\n }\r\n \r\n \r\n //========================================================PVP BUTTONS==========================================================================\r\n //===================================================================================================================================\r\n if(command.equals(\" 1\")){ //the extra spaces are because of the formatting of the columnnumbers\r\n columnnumber=1;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 2\")){\r\n columnnumber=2;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 3\")){\r\n columnnumber=3;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 4\")){ //depending on which button they press, change the columnnumber. Then send it to the if statement that runs when command = entered\r\n columnnumber=4;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 5\")){\r\n columnnumber=5;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 6\")){\r\n columnnumber=6;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 7\")){\r\n columnnumber=7;\r\n command = \"Enter\";\r\n }\r\n \r\n \r\n //======================================when player 1 makes their choice of the pvp mode ==================================================================\r\n if(command.equals(\"Black\")&&choice == 1 &&mode ==1){ // determining which button was pressed and which player pressed it\r\n instructions.setText(\"Great choice! Now, what is Player 2's name?\"); \r\n color1 = Color.black; //for player 1\r\n removeColor();\r\n welcome.updateUI();\r\n welcome.add(okayButton);\r\n input.setText(\"\");\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT); //centering the component \r\n }\r\n \r\n if(command.equals(\"Red\")&&choice == 1 &&mode ==1){ //if the colour was pressed by the first player\r\n instructions.setText(\"Great choice! Player 2, what is your name?\");\r\n color1 = Color.red;\r\n removeColor(); //removing the other colors from screen //red\r\n welcome.updateUI();\r\n welcome.add(okayButton);\r\n input.setText(\"\"); //clearing the text field\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n }\r\n \r\n if(command.equals(\"Yellow\")&&choice == 1 &&mode ==1){ \r\n instructions.setText(\"Great choice! Player 2, what is your name?\");\r\n color1 = Color.yellow;\r\n removeColor(); //yellow\r\n welcome.updateUI();\r\n welcome.add(okayButton);\r\n input.setText(\"\");\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n }\r\n \r\n if(command.equals(\"Green\")&&choice == 1 &&mode ==1){ \r\n instructions.setText(\"Great choice! Player 2, what is your name?\"); //greem\r\n color1 = Color.green;\r\n removeColor(); \r\n welcome.updateUI();\r\n welcome.add(okayButton);\r\n input.setText(\"\");\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n }\r\n \r\n //======================================================================================================================================================\r\n //2nd users info in pvp mode\r\n \r\n if(command.equals(\"Okay\")){ //if they press okay --> asks for the 2nd users info\r\n name2 = input.getText();\r\n instructions.setText(\"<html>Hello \" + \"</br>\" +name2 + \", choose a colour for your checker. </html>\"); //move on to the 2nd player options\r\n welcome.remove(input); //^^using html to print out new lines if someone's name is too long\r\n welcome.updateUI();\r\n \r\n welcome.add(black);\r\n black.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n black.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n \r\n welcome.add(red);\r\n red.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n red.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n //readding all the color buttons again\r\n welcome.add(yellow);\r\n yellow.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n yellow.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n \r\n welcome.add(green);\r\n green.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n green.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n \r\n choice = 2; //showing that it is the 2nd user's turn now\r\n \r\n if(color1==Color.black){\r\n welcome.remove(okayButton);\r\n welcome.remove(black);\r\n }\r\n if(color1==Color.red){\r\n welcome.remove(okayButton);\r\n welcome.remove(red); //depending on which colour was chosen by the first player, take it out of the options for the 2nd player\r\n }\r\n if(color1==Color.yellow){\r\n welcome.remove(okayButton);\r\n welcome.remove(yellow);\r\n }\r\n if(color1==Color.green){\r\n welcome.remove(okayButton);\r\n welcome.remove(green);\r\n }\r\n } \r\n \r\n if(command.equals(\"Black\")&&choice == 2&&mode==1){ //once player 2 picks their colour\r\n instructions.setText(\"Interesting choice! Let's begin the game!\");\r\n color2 = Color.black;\r\n removeColor(); \r\n welcome.updateUI();\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n goesFirst(); //method that determines who goes first\r\n }\r\n \r\n if(command.equals(\"Red\")&&choice == 2&&mode==1){ \r\n instructions.setText(\"Interesting choice! Let's begin the game!\");\r\n color2 = Color.red;\r\n removeColor(); //removing the unneccessary colour buttons\r\n welcome.updateUI();\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n goesFirst(); \r\n }\r\n \r\n if(command.equals(\"Yellow\")&&choice == 2&&mode==1){ \r\n instructions.setText(\"Interesting choice! Let's begin the game!\");\r\n color2 = Color.yellow;\r\n removeColor(); \r\n welcome.updateUI();\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n goesFirst(); //method that determines who goes first\r\n }\r\n \r\n if(command.equals(\"Green\")&&choice == 2&&mode==1){ \r\n instructions.setText(\"Interesting choice! Let's begin the game!\");\r\n color2 = Color.green;\r\n removeColor(); \r\n welcome.updateUI();\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT); //aligning the buttons\r\n goesFirst(); \r\n }\r\n \r\n if(command.equals(name1)&&mode==1){ //if p1 goes first\r\n PVP(name1); //if they want name1 to go first, send it to the method with the correct parameter\r\n }\r\n \r\n else if(command.equals(name2)&&mode==1){ //if p2 goes first\r\n PVP(name2); //sending to PVP method which allows user to start game\r\n }\r\n \r\n else if(command.equals(\"Flip a coin\")&&mode==1){\r\n \r\n randomnum = (int)(r.nextInt(2));\r\n \r\n if(randomnum == 0){ //using randomnum to simulate the flipping of a coin\r\n PVP(name1);\r\n }\r\n else{ //randomly decides who goes first\r\n PVP(name2);\r\n }\r\n }\r\n \r\n \r\n //logic of the connect 4 game goes here --> when they press enter==============================================================---------============================\r\n //when they click a button\r\n if(command.equals(\"Enter\")&&whoseTurn==1&&canGo==true){ //WHEN PLAYER 1 GOES\r\n \r\n if(validInput(columnnumber)){\r\n erase = 0;\r\n changeBoard(columnnumber, whoseTurn, color1, color2); //sending the columnnumber picked to the changeBoard method, which changes the colour of things on the screen\r\n input.setText(\"\");\r\n whoseTurn=2;\r\n \r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n \r\n numTurns++; //accumulating the total amount of turns\r\n \r\n if(hasCheckingCondition(4, color1)){ //if they win the game; this is checked by sending the current state of the board to the hasCheckingCondition\r\n userWins++; //incrementing UserWin counter\r\n whoseTurn = 0; //make it no one's turn now because the game is over\r\n GameWon = true; //making it so that no one can go anymore because the game is over\r\n canGo = false;\r\n playSound(); //plays a winning tune if the user ever wins\r\n repeatGui(name1); //this method gives the user the option to restart the game\r\n }\r\n \r\n else{ //if player 1 has not won the game\r\n \r\n if(fullBoard()){ //if the board is full\r\n repeatGui(name1); //if they draw the game, ask if they want to repeat the GUI\r\n \r\n }\r\n else{\r\n if(!name2.equals(\"AI.BOT\")){ //else, then it is player 2's turn. If it isnt the ai, then outprint the below\r\n instructions.setText(\"<html>\"+name2 + \"<html>'s turn. <br><br> Please click the column number you wish to place your checker in. </html>\");\r\n }\r\n }\r\n }\r\n if(mode==2){\r\n whoseTurn=AINumber; //if the mode is 2 that means they chose, PvAI, so we make whoseTurn to AINumber, which is 3 or 4 depending on hard or easy mode\r\n }\r\n }\r\n else{\r\n instructions.setText(\"Please click a valid column number.\"); //if that column is full, they must reclick another valid column\r\n }\r\n }\r\n \r\n else if(command.equals(\"Enter\")&&whoseTurn ==2&&canGo==true){ //WHEN PLAYER 2 GOES\r\n \r\n if(validInput(columnnumber)){ //same if statements as above, just that player 2 is now playing\r\n erase = 0;\r\n changeBoard(columnnumber, whoseTurn, color1, color2); //calling the changeBoard method which changes the coour of the index based on the user and his pick\r\n input.setText(\"\");\r\n whoseTurn=1; //this will make this section and the above 'if' section alternate\r\n numTurns++; //accumulating the total amount of turns\r\n \r\n if(hasCheckingCondition(4, color2)){\r\n GameWon = true;\r\n canGo = false;\r\n whoseTurn = 0;\r\n playSound();\r\n repeatGui(name2); //repeating the GUI\r\n }\r\n else{\r\n \r\n if(fullBoard()){ //look at comments above for reference\r\n repeatGui(name2);\r\n }\r\n \r\n else{\r\n instructions.setText(\"<html>\"+name1 + \"<html>'s turn. <br><br> Please click the column number you wish to place your checker in. </html>\");\r\n }\r\n }\r\n }\r\n else{\r\n instructions.setText(\"Please click a valid column.\");\r\n }\r\n }\r\n \r\n //for the easy ai======================================================================================\r\n if(whoseTurn == 3 && command.equals(\"Enter\") &&GameWon == false){ //WHEN THE EASY AI GOES\r\n \r\n instructions.setText(\"<html>Please click the column number\"+\"</br>\"+\" you wish to place your checker in. </html>\"); //using html once again\r\n \r\n AIPlayed = false; //boolean that keeps track of if the AI has made a move or not\r\n for(int i = 1; i<=7; i++){\r\n \r\n if(fullBoard()){\r\n repeatGui(\"\"); //giving user option to play again if the result is a draw\r\n break;\r\n }\r\n \r\n if(validInput(i)){\r\n changeBoard(i, AINumber, color1, color2); //put a checker in every possible column\r\n if(hasCheckingCondition(4, color2)){ //then check if any of those checker can win the game\r\n GameWon = true;\r\n AIPlayed = true; //a tracker of if the AI has played or not\r\n whoseTurn = 0;\r\n canGo = false;\r\n repeatGui(\"AI\"); //send this to the method saying that the AI won the game. The method will then ask the user if they would like to play again\r\n break;\r\n }\r\n \r\n else if(hasCheckingCondition(4, color2)==false){ //if it cant win the game\r\n erase = i; //changing all the checkers placed back to white\r\n changeBoard(erase, AINumber, color1, color2); //this method can either add or erase checkers; in this case, erase\r\n erase = 0;\r\n \r\n if(fullBoard()){\r\n repeatGui(\"\"); //if the result of the game is a tie, break and send it to the repeatGUI method\r\n break;\r\n }\r\n \r\n continue;\r\n }\r\n }\r\n }\r\n \r\n //if the opponent(user) can win\r\n if(AIPlayed ==false){ //if the AI still hasnt made a move\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)){\r\n erase = 0; //resetting this variable (*IMPORTANT*)\r\n changeBoard(i, 1, color1, color2); //place a checker of the opponents colour in every slot\r\n if(hasCheckingCondition(4, color1)){ //if the opponent can win, then place a checker of the AI's colour to block it\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2); //change back the checker \r\n erase = 0;\r\n changeBoard(i, 3, color1, color2); //put a checker of the AI's colour to block it\r\n AIPlayed = true;\r\n numTurns++;\r\n whoseTurn = 1; //giving the turn back to the user and breaking out of the loop once it has blocked the user\r\n break;\r\n }\r\n \r\n else if(hasCheckingCondition(4, color1)==false){ //changing the colors back to what it was before\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2);\r\n erase = 0;\r\n continue;\r\n }\r\n }\r\n }\r\n }\r\n \r\n erase = 0; //must keep resetting this or else the changeBoard method will think it has to erase the checker instead of placing it\r\n \r\n if(AIPlayed == false){\r\n randomnum = (int)(r.nextInt(7)+1);\r\n \r\n while(validInput(randomnum)==false){ //if the AI cant win or block the opponent, it chooses a random slot and places it there\r\n randomnum = (int)(r.nextInt(7)+1);\r\n }\r\n \r\n changeBoard(randomnum, AINumber, color1, color2); //using a randomnum as long as it is a valid column\r\n numTurns++;\r\n whoseTurn = 1;\r\n \r\n if(fullBoard()){\r\n whoseTurn = 0;\r\n repeatGui(\"\"); \r\n }\r\n \r\n }\r\n }//end of easy ai========================================================\r\n \r\n \r\n //=========================//FOR THE HARD AI============================//\r\n \r\n if(whoseTurn == 4 &&command.equals(\"Enter\")&&GameWon==false){ //start of Hard AI\r\n //need to check the same things as the EasyAI at first - if the AI can win or if the USER can win\r\n \r\n instructions.setText(\"<html>Please click the column number\"+\"</br>\"+\" you wish to place your checker in. </html>\"); //using html once again\r\n \r\n AIPlayed = false; //boolean that keeps track of if the AI has made a move or not\r\n canPlace = true; //boolean that keeps track if the AI should place a checker there\r\n \r\n for(int a = 0; a<7; a++){\r\n shouldNotPlace[a]=-1; //resetting the array each time so that it can accumulate the moves properly\r\n }\r\n \r\n //CHECKING TO SEE IF THE AI CAN WIN====================================\r\n for(int i = 1; i<=7; i++){\r\n if(fullBoard()){\r\n repeatGui(\"\"); //if the result is a draw\r\n break;\r\n }\r\n \r\n if(validInput(i)){\r\n changeBoard(i, AINumber, color1, color2); //put a checker in every possible column\r\n if(hasCheckingCondition(4, color2)){ //then check if any of those checker can win the game\r\n GameWon = true;\r\n AIPlayed = true;\r\n whoseTurn = 0;\r\n canGo = false;\r\n repeatGui(\"AI\");\r\n playSound();\r\n break;\r\n }\r\n else if(hasCheckingCondition(4, color2)==false){ //if it cant win the game\r\n erase = i; //changing all the checkers placed back to white\r\n changeBoard(erase, AINumber, color1, color2);\r\n erase = 0;\r\n continue;\r\n }\r\n }\r\n }\r\n \r\n //CHECKING IF THE USER CAN WIN THE GAME, IF SO THEN BLOCK\r\n if(AIPlayed ==false){ //if the AI still hasnt made a move\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)){ //this must be a valid column to hypothetically place a checker in\r\n erase = 0;\r\n changeBoard(i, 1, color1, color2); //place a checker of the opponents colour in every slot\r\n if(hasCheckingCondition(4, color1)){ //if the opponent can win, then place a checker of the AI's colour to block it\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2); //erasing the checker just placed that was used to see if black could win\r\n erase = 0;\r\n changeBoard(i, AINumber, color1, color2);//changing the colour of it to magenta to block the opponent\r\n AIPlayed = true;\r\n numTurns++;\r\n if(fullBoard()){\r\n whoseTurn = 0;\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn = 1; //giving the turn back to the user and breaking out of the loop once it has blocked the user\r\n break;\r\n }\r\n \r\n else if(hasCheckingCondition(4, color1)==false){ //changing the colors back to what it was before\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2); //removing the checker placed at the beginning to its original game state\r\n erase = 0;\r\n continue;\r\n }\r\n }\r\n }\r\n }\r\n \r\n \r\n //CHECKING IF THE USER CAN GET A DOUBLE TRAP ON THE BOTTOM ROW (hard coding it just for the bottom row)=============\r\n \r\n if(AIPlayed == false&&trapBlocked == false){ //only needs to run once\r\n if(arrayCircles[5][3].getColor()==color1){ //if they have a checker in the middle column\r\n if(arrayCircles[5][4].getColor()==color1){ //checker to the right\r\n if(arrayCircles[5][2].getColor()==Color.white){\r\n erase = 0;\r\n changeBoard(3, AINumber, color1, color2); //changing the colour of it to magenta to block the opponent from a double on the bottom\r\n AIPlayed = true;\r\n numTurns++;\r\n whoseTurn = 1; //giving the turn back to the user and breaking out of the loop once it has blocked the user\r\n trapBlocked = true;\r\n }\r\n }\r\n if(arrayCircles[5][2].getColor()==color1){ //checker to the left\r\n if(arrayCircles[5][4].getColor()==Color.white){\r\n erase = 0;\r\n changeBoard(5, AINumber, color1, color2); //changing the colour of it to magenta to block the opponent from a double on the bottom\r\n AIPlayed = true;\r\n numTurns++;\r\n whoseTurn = 1; //giving the turn back to the user and breaking out of the loop once it has blocked the user\r\n trapBlocked = true;\r\n }\r\n }\r\n }\r\n }\r\n \r\n //CHECKING WHICH MOVES THE AI SHOULD NOT PLACE THAT WOULD LEAD TO AN IMMEDIATE WIN FOR THE USER============================\r\n \r\n if(AIPlayed==false){\r\n counter = 0;\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)){ //making sure that column is valid\r\n erase = 0;\r\n changeBoard(i, AINumber, color1, color2); //simulating every possible move of the AI\r\n for(int j = 1; j<=7; j++){\r\n if(validInput(j)){\r\n erase = 0;\r\n changeBoard(j, 1, color1, color2); //then seeing if the user can win after any one of those moves\r\n if(hasCheckingCondition(4, color1)==true){ \r\n shouldNotPlace[counter]=i; //if so, store it in the array so the AI knows to not place it there ever in the future\r\n counter++;\r\n }\r\n erase = j;\r\n changeBoard(erase, 1, color1, color2); //erasing previous moves\r\n }\r\n }\r\n erase = i;\r\n changeBoard(erase, AINumber, color1, color2); //erasing previous moves\r\n }\r\n }\r\n }\r\n \r\n //SETTING UP THE DOUBLE TRAP\r\n if(AIPlayed==false){ //this checks if the AI can make a move to double trap the user\r\n //looks ahead to the future state of the game and determines which column is best to win\r\n canPlace = true;\r\n mustPlace = -1;\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)&&canPlace==true){ \r\n erase = 0; //adding a move\r\n changeBoard(i, AINumber, color1, color2); //simulating every possible move of the AI\r\n for(int j = 1; j<=7; j++){\r\n if(validInput(j)&&canPlace == true){\r\n erase = 0; //adding another AI move\r\n changeBoard(j, AINumber, color1, color2); //then seeing if the AI can win after any one of those moves\r\n if(hasCheckingCondition(4, color2)==true){\r\n erase = j;\r\n changeBoard(erase, AINumber, color1, color2); //erasing the magenta one for the black one\r\n erase=0;\r\n changeBoard(j, 1, color1, color2); //placing a black checker here for the future game board possibilities after this move\r\n \r\n for(int z = 1; z<=7; z++){\r\n if(validInput(z)&&canPlace==true){\r\n erase = 0;\r\n changeBoard(z, AINumber, color1, color2); //adding a move\r\n if(hasCheckingCondition(4, color2)==true){//that means they can get a double win because the user blocked one win, but the AI can still make another\r\n mustPlace = i; //the move that can win the game by setting up a double win for the AI\r\n for(int x =0; x<7; x++){\r\n if(i==shouldNotPlace[i]){ //if mustPlace equals a immediate losing move, continue the loop to find the next one which results in a valid move\r\n canPlace = true;\r\n continue;\r\n }\r\n }\r\n canPlace = false; //putting it here so that the loop doesnt run again after its found, but the current iteration finishes\r\n }\r\n erase = z;\r\n changeBoard(erase, AINumber, color1, color2); //subtracting the checkers\r\n }\r\n }\r\n erase = j; //erasing if the USER placed something\r\n changeBoard(erase, 1, color1, color2);\r\n }\r\n else if(hasCheckingCondition(4, color1)==false){\r\n erase = j;\r\n changeBoard(erase, AINumber, color1, color2); //erasing the moves just placed by the AI\r\n }\r\n }\r\n }\r\n erase = i;\r\n changeBoard(erase, AINumber, color1, color2); //erasing the moves just placed by the AI\r\n }\r\n }\r\n \r\n if(mustPlace>-1){\r\n canPlace = true;\r\n for(int i = 0; i<7; i++){\r\n if(mustPlace == shouldNotPlace[i]){ //making sure that this projected move is not gonna lead immediately to a loss\r\n canPlace = false;\r\n }\r\n }\r\n \r\n if(canPlace==true){\r\n erase=0;\r\n changeBoard(mustPlace, AINumber, color1, color2); //placing the move\r\n AIPlayed = true;\r\n numTurns++;\r\n if(fullBoard()){\r\n whoseTurn = 0;\r\n repeatGui(\"\"); \r\n }\r\n canGo = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n whoseTurn = 1;\r\n }\r\n }\r\n }\r\n \r\n //BLOCKING A DOUBLE TRAP\r\n //it works by considering all opssible moves the opponent can make; then, it will again simulate moves that the user can make (2 moves in a row for the user)\r\n //then, if the user can win within two moves, block its second move by replacing the 2nd move with a magenta colour; now, simulate all possible moves of black\r\n //again, and see if the user can win. If so, then that means the user has a double trap potential depending on the AI's move THIS turn\r\n //at the end of this part of code, the AI should block the user from initially making the connect 4, blocking the double\r\n \r\n if(AIPlayed==false){ //this blocks the opponent from forcing the AI into making a move; essentially stops the double win before it happens\r\n //looks ahead to the future state of the game and determines which column is best to block the opponent\r\n canPlace = true;\r\n mustPlace = -1;\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)&&canPlace==true){ \r\n erase = 0; //adding a move\r\n changeBoard(i, 1, color1, color2); //simulating every possible move of the user\r\n for(int j = 1; j<=7; j++){\r\n if(validInput(j)&&canPlace == true){\r\n erase = 0; //adding another user move\r\n changeBoard(j, 1, color1, color2); //then seeing if the user can win after any one of those moves\r\n if(hasCheckingCondition(4, color1)==true){\r\n erase = j;\r\n changeBoard(erase, 1, color1, color2); //erasing the black one for a magenta one\r\n erase=0;\r\n changeBoard(j, AINumber, color1, color2); //placing a magenta checker here for the future game board possibilities\r\n \r\n for(int z = 1; z<=7; z++){\r\n if(validInput(z)&&canPlace==true){\r\n erase = 0;\r\n changeBoard(z, 1, color1, color2); //adding\r\n if(hasCheckingCondition(4, color1)==true){//that means they can get a double win soon\r\n mustPlace = i; //the move that must be placed to block a double move is i\r\n for(int x =0; x<7; x++){\r\n if(i==shouldNotPlace[i]){ //if mustPlace equals a immediate losing move, continue the loop to find the next one which results in a valid move\r\n canPlace = true;\r\n continue;\r\n }\r\n }\r\n canPlace = false; //putting it here so that the loop doesnt run again after its found, but the current iteration finishes\r\n }\r\n erase = z;\r\n changeBoard(erase, 1, color1, color2); //subtracting the checker\r\n }\r\n }\r\n erase = j; //erasing if the AI placed something\r\n changeBoard(erase, AINumber, color1, color2);\r\n }\r\n else if(hasCheckingCondition(4, color1)==false){\r\n erase = j;\r\n changeBoard(erase, 1, color1, color2); //erasing the moves just placed\r\n }\r\n }\r\n }\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2); //erasing the moves just placed\r\n }\r\n }\r\n \r\n if(mustPlace>-1){\r\n canPlace = true;\r\n for(int i = 0; i<7; i++){\r\n if(mustPlace == shouldNotPlace[i]){ //making sure that this projected move is not gonna lead immediately to a loss\r\n canPlace = false;\r\n }\r\n }\r\n \r\n if(canPlace==true){\r\n erase=0;\r\n changeBoard(mustPlace, AINumber, color1, color2);\r\n AIPlayed = true;\r\n numTurns++;\r\n if(fullBoard()){\r\n whoseTurn = 0;\r\n repeatGui(\"\"); \r\n }\r\n canGo = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n whoseTurn = 1;\r\n }\r\n }\r\n }\r\n \r\n if(AIPlayed==false){ //if the AI still hasnt made a move because none of the above is possible, then place in the center or middle columns if possible\r\n if(validInput(4)==true){\r\n canPlace=true;\r\n for(int i = 0; i<7; i++){\r\n if(shouldNotPlace[i]==4){\r\n canPlace=false; //if column 4 ever results in a losing move, dont place it there\r\n break;\r\n }\r\n }\r\n if(canPlace==true){\r\n if(arrayCircles[1][3].getColor()==Color.white){ //the AI shouldnt place it in the top-top row in the 4th column all the time\r\n erase = 0;\r\n changeBoard(4, AINumber, color1, color2); //for the center or middle column\r\n numTurns++; \r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn=1;\r\n AIPlayed = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n canGo=true;\r\n }\r\n }\r\n }\r\n }\r\n \r\n if(AIPlayed==false){ //this statement is so that the AI places a checker in the 3rd or 5th column provided that it isnt an immediate losing move\r\n outer: for(int i = 2; i<5; i++){ //if the AI still hasnt played, put it in a position at the bottom of the column\r\n for(int a = 0; a<7; a++){\r\n if(i+1==shouldNotPlace[a]){ //checking if the columnnumber equals to any part of the shouldNotPlace array\r\n canPlace = false;\r\n break outer; //breaking the outer loop for efficiency\r\n }\r\n }\r\n }\r\n if(canPlace==true&&AIPlayed == false){ // \r\n randomnum = (int)(r.nextInt(2));\r\n if(randomnum==0){\r\n if(validInput(3)){ //making all the possible moves are at least valid first\r\n erase=0;\r\n changeBoard(3, AINumber, color1, color2); //put it at the bottom of the more centered rows\r\n numTurns++; \r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn=1;\r\n AIPlayed = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n canGo=true;\r\n }\r\n }\r\n else if (randomnum==1){\r\n if(validInput(5)){\r\n erase=0;\r\n changeBoard(5, AINumber, color1, color2); //put it at the bottom of the more centered rows\r\n numTurns++; \r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn=1;\r\n AIPlayed = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n canGo=true;\r\n }\r\n }\r\n }\r\n }\r\n \r\n if(AIPlayed == false){ //if all of the above is not possible, then make a random choice that will not lose the game the next turn\r\n do{\r\n randomnum = (int)(r.nextInt(7)+1);\r\n \r\n timesChecked++;\r\n \r\n if(timesChecked>1000){ //if it runs 1000 times, meaning that there is only one spot to play which will result in a loss\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)== true){\r\n randomnum = i; //setting the random number to be the only column left available\r\n }\r\n }\r\n break; //breaking out of the loop if there is no other choice for a checker\r\n }\r\n \r\n for(int i = 0; i<7; i++){\r\n if(shouldNotPlace[i]==randomnum){\r\n randomnum=100; //causing the loop to run again\r\n break;\r\n }\r\n }\r\n \r\n }while(validInput(randomnum)==false); //if the AI cant win or block the opponent, it chooses a random slot and places it there\r\n \r\n erase = 0;\r\n changeBoard(randomnum, AINumber, color1, color2); //changing the board here and the variables below then make it the users turn\r\n numTurns++;\r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn = 1;\r\n AIPlayed = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n canGo=true;\r\n }\r\n \r\n }//END OF HARD AI METHOD=====================\r\n \r\n ///========================================================//////PVAI BUTTONS///////=======================================================================\r\n if(command.equals(\"Black\")&&mode==2){ \r\n instructions.setText(\"<html>Interesting choice!\"+\"</br>\" +\" Would you like to play vs the Easy AI or the Hard AI?\");\r\n color1 = Color.black; \r\n removeColor(); \r\n addAiButtons(); \r\n }\r\n \r\n if(command.equals(\"Red\")&&mode==2){ \r\n instructions.setText(\"<html>Interesting choice!\"+\"</br>\" + \" Would you like to play vs the Easy AI or the Hard AI?\");\r\n color1 = Color.red;\r\n removeColor(); \r\n addAiButtons(); //depending on which colour they press\r\n }\r\n \r\n if(command.equals(\"Yellow\")&&mode==2){ \r\n instructions.setText(\"<html>Interesting choice!\"+\"</br>\" +\" Would you like to play vs the Easy AI or the Hard AI?\");\r\n color1 = Color.yellow;\r\n removeColor(); \r\n addAiButtons(); \r\n }\r\n \r\n if(command.equals(\"Green\")&&mode==2){ \r\n instructions.setText(\"<html>Interesting choice!\"+\"</br>\" +\" Would you like to play vs the Easy AI or the Hard AI?\");\r\n color1 = Color.green;\r\n removeColor(); \r\n addAiButtons(); \r\n }\r\n \r\n if(command.equals(\"Easy AI\")){\r\n choseEasyAI = true;\r\n welcome.remove(easyAI); //sending it to the appropriate methods after they pressed the respective buttons\r\n welcome.remove(hardAI);\r\n goesFirst();\r\n }\r\n else if(command.equals(\"Hard AI\")){ //if they choose the hardAI\r\n choseEasyAI = false; \r\n welcome.remove(easyAI);\r\n welcome.remove(hardAI);\r\n goesFirst();\r\n }\r\n \r\n if(mode==2&&command.equals(name1)){\r\n PVAI(name1); //if they want name1 to go first, send it to the method with the correct parameter\r\n }\r\n \r\n else if(command.equals(name2)&&mode==2){ //if name 2 wants to go first\r\n PVAI(name2);\r\n }\r\n \r\n else if(command.equals(\"Flip a coin\")&&mode==2){ //if they desire to flip a coin to determine who goes first\r\n \r\n randomnum = (int)(r.nextInt(2));\r\n \r\n if(randomnum == 0){ //using randomnum to simulate the flipping of a coin\r\n PVAI(name1);\r\n }\r\n else{ //randomly decides who goes first\r\n PVAI(name2);\r\n }\r\n }\r\n \r\n //if they would like to play again; the buttons appear at the end\r\n if(command.equals(\"Yes\")){\r\n playAgain = true; //if they want to play again\r\n repeatGui(\"\"); //repeating the GUI method\r\n }\r\n else if(command.equals(\"No\")){\r\n this.dispose(); //getting rid of the frame; essentially closing it\r\n }\r\n }", "@Override\r\n public void start(Stage stage)\r\n {\r\n // create a label for the first card (choosing the level)\r\n Label levelLabel = new Label(\"Choose your level\");\r\n levelLabel.setFont(Font.font (\"Verdana\", 15));\r\n\r\n // create an HBox containing three dummy buttons for the first card (choosing the level)\r\n HBox levelButtons = new HBox(10);\r\n levelButtons.getChildren().addAll(new Button(\"Novice\"), \r\n new Button(\"Regular\"), new Button (\"Expert\"));\r\n levelButtons.setAlignment(Pos.CENTER);\r\n \r\n // create a VBox to act as the first card\r\n VBox levelPanel = new VBox(10);\r\n \r\n // add the label and buttons to the first VBox\r\n levelPanel.getChildren().addAll(levelLabel, levelButtons);\r\n levelPanel.setAlignment(Pos.CENTER);\r\n \r\n // create a label for the second card (choosing the character)\r\n Label characterLabel = new Label(\" Choose your character \");\r\n characterLabel.setFont(Font.font (\"Verdana\", 15));\r\n \r\n // create an HBox containing four dummy buttons for the second card (choosing the character)\r\n HBox characterButtons = new HBox(10);\r\n characterButtons.getChildren().addAll(new Button(\"Zorrkk\"), new Button(\"Kluggg\"), \r\n new Button (\"Grrogg\"), new Button(\"Skrankk\"));\r\n characterButtons.setAlignment(Pos.CENTER);\r\n \r\n // create a VBox to act as the second card\r\n VBox characterPanel = new VBox(10);\r\n characterPanel.getChildren().addAll(characterLabel, characterButtons);\r\n characterPanel.setAlignment(Pos.CENTER);\r\n \r\n // create a label for the second card (choosing the location)\r\n Label locationLabel = new Label(\"Choose your location\");\r\n locationLabel.setFont(Font.font (\"Verdana\", 15));\r\n \r\n // create an HBox containing two dummy buttons for the third card (choosing the location)\r\n HBox locationButtons = new HBox(10);\r\n locationButtons.getChildren().addAll(new Button(\"Castle of Doom\"), \r\n new Button(\"Forest of Fear\"));\r\n locationButtons.setAlignment(Pos.CENTER);\r\n \r\n // create a VBox to act as the third card\r\n VBox locationPanel = new VBox(10);\r\n locationPanel.getChildren().addAll(locationLabel, locationButtons);\r\n locationPanel.setAlignment(Pos.CENTER); \r\n \r\n \r\n // create and configure buttons for moving back and forth through the cards\r\n Button nextButton = new Button(\" Next \");\r\n Button previousButton = new Button(\"Previous\");\r\n \r\n nextButton.setFont(Font.font (\"Verdana\", 15));\r\n previousButton.setFont(Font.font (\"Verdana\", 15));\r\n \r\n // configure the stack pane \r\n stack.setPadding(new Insets(10, 10, 10, 10));\r\n stack.setBackground(new Background(new BackgroundFill(Color.GOLD, \r\n CornerRadii.EMPTY, Insets.EMPTY)));\r\n stack.setAlignment(Pos.CENTER);\r\n \r\n // add the cards to the stack pane\r\n stack.getChildren().addAll(levelPanel, characterPanel, locationPanel);\r\n \r\n // show the first card and hide the other two\r\n stack.getChildren().get(0).setVisible(true); \r\n stack.getChildren().get(1).setVisible(false); \r\n stack.getChildren().get(2).setVisible(false); \r\n \r\n // create and configure an HBox\r\n HBox root = new HBox(20);\r\n root.setBackground(Background.EMPTY);\r\n root.setAlignment(Pos.CENTER);\r\n \r\n // add the \"previous\" button, the stack of cards and the \"next\" button \r\n root.getChildren().addAll(previousButton, stack, nextButton);\r\n\r\n // add event handlers to call the relevant helper methods\r\n nextButton.setOnAction (e -> next());\r\n previousButton.setOnAction (e -> previous());\r\n \r\n\r\n // create and configure the scene\r\n Scene scene = new Scene(root, 500, 200, Color.DARKBLUE);\r\n \r\n // configure the stage\r\n stage.setScene(scene);\r\n stage.setTitle(\"The Dungeons of Schpiltz\");\r\n stage.show(); \r\n }", "public void tick() {\r\n if(a1 < 240){ //This fades in the colors.\r\n a1+=4;\r\n }\r\n if(a2 < 250){ //This fades in the colors.\r\n a2+=3;\r\n }\r\n\r\n\r\n resetCursor = true;\r\n for (Button button : buttons) {\r\n if (button.checkButtonHovered(game)) {\r\n resetCursor = false;\r\n }\r\n }\r\n for (Button missionButton : missionButtons) {\r\n if (missionButton.checkButtonHovered(game)) {\r\n resetCursor = false;\r\n }\r\n }\r\n\r\n if(resetCursor) {\r\n game.setCursor(true);\r\n }\r\n\r\n if(buttons.size()>0&&buttons.get(0).checkButtonHovered(game)&&MouseManager.mousePressed){\r\n PlayMusic.playSound(game,Assets.buttonClick);\r\n State.setState(new State_StartScreen(game));\r\n }\r\n\r\n if(currentMission == 1&&buttons.size()>2){\r\n buttons.get(2).setClickable(false);\r\n }else if(buttons.size()>2){\r\n buttons.get(2).setClickable(true);\r\n }\r\n if((currentMission==data.numOfUnlockedMissions||currentMission == Missions.NUMBER_OF_MISSIONS)&&buttons.size()>1){\r\n buttons.get(1).setClickable(false);\r\n }else if(buttons.size()>1){\r\n buttons.get(1).setClickable(true);\r\n }\r\n\r\n if(buttons.size()>1&&buttons.get(1).checkButtonHovered(game)&&MouseManager.mousePressed){\r\n if(currentMission<Missions.NUMBER_OF_MISSIONS&&currentMission<data.numOfUnlockedMissions){\r\n buttons = new ArrayList<>();\r\n moveToNextMission = 1;\r\n moving = true;\r\n PlayMusic.playSound(game,Assets.buttonClick);\r\n }\r\n }\r\n if(buttons.size()>2&&buttons.get(2).checkButtonHovered(game)&&MouseManager.mousePressed){\r\n if(currentMission>1){\r\n buttons = new ArrayList<>();\r\n moveToNextMission = -1;\r\n moving = true;\r\n PlayMusic.playSound(game,Assets.buttonClick);\r\n }\r\n }\r\n if(buttons.size()>3 && MouseManager.mousePressed && buttons.get(3).checkButtonHovered(game)){\r\n PlayMusic.playSound(game,Assets.buttonClick);\r\n State.setState(new State_Mission(game,data,currentMission));\r\n }\r\n if(moving){\r\n MouseManager.mousePressed = false;\r\n KeyboardManager.keyPressed = false;\r\n if(moveToNextMission == -1) {\r\n if((currentWire-1+adjust)%3!=0) {\r\n if (wireDir[currentWire-1] == 1) {\r\n if(amtMoved < wireLengths[currentWire-1]){\r\n screenOffsetX+=35;\r\n amtMoved+=35;\r\n }else{\r\n amtMoved = 0;\r\n currentWire--;\r\n adjust = 1;\r\n }\r\n } else if (wireDir[currentWire-1] == 2) {\r\n if(amtMoved < -1*wireHeights[currentWire-1]){\r\n screenOffsetY-=35;\r\n amtMoved+=35;\r\n }else{\r\n amtMoved = 0;\r\n currentWire--;\r\n adjust = 1;\r\n }\r\n } else if (wireDir[currentWire-1] == 3) {\r\n if(amtMoved < -1* wireLengths[currentWire-1]){\r\n screenOffsetX-=35;\r\n amtMoved+=35;\r\n }else{\r\n currentWire--;\r\n amtMoved = 0;\r\n adjust = 1;\r\n }\r\n } else {\r\n if(amtMoved < wireHeights[currentWire-1]){\r\n screenOffsetY+=35;\r\n amtMoved+=35;\r\n }else{\r\n adjust = 1;\r\n currentWire--;\r\n amtMoved=0;\r\n }\r\n }\r\n }else{\r\n currentMission--;\r\n moving = false;\r\n reAddButtons = true;\r\n moveToNextMission = 0;\r\n adjust = 0;\r\n }\r\n }else{\r\n if((currentWire+1-adjust)%3!=0) {\r\n if (wireDir[currentWire] == 1) {\r\n if(amtMoved < wireLengths[currentWire]){\r\n screenOffsetX-=35;\r\n amtMoved+=35;\r\n }else{\r\n amtMoved = 0;\r\n currentWire++;\r\n adjust = 1;\r\n }\r\n } else if (wireDir[currentWire] == 2) {\r\n if(amtMoved < -1*wireHeights[currentWire]){\r\n screenOffsetY+=35;\r\n amtMoved+=35;\r\n }else{\r\n amtMoved = 0;\r\n currentWire++;\r\n adjust = 1;\r\n }\r\n } else if (wireDir[currentWire] == 3) {\r\n if(amtMoved < -1* wireLengths[currentWire]){\r\n screenOffsetX+=35;\r\n amtMoved+=35;\r\n }else{\r\n currentWire++;\r\n amtMoved = 0;\r\n adjust = 1;\r\n }\r\n } else {\r\n if(amtMoved < wireHeights[currentWire]){\r\n screenOffsetY-=35;\r\n amtMoved+=35;\r\n }else{\r\n adjust = 1;\r\n currentWire++;\r\n amtMoved=0;\r\n }\r\n }\r\n }else{\r\n currentMission++;\r\n moving = false;\r\n reAddButtons = true;\r\n moveToNextMission = 0;\r\n adjust = 0;\r\n }\r\n }\r\n }\r\n }", "private void setItems()\n {\n sewers.setItem(rope); \n promenade.setItem(rope);\n bridge.setItem(potion);\n tower.setItem(potion);\n throneRoomEntrance.setItem(potion);\n depths.setItem(shovel);\n crypt.setItem(shovel);\n }", "private void initButtons() {\n\t\taddGoalkeeper = new JButton(\"+\");\n\t\taddGoalkeeper.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(0, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddDefence1 = new JButton(\"+\");\n\t\taddDefence1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(1, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddDefence2 = new JButton(\"+\");\n\t\taddDefence2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(2, e);\n\t\t\t}\n\t\t});\n\t\t\t\t\n\t\taddDefence3 = new JButton(\"+\");\n\t\taddDefence3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(3, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddDefence4 = new JButton(\"+\");\n\t\taddDefence4.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(4, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddMiddle1 = new JButton(\"+\");\n\t\taddMiddle1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(5, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddMiddle2 = new JButton(\"+\");\n\t\taddMiddle2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(6, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddMiddle3 = new JButton(\"+\");\n\t\taddMiddle3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(7, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddMiddle4 = new JButton(\"+\");\n\t\taddMiddle4.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(8, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddForward1 = new JButton(\"+\");\n\t\taddForward1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(9, e);\n\t\t\t}\n\t\t});\n\t\t\n\t\taddForward2 = new JButton(\"+\");\n\t\taddForward2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangePlayer(10, e);\n\t\t\t}\n\t\t});\n\t}", "protected final void setGUIAttributes(){\r\n\t\t\r\n\t\tbtnOnOff.setEnabled( device.getOn() != null && device.getOn().getActor() != null);\r\n\t\tif(device.getOn() == null){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// if the device is On\r\n\t\tif( device.getOnValue()){\r\n\t\t\tbtnOnOff.setText( \"Turn device Off\");\r\n\t\t// if the device is Off\r\n\t\t}else{\r\n\t\t\tbtnOnOff.setText( \"Turn device On\");\r\n\t\t}\r\n\t\tsetGUIAttributesHelper();\r\n\t}", "public void displayPolicy() {\n int noOfRows = environment.getRows();\n int noOfColumns = environment.getColumns();\n\n for (int i = 0; i < noOfRows; i++) {\n for (int j = 0; j < noOfColumns; j++) {\n if (!environment.getTile(i, j).getTileType().equals(\"WALL\")) {\n String action = environmentUtilities[i][j].getAction();\n switch(action){\n case \"Up\":\n action = \"^\";\n break;\n case \"Right\":\n action = \">\";\n break;\n case \"Left\":\n action = \"<\";\n break;\n case \"Down\":\n action = \"v\";\n break;\n }\n System.out.print(\"[\" + action + \"]\");\n }\n else {\n System.out.print(\"[X]\");\n }\n }\n System.out.print(\"\\n\");\n }\n }", "public void keyPressed(KeyEvent e){\n \tSystem.out.println(\"Evento do teclado\");\n\tswitch(e.getKeyChar())\n\t{\n case '1': \n r=0;\n g=0;\n b=0;\n break;\n case '2':\n r=1;\n g=1;\n b=1;\n break;\n case '3':\n r=1;\n g=0;\n b=0;\n break;\n case '4': \n r=0;\n g=1;\n b=0;\n break;\n case '5':\n r=0;\n g=0;\n b=1;\n break;\n case '6':\n r=1;\n g=1;\n b=0;\n break;\n \n case 'W': //pra cima\n case 'w': //pra cima\n vx1=vx1; vy1=vy1+5;\n vx2=vx2; vy2=vy2+5;\n vx3=vx3; vy3=vy3+5;\n vx4=vx4; vy4=vy4+5;\n break; \n case 'D': //pra esquerda\n case 'd': //pra cima\n vx1=vx1+5; vy1=vy1;\n vx2=vx2+5; vy2=vy2;\n vx3=vx3+5; vy3=vy3;\n vx4=vx4+5; vy4=vy4;\n break; \n case 'A': //pra direita\n case 'a': //pra direita\n vx1=vx1-5; vy1=vy1;\n vx2=vx2-5; vy2=vy2;\n vx3=vx3-5; vy3=vy3;\n vx4=vx4-5; vy4=vy4;\n break;\n case 'S': //pra baixo\n case 's': //pra baixo\n vx1=vx1; vy1=vy1-5;\n vx2=vx2; vy2=vy2-5;\n vx3=vx3; vy3=vy3-5;\n vx4=vx4; vy4=vy4-5; \n break;\n }\n switch(e.getKeyCode()) \n {\n// case KeyEvent.VK_LEFT: //seta esquerda pressionada\n//\t break;\n// case KeyEvent.VK_RIGHT: //seta direita pressionada\n//\t break;\n case KeyEvent.VK_UP: //seta esquerda pressionada\n raio_s=raio_s*2;\n\t break;\n case KeyEvent.VK_DOWN: //seta direita pressionada\n if(raio_s>=2.5f)\n {\n raio_s=raio_s/2;\n }\n\t break; \n } \n }", "private void controlLift()\n {\n if (gamepad1.dpad_up) {\n liftMotor.setPower(-0.5);\n } else if (gamepad1.dpad_down) {\n liftMotor.setPower(0.5);\n } else {++backInc;\n liftMotor.setPower(0);\n }\n }", "public void liftSet(Gamepad gamepad1) {\n\n levelPlus = gamepad1.dpad_up;\n levelMinus = gamepad1.dpad_down;\n\n if(!pressP){\n if (levelPlus) {\n if (level < 8){\n level++;\n liftPress=true;\n }\n pressP = true;\n }\n }\n else{\n if (!levelPlus){\n pressP = false;\n }\n }\n\n if(!pressM){\n if (levelMinus) {\n if(level > 0){\n level--;\n liftPress=true;\n }\n pressM = true;\n }\n }\n else{\n if (!levelMinus){\n pressM = false;\n }\n }\n\n if(liftPress) {\n switch (level) {\n case 0:\n if(distanceLift.getDistance(DistanceUnit.CM) > 1) { //3\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0);\n liftPress = false;\n }\n break;\n case 1:\n if (distanceLift.getDistance(DistanceUnit.CM) < 10) { //10.5\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 11) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 2:\n if (distanceLift.getDistance(DistanceUnit.CM) < 20) { //20.5\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 21) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 3:\n if (distanceLift.getDistance(DistanceUnit.CM) < 30) { //30.5\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 31) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 4:\n if (distanceLift.getDistance(DistanceUnit.CM) < 40) { //40.5\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 41) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 5:\n if (distanceLift.getDistance(DistanceUnit.CM) < 55) { //54\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 56) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 6:\n if (distanceLift.getDistance(DistanceUnit.CM) < 63) { //62\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 64) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 7:\n if (distanceLift.getDistance(DistanceUnit.CM) < 73) { //72\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 74) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 8:\n if (distanceLift.getDistance(DistanceUnit.CM) < 82) { //81\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 83) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n }\n }\n }", "private void activateButtons(){\n limiteBoton.setEnabled(true);\n derivadaBoton.setEnabled(true);\n integralBoton.setEnabled(true);\n}", "public void drawButtons(){\r\n\t\tGuiBooleanButton showDirection = new GuiBooleanButton(1, 10, 20, 150, 20, \"Show Direction\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowdir(), \"showdir\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showdir\").split(\";\"));\r\n\t\tGuiChooseStringButton dirpos = new GuiChooseStringButton(2, width/2+50, 20, 150, 20, \"Dir-Position\", GuiPositions.getPosList(), \"posdir\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosDir()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showFPS= new GuiBooleanButton(3, 10, 45, 150, 20, \"Show FPS\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowfps(), \"showfps\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showfps\").split(\";\"));\r\n\t\tGuiChooseStringButton fpspos = new GuiChooseStringButton(4, width/2+50, 45, 150, 20, \"FPS-Position\", GuiPositions.getPosList(), \"posfps\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosFPS()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showCoor = new GuiBooleanButton(5, 10, 70, 150, 20, \"Show Coor\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowcoor(), \"showcoor\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showcoor\").split(\";\"));\r\n\t\tGuiChooseStringButton coorpos = new GuiChooseStringButton(6, width/2+50, 70, 150, 20, \"Coor-Position\", GuiPositions.getPosList(), \"poscoor\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosCoor()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton showworldage = new GuiBooleanButton(7, 10, 95, 150, 20, \"Show WorldAge\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowWorldAge(), \"showworldage\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showworldage\").split(\";\"));\r\n\t\tGuiChooseStringButton worldagepos = new GuiChooseStringButton(8, width/2+50, 95, 150, 20, \"WorldAge-Position\", GuiPositions.getPosList(), \"posworldage\", ModData.InfoMod, speicher,GuiPositions.getPos(((InfoMod)speicher.getMod(ModData.InfoMod.name())).getPosWorldAge()),LiteModMain.lconfig.getData(\"Main.choosepos\").split(\";\"));\r\n\t\t\r\n\t\t\r\n\t\tGuiBooleanButton showFriendly = new GuiBooleanButton(7, 10, 120, 150, 20, \"Mark friendly spawns\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowingFriendlySpawns(), \"showfmobspawn\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showfriendlymobspawn\").split(\";\"));\r\n\t\tGuiBooleanButton showAggressiv = new GuiBooleanButton(7, 10, 145, 150, 20, \"Mark aggressiv spawns\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isShowingAggressivSpawns(), \"showamobspawn\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.showaggressivmobspawn\").split(\";\"));\r\n\t\t\r\n\t\tGuiBooleanButton dynamic = new GuiBooleanButton(7, width/2+50, 120, 150, 20, \"dynamic selection\", ((InfoMod)speicher.getMod(ModData.InfoMod.name())).isDynamic(), \"dynamichsel\", ModData.InfoMod, speicher,LiteModMain.lconfig.getData(\"InfoMod.dynamicselection\").split(\";\"));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tGuiButton back = new GuiButton(9, width/2-100,height-50 , \"back to game\");\r\n\t\t\r\n\t\tbuttonList.add(showworldage);\r\n\t\tbuttonList.add(worldagepos);\r\n\t\tbuttonList.add(dirpos);\r\n\t\tbuttonList.add(fpspos);\r\n\t\tbuttonList.add(coorpos);\r\n\t\tbuttonList.add(showCoor);\r\n\t\tbuttonList.add(showFPS);\r\n\t\tbuttonList.add(showDirection);\r\n\t\t\r\n\t\tbuttonList.add(showFriendly);\r\n\t\tbuttonList.add(showAggressiv);\r\n\t\tbuttonList.add(dynamic);\r\n\t\t\r\n\t\tbuttonList.add(back);\r\n\t}", "private void boundButtons() {\r\n \tsingleplayer = (Button) findViewById(R.id.single);\r\n \tsingleplayer.setTypeface(tf);\r\n \tsingleplayer.setOnClickListener(new OnClickListener() {\r\n \t\t\r\n \t\t/** Start a drawing surface for one player*/\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tIntent intent = new Intent(Main.this, DrawingActivitySingle.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t}});\r\n \t\r\n \tmultiplayer = (Button) findViewById(R.id.multi);\r\n \tmultiplayer.setTypeface(tf);\r\n \tmultiplayer.setOnClickListener(new OnClickListener() {\r\n \t\t\r\n \t\t/** Connect to other users to start a drawing surface*/\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tif (multiplayer.isEnabled()) {\r\n\t\t\t\t\tmultiplayer.setEnabled(false);\r\n\t\t\t\t\t\r\n\t\t\t\t\tinitMultiPlayer();\r\n\t\t\t\t}\r\n\t\t}});\r\n \t\r\n \toptions = (Button) findViewById(R.id.options);\r\n \toptions.setTypeface(tf);\r\n \toptions.setOnClickListener(new OnClickListener() {\r\n \t\t\r\n \t\t/** Start the options menu */\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tIntent intent = new Intent(Main.this, Options.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t}});\r\n }", "private void setUpKeyboardButtons() {\n mQWERTY = \"qwertyuiopasdfghjklzxcvbnm_\";\n mQWERTYWithDot = \"qwertyuiopasdfghjklzxcvbnm.\";\n\n mKeySize = mQWERTY.length();\n\n mLetterButtons = new Button[mQWERTY.length()];\n mKeyObjects = new KeyObject[mQWERTY.length() + 10];\n mIsShiftPressed = false;\n\n\n for (int i = 0; i < mQWERTY.length(); i++) {\n int id = getResources().getIdentifier(mQWERTY.charAt(i) + \"Button\", \"id\", getPackageName());\n mLetterButtons[i] = (Button) findViewById(id);\n\n final int finalI = i;\n mLetterButtons[i].setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n // create KeyObject when button is pressed and assign pressed features\n if (event.getAction() == MotionEvent.ACTION_DOWN) {\n mKeyObjects[finalI] = new KeyObject();\n\n Rect buttonShape = new Rect();\n v.getLocalVisibleRect(buttonShape);\n\n mKeyObjects[finalI].setPressedPressure(event.getPressure());\n mKeyObjects[finalI].setPressedTime(event.getEventTime());\n\n mKeyObjects[finalI].setCoordXPressed(event.getX());\n mKeyObjects[finalI].setCoordYPressed(event.getY());\n\n mKeyObjects[finalI].setCenterXCoord(buttonShape.exactCenterX());\n mKeyObjects[finalI].setCenterYCoord(buttonShape.exactCenterY());\n }\n\n // assign release features, check if button is canceled\n if (event.getAction() == MotionEvent.ACTION_UP) {\n mKeyObjects[finalI].setReleasedPressure(event.getPressure());\n mKeyObjects[finalI].setReleasedTime(event.getEventTime());\n\n mKeyObjects[finalI].setCoordXReleased(event.getX());\n mKeyObjects[finalI].setCoordYReleased(event.getY());\n\n if (mIsShiftPressed) {\n mKeyObjects[finalI].setKeyChar(Character.toUpperCase(mQWERTYWithDot.charAt(finalI)));\n } else {\n mKeyObjects[finalI].setKeyChar(mQWERTYWithDot.charAt(finalI));\n }\n\n Log.d(TAG, mKeyObjects[finalI].toString());\n\n\n // add key to buffer and update EditText\n if (mKeyBuffer.add(mKeyObjects[finalI]))\n if (mIsShiftPressed) {\n mPasswordEditText.append((mQWERTYWithDot.charAt(finalI) + \"\").toUpperCase());\n switchToLowerCase();\n } else {\n mPasswordEditText.append(mQWERTYWithDot.charAt(finalI) + \"\");\n }\n }\n\n return false;\n }\n });\n }\n\n mShiftButton = (Button) findViewById(R.id.shiftButton);\n mShiftButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (mIsShiftPressed) {\n switchToLowerCase();\n } else {\n switchToUpperCase();\n }\n }\n });\n }", "private void interFace(){\n\n\n setSize(900,300);\n setLocationRelativeTo(null);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n setLayout(new GridLayout(0,3));\n\n hanoi1 = new Hanoi();\n hanoi2 = new Hanoi();\n hanoi3 = new Hanoi();\n\n add(hanoi1);\n add(hanoi2);\n add(hanoi3);\n setVisible(true);\n\n\n }", "@Override\n\tpublic void action() {\n\t\tsuppressed = false;\n\t\tSettings.readState = true;\n\t\tSettings.atStartOfMaze = false;\n\t\tpilot.travel(-5);\n\t\tpilot.rotate(100);\n\t\twhile( pilot.isMoving() && !suppressed );\n\t\tpilot.stop();\n\t}", "public void keyCheck() {\n if (right) {\n ship.rotateRight();\n }\n if (left) {\n ship.rotateLeft();\n }\n if (up) {\n ship.accelerate();\n }\n if (down) {\n ship.decelerate();\n }\n if (spacebar) {\n if (one){\n fireMiniGun();\n }\n if (two){\n fireEnergyBlaster();\n }\n if (three) {\n fireGrenadeLauncher();\n }\n }\n }", "public void towerIndexing()\n {\n m_towerMotor.set(ControlMode.PercentOutput, 0.5);\n m_intakeHopperMotor.set(ControlMode.PercentOutput, HopperConstants.HOPPER_MOTOR_POWER);\n }", "public void getMovements()\n {\n if(\n Greenfoot.isKeyDown(\"Up\")||Greenfoot.isKeyDown(\"W\")||\n Greenfoot.isKeyDown(\"Down\")||Greenfoot.isKeyDown(\"S\")||\n Greenfoot.isKeyDown(\"Right\")||Greenfoot.isKeyDown(\"D\")||\n Greenfoot.isKeyDown(\"Left\") ||Greenfoot.isKeyDown(\"A\")||\n getWorld().getObjects(Traps.class).isEmpty() == false //car trap engendre un mouvement sans les touches directionnelles\n )\n {\n isMoved = true;\n }\n else{isMoved = false;}\n }", "public void RiverCrossing() {\n gamePanel.setLayout(new GridLayout(13,9));\n mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n \n\t\t//determins the row to a max of 9\n\t\tfor(int x=0; x<9; x++){\n\t\t\t\n\t\t\t//determins the column to a max of 13\n for(int i= 0; i<13; i++){\n button[x][i] = new JButton(water);\n gamePanel.add(button[x][i]);\n }\n }\n \n\t\t//putting the bank in the top and bottom\n for(int x =0; x<1; x++) {\n \n\t\t\tfor (int i = 0; i < 9; i++) {\n button[x][i].setIcon(bank2);\n }\n }\n\n for(int x =8; x<9; x++) {\n for (int i = 4; i < 13; i++) {\n button[x][i].setIcon(bank1);\n }\n }\n\n //Getting rid of the lines between the squares \n for(int x =0; x<9; x++) {\n for (int i = 0; i < 13; i++) {\n button[x][i].setBorderPainted(false);\n button[x][i].setFocusPainted(false);\n }\n }\n\t\t\n\t\t//Puting the stumps, plank and stump man in the determined positions\n\t\tbutton[8][6].setIcon(stump1_man);\n\t\tbutton[4][4].setIcon(stump1);\n\t button[5][9].setIcon(stump1);\n\t\tbutton[0][6].setIcon(stump3);\n\t\tbutton[4][8].setIcon(stump1);\n\t\tbutton[3][3].setIcon(stump1);\n\t\tbutton[5][0].setIcon(plank2);\n\t\tbutton[6][5].setIcon(plank2);\n\t\tbutton[7][1].setIcon(plank2);\n\t\tbutton[7][10].setIcon(plank2);\n\t\t\n mainFrame.setSize(310,350);\n mainFrame.add(gamePanel);\n mainFrame.setVisible(true);\n }" ]
[ "0.5798902", "0.57228005", "0.5708692", "0.56521064", "0.56459904", "0.56013507", "0.55981153", "0.5555192", "0.55385274", "0.55310106", "0.5528722", "0.5526416", "0.55204016", "0.55046254", "0.5485018", "0.5451188", "0.5414267", "0.54132867", "0.54050124", "0.53798413", "0.5362291", "0.53571475", "0.5352838", "0.5340031", "0.5335313", "0.5292927", "0.52828103", "0.5264883", "0.5256158", "0.5252559", "0.52512777", "0.52286667", "0.5228568", "0.5227145", "0.52237356", "0.5193384", "0.51926506", "0.51829684", "0.518003", "0.5179238", "0.51579225", "0.5154854", "0.51526314", "0.5150377", "0.5141152", "0.51390636", "0.51359653", "0.5132187", "0.5128762", "0.5121397", "0.51203525", "0.511711", "0.51080495", "0.5105591", "0.51038855", "0.5103643", "0.5097536", "0.5097434", "0.5097179", "0.50948244", "0.5090173", "0.5088665", "0.5088658", "0.5087792", "0.50843143", "0.5081499", "0.50773215", "0.50731283", "0.5067494", "0.5066635", "0.5065961", "0.50610316", "0.5059533", "0.50583583", "0.5056868", "0.5056662", "0.50542724", "0.50507057", "0.504894", "0.5047709", "0.5045989", "0.5045176", "0.5041518", "0.5037214", "0.5035437", "0.5035185", "0.50287557", "0.50267243", "0.5018811", "0.50154257", "0.50151277", "0.5001362", "0.4999973", "0.49983004", "0.49945596", "0.49940473", "0.49937445", "0.49875996", "0.49868655", "0.49852434" ]
0.5645349
5
Age score markers and remove ones that are too old
private void ageScoreMarkers(long deltaTime) { for (int i = 0; i < scoreMarkers.size(); i++) { ScoreMarker scoreMarker = scoreMarkers.get(i); scoreMarker.move(deltaTime); if (scoreMarkers.get(i).getAge() > scoreMarkerMaxAge) { scoreMarkers.remove(i--); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void removeOldParticles(int maxAge) {\n\t\t// Track the whole array\n\t\tfor (int i = 0; i < particles.length; i++) {\n\t\t\t// If the particle is null reference, continue to track\n\t\t\tif (particles[i] == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// If the particle's age is greater than 80\n\t\t\t// change it to a null reference\n\t\t\telse if (particles[i].getAge() > maxAge) {\n\t\t\t\tparticles[i] = null;\n\t\t\t}\n\t\t}\n\t}", "void removeHasAge(Integer oldHasAge);", "private void removeOlderGigs() {\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tint currentHr = cal.get(Calendar.HOUR_OF_DAY);\r\n\t\t\r\n\t\tif ((currentHr >= 0 && currentHr <= 7)) {\r\n\t\t\t//Log.d(TAG, \"deleting older gigs\");\r\n\t\t\tmGigsDbHelper.deleteOlderGigs();\r\n\t\t}\r\n\t\t\r\n\t}", "public boolean deleteScore(String dateCheck)\n {\n Score[] temp = new Score[scores.length - 1];\n if(findScore(dateCheck) == -1)\n {\n return false;\n }\n else\n {\n for(int i = 0; i < findScore(dateCheck); i++)\n {\n temp[i] = scores[i];\n }\n for(i = findScore(dateCheck) + 1; i < scores.length; i++)\n {\n temp[i - 1] = scores[i];\n }\n scores = temp;\n return true;\n }\n }", "public void deleteAllScore() {\n // Rewrite only the first 10 lines to the file.\n try(BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(scoreFile))) {\n bufferedWriter.write(\"\");\n } catch (IOException e) {\n System.err.println(\"Cannot open the score file : \" + e.getMessage());\n }\n }", "public void removeAnnotations() {\n int size = this.annotationsArray.size();\n long[] jArr = new long[size];\n this.selectedMarkers.clear();\n for (int i = 0; i < size; i++) {\n jArr[i] = this.annotationsArray.keyAt(i);\n Annotation annotation = this.annotationsArray.get(jArr[i]);\n if (annotation instanceof Marker) {\n Marker marker = (Marker) annotation;\n marker.hideInfoWindow();\n this.iconManager.iconCleanup(marker.getIcon());\n }\n }\n this.annotations.removeAll();\n }", "private void notateScore() {\r\n View.notate(score, this.getSize().width + 15, 0);\r\n }", "private void loseLife() {\r\n\t\thitGraphic(player);\r\n\t\tif (hits ==1) {\r\n\t\t\tlifeBar.scale(.67, 1);\r\n\t\t\tlifeBar.setColor(Color.ORANGE);\r\n\t\t} else if (hits == 2) {\r\n\t\t\tlifeBar.scale(.5, 1);\r\n\t\t\tlifeBar.setColor(Color.RED);\r\n\t\t} else if (hits == 3) {\r\n\t\t\tremove(lifeBar);\r\n\t\t\tlifeBar = null;\r\n\t\t}\r\n\t}", "private static boolean isOldEnough(int[] ageRatings, int selectedMovie, int userAge) {\n\t\tint[] ratings = ageRatings;\n\t\tif (userAge >= ratings[selectedMovie]) {\n\t\t\treturn true;\n\t\t} else return false;\t\t\n\t}", "public void newScore()\n {\n score.clear();\n }", "public void deleteScore() {\n\t\tthis.score = 0;\n\t}", "public void loseLife() {\n\t\tfor (int i = 0; i < game.e.preds.size(); i++) {\n\t\t\tif (game.e.preds.get(i).hitPred(this) > 0) {\n\t\t\t\tlife -= 1;\n\t\t\t\tlifeTime = game.getTime();\n\t\t\t\tRandom rand = new Random();\n\n\t\t\t\tword = rand.nextInt(10) + 1;\n\t\t\t\tif (game.e.preds.get(i).hitPred(this) == 1) {\n\t\t\t\t\tyPos -= 60;\n\t\t\t\t\thitRight = false;\n\t\t\t\t\thitUp = true;\n\t\t\t\t\thitLeft = false;\n\t\t\t\t\thitDown = false;\n\t\t\t\t}\n\t\t\t\telse if (game.e.preds.get(i).hitPred(this) == 2){\n\t\t\t\t\tyPos += 60;\n\t\t\t\t\thitRight = false;\n\t\t\t\t\thitUp = false;\n\t\t\t\t\thitLeft = false;\n\t\t\t\t\thitDown = true;\n\t\t\t\t} \n\t\t\t\telse if (game.e.preds.get(i).hitPred(this) == 5) {\n\t\t\t\t\tyPos -= 60;\n\t\t\t\t\thitRight = false;\n\t\t\t\t\thitUp = true;\n\t\t\t\t\thitLeft = false;\n\t\t\t\t\thitDown = false;\n\t\t\t\t}\n\t\t\t\telse if (game.e.preds.get(i).hitPred(this) == 3) {\n\t\t\t\t\txPos += 60;\n\t\t\t\t\thitRight = true;\n\t\t\t\t\thitUp = false;\n\t\t\t\t\thitLeft = false;\n\t\t\t\t\thitDown = false;\n\t\t\t\t}\n\t\t\t\telse if (game.e.preds.get(i).hitPred(this) == 4){\n\t\t\t\t\txPos -= 60;\n\t\t\t\t\thitRight = false;\n\t\t\t\t\thitUp = false;\n\t\t\t\t\thitLeft = true;\n\t\t\t\t\thitDown = false;\n\t\t\t\t}\n\t\t\t\telse if (game.e.preds.get(i).hitPred(this) == 6) {\n\t\t\t\t\txPos -= 60;\n\t\t\t\t\thitRight = false;\n\t\t\t\t\thitUp = false;\n\t\t\t\t\thitLeft = true;\n\t\t\t\t\thitDown = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void resetScore(){\n Set<String> keys = CalcScore.keySet();\n for(String key: keys){\n CalcScore.replace(key,0.0);\n }\n\n\n\n }", "public void removeMissiles(){\n nunMissiles--;\n }", "public static void updateAge() {\n\t\tfor (int i =0; i < data.size(); i++){\n\t\t\tdata.get(i).setAge(data.get(i).getAge()+1);\n\t\t}\n\t}", "private void removeBadCrimes(){\n for(Crime badCrime: mBadCrimesList){\n mCrimesList.remove(badCrime);\n Log.i(TAG, \"bad crime removed\");\n }\n }", "public int removeAbsentStudents(int allowedAbsences)\n {\n int count=0;\n for(int row=0;row<seats.length;row++)\n {\n for( int col=0;col<seats[0].length;col++)\n {\n if(seats[row][col].getAbsenceCount()>allowedAbsences)\n {\n count++;\n seats[row][col]=null;\n }\n }\n } \n return count;\n }", "private void removeInvalidFromPool()\r\n\t{\r\n\t\tint i;\r\n\t\tint size_mature_pool;\r\n\t\tint idx_1st_oldest;//index of the oldest individual\r\n\t\tint idx_2nd_oldest;//index of the 2nd oldest individual\r\n\t\tint idx_to_remove;//index of an chromosome which has to be removed\r\n\t\tint idx_current;//index of currently checked genotype\r\n\t\tint num_errors;//number of errors of the current chromosome\r\n\t\tint max_num_errors;//maximum numbers of stored errors among checked chromosomes\r\n\t\tdouble error_1st_oldest;//average error of the oldest individual\r\n\t\tdouble error_2nd_oldest;//average error of the 2nd oldest individual\r\n\t\tdouble max_error;//largest error among the oldest individuals\r\n\t\tVector<Integer> idx_oldest;//indices of all chromosomes with a life span larger than a predefined threshold\r\n\t\t\r\n\t\tsize_mature_pool = _pool_of_bests.size();\r\n\t\t\r\n\t\t//if the maturity pool is full and none of the genotypes could be removed above because of module outputs\r\n\t\t//then remove one of the oldest individuals according to the errors\r\n\t\tif(_pool_of_bests.size()==_size_pool_of_bests)\r\n\t\t{\r\n\t\t\tidx_oldest = new Vector<Integer>(0, 1);\r\n\t\t\t\r\n\t\t\t//find all oldest genotypes\r\n\t\t\tfor(i=0; i<size_mature_pool; i++)\r\n\t\t\t{\r\n\t\t\t\tnum_errors = _pool_of_bests.get(i)._error.all_single_squares.size();\r\n\t\t\t\tif(num_errors>=_min_life_span)\r\n\t\t\t\t{\r\n\t\t\t\t\tidx_oldest.add(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//1) find the worst oldest gentypes with a span above a threshold\r\n\t\t\t//2) do not remove a single genotype without comparison;\r\n\t\t\t// it could have very high performance\r\n\t\t\tif(idx_oldest.size() > 1)\r\n\t\t\t{\r\n\t\t\t\tidx_to_remove = idx_oldest.get(0);\r\n\t\t\t\tmax_error = _pool_of_bests.get(idx_to_remove)._error.getAverageError();\r\n\t\t\t\tfor(i=idx_to_remove+1; i<idx_oldest.size(); i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tidx_current = idx_oldest.get(i);\r\n\t\t\t\t\tif(max_error < _pool_of_bests.get(idx_current)._error.getAverageError())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tidx_to_remove = idx_current;\r\n\t\t\t\t\t\tmax_error = _pool_of_bests.get(idx_to_remove)._error.getAverageError();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse//remove the worst of two oldest genotypes if none of genotypes had span above the threshold\r\n\t\t\t{\r\n\t\t\t\t//find the oldest and 2nd oldest individuals\r\n\t\t\t\tidx_1st_oldest = -1;\r\n\t\t\t\tmax_num_errors = 0;\r\n\t\t\t\tfor(i=0; i<size_mature_pool; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\t//\"[0]\" because the number of errors is equal for all sub-individuals of the same individual\r\n\t\t\t\t\tnum_errors = _pool_of_bests.get(i)._error.all_single_squares.size();\r\n\t\t\t\t\tif(max_num_errors < num_errors)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmax_num_errors = num_errors;\r\n\t\t\t\t\t\tidx_1st_oldest = i;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//find the 2nd oldest individuals\r\n\t\t\t\tidx_2nd_oldest = -1;\r\n\t\t\t\tif(size_mature_pool > 1)//the 2nd oldest individual exists if there are 2 or more individuals\r\n\t\t\t\t{\r\n\t\t\t\t\tmax_num_errors = 0;\r\n\t\t\t\t\tfor(i=0; i<size_mature_pool; i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i!=idx_1st_oldest)//the oldest individual should be ignored\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t//\"[0]\" because the number of errors is equal for all sub-individuals of the same individual\r\n\t\t\t\t\t\t\tnum_errors = _pool_of_bests.get(i)._error.all_single_squares.size();\r\n\t\t\t\t\t\t\tif(max_num_errors < num_errors)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tmax_num_errors = num_errors;\r\n\t\t\t\t\t\t\t\tidx_2nd_oldest = i;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//compare performances of both oldest genotypes using their average errors;\r\n\t\t\t\terror_1st_oldest = _pool_of_bests.get(idx_1st_oldest)._error.getAverageError();\r\n\t\t\t\tif(idx_2nd_oldest!=-1)\r\n\t\t\t\t{\r\n\t\t\t\t\terror_2nd_oldest = _pool_of_bests.get(idx_2nd_oldest)._error.getAverageError();\r\n\r\n\t\t\t\t\tif(error_1st_oldest < error_2nd_oldest)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tidx_to_remove = idx_2nd_oldest;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tidx_to_remove = idx_1st_oldest;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse//a single individual must always be replaced\r\n\t\t\t\t{\r\n\t\t\t\t\tidx_to_remove = idx_1st_oldest;\r\n\t\t\t\t}\r\n\t\t\t}//are there genotypes with life span above a threshold?\r\n\t\t\t\r\n\t\t\t_pool_of_bests.remove(idx_to_remove);\r\n\t\t}//is maturity pool full?\r\n\t}", "public void removeInvalidateUsersFromNewStarScorePool(double timestamp){\n\n log.info(\"<removeInvalidateUsersFromNewStarScorePool> timestamp = \" + timestamp);\n\n final Set<String> set = client.zbelowScore(newStarDateRedisKey, timestamp);\n if(set.size() != 0){\n\n client.execute(new RedisCallable() {\n @Override\n public Object call(Jedis jedis) {\n Pipeline p = jedis.pipelined();\n// p.multi();\n for(String userId:set){\n p.zrem(getRedisKey(),userId);\n }\n// p.exec();\n p.syncAndReturnAll();\n return null;\n }\n });\n\n }\n }", "public Builder clearAge() {\n bitField0_ = (bitField0_ & ~0x00000004);\n age_ = 0;\n onChanged();\n return this;\n }", "private Boolean cutScores(List<Pair<String, Integer>> list2) {\n final boolean modified;\n if (list2.size() > this.maxScores) {\n modified = true;\n } else {\n modified = false;\n }\n while (list2.size() > this.maxScores) {\n list2.remove(this.maxScores);\n }\n return modified;\n\n }", "public void removeInvalidateUsersFromNewStarPool(double timestamp){\n log.info(\"<removeInvalidateUsersFromNewStarPool> timestamp = \" + timestamp);\n client.zremRangeByScore(newStarDateRedisKey, 0, timestamp);\n }", "public Person[] getPatientsWithAgeAbove(int age) {\n int count = 0;\n for(int i = 0; i < listOfPatients.length; i++)\n {\n if(listOfPatients[i].getAge()> age)\n count++;\n }\n \n if(count == 0)\n return null;\n\n int index = 0;\n Person[] patientsWithAgeAbove = new Person[count];\n for(int i = 0; i < listOfPatients.length; i++)\n {\n if(listOfPatients[i].getAge()> age)\n patientsWithAgeAbove[index++] = listOfPatients[i];\n }\n\n return patientsWithAgeAbove;\n }", "public void getWinner() {\n\n Iterator<Integer> it = players.values().iterator();\n Integer max = it.next();\n for (Integer value : players.values()) {\n if (value > max)\n max = value;\n }\n\n\n String[] nameArr = new String[players.size()];\n nameArr = players.keySet().toArray(nameArr);\n\n int ageLimit = max;\n\n for (String emp : nameArr) {\n if (players.get(emp) < ageLimit) {\n players.remove(emp);\n }\n }\n Iterator<String> ot = players.keySet().iterator();\n String next = ot.next();\n\n System.out.println(next);\n\n }", "void unsetScoreAnalysis();", "public boolean isDifficult()\n {\n int count = 0;\n for (int i = 1; i < markers.length; i++) {\n if (Math.abs(markers[i] - markers[i-1]) >= 30){\n count++;\n }\n }\n return (count >= 3);\n }", "public void removeLines() {\n int compLines = 0;\n int cont2 = 0;\n\n for(cont2=20; cont2>0; cont2--) {\n while(completeLines[compLines] == cont2) {\n cont2--; compLines++;\n }\n this.copyLine(cont2, cont2+compLines);\n }\n\n lines += compLines;\n score += 10*(level+1)*compLines;\n level = lines/20;\n if(level>9) level=9;\n\n for(cont2=1; cont2<compLines+1; cont2++) copyLine(0,cont2);\n for(cont2=0; cont2<5; cont2++) completeLines[cont2] = -1;\n }", "public Set<Sportive> filterByAge(int age){\n Iterable<Sportive> sportives = repo.findAll();\n return StreamSupport.stream(sportives.spliterator(), false).filter(sportive -> sportive.getAge()<age).collect(Collectors.toSet());\n }", "private void removePropRevisionMarkers(ArrayList p_tags)\n {\n boolean b_changed = true;\n\n propchange: while (b_changed)\n {\n for (int i = 0, max = p_tags.size(); i < max; i++)\n {\n Object o = p_tags.get(i);\n\n if (o instanceof HtmlObjects.Tag)\n {\n HtmlObjects.Tag tag = (HtmlObjects.Tag) o;\n String original = tag.original;\n\n if (tag.tag.equalsIgnoreCase(\"span\")\n && original.indexOf(\"class=msoChangeProp\") >= 0)\n {\n p_tags.remove(i);\n\n // Note that the closing tag for changeprop\n // may come *after* </seg> and </tu>.\n removeClosingTag(p_tags, tag);\n\n continue propchange;\n }\n }\n }\n\n b_changed = false;\n }\n }", "@Override\n\tpublic void setGrowingAge(int age) {\n\t\t// managed by DragonLifeStageHelper, so this is a no-op\n\t}", "private void loadOldTags() throws IOException {\n File fileAnnotation = new File(filePathAnnDestination);\n if (!fileAnnotation.exists()) {\n fileAnnotation.createNewFile();\n }\n FileReader fr = new FileReader(fileAnnotation);\n\n\n\n\n BufferedReader br = new BufferedReader(fr);\n String line;\n\n while ((line = br.readLine()) != null) {\n String[] annotations = line.split(\"[ \\t]\");\n String word = line.substring(line.lastIndexOf('\\t') + 1);\n String[] words = word.split(\" \");\n\n int start = Integer.parseInt(annotations[2]);\n if (words.length != 0) {\n for (int i = 0; i < words.length; i++) {\n int end = start + words[i].length();\n taggedItems.put(start + \"-\" + end, annotations[1]);\n System.out.println(\"Loading old tags: \" + start + \"-\" + end + \"\\t\" + annotations[1]);\n start = end + 1;\n }\n }\n taggedItems.put(annotations[2] + \"-\" + annotations[3], annotations[1]);\n\n noOfTagsAlready = Integer.parseInt(annotations[0].substring(1));\n if (noOfTagsAlreadyMax < noOfTagsAlready)\n noOfTagsAlreadyMax = noOfTagsAlready;\n }\n br.close();\n fr.close();\n System.out.println(\"Loaded tags\");\n }", "public void decrementPossiblePoints() {\n if (groupScore == 1) {groupScore = 0; return;}\n if (groupScore - (groupScore / 2) >= 0) {\n groupScore -= (groupScore / 2);\n }\n }", "void removeHasInjury(Integer oldHasInjury);", "private void sortPlayerScores(){\n text=\"<html>\";\n for (int i = 1; i <= Options.getNumberOfPlayers(); i++){\n if(Collections.max(playerScores.entrySet(), (entry1, entry2) -> entry1.getValue() - entry2.getValue()).getKey() != null){\n Integer pl = Collections.max(playerScores.entrySet(), (entry1, entry2) -> entry1.getValue() - entry2.getValue()).getKey();\n if(pl != null && playerScores.containsKey(pl)){\n text += \"<p>Player \" + pl + \" Scored : \" + playerScores.get(pl) + \" points </p></br>\";\n playerScores.remove(pl);\n }\n }\n }\n text += \"</html>\";\n }", "void losePoints() {\n if (currentPoints >= POINTSGIVEN) {\n currentPoints -= POINTSGIVEN;\n feedback = \"Your current rating is: \" + currentPoints + \"%\";\n }\n }", "void removeHasInjurySeverity(Integer oldHasInjurySeverity);", "public void removeDeadVampires() {\n\n for (int i = 0; i < Vampiro.getNumVamp(); i++) {\n if (lista[i].getVida() <= 0)\n delVampire(i);\n }\n }", "private void deductGamePoints(List<Integer> prevGamePoints) {\n for (int i = 0; i < numAlive; i++) {\n int playerTrickPoints = trickPoints.get(i);\n if (playerTrickPoints < 0) {\n int prevPoints = prevGamePoints.get(i);\n int newPoints = prevPoints + playerTrickPoints;\n \n if (newPoints < 0) {\n // Cannot have negative points\n gamePoints.set(i, 0);\n } else {\n gamePoints.set(i, newPoints);\n }\n }\n }\n }", "private void removeweak(final List<Level> levels) {\n \n final List<Integer> removeIdx = Lists.newArrayList();\n\n for (int i = 0; i < (levels.size()); i++) {\n final Level currentLevel = levels.get(i);\n final Float strength = currentLevel.getStrength();\n if (strength.intValue() < STRENGTH) {\n removeIdx.add(i);\n }\n }\n\n CollectionUtils.remove(levels, removeIdx);\n }", "public void transformMarksInDamages(String offendername) {\n\n while (marks.contains(offendername)) {\n\n for (Iterator<String> iterator = marks.iterator(); iterator.hasNext(); ) {\n\n String occurence = iterator.next();\n\n if (occurence.equals(offendername)) {\n giveDamage(offendername, 1);\n\n iterator.remove();\n }\n }\n }\n }", "public void highscore()\n {\n FileReader filereader;\n \n PrintWriter writer;\n ArrayList<PersonDate> hsp = new ArrayList<PersonDate>();\n \n\n try{\n if(totalScore>lowestHighscore() || (int)timer3>lowestHighscore())\n {\n DateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yy\");\n Date date = new Date();\n String r = dateFormat.format(date);\n \n \n JOptionPane.showMessageDialog(null,\"New high score!\");\n String name = JOptionPane.showInputDialog(\"Please enter name\");\n while(name == null)\n {\n name = JOptionPane.showInputDialog(\"Please enter name\");\n }\n while(name.length() > 18)\n name = JOptionPane.showInputDialog(null,\"Name too long\\nPlease enter your name\");\n while(name.length()==0)\n name = JOptionPane.showInputDialog(\"Please enter name\");\n //if(name == null)\n //{\n //resetSettings();\n //System.exit(0);\n \n //}\n String[] invalidchar = {\"~\",\"`\",\"!\",\"@\",\"#\",\"$\",\"%\",\"^\",\"&\",\"*\",\"=\",\"+\",\"-\",\"_\",\":\",\";\",\"|\",\"?\",\"<\",\">\",\"/\",\"'\",\"[\",\"]\",\"{\",\"}\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"0\",\".\",\",\"};\n String[] bannedWords ={\"fuck\",\"shit\",\"asshole\",\"bitch\",\"nigger\",\"nigga\",\"cunt\",\"cock\",\"douche\",\"fag\",\"penis\",\"pussy\",\"whore\"};\n for(int i =0; i<invalidchar.length;i++)\n {\n if(name.contains(invalidchar[i]))\n {\n name = JOptionPane.showInputDialog(\"Invalid name, please only use letters\\nPlease enter name\");\n i = -1;\n }\n }\n for(int i =0; i<bannedWords.length;i++)\n {\n \n if(name.replaceAll(\"\\\\s+\",\"\").toLowerCase().contains(bannedWords[i]))\n {\n name = JOptionPane.showInputDialog(\"No potty mouth\\nPlease enter name\");\n i = -1;\n }\n }\n PersonDate p1;\n if(!modeT)\n p1 = new PersonDate(name,totalScore,r);\n else\n p1 = new PersonDate(name,(int)timer3,r);\n filereader = new FileReader(getLevel());\n BufferedReader bufferedreader = new BufferedReader(filereader);\n \n \n \n String line = bufferedreader.readLine();\n \n while(line!=null)\n {\n //hslist.add(Integer.parseInt(line.split(\":\")[1]));\n hsp.add(new PersonDate(line.split(\":\")[0],Integer.parseInt(line.split(\":\")[1]),line.split(\":\")[2]));\n line = bufferedreader.readLine();\n }\n hsp.add(p1);\n \n //sort it\n sort(hsp);\n \n \n //delete last thing\n hsp.remove(hsp.size()-1);\n \n //rewrite doc\n writer = new PrintWriter(new File(getLevel()));\n for(PersonDate p:hsp)\n {\n writer.println(p);\n }\n writer.close();\n \n //displayhs();\n \n }\n }\n catch(IOException e)\n {\n }\n }", "void removeHas_certainty(Object oldHas_certainty);", "public void updateScore() {\n\t\tif (pellet.overlapsWith(avatar)) {\n\t\t\tavatar.addScore(1);\n\t\t\tpellet.removePellet(avatar.getLocation());\n\t\t\tSystem.out.println(\"collected pellet\");\n\t\t}\n\t}", "public void keepBestOne() {\n ArrayList<Score> scores = getScoreFromFile();\n scores.sort(Score::compareTo);\n\n // Rewrite only the first 10 lines to the file.\n try(BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(scoreFile))) {\n for(int i = 0; i < 10 && i < scores.size(); i++)\n bufferedWriter.write(scores.get(i).VALUE + \" \" + scores.get(i).TIME + \"\\n\");\n } catch (IOException e) {\n System.err.println(\"Cannot open the score file : \" + e.getMessage());\n }\n }", "private static boolean testRemoveOldParticles() {\n\t\tparticles = new Particle[3];\n\t\tparticles[0] = new Particle();\n\t\tparticles[1] = new Particle();\n\t\tparticles[2] = new Particle();\n\t\tparticles[0].setAge(7);\n\t\tparticles[1].setAge(7);\n\t\tparticles[2].setAge(3);\n\t\tremoveOldParticles(6);\n\t\t\n\t\tif (particles[0] != null || particles[1] != null || particles[2].getAge() != 3) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false; \n\t}", "public Builder clearAge() {\n \n age_ = 0;\n onChanged();\n return this;\n }", "public Builder clearAge() {\n \n age_ = 0;\n onChanged();\n return this;\n }", "private static void fixPopulation() {\r\n \t//get a copy of the population hash map\r\n \tHashMap<String, ArrayList<Critter>> copy = new HashMap<String, ArrayList<Critter>>(population);\r\n \tIterator<String> populationIterator = copy.keySet().iterator();\r\n \twhile (populationIterator.hasNext()) { \r\n String pos = populationIterator.next();\r\n ArrayList<Critter> critterList = copy.get(pos);\r\n //clear the key if there is no more critters in that space\r\n if(critterList.size() == 0 || critterList == null) {\r\n \tpopulation.remove(pos);\r\n }\r\n \t}\r\n }", "boolean hasAgeRangeView();", "void removeDecisionSightDistance(int i);", "List<User> getUsersWithCorrectedAge(List<User> users);", "@VisibleForTesting\n static Iterable<SSTableReader> filterOldSSTables(List<SSTableReader> sstables, long maxSSTableAge, long now)\n {\n if (maxSSTableAge == 0)\n return sstables;\n final long cutoff = now - maxSSTableAge;\n return filter(sstables, new Predicate<SSTableReader>()\n {\n @Override\n public boolean apply(SSTableReader sstable)\n {\n return sstable.getMaxTimestamp() >= cutoff;\n }\n });\n }", "void deleteUnusedTags();", "public Builder clearAge() {\n \n age_ = 0;\n onChanged();\n return this;\n }", "public void removeDuplicates()\n\t{\n\t\tComparator<Point> comp = new Comparator<Point>() \n\t\t{\n @Override\n public int compare(Point p, Point q) \n {\n \t return p.compareTo(q);\n }\n };\n\t\tquicksorter.quickSort(comp);\n\t\tquicksorter.getSortedPoints(points);\n\t\t\n\t\tArrayList<Point> pts = new ArrayList<Point>();\n\t\tfor(int a = 0; a < points.length; a++) //copy points into temp array\n\t\t{\n\t\t\tif(!pts.contains(points[a]))\n\t\t\t{\n\t\t\t\tpts.add(points[a]);\n\t\t\t}\n\t\t}\n\t\tpointsNoDuplicate = new Point[pts.size()]; //insert into pointsNoDuplicate\n\t\tfor(int i = 0; i < pts.size(); i++)\n\t\t{\n\t\t\tpointsNoDuplicate[i] = pts.get(i);\n\t\t}\n\t}", "public void remove() {\r\n // rather than going through replace(), just reinitialize the StyledText,\r\n // letting the old data structures fall on the floor\r\n fCharBuffer = new CharBuffer();\r\n fStyleBuffer = new StyleBuffer(this, AttributeMap.EMPTY_ATTRIBUTE_MAP);\r\n fParagraphBuffer = new ParagraphBuffer(fCharBuffer);\r\n fTimeStamp += 1;\r\n fDamagedRange[0] = fDamagedRange[1] = 0;\r\n }", "public void filterByMyMostRece() {\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterMy.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterMy.getMoodEvent(i).getDateOfRecord();\n // if it within the range, then add it to the new list\n if (dateOfMood.compareTo(lowerBoundDATE) >= 0 && dateOfMood.compareTo(currentDATE) <= 0) {\n moodListAfterFilter.add(moodListBeforeFilterMy.getMoodEvent(i));\n }\n }\n }", "public static List<String> listOfStudentsWhoseAgeBelow(List<MyStudent> l, int age){\n\t List<String> names= l.stream().filter(e->e.getAge()<age).map(e->e.getFirstName()).collect(Collectors.toList());\n\t return names;\n\t }", "protected void clearUpdateScores() {\n\t\tupdateScore.clear();\n\t}", "public ArrayList updateMonster(Pane gamePane){\r\n\r\n\t\tfor (int c = 0; c < arrayMonster.size(); c++){\r\n\r\n\t\t\tif (arrayMonster.get(c).getY() > Constants.GAMEHEIGHT){\r\n\r\n\t\t\t\tarrayMonster.get(c).remove(gamePane);\r\n\r\n\t\t\t\tarrayMonster.remove(c);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn arrayMonster;\r\n\r\n\t}", "boolean hasAgeRange();", "public void updateAllies(){\r\n List<Ally> allies = world.getAllies();\r\n ArrayList<Ally> deadAllies = new ArrayList<Ally>();\r\n for(Ally ally : allies){\r\n if(ally.getCurrHP() <= 0){\r\n deadAllies.add(ally);\r\n }\r\n }\r\n\r\n allies.removeAll(deadAllies);\r\n world.setNumAllies(allies.size());\r\n //numAllies.set(allies.size());\r\n }", "public static void removeUserAge(Context context) {\n\n context.getSharedPreferences(FILE_NAME, 0)\n .edit()\n .remove(USER_AGE_KEY)\n .apply();\n }", "public void ruleOutPos(){\n for(int i=0;i<scores.length;i++) {\n for(int j=0;j<scores[i].length;j++) {\n scores[i][j][13] = 0;//0=pass, >0 is fail, set to pass initially\n\n //check Ns - bit crude - what to discount regions with high N\n double ns = (double) scores[i][j][14] / (double) pLens[j];\n if (ns >= minPb | ns >= minPm)//\n scores[i][j][13] += 4;\n\n //probe\n if (hasProbe){\n if (j == 1 | j == 4) {\n double perc = (double) scores[i][j][0] / (double) primers[j].length();\n if (perc >= minPb) {\n scores[i][j][12] = 1;//flag for failed % test\n scores[i][j][13] += 2;\n }\n }\n }\n //primer\n else {\n //if more than 2 mismatches in 1-4nt at 3'\n if(scores[i][j][11]>max14nt) {\n scores[i][j][13]+=1;\n }\n //use mLen (combined F and R length) initially to find initial candidates - filter later\n double perc=(double)scores[i][j][0]/(double)mLen;\n double percI=(double)scores[i][j][0]/(double)pLens[j];\n\n if(perc>=minPm | percI>=minPmI) {\n scores[i][j][12]=1;//flag for failed % test\n scores[i][j][13]+=2;\n }\n }\n }\n }//end of finding positions that prime loop\n }", "public void clearLastMarker(){\n lastMarker.remove();\n }", "@Override\n\tpublic ArrayList<Expert> findExpertByAgeGreaterThan(int age) {\n\t\treturn expertRepository.findExpertByAgeGreaterThan(age);\n\t}", "void removeAnnotations() {\n if (currentIndicators.isEmpty()) {\n return;\n }\n // remove annotations from the model\n synchronized (annotationModelLockObject) {\n if (annotationModel instanceof IAnnotationModelExtension) {\n ((IAnnotationModelExtension) annotationModel).replaceAnnotations(\n currentIndicators.toArray(new Annotation[currentIndicators.size()]),\n null);\n } else {\n for (Annotation annotation : currentIndicators) {\n annotationModel.removeAnnotation(annotation);\n }\n }\n currentIndicators = Lists.newArrayList();\n }\n }", "private void removeDestroyedObjects ()\n {\n Collection<Asteroid> newAsteroids = new ArrayList<>(this.game.getAsteroids().size() * 2); // Avoid reallocation and assume every asteroid spawns successors.\n this.game.getAsteroids().forEach(asteroid -> {\n if (asteroid.isDestroyed()) {\n this.increaseScore();\n newAsteroids.addAll(asteroid.getSuccessors());\n }\n });\n this.game.getAsteroids().addAll(newAsteroids);\n // Remove all asteroids that are destroyed.\n this.game.getAsteroids().removeIf(GameObject::isDestroyed);\n // Remove any bullets that are destroyed.\n this.game.getBullets().removeIf(GameObject::isDestroyed);\n }", "Builder addTypicalAgeRange(Text value);", "private static void cleanAnis() {\n\t\t// get an iterator\n\t\tIterator<?> i = anisLookup.entrySet().iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tMap.Entry<?, ?> entry = (Map.Entry<?, ?>)i.next();\n\t\t\tAni existingAni = (Ani) entry.getValue(); \n\t\t\tif (existingAni.isEnded()) {\n\t\t\t\ti.remove();\n\t\t\t}\n\t\t}\t\n\t}", "private void removeExpired() {\n Map<K,CacheableObject> removeMap = new HashMap<K,CacheableObject>(valueMap.size()/2);\n List<CacheListener<K>> tempListeners = new ArrayList<CacheListener<K>>();\n\n // Retrieve a list of everything that's to be removed\n synchronized(theLock) {\n for (Map.Entry<K,CacheableObject> entry : valueMap.entrySet()) {\n if (isExpired(entry.getValue())) {\n removeMap.put(entry.getKey(), entry.getValue());\n }\n }\n tempListeners.addAll(listeners);\n }\n\n // Remove the entries one-at-a-time, notifying the listener[s] in the process\n for (Map.Entry<K,CacheableObject> entry : removeMap.entrySet()) {\n synchronized(theLock) {\n currentCacheSize -= entry.getValue().containmentCount;\n valueMap.remove(entry.getKey());\n }\n Thread.yield();\n\n for (CacheListener<K> listener : tempListeners) {\n listener.expiredElement(entry.getKey());\n }\n }\n }", "void removeHasLongitude(Object oldHasLongitude);", "public void removeCharacterStyles() {\r\n fStyleBuffer = new StyleBuffer(this, AttributeMap.EMPTY_ATTRIBUTE_MAP);\r\n fTimeStamp += 1;\r\n fDamagedRange[0] = 0;\r\n fDamagedRange[1] = length();\r\n }", "private void removeExpiredContacts() {\n int numContactsExpired = 0;\n Date dateToday = new Date();\n for (Iterator<User> it = contacts.iterator(); it.hasNext();) {\n User contact = it.next();\n Date contactExpiryDate = contact.getContactExpiryDate();\n if (dateToday.after(contactExpiryDate) || DateUtils.isToday(contactExpiryDate.getTime())) {\n boolean result = SharedPrefsUtils.removeTravelContact(context, contact);\n if (result) {\n it.remove();\n numContactsExpired++;\n }\n }\n }\n if (numContactsExpired > 0) {\n Toast.makeText(context, \"Removed \" + numContactsExpired + \" expired contacts\", Toast.LENGTH_LONG).show();\n }\n }", "static int[] climbingLeaderboard(int[] scores, int[] alice) {\n int[] alicePos = new int[alice.length];\n System.out.println(\"Alice length\" + alice.length);\n\n scores = of(scores).sorted().distinct().toArray();\n\n int[] newScores = new int[scores.length];\n\n for (int i = 0; i < newScores.length; i++) {\n if (i < scores.length) {\n newScores[i] = scores[i];\n\n System.out.println(\"res \" + newScores[i]);\n }\n }\n\n List<Integer> newList = Arrays.stream(newScores).boxed().collect(Collectors.toList());\n System.out.println(newList.size());\n\n\n for (int i = 0; i < alice.length; i ++) {\n System.out.println(\"Alices is \"+ alice[i]);\n newList.add(alice[i]);\n newList = newList.stream().distinct().sorted().collect(Collectors.toList());\n int pos = newList.indexOf(alice[i]);\n alicePos [i]= newList.size() - pos;\n newList.remove(pos);\n }\n\n return alicePos;\n }", "@Override\r\n\t\t\t\t\tprotected boolean removeEldestEntry(Map.Entry e)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\treturn size()>5;\r\n\t\t\t\t\t}", "private void Rating(int minAge)\r\n {\r\n this.minAge = minAge;\r\n }", "public ArrayList<String> deadPersonsTrueGuess(Guess currGuess) {\n ArrayList<String> deadPerson = new ArrayList<String>();\n for (Person person : config.personList) {\n for (HashMap.Entry<String, String> entry : person.getPersonAttValSet().entrySet()) {\n if (entry.getKey().equals(currGuess.getAttribute()) && !entry.getValue().equals(currGuess.getValue())) {\n deadPerson.add(person.getName());\n }\n }\n }\n\n return deadPerson;\n }", "public void removeSkills()\r\n\t{\r\n\t\tremove(skillOne);\r\n\t\tremove(skillTwo);\r\n\t\tremove(skillThree);\r\n\t\tremove(skillFour);\r\n\t\tremove(skillFive);\r\n\t\t\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "synchronized public List<StickyRecord> removeExpired()\n {\n List<StickyRecord> removed = new ArrayList();\n long now = System.currentTimeMillis();\n Iterator<StickyRecord> i = _records.values().iterator();\n while (i.hasNext()) {\n StickyRecord record = i.next();\n if (!record.isValidAt(now)) {\n i.remove();\n removed.add(record);\n }\n }\n return removed;\n }", "private int[] sauvegarde_scores() {\r\n\t\tint n = moteur_joueur.getJoueurs().length;\r\n\t\tint[] scores_precedents = new int[n];\r\n\t\t\t\t\r\n\t\tfor(int i = 0 ; i < n ; i++) {\r\n\t\t\tscores_precedents[i] = (int)moteur_joueur.getJoueurs()[i].getScore();\r\n\t\t}\r\n\t\t\r\n\t\treturn scores_precedents;\r\n\t}", "public void removeSkills()\r\n\t{\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5491, 1), false);\r\n\t\t// Cancel Gatekeeper Transformation\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(8248, 1), false);\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5656, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5657, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5658, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5659, 1), false, false);//Update by rocknow\r\n\r\n\t\tgetPlayer().setTransformAllowedSkills(EMPTY_ARRAY);\r\n\t}", "public void prune(double belowThreshold) {\n \n for(T first : getFirstDimension()) {\n \n for(T second : getMatches(first)) {\n \n if(get(first, second)<belowThreshold) {\n set(first, second, 0.0);\n }\n \n }\n \n }\n \n }", "public static Set<AT> getGoldOnlyAts() {\n if (removeLatAts) {\n return QSets.union(getPredAts(), getLatAts());\n } else {\n log.warn(\"CAUTION: The latent variable annotations have NOT been removed.\");\n return getPredAts();\n }\n }", "public void onAnnotationsPreRemove(Map<Annot, Integer> annots) {\n/* 370 */ if (annots == null || annots.size() == 0 || !this.mPdfViewCtrl.isUndoRedoEnabled()) {\n/* */ return;\n/* */ }\n/* */ }", "@External(readonly = true)\n\tpublic Map<String, String> get_yesterdays_games_excess(){\n\t\t\n\t\treturn this.get_games_excess(BigInteger.ONE.negate());\n\t}", "public void removeExpiredAuctions(){\r\n ArrayList <String> expiredAuction = new ArrayList <String>(super.size());\r\n for(String expiredKey: keySet()){\r\n if(getAuction(expiredKey).getTimeRemaining() == 0){\r\n expiredAuction.add(expiredKey);\r\n }\r\n } \r\n for(String expiredKey: expiredAuction){\r\n super.remove(expiredKey);\r\n }\r\n }", "public void filterByFoMostRece(){\n // for each mood event in the list\n for (int i = 0; i < moodListBeforeFilterFo.getCount(); i++ ){\n // get the mood's date\n dateOfMood = moodListBeforeFilterFo.getMoodEvent(i).getDateOfRecord();\n // if it within the range, then add it to the new list\n if (dateOfMood.compareTo(lowerBoundDATE) >= 0 && dateOfMood.compareTo(currentDATE) <= 0) {\n moodListAfterFilter.add(moodListBeforeFilterFo.getMoodEvent(i));\n }\n }\n }", "public void removeAllRecordingYear() {\r\n\t\tBase.removeAll(this.model, this.getResource(), RECORDINGYEAR);\r\n\t}", "private void removeOldestPoint() {\n PathPoint p = points.get(points.size() - length - 1);\n // if points has 5 points (0-4), length=3, then remove points(5-3-1)=points(1) leaving 2-4 which is correct\n float t = p.t - firstTimestamp;\n st -= t;\n sx -= p.x;\n sy -= p.y;\n stt -= t * t;\n sxt -= p.x * t;\n syt -= p.y * t;\n }", "public void removeOldRecords();", "private void purgeObsoleteExposureIDs( long now) {\n\t\tassert( this.getAppType() == Beacon.AppType.APPLE_GOOGLE_CONTACT_TRACING);\n\t\tlong beforeTS = now - getDurationKeepExposureIDs();\n\t\tif ( !this.idStore.purge( new Date( beforeTS))) {\n\t\t\tlogger.warning( \"failure to purge old exposures\");\n\t\t} else {\n\t\t\tsetPurgedObsoleteExposureIDsTS( now);\n\t\t}\n\t}", "@Override\n public void addDamage(Player shooter, int damage) {\n if(!this.equals(shooter) && damage > 0) {\n int num=0;\n boolean isRage = false;\n Kill lastKill = null;\n List<PlayerColor> marksToBeRemoved = marks.stream().filter(m -> m == shooter.getColor()).collect(Collectors.toList());\n damage += marksToBeRemoved.size();\n marks.removeAll(marksToBeRemoved);\n\n if (this.damage.size() < 11) { //11\n for (int i = 0; i < damage; i++)\n this.damage.add(shooter.getColor());\n num = this.damage.size();\n if (num > 10) { //10\n this.deaths++;\n this.isDead = true;\n if (num > 11) {\n isRage = true;\n shooter.addThisTurnMarks(this, 1); //the shooter receive a mark in case of rage\n }\n if (game != null)\n game.addThisTurnKill(shooter, this, isRage);\n\n } else if (num > 5)\n this.adrenaline = AdrenalineLevel.SHOOTLEVEL;\n else if (num > 2)\n this.adrenaline = AdrenalineLevel.GRABLEVEL;\n } else if (this.damage.size() == 11 && damage > 0) { //11\n lastKill = game.getLastKill(this);\n lastKill.setRage(true);\n shooter.addThisTurnMarks(this, 1); //the shooter receive a mark in case of rage\n if(game != null)\n game.notifyRage(lastKill);\n }\n if (game != null)\n game.notifyDamage(this, shooter, damage, marksToBeRemoved.size());\n }\n }", "public void resetHitMarker() {}", "public void supprimerToutesLesLignes() {\n\t\tlisteVente.clear();\r\n\t\tfireTableDataChanged();\r\n\t}", "@Override\n\tpublic ArrayList<Expert> findExpertByAgeLessThan(int age) {\n\t\treturn expertRepository.findExpertByAgeLessThan(age);\n\t}", "public void resetHints() {//use this whenever there's a new graph, or whenever a new game is started!\r\n CalculateScore.hintOneUsed = false;\r\n CalculateScore.hintTwoUsed = false;\r\n CalculateScore.hintThreeUsed = false;\r\n CalculateScore.hintFourUsed = false;\r\n CalculateScore.hintFiveUsed = false;\r\n CalculateScore.hintSixUsed = false;\r\n CalculateScore.hintSevenUsed = false;\r\n CalculateScore.hintEightUsed = false;\r\n CalculateScore.hintNineUsed = false;\r\n hint4 = false;\r\n hint9 = false;\r\n }", "private static List<String> voterList(Map<String, Integer> people) {\n\t\tList<String> voter = new Vector<>();\n\t\t// If the person is eligible his ID is added to the list.\n\t\tfor (Map.Entry<String, Integer> m : people.entrySet()) {\n\t\t\tif (m.getValue() >= 18) {\n\t\t\t\tvoter.add(m.getKey());\n\t\t\t}\n\t\t}\n\n\t\treturn voter;\n\t}", "static public Set<Employee> removeWithWageAbove(Set<Employee> company, Float maximumWage){\n\t\tfor(Iterator<Employee> iterator = company.iterator(); iterator.hasNext(); ){\n\t\t\tEmployee currentEmpl = iterator.next();\n\t\t\tif(currentEmpl.getSalary() > maximumWage) {\n\t\t\t\titerator.remove();\n\t\t\t}\n\t\t}\n\t\treturn company;\n\t}", "private static void removeCurrentColors(){\n\t\tIterator<ArrayList<Peg>> itr = possibleCombinations.iterator();\n\t\twhile(itr.hasNext()){\n\t\t\tArrayList <Peg> victim=itr.next();\n\t\t\tfor(int i=0; i<aiGuess.size(); i++){\n\t\t\t\t\n\t\t\t\tif(victim.contains(aiGuess.get(i))){\n\t\t\t\t\titr.remove();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.6140855", "0.59009564", "0.5615582", "0.54366904", "0.54005814", "0.5265901", "0.52614266", "0.51884216", "0.51707906", "0.5105017", "0.5008605", "0.49726126", "0.49479598", "0.4928214", "0.4916015", "0.4909575", "0.48851633", "0.48815328", "0.48802978", "0.48769453", "0.48733026", "0.48713094", "0.4870509", "0.48690012", "0.48550442", "0.4840603", "0.48383534", "0.4836042", "0.48239556", "0.4816581", "0.4800552", "0.47625518", "0.47603792", "0.4754792", "0.4751912", "0.47508255", "0.47459507", "0.47184348", "0.4714259", "0.47111994", "0.47058848", "0.4698248", "0.46907064", "0.46791953", "0.46767125", "0.46666378", "0.46666378", "0.46655", "0.46587142", "0.46500093", "0.46279868", "0.46263057", "0.46242103", "0.46080524", "0.46076605", "0.46021137", "0.45989937", "0.45824355", "0.45780358", "0.4577961", "0.45692003", "0.4555857", "0.4550863", "0.45397043", "0.45368108", "0.4536027", "0.45176032", "0.45164582", "0.45084605", "0.4507732", "0.45054558", "0.44966474", "0.4493563", "0.44834682", "0.44765034", "0.44764686", "0.4473083", "0.4472616", "0.4466119", "0.44624424", "0.44595054", "0.44567466", "0.4453986", "0.44523007", "0.44498375", "0.44460267", "0.4445185", "0.44293603", "0.44278023", "0.44261366", "0.44239476", "0.44168937", "0.44148317", "0.4406344", "0.44030386", "0.44013658", "0.43994457", "0.43938965", "0.43891162", "0.43872648" ]
0.6911113
0
Sets a player's score to the given value and updates the score markers.
private void setPlayerScore(Player player, int newScore) { player.score = Math.max(newScore, 0); for (ScoreMarker scoreMarker : playerScoreMarkers) { if (scoreMarker.getOwner() == player) { scoreMarker.value = String.valueOf(player.score); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setScoreValue(int scoreValue);", "public static void setPlayerScore(int score)\r\n\t{\r\n\t\tGame.playerScore = score;\r\n\t}", "public void setScore(float value) {\n this.score = value;\n }", "public void setNewScore(String player, int score) {\n\t\t\n\t}", "public void setScore(java.lang.Integer value);", "public void setObjectiveScore(String name, Player player, int value) {\n scoreboard.getObjective(name).getScore(player.getName()).setScore(value);\n }", "public void setScore(){\n\t\t//get player's score and change it to the string\n\t\tthis.scoreLabel.setSize(scoreLabel.getPreferredSize().width, \n\t\t\t\tscoreLabel.getPreferredSize().height);\n\t\tthis.scoreLabel.setText(String.valueOf(this.player.getScore()));\n\t}", "public void updateScore(int playerScore){\n\t\tscore += playerScore;\n\t\tscoreTotalLabel.setText(\"\" + score);\n\t}", "public void setScore(int score)\n\t{\n\t\tthis.score += score;\n\t}", "public void setScore(int score) { this.score = score; }", "public void setScore(int score)\n {\n this.score = score;\n }", "public void setScore(int score) {\r\n this.score = score;\r\n }", "public void setScore(int score) {\r\n this.score = score;\r\n }", "public synchronized void setScore(Integer score) {\n this.score += score;\n }", "public void setScore(String score) {\n this.score = score;\n setChanged();\n notifyObservers();\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void setScore(Float score) {\n this.score = score;\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void setScore(int score) {\n this.score = score;\n }", "void setScore(long score);", "public void setScore(float score) {\n this.score = score;\n }", "public void setScore(double score) {\r\n this.score = score;\r\n }", "public void setScore(int score) {this.score = score;}", "public void setScore(int score){\n\t\tthis.score = score;\n\t}", "void setScore(int score) {\n lblScore.setText(String.valueOf(score));\n }", "public void setScore(Integer score) {\r\n this.score = score;\r\n }", "protected void setScore(int s)\r\n\t{\r\n\t\tGame.score = s;\r\n\t}", "public void setScore(int score)\n\t{\n\t\tthis.score=score;\n\t}", "public void setScore(Integer score) {\n this.score = score;\n }", "public void updateScore(int score){ bot.updateScore(score); }", "public void setScore(int paScore) {\n this.score = paScore;\n }", "public void setScore(int score) {\n\t\tthis.score = score;\n\t}", "public void setScore (java.lang.Integer score) {\r\n\t\tthis.score = score;\r\n\t}", "public Scores(String player, int score) {\r\n this.player = player;\r\n this.score = score;\r\n }", "private void setScore(String score) {\r\n this.score = score;\r\n }", "public void updatescore() {\n scorelabel.setText(\"\" + score + \" points\");\n if (100 - score <= 10) win();\n }", "public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}", "public void setScore(int score) {\r\n\t\tif(score >=0) {\r\n\t\t\tthis.score = score;\r\n\t\t}\r\n\t\t\r\n\t}", "public void setScore (int newScore)\n {\n this.score = newScore;\n }", "public void setScore(int newScore){\n\t\tthis.score = newScore;\n\t}", "public void setScore(Double score) {\n this.score = score;\n }", "private void updateScore() {\n\t\tscoreString.updateString(Integer.toString(score));\n\t}", "public void updateScore(){\n scoreChange++;\n if(scoreChange % 2 == 0){\n if(score_val < 999999999)\n score_val += 1;\n if(score_val > 999999999)\n score_val = 999999999;\n score.setText(\"Score:\" + String.format(\"%09d\", score_val));\n if(scoreChange == 10000)\n scoreChange = 0;\n }\n }", "@Override\n public void setScore(int score) throws IllegalStateException {\n objective.checkValid();\n this.score = score;\n objective.getScoreboard()\n .broadcast(new ScoreboardScoreMessage(entry, objective.getName(), score));\n }", "public void setScore(Score score) {\n scoreProperty.set(score.packed());\n }", "public void increaseScore(final int score) {\n setChanged();\n notifyObservers(new Pair<>(\"increaseScore\", score));\n }", "public void changeScore(String score) {\n typeScore(score);\n saveChanges();\n }", "public void raiseScoreOfEveryPlayer(int value) {\n\t\tfor(Player p:players) {\n\t\t\tp.raiseScore(value);\n\t\t}\n\t}", "void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }", "public void setScore (java.lang.Float score) {\n\t\tthis.score = score;\n\t}", "public void notifyScoreChange(int score) {\n scoreLabel.setText(String.valueOf(score));\n }", "public static void incrementScore() {\n\t\tscore++;\n\t}", "public Scores(int score) {\r\n this.score = score;\r\n }", "public void setVisibleScore(Group playerScore, int points) {\n playerScore.getChildren().clear();\n playerScore.getChildren().add(new NumberGroup(points));\n }", "@Override\n public void passScore(int score) {\n this.score = score;\n scoreFragment.setData(score);\n }", "public static void addScore(int _value){\n scoreCount += _value;\n scoreHUD.setText(String.format(Locale.getDefault(),\"%06d\", scoreCount));\n }", "public void incrementScore(int val) {\n score += val;\n }", "public Builder setScore(long value) {\n \n score_ = value;\n onChanged();\n return this;\n }", "public Builder setScore(long value) {\n \n score_ = value;\n onChanged();\n return this;\n }", "protected void setOnePlayerHumanScore(int score){\n this.humanWinsCPU_TextField.setText(Integer.toString(score));\n }", "public PlayerScore (String name, int score)\n {\n playerName = name;\n playerScore = score;\n }", "public void addScore(int score) {\n currentScore += score;\n }", "public void setScore(String score) {\n\t\tthis.score = score;\n\t}", "public void setCurrentScore(int currentScore) {\n this.currentScore = currentScore;\n }", "public void setScore(java.lang.String value) {\n\t\tsetValue(org.jooq.examples.cubrid.demodb.tables.Record.RECORD.SCORE, value);\n\t}", "void updateScore () {\n scoreOutput.setText(Integer.toString(score));\n }", "public void addToScore(int score)\n {\n this.score += score;\n }", "private void updateScore(int point) {\n SharedPreferences preferences = getSharedPreferences(SHARED_PREFERENCES, MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putInt(SCORE_KEY, mScore);\n\n }", "public void setScore(Short score) {\n this.score = score;\n }", "public static void score() {\n\t\tSystem.out.println(\"SCORE: \");\n\t\tSystem.out.println(player1 + \": \" + score1);\n\t\tSystem.out.println(player2 + \": \" + score2);\n\t}", "public void setScore(int s) {\n if (s > getHighScore()) {\n setHighScore(s);\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"yyyy/MM/dd HH:mm:ss\");\n LocalDateTime now = LocalDateTime.now();\n String timeNow = dtf.format(now);\n setHighScoreTime(timeNow);\n }\n setStat(s, score);\n }", "public void displayForPlayerA(int score) {\n scoreViewPlayerA.setText(String.valueOf(score));\n }", "public void updateScore()\n {\n nextPipe = pipes.get(score);\n if(CHARACTER_X > nextPipe.getPipeCapX() + 35)\n {\n score++;\n }\n if(score > highScore)\n {\n highScore = score;\n }\n }", "public final void setScore(java.lang.Double score)\r\n\t{\r\n\t\tsetScore(getContext(), score);\r\n\t}", "private void updateScore(int changeScore) {\n score += changeScore;\n scoreText = \"Score: \" + score + \"\\t\\tHigh Score: \" + highScore;\n scoreView.setText(scoreText);\n }", "public void SZTToEveryOtherPlayer(int value) {\n\t\tfor(Player p:players) {\n\t\t\tif(p!=current) {\n\t\t\t\tp.raiseScore(value);\n\t\t\t}\n\t\t}\n\t}", "public void addScore(int s) {\n setScore(getScore() + s);\n }", "@Override\n\tpublic int updateScore(int score) {\n\t\t\n\t\t// decrease the score by this amount:\n\t\tscore -= 50;\n\t\t\n\t\treturn score;\n\t}", "private void updateScore(int point){\n mScoreView.setText(\"\" + mScore);\n }", "public LocationScore(int score) {\n this.score = score;\n }", "public void updateScores() {\n\t\tscoreText.setText(\"Score: \" + ultraland.getScore());\n\t}", "public void updateScore(){\r\n if (this.isArtist || winners.contains(this)) {\r\n this.score += pointsGainedLastRound;\r\n }\r\n pointsGainedLastRound = 0;\r\n placeLastRound = 0;\r\n }", "@Override\n public void updateScore(int winner)\n {\n if (winner == 0)\n {\n playerOneScore++;\n }\n else\n {\n playerTwoScore++;\n }\n }", "@Override\n\tpublic void setPlayerOneScore(int playerOneScore) {\n\t\tsuper.setPlayerOneScore(playerOneScore);\n\t}", "public void updateScoreboard() {\r\n \tif(parentActivity instanceof GameActivity) {\r\n \t\t((TextView)(((GameActivity)parentActivity).getScoreboard())).setText(\"\"+score);\r\n \t}\r\n }", "@Override\r\n public void givePlayerPoints(int player, int plValuePosition, int points) {\r\n // Incrememnt player values by the points passed in\r\n this.players.get(player).\r\n changePlayerValueNumeric(plValuePosition, points);\r\n }", "public static void setScoreBoard(Player p) {\n\t\n}", "public void updatePlayerScoreForUsername(String username) {\n for (Player P : fliegeScore.getPlayers()) {\n if (P.getPlayerName().compareTo(username) == 0) {\n P.setScore(P.getScore() + 1);\n }\n }\n }", "public void setScore(int hole, int score) {\n\t\tif (hole < 1 || hole > 18) return;\n\t\tscores[hole - 1] = score;\n\t}", "public void setScore(int pointsToAdd) {\n\n\t\t//Add the additional points to the existing score\n\t\tthis.score = this.score + pointsToAdd;\n\t}", "private void increaseScore() {\n this.game.getPlayers().values().forEach(ship -> {\n ship.increaseScore();\n if (ship.getScore() % 5 == 0) {\n this.asteroidsLimit++;\n }\n });\n }", "public void addScore(int score);", "public synchronized void updateScore(PlayerHandler playerHandler) {\n\n int points = teams.length * Server.TEAM_SCORE / numMaxPlayers;\n playerHandler.increaseCorrectAnswers();\n\n if(points < 3){\n points = 3;\n }\n\n if (playerHandler.getTeam() == teams[0]) {\n score -= points;\n System.out.println(score);\n return;\n }\n score += points;\n }", "public boolean setScoreTeamOne(int score)\r\n\t{\r\n\t\tif (!editableMatch)\r\n\t\t\treturn false;\r\n\t\tscore1 = score;\r\n\t\treturn true;\r\n\t}", "public void updatePlayer(Player player) {\n Duration playDuration = Duration.ofMinutes(player.getStatistic(Statistic.PLAY_ONE_MINUTE) / 20 / 60);\n int hoursPlayed = Math.toIntExact(playDuration.toHours());\n this.objective.getScore(player.getName()).setScore(hoursPlayed);\n }", "public void setGameScore(Integer gameScore) {\n this.gameScore = gameScore;\n }", "public void incrementScore(final int value, Firebase reference){\n reference.child(\"score\").runTransaction(new Transaction.Handler() {\n @Override\n public Transaction.Result doTransaction(MutableData mutableData) {\n if (mutableData.getValue(Integer.class) == null) {\n mutableData.setValue(0);\n } else {\n mutableData.setValue(mutableData.getValue(Integer.class) + value);\n }\n return Transaction.success(mutableData);\n }\n\n @Override\n public void onComplete(FirebaseError firebaseError, boolean b, DataSnapshot dataSnapshot) {\n Log.i(TAG, \"Successfully incremented score for player \" + LaserTagApplication.getUid());\n Team.getInstance().incrementScore(value);\n }\n });\n }", "public void setScores(ArrayList<Integer> scores) { this.scores = scores; }" ]
[ "0.7933543", "0.78653073", "0.7777413", "0.7695592", "0.75415754", "0.7515737", "0.75019556", "0.74818546", "0.742959", "0.7405972", "0.7392362", "0.7369897", "0.7369897", "0.7355839", "0.7345291", "0.7336746", "0.73284423", "0.7318578", "0.7318578", "0.7318578", "0.7318578", "0.7302134", "0.72933203", "0.7276881", "0.7249098", "0.72380054", "0.72363067", "0.72125936", "0.72111076", "0.719774", "0.71780676", "0.7159494", "0.7143424", "0.71209484", "0.71060693", "0.7068442", "0.70650595", "0.70599", "0.7053056", "0.7029384", "0.70174134", "0.698688", "0.6986563", "0.69829667", "0.69558567", "0.6954651", "0.6951956", "0.6939758", "0.6926547", "0.6903021", "0.6890549", "0.6859529", "0.68444514", "0.6831535", "0.67911935", "0.6789738", "0.67537093", "0.6740713", "0.6729361", "0.6722747", "0.6722747", "0.6693914", "0.6688686", "0.6675697", "0.66658497", "0.6661707", "0.66582304", "0.6646404", "0.6645462", "0.663856", "0.6617124", "0.6598208", "0.65868866", "0.65800023", "0.65593696", "0.65508705", "0.6549714", "0.64789706", "0.647706", "0.64676696", "0.646126", "0.64453137", "0.6444241", "0.64301085", "0.64017487", "0.63889694", "0.63679194", "0.63661665", "0.63639635", "0.63585216", "0.6354598", "0.6333118", "0.6328106", "0.6317673", "0.62993103", "0.6297103", "0.62958956", "0.62897944", "0.6288485", "0.6282181" ]
0.8102925
0
State of the game
public boolean isRoundOver() { int numberOfLiving = 0; boolean nobodyHasAmmo = true; for (int i = 0; i < players.length; i++) { // The round is over if someone is dead if (tanks[i].isAlive()) { numberOfLiving++; } nobodyHasAmmo &= tanks[i].getAmmo() == 0; } // Return true if one or none players are living, or stalemate return numberOfLiving <= 1 || (nobodyHasAmmo && bullets.isEmpty()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GameState(){\n this.gameResults = \"\";\n initVars();\n this.theme = DEFAULT_THEME;\n this.board = new Board(DEFAULT_BOARD);\n createSetOfPlayers(DEFAULT_PLAYERS, DEFAULT_AUTOPLAYER, DEFAULT_AUTOMODE);\n }", "public void displayCurrentState(State game);", "private void updateState() {\n switch (game.getGameState()) {\n case GAME:\n gamePlay();\n break;\n case ONE:\n lostTurnByOne();\n break;\n case READY:\n readyToPlay();\n break;\n case START:\n startGame();\n break;\n case TURN:\n startTurn();\n break;\n case FINISH:\n finishGame();\n break;\n }\n }", "public GameState GetState(){\n\t\treturn this.state;\n\t}", "public GameState() {}", "public GameState getState(){\n\t\tGameState State=new GameState(this.points, this.currentBoard.getState());\n\t\t\n\t\treturn State;\n\t}", "private void gameState(){\r\n\t\tadd(gamePanel,BorderLayout.CENTER);\r\n\t\t\r\n\t\tif((cost + current) <= loss){\r\n\t\t\tSystem.out.println(\"The Game is Up.\");\r\n\t\t\tgamePanel.add(gameOver);\r\n\t\t\tsearchPanel.setVisible(false);\r\n\t\t\tgamePanel.setVisible(true);\r\n\t\t}else if((cost + current) >= profit){\r\n\t\t\tSystem.out.println(\"The Game is On!\");\r\n\t\t\tgamePanel.add(gameOn);\r\n\t\t\tsearchPanel.setVisible(false);\r\n\t\t\tgamePanel.setVisible(true);\r\n\t\t}\r\n\r\n\t}", "public GameState getState() {\n\t\treturn state;\n\t}", "public GameState getGameState();", "interface GameState {\n String WAITING_FOR_SECOND_PLAYER = \"WAITING_FOR_SECOND_PLAYER\";\n String TURN_HARE = \"TURN_HARE\";\n String TURN_HOUND = \"TURN_HOUND\";\n String WIN_HARE_BY_ESCAPE = \"WIN_HARE_BY_ESCAPE\";\n String WIN_HARE_BY_STALLING = \"WIN_HARE_BY_STALLING\";\n String WIN_HOUND = \"WIN_HOUND\";\n }", "private GameStatePresets()\n {\n\n }", "protected void updateGameState() {\n }", "public int getStateOfMovement(){ return stateOfMovement; }", "public GameState getGameState(){\n return this.gameState;\n }", "public GameState() {\n positionToPieceMap = new HashMap<Position, Piece>();\n }", "void updateGameState(GameState gameState);", "public void getState();", "GameState getGameState() {\n return gameState;\n }", "public GameObjectState getState() {\r\n\t\treturn state;\r\n\t}", "void gameStarted();", "void gameStarted();", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "public GameState getGameState() {\n return this.state;\n }", "public Player getState() {\n\t\treturn state;\n\t}", "public GameMode(int s)\n {\n bird3.y+=15;\n bird3.goUp = true;\n \n state = s;\n sprite = 0; \n }", "public int gameState() {\n \tboolean check = isCheck(turn);\n \t\n \t//change this code to be some sort of checkmate detection\n \tif(check) {\n \t\t//we need to check whether there is a legal move that puts the king out of check\n \t\t//we need to loop through all pieces of the same color as the turn and make all legal moves\n \t\t//then after each move, check whether the king is still in check\n \t\t\n \t\t//first generate a list of all pieces for the turn color\n \t\tArrayList<Piece> pieces = getPieces(turn);\n \t\t\n \t\tboolean freedom;\n \t\t\n \t\t//now for each piece, check whether moving that piece can get the king out of check\n \t\tfor(int i = 0; i < pieces.size(); i++) {\n \t\t\tfreedom = simulate(pieces.get(i));\n \t\t\tif(freedom) {\n \t \t\tupdateCheckMove(false);\n \t \t\tSystem.out.println(\"Check on \" + turn + \" King!\");\n \t\t\t\treturn 2; //if the king can move, then the game isn't over yet\n \t\t\t}\n \t\t}\n \t\t\n \t\t//the game is over if we reach this far, so we can assume checkmate\n \t\t//resignation logic will probably be specific to Display class\n \t\t\n \t\tupdateCheckMove(true);\n \t\t\n \t\tif(turn == PieceColor.White) return -1; //black win if white king in check and can't move\n \t\tif(turn == PieceColor.Black) return 1;\n \t}\n \t\n \t//if all of these fail, the game isn't over yet\n \treturn 2;\n }", "@Override\n public GameState getGameState() {\n return this.gameState;\n }", "public void winGame() {\r\n if (data.gameState == 3) \r\n data.winner = 1;\r\n else if (data.gameState == 4) \r\n data.winner = 2;\r\n data.victoryFlag = true;\r\n data.gameState = 5;\r\n }", "public byte getState(){\n\t\t/*\n\t\tOFFLINE((byte)0),\n ONLINE((byte)1),\n SAVING((byte)2);\n\t\t */\n\t\t//getWorld().getcWorld().update(this);\n\t\treturn state;\n\t}", "public void updateState();", "public interface GameControllerState {\n}", "public void updateState(boolean gameDone){\r\n if (animation == 0) {\r\n if (this.state==this.color){\r\n if (this.travel!=0)\r\n this.state=this.color+256;\r\n else\r\n if (idle_counter == 3)\r\n this.state=this.color+264;\r\n }\r\n else if (this.state>=16) {\r\n if (this.state<=31) {\r\n if (this.state+8>31 && !gameDone)\r\n this.state=this.color;\r\n else {\r\n this.state += 8;\r\n }\r\n }\r\n else if (this.state<=63){\r\n if (this.state+8<=63)\r\n this.state+=8;\r\n }\r\n else if (this.state <= 103){\r\n if (this.state + 8 > 103)\r\n this.state=this.color;\r\n else\r\n this.state += 8;\r\n }\r\n else if (this.state<=159){\r\n if (this.state+8>159)\r\n this.state=this.color;\r\n else\r\n this.state += 8;\r\n }\r\n else if (this.state<=255){\r\n if (this.state + 8 > 255) \r\n this.state = this.color;\r\n else\r\n this.state += 8;\r\n if (this.state>=184 && this.state<=199)\r\n this.positionY-=7;\r\n else if (this.state>=208 && this.state<=223)\r\n this.positionY+=7;\r\n }\r\n else if (this.state<264)\r\n this.state=this.color;\r\n else if (idle_counter==3)\r\n this.state=this.color; \r\n }\r\n }\r\n if (idle_counter==3)\r\n idle_counter=0;\r\n if (animation >= 4 && !gameDone) {\r\n animation = 0;\r\n idle_counter++;\r\n }\r\n //creates a slowmo effect once the game is done\r\n else if (animation==18 && gameDone){\r\n animation = 0;\r\n idle_counter++;\r\n }\r\n else \r\n animation++;\r\n \r\n }", "public void setGameState(GameState gs){\n this.gameState = gs;\n }", "public int getState() {return state;}", "public int getState() {return state;}", "public GameState getGameState() {\n return this.gameState;\n }", "public void beginGame() {\r\n data.gameState = 3;\r\n data.gameStartFlag = true;\r\n setChanged();\r\n notifyObservers(data);\r\n data.gameStartFlag = false; //Set the gameStart flag to false so the relevant update lines aren't ever run a second time\r\n }", "LabState state();", "@Override\n public void gameStateChanged()\n {\n update();\n \n // check for \"game over\" or \"game won\"\n if ( game.getState() == GameState.LOST )\n {\n JOptionPane.showMessageDialog(\n this, \n game.getLoseMessage(), \"Game over!\",\n JOptionPane.INFORMATION_MESSAGE);\n game.createNewGame();\n }\n else if ( game.getState() == GameState.WON )\n {\n JOptionPane.showMessageDialog(\n this, \n game.getWinMessage(), \"Well Done!\",\n JOptionPane.INFORMATION_MESSAGE);\n game.createNewGame();\n }\n else if (game.messageForPlayer())\n {\n JOptionPane.showMessageDialog(\n this, \n game.getPlayerMessage(), \"Important Information\",\n JOptionPane.INFORMATION_MESSAGE); \n }\n }", "public BSState() {\n this.playerTurn=1;\n this.p1TotalHits=0;\n this.p2TotalHits=0;\n this.shipsAlive=10;\n this.shipsSunk=0;\n this.isHit=false;\n this.phaseOfGame=\"SetUp\";\n this.shotLocations=null;\n this.shipLocations=null;\n this.shipType=1;\n this.board=new String[10][20];\n //this.player1=new HumanPlayer;\n //this.player2=new ComputerPlayer;\n\n }", "abstract public void updateState();", "public String toString() {\r\n\t\treturn gameState;\r\n\t}", "void nextState();", "public void enterHatchingState() {\n\n\t}", "@Override\n public int getState() {\n return myState;\n }", "Object getState();", "public void startGame() {\n status = Status.COMPLETE;\n }", "public String getPlayerState() {\n String playerState = name + \" \" + actionArray[0] \n + \" \" + actionArray[1] + \" \" + actionArray[2] + \" \" + colorID + \" \";\n return playerState;\n }", "public void setStateOfMovement(int movementState){stateOfMovement = movementState; }", "private void setGameStatus() {\n this.gameStatus = false;\n }", "public State (){\n for ( int i = 0 ; i < 5; i ++){\n philosopherNum[i] = i;\n currentState[i] = \"thinking\";\n conditions[i] = mutex.newCondition();\n }\n }", "public boolean getState( ) { return state; }", "public Game() {\r\n\r\n\t\tmakeFrame();\r\n\t\tisClicked = false;\r\n\t\tisPlaying = false;\r\n\t\tlevelEasy = true;\r\n\t\tlevelIntermediate = false;\r\n\t\tlevelHard = false;\r\n\t\tplayerScore = 0;\r\n\r\n\t}", "public int getState();", "public int getState();", "public int getState();", "public int getState();", "public GraphicsState getState(\n )\n {return state;}", "public interface IState {\n int getLevel();\n\n float getClock();\n\n int getLives();\n\n int getCurrentScore();\n\n int getRequiredScore();\n\n boolean isGameOver();\n\n @Override\n String toString();\n}", "State getState();", "State getState();", "State getState();", "State getState();", "public States(Gameengine game) {\r\n\t\tthis.game = game;\r\n\t}", "public void updateState() {\n\n // After each frame, the unit has a slight morale recovery, but only up to the full base morale.\n morale = Math.min(morale + GameplayConstants.MORALE_RECOVERY, GameplayConstants.BASE_MORALE);\n\n if (morale < GameplayConstants.PANIC_MORALE) {\n state = UnitState.ROUTING;\n for (BaseSingle single : aliveTroopsMap.keySet()) {\n single.switchState(SingleState.ROUTING);\n }\n } else if (state == UnitState.ROUTING && morale > GameplayConstants.RECOVER_MORALE) {\n this.repositionTo(averageX, averageY, goalAngle);\n for (BaseSingle single : aliveTroopsMap.keySet()) {\n single.switchState(SingleState.MOVING);\n }\n }\n\n // Update the state of each single and the average position\n double sumX = 0;\n double sumY = 0;\n double sumZ = 0;\n int count = 0;\n for (BaseSingle single : aliveTroopsMap.keySet()) {\n single.updateState();\n sumX += single.getX();\n sumY += single.getY();\n sumZ += single.getZ();\n count += 1;\n }\n averageX = sumX / count;\n averageY = sumY / count;\n averageZ = sumZ / count;\n\n // Updating soundSink\n soundSink.setX(averageX);\n soundSink.setY(averageY);\n soundSink.setZ(averageZ);\n\n // Update the bounding box.\n updateBoundingBox();\n\n // Update stamina\n updateStamina();\n }", "public void isGameOver() { \r\n myGameOver = true;\r\n myGamePaused = true; \r\n }", "void stateChanged( final GameState oldState, final GameState newState );", "void newGame() {\n\t\tstate = new model.State () ; \n\t\tif(host != null ) host.show(state) ; \n\t}", "protected abstract int newState();", "abstract void showGameState();", "@Override\n public void startState() {\n Spell.clear();\n initGoldRenderers();\n initBackground();\n startBattleState();\n isOver = false;\n }", "PlayerState getPlayerState() {\n return playerState;\n }", "GameState() {\n this.board = new int[SIZE][SIZE];\n this.prevMoves = \"\";\n this.rank = setRank();\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"New Game State\";\n\t}", "public void preGame() {\n\n\t}", "public interface GameState {\n\n\t/**\n * Method used by a player in order to perform transfer of stones \n * @param pitId the identifier of the pit by which the player will start (the associated pit must belong to him) This is the only method that can change the state \n * @return map {@link Map Map.class} with (pitId,#stones) as entries\n */\n\tpublic Map<Integer, Integer> move(final int pitId);\n\t\n\t/**\n\t * @return the {@link GameStateEnum GameStateEnum.class} that corresponds to {@link GameState GameState.class} concretions\n\t */\n\tpublic GameStateEnum getStateEnum();\n}", "boolean isGameSpedUp();", "private void setGameState() // Convert the string version of the game state to the GameState version.\n\t{\n\t\tif (gameStateString.equalsIgnoreCase(\"waitingForStart\"))\n\t\t{\n\t\t\tgameState = GameState.waitingForStart;\n\t\t}\n\t\telse if (gameStateString.equalsIgnoreCase(\"gameWelcome\"))\n\t\t{\n\t\t\tgameState = GameState.gameWelcome;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"decideWhoGoesFirst\"))\n\t\t{\n\t\t\tgameState = GameState.decideWhoGoesFirst;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"twoPlayersPlayerOneGoesFirst\"))\n\t\t{\n\t\t\tgameState = GameState.twoPlayersPlayerOneGoesFirst;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"twoPlayersPlayerTwoGoesFirst\"))\n\t\t{\n\t\t\tgameState = GameState.twoPlayersPlayerTwoGoesFirst;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"twoPlayersNowPlayerOnesTurn\"))\n\t\t{\n\t\t\tgameState = GameState.twoPlayersNowPlayerOnesTurn;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"twoPlayersNowPlayerTwosTurn\"))\n\t\t{\n\t\t\tgameState = GameState.twoPlayersNowPlayerTwosTurn;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"aPlayerHasWon\"))\n\t\t{\n\t\t\tgameState = GameState.aPlayerHasWon;\n\t\t} \n\n\t}", "boolean isGameComplete();", "public void setInGame() {\n this.inGame = true;\n }", "public interface GameState {\r\n void init(boolean[][] cells);\r\n\r\n void tick();\r\n\r\n Collection<ICell> getCells();\r\n\r\n boolean isLifeExtinct();\r\n}", "@Override\n\tpublic boolean getState() {\n\t\treturn true;\n\t}", "public AeBpelState getState();", "public State state();", "public void startOppTurn(GameState state) {\n }", "void runState() {\n\t\tp.displaySheet();\n\t\tcurState.run();\n\t}", "public void checkGame() {\n\n\t}", "public void setState(GameState aState){\n\t\tpoints=aState.getScore();\n\t\tcurrentBoard.setState(aState.getBoardState());\n\t}", "public void checkState() {\r\n\t\tout.println(state);\r\n\t\tif(getEnergy() < 80 && getOthers() > 5) {\r\n\t\t\tstate = 1;\r\n\t\t\tturnLeft(getHeading() % 90);\r\n\t\t\tahead(moveAmount);\r\n\t\t}\r\n\t\telse if(getEnergy() < 80 && getOthers() < 5) {\r\n\t\t\tstate = 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tstate = 0;\r\n\t\t}\r\n\t\t\r\n\t}", "public S getCurrentState();", "public State getState(){return this.state;}", "public int getState(){\n return state;\n }", "void playerMove(State state);", "public static void tick() {\r\n\r\n\t\t// Switches on the different states of the game that it could be in\r\n\t\tswitch (gameState) {\r\n\t\tcase MAINMENU:\r\n\t\t\t// If there is not already a Main menu instance that exists\r\n\t\t\tif (mainMenu == null) {\r\n\t\t\t\t// Create a new Menu Instance\r\n\t\t\t\tmainMenu = new MainMenu();\r\n\t\t\t}\r\n\t\t\tmainMenu.tick();\r\n\t\t\tbreak;\r\n\t\tcase GAME:\r\n\t\t\t// If there is not already a game instance that exists\r\n\t\t\tif (game == null) {\r\n\t\t\t\t// Create a new game Instance\r\n\t\t\t\tgame = new Game(map, gm);\r\n\t\t\t}\r\n\t\t\t// Every time the state manager ticks it also ticks the current game state\r\n\t\t\tgame.tick();\r\n\t\t\tbreak;\r\n\t\tcase GAME_ONLINE:\r\n\t\t\tif (gameOnline == null) {\r\n\t\t\t\t// Create a new game Instance\r\n\r\n//\t\t\t\tip = JOptionPane.showInputDialog(\"Enter Server Ip\");\r\n//\t\t\t\tportTCP = Integer.parseInt(JOptionPane.showInputDialog(\"Enter TCP PORT\"));\r\n//\t\t\t\tportUDP = Integer.parseInt(JOptionPane.showInputDialog(\"Enter UDP PORT\"));\r\n//\t\t\t\tusername = JOptionPane.showInputDialog(\"Enter Your username\");\r\n\t\t\t\tgameOnline = new GameOnline(username, ip, portUDP, portTCP);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase LEVEL_EDITOR:\r\n\t\t\t// If there is not already a Editor instance that exists\r\n\t\t\tif (levelEditor == null) {\r\n\t\t\t\t// Create a new Editor Instance\r\n\t\t\t\tlevelEditor = new LevelEditor();\r\n\t\t\t}\r\n\t\t\tlevelEditor.tick();\r\n\t\t\tbreak;\r\n\t\tcase LEADERBOARD:\r\n\t\t\tif (leaderBoard == null) {\r\n\t\t\t\tleaderBoard = new Leaderboard();\r\n\t\t\t}\r\n\t\t\tleaderBoard.tick();\r\n\t\t\tbreak;\r\n\t\tcase SPLASHSCREEN_LOADING:\r\n\t\t\tif (splashScreenLoading == null) {\r\n\t\t\t\tsplashScreenLoading = new SplashScreenLoading();\r\n\t\t\t}\r\n\t\t\tsplashScreenLoading.tick();\r\n\t\t\tbreak;\r\n\t\tcase OPTIONS:\r\n\t\t\tbreak;\r\n\t\tcase TESTSCREEN:\r\n\t\t\tif (testScreen == null) {\r\n\t\t\t\ttestScreen = new TestScreen();\r\n\t\t\t}\r\n\t\t\ttestScreen.tick();\r\n\t\t\tbreak;\r\n\t\tcase MAP_SELECT_SCREEN:\r\n\t\t\tif (mapSelectScreen == null) {\r\n\t\t\t\tmapSelectScreen = new MapSelectScreen();\r\n\t\t\t}\r\n\t\t\tmapSelectScreen.tick();\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tlong currentTime = System.currentTimeMillis();\r\n\t\tif (currentTime > nextSecond) {\r\n\t\t\tnextSecond += 1000;\r\n\t\t\tframesInLastSecond = framesInCurrentSecond;\r\n\t\t\tframesInCurrentSecond = 0;\r\n\r\n\t\t\t// System.out.println(framesInLastSecond + \"fps\");\r\n\t\t}\r\n\r\n\t\tframesInCurrentSecond++;\r\n\r\n\t}", "public final boolean updateState(GameStateEvent e) {\n if (e == null) {\n getUtils().log(Logger.Level.WARNING, this.getClass(), \"State update function was passed null\");\n return false;\n }\n switch (e) {\n case RESET:\n reset();\n gameState = GameState.LOBBY;\n return true;\n case INIT:\n if (gameState == GameState.LOBBY) {\n if (init()) {\n gameState = GameState.INITIATING;\n return true;\n }\n }\n return false;\n case START:\n if (gameState == GameState.INITIATING) {\n if (start()) {\n gameState = GameState.ACTIVE;\n return true;\n }\n }\n return false;\n case PAUSE:\n if (gameState == GameState.ACTIVE) {\n if (pause()) {\n gameState = GameState.PAUSED;\n return true;\n }\n }\n return false;\n case RESUME:\n if (gameState == GameState.PAUSED) {\n if (resume()) {\n gameState = GameState.ACTIVE;\n return true;\n }\n }\n return false;\n case END:\n if (gameState == GameState.ACTIVE) {\n if (end()) {\n gameState = GameState.ENDED;\n return true;\n }\n }\n return false;\n default:\n getUtils().log(Logger.Level.WARNING, this.getClass(), \"Invalid GameStateEvent passed to GameInstance #\" + gameID\n + \"\\nThis is probably a bug! Please report it to https://github.com/uhcmanager/uhcautomation\");\n return false;\n }\n }", "public void gameRunning()\n{\n}" ]
[ "0.77573997", "0.7684476", "0.7482314", "0.74309254", "0.7327109", "0.73237073", "0.73014194", "0.7271614", "0.7246965", "0.7164911", "0.7164432", "0.71322143", "0.705295", "0.70306265", "0.70221555", "0.70048153", "0.69725215", "0.6949828", "0.6940382", "0.6928511", "0.6928511", "0.6918991", "0.6918991", "0.6918991", "0.6918991", "0.6918991", "0.6918991", "0.6878214", "0.6873833", "0.68638104", "0.6863396", "0.68517554", "0.6846572", "0.68365216", "0.68294066", "0.6823505", "0.68218845", "0.6803244", "0.67867625", "0.67867625", "0.6781484", "0.67466486", "0.67452806", "0.6741313", "0.6727608", "0.67216915", "0.67204785", "0.67166346", "0.6709059", "0.6707574", "0.670427", "0.66998315", "0.66955024", "0.6688527", "0.66850483", "0.665846", "0.6656399", "0.6652041", "0.6635741", "0.6635741", "0.6635741", "0.6635741", "0.6630634", "0.66255915", "0.6623231", "0.6623231", "0.6623231", "0.6623231", "0.6620234", "0.6614774", "0.66117656", "0.66000766", "0.6588906", "0.65849686", "0.65736634", "0.65692997", "0.656473", "0.65607715", "0.6532768", "0.65319264", "0.65226585", "0.6516793", "0.65117973", "0.6510128", "0.65079576", "0.6506596", "0.65028226", "0.64997375", "0.6495371", "0.64885116", "0.6485694", "0.6480857", "0.64677703", "0.64642304", "0.6451115", "0.64452994", "0.6441964", "0.6440835", "0.64329684", "0.6429347", "0.64229375" ]
0.0
-1
Scale by the delta time
@Override public void drawVideoFrame(Graphics g, double extrapolate) { long extrapolateTime = (long)(extrapolate * (isRoundOver() ? deltaTimeDead : deltaTimeAlive)); // Clear the frame (background colour) g.setColor(new Color(0x006000)); g.fillRect(0, 0, getGameWidthPixels(), getGameHeightPixels()); // Draw the tank fragments for (Fragment fragment : fragments) { g.setColor(getOwnerColor(fragment)); drawPolygon(g, fragment, extrapolateTime); } // Draw the walls for (Wall wall : walls) { g.setColor(Color.LIGHT_GRAY); drawPolygon(g, wall, extrapolateTime); } // Draw the player tanks for (Tank tank : tanks) { if (!tank.isAlive()) { continue; } g.setColor(getOwnerColor(tank)); drawPhysicsObject(g, tank, extrapolateTime, true); } // DEBUG // Draw lines demonstrating surface normals /*if (DebugMode.isEnabled() && walls.size() >= 2) { Wall wall = walls.get(1); for (Bullet bullet : bullets) { SpaceVector2D surfaceNormal = wall.getSurfaceNormal(bullet.position); g.setColor(Color.GREEN); g.drawLine((int)surfaceNormal.position.x, (int)surfaceNormal.position.y, (int)bullet.position.x, (int)bullet.position.y); g.setColor(Color.RED); Vector2D normalVectorEnd = surfaceNormal.position.sum(surfaceNormal.vector.scalarProduct(30d)); g.drawLine((int)surfaceNormal.position.x, (int)surfaceNormal.position.y, (int)normalVectorEnd.x, (int)normalVectorEnd.y); } }*/ // Draw the bullets for (Bullet bullet : bullets) { g.setColor(getOwnerColor(bullet)); drawPhysicsObject(g, bullet, extrapolateTime); } // Draw score markers for (ScoreMarker scoreMarker : scoreMarkers) { drawScoreMarker(g, scoreMarker); } for (ScoreMarker scoreMarker : playerScoreMarkers) { drawScoreMarker(g, scoreMarker); } // Draw health markers for (int i = 0; i < players.length; i++) { g.setColor(players[i].getColor()); final int rectWidth = 8, rectHeight = 11, rectSpacing = 15; int yBack = i == 0 ? (getGameHeightPixels() / 10 - 6) : (getGameHeightPixels() * 9 / 10 + 6); int yFront = yBack + (i == 0 ? rectHeight : -rectHeight); int xFirst = i == 0 ? 50 : (getGameWidthPixels() - (50 + rectWidth) - 1); int xPerHealth = i == 0 ? -rectSpacing : rectSpacing; for (int h = 0; h < tanks[i].getHealth(); h++) { int xHealth = xPerHealth * h; Polygon rectangle = new Polygon( new int[] { xFirst + xHealth, xFirst + xHealth, xFirst + rectWidth + xHealth, xFirst + rectWidth + xHealth }, new int[] { yBack, yFront, yFront, yBack }, 4); g.drawPolygon(rectangle); } // DEBUG // Draw a line connecting the tanks /*if (DebugMode.isEnabled()) { g.setColor(Color.BLUE); g.drawLine((int)tanks[0].position.x, (int)tanks[0].position.y, (int)tanks[1].position.x, (int)tanks[1].position.y); }*/ } // Draw ammo markers for (int i = 0; i < players.length; i++) { g.setColor(players[i].getColor()); int barWidth = 2 * tanks[i].getAmmo(); int barHeight = 6; int xBar = i == 0 ? (59 - barWidth) : (getGameWidthPixels() - 59); int yBar = i == 0 ? 65 : (getGameHeightPixels() - 65 - barHeight); for (int h = 0; h < tanks[i].getHealth(); h++) { g.fillRect(xBar, yBar, barWidth, barHeight); } } // Draw text on top of everything final int yLine1 = getGameHeightPixels() / 5; final int yLine2 = yLine1 - 15; if (demoMode) { drawTextMarker(g, "DEMO", yLine1); drawTextMarker(g, "PRESS ANY BUTTON TO START", yLine2); } else if (roundStartCounter < roundStartTicks) { String startString = round > roundsPerGame ? "OVERTIME" : String.format("ROUND %d OF %d", round, roundsPerGame); drawTextMarker(g, startString, yLine1); } else if (roundOverCounter > 0 && roundOverCounter <= roundOverTicks) { drawTextMarker(g, String.format("ROUND %0$d OVER", round), yLine1); } else if (roundOverCounter > roundOverTicks && roundOverCounter <= gameOverTicks) { drawTextMarker(g, "GAME OVER", yLine1); boolean player0Wins = players[0].score > players[1].score; boolean player1Wins = players[1].score > players[0].score; if (player0Wins) { drawTextMarker(g, new String[] { "YOU WIN!", "YOU LOSE!" }, yLine2, players[0]); } else if (player1Wins) { drawTextMarker(g, new String[] { "YOU LOSE!", "YOU WIN!" }, yLine2, players[1]); } else { // Tie // (We never come here, because overtime is implemented) drawTextMarker(g, "IT'S A TIE!", yLine2); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void increaseTimescale() {\n\t\ttimeScaler = timeScaler>=5 ? 5 : timeScaler + TIMESCLALER_FACTOR;\n\t}", "public void decreaseTimescale() {\n\t\ttimeScaler = timeScaler<=1 ? 1 : timeScaler - TIMESCLALER_FACTOR;\n\t}", "private void setScale() {\n this.particleScale = (1 - ((float) slowTime / 50)) * (1.5f * (float) offset);\n }", "public void setScale(int indexInST, float time, Vector3f scale) {\n PointInTime toAdd=findTime(time);\n toAdd.setScale(indexInST,scale);\n }", "void scale(double factor);", "public void scaleFrames(int aStartTime, int newMaxTime)\n{\n // Get scale factor\n float factor = newMaxTime/(float)getMaxTime();\n \n // Scale frames for shapes\n for(int i=0, iMax=getOwner().getChildCount(); i<iMax; i++)\n scaleFrames(getOwner().getChild(i), aStartTime, factor);\n \n // Set new max time\n setMaxTime(newMaxTime);\n}", "@Override public void update(float dt)\n\t{\n\t\tthis.setScale((this.getScale().getX() + 0.1f) * 0.99f, (this.getScale().getY() + 0.1f) * 0.99f);\n\n\n\t}", "private void scaleFrames(RMShape aShape, int aStartTime, float aFactor)\n{\n // If shape timeline available, have it scale records\n if(aShape.getTimeline()!=null) {\n \n // Scale timeline records\n aShape.getTimeline().scaleRecords(aStartTime, aFactor);\n \n // Reset time\n resetShapeTimeline(aShape);\n }\n \n // Forward scale frames on to shape children\n for(int i=0, iMax=aShape.getChildCount(); i<iMax; i++)\n scaleFrames(aShape.getChild(i), aStartTime, aFactor);\n}", "public Action scaleCurrentDuration(float scale) {\n mDuration = (long) (mDuration * scale);\n mStartOffset = (long) (mStartOffset * scale);\n return this;\n }", "public void onTimeUpdate(TimeAnimator animation, long totalTime, long deltaTime) {\n\n final int START_ZOOM_TIME = 3000;\n if (totalTime < START_ZOOM_TIME) {\n final float x = totalTime/(float)START_ZOOM_TIME;\n final float s = 1f-(float)Math.pow(x-1, 4);\n setScaleX(s); setScaleY(s);\n } else {\n setScaleX(1.0f); setScaleY(1.0f);\n }\n\n if (mManeuveringThrusters) {\n if (mSpeedScale > MANEUVERING_THRUST_SCALE) {\n mSpeedScale -= (2*deltaTime/1000f);\n }\n if (mSpeedScale < MANEUVERING_THRUST_SCALE) {\n mSpeedScale = MANEUVERING_THRUST_SCALE;\n }\n } else {\n if (mSpeedScale < 1.0f) {\n mSpeedScale += (deltaTime/1000f);\n }\n if (mSpeedScale > 1.0f) {\n mSpeedScale = 1.0f;\n }\n }\n\n for (int i=0; i<getChildCount(); i++) {\n View v = getChildAt(i);\n if (!(v instanceof FlyingIcon)) continue;\n FlyingIcon nv = (FlyingIcon) v;\n nv.update(deltaTime / 1000f * mSpeedScale);\n final float scaledWidth = nv.getWidth() * nv.getScaleX();\n final float scaledHeight = nv.getHeight() * nv.getScaleY();\n if ( nv.getX() + scaledWidth < 0\n || nv.getX() - scaledWidth > getWidth()\n || nv.getY() + scaledHeight < 0 \n || nv.getY() - scaledHeight > getHeight())\n {\n nv.reset();\n }\n }\n }", "public interface Scalable {\n public void scale(TimeTick base, double ratio);\n}", "@Override\n public void updateAtTime(IShape shape, int time) {\n int currentSx = formula(time, this.startTime, this.endTime, this.fromSx, this.toSx);\n int currentSy = formula(time, this.startTime, this.endTime, this.fromSy, this.toSy);\n\n shape.setScale(currentSx, currentSy);\n }", "public Delta scaled(int scale) {\n return new Delta(deltaFile * scale, deltaRank * scale);\n }", "public void rescale()\r\n\t{\n\t}", "public void scale(double s);", "private int normalizeTime() {\n int currentTimeSeconds = (int) (System.currentTimeMillis() / 1000);\n\n // The graphing interval in minutes\n // TODO not hardcoded :3\n int interval = 30;\n\n // calculate the devisor denominator\n int denom = interval * 60;\n\n return (int) Math.round((currentTimeSeconds - (denom / 2d)) / denom) * denom;\n }", "public void scale(Point P, int scaleFactor) {\n\n\n }", "public Vector atTime(double t) {\n return start.add(direction.scale(t));\n }", "private void updateScale() {\n target.setScaleX(scaleValue);\n target.setScaleY(scaleValue);\n }", "public void increaseSize(int delta){\n\t\tif(scale < scaleMax)\n\t\t\tscale += enlarge * delta;\n\t}", "public void scale(float x, float y);", "private void fillScale(int objectIndex, int startScaleIndex, int endScaleIndex) {\n ((PointInTime)keyframes.get(startScaleIndex)).look[objectIndex].getScale(unSyncbeginPos);\n ((PointInTime)keyframes.get(endScaleIndex)).look[objectIndex].getScale(unSyncendPos);\n float startTime=((PointInTime)keyframes.get(startScaleIndex)).time;\n float endTime=((PointInTime)keyframes.get(endScaleIndex)).time;\n float delta=endTime-startTime;\n Vector3f tempVec=new Vector3f();\n \n for (int i=startScaleIndex+1;i<endScaleIndex;i++){\n float thisTime=((PointInTime)keyframes.get(i)).time;\n tempVec.interpolate(unSyncbeginPos,unSyncendPos,(thisTime-startTime)/delta);\n ((PointInTime)keyframes.get(i)).look[objectIndex].setScale(tempVec);\n }\n }", "public double toDelta() {\n return ((double)(_secs)) + _fracDouble;\n }", "public int scale(int original);", "private Float scale(Float datapoint){\n\n float range = (float)(20 * (max / Math.log(max)));\n range-=min;\n float scalar = DisplayImage.IMAGE_SIZE_SCALAR / range;\n\n if(nightMode){\n datapoint = (float) (100 * (datapoint / Math.log(datapoint)));\n datapoint *= scalar*5;\n }else {\n datapoint = (float) (20* (datapoint / Math.log(datapoint)));\n datapoint *= scalar;\n }\n\n return datapoint;\n }", "public void zoomScaleIn() {\n \t\tzoomScale(SCALE_DELTA_IN);\n \t}", "private void Scale()\n {\n Song scale = new Song();\n scale.add(new Note(noteA1,WHOLE_NOTE/2));\n scale.add(new Note(noteBB1,WHOLE_NOTE/2));\n scale.add(new Note(noteB1,WHOLE_NOTE/2));\n scale.add(new Note(noteC1,WHOLE_NOTE/2));\n scale.add(new Note(noteCS1,WHOLE_NOTE/2));\n scale.add(new Note(noteD1,WHOLE_NOTE/2));\n scale.add(new Note(noteDS1,WHOLE_NOTE/2));\n scale.add(new Note(noteE1,WHOLE_NOTE/2));\n scale.add(new Note(noteF1,WHOLE_NOTE/2));\n scale.add(new Note(noteFS1,WHOLE_NOTE/2));\n scale.add(new Note(noteG1,WHOLE_NOTE/2));\n scale.add(new Note(noteGS1,WHOLE_NOTE/2));\n\n\n playSong(scale);\n }", "public void updateScale()\n {\n // get scale from world presenter\n s2 = (cam.getScale());\n //Convert to English Miles if appropriate\n if( !SettingsScreen.getUnits() ) s2 *= 0.60934;\n s1 = s2/2;\n repaint();\n }", "public void zoomScale(double scaleDelta) {\n \t\tzoomToScale((float) (mapDisplay.sc * scaleDelta));\n \t}", "public void scaleBy(float scale) {\n internalGroup.scaleBy(scale);\n dataTrait.scaleX = internalGroup.getScaleX();\n dataTrait.scaleY = internalGroup.getScaleY();\n resetSprite();\n\n }", "public void decreaseSize(int delta){\n\t\tif(scale > scaleMin)\n\t\t\tscale -= enlarge *delta;\n\t}", "private void calculateDelta() {\n // 60 fps <=> delta ~ 0.016f\n //\n long curTime = SystemClock.elapsedRealtimeNanos();\n delta = (curTime - lastTime) / 1_000_000_000.0f;\n lastTime = curTime;\n }", "protected void updateTime(float deltaTime) {\n }", "@Override\n protected void afterAttach(){\n\n float scaleE = (float) Math.pow(toValue, 1.0 / totalIterations);\n scaleTransform.updateValues(scaleE, scaleE, scaleE);\n }", "public Vector scale(double factor) {\n\t\treturn new Vector(deltaX * factor, deltaY * factor);\n\t}", "public void setScale(float scale);", "public void scale(float val) {\r\n\t\tx *= val;\r\n\t\ty *= val;\r\n\t\tz *= val;\r\n\t}", "public void scaleAnimetion(SpriteBatch batch){\n }", "public void scale(float scale, float x, float y) {\n\t\tcompose(new TransformMatrix(scale,scale, x - scale * x,y - scale * y));\n\t}", "public void update(final int delta) {\n translate(velocity.scale(delta));\n\n }", "public void scale( float x, float y )\n\t{\n\t\tMatrix4f opMat = new Matrix4f();\n\t\topMat.setScale( x );\n\t\tmat.mul( opMat );\n\t}", "private double scalex(double x) {\n return x/scalingFactor;\n }", "protected abstract void update(double deltaTime);", "public void scale(float scale, float scale2) {\n\t\t\n\t}", "public void scale(Point3 scale) {\r\n\t\tx *= scale.x;\r\n\t\ty *= scale.y;\r\n\t\tz *= scale.z;\r\n\t}", "void onScaleChange(float scaleFactor, float focusX, float focusY);", "double scaleInput(double dVal) {\n double[] scaleArray = { 0.0, 0.05, 0.09, 0.10, 0.12, 0.15, 0.18, 0.24,\n 0.30, 0.36, 0.43, 0.50, 0.60, 0.72, 0.85, 1.00, 1.00 };\n int index = (int) (dVal * 16.0);\n if (index < 0) {\n index = -index;\n }\n if (index > 16) {\n index = 16;\n }\n double dScale = 0.0;\n if (dVal < 0) {\n dScale = -scaleArray[index];\n } else {\n dScale = scaleArray[index];\n }\n return dScale;\n }", "@Override\n public void scale(double x, double y) {\n graphicsEnvironmentImpl.scale(canvas, x, y);\n }", "public void step(float time)\n {\n if(this.firstTick)\n {\n this.firstTick = false;\n this.elapsed = 0.0f;\n }\n else\n {\n this.elapsed += time;\n }\n\n float updateTime = (float)Math.min(1.0f, this.elapsed/this.duration);\n\n this.update(updateTime);\n }", "public void scale(double sx, double sy)\r\n\t{\r\n\t\t// System.out.println(\"scale\");\r\n\t}", "private static void performChangeBy(Temperature t, double delta, char scale) {\n\n if (scale == CEL_SCALE_CODE) { \n System.out.printf(\"Calling changeBy(%f,true)\\n\", delta);\n t.changeBy(delta, true); \n }\n else if (scale == FAH_SCALE_CODE) { \n System.out.printf(\"Calling changeBy(%f,false)\\n\", delta);\n t.changeBy(delta, false);\n }\n else {\n System.out.printf(\"Calling changeBy(%f)\\n\", delta);\n t.changeBy(delta);\n }\n }", "private double scale (double curr, double goal, double scale, double threshold) {\n return (Math.abs(goal - curr) < threshold ?\n goal : goal * scale + curr * (1 - scale));\n }", "@Override\r\n public void actionPerformed(ActionEvent ae)\r\n {\r\n renderer.setTimeScaler(renderer.getTimeScaler() + 0.1f);\r\n }", "@Override\n\tfinal public void scale(double x, double y)\n\t{\n\t\twidth *= x;\n\t\theight *= y;\n\t}", "public void setScale(double value) {\n this.scale = value;\n }", "private double normaliseViewingTime() {\n return this.averageViewingTime / (double) this.content.getViewLength();\n }", "public void shiftFrames(int fromTime, int aShiftTime)\n{\n // Scale frames for shapes\n for(int i=0, iMax=getOwner().getChildCount(); i<iMax; i++)\n shiftFrames(getOwner().getChild(i), fromTime, aShiftTime);\n \n // If new time beyond max, reset max time\n setTime(fromTime + aShiftTime);\n setMaxTime(getMaxTime() + aShiftTime);\n}", "void scaleSampleRate(float scaleFactor) {\n if (debugFlag)\n debugPrintln(\"JSChannel: scaleSampleRate\");\n if (ais == null) {\n if (debugFlag) {\n debugPrint(\"JSChannel: Internal Error scaleSampleRate: \");\n debugPrintln(\"ais is null\");\n }\n return;\n }\n\n AudioFormat audioFormat = ais.getFormat();\n float rate = audioFormat.getSampleRate();\n\n double newRate = rate * scaleFactor;\n if (newRate > 48000.0) // clamp to 48K max\n newRate = 48000.0;\n/****\n// NOTE: This doesn't work...\n/// audioStream.setSampleRate(newRate);\n\n// need to set FloatControl.Type(SAMPLE_RATE) to new value somehow...\n\n if (debugFlag) {\n debugPrintln(\"JSChannel: scaleSampleRate: new rate = \" +\n rate * scaleFactor);\n debugPrintln(\" >>>>>>>>>>>>>>> using scaleFactor = \" +\n scaleFactor);\n }\n****/\n }", "private void onScaleClick() {\n PropertyValuesHolder scaleXHolder = PropertyValuesHolder.ofFloat(\"scaleX\", 1.5f);\r\n PropertyValuesHolder scaleYHolder = PropertyValuesHolder.ofFloat(\"scaleY\", 1.5f);\r\n Animator scaleAnimator = ObjectAnimator.ofPropertyValuesHolder(\r\n animatedView, scaleXHolder, scaleYHolder);\r\n scaleAnimator.setDuration(animationDuration);\r\n scaleAnimator.setInterpolator(new AccelerateDecelerateInterpolator());\r\n scaleAnimator.start();\r\n }", "@Override\n\tpublic void handleScale(float scale, int moveYDistance) {\n\t\t scale = 0.6f + 0.4f * scale;\n//\t ViewCompat.setScaleX(mMoocRefreshView, scale);\n//\t ViewCompat.setScaleY(mMoocRefreshView, scale);\n\t}", "public T scale( double val ) {\n T ret = createLike();\n ops.scale(mat, val, ret.getMatrix());\n return ret;\n }", "public void scale(float x, float y) {\n multiply(\n x, 0F, 0F, 0F,\n 0F, y, 0F, 0F,\n 0F, 0F, 1F, 0F,\n 0F, 0F, 0F, 1F\n );\n }", "public void scale(Vector2 scale)\n\t{\n\t\tthis.scaleBasis(scale);\n\t\tthis.matrix[2] = this.matrix[2].multiply(scale);\n\t}", "public void step() {\n\t\tfor (SimObject o : simObjects) {\n\t\t\to.step(timeScale);\n\t\t}\n\n\t\t// increment time elasped\n\t\tdaysElapsed += ((double) (timeScale)) / 86400.0;\n\n\t\t// if more than 30.42 days have elapsed, increment months\n\t\tif (daysElapsed >= 30.42) {\n\t\t\tmonthsElapsed++;\n\t\t\tdaysElapsed -= 30.42;\n\t\t}\n\n\t\t// if more than 12 months have elapsed, increment years\n\t\tif (monthsElapsed >= 12) {\n\t\t\tyearsElapsed++;\n\t\t\tmonthsElapsed -= 12;\n\t\t}\n\t}", "protected void zoomToScale(float scale) {\n \t\tif (tweening) {\n \t\t\tscaleIntegrator.target(scale);\n \t\t} else {\n \t\t\tmapDisplay.sc = scale;\n \t\t\t// Also update Integrator to support correct tweening after switch\n \t\t\tscaleIntegrator.target(scale);\n \t\t\tscaleIntegrator.set(scale);\n \t\t}\n \t}", "public void handle(ActionEvent ae) {\n scaleFactor += 0.1; \n if(scaleFactor > 2.0) scaleFactor = 0.4; \n \n scale.setX(scaleFactor); \n scale.setY(scaleFactor); \n \n }", "@Override\n public float getScale() {\n return scale;\n }", "public Scale(Scale newScale){\n \tsuper(newScale);\n }", "double scaleInput(double dVal) {\n double[] scaleArray = { 0.0, 0.05, 0.09, 0.10, 0.12, 0.15, 0.18, 0.24,\n 0.30, 0.36, 0.43, 0.50, 0.60, 0.72, 0.85, 1.00, 1.00 };\n\n // get the corresponding index for the scaleInput array.\n int index = (int) (dVal * 16.0);\n if (index < 0) {\n index = -index;\n } else if (index > 16) {\n index = 16;\n }\n\n double dScale = 0.0;\n if (dVal < 0) {\n dScale = -scaleArray[index];\n } else {\n dScale = scaleArray[index];\n }\n\n return dScale;\n }", "public void scale(double factor) {\r\n for (int i = 0; i < components.length; i++) {\r\n components[i] *= factor;\r\n }\r\n }", "protected void scale(EntityInstance e, double wf, double hf, boolean doContainer, boolean doPos)\r\n\t{\n\r\n\t\tif (doContainer) {\r\n\t\t\tdouble x1, y1, w1, h1; \r\n\r\n\t\t\tx1 = e.xRelLocal();\t\t\r\n\t\t\ty1 = e.yRelLocal();\r\n\t\t\tw1 = e.widthRelLocal() * wf;\r\n\t\t\th1 = e.heightRelLocal() * hf;\r\n\r\n\t\t\tif (doPos) {\r\n\t\t\t\tx1 *= wf;\r\n\t\t\t\ty1 *= hf;\r\n\t\t\t}\r\n\t\t\tupdateRelLocal(e, x1, y1, w1, h1);\r\n\t\t} else {\r\n\t\t\tEnumeration\t\ten;\r\n\t\t\tEntityInstance\te1;\r\n\r\n\t\t\tfor (en = e.getChildren(); en.hasMoreElements(); ) {\r\n\t\t\t\te1 = (EntityInstance) en.nextElement();\r\n\t\t\t\tscale(e1, wf, hf, true, true);\r\n\t\t}\t}\r\n\t}", "public abstract void update(float deltaTime);", "public abstract void update(float deltaTime);", "public abstract void update(float deltaTime);", "public void setTimeSeconds(float aTime) { setTime(Math.round(aTime*1000)); }", "public void scale(float scalar) {\n\t\tthis.scale(scalar, scalar);\n\t}", "public void drawScale(Canvas canvas, ItemListener item) {\n if (this.mFocus != null) {\n ScaleParams scaleParams = this.mFocus.getParams().getScaleParams();\n float itemDiffScaleXValue = scaleParams.getScaleX() - 1.0f;\n float itemDiffScaleYValue = scaleParams.getScaleY() - 1.0f;\n float coef = ((float) this.mFrame) / ((float) scaleParams.getScaleFrameRate());\n Interpolator scaleInterpolator = this.mFocus.getParams().getScaleParams().getScaleInterpolator();\n if (scaleInterpolator == null) {\n scaleInterpolator = new LinearInterpolator();\n }\n float coef2 = scaleInterpolator.getInterpolation(coef);\n float dstScaleXValue = 1.0f + (itemDiffScaleXValue * coef2);\n float dstScaleYValue = 1.0f + (itemDiffScaleYValue * coef2);\n if (this.mLastItem == item) {\n dstScaleXValue = scaleParams.getScaleX();\n dstScaleYValue = scaleParams.getScaleY();\n }\n item.setScaleX(dstScaleXValue);\n item.setScaleY(dstScaleYValue);\n }\n }", "private static <T extends Shape> void scaleShape(T shape, double scale){\r\n\t\tshapeContainer = new ShapeContainer<Shape>(shape);\r\n\t\ttry {\r\n\t\t\tshapeContainer.changeShapeScale(scale);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t}", "public void scale( float x, float y, float z )\n\t{\n\t\tMatrix4f opMat = new Matrix4f();\n\t\topMat.set( x );\n\t\tmat.mul( opMat );\n\t}", "public void setMaxTimeSeconds(float aTime) { setMaxTime(Math.round(aTime*1000)); }", "static double scaleInput(double dVal)\n {\n double[] scaleArray = {0.0, 0.05, 0.09, 0.10, 0.12, 0.15, 0.18, 0.24,\n 0.30, 0.36, 0.43, 0.50, 0.60, 0.72, 0.85, 1.00, 1.00};\n\n // get the corresponding index for the scaleInput array.\n int index = (int) (dVal * 16.0);\n\n // index should be positive.\n if (index < 0)\n {\n index = -index;\n }\n\n // index cannot exceed size of array minus 1.\n if (index > 16)\n {\n index = 16;\n }\n\n // get value from the array.\n double dScale;\n if (dVal < 0)\n {\n dScale = -scaleArray[index];\n }\n else\n {\n dScale = scaleArray[index];\n }\n\n // return scaled value.\n return dScale;\n }", "public void transform( final float factor ) {\n final var compDimen = new ScalableDimension( getParentBounds() );\n transform( compDimen.scale( factor ) );\n }", "@Override\n public void setScale(float scale) {\n this.scale = scale;\n }", "@Override\n\t\tpublic void onChartScale(MotionEvent me, float scaleX, float scaleY) {\n\t\t\tsyncCharts();\n\t\t}", "public double getScale() {\n return scale;\n }", "private void scale(Complex[] F) {\r\n\t\r\n\t\tfor (int i = 0; i < F.length; i++) {\r\n\t\t\tF[i].setReal((double)255 * F[i].getReal() / (maX - miN));\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "public double getScale(){\n\t\treturn scale;\n\t}", "public void scale(Vector center, float degree);", "public double getScale() {\r\n return scale;\r\n }", "public void scanningThumbScale() {\n stopAnimationHandler();\n scanningBlurValueBar.setProgress(100);\n ScaleAnimation scaleAnimation = new ScaleAnimation(0f, 1f, 0f, 1f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);\n scaleAnimation.setFillAfter(false);\n scaleAnimation.setInterpolator(new BounceInterpolator());\n scaleAnimation.setDuration(600);\n scanningThumb.setVisibility(VISIBLE);\n scanningThumb.startAnimation(scaleAnimation);\n }", "private double scaleValue(double input) {\n if(type == SIMPLE_SIN2D_IN_X || type == SIMPLE_SIN2D_IN_Y || type == SIMPLE_MULT2D) {\n // SINE = -1 to 1\n // SCALE to 0 to 255\n // (SINE + 1) * 128\n return (input + 1) * (255.0 / 2.0);\n }\n if(type == SIMPLE_PLUS2D)\n {\n return (input + 2) * (255.0 / 4.0);\n }\n else\n return 0;\n }", "void setMaxScale(int value);", "public float getScale();", "public final Shape scale(Vector fromPoint, Vector toPoint, Vector anchorPoint) {\n\t\treturn transform(new Scalation(fromPoint, toPoint, anchorPoint));\n\t}", "public void visitScale( DevCat devCat ) {}", "protected void updateScales() {\n hscale = 1f;\n vscale = 1f;\n viewData.setHscale(hscale);\n viewData.setVscale(vscale);\n }", "public static void scaling(double[] array, double scale)\r\n\t{\r\n\t\tdouble absMax = getMax(array);\r\n\t\tdouble min = getMin(array);\r\n\t\tif (absMax < Math.abs(min))\r\n\t\t\tabsMax = Math.abs(min);\r\n\t\tif (absMax == 0)\r\n\t\t\treturn;\r\n\t\tdouble ratio = scale / absMax;\r\n\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tarray[i] = array[i] * ratio;\r\n\t}", "public void doubleSpeed()\r\n {\r\n \tthis.speed= speed-125;\r\n \tgrafico.setVelocidad(speed);\r\n }", "public void autoscale()\n\t\t{\n\t\tdouble maxFC=1;\n\t\tdouble minP=-1;\n\t\t\n\t\tfor(int i=0;i<de.getNumGenes();i++)\n\t\t\t{\n\t\t\tdouble f=Math.abs(de.fc[i]);\n\t\t\tdouble p=de.logP[i];\n\t\t\tif(f>maxFC)\n\t\t\t\tmaxFC=f;\n\t\t\tif(p<minP)\n\t\t\t\tminP=p;\n\t\t\t}\n\t\tmaxFC*=1.2;\n\t\tminP*=1.2;\n\t\tscaleFC=1/maxFC;\n\t\tscaleP=-1/minP;\n\t\t}", "private ScaleEntityDownAction(){\r\n\t\tscaleFactor = 0.1f;\r\n\t}", "public void delay(int scale) {\n \ttry {\n \t\tsleep((int)(Math.random()*scale));\n \t} catch (InterruptedException e) { }\n }" ]
[ "0.70355433", "0.68342924", "0.65662193", "0.6564731", "0.63412505", "0.6316797", "0.62997514", "0.62318206", "0.6138427", "0.61091226", "0.6023575", "0.5983274", "0.5971752", "0.59671056", "0.59666145", "0.591466", "0.5899268", "0.58727646", "0.5859025", "0.58542573", "0.5782939", "0.57693106", "0.56378037", "0.5632256", "0.56268376", "0.56230444", "0.56091017", "0.55890745", "0.556909", "0.5545281", "0.5540325", "0.5471555", "0.54561716", "0.5451864", "0.54406565", "0.5414407", "0.53501385", "0.5331274", "0.5323364", "0.5315549", "0.5308735", "0.52903074", "0.5274433", "0.5254742", "0.52504116", "0.5245253", "0.5241799", "0.52190906", "0.52153754", "0.5214917", "0.52124554", "0.52112997", "0.51851887", "0.5184473", "0.51780534", "0.51622635", "0.5161595", "0.5160049", "0.5158926", "0.515617", "0.5155858", "0.51483935", "0.51441747", "0.51168555", "0.51065826", "0.51034844", "0.50926363", "0.50897855", "0.50778794", "0.50768304", "0.50744784", "0.5058326", "0.5058326", "0.5058326", "0.5057972", "0.50551575", "0.50421023", "0.50385535", "0.50362116", "0.5033045", "0.502793", "0.5026172", "0.50185883", "0.50164616", "0.5009899", "0.5008091", "0.50067717", "0.50032425", "0.49952528", "0.49873364", "0.4986375", "0.4985774", "0.49690744", "0.49654126", "0.49652922", "0.49599832", "0.49566078", "0.4953491", "0.4952948", "0.49519923", "0.49512902" ]
0.0
-1
Draws a physics object as a circle.
private void drawPhysicsObject(Graphics g, PhysicsObject obj, long extrapolateTime) { drawPhysicsObject(g, obj, extrapolateTime, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ShapeComponent drawCircle()\n\t{\n\t\tShapeComponent circleComponent = new ShapeComponent(radius*2, radius*2, \n\t\t\t\t\"circle\");\n\t\treturn circleComponent;\n\t}", "@Override\n public void draw() {\n drawAPI.drawCircle(radius, x, y); \n }", "protected void renderCircle(Graphics g, int x, int y, int diameter)\n {\n\tx -= diameter/2;\n\ty -= diameter/2;\n\t\n\tg.drawOval(x,y,diameter,diameter);\n\tig.drawOval(x,y,diameter,diameter);\n }", "private void drawCircle(GraphicsContext gc, double x, double y) {\r\n GraphicsContext gc1 = myCanvas.getGraphicsContext2D();\r\n gc1.setFill(randomColor());\r\n gc1.fillOval(x - 20, y - 20, 40, 40);\r\n }", "public void drawCircle(Graphics g, int x, int y, int radius)\n\t{\n\t\tg.drawOval(x - radius, y - radius, 2 * radius, 2 * radius);\n\t}", "public void drawSpaceObject(CTS_SpaceObject obj, double radius, Color color) {\n\t\tdouble[] result = getPositionOfSpaceObject(obj);\n\t\tif (result == null) {\n\t\t\t//System.err.println(\"getPostionOfSpaceObject returned null!\");\n\t\t\tthrow new IllegalArgumentException(\"Something went wrong\");\n\t\t}\n\t\tdrawCircle(radius, result[0], result[1], color);\n\t}", "public void drawSpaceObject(CTS_SpaceObject obj, int radius, Color color) {\n\t\tdouble[] result = getPositionOfSpaceObject(obj);\n\t\tif (result == null) {\n\t\t\t//System.err.println(\"getPostionOfSpaceObject returned null!\");\n\t\t\tthrow new IllegalArgumentException(\"Something went wrong\");\n\t\t}\n\t\tdrawCircle(radius, (int) result[0], (int) result[1], color);\n\t}", "private void addCircle() {\n\t\tdouble r = getRadius();\n\t\tadd(new GOval(getWidth() / 2.0 - r, getHeight() / 2.0 - r, 2 * r, 2 * r));\n\t}", "private void createCircle(double x, double y) {\r\n GOval circle = new GOval(x, y, DIAMETR, DIAMETR);\r\n circle.setFilled(true);\r\n circle.setFillColor(Color.BLACK);\r\n add(circle);\r\n }", "public void drawCircle(double radius, double x, double y, Color color) {\n\t\tdouble xx = x - radius;\n\t\tdouble yy = y - radius;\n\t\tif (xx < 0.0 || yy < 0.0 || xx > (VIEWING_AREA_WIDTH - radius)|| yy > (VIEWING_AREA_HEIGHT - radius)) {\n\t\t\tthrow new IllegalArgumentException(\"drawCircle: invalid set of radius and x/y cordnates\");\n\t\t}\n\t\tgc.setFill(color);\n\t\tgc.fillOval(xx,yy, radius * 2, radius * 2);\n\t}", "public void drawCircle(Graphics g, int x, int y, int rad) {\n if (n == 5) {\n g.fillOval(x+25, y+25, rad, rad);\n }else if (n==6) {\n g.fillOval(x+18, y+18, rad, rad);\n }else {\n g.fillOval(x+14, y+14, rad, rad);\n }\n }", "public void drawCircle(int radius, int x, int y, Color color) {\n\t\tint xx = x - radius;\n\t\tint yy = y - radius;\n\t\tif (xx < 0 || yy < 0 || xx > (VIEWING_AREA_WIDTH - radius)|| yy > (VIEWING_AREA_HEIGHT - radius)) {\n\t\t\tthrow new IllegalArgumentException(\"drawCircle: invalid set of radius and x/y cordnates\");\n\t\t}\n\t\tgc.setFill(color);\n\t\tgc.fillOval(xx,yy, radius * 2, radius * 2);\n\t}", "@Override\r\n\tpublic void draw() {\n\t\tSystem.out.println(\"Circle Drawn\");\r\n\t}", "protected void renderFilledCircle(Graphics g, int x, int y, int diameter)\n {\n\tx -= diameter/2;\n\ty -= diameter/2;\n\t\n\tg.fillOval(x,y,diameter,diameter);\n\tig.fillOval(x,y,diameter,diameter);\n }", "private void DrawCircle(GL2 gl, int xC, int yC, int radius) {\n gl.glPointSize(10.0f);\n gl.glColor3d(1, 2, 1);\n gl.glBegin(GL2.GL_POINTS);\n\n gl.glVertex2d(xC, yC);\n\n int x = radius, y = 0, d = -4 * radius + 5;\n draw8SymmetricCurves(gl, xC, yC, x, y);\n while (y <= x) {\n if (d < 0) {\n d = d + ((2 * y + 3) * 4);\n y++;\n } else {\n d += ((-2 * x + 2 * y + 5) * 4);\n x--;\n y++;\n }\n draw8SymmetricCurves(gl, xC, yC, x, y);\n }\n gl.glEnd();\n }", "@Override\n public void render(Canvas canvas) {\n if (destroying) destroyBounds();\n canvas.drawCircle(circleX, circleY, radius, circlePaint);\n }", "public void paintCircle(Point2D pt1, Point2D pt2, Graphics graphics) {\n // do all this only if want to display the rubberband circle\n if (displayCircle) {\n Graphics2D g = (Graphics2D) graphics;\n g.setXORMode(java.awt.Color.lightGray);\n g.setColor(java.awt.Color.darkGray);\n if (pt1 != null && pt2 != null) {\n // first convert degrees to radians\n float radphi1 = (float) ProjMath.degToRad(pt1.getY());\n float radlambda0 = (float) ProjMath.degToRad(pt1.getX());\n float radphi = (float) ProjMath.degToRad(pt2.getY());\n float radlambda = (float) ProjMath.degToRad(pt2.getX());\n // calculate the circle radius\n double dRad = GreatCircle.sphericalDistance(radphi1,\n radlambda0,\n radphi,\n radlambda);\n // convert into decimal degrees\n float rad = (float) ProjMath.radToDeg(dRad);\n // make the circle\n OMCircle circle = new OMCircle((float) pt1.getY(), (float) pt1.getX(), rad);\n // get the map projection\n Projection proj = theMap.getProjection();\n // prepare the circle for rendering\n circle.generate(proj);\n // render the circle graphic\n circle.render(g);\n }\n } // end if(displayCircle)\n }", "public void draw()\n {\n canvas.setForegroundColor(color);\n canvas.fillCircle(xPosition, yPosition, diameter);\n }", "private void circle(){\n\t\tsquareCollison();\n\t\tsetMoveSpeed(10);\n\t}", "public void drawCircle(int xC, int yC, int xP,int yP, Graphics g) {\r\n \tfloat x, y;\r\n \tint partA = xC-xP;\r\n \tint partB= yC-yP;\r\n \tint r = (int) Math.sqrt(Math.pow(partA, 2)+ Math.pow(partB,2));\r\n \tdouble delta = Math.PI / (2*Math.sqrt(2)*r);\r\n \t \tfor (int i = 0; i < (Math.sqrt(2) * r) / 2; i++) {\r\n \tx = (float) (r * Math.cos( i * delta));\r\n \ty = (float) (r * Math.sin( i * delta));\r\n \tdrawSymmetricalPoints(Math.round(xC),Math.round(x),Math.round(yC),Math.round(y),g);\r\n \t\t\r\n \t}\r\n \r\n }", "public void draw(){\n\t\tSystem.out.println(\"You are drawing a CIRCLE\");\n\t}", "public Circle() {\r\n this.radius = 0.0;\r\n this.center = new Point();\r\n }", "public Circle() {\n radius = 1.0;\n color = \"red\";\n }", "public WorldImage draw() {\n return new CircleImage(this.size, OutlineMode.SOLID, this.color);\n }", "public void draw() {\n\t\tapplyColors();\n\n\t\tfloat halfHeight = height / 2,\n\t\t\t\tdiameter = 2 * radius;\n\n\t\tRobotRun.getInstance().translate(0f, 0f, halfHeight);\n\t\t// Draw top of the cylinder\n\t\tRobotRun.getInstance().ellipse(0f, 0f, diameter, diameter);\n\t\tRobotRun.getInstance().translate(0f, 0f, -height);\n\t\t// Draw bottom of the cylinder\n\t\tRobotRun.getInstance().ellipse(0f, 0f, diameter, diameter);\n\t\tRobotRun.getInstance().translate(0f, 0f, halfHeight);\n\n\t\tRobotRun.getInstance().beginShape(RobotRun.TRIANGLE_STRIP);\n\t\t// Draw a string of triangles around the circumference of the Cylinders top and bottom.\n\t\tfor (int degree = 0; degree <= 360; ++degree) {\n\t\t\tfloat pos_x = RobotRun.cos(RobotRun.DEG_TO_RAD * degree) * radius,\n\t\t\t\t\tpos_y = RobotRun.sin(RobotRun.DEG_TO_RAD * degree) * radius;\n\n\t\t\tRobotRun.getInstance().vertex(pos_x, pos_y, halfHeight);\n\t\t\tRobotRun.getInstance().vertex(pos_x, pos_y, -halfHeight);\n\t\t}\n\n\t\tRobotRun.getInstance().endShape();\n\t}", "public Circle() {\n radius = 1.0;\n color = \"red\";\n }", "public Circle() {\n\t\tr=0.0; //by defalut set radius to something so we have a circle \n\t}", "public Circle(double radius){\n this.radius = radius;\n }", "@Override\r\n\tpublic void paintComponent(Graphics g)\r\n\t{\r\n\t\t// Get the width and height of the component window\r\n\t\twidth = getWidth();\r\n\t\theight = getHeight();\t\t\t\t\r\n\t\t\r\n\t\tGraphics2D g2 = (Graphics2D) g;\r\n\t\tgenerateCircles();\r\n\t\tdrawCircles(g2);\r\n\t}", "public Circle(){\n\t\t\n\t\tradius = 1.0;\n\t\tcolor =\"Red\";\n\t}", "private void drawCircle(int radius) {\n if (mCircle != null) {\n mCircle.remove();\n }\n // We defined a new circle center options with location and radius\n mCircleOptions.center(new LatLng(mLocation.getLatitude(), mLocation.getLongitude())).radius(radius); // In meters\n // We add here to the map the new circle\n mCircle = mGoogleMap.addCircle(mCircleOptions);\n }", "public Circle(Point o, double r) {\n origin = new Point(o);\n radius = r;\n }", "public Circle(){}", "private void drawCircle( Graphics2D g2, Point2D.Double point, Color colour, double radius, boolean fill )\r\n {\r\n double x = translateX( point.getX() ); // Adjusted with the view\r\n double y = translateY( point.getY() ); // Adjusted with the view\r\n \r\n double diam = radius * 2;\r\n \r\n Ellipse2D.Double circle = new Ellipse2D.Double( x-(diam/2), y-(diam/2), diam, diam );\r\n \r\n g2.setColor( colour );\r\n \r\n if( fill )\r\n g2.fill( circle );\r\n else\r\n g2.draw( circle );\r\n }", "SimpleCircle() {\n\t\tradius = 1;\n\t}", "SimpleCircle() {\n\t\tradius=1;\n\t}", "public Circle(double r) {\n this.r = r;\n }", "public void paintComponent(Graphics g)\r\n\t{\r\n\t\tCircle c1 = new Circle(3);\r\n\t\tCircle c2 = c1;\r\n\t\tc1.setRadius(4);\r\n\t\tSystem.out.println(c2.getRadius());\r\n\r\n\t}", "public void draw(GraphicsContext gc) {\r\n gc.setStroke(Color.BLACK);\r\n gc.setFill(Color.BLUE);\r\n gc.setLineWidth(5.0);\r\n double r = radius / 2;\r\n gc.fillRect(x - r, y - r, radius * 2, radius * 2);\r\n gc.strokeRect(x - r, y - r, radius * 2, radius * 2);\r\n }", "public Circle(Circle circle) {\n this.center = circle.center;\n this.radius = circle.radius;\n }", "public Circle(float centerX, float centerY, float radius) {\n this.center = new Vector2(centerX, centerY);\n this.radius = radius;\n }", "public void drawCircle(double radius,LatLng place, GoogleMap map){\n CircleOptions circleOptions = new CircleOptions();\n circleOptions.center(place);\n circleOptions.radius(radius);\n circleOptions.strokeColor(Color.BLACK);\n circleOptions.fillColor(0x30000000);\n circleOptions.strokeWidth(1);\n circle=map.addCircle(circleOptions);\n }", "public Circle(double r) {\n this.r = r;\n this.center = new Point(0,0);\n }", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"Inside draw of Circle ..Point is: \"+center.getX() +\",\"+center.getY());\n\t}", "public Circle(double radius){\n\t\tradius =this.radius;\n\t\tcolor =\"Red\";\n\t}", "@Override\r\n\tpublic boolean isCircle() {\n\t\treturn false;\r\n\t}", "public boolean isCircle();", "public Circle(double r) {\n radius = r;\n color = \"red\";\n }", "public static boolean circleCircle(GameObject obj1, GameObject obj2) {\r\n\t\r\n\t\t//get both objects radii\r\n\t\tfloat obj1_radius = obj1.getScale() * EnvironmentVariables.getMeter() / 2;\r\n\t\tfloat obj2_radius = obj2.getScale() * EnvironmentVariables.getMeter() / 2;\r\n\t\t\r\n\t\t//check if distance between centers is less that combined radii\r\n\t\tif(Math.abs((obj1.getX() - obj2.getX()) * (obj1.getX() - obj2.getX()) + (obj1.getY() - obj2.getY()) * (obj1.getY() - obj2.getY())) <=\r\n\t\t\t\t(obj1_radius + obj2_radius) * (obj1_radius + obj2_radius)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public void drawCircle(int RGB, int startX, int startY, int radius) {\n\t\tfor (int i = 0; i < 360; i++) {\n\t\t\tfloat x_off = (radius / 2) * (float) Math.cos(i * Math.PI / 180);\n\t\t\tfloat y_off = (radius / 2) * (float) Math.sin(i * Math.PI / 180);\n\t\t\tdrawPixel(RGB, (int) (startX + (radius / 2) + x_off), (int) (startY\n\t\t\t\t\t+ (radius / 2) + y_off));\n\t\t}\n\t}", "public void draw() {\n\t\tSystem.out.println(getMessageSource().getMessage(\"greeting2\", null, null));\r\n\r\n\t\tSystem.out.println(getMessageSource().getMessage(\"drawing.circle\", null, null));\r\n\t\tSystem.out.println(\"Center's Coordinates: (\" + getCenter().getX() + \", \" + getCenter().getY() + \")\");\r\n\t\tSystem.out.println(getMessageSource().getMessage(\"drawing.center\",\r\n\t\t\t\tnew Object[] { getCenter().getX(), getCenter().getY() }, \"Default point coordinates msg\", null));\r\n\t}", "public Circle(double r) {\n radius = r;\n color = \"red\";\n }", "public Circle(int x, int y, int r, Color c) {\n super(x-r,y-r);\n color = c;\n name = \"Circle\";\n width = 2*r;\n height = 2*r;\n radius = r;\n }", "@Override\n public void paintComponent() {\n Graphics2D graphics = gameInstance.getGameGraphics();\n graphics.setColor(Color.ORANGE);\n\n final int diff = (PacmanGame.GRID_SIZE/2) - pointCircleRadius;\n graphics.fill(new Ellipse2D.Double(this.x + diff, this.y + diff, pointCircleRadius*2, pointCircleRadius*2));\n }", "public Circle(double radius) {\n super(\"white\", true);\n this.radius = radius;\n }", "public void clearCircle();", "public Coordinate getCircle();", "@Override\n\tpublic void draw(int radus,int x, int y) {\n\t\tSystem.out.printf(\"draw red circle in %d ,%d by radus is %d %n\",x,y,radus);\n\t}", "public void showCircle(double x, double y, double rad, char col) {\n\t \tsetFillColour(colFromChar(col));\t\t\t\t\t\t\t\t\t// set the fill colour\r\n\t\t\tgc.fillArc(x-rad, y-rad, rad*2, rad*2, 0, 360, ArcType.ROUND);\t// fill circle\r\n\t\t\t\r\n\t}", "public void draw() {\n for (Point2D p: mPoints) {\n StdDraw.filledCircle(p.x(), p.y(), 0.002);\n }\n }", "public void drawRandomCircles() {\n Line[] lines = makeTenRandomLines();\n GUI gui = new GUI(\"Random Circles Example\", 400, 300);\n DrawSurface d = gui.getDrawSurface();\n drawLinesAndMiddle(lines, d);\n Point[] points = findAllIntersectPoints(lines);\n drawAllIntersections(points, d);\n\n gui.show(d);\n }", "private Circle drawHalo(int x, int y, double radius)\r\n\t{\r\n\t\treturn lang.newCircle(getStarPosition(x, y), (int) (radius * starOffset), \"halo\" + x + \"\" + y, null, halos);\r\n\t}", "public void fillCircle(Graphics g, int x, int y, int radius)\n\t{\n\t\tg.fillOval(x - radius, y - radius, 2 * radius, 2 * radius);\n\t}", "public Circle(double r)\n {\n setRad(r);\n\n }", "public Circle(Vector3d center, double radius) {\n this.x = center.x;\n this.y = center.y;\n this.z = center.z;\n this.radius = radius;\n pos = Vector3d.createVector3d(x, y, z);\n }", "@Override\n public void display(GLAutoDrawable drawable) {\n GL2 gl = drawable.getGL().getGL2();\n gl.glClear(GL2.GL_COLOR_BUFFER_BIT);\n\n DrawCircle(gl, 50, 50, 400);\n \n }", "@Override\n\tpublic String getName() {\n\t\treturn \"Circle\";\n\t}", "public Circle(double x, double y, double z, double radius) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.radius = radius;\n pos = Vector3d.createVector3d(x, y, z);\n }", "public Circle(int x, int y, int r) {\n super(x-r,y-r);\n name = \"Circle\";\n width = 2*r;\n height = 2*r;\n radius = r;\n }", "public Circle(Vector2 center, float radius) {\n this.center = center;\n this.radius = radius;\n }", "@Override\n public void draw() {\n super.draw(); \n double radius = (this.getLevel() * 0.0001 + 0.025) * 2.5e10;\n double x = this.getR().cartesian(0) - Math.cos(rot) * radius;\n double y = this.getR().cartesian(1) - Math.sin(rot) * radius;\n StdDraw.setPenRadius(0.01);\n StdDraw.setPenColor(StdDraw.RED);\n StdDraw.point(x, y);\n \n }", "public Circle(double radius) throws ShapeException {\n if (radius > 0) {\n this.radius = radius;\n } else {\n throw new ShapeException(\"Invalid radius!\");\n }\n }", "public Circle()\r\n\t{\r\n\t\tradius = 0.0;\r\n\t}", "public Circle drawCircle(GoogleMap map, LatLng latLng){\n map.clear();\n return map.addCircle(new CircleOptions()\n .center(latLng)\n .strokeColor(Color.BLUE)\n .strokeWidth(1)\n .radius(0)\n .fillColor(Color.parseColor(\"#500084d3\")));\n }", "public Circle(double r, Point center) {\n this.r = r;\n this.center = center;\n }", "public Circle() {\n super(new GeoCircle(), FeatureTypeEnum.GEO_CIRCLE);\n this.setFillStyle(null);\n }", "public Circle(int r) {\n\t\tthis.radius = r;\n\t}", "public Circle(double radius,String c){\n\t\tradius = this.radius;\n\t\tcolor =c;\n\t}", "@Override\n public boolean isCircle() {\n return mIsCircle;\n }", "public Circle(double r)\r\n\t{\r\n\t\tradius=r;\r\n\t}", "public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n Iterator<Circle> circleIterator = circleArrayList.iterator();\n Circle drawCircle;\n\n // iterate through the ArrayList\n while (circleIterator.hasNext()) {\n drawCircle = circleIterator.next();\n drawCircle.draw(g); // draw each circle\n }\n\n }", "@Override\n public void paintComponent(Graphics gg){\n \tGraphics2D g = (Graphics2D) gg;\n \tg.setColor(new Color(0,0,0));\n \tg.fillRect(0, 0, width, height);\n \t/// Draw Functions ///\n \t//menus.drawMenus(g);\n \t/// Rest ///\n \tfor(PhysicsObject obj: objects){\n \t\tobj.drawSelf(g);\n \t}\n \tg.setColor(new Color(255,255,255));\n \tg.fillOval(mx-3, my-3, 5, 5);\n }", "protected void paintClock(){\n\t\tdouble clockRadius = Math.min(width, height) * 0.8 * 0.5;\n\t\tdouble centerX = width / 2;\n\t\tdouble centerY = height / 2;\n\t\t//Draw circle \n\t\tCircle circle = new Circle(centerX, centerY, clockRadius);\n\t\tcircle.setFill(Color.WHITE);\n\t\tcircle.setStroke(Color.BLACK);\n\t\t\n\t\tText t1 = new Text(centerX - 5, centerY - clockRadius + 12, \"12\");\n\t\t\n\t}", "public void drawShape(Shape shape);", "public void draw(){\n if(isVisible) {\n double diameter = calcularLado(area);\n double side = 2*diameter;\n Canvas circle = Canvas.canvas;\n circle.draw(this, color, \n new Ellipse2D.Double(xPosition, yPosition, \n (int)diameter, side));\n }\n }", "public void draw(Graphics g) {\n int x = super.getX();\n int y = super.getY();\n int d = (int)radius*2; //d = diameter\n g.setColor(Color.BLACK);\n g.drawOval(265/2,235,265,265);\n g.drawLine(265, 115, 265, 500);\n\n int [ ] x2 = {27, 500, 265}; //lets work on that line?\n int [ ] y2 = {500, 500, 115};\n g.setColor(Color.black);\n g.drawPolygon(x2, y2, 3);\n\n }", "@Override\n public String getName() {\n return \"Circle\";\n }", "public Circle(double radius, Point center) {\r\n this.radius = radius;\r\n this.center = center;\r\n }", "Circle(int radius) {\n\t\tsuper(radius);\n\t\tSystem.out.println(\"The area of circle is \"+3.14*(radius*radius));\n\t}", "public void calling() {\n\t\tCircle tc = new Circle(new Coordinate(-73, 42), 0);\n\t\tif (PaintShapes.painting && logger.isDebugEnabled()) {\n\t\t\tPaintShapes.paint.color = PaintShapes.paint.redTranslucence;\n\t\t\tPaintShapes.paint.addCircle(tc);\n\t\t\tPaintShapes.paint.myRepaint();\n\t\t}\n\t\t\n//\t\tMap<Double, Coordinate>angle_coordinate=new HashMap<Double, Coordinate>();\n//\t\tLinkedList<double[]>coverangle=new LinkedList<double[]>();\n//\t\tMap<Double[], Coordinate[]>uncoverArc=new HashMap<Double[], Coordinate[]>();\n//\t\tdouble a1[]=new double[2];\n//\t\ta1[0]=80;\n//\t\ta1[1]=100;\n//\t\tangle_coordinate.put(a1[0], new Coordinate(1, 0));\n//\t\tangle_coordinate.put(a1[1], new Coordinate(0, 1));\n//\t\tcoverangle.add(a1);\n//\t\tdouble a2[]=new double[2];\n//\t\ta2[0]=0;\n//\t\ta2[1]=30;\n//\t\tangle_coordinate.put(a2[0], new Coordinate(2, 0));\n//\t\tangle_coordinate.put(a2[1], new Coordinate(0, 2));\n//\t\tcoverangle.add(a2);\n//\t\tdouble a3[]=new double[2];\n//\t\ta3[0]=330;\n//\t\ta3[1]=360;\n//\t\tangle_coordinate.put(a3[0], new Coordinate(3, 0));\n//\t\tangle_coordinate.put(a3[1], new Coordinate(7, 7));\n//\t\tcoverangle.add(a3);\n//\t\tdouble a4[]=new double[2];\n//\t\ta4[0]=20;\n//\t\ta4[1]=90;\n//\t\tangle_coordinate.put(a4[0], new Coordinate(4, 0));\n//\t\tangle_coordinate.put(a4[1], new Coordinate(0, 4));\n//\t\tcoverangle.add(a4);\n//\t\tdouble a5[]=new double[2];\n//\t\ta5[0]=180;\n//\t\ta5[1]=240;\n//\t\tangle_coordinate.put(a5[0], new Coordinate(5, 0));\n//\t\tangle_coordinate.put(a5[1], new Coordinate(0, 5));\n//\t\tcoverangle.add(a5);\n//\t\tdouble a6[]=new double[2];\n//\t\ta6[0]=270;\n//\t\ta6[1]=300;\n//\t\tangle_coordinate.put(a6[0], new Coordinate(6, 0));\n//\t\tangle_coordinate.put(a6[1], new Coordinate(0, 6));\n//\t\tcoverangle.add(a6);\n//\t\tdouble a7[]=new double[2];\n//\t\ta7[0]=360;\n//\t\ta7[1]=360;\n//\t\tangle_coordinate.put(a7[0], new Coordinate(7, 7));\n//\t\tangle_coordinate.put(a7[1], new Coordinate(7, 7));\n//\t\tcoverangle.add(a7);\n//\t\t// sort the cover arc\n//\t\tint minindex = 0;\n//\t\tfor (int j = 0; j < coverangle.size() - 1; j++) {\n//\t\t\tminindex = j;\n//\t\t\tfor (int k = j + 1; k < coverangle.size(); k++) {\n//\t\t\t\tif (coverangle.get(minindex)[0] > coverangle.get(k)[0]) {\n//\t\t\t\t\tminindex = k;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tdouble tem[] = new double[2];\n//\t\t\ttem = coverangle.get(j);\n//\t\t\tcoverangle.set(j, coverangle.get(minindex));\n//\t\t\tcoverangle.set(minindex, tem);\n//\t\t}\n//\t\tfor(int ii=0;ii<coverangle.size();ii++){\n//\t\t\tdouble aa[]=coverangle.get(ii);\n//\t\t\tSystem.out.println(aa[0]+\" \"+aa[1]);\n//\t\t}\n//\t\tSystem.out.println(\"----------------------------\");\n//\t\t// find the uncover arc\n//\t\tint startposition = 0;\n//\t\twhile (startposition < coverangle.size() - 1) {\n//\t\t\tdouble coverArc[] = coverangle.get(startposition);\n//\t\t\tboolean stop = false;\n//\t\t\tint m = 0;\n//\t\t\tfor (m = startposition + 1; m < coverangle.size() && !stop; m++) {\n//\t\t\t\tdouble bb[] = coverangle.get(m);\n//\t\t\t\tif (bb[0] <= coverArc[1]) {\n//\t\t\t\t\tcoverArc[0] = Math.min(coverArc[0], bb[0]);\n//\t\t\t\t\tcoverArc[1] = Math.max(coverArc[1], bb[1]);\n//\t\t\t\t} else {\n//\t\t\t\t\tCoordinate uncover[]=new Coordinate[2];\n//\t\t\t\t\t//record the consistant uncover angle\n//\t\t\t\t\tDouble[] uncoverA=new Double[2];\n//\t\t\t\t\tuncoverA[0]=coverArc[1];\n//\t\t\t\t\tuncoverA[1]=bb[0];\n//\t\t\t\t\tIterator<Map.Entry<Double, Coordinate>> entries = angle_coordinate\n//\t\t\t\t\t\t\t.entrySet().iterator();\n//\t\t\t\t\twhile (entries.hasNext()) {\n//\t\t\t\t\t\tMap.Entry<Double, Coordinate> entry = entries.next();\n//\t\t\t\t\t\tif (entry.getKey() == coverArc[1])\n//\t\t\t\t\t\t\tuncover[0] = entry.getValue();\n//\t\t\t\t\t\telse if (entry.getKey() == bb[0])\n//\t\t\t\t\t\t\tuncover[1] = entry.getValue();\n//\t\t\t\t\t}\n//\t\t\t\t\tuncoverArc.put(uncoverA, uncover);\n//\t\t\t\t\tstartposition = m;\n//\t\t\t\t\tstop = true;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tif(m==coverangle.size()){\n//\t\t\t\tstartposition=m;\n//\t\t\t}\n//\t\t}\n//\t\n//\t\tSystem.out.println(uncoverArc.entrySet().size());\n//\t\tint n=uncoverArc.entrySet().size();\n//\t\tint k=2;\n//\t\twhile(n>0){\n//\t\t\tIterator<Map.Entry<Double[],Coordinate[]>>it=uncoverArc.entrySet().iterator();\n//\t\t\tMap.Entry<Double[], Coordinate[]>newneighbor=it.next();\n//\t\t\tSystem.out.println(newneighbor.getKey()[0]+\" \"+newneighbor.getValue()[0]);\n//\t\t\tSystem.out.println(newneighbor.getKey()[1]+\" \"+newneighbor.getValue()[1]);\n//\t\t uncoverArc.remove(newneighbor.getKey());\n//\t\t \n//\t\tif(k==2){\n//\t\tDouble[] a8=new Double[2];\n//\t\ta8[0]=(double)450;\n//\t\ta8[1]=(double)500;\n//\t\tCoordinate a9[]=new Coordinate[2];\n//\t\ta9[0]=new Coordinate(9, 0);\n//\t\ta9[1]=new Coordinate(0, 9);\n//\t\tuncoverArc.put(a8, a9);\n//\t\tk++;\n//\t\t}\n//\t\tn=uncoverArc.entrySet().size();\n//\t\tSystem.out.println(\"new size=\"+uncoverArc.entrySet().size());\n//\t\t}\n//\t\t\t\n\t\t\t\n\t\t\n\t\t/***************new test*************************************/\n//\t\tCoordinate startPoint=new Coordinate(500, 500);\n//\t\tLinkedList<VQP>visitedcircle_Queue=new LinkedList<VQP>();\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(500, 500), 45));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(589, 540), 67));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(500, 550), 95));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(439, 560), 124));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(460, 478), 69));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(580, 580), 70));\n//\t\tIterator<VQP>testiterator=visitedcircle_Queue.iterator();\n//\t\twhile(testiterator.hasNext()){\n//\t\t\tVQP m1=testiterator.next();\n//\t\t\tCircle tm=new Circle(m1.getCoordinate(), m1.getRadius());\n//\t\t\tif (PaintShapes.painting && logger.isDebugEnabled()) {\n//\t\t\t\tPaintShapes.paint.color = PaintShapes.paint.redTranslucence;\n//\t\t\t\tPaintShapes.paint.addCircle(tm);\n//\t\t\t\tPaintShapes.paint.myRepaint();\n//\t\t\t}\n//\t\t\t\n//\t\t}\n//\t\tdouble coverradius=calculateIncircle(startPoint, visitedcircle_Queue);\n//\t\tCircle incircle=new Circle(startPoint, coverradius);\n//\t\tif (PaintShapes.painting && logger.isDebugEnabled()) {\n//\t\t\tPaintShapes.paint.color = PaintShapes.paint.blueTranslucence;\n//\t\t\tPaintShapes.paint.addCircle(incircle);\n//\t\t\tPaintShapes.paint.myRepaint();\n//\t\t}\n//\t\t/***************end test*************************************/\n\t\tEnvelope envelope = new Envelope(-79.76259, -71.777491,\n\t\t\t\t40.477399, 45.015865);\n\t\tdouble area=envelope.getArea();\n\t\tdouble density=57584/area;\n\t\tSystem.out.println(\"density=\"+density);\n\t\tSystem.out.println(\"end calling!\");\n\t}", "public static void render(FPoint2 viewPt) {\n V.fillCircle(viewPt, V.getScale() * .4);\n }", "public void draw()\n {\n Rectangle hatbox = new Rectangle(x, y, 20, 20);\n hatbox.fill();\n Rectangle brim = new Rectangle(x-10, y+20, 40, 0);\n brim.draw();\n Ellipse circle = new Ellipse (x, y+20, 20, 20);\n circle.draw();\n Ellipse circle2 = new Ellipse (x-10, y+40, 40, 40);\n circle2.draw();\n Ellipse circle3 = new Ellipse (x-20, y+80, 60, 60);\n circle3.draw();\n \n }", "public Circle(double radius){ // 2 constructor\n this.radius = radius;\n this.color = DEFAULT_COLOR;\n }", "public Circle getCircle(){\n return circleObj;\n }", "private void drawRoundHead(Canvas canvas, int centerX, int centerY, float degree, int radius, int color){\n double radian = degree * Math.PI / 180;\n double drawX = centerX + Math.cos(radian) * DOWNLOAD_ARC_DRAW_R;\n double drawY = centerY + Math.sin(radian) * DOWNLOAD_ARC_DRAW_R;\n Paint paint = new Paint();\n paint.setColor(color);\n paint.setAntiAlias(true);\n canvas.drawCircle((float)drawX, (float)drawY, radius, paint);\n }", "public Circle(double givenRadius)\n\t{\n\t\tradius = givenRadius;\n\t}", "public Circle(){ // 1 constructor\n this.radius = DEFAULT_RADIUS;\n this.color = DEFAULT_COLOR;\n }", "public void Draw() {\n \tapp.fill(this.r,this.g,this.b);\n\t\tapp.ellipse(posX, posY, 80, 80);\n\n\t}", "public Circle(IGeoCircle renderable) {\n super(renderable, FeatureTypeEnum.GEO_CIRCLE);\n\n if(null == renderable) {\n throw new IllegalArgumentException(\"Encapsulated GeoCircle must be non-null\");\n }\n this.setRadius(makePositive(this.getRadius(), \"Invalid radius. NaN\"));\n\n if (this.getRadius() < MINIMUM_RADIUS) {\n throw new IllegalArgumentException(\"Invalid radius. \" + this.getRadius() + \" Minimum supported \" + MINIMUM_RADIUS);\n }\n }", "private void doCircle()\n\t{\n\t\tubisenseData = new UbisenseMockupData();\n\t\tDecimalFormat df = new DecimalFormat(\"#0,00\");\n\n\t\telapsedTime = 0;\n\t\t\n\t\tubisenseData.setTagID(Helper.DEFAULT_TAG_ID);\n\t\tubisenseData.setUnit(Helper.UBISENSE_UNIT);\n\t\tubisenseData.setOntology(Helper.LP_ONTOLOGY_URL);\n\t\tubisenseData.setVersion(Helper.UBISENSE_VERSION);\n\t\tubisenseData.setId(\"\");\n\t\tubisenseData.setSendTime(sendTime);\n\n\t\tlong millis = startDate.getMillis();\n\t\tmillis += offset.toStandardDuration().getMillis();\n//\t\tmillis += parentOffset.toStandardDuration().getMillis();\n\t\t\n\t\t//Radianten des Winkels berechnen\n\t\tdouble radiant = Math.toRadians(arc);\n\t\t\n\t\t// Distanz d berechnen, die auf dem Kreis zurückgelegt werden soll\n\t\tdouble d = Math.PI * radius * (arc / 180);\n\t\t\n\t\t// Zeit t [s] berechnen, die für die Distanz d unter gegebener Geschwindigkeit benötigt wird.\n\t\tdouble t = d / toolSpeed;\n\t\tdouble steps = Math.ceil(t) +1;\n\n\t\t//Startkoordinaten berechnen\n\t\tint startX, startY;\n\t\tstartX = x1;\n\t\tstartY = y1 + radius;\n\t\t\n\t\twhile(steps > 0 && !terminate)\n\t\t{\n\t\t\tdouble x,y, currentTime=0, currentArc = 0;\n\t\t\tif (t != 0)\n\t\t\tcurrentTime = elapsedTime / t;\n\n\t\t\tcurrentArc = radiant * currentTime;\n\t\t\t\n\t\t\tx = (startX - x1) * Math.cos(currentArc) - (startY - y1) * Math.sin(currentArc) + x1;\n\t\t\ty = (startX - x1) * Math.sin(currentArc) + (startY - y1) * Math.cos(currentArc) + y1;\n\n\t\t\tubisenseData.setPosition(new Point3D(\tDouble.parseDouble(df.format(x)),\n\t\t\t \tDouble.parseDouble(df.format(y)),\n\t\t\t\t\t\t\t\t\t\t\t\t\t1.6));\n\t\t\tubisenseData.setId(String.valueOf(Helper.getRandomInt()));\n\t\t\tubisenseData.setTime(millis + (long) (elapsedTime*SLEEP_INTERVAL));\n\t\t\t\n\t\t\tEntryEvent event = new EntryEvent(this);\n\t\t\tnotifyListeners(event);\n\t\t\telapsedTime++;\n\t\t\tif (elapsedTime > t)\n\t\t\t\telapsedTime = t;\n\t\t\t\n\t\t\tsteps--;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (speed > 0)\n\t\t\t\t\tThread.sleep(SLEEP_INTERVAL/speed);\n\t\t\t}\n\t\t\tcatch (InterruptedException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public Circle(){\r\n\t \t// System.out.println(\"Default constructor dipanggil.\");\r\n\t \tjejari = 1;\r\n\t \tx = 5;\r\n\t \tbilObjekWujud++;\r\n\t }" ]
[ "0.7395534", "0.7108087", "0.686288", "0.6789004", "0.6766625", "0.67656374", "0.67013913", "0.6626416", "0.6589706", "0.65459275", "0.651763", "0.65075016", "0.64961815", "0.6429809", "0.6429331", "0.6413182", "0.6256972", "0.6248266", "0.6247675", "0.6222392", "0.6204051", "0.61975616", "0.6121147", "0.6120957", "0.6120099", "0.6120055", "0.6117737", "0.60727984", "0.6071937", "0.6052685", "0.6031026", "0.6028648", "0.60128915", "0.600651", "0.60046756", "0.5999664", "0.59960574", "0.59865403", "0.59807235", "0.5960615", "0.5947913", "0.594649", "0.5935704", "0.59323937", "0.5911244", "0.5909214", "0.5889605", "0.58810955", "0.5879404", "0.58771366", "0.58695394", "0.58669496", "0.58657813", "0.5865045", "0.5860939", "0.5860249", "0.58496314", "0.5832035", "0.58318484", "0.5826271", "0.5821763", "0.5808318", "0.577839", "0.5776007", "0.57334554", "0.5729489", "0.57282954", "0.57276106", "0.5714947", "0.5709548", "0.57089114", "0.570785", "0.5707556", "0.56920743", "0.5690841", "0.56857103", "0.56825316", "0.56807643", "0.56701964", "0.5665656", "0.5660226", "0.5636634", "0.56275797", "0.5612568", "0.56084514", "0.5607591", "0.5601413", "0.5592344", "0.5586336", "0.5584678", "0.5568482", "0.55614865", "0.5553895", "0.55456275", "0.5542073", "0.5533089", "0.5527129", "0.5526675", "0.55160624", "0.5512202", "0.5498069" ]
0.0
-1
Get the spaceship outline as a polygon
private static void drawPolygon(Graphics g, IPolygon polygonObj, long extrapolateTime) { Polygon polygon = polygonObj.getOutline(extrapolateTime); // Fill and draw outline g.fillPolygon(polygon); g.drawPolygon(polygon); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Polygon getPolygon() throws NoninvertibleTransformException {\n ArrayList closedPoints = new ArrayList(getCoordinates());\n\n if (!closedPoints.get(0).equals(closedPoints.get(closedPoints.size() - 1))) {\n closedPoints.add(new Coordinate((Coordinate) closedPoints.get(0)));\n }\n\n return new GeometryFactory().createPolygon(\n new GeometryFactory().createLinearRing(toArray(closedPoints)),\n null);\n }", "public Polygon getOutline(long extrapolateTime);", "public Polygon getTriangle() {\n\n Matrix4 normalProjection = new Matrix4().setToOrtho2D(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n\n spriteDebugger.setProjectionMatrix(normalProjection);\n spriteDebugger.begin(ShapeRenderer.ShapeType.Line);\n spriteDebugger.polygon(getLine().getVertices());\n spriteDebugger.setColor(Color.PURPLE);\n spriteDebugger.end();\n\n spriteDebugger.end();\n return getLine();\n }", "public Shape getAreaColision();", "public Polygon getLine() {\n float[] vertices;\n if (modo == 1) {\n\n vertices = new float[]{\n getX(), getY(),\n getX() + (getWidth()*0.2f), getY() + getHeight()-getHeight()*0.2f,\n getX() + getWidth(), getY() + getHeight()};\n } else if (modo == 2) {\n\n vertices = new float[]{\n getX() + getWidth()- getWidth()*0.2f , getY() + getHeight() - getHeight()*0.2f,\n getX() + getWidth(), getY(),\n getX() , getY() + getHeight(),\n\n };\n\n } else if (modo == 3) {\n vertices = new float[]{\n getX(), getY(),\n getX() + getWidth() *0.8f, getY() + getHeight() *0.2f,\n getX() + getWidth(), getY() + getHeight()\n };\n } else {\n vertices = new float[]{\n getX(), getY() + getHeight(),\n getX() + getWidth()*0.2f, getY() + getHeight()*0.2f,\n getX() + getWidth(), getY()\n };\n }\n\n polygon.setVertices(vertices);\n return polygon;\n }", "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 }", "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 List<Triangle2D> tesselatePolygon(Polygon2D poly);", "public List<ga_Triangle2D> tesselatePolygon(ga_Polygon poly);", "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}", "public abstract Polygon4D project();", "static Polygon vectorsToPolygon(Vector2DLong[] physOutline) {\n\t\tint[] xPoints = new int[physOutline.length];\n\t\tint[] yPoints = new int[physOutline.length];\n\t\tfor (int i = 0; i < physOutline.length; i++) {\n\t\t\txPoints[i] = PhysicsConstants.distanceToPixels(physOutline[i].x);\n\t\t\tyPoints[i] = PhysicsConstants.distanceToPixels(physOutline[i].y);\n\t\t}\n\t\treturn new Polygon(xPoints, yPoints, physOutline.length);\n\t}", "public Geometry creatPolygon(FOV f) {\n\t\tCoordinate[] coordinates = new Coordinate[] {\r\n\t\t\t\tnew Coordinate(f.getPolygon().getLocation().getX(), f.getPolygon().getLocation().getY()),\r\n\t\t\t\tnew Coordinate(f.getPolygon().getP1().getX(), f.getPolygon().getP1().getY()),\r\n\t\t\t\tnew Coordinate(f.getPolygon().getP2().getX(), f.getPolygon().getP2().getY()),\r\n\t\t\t\tnew Coordinate(f.getPolygon().getP3().getX(), f.getPolygon().getP3().getY()),\r\n\t\t\t\tnew Coordinate(f.getPolygon().getP4().getX(), f.getPolygon().getP4().getY()),\r\n\t\t\t\tnew Coordinate(f.getPolygon().getLocation().getX(), f.getPolygon().getLocation().getY()) };\r\n\t\t// use the default factory, which gives full double-precision\r\n\t\tGeometry g1 = new GeometryFactory().createPolygon(coordinates);\r\n\t\treturn g1;\r\n\t}", "public static com.vividsolutions.jts.geom.Polygon surface2JTS(IomObject obj,double strokeP) //SurfaceOrAreaType type)\n\tthrows Iox2jtsException\n\t{\n\t\tif(obj==null){\n\t\t\treturn null;\n\t\t}\n\t\tcom.vividsolutions.jts.geom.Polygon ret=null;\n\t\t//IFMEFeatureVector bndries=session.createFeatureVector();\n\t\tboolean clipped=obj.getobjectconsistency()==IomConstants.IOM_INCOMPLETE;\n\t\tif(clipped){\n\t\t\tthrow new Iox2jtsException(\"clipped surface not supported\");\n\t\t}\n\t\tfor(int surfacei=0;surfacei<obj.getattrvaluecount(Iom_jObject.MULTISURFACE_SURFACE);surfacei++){\n\t\t\tif(clipped){\n\t\t\t\t//out.startElement(\"CLIPPED\",0,0);\n\t\t\t}else{\n\t\t\t\t// an unclipped surface should have only one surface element\n\t\t\t\tif(surfacei>0){\n\t\t\t\t\tthrow new Iox2jtsException(\"unclipped surface with multi 'surface' elements\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tIomObject surface=obj.getattrobj(Iom_jObject.MULTISURFACE_SURFACE,surfacei);\n\t\t\tcom.vividsolutions.jts.geom.LinearRing shell=null;\n\t\t\tcom.vividsolutions.jts.geom.LinearRing holes[]=null;\n\t\t\tint boundaryc=surface.getattrvaluecount(Iom_jObject.SURFACE_BOUNDARY);\n\t\t\tif(boundaryc>1){\n\t\t\t\tholes=new com.vividsolutions.jts.geom.LinearRing[boundaryc-1];\t\t\t\t\n\t\t\t}\n\t\t\tfor(int boundaryi=0;boundaryi<boundaryc;boundaryi++){\n\t\t\t\tIomObject boundary=surface.getattrobj(Iom_jObject.SURFACE_BOUNDARY,boundaryi);\n\t\t\t\t//IFMEFeature fmeLine=session.createFeature();\n\t\t\t\tcom.vividsolutions.jts.geom.CoordinateList jtsLine=new com.vividsolutions.jts.geom.CoordinateList();\n\t\t\t\tfor(int polylinei=0;polylinei<boundary.getattrvaluecount(Iom_jObject.BOUNDARY_POLYLINE);polylinei++){\n\t\t\t\t\tIomObject polyline=boundary.getattrobj(Iom_jObject.BOUNDARY_POLYLINE,polylinei);\n\t\t\t\t\tjtsLine.addAll(polyline2JTS(polyline,true,strokeP));\n\t\t\t\t}\n\t\t\t\tjtsLine.closeRing();\n\t\t\t\tif(boundaryi==0){\n\t\t\t\t\tshell=new com.vividsolutions.jts.geom.GeometryFactory().createLinearRing(jtsLine.toCoordinateArray());\n\t\t\t\t}else{\n\t\t\t\t\tholes[boundaryi-1]=new com.vividsolutions.jts.geom.GeometryFactory().createLinearRing(jtsLine.toCoordinateArray());\n\t\t\t\t}\n\t\t\t\t//bndries.append(fmeLine);\n\t\t\t}\n\t\t\tret=new com.vividsolutions.jts.geom.GeometryFactory().createPolygon(shell,holes);\n\t\t\tif(clipped){\n\t\t\t\t//out.endElement(/*CLIPPED*/);\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "public void drawArea(Graphics2D g, int width, int height, double minX,\n double minY, double maxX, double maxY) {\n upperX = maxX;\n lowerX = minX;\n\n upperY = maxY;\n lowerY = minY;\n //debug, drawLine bounds\n// g.drawLine(XOffSet, YOffSet, width, YOffSet);\n// g.drawLine(XOffSet, height, width, height); //X\n//\n// g.drawLine(XOffSet, YOffSet, XOffSet, height);\n// g.drawLine(width, YOffSet, width, height); //Y\n\n double Xscale = GetXScale(width);\n double Yscale = GetYScale(height);\n int centerX = getCenterX(width);\n int centerY = getCenterY(height);\n\n //drawGrid(g, width, height, minX, minY, maxX, maxY);\n\n //create a polygon for every area between two zeros\n g.setColor(LineColor);\n //ArrayList<Polygon> p = new ArrayList<>();\n Polygon p = new Polygon();\n //p.add(new Polygon());\n g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,\n Opacity));\n //p.get(0).addPoint(XOffSet, getCenterY(height));\n p.addPoint(XOffSet, getCenterY(height));\n for (int i = 0; i <= PointArray.length - 2; i += 2) {\n double x = ((PointArray[i] * Xscale) + centerX);\n double y = ((centerY) - (PointArray[i + 1]) * Yscale);\n if (x == Double.POSITIVE_INFINITY || x == Double.NEGATIVE_INFINITY) {\n continue;\n }\n if (y == Double.POSITIVE_INFINITY || y == Double.NEGATIVE_INFINITY) {\n y = height - YOffSet;\n }\n //p.get(p.size() - 1).addPoint((int) x, (int) y);\n p.addPoint((int) x, (int) y);\n }\n //p.get(p.size() - 1).addPoint(width, getCenterY(height));\n p.addPoint(width, getCenterY(height));\n //for (int i = 0; i <= p.size() - 1; i++) {\n g.fill(p);//.get(i));\n //}\n g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1));\n drawLine(g, width, height, minX, minY, maxX, maxY);\n }", "public static int addPolygon(final DoubleList output, final double[][] input) {\n // create a square polygon\n // first triangle\n addPoint(output, input[RIGHT_TOP]);\n addPoint(output, input[LEFT_TOP]);\n addPoint(output, input[LEFT_BOTTOM]);\n // second triangle\n addPoint(output, input[LEFT_BOTTOM]);\n addPoint(output, input[RIGHT_BOTTOM]);\n addPoint(output, input[RIGHT_TOP]);\n // end add\n return GL2.GL_TRIANGLES;\n }", "@Override\n public Shape getShape() {\n myPencil.moveTo(getStartPoint().getX(), getStartPoint().getY());\n myPencil.lineTo(getEndPoint().getX(), getEndPoint().getY());\n setStartPoint(getEndPoint());\n \n return myPencil;\n }", "public ArrayList<Polygon> getPolygons ()\n\t{\n\t\treturn object;\n\t}", "public Shape createStrokedShape(Shape shape) {\n/* 140 */ GeneralPath result = new GeneralPath();\n/* 141 */ PathIterator it = new FlatteningPathIterator(shape.getPathIterator(null), 1.0D);\n/* 142 */ float[] points = new float[6];\n/* 143 */ float moveX = 0.0F, moveY = 0.0F;\n/* 144 */ float lastX = 0.0F, lastY = 0.0F;\n/* 145 */ float thisX = 0.0F, thisY = 0.0F;\n/* 146 */ int type = 0;\n/* 147 */ float next = 0.0F;\n/* 148 */ int phase = 0;\n/* 149 */ while (!it.isDone()) {\n/* 150 */ float dx, dy, distance; type = it.currentSegment(points);\n/* 151 */ switch (type) {\n/* */ case 0:\n/* 153 */ moveX = lastX = points[0];\n/* 154 */ moveY = lastY = points[1];\n/* 155 */ result.moveTo(moveX, moveY);\n/* 156 */ next = OutlineZigzagEffect.this.wavelength / 2.0F;\n/* */ break;\n/* */ \n/* */ case 4:\n/* 160 */ points[0] = moveX;\n/* 161 */ points[1] = moveY;\n/* */ \n/* */ \n/* */ case 1:\n/* 165 */ thisX = points[0];\n/* 166 */ thisY = points[1];\n/* 167 */ dx = thisX - lastX;\n/* 168 */ dy = thisY - lastY;\n/* 169 */ distance = (float)Math.sqrt((dx * dx + dy * dy));\n/* 170 */ if (distance >= next) {\n/* 171 */ float r = 1.0F / distance;\n/* 172 */ while (distance >= next) {\n/* 173 */ float x = lastX + next * dx * r;\n/* 174 */ float y = lastY + next * dy * r;\n/* 175 */ if ((phase & 0x1) == 0) {\n/* 176 */ result.lineTo(x + OutlineZigzagEffect.this.amplitude * dy * r, y - OutlineZigzagEffect.this.amplitude * dx * r);\n/* */ } else {\n/* 178 */ result.lineTo(x - OutlineZigzagEffect.this.amplitude * dy * r, y + OutlineZigzagEffect.this.amplitude * dx * r);\n/* 179 */ } next += OutlineZigzagEffect.this.wavelength;\n/* 180 */ phase++;\n/* */ } \n/* */ } \n/* 183 */ next -= distance;\n/* 184 */ lastX = thisX;\n/* 185 */ lastY = thisY;\n/* 186 */ if (type == 4) result.closePath(); \n/* */ break;\n/* */ } \n/* 189 */ it.next();\n/* */ } \n/* 191 */ return (new BasicStroke(OutlineZigzagEffect.this.getWidth(), 2, OutlineZigzagEffect.this.getJoin())).createStrokedShape(result);\n/* */ }", "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}", "@Test\n public void testPolygonExport(){\n fakeCoord.add(new Point2D.Double(0.10,0.20));\n VecCommandStack.push(VecCommandFactory.GetShapeCommand(VecCommandType.POLYGON, fakeCoord));\n String print = VecCommandStack.peek().PrintToFile();\n assertEquals(\"POLYGON 0.1 0.2 \\n\", print);\n }", "private GvgPolygon readPolygon(XmlPullParser parser) throws XmlPullParserException, IOException {\n\t\tparser.require(XmlPullParser.START_TAG, ns, \"polygon\");\n\n\t\tHashMap<String, String> attrs = getAttributesAsHashMap(parser);\n\t\tString points = attrs.get(\"points\");\n\t\tif(points == null) {\n\t\t\tmissingAttributeError(\"polygon\", \"points\");\n\t\t}\n\n\t\treturn new GvgPolygon(points, new GvgPaintStyle(attrs.get(\"style\")));\n\t}", "@Override\n\tpublic Polygon getCollisionShape() {\n\t\treturn null;\n\t}", "public SpaceShip() {\r\n\t\tsuper();\r\n\t\tthis.radius = 15;\r\n\t\tgameController.setSpaceShip(this);\r\n\t\tArrayList<Point> shipList = new ArrayList<Point>();\r\n\t\tshipList.add(new Point(-10, -10));\r\n\t\tshipList.add(new Point(-10, 10));\r\n\t\tshipList.add(new Point(15, 0));\r\n\t\tthis.addShape(new Polygon(shipList, Color.WHITE, false));\r\n\t\t// this.addShape(new Circle(radius, this.getCenterPoint().copy(),\r\n\t\t// Color.RED, false));\r\n\t}", "public Rectangle2D getBoundary()\n {\n \tRectangle2D shape = new Rectangle2D.Float();\n shape.setFrame(location.getX(),location.getY(),12,length);\n return shape;\n }", "private Geometry crackPolygonWithPointOrLine(Polygon polygon,\r\n\t\t\tGeometry geometry) {\r\n\t\tif (!(geometry instanceof LineString) && !(geometry instanceof Point))\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Este metodo solo funciona con puntos y lineas y se recibio \"\r\n\t\t\t\t\t\t\t+ geometry.getGeometryType());\r\n\t\tLinearRing shell = (LinearRing) polygon.getExteriorRing();\r\n\t\tLinearRing crackedShell = (LinearRing) JtsUtil.createGeometry(\r\n\t\t\t\tcrackTo(shell.getCoordinates(), geometry.getCoordinates()),\r\n\t\t\t\t\"LINEARRING\");\r\n\t\tint numberOfHoles = polygon.getNumInteriorRing();\r\n\t\tLinearRing[] crackedHoles = new LinearRing[numberOfHoles];\r\n\t\tfor (int i = 0; i < numberOfHoles; i++) {\r\n\t\t\tLinearRing hole = (LinearRing) polygon.getInteriorRingN(i);\r\n\t\t\tLinearRing crackedHole = (LinearRing) JtsUtil.createGeometry(\r\n\t\t\t\t\tcrackTo(hole.getCoordinates(), geometry.getCoordinates()),\r\n\t\t\t\t\t\"LINEARRING\");\r\n\t\t\tcrackedHoles[i] = crackedHole;\r\n\t\t}\r\n\t\treturn JtsUtil.GEOMETRY_FACTORY.createPolygon(crackedShell,\r\n\t\t\t\tcrackedHoles);\r\n\t}", "public Shape getClip()\r\n\t{\r\n\t\treturn _g2.getClip();\r\n\t}", "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}", "public String getAsSVGPath() {\n\n\t\tString d=\"M \"+topleft.x +\",\"+topleft.y+\" \"\n\t\t\t\t+\"L \"+bottomright.x+\",\"+topleft.y+\" \"\n\t\t\t\t+\"L \"+bottomright.x+\",\"+bottomright.y+\" \"\n\t\t\t\t+\"L \"+topleft.x +\",\"+bottomright.y+\" z\";\n\n\n\t\treturn d;\n\t}", "void drawInterior(DrawContext dc, Object shape);", "public Shape createShape(int x, int y) {\n\t\t\n\t\tColor colorMode = this.view.getColorPanel().getColor();\n\t\tint thickness = this.view.getToolPanel().getThickness();\n\t\tBoolean isFill = this.view.getToolPanel().getIsFilled();\n\t\t\n\t\tPolyline poly = new Polyline(colorMode,thickness,isFill);\n\t\t\n\t\tpoly.addPoint(new Point(x,y));\n\n\t\treturn poly;\n\t}", "public final java.util.List<org.xms.g.maps.model.PatternItem> getStrokePattern() {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.huawei.hms.maps.model.PolygonOptions) this.getHInstance()).getStrokePattern()\");\n java.util.List hReturn = ((com.huawei.hms.maps.model.PolygonOptions) this.getHInstance()).getStrokePattern();\n return ((java.util.List) org.xms.g.utils.Utils.mapCollection(hReturn, new org.xms.g.utils.Function<com.huawei.hms.maps.model.PatternItem, org.xms.g.maps.model.PatternItem>() {\n\n public org.xms.g.maps.model.PatternItem apply(com.huawei.hms.maps.model.PatternItem param0) {\n return new org.xms.g.maps.model.PatternItem(new org.xms.g.utils.XBox(null, param0));\n }\n }));\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.google.android.gms.maps.model.PolygonOptions) this.getGInstance()).getStrokePattern()\");\n java.util.List gReturn = ((com.google.android.gms.maps.model.PolygonOptions) this.getGInstance()).getStrokePattern();\n return ((java.util.List) org.xms.g.utils.Utils.mapCollection(gReturn, new org.xms.g.utils.Function<com.google.android.gms.maps.model.PatternItem, org.xms.g.maps.model.PatternItem>() {\n\n public org.xms.g.maps.model.PatternItem apply(com.google.android.gms.maps.model.PatternItem param0) {\n return new org.xms.g.maps.model.PatternItem(new org.xms.g.utils.XBox(param0, null));\n }\n }));\n }\n }", "Shape getShape();", "public void drawPolygon (int xC, int yC, int xP, int yP,int ribs, Graphics g){\r\n \r\n \tint n = ribs; \r\n \t//delta keep the the original delta , this size of delta will increase in delta size each time.\r\n \tdouble delta = (2* Math.PI)/ n;\r\n \tdouble deltaTemp = delta;\r\n \t//List of Points that I keep during n rotation.\r\n \tList <Point> points; \r\n \tfloat x,y,newX,newY;\r\n \t//First Sliding\r\n \tx = xP - xC;\r\n \ty = yP - yC;\r\n \tnewX = x; \t\r\n \tnewY = y; \t\r\n \tList <Point> vertexs = new ArrayList();\r\n \t//Follow delta angle rotation n times and write a list of vertices to vertexs list.\r\n \tfor (int i = 0; i < n ; i++)\r\n \t{\r\n \t\tnewX = (int) ((x*Math.cos(delta) - y*Math.sin(delta)));\r\n \t\tnewY = (int) ((x*Math.sin(delta) + y*Math.cos(delta))); \r\n \t\tvertexs.add(new Point(Math.round(newX),Math.round(newY))); \t\r\n \t\tSystem.out.println(vertexs.get(i).x+\",\"+vertexs.get(i).y);\r\n \t\tdelta = delta + deltaTemp;\r\n \t}\r\n \t//Sliding back\r\n \tfor (int i = 0; i < vertexs.size(); i++ ){\r\n \t\tvertexs.get(i).x = (int) (vertexs.get(i).getX() + xC);\r\n \t\tvertexs.get(i).y = (int) (vertexs.get(i).getY() + yC);\r\n \t\tg.drawRect(vertexs.get(i).x, vertexs.get(i).y ,1,1);\r\n \t}\r\n \t//draw line between the list of the points we got.\r\n \tfor (int z = 0 ; z < vertexs.size(); z++){\r\n \t\tif (z == vertexs.size()-1)\r\n \t\t\tdrawLine((int) Math.round(vertexs.get(z).getX()), (int)(vertexs.get(z).getY()),(int)(vertexs.get(0).getX()), (int)(vertexs.get(0).getY()),g);\r\n \t\telse\r\n \t\t\tdrawLine((int)(vertexs.get(z).getX()), (int)(vertexs.get(z).getY()),(int)(vertexs.get(z+1).getX()), (int)(vertexs.get(z+1).getY()),g);\r\n\r\n \t\t}\r\n \t\r\n }", "@Override\r\n Shape getOutline ()\r\n {\r\n return null;\r\n }", "public SpatialRelation getPolygonRectangleRelation() {\n return polygonRectangleRelation;\n }", "synchronized public Polygon getPerimeter() {\n \t\tif (null == p || p[0].length < 2) return new Polygon();\n \n \t\t// local pointers, since they may be transformed\n \t\tint n_points = this.n_points;\n \t\tif (!this.at.isIdentity()) {\n \t\t\tfinal Object[] ob = getTransformedData();\n \t\t\tp = (double[][])ob[0];\n \t\t\tn_points = p[0].length;\n \t\t}\n \t\tint[] x = new int[n_points];\n \t\tint[] y = new int[n_points];\n \t\tfor (int i=0; i<n_points; i++) {\n \t\t\tx[i] = (int)p[0][i];\n \t\t\ty[i] = (int)p[1][i];\n \t\t}\n \t\treturn new Polygon(x, y, n_points);\n \t}", "@Override\r\n public final void draw(final Polygon p, final BufferedImage paper) {\n String red;\r\n String green;\r\n String blue;\r\n if (Integer.toHexString(p.getBorderColor().getRed()).length() == 1) {\r\n red = \"0\" + Integer.toHexString(p.getBorderColor().getRed());\r\n } else {\r\n red = Integer.toHexString(p.getBorderColor().getRed());\r\n }\r\n if (Integer.toHexString(p.getBorderColor().getGreen()).length() == 1) {\r\n green = \"0\" + Integer.toHexString(p.getBorderColor().getGreen());\r\n } else {\r\n green = Integer.toHexString(p.getBorderColor().getGreen());\r\n }\r\n if (Integer.toHexString(p.getBorderColor().getBlue()).length() == 1) {\r\n blue = \"0\" + Integer.toHexString(p.getBorderColor().getBlue());\r\n } else {\r\n blue = Integer.toHexString(p.getBorderColor().getBlue());\r\n }\r\n String color = \"#\" + red + green + blue;\r\n int[] xCoordinates = p.getxCoordinates();\r\n int[] yCoordinates = p.getyCoordinates();\r\n\r\n for (int i = 0; i < (p.getNumberOfPints() - 1); i++) {\r\n draw(new Line((String.valueOf(xCoordinates[i])), String.valueOf(yCoordinates[i]),\r\n String.valueOf(xCoordinates[i + 1]), String.valueOf(yCoordinates[i + 1]), color,\r\n String.valueOf(p.getBorderColor().getAlpha()), paper), paper);\r\n }\r\n\r\n draw(new Line((String.valueOf(xCoordinates[p.getNumberOfPints() - 1])),\r\n String.valueOf(yCoordinates[p.getNumberOfPints() - 1]),\r\n String.valueOf(xCoordinates[0]), String.valueOf(yCoordinates[0]), color,\r\n String.valueOf(p.getBorderColor().getAlpha()), paper), paper);\r\n\r\n int xc = 0;\r\n int yc = 0;\r\n for (int i = 0; i < p.getNumberOfPints(); i++) {\r\n xc += xCoordinates[i];\r\n yc += yCoordinates[i];\r\n }\r\n xc = xc / p.getNumberOfPints();\r\n yc = yc / p.getNumberOfPints();\r\n floodFill(xc, yc, p.getFillColor(), p.getBorderColor(), paper);\r\n }", "public List<Polygon> getPolygons() {\n return this.polygons.obtainAll();\n }", "public interface IPolygon {\n // Returns the text telling what shape it is\n public String whatShape();\n\n // Returns the numbers of sides\n public int noOfSides();\n\n // Returns the array of lengths of all sides\n public double[] getSides();\n\n // Returns the area of the shape\n public double area();\n\n // Returns the perimeter of the shape\n public double perimeter();\n}", "public gov.ucore.ucore._2_0.PolygonType getPolygon()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.ucore.ucore._2_0.PolygonType target = null;\n target = (gov.ucore.ucore._2_0.PolygonType)get_store().find_element_user(POLYGON$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public Shape getShape();", "public Style createEditPathEdges() {\n \tGraphic gr;\n \tMark mark;\n \tPointSymbolizer pointSymbolizer;\n \t\n \t//POINT\n gr = styleFactory.createDefaultGraphic();\n mark = styleFactory.getSquareMark();\n mark.setStroke(styleFactory.createStroke(filterFactory.literal(Color.BLACK), filterFactory.literal(1)));\n mark.setFill(styleFactory.createFill(filterFactory.literal(Color.WHITE)));\n gr.graphicalSymbols().clear();\n gr.graphicalSymbols().add(mark);\n gr.setSize(filterFactory.literal(4));\n pointSymbolizer = styleFactory.createPointSymbolizer(gr, null); \n Rule rule = styleFactory.createRule();\n rule.symbolizers().add(pointSymbolizer);\n \n FeatureTypeStyle fts = styleFactory.createFeatureTypeStyle(new Rule[]{rule});\n Style style = styleFactory.createStyle();\n style.featureTypeStyles().add(fts); \n return style;\n }", "public Shape getClipShape() { return null; }", "public Polygon getArea() {\n\t\treturn area;\n\t}", "Geometry getGeometry();", "public void addPolyGonHole() {\n try {\n ESurface surface;\n surface = (ESurface) abstractEditor.getSelected();\n if ((surface) != null) {\n abstractEditor.drawNewShape(new ESurfaceHoleDT(\n surface));\n }\n } catch (final Exception e) {\n e.printStackTrace();\n }\n }", "public Polyline(boolean _isClosed, UBA<Point> points_in, boolean _isFilled)\n {\n \tthis._isClosed = _isClosed;// default false;\n \n\n // Stores whether this polyline is really a polygon and contains its inner area.\n this._isFilled = _isFilled; // default @_isFilled = @_isClosed\n\n this._points = points_in.clone(); // default empty array.\n \n _boundingbox = null;\n \n /*\n // These are commented out to save memory for applications that don't need these.\n this._boundingbox = null\n this._lineBVH = null\n this._obj # Associated Obj.\n */\n }", "public void addPolyGon() {\n abstractEditor.drawNewShape(new ESurfaceDT());\n }", "private void renderPolygon(Feature feature, PolygonSymbolizer symbolizer) {\n if (LOGGER.isLoggable(Level.FINEST)) {\n LOGGER.finest(\"rendering polygon with a scale of \" + this.scaleDenominator);\n }\n \n Fill fill = symbolizer.getFill();\n String geomName = symbolizer.geometryPropertyName();\n Geometry geom = findGeometry(feature, geomName);\n \n if (geom.isEmpty()) {\n return;\n }\n \n if (geom.getDimension() < 1) {\n return;\n }\n \n Shape path = createPath(geom);\n \n if (fill != null) {\n applyFill(graphics, fill, feature);\n \n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"paint in renderPoly: \" + graphics.getPaint());\n }\n \n graphics.fill(path);\n \n // shouldn't we reset the graphics when we return finished?\n resetFill(graphics);\n }\n \n if (symbolizer.getStroke() != null) {\n Stroke stroke = symbolizer.getStroke();\n applyStroke(graphics, stroke, feature);\n \n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"path is \"\n + graphics.getTransform().createTransformedShape(path).getBounds2D().toString());\n }\n \n if (stroke.getGraphicStroke() == null) {\n graphics.draw(path);\n } else {\n // set up the graphic stroke\n drawWithGraphicStroke(graphics, path, stroke.getGraphicStroke(), feature);\n }\n }\n }", "public final org.xms.g.maps.model.PolygonOptions strokePattern(java.util.List param0) {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.huawei.hms.maps.model.PolygonOptions) this.getHInstance()).strokePattern(org.xms.g.utils.Utils.mapList2GH(param0, true))\");\n com.huawei.hms.maps.model.PolygonOptions hReturn = ((com.huawei.hms.maps.model.PolygonOptions) this.getHInstance()).strokePattern(org.xms.g.utils.Utils.mapList2GH(param0, true));\n return ((hReturn) == null ? null : (new org.xms.g.maps.model.PolygonOptions(new org.xms.g.utils.XBox(null, hReturn))));\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.google.android.gms.maps.model.PolygonOptions) this.getGInstance()).strokePattern(org.xms.g.utils.Utils.mapList2GH(param0, false))\");\n com.google.android.gms.maps.model.PolygonOptions gReturn = ((com.google.android.gms.maps.model.PolygonOptions) this.getGInstance()).strokePattern(org.xms.g.utils.Utils.mapList2GH(param0, false));\n return ((gReturn) == null ? null : (new org.xms.g.maps.model.PolygonOptions(new org.xms.g.utils.XBox(gReturn, null))));\n }\n }", "void drawOutline(DrawContext dc, Object shape);", "public Polygon getTestPolygon() {\n WKTReader reader = new WKTReader();\n try {\n Polygon polygon = (Polygon) reader.read(TEST_POLYGON_WKT);\n polygon.setSRID(getTestSrid());\n return polygon;\n } catch (ParseException e) {\n throw new RuntimeException(e);\n }\n }", "@Override\r\n\tprotected void initShape() {\n\t\tgetPositions().putAll(createSymmetricLines(0, 1.5, .5, 1.1, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//->upper corner\r\n\t\tgetPositions().putAll(createSymmetricLines(.5, 1.1, 1, .7, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//-> lower outer corner\r\n\t\tgetPositions().putAll(createSymmetricLines(1, .7, 1.1, .3, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//-> lower inner corner\r\n\t\tgetPositions().putAll(createSymmetricLines(1.1, .3, .7, .25, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//-> middle\r\n\t\tgetPositions().putAll(createSymmetricLines(.7, .25, .2, 1.35, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//inner\r\n\t\tgetPositions().putAll(createSymmetricLines(1, .5, .55, 0.95, WingPart.INNER_LEFT, WingPart.INNER_RIGHT));\r\n\t\tgetPositions().putAll(createSymmetricLines(0.8, .4, .55, 0.95, WingPart.INNER_LEFT, WingPart.INNER_RIGHT));\r\n\t\tgetPositions().putAll(createSymmetricPoints(0.9, .5, WingPart.INNER_LEFT, WingPart.INNER_RIGHT));\r\n\r\n//\t\tgetPositions().putAll(fill(WingPart.OUTER_RIGHT, WingPart.INNER_RIGHT));\r\n//\t\tgetPositions().putAll(fill(WingPart.OUTER_LEFT, WingPart.INNER_LEFT));\r\n\t}", "public final int getStrokeColor() {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.huawei.hms.maps.model.PolygonOptions) this.getHInstance()).getStrokeColor()\");\n return ((com.huawei.hms.maps.model.PolygonOptions) this.getHInstance()).getStrokeColor();\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.google.android.gms.maps.model.PolygonOptions) this.getGInstance()).getStrokeColor()\");\n return ((com.google.android.gms.maps.model.PolygonOptions) this.getGInstance()).getStrokeColor();\n }\n }", "public static Coordinate[] makeArea(Coordinate[] polyLine, double width) {\n Coordinate vertices[];\n int numPoints = polyLine.length;\n // If there aren't at least two points, return an empty list\n if (numPoints < 2) {\n return new Coordinate[0];\n }\n // We've got at least two points, start initializing\n int numNewPoints = numPoints * 2;\n vertices = new Coordinate[numNewPoints];\n\n Coordinate p1, p2, intersectPoint;\n Coordinate[] perpLine1, perpLine2;\n Coordinate[] prevLine1, prevLine2, parallelLine1, parallelLine2;\n prevLine1 = new Coordinate[2];\n prevLine2 = new Coordinate[2];\n parallelLine1 = new Coordinate[2];\n parallelLine2 = new Coordinate[2];\n\n double meterWidth = width;\n\n // Define line p1p2\n p1 = polyLine[0];\n p2 = polyLine[1];\n // Get a line perpendicular to p1p2 through the first point of input\n // 'polyline'\n perpLine1 = linePerpendicularThruP1(p1, p2, meterWidth);\n // Keep these two endpoints as part of the final polygon\n vertices[0] = perpLine1[0];\n vertices[numNewPoints - 1] = perpLine1[1];\n\n // Get a line perpendicular to p1p2 through the second point of\n // 'polyline'\n perpLine2 = linePerpendicularThruP1(p2, p1, meterWidth);\n // Using these new endpoints, determine the 2 parallel lines that\n // straddle p1p2\n // Since the linePerpendicularThruP1 method always rotates in a\n // clockwise\n // direction, perpLine2 endpoints will be rotated 180 degrees wrt\n // perpLine1 endpoints\n prevLine1[0] = perpLine1[0];\n prevLine1[1] = perpLine2[1];\n prevLine2[0] = perpLine1[1];\n prevLine2[1] = perpLine2[0];\n\n for (int i = 2; i < numPoints; i++) {\n // Define p1p2\n p1 = polyLine[i - 1];\n p2 = polyLine[i];\n // Calculate 2 end lines perpendicular to p1p2 that are 'kmWidth'\n // long\n perpLine1 = linePerpendicularThruP1(p1, p2, meterWidth);\n perpLine2 = linePerpendicularThruP1(p2, p1, meterWidth);\n // Calculate 2 lines parallel to p1p2 that are 'kmWidth' apart\n parallelLine1[0] = perpLine1[0];\n parallelLine1[1] = perpLine2[1];\n parallelLine2[0] = perpLine1[1];\n parallelLine2[1] = perpLine2[0];\n\n // Compute the intersections\n intersectPoint = intersection(parallelLine1, prevLine1);\n vertices[i - 1] = intersectPoint;\n intersectPoint = intersection(parallelLine2, prevLine2);\n vertices[numNewPoints - i] = intersectPoint;\n\n // Now stash the current lines as the previous lines for future\n // calcs.\n prevLine1[0] = parallelLine1[0];\n prevLine1[1] = parallelLine1[1];\n prevLine2[0] = parallelLine2[0];\n prevLine2[1] = parallelLine2[1];\n }\n // Now tack on the last perpendicular line\n vertices[numNewPoints / 2 - 1] = perpLine2[1];\n vertices[numNewPoints / 2] = perpLine2[0];\n return vertices;\n }", "public int getSide(BSPPolygon poly) {\n boolean onFront = false;\n boolean onBack = false;\n\n // check every point\n for (int i=0; i<poly.getNumVertices(); i++) {\n Vector3D v = poly.getVertex(i);\n int side = getSideThick(v.x, v.z);\n if (side == BSPLine.FRONT) {\n onFront = true;\n }\n else if (side == BSPLine.BACK) {\n onBack = true;\n }\n }\n\n // classify the polygon\n if (onFront && onBack) {\n return BSPLine.SPANNING;\n }\n else if (onFront) {\n return BSPLine.FRONT;\n }\n else if (onBack) {\n return BSPLine.BACK;\n }\n else {\n return BSPLine.COLLINEAR;\n }\n }", "private HashMap<Coordinate, Coordinate> getAreaIntersectionPt( Geometry gfaPoly )\n\t{\n\t\tHashMap<Coordinate, Coordinate>\tinterPtsPair = new HashMap<Coordinate, Coordinate>();\t\n\n\t\tArrayList<Coordinate> interPts = new ArrayList<Coordinate>();\t\t\n\t\tArrayList<Coordinate> pts;\n\t\tArrayList<Integer> interIndex = new ArrayList<Integer>();\n\t\tArrayList<Integer> indx = new ArrayList<Integer>();\n\t\t\n\t\t//Reorder in clockwise - first point is repeated at the end.\n\t\tArrayList<Coordinate> gfaPoints = new ArrayList<Coordinate>();\n\t\tfor ( Coordinate c : gfaPoly.getCoordinates() ) {\n\t\t\tgfaPoints.add( c );\n\t\t}\n\t\t\n\t\tArrayList<Coordinate> cwGfaPts = GfaSnap.getInstance().reorderInClockwise( gfaPoints, null );\n\t\t\n\t\t//Get all intersection point with FA region common border.\n\t\tHashMap<String, Geometry> areaCommBnds = GfaClip.getInstance().getFaAreaXCommBounds();\t\n\t\tfor ( Geometry bnd : areaCommBnds.values() ) {\n\t\t\tpts = GfaClip.getInstance().lineIntersect( cwGfaPts.toArray( new Coordinate[ cwGfaPts.size() ]), \n\t\t\t\t\t bnd.getCoordinates(), indx );\n\t\t\t\n\t\t\tif ( pts.size() > 0 ) {\n\t\t\t\tinterPts.addAll( pts );\n\t\t\t\tinterIndex.addAll( indx );\n\t\t\t}\n\t\t}\n\n\t\tif ( interPts.size() <= 0 ) {\n\t\t\treturn interPtsPair;\n\t\t}\n\n\t\t/*\n\t\t * Find the area common bound points inside the polygon to ensure\n\t\t * the new snap points will not cluster with these points.\n\t\t */\n\t\t ArrayList<Coordinate> checkPoints = new ArrayList<Coordinate>();\n\t\t for ( Geometry g : areaCommBnds.values() ) {\t\t\t \n\t\t\t for ( Coordinate c : g.getCoordinates() ) {\n\t\t\t\t Geometry pp = GfaClip.getInstance().pointsToGeometry( new Coordinate[]{ c } );\n\t\t\t\t if ( !checkPoints.contains( c ) && pp.within( gfaPoly ) ) {\n\t\t\t\t\t checkPoints.add( c );\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t /*\n\t\t * Now insert each common intersection point into the el polygon\n\t\t * and snap it outside of the el polygon.\n\t\t * \n\t\t * Note: the point cannot be any point of the el polygon or any \n\t\t * snap point that has been used.\n\t\t * \n\t\t * If an intersection point is not within the clustering distance of \n\t\t * the point before it (Pb) or point after it (Pa), simply insert it into \n\t\t * the polygon and snap it. Otherwise, do the following:\n\t\t * \n\t\t * 1. Pick the closer one of Pb and Pa as Pn. \n\t\t * 2. Check if Pn is within the clustering distance of the common boundary\n\t\t * points inside the FROM line. \n\t\t * 3. If so, snap Pn to the closest point not within the clustering distance\n\t\t * and match the intersection point and Pn to the new point. \n\t\t * 4. If not, match the intersection point with Pn.\n\t\t */\n\t\t ArrayList<Coordinate> usedPoints = new ArrayList<Coordinate>();\n\t\t usedPoints.addAll( cwGfaPts );\n\t\t \n\t\t ArrayList<Coordinate> ePts = new ArrayList<Coordinate>();\t\t \n\t\t for ( int ii = 0; ii < interPts.size(); ii++ ) {\n\t\t\t \n\t\t Coordinate interP = interPts.get( ii );\n\t\t\t Coordinate ptBefore = cwGfaPts.get( interIndex.get( ii ) );\n\t\t\t Coordinate ptAfter = cwGfaPts.get( interIndex.get( ii ) + 1 );\n\t\t\t \n\t\t\t double qdist1 = GfaSnap.getInstance().distance( interP, ptBefore );\n\t\t\t double qdist2 = GfaSnap.getInstance().distance( interP, ptAfter );\n\n\t\t\t int addOne = -1; \t \n\t\t\t int qmatch = -1;\n\t\t\t double qdist;\n\n\t\t\t if ( qdist1 < qdist2 ) {\n\t\t\t\t qmatch = interIndex.get( ii ); \n\t\t\t\t qdist = qdist1;\n\t\t\t }\n\t\t\t else {\n\t\t\t\t qmatch = interIndex.get( ii ) + 1;\n\t\t\t\t qdist = qdist2;\n\t\t\t }\n\n\t\t\t if ( ( qdist / PgenUtil.NM2M ) < GfaSnap.CLUSTER_DIST ) {\n\n\t\t\t\t Coordinate ptMatch = cwGfaPts.get( qmatch );\n\t\t\t\t for ( Coordinate c : checkPoints ) {\n\t\t\t\t\t if ( GfaSnap.getInstance().isCluster( c, ptMatch ) ) {\n\t\t\t\t\t\t addOne = qmatch;\n\t\t\t\t\t\t break;\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t \t\t\t\t \n\t\t\t\t if ( addOne < 0 ) {\n\t\t\t\t\t interPtsPair.put( new Coordinate( interP ),\n\t\t\t\t\t\t\t new Coordinate( ptMatch ) );\n\t\t\t\t\t continue; //Done - ptMatch is a snapped point.\n\t\t\t\t }\n\t\t\t }\n\t\t\t \n\t\t\t // Snap\n\t\t\t int kk, kk2;\n\t\t\t if ( addOne >= 0 ) {\n\t\t\t kk = addOne;\n\t\t\t kk2 = kk;\n\n\t\t\t ePts.clear();\n\t\t\t ePts.addAll( cwGfaPts );\n\t\t\t }\n\t\t\t else {\t\t\t\t \n\t\t\t ePts.clear();\n\t\t\t\t ePts.addAll( GfaSnap.getInstance().insertArray( cwGfaPts, interIndex.get( ii ) + 1, interP ) );\n\t\t\t\t kk = interIndex.get( ii ) + 1;\n\t\t\t\t kk2 = kk;\n\t\t\t }\n\n\t\t\t \n\t\t\t ePts.remove( ePts.size() - 1 );\n\t\t\t \n\t\t\t Coordinate[] snapped = new Coordinate[1];\n \n\t\t\t //snap....\n\t\t\t int status = GfaSnap.getInstance().snapPtGFA( kk, kk2, usedPoints, checkPoints, \n\t\t\t\t\t\t ePts, true, true, 3.0F, snapped );\n\t\t\t \n\t\t\t if ( status != 0 ) {\n\t\t\t\t if ( addOne >= 0 ) {\n\t\t\t\t\t snapped[ 0 ] = new Coordinate( ePts.get( kk ) );\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t snapped[ 0 ] = new Coordinate( interP );\n\t\t\t\t }\n\t\t\t }\n\t\t\t \n\t\t\t interPtsPair.put( new Coordinate( interP ), \n\t\t\t new Coordinate( snapped[ 0 ] ) );\n\t\t\t \n\t\t\t if ( addOne >= 0 ) {\n\t\t\t\t interPtsPair.put( new Coordinate( cwGfaPts.get( addOne ) ), \n\t\t new Coordinate( snapped[ 0 ] ) );\t\t\t\t \n\t\t\t }\t\n\t\t\t \n\t\t\t usedPoints.add( snapped[ 0 ] );\n\t\t\t \n\t\t }\n\t\t\n\t\treturn interPtsPair;\n\t}", "public Style createEditPathBox() {\n \t \tStroke stroke = styleFactory.createStroke(\n \t \t\tfilterFactory.literal(Color.RED), filterFactory.literal(1), null, null,null, new float[] { 5, 2 }, null, null, null\n\t\t);\n \t \t\n\t\t//Cria um Symbolizer para linha.\n\t\tPolygonSymbolizer polygonSymbolizer = styleFactory.createPolygonSymbolizer(stroke, null, null);\n\t\t//Regra para um estilo de fei��o.\n\t\tRule rulePoly = styleFactory.createRule();\n\t\t\n\t\t//Adiciona o PointSymbolizer na regra.\n\t\t//rulePoly.setName(\"Polygon\"); \n\t\t//ruleLine.setFilter(filterFactory.equals(filterFactory.property(\"geom\"), filterFactory.literal(false)));\n\t\trulePoly.symbolizers().add(polygonSymbolizer); \n\t\t\t \n\t\t//Adiciona uma ou N regras em uma estilo de uma determinada fei��o.\n\t\tFeatureTypeStyle ftsPoly = styleFactory.createFeatureTypeStyle(new Rule[]{rulePoly});\n\t\t \n\t\t//Cria o estilo (SLD).\n\t\tStyle style = styleFactory.createStyle();\n\t\tstyle.featureTypeStyles().add(ftsPoly);\n\t\t \n\t\treturn style;\n }", "public final org.xms.g.maps.model.PolygonOptions strokeColor(int param0) {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.huawei.hms.maps.model.PolygonOptions) this.getHInstance()).strokeColor(param0)\");\n com.huawei.hms.maps.model.PolygonOptions hReturn = ((com.huawei.hms.maps.model.PolygonOptions) this.getHInstance()).strokeColor(param0);\n return ((hReturn) == null ? null : (new org.xms.g.maps.model.PolygonOptions(new org.xms.g.utils.XBox(null, hReturn))));\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.google.android.gms.maps.model.PolygonOptions) this.getGInstance()).strokeColor(param0)\");\n com.google.android.gms.maps.model.PolygonOptions gReturn = ((com.google.android.gms.maps.model.PolygonOptions) this.getGInstance()).strokeColor(param0);\n return ((gReturn) == null ? null : (new org.xms.g.maps.model.PolygonOptions(new org.xms.g.utils.XBox(gReturn, null))));\n }\n }", "public Polygon()\n {\n points = new ArrayList<PointF>();\n }", "@NonNull\n/* */ private Observable<InkDrawInfo> outlineArrayToOutlineSegmentPath(Observable<double[]> observable) {\n/* 274 */ return observable.filter(new Predicate<double[]>() { public boolean test(double[] outline) throws Exception { return (outline.length > 8); } }).map(new Function<double[], InkDrawInfo>()\n/* */ {\n/* */ public InkDrawInfo apply(double[] outline) throws Exception {\n/* 277 */ Utils.throwIfOnMainThread();\n/* 278 */ Path pathf = PathPool.getInstance().obtain();\n/* 279 */ pathf.setFillType(Path.FillType.WINDING);\n/* */ \n/* 281 */ double left = outline[0];\n/* 282 */ double top = outline[1];\n/* 283 */ double right = outline[0];\n/* 284 */ double bottom = outline[1];\n/* */ \n/* 286 */ pathf.moveTo((float)outline[0], (float)outline[1]);\n/* 287 */ for (int i = 2, cnt = outline.length; i < cnt; i += 6) {\n/* */ \n/* */ \n/* */ \n/* 291 */ for (int k = 0; k <= 5; k += 2) {\n/* 292 */ double x = outline[i + k];\n/* 293 */ double y = outline[i + k + 1];\n/* 294 */ left = Math.min(x, left);\n/* 295 */ top = Math.min(y, top);\n/* 296 */ right = Math.max(x, right);\n/* 297 */ bottom = Math.max(y, bottom);\n/* */ } \n/* */ \n/* 300 */ pathf.cubicTo((float)outline[i], (float)outline[i + 1], (float)outline[i + 2], (float)outline[i + 3], (float)outline[i + 4], (float)outline[i + 5]);\n/* */ } \n/* */ \n/* 303 */ int fudge = 2;\n/* 304 */ return new InkDrawInfo((int)left - fudge, (int)right + fudge, (int)top - fudge, (int)bottom + fudge, pathf, PointProcessor.this\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 310 */ .mPaint);\n/* */ }\n/* */ });\n/* */ }", "public Point getCorner() {\r\n\t\treturn basePoly.getBounds().getLocation();\r\n\t}", "public static com.vividsolutions.jts.geom.CoordinateList polyline2JTS(IomObject polylineObj,boolean isSurfaceOrArea,double p)\n\tthrows Iox2jtsException\n\t{\n\t\tif(polylineObj==null){\n\t\t\treturn null;\n\t\t}\n\t\tcom.vividsolutions.jts.geom.CoordinateList ret=new com.vividsolutions.jts.geom.CoordinateList();\n\t\t// is POLYLINE?\n\t\tif(isSurfaceOrArea){\n\t\t\tIomObject lineattr=polylineObj.getattrobj(Iom_jObject.POLYLINE_LINEATTR,0);\n\t\t\tif(lineattr!=null){\n\t\t\t\t//writeAttrs(out,lineattr);\n\t\t\t\tthrow new Iox2jtsException(\"Lineattributes not supported\");\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tboolean clipped=polylineObj.getobjectconsistency()==IomConstants.IOM_INCOMPLETE;\n\t\tif(clipped){\n\t\t\tthrow new Iox2jtsException(\"clipped polyline not supported\");\n\t\t}\n\t\tfor(int sequencei=0;sequencei<polylineObj.getattrvaluecount(Iom_jObject.POLYLINE_SEQUENCE);sequencei++){\n\t\t\tif(clipped){\n\t\t\t\t//out.startElement(tags::get_CLIPPED(),0,0);\n\t\t\t}else{\n\t\t\t\t// an unclipped polyline should have only one sequence element\n\t\t\t\tif(sequencei>0){\n\t\t\t\t\tthrow new Iox2jtsException(\"unclipped polyline with multi 'sequence' elements\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tIomObject sequence=polylineObj.getattrobj(Iom_jObject.POLYLINE_SEQUENCE,sequencei);\n\t\t\tfor(int segmenti=0;segmenti<sequence.getattrvaluecount(Iom_jObject.SEGMENTS_SEGMENT);segmenti++){\n\t\t\t\tIomObject segment=sequence.getattrobj(Iom_jObject.SEGMENTS_SEGMENT,segmenti);\n\t\t\t\t//EhiLogger.debug(\"segmenttag \"+segment.getobjecttag());\n\t\t\t\tif(segment.getobjecttag().equals(Iom_jObject.COORD)){\n\t\t\t\t\t// COORD\n\t\t\t\t\tret.add(coord2JTS(segment));\n\t\t\t\t}else if(segment.getobjecttag().equals(Iom_jObject.ARC)){\n\t\t\t\t\t// ARC\n\t\t\t\t\tarc2JTS(ret,segment,p);\n\t\t\t\t}else{\n\t\t\t\t\t// custum line form\n\t\t\t\t\tthrow new Iox2jtsException(\"custom line form not supported\");\n\t\t\t\t\t//out.startElement(segment->getTag(),0,0);\n\t\t\t\t\t//writeAttrs(out,segment);\n\t\t\t\t\t//out.endElement(/*segment*/);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif(clipped){\n\t\t\t\t//out.endElement(/*CLIPPED*/);\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "private static void storePolygon(PolygonRoi roi, MetadataStore store,\n int roiNum, int shape)\n {\n Rectangle bounds = roi.getBounds();\n int[] xCoordinates = roi.getXCoordinates();\n int[] yCoordinates = roi.getYCoordinates();\n StringBuffer points = new StringBuffer();\n for (int i=0; i<xCoordinates.length; i++) {\n points.append(xCoordinates[i] + bounds.x);\n points.append(\",\");\n points.append(yCoordinates[i] + bounds.y);\n if (i < xCoordinates.length - 1) points.append(\" \");\n }\n store.setPolylinePoints(points.toString(), roiNum, shape);\n store.setPolylineClosed(Boolean.TRUE, roiNum, shape);\n }", "public Polygon simplify(float tolerance)\n {\n DouglasPeuckerReducer reducer =\n new DouglasPeuckerReducer(this, tolerance);\n return reducer.simplified();\n }", "private void setShape(){\n // 0 - index of the vertex at the top of the polygon\n shapex[0] = x + MathUtils.cos(radians) * 8;\n shapey[0] = y + MathUtils.sin(radians) * 8;\n\n // 1 - index of the vertex at the bottom left of the polygon\n shapex[1] = x + MathUtils.cos(radians - 4 * 3.1415f / 5) * 8;\n shapey[1] = y + MathUtils.sin(radians - 4 * 3.1415f / 5) * 8;\n\n // 2 - index of the vertex at the bottom right of the polygon\n shapex[2] = x + MathUtils.cos(radians + 4 * 3.1415f / 5) * 8;\n shapey[2] = y + MathUtils.sin(radians + 4 * 3.1415f / 5) * 8;\n }", "public GeneralPath toGeneralPath()\n {\n float x1 = getLowerLeftX();\n float y1 = getLowerLeftY();\n float x2 = getUpperRightX();\n float y2 = getUpperRightY();\n GeneralPath path = new GeneralPath();\n path.moveTo(x1, y1);\n path.lineTo(x2, y1);\n path.lineTo(x2, y2);\n path.lineTo(x1, y2);\n path.closePath();\n return path;\n }", "private Geometry getGeom2() {\n return DefaultReference.getGeometryFactory().toGeometry(new ReferencedEnvelope(\n DefaultEnvMinX + 4,\n DefaultEnvMinX + 9,\n DefaultEnvMinY + 4,\n DefaultEnvMinY + 9,\n CRS\n ));\n }", "@Override\n public void onPolygonClick(Polygon polygon) {\n // Flip the values of the red, green, and blue components of the polygon's color.\n int color = polygon.getStrokeColor() ^ 0x00ffffff;\n polygon.setStrokeColor(color);\n color = polygon.getFillColor() ^ 0x00ffffff;\n polygon.setFillColor(color);\n\n Toast.makeText(this, \"Area type \" + polygon.getTag().toString(), Toast.LENGTH_SHORT).show();\n }", "public List<Shape> getDrawShapes();", "public int getPolyA() { \n\t\treturn( getEndOfBEDentry( getBEDentry().getBlockAtRelativePosition(-1)));\n\t}", "public Stream<Area> extractBounds() {\n if (getPolygonsAsJson() != null && !getPolygonsAsJson().trim().equalsIgnoreCase(\"[]\")) {\n ObjectMapper mapper = new ObjectMapper();\n try {\n @SuppressWarnings(\"unchecked\")\n ArrayList<LinkedHashMap<String, Double>> bounds = (ArrayList<LinkedHashMap<String, Double>>) mapper.readValue(getPolygonsAsJson(), ArrayList.class);\n return bounds.stream().map(entry -> new Area(entry.get(LEFT), entry.get(TOP), entry.get(RIGHT), entry.get(BOTTOM)));\n } catch (IOException e) {\n throw new EmbryonicException(\"Error parsing json for InterestOfAreas\", e);\n }\n }\n return Stream.empty();\n }", "public final org.xms.g.maps.model.PolygonOptions addHole(java.lang.Iterable<org.xms.g.maps.model.LatLng> param0) {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.huawei.hms.maps.model.PolygonOptions) this.getHInstance()).addHole(org.xms.g.utils.Utils.transformIterable(param0, e -> org.xms.g.utils.Utils.getInstanceInInterface(e, true)))\");\n com.huawei.hms.maps.model.PolygonOptions hReturn = ((com.huawei.hms.maps.model.PolygonOptions) this.getHInstance()).addHole(org.xms.g.utils.Utils.transformIterable(param0, e -> org.xms.g.utils.Utils.getInstanceInInterface(e, true)));\n return ((hReturn) == null ? null : (new org.xms.g.maps.model.PolygonOptions(new org.xms.g.utils.XBox(null, hReturn))));\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.google.android.gms.maps.model.PolygonOptions) this.getGInstance()).addHole(org.xms.g.utils.Utils.transformIterable(param0, e -> org.xms.g.utils.Utils.getInstanceInInterface(e, false)))\");\n com.google.android.gms.maps.model.PolygonOptions gReturn = ((com.google.android.gms.maps.model.PolygonOptions) this.getGInstance()).addHole(org.xms.g.utils.Utils.transformIterable(param0, e -> org.xms.g.utils.Utils.getInstanceInInterface(e, false)));\n return ((gReturn) == null ? null : (new org.xms.g.maps.model.PolygonOptions(new org.xms.g.utils.XBox(gReturn, null))));\n }\n }", "IShape getEndShape();", "public void createPolygonMap(){\n Log.d(\"POLYGON MAP\",\"SETTING\");\n PolygonManager.getIstance().putPolygonRegion(gMap);\n }", "Point3D getLeftUpperBackCorner();", "private void stylePolygon(Polygon polygon) {\n String type = \"\";\n // Get the data object stored with the polygon.\n if (polygon.getTag() != null) {\n type = polygon.getTag().toString();\n }\n\n List<PatternItem> pattern = null;\n int strokeColor = COLOR_BLACK_ARGB;\n int fillColor = COLOR_WHITE_ARGB;\n\n switch (type) {\n // If no type is given, allow the API to use the default.\n case \"alpha\":\n // Apply a stroke pattern to render a dashed line, and define colors.\n pattern = PATTERN_POLYGON_ALPHA;\n strokeColor = COLOR_GREEN_ARGB;\n fillColor = COLOR_PURPLE_ARGB;\n break;\n case \"beta\":\n // Apply a stroke pattern to render a line of dots and dashes, and define colors.\n pattern = PATTERN_POLYGON_BETA;\n strokeColor = COLOR_ORANGE_ARGB;\n fillColor = COLOR_BLUE_ARGB;\n break;\n }\n\n polygon.setStrokePattern(pattern);\n polygon.setStrokeWidth(POLYGON_STROKE_WIDTH_PX);\n polygon.setStrokeColor(strokeColor);\n polygon.setFillColor(fillColor);\n }", "public final int getStrokeJointType() {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.huawei.hms.maps.model.PolygonOptions) this.getHInstance()).getStrokeJointType()\");\n return ((com.huawei.hms.maps.model.PolygonOptions) this.getHInstance()).getStrokeJointType();\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.google.android.gms.maps.model.PolygonOptions) this.getGInstance()).getStrokeJointType()\");\n return ((com.google.android.gms.maps.model.PolygonOptions) this.getGInstance()).getStrokeJointType();\n }\n }", "public static String getMultipolygonString(IPolygon boundary, List<IPolygon> holes) {\n\t\tStringBuffer b = new StringBuffer();\r\n\t\tb.append(\"ST_GeometryFromText('MULTIPOLYGON(\"); //$NON-NLS-1$\r\n\r\n\t\t// the first polygon as outer one\r\n\t\tb.append(\"((\"); //$NON-NLS-1$\r\n\t\tfor (Iterator<IPoint> iterator = boundary.getPoints().iterator(); iterator\r\n\t\t\t\t.hasNext();) {\r\n\t\t\tIPoint point = iterator.next();\r\n\t\t\tb.append(point.getX());\r\n\t\t\tb.append(' ');\r\n\t\t\tb.append(point.getY());\r\n//\t\t\tb.append(\" 0\");\r\n\t\t\tif(iterator.hasNext()) {\r\n\t\t\t\tb.append(',');\r\n\t\t\t}\r\n\t\t}\r\n\t\tb.append(\"))\"); //$NON-NLS-1$\r\n\t\t\r\n\t\tif(!holes.isEmpty()) {\r\n\t\t\tfor (IPolygon hole : holes) {\r\n\t\t\t\tb.append(\",((\"); //$NON-NLS-1$\r\n\t\t\t\tfor (Iterator<IPoint> iterator = hole.getPoints().iterator(); iterator\r\n\t\t\t\t\t\t.hasNext();) {\r\n\t\t\t\t\tIPoint point = iterator.next();\r\n\t\t\t\t\tb.append(point.getX());\r\n\t\t\t\t\tb.append(' ');\r\n\t\t\t\t\tb.append(point.getY());\r\n//\t\t\t\tb.append(\" 0\");\r\n\t\t\t\t\tif(iterator.hasNext()) {\r\n\t\t\t\t\t\tb.append(',');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tb.append(\"))\"); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t}\r\n\t\tb.append(\")',4326)\"); //$NON-NLS-1$\r\n\t\treturn b.toString();\r\n\t}", "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 Polygon constructEntityTriangle(Entity e)\n {\n double expandScale = 1.0;\n if(e instanceof Player) //if e is player, it will make the icon bigger\n {\n expandScale *= playerIconScale;\n }\n if(isEntityTooSmall(e))\n {\n expandScale *= getExpandScale(e);\n }\n\n int[] xCoord = new int[] {\n (int)(Driver.scale*(topLeftX + mapWidth/2 + scale * e.getXPos() )),\n (int)(Driver.scale*(topLeftX + mapWidth/2 + scale * (e.getXPos() - expandScale * e.getEntityWidth()/2))),\n (int)(Driver.scale*(topLeftX + mapWidth/2 + scale * (e.getXPos() + expandScale * e.getEntityWidth()/2)))};\n\n int[] yCoord = new int[] {\n (int)(Driver.scale*(topLeftY + mapHeight/2 + scale * (e.getYPos() - expandScale * e.getEntityHeight()/2))),\n (int)(Driver.scale*(topLeftY + mapHeight/2 + scale * (e.getYPos() + expandScale * e.getEntityHeight()/2))),\n (int)(Driver.scale*(topLeftY + mapHeight/2 + scale * (e.getYPos() + expandScale * e.getEntityHeight()/2)))};\n\n return new Polygon( xCoord, yCoord, xCoord.length);\n }", "IShape getStartShape();", "public static com.vividsolutions.jts.geom.MultiPolygon multisurface2JTS(IomObject obj,double strokeP,int srid) //SurfaceOrAreaType type)\n\tthrows Iox2jtsException\n\t{\n\t\tcom.vividsolutions.jts.geom.Polygon[] jtsPolygons=null;\n\t\tcom.vividsolutions.jts.geom.Polygon jtsPolygon=null;\n\t\tint surfaceCount=obj.getattrvaluecount(Iom_jObject.MULTISURFACE_SURFACE);\n\t\tjtsPolygons=new com.vividsolutions.jts.geom.Polygon[surfaceCount];\n\t\tfor(int surfacei=0;surfacei<surfaceCount;surfacei++){\n\t\t\tIomObject surface=obj.getattrobj(Iom_jObject.MULTISURFACE_SURFACE,surfacei);\n\t\t\tcom.vividsolutions.jts.geom.LinearRing jtsShell=null;\n\t\t\tcom.vividsolutions.jts.geom.LinearRing jtsHoles[]=null;\n\t\t\tint boundarycount=surface.getattrvaluecount(Iom_jObject.SURFACE_BOUNDARY);\n\t\t\tif(boundarycount>1){\n\t\t\t\tjtsHoles=new com.vividsolutions.jts.geom.LinearRing[boundarycount-1];\t\t\t\t\n\t\t\t}\n\t\t\tfor(int boundaryi=0;boundaryi<boundarycount;boundaryi++){\n\t\t\t\tIomObject boundary=surface.getattrobj(Iom_jObject.SURFACE_BOUNDARY,boundaryi);\n\t\t\t\tcom.vividsolutions.jts.geom.CoordinateList jtsLine=new com.vividsolutions.jts.geom.CoordinateList();\n\t\t\t\tfor(int polylinei=0;polylinei<boundary.getattrvaluecount(Iom_jObject.BOUNDARY_POLYLINE);polylinei++){\n\t\t\t\t\tIomObject polyline=boundary.getattrobj(Iom_jObject.BOUNDARY_POLYLINE,polylinei);\n\t\t\t\t\tjtsLine.addAll(polyline2JTS(polyline,true,strokeP));\n\t\t\t\t}\n\t\t\t\tjtsLine.closeRing();\n\t\t\t\tif(boundaryi==0){\n\t\t\t\t\tjtsShell=new com.vividsolutions.jts.geom.GeometryFactory().createLinearRing(jtsLine.toCoordinateArray());\n\t\t\t\t}else{\n\t\t\t\t\tjtsHoles[boundaryi-1]=new com.vividsolutions.jts.geom.GeometryFactory().createLinearRing(jtsLine.toCoordinateArray());\n\t\t\t\t}\n\t\t\t}\n\t\t\tjtsPolygon=new com.vividsolutions.jts.geom.GeometryFactory().createPolygon(jtsShell,jtsHoles);\n\t\t\tjtsPolygons[surfacei]=jtsPolygon;\n\t\t}\n\t\tcom.vividsolutions.jts.geom.MultiPolygon ret=new com.vividsolutions.jts.geom.MultiPolygon(jtsPolygons, new PrecisionModel(), srid);\n\t\treturn ret;\n\t}", "public void drawControlPolygon() {\n\t\t//this.frame.stroke(255, 0, 0);\n\t\tfor(int i=0;i<points.length;i++) {\n\t\t\tfor(int j=0;j<points[i].length;j++)\n\t\t\t\tthis.frame.drawVertex(points[i][j]);\n\t\t}\n\t}", "@Override\n public void render(Graphics g) {\n g.setColor(Color.GREEN);\n Vector2f S = world.mul(polygon[polygon.length - 1]);\n Vector2f P = null;\n for (int i = 0; i < polygon.length; ++i) {\n P = world.mul(polygon[i]);\n g.drawLine((int) S.x, (int) S.y, (int) P.x, (int) P.y);\n S = P;\n }\n }", "public Shape getShape() \n {\n return new EllipseShape(new Extent(3,3), Color.RED,true);\n }", "IShape getCurrentShape();", "@Override\r\n\tSpaceship getShip() {\n\t\treturn new MotherShip(getWidth()/2, getHeight());\r\n\t}", "public gov.ucore.ucore._2_0.PolygonType addNewPolygon()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.ucore.ucore._2_0.PolygonType target = null;\n target = (gov.ucore.ucore._2_0.PolygonType)get_store().add_element_user(POLYGON$0);\n return target;\n }\n }", "protected void drawCurrentPolygon(Graphics2D g) {\n if (sourcePolygon instanceof TexturedPolygon3D) {\n TexturedPolygon3D poly =\n ((TexturedPolygon3D)sourcePolygon);\n Texture texture = poly.getTexture();\n if (texture instanceof ShadedTexture) {\n calcShadeLevel();\n }\n }\n super.drawCurrentPolygon(g);\n }", "public static String multipolyline2hexwkb(IomObject value, double strokeP)\n\tthrows Iox2jtsException\n\t{\n\t\tif(value == null) return null;\n\t\tcom.vividsolutions.jts.geom.Geometry geom = multipolyline2JTS(value, strokeP);\n\t\tbyte bv[]=new com.vividsolutions.jts.io.WKBWriter().write(geom);\n\t\treturn com.vividsolutions.jts.io.WKBWriter.bytesToHex(bv);\n\t}", "private void generatePrism() {\n\t\tdouble halfAltitude = Math.sin(Math.PI / 3); // The cross-section is an equilateral triangle with sides of length 2 units. The altitude is the height of the triangle with one edge horizontal\n\t\tverts = new Vector[] {new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3)};\n\t\tverts[0].setElements(new double[] {-1, -halfAltitude, -1});\n\t\tverts[1].setElements(new double[] {0, halfAltitude, -1});\n\t\tverts[2].setElements(new double[] {1, -halfAltitude, -1});\n\t\t// Use the same triangle of vertices but offset by 2 units along the z-axis\n\t\tverts[3].setElements(verts[0]);\n\t\tverts[4].setElements(verts[1]);\n\t\tverts[5].setElements(verts[2]);\n\t\tverts[3].setElement(2, 1);\n\t\tverts[4].setElement(2, 1);\n\t\tverts[5].setElement(2, 1);\n\t\t\n\t\tfaces = new int[][] {{0, 1, 2}, {0, 5, 3}, {0, 2, 5}, {0, 3, 4}, {0, 4, 1}, {1, 4, 5}, {1, 5, 2}, {3, 5, 4}};\n\t}", "private void updateGuiPolygon() {\n \t\tif ( this.poly != null ) {\n \t\t\tthis.poly.remove();\n \t\t}\n \n \t\t// A polygon is at minimum a triangle.\n \t\tif ( !this.satisfiesPolygon() ) {\n \t\t\treturn;\n \t\t}\n \n \t\tPolygonOptions options = new PolygonOptions();\n \t\toptions\n \t\t\t.geodesic( POLYGON_GEODESIC )\n \t\t\t.strokeWidth( 2 )\n \t\t\t.fillColor( this.getFillColor() )\n \t\t\t.strokeColor( this.getResources().getColor( POLYGON_STROKE_COLOR ) );\n \n \t\tfor ( Marker marker : this.markers ) {\n \t\t\toptions.add( marker.getPosition() );\n \t\t}\n \n \t\tthis.poly = this.googleMap.addPolygon( options );\n \t}", "public static int addPolygon(final DoubleList output, final double[][] input,\n final int v1, final int v2, final int v3, final int v4) {\n // create a square polygon\n // first triangle\n addPoint(output, input[v1]);\n addPoint(output, input[v2]);\n addPoint(output, input[v3]);\n // second triangle\n addPoint(output, input[v3]);\n addPoint(output, input[v4]);\n addPoint(output, input[v1]);\n // end add\n return GL2.GL_TRIANGLES;\n }", "public String whatShape();", "@Override\n public String getName() {\n return \"RemovePolygonNecks\";\n }", "public final java.util.List<org.xms.g.maps.model.LatLng> getPoints() {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.huawei.hms.maps.model.PolygonOptions) this.getHInstance()).getPoints()\");\n java.util.List hReturn = ((com.huawei.hms.maps.model.PolygonOptions) this.getHInstance()).getPoints();\n return ((java.util.List) org.xms.g.utils.Utils.mapCollection(hReturn, new org.xms.g.utils.Function<com.huawei.hms.maps.model.LatLng, org.xms.g.maps.model.LatLng>() {\n\n public org.xms.g.maps.model.LatLng apply(com.huawei.hms.maps.model.LatLng param0) {\n return new org.xms.g.maps.model.LatLng(new org.xms.g.utils.XBox(null, param0));\n }\n }));\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.google.android.gms.maps.model.PolygonOptions) this.getGInstance()).getPoints()\");\n java.util.List gReturn = ((com.google.android.gms.maps.model.PolygonOptions) this.getGInstance()).getPoints();\n return ((java.util.List) org.xms.g.utils.Utils.mapCollection(gReturn, new org.xms.g.utils.Function<com.google.android.gms.maps.model.LatLng, org.xms.g.maps.model.LatLng>() {\n\n public org.xms.g.maps.model.LatLng apply(com.google.android.gms.maps.model.LatLng param0) {\n return new org.xms.g.maps.model.LatLng(new org.xms.g.utils.XBox(param0, null));\n }\n }));\n }\n }", "public Polygon getBody() {\r\n\t\treturn getRotatedBody(angle);\r\n\t}", "public OutlineShape(final Vertex.Factory<? extends Vertex> factory) {\r\n this.vertexFactory = factory;\r\n this.outlines = new ArrayList<Outline>(3);\r\n this.outlines.add(new Outline());\r\n this.outlineState = VerticesState.UNDEFINED;\r\n this.bbox = new AABBox();\r\n this.triangles = new ArrayList<Triangle>();\r\n this.vertices = new ArrayList<Vertex>();\r\n this.addedVerticeCount = 0;\r\n this.dirtyBits = 0;\r\n this.sharpness = DEFAULT_SHARPNESS;\r\n }" ]
[ "0.6539067", "0.6538527", "0.6331262", "0.6220954", "0.62074655", "0.61518365", "0.61022377", "0.6089898", "0.60194325", "0.5989377", "0.59330815", "0.59173", "0.5910261", "0.59096134", "0.5860284", "0.578257", "0.5699266", "0.5692848", "0.56129944", "0.5563893", "0.55475384", "0.5532689", "0.5516486", "0.5491376", "0.5490698", "0.5489577", "0.5482154", "0.5448035", "0.54189634", "0.5418006", "0.5406949", "0.53885", "0.536354", "0.5358073", "0.5342673", "0.5339204", "0.5338937", "0.5335787", "0.5332939", "0.53313655", "0.53242314", "0.53233504", "0.5321649", "0.5302085", "0.5301373", "0.52967733", "0.5268188", "0.5266142", "0.5255183", "0.52542764", "0.5251946", "0.5247461", "0.5242339", "0.52411246", "0.523165", "0.5219022", "0.52075315", "0.520692", "0.51949733", "0.5191577", "0.5189121", "0.51857185", "0.5180489", "0.51786953", "0.51739395", "0.51714855", "0.51652575", "0.51603377", "0.51580215", "0.5152238", "0.51416564", "0.5140575", "0.51391804", "0.510977", "0.5098928", "0.5095655", "0.5086504", "0.50829804", "0.5080217", "0.50700265", "0.50633854", "0.5062814", "0.5046129", "0.50376713", "0.50351685", "0.5035028", "0.50209767", "0.5020269", "0.49956807", "0.4994915", "0.49912468", "0.49910533", "0.4988243", "0.49879417", "0.4987934", "0.49877718", "0.49859232", "0.49851158", "0.4983115", "0.4980139" ]
0.5417363
30
Draws neutral score markers with arbitrary text, visible to both players. Score marker positions are defined in pixels, not physics units.
private void drawTextMarker(Graphics g, String message, int yLine) { int xCenter = getGameWidthPixels() / 2; Vector2DLong position0Inverted = new Vector2DLong(xCenter, yLine), position1NonInverted = new Vector2DLong(xCenter, getGameHeightPhysics() - yLine); drawScoreMarker(g, new ScoreMarker(message, position0Inverted, null, true)); drawScoreMarker(g, new ScoreMarker(message, position1NonInverted, null, false)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void drawTextMarker(Graphics g, String[] messages, int yLine, Player owner) {\n\t\tint xCenter = getGameWidthPixels() / 2;\n\t\tVector2DLong position0Inverted = new Vector2DLong(xCenter, yLine),\n\t\t\t\tposition1NonInverted = new Vector2DLong(xCenter, getGameHeightPixels() - yLine);\n\t\tdrawScoreMarker(g, new ScoreMarker(messages[0], position0Inverted, owner, true));\n\t\tdrawScoreMarker(g, new ScoreMarker(messages[1], position1NonInverted, owner, false));\n\t}", "private void drawScore() {\n\t\tString score = myWorld.getScore() + \"\";\n\n\t\t// Draw shadow first\n\t\tAssetLoader.shadow.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length()), 12);\n\t\t// Draw text\n\t\tAssetLoader.font.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length() - 1), 11);\n\n\t}", "private void drawScoreText(Canvas canvas) {\n paint.setTextSize(bodyTextSize);\n paint.setTextAlign(Paint.Align.CENTER);\n\n int bodyWidthHighScore = (int) (paint.measureText(\"\" + game.highScore));\n int bodyWidthScore = (int) (paint.measureText(\"\" + game.score));\n\n int textWidthHighScore = Math.max(titleWidthHighScore, bodyWidthHighScore) + textPaddingSize * 2;\n int textWidthScore = Math.max(titleWidthScore, bodyWidthScore) + textPaddingSize * 2;\n\n int textMiddleHighScore = textWidthHighScore / 2;\n int textMiddleScore = textWidthScore / 2;\n\n int eXHighScore = endingX;\n int sXHighScore = eXHighScore - textWidthHighScore;\n\n int eXScore = sXHighScore - textPaddingSize;\n int sXScore = eXScore - textWidthScore;\n\n //Outputting high-scores box\n backgroundRectangle.setBounds(sXHighScore, sYAll, eXHighScore, eYAll);\n backgroundRectangle.draw(canvas);\n paint.setTextSize(titleTextSize);\n paint.setColor(getResources().getColor(R.color.text_brown));\n canvas.drawText(getResources().getString(R.string.high_score), sXHighScore + textMiddleHighScore, titleStartYAll, paint);\n paint.setTextSize(bodyTextSize);\n paint.setColor(getResources().getColor(R.color.text_white));\n canvas.drawText(String.valueOf(game.highScore), sXHighScore + textMiddleHighScore, bodyStartYAll, paint);\n\n\n //Outputting scores box\n backgroundRectangle.setBounds(sXScore, sYAll, eXScore, eYAll);\n backgroundRectangle.draw(canvas);\n paint.setTextSize(titleTextSize);\n paint.setColor(getResources().getColor(R.color.text_brown));\n canvas.drawText(getResources().getString(R.string.score), sXScore + textMiddleScore, titleStartYAll, paint);\n paint.setTextSize(bodyTextSize);\n paint.setColor(getResources().getColor(R.color.text_white));\n canvas.drawText(String.valueOf(game.score), sXScore + textMiddleScore, bodyStartYAll, paint);\n }", "private void notateScore() {\r\n View.notate(score, this.getSize().width + 15, 0);\r\n }", "private void setScoreText(){\n if(color != BLACK && color != WHITE){\n scoreLabel.setText(\"Score: Black - \" + calScore(BLACK) + \" White - \" + calScore(WHITE));\n }else {\n scoreLabel.setText(\"Score: \" + calScore(this.color));\n }\n }", "public void drawSelf() {\n for (Point p : matches) {\n this.drawPoint(p, Color.WHITE);\n }\n }", "void drawDeath() {\n background(255, 255, 255);\n fill(0);\n textSize(75);\n textAlign(CENTER);\n text(\"You Died!\", 1024, 100);\n text(\"Kills= \"+ playerScore, 1024,200);\n text(\"Restart Program to try again.\", 1024, 300);\n\n}", "public void drawText(Canvas canvas) {\n Paint paint = new Paint();\n paint.setColor(Color.rgb(240, 230, 140)); //gold color\n paint.setTextSize(30);\n paint.setTypeface(Typeface.SANS_SERIF);\n\n canvas.drawText(\"SCORE: \" + player.getScore(), WIDTH - 250, HEIGHT - 10, paint); //display player score\n canvas.drawText(\"LEVEL: \" + level, 100, HEIGHT - 10, paint); //display level\n\n if(!player.getPlaying()){ //if player is dead\n paint.setColor(Color.rgb(102, 0, 0));\n paint.setTextSize(50);\n paint.setTypeface(Typeface.DEFAULT_BOLD);\n canvas.drawText(\"OH DEAR, YOU ARE DEAD!\", WIDTH/2 - 320, HEIGHT/2, paint); //print death message\n gameOver();\n }\n }", "private Label createScoreFloatLabel(){\n Label text;\n Label.LabelStyle textStyle;\n BitmapFont font = new BitmapFont();\n\n textStyle = new Label.LabelStyle();\n textStyle.font = font;\n\n text = new Label(\"\"+Math.round(playerInput.gameScore),textStyle);\n text.setFontScale(2f*scale,2f*scale);\n text.setAlignment(Align.center);\n text.setPosition(stage.getViewport().getCamera().viewportWidth * 0.5f,\n stage.getViewport().getCamera().viewportHeight * 0.60f);\n return text;\n }", "private Label createScoreLabel(){\n Label text;\n Label.LabelStyle textStyle;\n BitmapFont font = new BitmapFont();\n\n textStyle = new Label.LabelStyle();\n textStyle.font = font;\n\n text = new Label(\"Score:\",textStyle);\n text.setAlignment(Align.center);\n text.setFontScale(2f*scale,2f*scale);\n text.setPosition(stage.getViewport().getCamera().viewportWidth * 0.5f,\n stage.getViewport().getCamera().viewportHeight * 0.70f);\n return text;\n }", "public void setScoreText() {\n \tif(numBalls>0 && this.body.size()>0) {\n double x=this.body.get(0).getCenterX()-5;\n \tdouble y=this.body.get(0).getCenterY()+2;\n \t\n \tT.setX(x);\n \tT.setY(y);\n \tT.setText(String.valueOf(numBalls));\n \t}\n \t\n \t\n }", "public void display_game_over_text () {\n\n fill(150, 100);\n rect(0, 0, displayW, displayH);\n\n textFont(myFont);\n textAlign(CENTER);\n textSize(displayH/20);\n fill(255);\n text(\"Game Over\", displayW/2, 3*displayH/7);\n\n if (score.winnerName == \"Pacmax\") {\n text(\"Winner is Pacmax! Your score is \" + score.score, displayW/2, 4*displayH/7);\n } else {\n text(\"Winner is Blinky!\", displayW/2, 4*displayH/7);\n }\n\n mySound.play_game_over_song();\n\n isKeyInputAllowed = false;\n }", "private void draw(){\n\t\t\t Point level = new Point(txtBoard_top_left.x, txtBoard_top_left.y);\n\t\t\t level_info = new TextInfo(g, level, txt_width, size*4, LEVEL, this.level);\n\t\t\t level_info.drawTextInfo();\n\t\t\t \n\t\t\t // draw 2nd text info\n\t\t\t Point lines = new Point(level.x, level.y+size*2);\n\t\t\t lines_info = new TextInfo(g, lines, txt_width, size*4, LINES, this.lines);\n\t\t\t lines_info.drawTextInfo();\n\t\t\t \n\t\t\t // draw 3rd text info\n\t\t\t Point score = new Point(lines.x, lines.y+size*2);\n\t\t\t score_info = new TextInfo(g, score, txt_width, size*4, SCORE, this.score);\n\t\t\t score_info.drawTextInfo();\t\t\n\t\t}", "public void screenText(Canvas canvas){\n Paint paint = new Paint();\n paint.setColor(Color.WHITE);\n paint.setTextSize(30);\n paint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));\n canvas.drawText(\"Score: \"+ (newPlayer.getScore()), 10, height-10, paint);\n canvas.drawText(\"Best Score: \"+ getRecord(), width-215, height-10, paint);\n canvas.drawText(\"Level: \" + level, 10, height-550, paint);\n\n //If the game is reset will run a seperate screen text\n if (!newPlayer.getRunning()&&gamenew&&reset){\n Paint newPaint = new Paint();\n newPaint.setTextSize(40);\n newPaint.setColor(Color.WHITE);\n newPaint.setTypeface(Typeface.create(Typeface.DEFAULT,Typeface.BOLD));\n canvas.drawText(\"Click to start!\", width/2-50, height/2, newPaint);\n\n newPaint.setTextSize(20);\n canvas.drawText(\"Press and hold for the ship to hover up\", width/2-50,height/2+20,newPaint);\n canvas.drawText(\"Release to let the ship go down!\", width/2-50,height/2+40,newPaint);\n }\n\n }", "private Label createGameOverLabel(){\n Label text;\n Label.LabelStyle textStyle;\n BitmapFont font = new BitmapFont();\n\n textStyle = new Label.LabelStyle();\n textStyle.font = font;\n\n text = new Label(\"GAME OVER\",textStyle);\n text.setAlignment(Align.center);\n text.setFontScale(4f*scale,4f*scale);\n text.setPosition(stage.getViewport().getCamera().viewportWidth * 0.5f,\n stage.getViewport().getCamera().viewportHeight * 0.80f);\n return text;\n }", "static void ClearMarks() {\n\t\tif (pop != null)\n\t\t{\n\t\t\tpop.clear();\n\t\t}\n\t\tClearDraw();\n\t\ti1.setOverlay(null);\n\t\tOL = new Overlay();\n\t}", "private Label getScoreLabel(final int score){\n\t\tfinal BitmapFontData bitmapFontData = new BitmapFontData(Gdx.files.internal(FontConstants.LARGE_FONT_FILE), false);\n\n\t\tArray<TextureRegion> textureRegions = new Array<TextureRegion>(false, 2);\n\t\ttextureRegions.add(new TextureRegion(new Texture(Gdx.files.internal(FontConstants.LARGE_FONT_IMAGE_1), false)));\n\t\ttextureRegions.add(new TextureRegion(new Texture(Gdx.files.internal(FontConstants.LARGE_FONT_IMAGE_2), false)));\n\t\t\n\t\treturn new Label(Integer.toString(score), new Label.LabelStyle( new BitmapFont(bitmapFontData, textureRegions, true), TEXT_COLOR ));\n\t}", "private void gameOver(Graphics g) {\r\n String msg = \"Game Over!\";\r\n String msgScore = \"Your Score: \"+score;\r\n Font small = new Font(\"Helvetica\", Font.BOLD, 14);\r\n FontMetrics metr = getFontMetrics(small);\r\n //set color of text\r\n g.setColor(Color.white);\r\n //set font to small\r\n g.setFont(small);\r\n //draw string message in the center of the screen\r\n g.drawString(msg, (BRDWIDTH - metr.stringWidth(msg)) / 2, BRDHEIGHT / 2);\r\n g.drawString(msgScore, (BRDWIDTH - metr.stringWidth(msg)) / 2, BRDHEIGHT / 3);\r\n }", "private void renderGuiScore (SpriteBatch batch) \n\t{\n\t\t//float x = -15;\n\t\t//float y = -15;\n\t\t//batch.draw(Assets.instance.goldCoin.goldCoin, x, y, 50, 50, 100,\n\t\t//\t\t100, 0.35f, -0.35f, 0);\n\t\t//Assets.instance.fonts.defaultBig.draw(batch, \"\" + worldController.score,\n\t\t//\t\tx + 75, y + 37);\n\t\t\n\t\tfloat x = -15;\n\t\tfloat y = -15;\n\t\tfloat offsetX = 50;\n\t\tfloat offsetY = 50;\n\t\tif (worldController.scoreVisual<worldController.score) \n\t\t{\n\t\t long shakeAlpha = System.currentTimeMillis() % 360;\n\t\t float shakeDist = 1.5f;\n\t\t offsetX += MathUtils.sinDeg(shakeAlpha * 2.2f) * shakeDist;\n\t\t offsetY += MathUtils.sinDeg(shakeAlpha * 2.9f) * shakeDist;\n\t\t}\n\t\tbatch.draw(Assets.instance.goldCoin.goldCoin, x, y, offsetX,\n\t\toffsetY, 100, 100, 0.35f, -0.35f, 0);\n\t\tAssets.instance.fonts.defaultBig.draw(batch, \"\" + (int)worldController.scoreVisual, x + 75, y + 37);\n\t}", "private void drawNoResultsMessage()\n\t{\n\t\tFont font = new Font(\"Invalid\", Font.BOLD, 30);\t\t\n\t\ttitle.setBounds((super.getWidth()/2) - 380, (super.getHeight()/2) - 70, 800, 50);\n\t\ttitle.setFont(font);\n\t\tthis.add(title);\n\t}", "ScoreBar(ArrayList<Player> players, int x, int y) {\n // FORMAT: <name> [***] : \n this.players = players;\n this.x = x;\n this.y = y;\n this.f = createFont(\"HelveticaNeue-Thin\", 1, true);\n }", "@Override\n public void paint(Graphics g) {\n if (flagged) {\n Font f = new Font(\"Times\", Font.PLAIN, 30);\n g.setFont(f);\n FontMetrics fm = g.getFontMetrics();\n int a = fm.getAscent();\n int h = fm.getHeight();\n int fl = fm.stringWidth(\"F\");\n g.setColor(new Color(170, 171, 167));\n g.fillRect(0, 0, size, size);\n g.setColor(Color.BLACK);\n g.drawRect(0, 0, size, size);\n g.setColor(Color.WHITE);\n g.drawString(\"F\", size / 2 - fl / 2, size / 2 + a - h / 2);\n } else if (clicked) {\n //make the mines spots solid red squares\n if (mine) {\n g.setColor(Color.RED);\n g.fillRect(0, 0, size, size);\n g.setColor(Color.BLACK);\n g.drawRect(0, 0, size, size);\n } else {\n //if the spot has mines around it print the number in a specific color\n if (!numMines.equals(\"0\")) {\n Font f = new Font(\"Times\", Font.PLAIN, 30);\n g.setFont(f);\n FontMetrics fm = g.getFontMetrics();\n int a = fm.getAscent();\n int h = fm.getHeight();\n g.setColor(Color.WHITE);\n g.fillRect(0, 0, size, size);\n g.setColor(Color.BLACK);\n g.drawRect(0, 0, size, size);\n int w = fm.stringWidth(numMines);\n switch (numMines) {\n case \"1\":\n g.setColor(Color.BLACK);\n break;\n case \"2\":\n g.setColor(Color.BLUE);\n break;\n case \"3\":\n g.setColor(Color.RED);\n break;\n case \"4\":\n g.setColor(Color.GREEN);\n break;\n case \"5\":\n g.setColor(Color.ORANGE);\n break;\n case \"6\":\n g.setColor(Color.YELLOW);\n break;\n case \"7\":\n g.setColor(Color.CYAN);\n break;\n case \"8\":\n g.setColor(Color.PINK);\n break;\n default:\n break;\n }\n g.drawString(numMines, size / 2 - w / 2, size / 2 + a - h / 2);\n //if the spot has no mines around it leave it blank\n } else {\n g.setColor(Color.WHITE);\n g.fillRect(0, 0, size, size);\n g.setColor(Color.BLACK);\n g.drawRect(0, 0, size, size);\n }\n }\n //if the spot was not clicked or flagged print the normal color\n } else {\n g.setColor(new Color(170, 171, 167));\n g.fillRect(1, 1, size - 2, size - 2);\n g.setColor(Color.BLACK);\n g.drawRect(0, 0, size, size);\n }\n }", "private void renderGuiScore(SpriteBatch batch)\n {\n float x = -15;\n float y = -15;\n float offsetX = 50;\n float offsetY = 50;\n \n /*\n if(worldController.scoreVisual < worldController.score)\n {\n long shakeAlpha = System.currentTimeMillis() % 360;\n float shakeDist = 1.5f;\n offsetX += MathUtils.sinDeg(shakeAlpha * 2.2f) * shakeDist;\n offsetY += MathUtils.sinDeg(shakeAlpha * 2.9f) * shakeDist;\n }*/\n \n batch.draw(Assets.instance.candy.candycorn, x, y, 50, 50, 100, 100, 0.35f, -0.35f, 0);\n Assets.instance.fonts.defaultBig.draw(batch, \"\" + worldController.score, x + 75, y + 37);\n }", "private void drawnPoints(Canvas canvas) {\n int height;\n String itemText;\n Paint temporaryPaint;\n Rect textBound;\n\n // TODO refactor left and right to avoid duplicated code\n if (left.size() > 0) {\n height = HEIGHT / left.size();\n for (int i = 0; i < left.size(); i++) {\n Object item = left.get(i);\n\n Bitmap itemBitmap = adapter.getNotNullBitmap(item);\n itemText = adapter.getLabel(item);\n temporaryPaint = adapter.getLabelPaint(item);\n textBound = new Rect();\n float textMaxWidth = getMaximumWidth(itemText, temporaryPaint);\n temporaryPaint.getTextBounds(itemText, 0, itemText.length() - 1, textBound);\n\n if (item != null) {\n PointF location = getLocation(item);\n\n int positionY = (height / 2) + (height * i);\n\n\n float itemHeight = itemBitmap.getHeight() / (scaleToBackground ? ratio : 1);\n float itemWidth = itemBitmap.getWidth() / (scaleToBackground ? ratio : 1);\n\n labelClickable.put(drawText(canvas, temporaryPaint, 0, positionY, itemText, true), item);\n\n PointF anchor = adapter.getAnchor(item);\n canvas.drawLine(\n textMaxWidth + TEXT_MARGIN,\n positionY - (textBound.height() / 2),\n location.x + (itemWidth * anchor.x) - (itemWidth / 2),\n location.y + (itemHeight * anchor.y) - (itemHeight / 2),\n adapter.getLinePaint(item));\n }\n }\n }\n if (right.size() > 0) {\n height = HEIGHT / right.size();\n for (int i = 0; i < right.size(); i++) {\n Object item = right.get(i);\n\n itemText = adapter.getLabel(item);\n textBound = new Rect();\n\n temporaryPaint = adapter.getLabelPaint(item);\n\n temporaryPaint.getTextBounds(itemText, 0, itemText.length() - 1, textBound);\n\n\n if (item != null) {\n PointF location = getLocation(item);\n\n int positionY = (height / 2) + (height * i);\n\n\n Rect rect = drawText(canvas, temporaryPaint, WIDTH, positionY, itemText, false);\n labelClickable.put(rect, item);\n drawLine(canvas, textBound, item, location, positionY, rect.width());\n }\n }\n }\n }", "@Override\r\n public void drawOn(DrawSurface surface) {\r\n surface.setColor(Color.LIGHT_GRAY);\r\n String str = \"Score: \" + Integer.toString(getScore());\r\n int x = Constants.SCORE_BLOCK_X_LOCATION;\r\n int y = Constants.SCORE_BLOCK_Y_LOCATION;\r\n int width = Constants.SCORE_BLOCK_WIDTH;\r\n int height = Constants.SCORE_BLOCK_HEIGHT;\r\n surface.fillRectangle(x, y, width, height);\r\n surface.setColor(Color.BLACK);\r\n surface.drawRectangle(x, y, width, height);\r\n surface.setColor(Color.BLACK);\r\n surface.drawText(Constants.SCORE_FONT_X, Constants.SCORE_FONT_Y, str, Constants.SCORE_FONT_SIZE);\r\n }", "public void showScore()\n {\n showText(\"Score:\" + score,550,50);\n }", "public void displayMilitaryIcon(Graphics g, int xPos, int yPos){\n\t\t\n\t}", "public void resetMarker() {\n if(marker != null)\n marker.setIcon(BitmapDescriptorFactory.fromResource(GameSettings.getPlayerMarkerImage()));\n }", "public void paint(MapCanvas canvas, Point insertPoint) {\n Graphics2D graphics = null;\n if ((this.text != null) && (insertPoint != null) && (canvas != null) && \n ((graphics = canvas.graphics) != null)) {\n Font curFont = graphics.getFont();\n Color curColor = graphics.getColor();\n AffineTransform curTransForm = graphics.getTransform();\n try {\n TextStyle style = this.getTextStyle();\n FontMetrics fontMetrics = this.textFont.setCanvas(canvas);\n int textHeight = fontMetrics.getHeight();\n int x = insertPoint.x;\n int y = insertPoint.y;\n int textWidth = fontMetrics.stringWidth(this.text);\n// if ((style.orientation == TextStyle.Orientation.VerticalDn) || \n// (style.orientation == TextStyle.Orientation.VerticalUp)) {\n// if (style.hAlign == TextStyle.Horizontal.Center) {\n// y -= textWidth/2;\n// } else if (style.hAlign == TextStyle.Horizontal.Right) {\n// y -= textWidth;\n// }\n//\n// if (style.vAlign == TextStyle.Vertical.Middle) {\n// x += textHeight/2;\n// } else if (style.vAlign == TextStyle.Vertical.Top) {\n// x += textHeight;\n// }\n// } else {\n if (style.hAlign == TextStyle.Horizontal.Center) {\n x -= textWidth/2;\n } else if (style.hAlign == TextStyle.Horizontal.Right) {\n x -= textWidth;\n }\n\n if (style.vAlign == TextStyle.Vertical.Middle) {\n y += textHeight/2;\n } else if (style.vAlign == TextStyle.Vertical.Top) {\n y += textHeight;\n }\n //} \n float rotate = style.orientation.rotate;\n if (rotate != 0.0f) {\n AffineTransform transform = new AffineTransform();\n transform.translate(0.0d, 0.0d);\n transform.rotate(rotate, insertPoint.x, insertPoint.y);\n graphics.transform(transform);\n }\n \n graphics.drawString(this.text, x, y - fontMetrics.getDescent());\n } catch (Exception exp) {\n LOGGER.log(Level.WARNING, \"{0}.paint Error:\\n {1}\",\n new Object[]{this.getClass().getSimpleName(), exp.getMessage()});\n } finally {\n if (curFont != null) {\n graphics.setFont(curFont);\n }\n if (curColor != null) {\n graphics.setColor(curColor);\n }\n if (curTransForm != null) {\n graphics.setTransform(curTransForm);\n }\n }\n }\n }", "void doThreshDisplay(){\n\t /// init colors\n\t int greenFill = color(125,125,0, 65);\n\t int redFill = color(255,0,0,65);\n\t int blueFill = color(0,0,255, 85);\n\t //\n\t float spacing = 15;\n\t // \n\t textFont(SanSerif);\n\t /// hint(ENABLE_NATIVE_FONTS) ;\n\t \n\t /// position\n\t float dPosY3 = 0-height/2;\n\t float dPosY2 = 0-height/2 + spacing;\n\t float dPosY1 = 0-height/2 + spacing + spacing;\n\t \n\t /// make the text flush with the display bar\n\t float dPosX3 = 0-width/2 + (threshold3 * .5f) + 10f;\n\t float dPosX2 = 0-width/2 + (threshold2 * .5f) + 10f;\n\t float dPosX1 = 0-width/2 + (threshold1 * .5f) + 10f;\n\t \n\t // thresh 3 -- green squares\n\t strokeWeight(1);\n\t \n\t fill(greenFill);\n\t stroke(64,208,0);\n\t rect(0-width/2, dPosY3, threshold3 * .5f, 10f);\n\t fill(255,255,0);\n\t text(\"BACKGROUND: \" + threshold3 * .5, dPosX3, dPosY3 + 10);\n\t \n\t \n\t /// thresh 2 -- red circles\n\t fill(redFill);\n\t stroke(204,0,0);\n\t /// rotate(-15);\n\t rect(0-width/2,dPosY2, threshold2 * .5f, 10f);\n\t fill(204,0,0);\n\t text(\"MIDDLEGROUND: \" + threshold2 * .5f, dPosX2, dPosY2 + 10f);\n\t \n\t //// thresh 1 -- blue triangles\n\t fill(blueFill);\n\t stroke(0,24,255);\n\t /// rotate(-15);\n\t rect(0-width/2, dPosY1, threshold1 * .5f, 10f);\n\t fill(0,24,255);\n\t text(\"FOREGROUND: \" + threshold1 * .5, dPosX1, dPosY1 + 10);\n\t \n\t \n\n\n\t}", "public ScoreIndicator(Counter score, int width, int fontSize, int textY) {\n this.score = score;\n this.width = width;\n this.fontSize = fontSize;\n this.textY = textY;\n }", "public void showScore(int points) {\n sb.replace(0, sb.length() - 1, \"Score: \" + points);\n score.setText(sb.toString());\n }", "public ScoreLabel(final ScoreSheet the_sheet, final Font the_font)\n {\n super();\n my_scores = the_sheet;\n my_font = the_font;\n setOpaque(false);\n setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));\n \n my_score_label = new JLabel(\"Score: 0\");\n my_level_label = new JLabel(\"Level: 1\");\n my_lines_label = new JLabel(\"Lines Cleared: 0\");\n addLabels();\n }", "public void setScoreZero() {\n this.points = 10000;\n }", "public void drawCenteredText(String text, int x, int y);", "private void drawLeftColoumnText(SettingsClass s){\r\n Font font=new Font(\"SanSerif\",Font.BOLD,40);\r\n g.setColor(Color.black);\r\n g.setFont(font);\r\n\r\n g.drawString(\"Players\",50,40+50*1);\r\n g.drawString(\"Match Point\",50,40+50*2);\r\n g.drawString(\"Time Limit\",50,40+50*3);\r\n g.drawString(\"Sudden Death\",50,40+50*4);\r\n \r\n // draws player numbers\r\n font=new Font(\"SanSerif\",Font.BOLD,30);\r\n g.setColor(Color.black);\r\n g.setFont(font);\r\n for(int i=0;i<s.getNumPlayers();i++){\r\n String text=\"Player \"+(char)(i+1+'0');\r\n g.drawString(text,50,300+40*i); \r\n }\r\n }", "private void drawGameOver(Graphics g) {\n\t\tString msg;\n\t\tFont small = new Font(\"Helvetica\", Font.BOLD, 75);\n\t\tFontMetrics fm = getFontMetrics(small);\n\n\t\tif (p1score == p2score) {\n\t\t\tImageIcon ii = new ImageIcon(\"t71.gif\");\n\t\t\timage = ii.getImage();\n\t\t} else {\n\t\t\tImageIcon ii = new ImageIcon(\"g_over.gif\");\n\t\t\timage = ii.getImage();\n\t\t}\n\n\t\tg.drawImage(image, 0, 0, 1024, 768, this);\n\t\tif (p1score > p2score) {\n\t\t\tmsg = \"Congratulations COMPUTER\" + \"!\";\n\t\t\tg.setColor(Color.white);\n\t\t\tg.setFont(small);\n\t\t\tg.drawString(msg, (1024 - fm.stringWidth(msg)) / 2, 768 / 2);\n\t\t} else if (p1score < p2score) {\n\t\t\tmsg = \"Congratulations \" + Player2 + \"!\";\n\t\t\tg.setColor(Color.white);\n\t\t\tg.setFont(small);\n\t\t\tg.drawString(msg, (1024 - fm.stringWidth(msg)) / 2, 768 / 2);\n\t\t}\n\n\t}", "public void clearDomainMarks(){\n for (int i = 0 ; i < getBoardSize(); i++)\n for (int j = 0 ; j < getBoardSize(); j++){\n getPoint(i, j).setHolder(GoPlayer.UNKNOWN);\n }\n }", "@Override\n public void paintComponent(Graphics g) {\n // always clear the screen first!\n g.clearRect(0, 0, WIDTH, HEIGHT);\n\n // GAME DRAWING GOES HERE\n \n \n // draw the blocks\n g.setColor(Color.black);\n for(int i = 0; i < blocks.length; i++){\n g.fillRect(blocks[i].x, blocks[i].y, blocks[i].width, blocks[i].height);\n }\n \n // middle ref (no longer needed)\n //g.setColor(Color.black);\n //g.drawRect(WIDTH/2 - 1, 0, 1, HEIGHT);\n \n // scores\n g.setFont(biggerFont);\n g.setColor(Color.blue);\n g.drawString(\"\" + tobyScore, WIDTH/2-100, 75);\n if(tobyWin){\n g.drawString(\"Toby Wins!\", WIDTH/2-115, 120);\n }\n g.setColor(Color.red);\n if(maxWin){\n g.drawString(\"Max Wins!\", WIDTH/2-115, 120);\n }\n g.drawString(\"\" + maxScore, WIDTH/2+100, 75);\n g.setColor(Color.white);\n g.setFont(titleFont);\n g.drawString(\"Toby N' Max: Capture the Flag!\", 25, 20);\n \n // draw the player\n g.setColor(Color.red);\n g.fillRect(max.x, max.y, max.width, max.height);\n g.setColor(Color.blue);\n g.fillRect(toby.x, toby.y, toby.width, toby.height);\n \n // draw the flag\n g.setColor(brown);\n for(int i = 0; i < flagPole.length; i++){\n g.fillRect(flagPole[i].x, flagPole[i].y, flagPole[i].width, flagPole[i].height);\n }\n \n g.setColor(purple);\n for(int i = 0; i < flag.length; i++){\n g.fillRect(flag[i].x, flag[i].y, flag[i].width, flag[i].height);\n }\n \n g.setColor(Color.white);\n for(int i = 0; i < flagLogo.length; i++){\n g.fillRect(flagLogo[i].x, flagLogo[i].y, flagLogo[i].width, flagLogo[i].height);\n }\n \n //g.setColor(Color.gray);\n // for(int i = 0; i < bombs.length; i++){\n // g.fillRect(bombs[i].x, bombs[i].y, bombs[i].width, bombs[i].height); \n //}\n \n \n // GAME DRAWING ENDS HERE\n }", "public void startGameOver(){\n for(int i = 0; i < 4; i++) {\n for(int j = 0; j < 8; j++) {\n gameBoard[i][j].setText(\"\");\n }\n }\n for(int i = 4; i < 8; i++) {\n for(int j = 0; j < 4; j++) {\n gameBoard[i][j].setText(\"\");\n }\n }\n }", "@Override\n protected void paintForeground(Graphics2D g) {\n\n int fontSize = 40;\n\n g.setFont(new Font(\"TimesRoman\", Font.PLAIN, fontSize));\n g.setColor(Color.black);\n g.drawString(\"Points:\" + rat.getFoodCount(), 0, 40);\n\n }", "@Override\n public void drawOn(DrawSurface d) {\n String scoreString = \"Level Name: \" + this.levelName;\n d.setColor(Color.BLACK);\n d.drawText((GameLevel.BOARD_WIDTH / 2) + DISTANCE_FROM_THE_CENTER_X,\n HEIGHT_OF_TEXT, scoreString, FONT_SIZE);\n }", "private void drawGameOver() {\r\n\t\tg.setColor(Color.GRAY);\r\n\t\t// creates a new font\r\n\t\tFont myFont = new Font(Font.SANS_SERIF, Font.BOLD, TetrisGame.PANEL_WIDTH * 3 / 2);\r\n\t\tg.setFont(myFont);\r\n\t\t// draws the words \"Game Over\"\r\n\t\tg.drawString(\"GAME OVER!\",\r\n\t\t\t\t TetrisGame.PANEL_WIDTH * TetrisGame.SQUARE_LENGTH / 3,\r\n\t\t\t\t TetrisGame.PANEL_HEIGHT * TetrisGame.SQUARE_LENGTH / 2);\r\n\t\t// draws the score\r\n\t\tg.drawString(game.gameOverMessage,\r\n\t\t\t\t TetrisGame.PANEL_WIDTH * TetrisGame.SQUARE_LENGTH / 3,\r\n\t\t\t\t TetrisGame.PANEL_HEIGHT * TetrisGame.SQUARE_LENGTH / 2 + 20);\r\n\t\t// draws the restart message\r\n\t\tg.drawString(\"Press R to Retry\",\r\n\t\t\t\t TetrisGame.PANEL_WIDTH * TetrisGame.SQUARE_LENGTH / 3,\r\n\t\t\t\t TetrisGame.PANEL_HEIGHT * TetrisGame.SQUARE_LENGTH / 2 + 40);\r\n\t}", "public final void drawHoveringText(Minecraft mc, List<String> textLines, int x, int y)\n\t{\n\t\tif (!textLines.isEmpty())\n\t\t{\n\t\t\tGlStateManager.disableRescaleNormal();\n\t\t\tGlStateManager.disableDepth();\n\t\t\tint i = 0;\n\n\t\t\tfor (String s : textLines)\n\t\t\t{\n\t\t\t\tint j = mc.fontRendererObj.getStringWidth(s);\n\n\t\t\t\tif (j > i)\n\t\t\t\t{\n\t\t\t\t\ti = j;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint l1 = x + 12;\n\t\t\tint i2 = y - 12;\n\t\t\tint k = 8;\n\n\t\t\tif (textLines.size() > 1)\n\t\t\t{\n\t\t\t\tk += 2 + (textLines.size() - 1) * 10;\n\t\t\t}\n\n\t\t\tif (l1 + i > guiScreenParent.width)\n\t\t\t{\n\t\t\t\tl1 -= 28 + i;\n\t\t\t}\n\n\t\t\tif (i2 + k + 6 > guiScreenParent.height)\n\t\t\t{\n\t\t\t\ti2 = guiScreenParent.height - k - 6;\n\t\t\t}\n\n\t\t\tthis.zLevel = 300.0F;\n\t\t\tint l = -267386864;\n\t\t\tthis.drawGradientRect(l1 - 3, i2 - 4, l1 + i + 3, i2 - 3, -267386864, -267386864);\n\t\t\tthis.drawGradientRect(l1 - 3, i2 + k + 3, l1 + i + 3, i2 + k + 4, -267386864, -267386864);\n\t\t\tthis.drawGradientRect(l1 - 3, i2 - 3, l1 + i + 3, i2 + k + 3, -267386864, -267386864);\n\t\t\tthis.drawGradientRect(l1 - 4, i2 - 3, l1 - 3, i2 + k + 3, -267386864, -267386864);\n\t\t\tthis.drawGradientRect(l1 + i + 3, i2 - 3, l1 + i + 4, i2 + k + 3, -267386864, -267386864);\n\t\t\tint i1 = 1347420415;\n\t\t\tint j1 = 1344798847;\n\t\t\tthis.drawGradientRect(l1 - 3, i2 - 3 + 1, l1 - 3 + 1, i2 + k + 3 - 1, 1347420415, 1344798847);\n\t\t\tthis.drawGradientRect(l1 + i + 2, i2 - 3 + 1, l1 + i + 3, i2 + k + 3 - 1, 1347420415, 1344798847);\n\t\t\tthis.drawGradientRect(l1 - 3, i2 - 3, l1 + i + 3, i2 - 3 + 1, 1347420415, 1347420415);\n\t\t\tthis.drawGradientRect(l1 - 3, i2 + k + 2, l1 + i + 3, i2 + k + 3, 1344798847, 1344798847);\n\n\t\t\tfor (int k1 = 0; k1 < textLines.size(); ++k1)\n\t\t\t{\n\t\t\t\tString s1 = textLines.get(k1);\n\t\t\t\tmc.fontRendererObj.drawStringWithShadow(s1, (float)l1, (float)i2, -1);\n\n\t\t\t\tif (k1 == 0)\n\t\t\t\t{\n\t\t\t\t\ti2 += 2;\n\t\t\t\t}\n\n\t\t\t\ti2 += 10;\n\t\t\t}\n\n\t\t\tthis.zLevel = 0.0F;\n\t\t\tGlStateManager.enableDepth();\n\t\t\tGlStateManager.enableRescaleNormal();\n\t\t}\n\t}", "private void gameOverDisplay(Graphics g) {\r\n Font small = new Font(\"Helvetica\", Font.BOLD, 20);\r\n FontMetrics metric = getFontMetrics(small);\r\n g.setColor(Color.blue);\r\n g.setFont(small);\r\n if(winner == null) g.drawString(\"DRAW!\", (size - metric.stringWidth(\"DRAW!\")) / 2, size / 2);\r\n else g.drawString(winner.getPlayerName()+\" WIN!\", (size - metric.stringWidth(winner.getPlayerName()+\" WIN!\")) / 2, size / 2);\r\n }", "public void resetHitMarker() {}", "public void draw(Canvas canvas) {\n\t\tcanvas.drawText(String.valueOf(score), this.scoreRect.left, this.scoreRect.top + 30, textPaint);\r\n\t}", "private void renderGuiGameOverMessage(SpriteBatch batch)\n {\n float x = cameraGui.viewportWidth / 2;\n float y = cameraGui.viewportHeight / 2;\n if (worldController.isGameOver())\n {\n BitmapFont fontGameOver = Assets.instance.fonts.defaultBig;\n fontGameOver.setColor(1, 0.75f, 0.25f, 1);\n fontGameOver.draw(batch, \"GAME OVER\", x, y, 0, Align.center, false);\n fontGameOver.setColor(1, 1, 1, 1);\n }\n }", "@Override\r\n\tpublic void onCustomDraw(Graphics2D g) {\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(x, y, width, height);\r\n\t\tg.setColor(Color.green);\r\n\t\tfor(int i = 0; i < 50; i++){\r\n\t\t\tif(text[i] != null){\r\n\t\t\t\tg.drawString(text[i], 11, (i*10)+20);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void draw(SpriteBatch batch, String text, float x, float y, GameContainer c, StyledText style);", "private void gameOver(Graphics g){\n g.setColor(Color.WHITE);\n g.setFont(new Font(\"arial\", Font.BOLD, 50));\n g.drawString(\"Game Over\", 300, 300);\n\n g.setFont(new Font(\"arial\", Font.BOLD, 20));\n g.drawString(\"Space to RESTART\", 340, 340);\n\n g.setColor(Color.WHITE);\n g.setFont( new Font(\"arial\", Font.PLAIN, 20));\n g.drawString(\"Score: \" +score, 390,380);\n }", "@Override\n\tpublic void show () {\n overWorld = new Sprite(new TextureRegion(new Texture(Gdx.files.internal(\"Screens/overworldscreen.png\"))));\n overWorld.setPosition(0, 0);\n batch = new SpriteBatch();\n batch.getProjectionMatrix().setToOrtho2D(0, 0, 320, 340);\n\n // Creates the indicator and sets it to the position of the first grid item.\n indicator = new MapIndicator(screen.miscAtlases.get(2));\n // Creates the icon of Daur that indicates his position.\n icon = new DaurIcon(screen.miscAtlases.get(2));\n // Sets the mask position to zero, as this screen does not lie on the coordinate plane of any tiled map.\n screen.mask.setPosition(0, 0);\n screen.mask.setSize(320, 340);\n Gdx.input.setInputProcessor(inputProcessor);\n\n // Creates all relevant text.\n createText();\n // Sets numX and numY to the position of Daur on the map.\n numX = storage.cellX;\n numY = storage.cellY;\n indicator.setPosition(numX * 20, numY * 20 + 19);\n // Sets the icon to the center of this cell.\n icon.setPosition(numX * 20 + 10 - icon.getWidth() / 2, numY * 20 + 29 - icon.getHeight() / 2);\n // Creates all the gray squares necessary.\n createGraySquares();\n }", "private static String playersToDrawOnSquare(SquareLM squareLM) throws NullPointerException{\n if(squareLM == null){\n throw new NullPointerException(\"The parameter should not be null\");\n }\n String stringToReturn = \"\";\n for(int idPlayer : squareLM.getPlayers()){\n //'P' if the player is up, 'p' if the player is down\n String markerPlayer;\n if(InfoOnView.getPlayers()[idPlayer].getDown()){\n markerPlayer = \"p\";\n }\n else{\n markerPlayer = \"P\";\n }\n //eg: the player with id 0 is the player 1\n stringToReturn += markerPlayer + (idPlayer + 1);\n }\n //all the rest of the line is blank (' ')\n return lineInsideSquareWithBlankAtTheEnd(stringToReturn);\n }", "private void drawXYZText() {\n\t\t//Draw text X - red\n\t\tgl.glColor3f(1.0f, 0.0f, 0.0f);\n\t\tgl.glRasterPos3f(1,0,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"X\");\n\t\tgl.glEnd();\n\t\t//Draw text -X - red\n\t\tgl.glColor3f(1.0f, 0.0f, 0.0f);\n\t\tgl.glRasterPos3f(-1,0,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"-X\");\n\t\tgl.glEnd();\n\t\t\n\t\t//Draw text Y - Green\n\t\tgl.glColor3f(0.0f, 1.0f, 0.0f);\n\t\tgl.glRasterPos3f(0,1,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"Y\");\n\t\tgl.glEnd();\n\t\t//Draw text -Y - Green\n\t\tgl.glColor3f(0.0f, 1.0f, 0.0f);\n\t\tgl.glRasterPos3f(0,-1,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"-Y\");\n\t\tgl.glEnd();\n\t\t\n\t\t//Draw text Z - Blue\n\t\tgl.glColor3f(0.0f, 0.0f, 1.0f);\n\t\tgl.glRasterPos3f(0,0,1);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"Z\");\n\t\tgl.glEnd();\n\t\t//Draw text -Z - Blue\n\t\tgl.glColor3f(0.0f, 0.0f, 1.0f);\n\t\tgl.glRasterPos3f(0,0,-1);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"-Z\");\n\t\tgl.glEnd();\n\t}", "private void drawStrings(Canvas canvas)\n\t{\n\t\tPaint dark = new Paint();\n\t\tdark.setARGB(255, 15, 74, 0);\n\t\tdark.setTextAlign(Paint.Align.CENTER);\n\t\tfloat cellWidth = (Math.min(getMeasuredHeight(), getMeasuredWidth()) - PADDING);\n\t\tcellWidth = cellWidth/(float)_height;\n\t\tdark.setTextSize(cellWidth / 4 * 3);\n\n\t\tTypeface font = Typeface.createFromAsset(getContext().getAssets(), \n\t\t\t\t\"fonts/Roboto.ttf\");\n\t\tdark.setTypeface(font);\n\t\tfor ( int i = 0; i < _board.getSize(); ++i ) \n\t\t{\n\t\t\tString letter = _board.getElementAt(i);\n\t\t\tint x = i % _height;\n\t\t\tint y = i / _height;\n\t\t\tcanvas.drawText(letter, x * (cellWidth) + cellWidth / 2, y * (cellWidth) + cellWidth / 4 * 3, dark);\n\t\t}\n\t}", "public void drawEntry(int p_148279_1_, int xPosition, int yPosition, int p_148279_4_, int p_148279_5_,\n\t\t\t\tint p_148279_7_, int p_148279_8_, boolean p_148279_9_) {\n\t\t\txPosition = xPosition - 16;\n\n\t\t\tGuiSnitchList.this.mc.fontRendererObj.drawString(this.xHeader, xPosition + GuiSnitchList.this.coordWidth\n\t\t\t\t\t- mc.fontRendererObj.getStringWidth(this.xHeader) / 2, yPosition + p_148279_5_\n\t\t\t\t\t- GuiSnitchList.this.mc.fontRendererObj.FONT_HEIGHT - 1, 16777215);\n\t\t\tGuiSnitchList.this.mc.fontRendererObj.drawString(this.yHeader, xPosition + GuiSnitchList.this.coordWidth\n\t\t\t\t\t- mc.fontRendererObj.getStringWidth(this.yHeader) / 2 + GuiSnitchList.this.coordWidth, yPosition\n\t\t\t\t\t+ p_148279_5_ - GuiSnitchList.this.mc.fontRendererObj.FONT_HEIGHT - 1, 16777215);\n\t\t\tGuiSnitchList.this.mc.fontRendererObj.drawString(this.zHeader, xPosition + GuiSnitchList.this.coordWidth\n\t\t\t\t\t- mc.fontRendererObj.getStringWidth(this.zHeader) / 2 + GuiSnitchList.this.coordWidth * 2,\n\t\t\t\t\tyPosition + p_148279_5_ - GuiSnitchList.this.mc.fontRendererObj.FONT_HEIGHT - 1, 16777215);\n\t\t\tGuiSnitchList.this.mc.fontRendererObj.drawString(this.groupHeader, xPosition\n\t\t\t\t\t+ GuiSnitchList.this.ctGroupWidth - mc.fontRendererObj.getStringWidth(this.groupHeader) / 2\n\t\t\t\t\t+ GuiSnitchList.this.coordWidth * 3, yPosition + p_148279_5_\n\t\t\t\t\t- GuiSnitchList.this.mc.fontRendererObj.FONT_HEIGHT - 1, 16777215);\n\t\t\tGuiSnitchList.this.mc.fontRendererObj.drawString(this.nameHeader, xPosition + GuiSnitchList.this.nameWidth\n\t\t\t\t\t- mc.fontRendererObj.getStringWidth(this.nameHeader) / 2 + GuiSnitchList.this.coordWidth * 3\n\t\t\t\t\t+ GuiSnitchList.this.ctGroupWidth, yPosition + p_148279_5_\n\t\t\t\t\t- GuiSnitchList.this.mc.fontRendererObj.FONT_HEIGHT - 1, 16777215);\n\t\t}", "private void sketchScore() {\r\n View.sketch(score, this.getSize().width + 15, 0);\r\n }", "private void showScore() {\r\n View.show(score, this.getSize().width + 15, 0);\r\n }", "public void UIDrawing(Graphics g)\n {\n key.draw(g);\n bomb.draw(g);\n heart.setxPos(originalxPos);\n heart.setyPos(originalyPos);\n halfHeart.setxPos(originalxPos);\n halfHeart.setyPos(originalyPos);\n emptyHeart.setxPos(originalxPos);\n emptyHeart.setyPos(originalyPos);\n g.setFont(new Font(\"Chiller\", Font.BOLD, 30)); \n if(this.getKeys() < 10)\n {\n g.setColor(Color.BLACK);\n g.drawString(\": 0\" + this.getKeys(), 40 + 2, 100);\n g.drawString(\": 0\" + this.getKeys(), 40 - 2, 100);\n g.drawString(\": 0\" + this.getKeys(), 40, 100 + 2);\n g.drawString(\": 0\" + this.getKeys(), 40, 100 - 2);\n g.setColor(Color.WHITE);\n g.setFont(new Font(\"Chiller\", Font.BOLD, 30));\n g.drawString(\": 0\"+ this.getKeys(), 40, 100);\n }\n else\n {\n g.setColor(Color.BLACK);\n g.drawString(\": \" + this.getKeys(), 40 + 2, 100);\n g.drawString(\": \" + this.getKeys(), 40 - 2, 100);\n g.drawString(\": \" + this.getKeys(), 40, 100 + 2);\n g.drawString(\": \" + this.getKeys(), 40, 100 - 2);\n g.setColor(Color.WHITE);\n g.setFont(new Font(\"Chiller\", Font.BOLD, 30));\n g.drawString(\": \"+ this.getKeys(), 40, 100);\n }\n if(this.getBombs() < 10)\n {\n g.setColor(Color.BLACK);\n g.drawString(\": 0\" + this.getBombs(), 40 + 2, 150);\n g.drawString(\": 0\" + this.getBombs(), 40 - 2, 150);\n g.drawString(\": 0\" + this.getBombs(), 40, 150 + 2);\n g.drawString(\": 0\" + this.getBombs(), 40, 150 - 2);\n g.setColor(Color.WHITE);\n g.setFont(new Font(\"Chiller\", Font.BOLD, 30));\n g.drawString(\": 0\"+ this.getBombs(), 40, 150);\n }\n else\n {\n g.setColor(Color.BLACK);\n g.drawString(\": \" + this.getBombs(), 40 + 2, 150);\n g.drawString(\": \" + this.getBombs(), 40 - 2, 150);\n g.drawString(\": \" + this.getBombs(), 40, 150 + 2);\n g.drawString(\": \" + this.getBombs(), 40, 150 - 2);\n g.setColor(Color.WHITE);\n g.setFont(new Font(\"Chiller\", Font.BOLD, 30));\n g.drawString(\": \"+ this.getBombs(), 40, 150);\n }\n for(int i = 0; i < this.getMaxHp() / 2; i++)\n {\n emptyHeart.setxPos(originalxPos + (35 * i));\n if(i >= 6)\n {\n emptyHeart.setyPos(originalyPos + 30);\n emptyHeart.setxPos(originalxPos + (35 * (i - 6)));\n }\n emptyHeart.draw(g);\n }\n for(int i = 0; i < this.getHealth() / 2; i++)\n {\n heart.setxPos(originalxPos + (35 * i));\n if(i >= 6)\n {\n heart.setyPos(originalyPos + 30);\n heart.setxPos(originalxPos + (35 * (i - 6)));\n }\n heart.draw(g);\n if(i == this.getHealth()/2 - 0.5 && ((int)this.getHealth() % 2) != 0)\n {\n halfHeart.setxPos(originalxPos + (35 * i));\n if(i >= 6)\n {\n halfHeart.setxPos(originalxPos + (35 * (i - 6)));\n halfHeart.setyPos(originalyPos + 30);\n }\n halfHeart.draw(g);\n }\n }\n }", "private void clearOpponentPosition() {\n\t\tfor (TextView txtView : this.computerPlayerTxtViews) {\n\t\t\ttxtView.setText(\"\");\n\t\t}\n\t}", "private void draw() {\n if (surfaceHolder.getSurface().isValid()) {\n //lock the canvas\n canvas = surfaceHolder.lockCanvas();\n //set background colour\n canvas.drawColor(Color.BLACK);\n //draw stars\n paint.setColor(Color.WHITE);\n starManager.draw(this.canvas, this.paint);\n //draw player\n player.draw(this.canvas, this.paint);\n //draw enemies\n enemyManager.draw(this.canvas, this.paint);\n //draw asteroids\n asteroidManager.draw(this.canvas, this.paint);\n\n //draw the score as well\n paint.setTextSize(100);\n paint.setColor(Color.WHITE);\n canvas.drawText(\"\" + Constants.SCORE, 50, paint.descent() - paint.ascent(), paint);\n\n //if game is over\n if (Constants.GAME_OVER) {\n paint.setTextSize(100);\n paint.setTextAlign(Paint.Align.CENTER);\n paint.setColor(Color.WHITE);\n\n //tell the player\n int yPos = (int) ((canvas.getHeight() / 2) - ((paint.descent() + paint.ascent()) / 2));\n canvas.drawText(\"Game over\", canvas.getWidth() / 2, yPos, paint);\n\n paint.setTextSize(50);\n yPos = (int) ((canvas.getHeight() - 2 * paint.descent()) - ((paint.descent() + paint.ascent()) / 2));\n canvas.drawText(\"Tap anywhere to return to main menu...\", canvas.getWidth() / 2, yPos, paint);\n }\n //unlock canvas\n surfaceHolder.unlockCanvasAndPost(canvas);\n }\n }", "private static void draw() {\r\n\t\tclearDoc();\r\n\t\twrite(\"score: \" + score + \"\\n\", null);\r\n\t\twrite(\"+\", null);\r\n\t\tfor (int i = 0; i < COLUMNS; i++) {\r\n\t\t\twrite(\"-\", null);\r\n\t\t}\r\n\t\twrite(\"+\\n\", null);\r\n\t\tfor (int i = 0; i < ROWS; i++) {\r\n\t\t\twrite(\"|\", null);\r\n\t\t\tfor (int j = 0; j < COLUMNS; j++) {\r\n\t\t\t\tif (field[i][j] == SNAKE) {\r\n\t\t\t\t\twrite(\"S\", green);\r\n\t\t\t\t} else if (field[i][j] == APPLE) {\r\n\t\t\t\t\twrite(\"A\", red);\r\n\t\t\t\t} else if (field[i][j] == POISON) {\r\n\t\t\t\t\twrite(\"P\", magenta);\r\n\t\t\t\t} else if (field[i][j] == MOUSE) {\r\n\t\t\t\t\twrite(\"M\", grey);\r\n\t\t\t\t} else {\r\n\t\t\t\t\twrite(\"~\", null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twrite(\"|\\n\", null);\r\n\t\t}\r\n\t\twrite(\"+\", null);\r\n\t\tfor (int i = 0; i < COLUMNS; i++) {\r\n\t\t\twrite(\"-\", null);\r\n\t\t}\r\n\t\twrite(\"+\", null);\r\n\t\tframe.pack();\r\n\t}", "public void drawNoticeText(int h){\r\n Font font=new Font(\"SanSerif\",Font.BOLD,15); \r\n g.setColor(Color.red);\r\n g.setFont(font);\r\n String t=\"NOTE: All players cannot be on the same team.\";\r\n g.drawString(t,50,265);\r\n t=\"Use WASD to move.\";\r\n g.drawString(t,50,48); \r\n t=\"Press SPACE on the Start Button to Begin!\";\r\n g.drawString(t,120,h-5); \r\n \r\n font=new Font(\"SanSerif\",Font.BOLD,40); \r\n g.setColor(Color.black);\r\n g.setFont(font); \r\n t=\"Settings\";\r\n g.drawString(t,330,40); \r\n }", "public Marker gameWon() {\r\n for (int s : sums) {\r\n if (s == BOARD_SIZE) {\r\n return Marker.X;\r\n }\r\n else if (s == -BOARD_SIZE) {\r\n return Marker.O;\r\n }\r\n }\r\n\r\n return Marker.EMPTY;\r\n }", "private void displayWrongLetters() {\n\t\tGObject checkForOldLabel = getElementAt(wrongLettersPosX,wrongLettersPosY);\n\t\tif (checkForOldLabel != null) {\n\t\t\tremove(checkForOldLabel);\n\t\t}\n\t\twrongLettersPosX = guessPosX;\n\t\twrongLettersPosY = guessPosY+guessSoFar.getHeight()*2;\n\t\tGLabel wrongLetterDisplay = new GLabel(wrongLetters);\n\t\twrongLetterDisplay.setLocation(wrongLettersPosX,wrongLettersPosY);\n\t\tadd(wrongLetterDisplay);\n\t}", "public void changeLableText(int playerScore,int computerScore);", "@Override\n\tpublic void onAttached() {\n\t\tsuper.onAttached();\n\n\t\tint l = 0;\n\t\tswitch (BoxScreen.BOX_INDEX) {\n\t\tcase 1:\n\t\t\tl = 50;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tl = 100;\n\t\t\tbreak;\n\t\t}\n\n\t\tthis.mStarsNeeded = l - Game.mDatabase.getTotalStars();\n\n\t\tif (this.mStarsNeeded < 10) {\n\t\t\tthis.mStarsCountText.getByIndex(2).setCurrentTileIndex(this.mStarsNeeded);\n\t\t\tthis.mStarsCountText.getByIndex(0).setVisible(false);\n\t\t\tthis.mStarsCountText.getByIndex(1).setVisible(false);\n\t\t\tthis.mStarsCountText.getByIndex(2).setVisible(true);\n\t\t} else if (this.mStarsNeeded < 100) {\n\t\t\tthis.mStarsCountText.getByIndex(1).setCurrentTileIndex((int) FloatMath.floor(this.mStarsNeeded / 10));\n\t\t\tthis.mStarsCountText.getByIndex(2).setCurrentTileIndex((int) FloatMath.floor(this.mStarsNeeded % 10));\n\t\t\tthis.mStarsCountText.getByIndex(0).setVisible(false);\n\t\t\tthis.mStarsCountText.getByIndex(1).setVisible(true);\n\t\t\tthis.mStarsCountText.getByIndex(2).setVisible(true);\n\t\t} else {\n\t\t\tthis.mStarsCountText.getByIndex(0).setCurrentTileIndex((int) FloatMath.floor(this.mStarsNeeded / 100));\n\t\t\tthis.mStarsCountText.getByIndex(1).setCurrentTileIndex((int) FloatMath.floor((this.mStarsNeeded - FloatMath.floor(this.mStarsNeeded / 100) * 100) / 10));\n\t\t\tthis.mStarsCountText.getByIndex(2).setCurrentTileIndex((int) FloatMath.floor(this.mStarsNeeded % 10));\n\t\t\tthis.mStarsCountText.getByIndex(0).setVisible(true);\n\t\t\tthis.mStarsCountText.getByIndex(1).setVisible(true);\n\t\t\tthis.mStarsCountText.getByIndex(2).setVisible(true);\n\t\t}\n\t}", "public void renderMap(GameMap gameMap, Player player)\n\t{\n\t\tthis.drawMapGlyphs(gameMap, player);\n\t\t// this.getGlyphs(gameMap, player);\n\t\t// for(Text text : this.getGlyphs(gameMap))\n\t\t// window.getRenderWindow().draw(text);\n\t}", "public void resetScore() {\n this.myCurrentScoreInt = 0;\n this.myScoreLabel.setText(Integer.toString(this.myCurrentScoreInt));\n }", "public void drawOn(DrawSurface d) {\r\n String hitCounteString;\r\n d.setColor(Color.black);\r\n hitCounteString = Integer.toString(this.score.getValue());\r\n d.drawText(400, 18, \"score: \" + hitCounteString, 15);\r\n\r\n }", "private void drawBlack() throws IOException, ReversiException {\n playSound(PLAY_SOUND);\n // get the list of stones need to be changed\n String list = fromServer.readUTF();\n // draw black the list of stones\n boardComponent.drawBlack(list);\n\n setScoreText();\n\n // followed by the TURN command\n responseToServer();\n }", "public void showMap() {\n//\t\tSystem.out.print(\" \");\n//\t\tfor (int i = 0; i < maxY; i++) {\n//\t\t\tSystem.out.print(i);\n//\t\t\tSystem.out.print(' ');\n//\t\t}\n\t\tSystem.out.println();\n\t\tfor (int i = 0; i < maxX; i++) {\n//\t\t\tSystem.out.print(i + \" \");\n\t\t\tfor (int j = 0; j < maxY; j++) {\n\t\t\t\tSystem.out.print(coveredMap[i][j]);\n\t\t\t\tSystem.out.print(' ');\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void setNeutralPose() {\n setPose(0.5f, -1, 0.5f, -1, 0.5f, -1);\n this.boltSize = 0;\n }", "@Override\r\n\tpublic void render(GameContainer gc, Renderer r) {\n\t\tr.drawTextInBox(posX, posY, width, height, color1, text);\r\n\t\t//r.noiseGen();\r\n\t}", "public void strokeString(float x, float y, String text);", "private void refreshScore(){\n String info = players[0] + \" \"+playerScores[0]+\":\" +playerScores[1]+ \" \"+players[1];\n scoreInfo.setText(info);\n }", "private void drawControlsText(Graphics2D g2, int player, int horizontalDisplacement)\n\t{\n\t\tFont fontyFont = new Font(\"IMPACT\", Font.BOLD, MEDIUM_FONT);\n\t\tg2.setColor(Color.WHITE);\n\t\tg2.setFont(fontyFont);\n\t\tif (players.get(player).playingGame)\n\t\t{\n\t\t\tint sizeOfDeck = players.get(player).size();\n\t\t\tif (sizeOfDeck != 1)\n\t\t\t\tg2.drawString(players.get(player).size() + \" Cards\",\n\t\t\t\t\t\tframeWidth / 2 - CARD_WIDTH / CARD_DIVISION_DIVISOR + horizontalDisplacement +\n\t\t\t\t\t\t\t\tDISTANCE_FROM_CORNER, frameHeight - CARD_HEIGHT / 2 + DISTANCE_FROM_CORNER);\n\t\t\telse\n\t\t\t\tg2.drawString(players.get(player).size() + \" ers.slapjack.Card\",\n\t\t\t\t\t\tframeWidth / 2 - CARD_WIDTH / CARD_DIVISION_DIVISOR + horizontalDisplacement +\n\t\t\t\t\t\t\t\tDISTANCE_FROM_CORNER, frameHeight - CARD_HEIGHT / 2 + DISTANCE_FROM_CORNER);\n\t\t\tg2.setColor(Color.BLACK);\n\t\t\tfontyFont = new Font(\"IMPACT\", Font.ITALIC, SMALL_FONT);\n\t\t\tg2.setFont(fontyFont);\n\t\t\t//Draw correct controls for each player\n\t\t\tg2.drawString(players.get(player).getPlayButton() + \" - Play\",\n\t\t\t\t\tframeWidth / 2 - CARD_WIDTH / CARD_DIVISION_DIVISOR + horizontalDisplacement +\n\t\t\t\t\t\t\tDISTANCE_FROM_CORNER, frameHeight - DISTANCE_PLAY_FROM_BOTTOM);\n\t\t\tg2.drawString(players.get(player).getSlapButton() + \" - Slap\",\n\t\t\t\t\tframeWidth / 2 - CARD_WIDTH / CARD_DIVISION_DIVISOR + horizontalDisplacement +\n\t\t\t\t\t\t\tDISTANCE_FROM_CORNER, (int) (frameHeight - DISTANCE_SLAP_FROM_BOTTOM));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tg2.drawString(\"OUT\",\n\t\t\t\t\tframeWidth / 2 - CARD_WIDTH / CARD_DIVISION_DIVISOR + horizontalDisplacement +\n\t\t\t\t\t\t\tDISTANCE_FROM_CORNER, frameHeight - CARD_HEIGHT / 2 + DISTANCE_FROM_CORNER);\n\t\t}\n\t}", "private void renderGuiGameOverMessage (SpriteBatch batch)\n\t{\n\t\tfloat x = cameraGUI.viewportWidth / 2;\n\t\tfloat y = cameraGUI.viewportHeight / 2;\n\t\t\n\t\tif (worldController.isGameOver())\n\t\t{\n\t\t\tBitmapFont fontGameOver = Assets.instance.fonts.defaultBig;\n\t\t\tfontGameOver.setColor(1, 0.75f, 0.25f, 1);\n\t\t\t\n\n\t\t\tfontGameOver.draw(batch, \"GAME OVER\", x, y, 1, Align.center, false);\n\t\t\t\n\t\t\tfontGameOver.setColor(1, 1, 1, 1);\n\t\t}\n\t}", "public void drawStartScreen() {\n\t\tint highScore = getHighScore();\n\t\tdisplayText(\"High Score \" + String.valueOf(highScore), 0, 0, false);\n\t\tdisplayText(\"Press to Start Game\", 0, -100, false);\n\t}", "@Override\n public void drawMarker(PGraphics pg, float x, float y)\n {\n pg.noFill();\n pg.rectMode(CENTER);\n pg.rect(x,y,this.radius*2,this.radius*2,10);\n }", "protected void drawHoveringText( List<String> descriptionLines, int posX, int posY, FontRenderer fontrenderer )\n\t{\n\t\tif( !descriptionLines.isEmpty() )\n\t\t{\n\t\t\tGL11.glDisable( GL_RESCALE_NORMAL );\n\n\t\t\tGL11.glDisable( GL11.GL_LIGHTING );\n\n\t\t\tGL11.glDisable( GL11.GL_DEPTH_TEST );\n\n\t\t\tint maxStringLength = 0;\n\n\t\t\tfor( String string : descriptionLines )\n\t\t\t{\n\n\t\t\t\tint stringLen = fontrenderer.getStringWidth( string );\n\n\t\t\t\tif( stringLen > maxStringLength )\n\t\t\t\t{\n\t\t\t\t\tmaxStringLength = stringLen;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint offsetX = posX + 12;\n\n\t\t\tint offsetY = posY - 12;\n\n\t\t\tint tooltipHeight = 8;\n\n\t\t\tif( descriptionLines.size() > 1 )\n\t\t\t{\n\t\t\t\ttooltipHeight += 2 + ( ( descriptionLines.size() - 1 ) * 10 );\n\t\t\t}\n\n\t\t\tthis.zLevel = 300.0F;\n\n\t\t\tint drawColor = 0xF0100010;\n\t\t\tthis.drawGradientRect( offsetX - 3, offsetY - 4, offsetX + maxStringLength + 3, offsetY - 3, drawColor, drawColor );\n\t\t\tthis.drawGradientRect( offsetX - 3, offsetY + tooltipHeight + 3, offsetX + maxStringLength + 3, offsetY + tooltipHeight + 4, drawColor,\n\t\t\t\tdrawColor );\n\t\t\tthis.drawGradientRect( offsetX - 3, offsetY - 3, offsetX + maxStringLength + 3, offsetY + tooltipHeight + 3, drawColor, drawColor );\n\t\t\tthis.drawGradientRect( offsetX - 4, offsetY - 3, offsetX - 3, offsetY + tooltipHeight + 3, drawColor, drawColor );\n\t\t\tthis.drawGradientRect( offsetX + maxStringLength + 3, offsetY - 3, offsetX + maxStringLength + 4, offsetY + tooltipHeight + 3, drawColor,\n\t\t\t\tdrawColor );\n\n\t\t\tdrawColor = 0x505000FF;\n\t\t\tint fadeColor = ( ( drawColor & 0xFEFEFE ) >> 1 ) | ( drawColor & 0xFF000000 );\n\t\t\tthis.drawGradientRect( offsetX - 3, ( offsetY - 3 ) + 1, ( offsetX - 3 ) + 1, ( offsetY + tooltipHeight + 3 ) - 1, drawColor, fadeColor );\n\t\t\tthis.drawGradientRect( offsetX + maxStringLength + 2, ( offsetY - 3 ) + 1, offsetX + maxStringLength + 3,\n\t\t\t\t( offsetY + tooltipHeight + 3 ) - 1, drawColor, fadeColor );\n\t\t\tthis.drawGradientRect( offsetX - 3, offsetY - 3, offsetX + maxStringLength + 3, ( offsetY - 3 ) + 1, drawColor, drawColor );\n\t\t\tthis.drawGradientRect( offsetX - 3, offsetY + tooltipHeight + 2, offsetX + maxStringLength + 3, offsetY + tooltipHeight + 3, fadeColor,\n\t\t\t\tfadeColor );\n\n\t\t\tfor( int descriptionIndex = 0; descriptionIndex < descriptionLines.size(); descriptionIndex++ )\n\t\t\t{\n\t\t\t\tString s1 = descriptionLines.get( descriptionIndex );\n\t\t\t\tfontrenderer.drawStringWithShadow( s1, offsetX, offsetY, -1 );\n\t\t\t\tif( descriptionIndex == 0 )\n\t\t\t\t{\n\t\t\t\t\toffsetY += 2;\n\t\t\t\t}\n\t\t\t\toffsetY += 10;\n\t\t\t}\n\t\t\tthis.zLevel = 0.0F;\n\n\t\t\tGL11.glEnable( GL11.GL_LIGHTING );\n\n\t\t\tGL11.glEnable( GL11.GL_DEPTH_TEST );\n\n\t\t\tGL11.glEnable( GL_RESCALE_NORMAL );\n\t\t}\n\t}", "@Override\n\tpublic void onDraw(Canvas canvas) {\n\t\t//black canvas \n\t\tcanvas.drawRGB(15, 74, 0);\n\n\t\tif( _game.getStatus() != Game.Status.RUNNING) \n\t\t\treturn;\n\t\t\n\t\t//this draws the grid on which the player has to match words\n\t\tshowGrid(canvas);\n\t\t//highlight the final word\n\t\thighlight(canvas);\n\t\t//draw letters in board\n\t\tdrawStrings(canvas);\n\t\t//this shows how much time the player has left\n\t\tshowTimer(canvas);\n\t\t//this shows the number of dictionary words the player has found until\n\t\t//current time\n\t\tshowWordCount(canvas);\n\t\t//draw the score also\n\t\tshowScore(canvas);\n\t\t\n\t}", "@Override\n public void paint(Graphics g) {\n g.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 200));\n\n g.setColor(Color.cyan);\n String GameName = \"BALLAND BAR\";\n int x_pos = 150;\n int y_pos = 300;\n int alpha = 8;\n for (int i = 0; i < GameName.length(); i++) {\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha * 0.1f));\n g.drawString(Character.toString(GameName.charAt(i)), x_pos, y_pos);\n x_pos += 150;\n // alpha -= 1;\n }\n\n g.setColor(Color.orange);\n GameName = \"GAME\";\n x_pos = 700;\n y_pos = 550;\n for (int i = 0; i < GameName.length(); i++) {\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha * 0.1f));\n g.drawString(Character.toString(GameName.charAt(i)), x_pos, y_pos);\n x_pos += 150;\n // alpha -= 1;\n }\n /*\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 7 * 0.1f));\n g.drawString(\"G\", 650, 300);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 6 * 0.1f));\n g.drawString(\"A\", 800, 300);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 5 * 0.1f));\n g.drawString(\"M\", 950, 300);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 4 * 0.1f));\n g.drawString(\"E\", 1150, 300);\n\n g.setColor(Color.cyan);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 4 * 0.1f));\n g.drawString(\"N\", 650, 500);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 5 * 0.1f));\n g.drawString(\"A\", 800, 500);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 6 * 0.1f));\n g.drawString(\"M\", 950, 500);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 7 * 0.1f));\n g.drawString(\"E\", 1150, 500);\n */\n }", "protected void paintLabel(Graphics g, int vNum){\r\n\r\n\t// Label Centering Information\r\n\tint xOffSet, yOffSet;\r\n\tif(vNum > 9) {\r\n\t xOffSet = -6;\r\n\t}\r\n\telse {\r\n\t xOffSet = -3;\r\n\t}\r\n\tyOffSet = 5;\r\n\r\n\tint rise = YCENTER - getYCoor(vNum);\r\n int run = XCENTER - getXCoor(vNum);\r\n\tg.drawString(Integer.toString(vNum), getXCoor(vNum)-(run/4) + xOffSet,\r\n\t\t getYCoor(vNum)-(rise/4) + yOffSet);\r\n }", "public void setGameOver(GraphicsContext graphicsContext, int scoreP1, int scoreP2) {\r\n\t\t// Clears table.\r\n\t\tgraphicsContext.clearRect(0, 0, Pong.WIDTH, Pong.HEIGHT);\r\n\t\tgraphicsContext.setFill(Color.DARKSLATEBLUE); \r\n\t\t\r\n\t\t// Sets 'Game Over' & the winner message.\r\n\t\tgraphicsContext.fillRect(0, 0, Pong.WIDTH, Pong.HEIGHT);\r\n\t\tgraphicsContext.setStroke(Color.RED);\r\n\t\tgraphicsContext.setTextAlign(TextAlignment.CENTER);\r\n\t\tgraphicsContext.strokeText(\"Game Over...\", (Pong.WIDTH / 2) , (Pong.HEIGHT / 6));\r\n\t\tgraphicsContext.strokeText(scoreP1 + \"-\" + scoreP2, (Pong.WIDTH / 2) , (Pong.HEIGHT / 4));\r\n\t\t\r\n\t\tif(scoreP1 > scoreP2) { graphicsContext.strokeText(\"Alice WON!!! You are the Pong King!!!\", (Pong.WIDTH / 2) , (Pong.HEIGHT / 2)); }\r\n\t\telse { graphicsContext.strokeText(\"CPU Won.... Shame... Shame... Shame...\", (Pong.WIDTH / 2) , (Pong.HEIGHT / 2)); }\r\n\t}", "private void drawCenteredText(Canvas canvas, PointF loc, Paint paint, String text) {\n float width = paint.measureText(text) / 2;\n canvas.drawText(text, loc.x - width, loc.y, paint);\n }", "private void displayEmptyHover() {\n if (strokeWeight == 0)\r\n noStroke();\r\n else\r\n stroke(0, 0, 0);\r\n strokeWeight(strokeWeight);\r\n hoverFill(boxColour);\r\n rect(x, y, w, h, 7);\r\n }", "public void drawEndScreen() {\n\t\tint highScore = getHighScore();\n\t\tif (highScore <= score) {\n\t\t\thighScore = score;\n\t\t\tsetHighScore(highScore);\n\t\t}\n\t\tdisplayText(\"High Score \" + String.valueOf(highScore), 0, 0, false);\n\t\tdisplayText(\"Score\" + String.valueOf(score), 0, -100, false);\n\t}", "@Override\n protected void onDraw(Canvas canvas) {\n if (offsetValue < 0) {\n offsetValue += (entries.size());\n }\n\n if (entries != null) {\n int centerIndex = Math.round(offsetValue);\n int offset = (int)(textIntervalDistance * (centerIndex - offsetValue + 0.5));\n centerIndex += entries.size();\n int centerPoint = getHeight() / 2 - (textIntervalDistance / 2);\n canvas.drawText(entries.get((centerIndex - 2) % entries.size()), getWidth() / 2.0f, centerPoint - (textIntervalDistance) * 2 + offset, textPaintBackground);\n canvas.drawText(entries.get((centerIndex - 1) % entries.size()), getWidth() / 2.0f, centerPoint - (textIntervalDistance) + offset, textPaintBackground);\n canvas.drawText(entries.get(centerIndex % entries.size()), getWidth() / 2.0f, centerPoint + offset, textPaintPrimary);\n canvas.drawText(entries.get((centerIndex + 1) % entries.size()), getWidth() / 2.0f, centerPoint + (textIntervalDistance) + offset, textPaintBackground);\n canvas.drawText(entries.get((centerIndex + 2) % entries.size()), getWidth() / 2.0f, centerPoint + (textIntervalDistance) * 2 + offset, textPaintBackground);\n }\n\n super.onDraw(canvas);\n }", "private void setPlayerScore(Player player, int newScore) {\n\t\tplayer.score = Math.max(newScore, 0);\n\t\tfor (ScoreMarker scoreMarker : playerScoreMarkers) {\n\t\t\tif (scoreMarker.getOwner() == player) {\n\t\t\t\tscoreMarker.value = String.valueOf(player.score);\n\t\t\t}\n\t\t}\n\t}", "public void updateHighScoreText(int pacScore,int currentHighScore) {\n\t\tif(pacScore>currentHighScore)\n\t\t\thighScore.setText(\"\"+pacScore);\n\t}", "public void display() {\n float dRadial = reactionRadialMax - reactionRadial;\n if(dRadial != 0){\n noStroke();\n reactionRadial += abs(dRadial) * radialEasing;\n fill(255,255,255,150-reactionRadial*(255/reactionRadialMax));\n ellipse(location.x, location.y, reactionRadial, reactionRadial);\n }\n \n // grow text from point of origin\n float dText = textSizeMax - textSize;\n if(dText != 0){\n noStroke();\n textSize += abs(dText) * surfaceEasing;\n textSize(textSize);\n }\n \n // draw agent (point)\n fill(255);\n pushMatrix();\n translate(location.x, location.y);\n float r = 3;\n ellipse(0, 0, r, r);\n popMatrix();\n noFill(); \n \n // draw text \n textSize(txtSize);\n float lifeline = map(leftToLive, 0, lifespan, 25, 255);\n if(mouseOver()){\n stroke(229,28,35);\n fill(229,28,35);\n }\n else {\n stroke(255);\n fill(255);\n }\n \n text(word, location.x, location.y);\n \n // draw connections to neighboars\n gaze();\n }", "public void displayMilitaryValue(Graphics g, int xPos, int yPos){\n\t\tg.drawString(\"Military: \" + military_value, xPos, yPos + 40);\n\t}", "public void draw(PApplet marker) {\n\t\tif (whiteSquares) {\n\t\t\tmarker.pushStyle();\n\t\t\tmarker.fill(255);\n\t\t\tmarker.rect(760, 460, 30, 30);\n\t\t\tif (!over)\n\t\t\t\tmarker.rect(10, 460, 30, 30);\n\t\t\tmarker.popStyle();\n\t\t}\n\t\t\n\t\t//show images\n\t\tmarker.image(helpIcon, help.x, help.y, help.width, help.height);\n\t\tif (!over)\n\t\t\tmarker.image(backIcon, back.x, back.y, back.width, back.height);\n\t}", "public synchronized void draw() {\n // Clear the canvas\n// canvas.setFill(Color.BLACK);\n// canvas.fillRect(0, 0, canvasWidth, canvasHeight);\n canvas.clearRect(0, 0, canvasWidth, canvasHeight);\n\n // Draw a grid\n if (drawGrid) {\n canvas.setStroke(Color.LIGHTGRAY);\n canvas.setLineWidth(1);\n for (int i = 0; i < mapWidth; i++) {\n drawLine(canvas, getPixel(new Point(i - mapWidth / 2, -mapHeight / 2)), getPixel(new Point(i - mapWidth / 2, mapHeight / 2)));\n drawLine(canvas, getPixel(new Point(-mapWidth / 2, i - mapHeight / 2)), getPixel(new Point(mapWidth / 2, i - mapHeight / 2)));\n }\n }\n\n // Draw each player onto the canvas\n int height = 0;\n for (Player p : playerTracking) {\n canvas.setStroke(p.getColor());\n\n drawName(canvas, p.getName(), height, p.getColor());\n height += 30;\n\n canvas.setLineWidth(7);\n\n // Draw each position\n Point last = null;\n int direction = 0;\n for (Point point : p.getPoints()) {\n if (last != null) {\n drawLine(canvas, getPixel(last), getPixel(point));\n\n Point dir = point.substract(last);\n if (dir.X > dir.Y && dir.X > 0) {\n direction = 1;\n } else if (dir.X < dir.Y && dir.X < 0) {\n direction = 3;\n } else if (dir.Y > dir.X && dir.Y > 0) {\n direction = 2;\n } else if (dir.Y < dir.X && dir.Y < 0) {\n direction = 0;\n }\n }\n last = point;\n }\n\n drawSlug(canvas, p.getId() - 1, getPixel(last), direction);\n }\n }", "public void draw() {\r\n // Get a lock on the mCanvas\r\n if (mSurfaceHolder.getSurface().isValid()) {\r\n mCanvas = mSurfaceHolder.lockCanvas();\r\n\r\n // Fill the screen with a color\r\n mCanvas.drawColor(Color.argb(255, 26, 128, 182));\r\n\r\n // Set the size and color of the mPaint for the text\r\n mPaint.setColor(Color.argb(255, 255, 255, 255));\r\n mPaint.setTextSize(120);\r\n\r\n // Draw the score\r\n mCanvas.drawText(\"\" + playState.mScore, 20, 120, mPaint);\r\n\r\n // Draw the goodApple, badApple, and the snake\r\n gameObjects.draw(mCanvas, mPaint);\r\n\r\n // Draw some text while paused\r\n if (playState.mPaused) {\r\n\r\n // Set the size and color of the mPaint for the text\r\n mPaint.setColor(Color.argb(255, 255, 255, 255));\r\n mPaint.setTextSize(250);\r\n\r\n // Draw the message\r\n // We will give this an international upgrade soon\r\n //mCanvas.drawText(\"Tap To Play!\", 200, 700, mPaint);\r\n mCanvas.drawText(getResources().\r\n getString(R.string.tap_to_play),\r\n 200, 700, mPaint);\r\n }\r\n\r\n\r\n // Unlock the mCanvas and reveal the graphics for this frame\r\n mSurfaceHolder.unlockCanvasAndPost(mCanvas);\r\n }\r\n }", "public void giveMarks(String player, int nMarks) throws RuntimeException {\n /*assign marks to this player*/\n if (nMarks <= 0 || nMarks > 12) {\n throw new RuntimeException(\"i can only be > 0 && < 12\");\n }\n for (int j = 0; j < nMarks; j++) {\n if (marks.size() < 12) {\n marks.add(player);\n }\n }\n }", "public void resetScore(){\n Set<String> keys = CalcScore.keySet();\n for(String key: keys){\n CalcScore.replace(key,0.0);\n }\n\n\n\n }", "public void createLabels()\n {\n title = new JLabel(\"Game Over\");\n title.setForeground(Color.RED);\n title.setFont(new Font(title.getFont().getName(), Font.PLAIN, 42));\n title.setAlignmentX(Component.CENTER_ALIGNMENT);\n\n roundLabel = new JLabel(\"CPU was infected on round \"+roundLost);\n roundLabel.setForeground(Color.RED);\n roundLabel.setFont(new Font(title.getFont().getName(), Font.PLAIN, 18));\n roundLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\n }", "public void initScore(){\n score.setFont(Font.loadFont(\"file:resource/Fonts/PressStart2P.ttf\", 20));\n score.setFill(Color.WHITE);\n score.setText(\"Score:\" + String.format(\"%09d\", score_val));\n scoreText.getChildren().add(score);\n HUD.getChildren().add(scoreText);\n }" ]
[ "0.6687043", "0.60159683", "0.59890443", "0.57320476", "0.5500652", "0.54540324", "0.54198456", "0.5365396", "0.5347561", "0.5340514", "0.53333044", "0.53280395", "0.5307834", "0.5305679", "0.52533937", "0.5177789", "0.5167602", "0.51616114", "0.5161049", "0.5160262", "0.515277", "0.51041937", "0.5086255", "0.50683534", "0.50473845", "0.504491", "0.50428534", "0.504094", "0.5037951", "0.5021137", "0.5018288", "0.50087893", "0.50046283", "0.499563", "0.49944836", "0.49878174", "0.49825424", "0.49703225", "0.49637848", "0.49586698", "0.49549907", "0.49436876", "0.49388295", "0.49269766", "0.49248803", "0.49238977", "0.49018142", "0.48875976", "0.48816982", "0.4877333", "0.48678562", "0.48678437", "0.48634768", "0.48615646", "0.4860881", "0.48558357", "0.48330653", "0.4826959", "0.482661", "0.48253515", "0.4825014", "0.4824091", "0.48175633", "0.48145872", "0.4809878", "0.48047668", "0.4798008", "0.47970638", "0.4795298", "0.47858667", "0.47850776", "0.47831038", "0.4773176", "0.47674975", "0.47552717", "0.47517136", "0.47474635", "0.4746106", "0.47433698", "0.47357783", "0.47343075", "0.47315395", "0.47204667", "0.47170442", "0.47093365", "0.4701674", "0.4696711", "0.4687251", "0.4676554", "0.46604946", "0.4660032", "0.46580437", "0.46568125", "0.46543276", "0.46538424", "0.4652931", "0.46524045", "0.46461824", "0.46445215", "0.4641734" ]
0.640513
1
Draws score markers with arbitrary text for each player. Score marker positions are defined in pixels, not physics units.
private void drawTextMarker(Graphics g, String[] messages, int yLine, Player owner) { int xCenter = getGameWidthPixels() / 2; Vector2DLong position0Inverted = new Vector2DLong(xCenter, yLine), position1NonInverted = new Vector2DLong(xCenter, getGameHeightPixels() - yLine); drawScoreMarker(g, new ScoreMarker(messages[0], position0Inverted, owner, true)); drawScoreMarker(g, new ScoreMarker(messages[1], position1NonInverted, owner, false)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void drawScore() {\n\t\tString score = myWorld.getScore() + \"\";\n\n\t\t// Draw shadow first\n\t\tAssetLoader.shadow.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length()), 12);\n\t\t// Draw text\n\t\tAssetLoader.font.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length() - 1), 11);\n\n\t}", "private void drawScoreText(Canvas canvas) {\n paint.setTextSize(bodyTextSize);\n paint.setTextAlign(Paint.Align.CENTER);\n\n int bodyWidthHighScore = (int) (paint.measureText(\"\" + game.highScore));\n int bodyWidthScore = (int) (paint.measureText(\"\" + game.score));\n\n int textWidthHighScore = Math.max(titleWidthHighScore, bodyWidthHighScore) + textPaddingSize * 2;\n int textWidthScore = Math.max(titleWidthScore, bodyWidthScore) + textPaddingSize * 2;\n\n int textMiddleHighScore = textWidthHighScore / 2;\n int textMiddleScore = textWidthScore / 2;\n\n int eXHighScore = endingX;\n int sXHighScore = eXHighScore - textWidthHighScore;\n\n int eXScore = sXHighScore - textPaddingSize;\n int sXScore = eXScore - textWidthScore;\n\n //Outputting high-scores box\n backgroundRectangle.setBounds(sXHighScore, sYAll, eXHighScore, eYAll);\n backgroundRectangle.draw(canvas);\n paint.setTextSize(titleTextSize);\n paint.setColor(getResources().getColor(R.color.text_brown));\n canvas.drawText(getResources().getString(R.string.high_score), sXHighScore + textMiddleHighScore, titleStartYAll, paint);\n paint.setTextSize(bodyTextSize);\n paint.setColor(getResources().getColor(R.color.text_white));\n canvas.drawText(String.valueOf(game.highScore), sXHighScore + textMiddleHighScore, bodyStartYAll, paint);\n\n\n //Outputting scores box\n backgroundRectangle.setBounds(sXScore, sYAll, eXScore, eYAll);\n backgroundRectangle.draw(canvas);\n paint.setTextSize(titleTextSize);\n paint.setColor(getResources().getColor(R.color.text_brown));\n canvas.drawText(getResources().getString(R.string.score), sXScore + textMiddleScore, titleStartYAll, paint);\n paint.setTextSize(bodyTextSize);\n paint.setColor(getResources().getColor(R.color.text_white));\n canvas.drawText(String.valueOf(game.score), sXScore + textMiddleScore, bodyStartYAll, paint);\n }", "ScoreBar(ArrayList<Player> players, int x, int y) {\n // FORMAT: <name> [***] : \n this.players = players;\n this.x = x;\n this.y = y;\n this.f = createFont(\"HelveticaNeue-Thin\", 1, true);\n }", "private void drawTextMarker(Graphics g, String message, int yLine) {\n\t\tint xCenter = getGameWidthPixels() / 2;\n\t\tVector2DLong position0Inverted = new Vector2DLong(xCenter, yLine),\n\t\t\t\tposition1NonInverted = new Vector2DLong(xCenter, getGameHeightPhysics() - yLine);\n\t\tdrawScoreMarker(g, new ScoreMarker(message, position0Inverted, null, true));\n\t\tdrawScoreMarker(g, new ScoreMarker(message, position1NonInverted, null, false));\n\t}", "public void render() {\n stroke(color(50, 50, 50));\n fill(color(50, 50, 50));\n rect(0, 0, getWidth(), getTopHeight());\n int tempX = this.x;\n int fontSize = 150 / (this.players.size() * 2);\n\n this.messages = new ArrayList();\n int count = 0;\n for (Player player : this.players) {\n\n StringBuilder bar = new StringBuilder();\n // max lives = 3\n bar.append(player.name() + \" \");\n for (int i=0; i<3; i++) {\n if (i < player.lives()) {\n bar.append('\\u25AE'); // http://jrgraphix.net/r/Unicode/?range=25A0-25FF\n } else {\n bar.append('\\u25AF');\n }\n }\n\n String message = bar.toString();\n messages.add(message);\n\n textAlign(LEFT);\n textFont(f, fontSize);\n fill(player.getColor());\n text(message, tempX, this.y);\n\n int newX = (int) textWidth(message) + 10;\n tempX += newX;\n count++;\n }\n }", "private void drawStrings(Canvas canvas)\n\t{\n\t\tPaint dark = new Paint();\n\t\tdark.setARGB(255, 15, 74, 0);\n\t\tdark.setTextAlign(Paint.Align.CENTER);\n\t\tfloat cellWidth = (Math.min(getMeasuredHeight(), getMeasuredWidth()) - PADDING);\n\t\tcellWidth = cellWidth/(float)_height;\n\t\tdark.setTextSize(cellWidth / 4 * 3);\n\n\t\tTypeface font = Typeface.createFromAsset(getContext().getAssets(), \n\t\t\t\t\"fonts/Roboto.ttf\");\n\t\tdark.setTypeface(font);\n\t\tfor ( int i = 0; i < _board.getSize(); ++i ) \n\t\t{\n\t\t\tString letter = _board.getElementAt(i);\n\t\t\tint x = i % _height;\n\t\t\tint y = i / _height;\n\t\t\tcanvas.drawText(letter, x * (cellWidth) + cellWidth / 2, y * (cellWidth) + cellWidth / 4 * 3, dark);\n\t\t}\n\t}", "private void draw(){\n\t\t\t Point level = new Point(txtBoard_top_left.x, txtBoard_top_left.y);\n\t\t\t level_info = new TextInfo(g, level, txt_width, size*4, LEVEL, this.level);\n\t\t\t level_info.drawTextInfo();\n\t\t\t \n\t\t\t // draw 2nd text info\n\t\t\t Point lines = new Point(level.x, level.y+size*2);\n\t\t\t lines_info = new TextInfo(g, lines, txt_width, size*4, LINES, this.lines);\n\t\t\t lines_info.drawTextInfo();\n\t\t\t \n\t\t\t // draw 3rd text info\n\t\t\t Point score = new Point(lines.x, lines.y+size*2);\n\t\t\t score_info = new TextInfo(g, score, txt_width, size*4, SCORE, this.score);\n\t\t\t score_info.drawTextInfo();\t\t\n\t\t}", "public synchronized void draw() {\n // Clear the canvas\n// canvas.setFill(Color.BLACK);\n// canvas.fillRect(0, 0, canvasWidth, canvasHeight);\n canvas.clearRect(0, 0, canvasWidth, canvasHeight);\n\n // Draw a grid\n if (drawGrid) {\n canvas.setStroke(Color.LIGHTGRAY);\n canvas.setLineWidth(1);\n for (int i = 0; i < mapWidth; i++) {\n drawLine(canvas, getPixel(new Point(i - mapWidth / 2, -mapHeight / 2)), getPixel(new Point(i - mapWidth / 2, mapHeight / 2)));\n drawLine(canvas, getPixel(new Point(-mapWidth / 2, i - mapHeight / 2)), getPixel(new Point(mapWidth / 2, i - mapHeight / 2)));\n }\n }\n\n // Draw each player onto the canvas\n int height = 0;\n for (Player p : playerTracking) {\n canvas.setStroke(p.getColor());\n\n drawName(canvas, p.getName(), height, p.getColor());\n height += 30;\n\n canvas.setLineWidth(7);\n\n // Draw each position\n Point last = null;\n int direction = 0;\n for (Point point : p.getPoints()) {\n if (last != null) {\n drawLine(canvas, getPixel(last), getPixel(point));\n\n Point dir = point.substract(last);\n if (dir.X > dir.Y && dir.X > 0) {\n direction = 1;\n } else if (dir.X < dir.Y && dir.X < 0) {\n direction = 3;\n } else if (dir.Y > dir.X && dir.Y > 0) {\n direction = 2;\n } else if (dir.Y < dir.X && dir.Y < 0) {\n direction = 0;\n }\n }\n last = point;\n }\n\n drawSlug(canvas, p.getId() - 1, getPixel(last), direction);\n }\n }", "private void drawnPoints(Canvas canvas) {\n int height;\n String itemText;\n Paint temporaryPaint;\n Rect textBound;\n\n // TODO refactor left and right to avoid duplicated code\n if (left.size() > 0) {\n height = HEIGHT / left.size();\n for (int i = 0; i < left.size(); i++) {\n Object item = left.get(i);\n\n Bitmap itemBitmap = adapter.getNotNullBitmap(item);\n itemText = adapter.getLabel(item);\n temporaryPaint = adapter.getLabelPaint(item);\n textBound = new Rect();\n float textMaxWidth = getMaximumWidth(itemText, temporaryPaint);\n temporaryPaint.getTextBounds(itemText, 0, itemText.length() - 1, textBound);\n\n if (item != null) {\n PointF location = getLocation(item);\n\n int positionY = (height / 2) + (height * i);\n\n\n float itemHeight = itemBitmap.getHeight() / (scaleToBackground ? ratio : 1);\n float itemWidth = itemBitmap.getWidth() / (scaleToBackground ? ratio : 1);\n\n labelClickable.put(drawText(canvas, temporaryPaint, 0, positionY, itemText, true), item);\n\n PointF anchor = adapter.getAnchor(item);\n canvas.drawLine(\n textMaxWidth + TEXT_MARGIN,\n positionY - (textBound.height() / 2),\n location.x + (itemWidth * anchor.x) - (itemWidth / 2),\n location.y + (itemHeight * anchor.y) - (itemHeight / 2),\n adapter.getLinePaint(item));\n }\n }\n }\n if (right.size() > 0) {\n height = HEIGHT / right.size();\n for (int i = 0; i < right.size(); i++) {\n Object item = right.get(i);\n\n itemText = adapter.getLabel(item);\n textBound = new Rect();\n\n temporaryPaint = adapter.getLabelPaint(item);\n\n temporaryPaint.getTextBounds(itemText, 0, itemText.length() - 1, textBound);\n\n\n if (item != null) {\n PointF location = getLocation(item);\n\n int positionY = (height / 2) + (height * i);\n\n\n Rect rect = drawText(canvas, temporaryPaint, WIDTH, positionY, itemText, false);\n labelClickable.put(rect, item);\n drawLine(canvas, textBound, item, location, positionY, rect.width());\n }\n }\n }\n }", "private void renderGuiScore(SpriteBatch batch)\n {\n float x = -15;\n float y = -15;\n float offsetX = 50;\n float offsetY = 50;\n \n /*\n if(worldController.scoreVisual < worldController.score)\n {\n long shakeAlpha = System.currentTimeMillis() % 360;\n float shakeDist = 1.5f;\n offsetX += MathUtils.sinDeg(shakeAlpha * 2.2f) * shakeDist;\n offsetY += MathUtils.sinDeg(shakeAlpha * 2.9f) * shakeDist;\n }*/\n \n batch.draw(Assets.instance.candy.candycorn, x, y, 50, 50, 100, 100, 0.35f, -0.35f, 0);\n Assets.instance.fonts.defaultBig.draw(batch, \"\" + worldController.score, x + 75, y + 37);\n }", "private static void draw() {\r\n\t\tclearDoc();\r\n\t\twrite(\"score: \" + score + \"\\n\", null);\r\n\t\twrite(\"+\", null);\r\n\t\tfor (int i = 0; i < COLUMNS; i++) {\r\n\t\t\twrite(\"-\", null);\r\n\t\t}\r\n\t\twrite(\"+\\n\", null);\r\n\t\tfor (int i = 0; i < ROWS; i++) {\r\n\t\t\twrite(\"|\", null);\r\n\t\t\tfor (int j = 0; j < COLUMNS; j++) {\r\n\t\t\t\tif (field[i][j] == SNAKE) {\r\n\t\t\t\t\twrite(\"S\", green);\r\n\t\t\t\t} else if (field[i][j] == APPLE) {\r\n\t\t\t\t\twrite(\"A\", red);\r\n\t\t\t\t} else if (field[i][j] == POISON) {\r\n\t\t\t\t\twrite(\"P\", magenta);\r\n\t\t\t\t} else if (field[i][j] == MOUSE) {\r\n\t\t\t\t\twrite(\"M\", grey);\r\n\t\t\t\t} else {\r\n\t\t\t\t\twrite(\"~\", null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twrite(\"|\\n\", null);\r\n\t\t}\r\n\t\twrite(\"+\", null);\r\n\t\tfor (int i = 0; i < COLUMNS; i++) {\r\n\t\t\twrite(\"-\", null);\r\n\t\t}\r\n\t\twrite(\"+\", null);\r\n\t\tframe.pack();\r\n\t}", "private Label createScoreLabel(){\n Label text;\n Label.LabelStyle textStyle;\n BitmapFont font = new BitmapFont();\n\n textStyle = new Label.LabelStyle();\n textStyle.font = font;\n\n text = new Label(\"Score:\",textStyle);\n text.setAlignment(Align.center);\n text.setFontScale(2f*scale,2f*scale);\n text.setPosition(stage.getViewport().getCamera().viewportWidth * 0.5f,\n stage.getViewport().getCamera().viewportHeight * 0.70f);\n return text;\n }", "public void draw(Canvas canvas) {\n\t\tcanvas.drawText(String.valueOf(score), this.scoreRect.left, this.scoreRect.top + 30, textPaint);\r\n\t}", "private void renderGuiScore (SpriteBatch batch) \n\t{\n\t\t//float x = -15;\n\t\t//float y = -15;\n\t\t//batch.draw(Assets.instance.goldCoin.goldCoin, x, y, 50, 50, 100,\n\t\t//\t\t100, 0.35f, -0.35f, 0);\n\t\t//Assets.instance.fonts.defaultBig.draw(batch, \"\" + worldController.score,\n\t\t//\t\tx + 75, y + 37);\n\t\t\n\t\tfloat x = -15;\n\t\tfloat y = -15;\n\t\tfloat offsetX = 50;\n\t\tfloat offsetY = 50;\n\t\tif (worldController.scoreVisual<worldController.score) \n\t\t{\n\t\t long shakeAlpha = System.currentTimeMillis() % 360;\n\t\t float shakeDist = 1.5f;\n\t\t offsetX += MathUtils.sinDeg(shakeAlpha * 2.2f) * shakeDist;\n\t\t offsetY += MathUtils.sinDeg(shakeAlpha * 2.9f) * shakeDist;\n\t\t}\n\t\tbatch.draw(Assets.instance.goldCoin.goldCoin, x, y, offsetX,\n\t\toffsetY, 100, 100, 0.35f, -0.35f, 0);\n\t\tAssets.instance.fonts.defaultBig.draw(batch, \"\" + (int)worldController.scoreVisual, x + 75, y + 37);\n\t}", "public void showScore(int points) {\n sb.replace(0, sb.length() - 1, \"Score: \" + points);\n score.setText(sb.toString());\n }", "private void showScores() {\n levelNumber.setText(String.format(\"%s%d\", getResources().getString(R.string.level), level));\n Level l = Level.getLevel(level);\n for (int i = 0; i < Level.MAX_SCORES; i++) {\n Level.Player p = l.getPlayer(i);\n if (p != null) new ScoreTextView(i + 1, p.toString());\n }\n }", "private Label createScoreFloatLabel(){\n Label text;\n Label.LabelStyle textStyle;\n BitmapFont font = new BitmapFont();\n\n textStyle = new Label.LabelStyle();\n textStyle.font = font;\n\n text = new Label(\"\"+Math.round(playerInput.gameScore),textStyle);\n text.setFontScale(2f*scale,2f*scale);\n text.setAlignment(Align.center);\n text.setPosition(stage.getViewport().getCamera().viewportWidth * 0.5f,\n stage.getViewport().getCamera().viewportHeight * 0.60f);\n return text;\n }", "public void drawText(Canvas canvas) {\n Paint paint = new Paint();\n paint.setColor(Color.rgb(240, 230, 140)); //gold color\n paint.setTextSize(30);\n paint.setTypeface(Typeface.SANS_SERIF);\n\n canvas.drawText(\"SCORE: \" + player.getScore(), WIDTH - 250, HEIGHT - 10, paint); //display player score\n canvas.drawText(\"LEVEL: \" + level, 100, HEIGHT - 10, paint); //display level\n\n if(!player.getPlaying()){ //if player is dead\n paint.setColor(Color.rgb(102, 0, 0));\n paint.setTextSize(50);\n paint.setTypeface(Typeface.DEFAULT_BOLD);\n canvas.drawText(\"OH DEAR, YOU ARE DEAD!\", WIDTH/2 - 320, HEIGHT/2, paint); //print death message\n gameOver();\n }\n }", "public void screenText(Canvas canvas){\n Paint paint = new Paint();\n paint.setColor(Color.WHITE);\n paint.setTextSize(30);\n paint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));\n canvas.drawText(\"Score: \"+ (newPlayer.getScore()), 10, height-10, paint);\n canvas.drawText(\"Best Score: \"+ getRecord(), width-215, height-10, paint);\n canvas.drawText(\"Level: \" + level, 10, height-550, paint);\n\n //If the game is reset will run a seperate screen text\n if (!newPlayer.getRunning()&&gamenew&&reset){\n Paint newPaint = new Paint();\n newPaint.setTextSize(40);\n newPaint.setColor(Color.WHITE);\n newPaint.setTypeface(Typeface.create(Typeface.DEFAULT,Typeface.BOLD));\n canvas.drawText(\"Click to start!\", width/2-50, height/2, newPaint);\n\n newPaint.setTextSize(20);\n canvas.drawText(\"Press and hold for the ship to hover up\", width/2-50,height/2+20,newPaint);\n canvas.drawText(\"Release to let the ship go down!\", width/2-50,height/2+40,newPaint);\n }\n\n }", "public String getScoreBoardText() {\n putListInPointOrder();\n String scoreText;\n StringBuilder sb = new StringBuilder();\n\n for (Player player : players)\n sb.append(player.toString() + \"\\n\");\n\n scoreText = sb.toString();\n return scoreText;\n }", "private Label getScoreLabel(final int score){\n\t\tfinal BitmapFontData bitmapFontData = new BitmapFontData(Gdx.files.internal(FontConstants.LARGE_FONT_FILE), false);\n\n\t\tArray<TextureRegion> textureRegions = new Array<TextureRegion>(false, 2);\n\t\ttextureRegions.add(new TextureRegion(new Texture(Gdx.files.internal(FontConstants.LARGE_FONT_IMAGE_1), false)));\n\t\ttextureRegions.add(new TextureRegion(new Texture(Gdx.files.internal(FontConstants.LARGE_FONT_IMAGE_2), false)));\n\t\t\n\t\treturn new Label(Integer.toString(score), new Label.LabelStyle( new BitmapFont(bitmapFontData, textureRegions, true), TEXT_COLOR ));\n\t}", "@Override\r\n public void drawOn(DrawSurface surface) {\r\n surface.setColor(Color.LIGHT_GRAY);\r\n String str = \"Score: \" + Integer.toString(getScore());\r\n int x = Constants.SCORE_BLOCK_X_LOCATION;\r\n int y = Constants.SCORE_BLOCK_Y_LOCATION;\r\n int width = Constants.SCORE_BLOCK_WIDTH;\r\n int height = Constants.SCORE_BLOCK_HEIGHT;\r\n surface.fillRectangle(x, y, width, height);\r\n surface.setColor(Color.BLACK);\r\n surface.drawRectangle(x, y, width, height);\r\n surface.setColor(Color.BLACK);\r\n surface.drawText(Constants.SCORE_FONT_X, Constants.SCORE_FONT_Y, str, Constants.SCORE_FONT_SIZE);\r\n }", "public void setScoreText() {\n \tif(numBalls>0 && this.body.size()>0) {\n double x=this.body.get(0).getCenterX()-5;\n \tdouble y=this.body.get(0).getCenterY()+2;\n \t\n \tT.setX(x);\n \tT.setY(y);\n \tT.setText(String.valueOf(numBalls));\n \t}\n \t\n \t\n }", "public void drawEntry(int p_148279_1_, int xPosition, int yPosition, int p_148279_4_, int p_148279_5_,\n\t\t\t\tint p_148279_7_, int p_148279_8_, boolean p_148279_9_) {\n\t\t\txPosition = xPosition - 16;\n\n\t\t\tGuiSnitchList.this.mc.fontRendererObj.drawString(this.xHeader, xPosition + GuiSnitchList.this.coordWidth\n\t\t\t\t\t- mc.fontRendererObj.getStringWidth(this.xHeader) / 2, yPosition + p_148279_5_\n\t\t\t\t\t- GuiSnitchList.this.mc.fontRendererObj.FONT_HEIGHT - 1, 16777215);\n\t\t\tGuiSnitchList.this.mc.fontRendererObj.drawString(this.yHeader, xPosition + GuiSnitchList.this.coordWidth\n\t\t\t\t\t- mc.fontRendererObj.getStringWidth(this.yHeader) / 2 + GuiSnitchList.this.coordWidth, yPosition\n\t\t\t\t\t+ p_148279_5_ - GuiSnitchList.this.mc.fontRendererObj.FONT_HEIGHT - 1, 16777215);\n\t\t\tGuiSnitchList.this.mc.fontRendererObj.drawString(this.zHeader, xPosition + GuiSnitchList.this.coordWidth\n\t\t\t\t\t- mc.fontRendererObj.getStringWidth(this.zHeader) / 2 + GuiSnitchList.this.coordWidth * 2,\n\t\t\t\t\tyPosition + p_148279_5_ - GuiSnitchList.this.mc.fontRendererObj.FONT_HEIGHT - 1, 16777215);\n\t\t\tGuiSnitchList.this.mc.fontRendererObj.drawString(this.groupHeader, xPosition\n\t\t\t\t\t+ GuiSnitchList.this.ctGroupWidth - mc.fontRendererObj.getStringWidth(this.groupHeader) / 2\n\t\t\t\t\t+ GuiSnitchList.this.coordWidth * 3, yPosition + p_148279_5_\n\t\t\t\t\t- GuiSnitchList.this.mc.fontRendererObj.FONT_HEIGHT - 1, 16777215);\n\t\t\tGuiSnitchList.this.mc.fontRendererObj.drawString(this.nameHeader, xPosition + GuiSnitchList.this.nameWidth\n\t\t\t\t\t- mc.fontRendererObj.getStringWidth(this.nameHeader) / 2 + GuiSnitchList.this.coordWidth * 3\n\t\t\t\t\t+ GuiSnitchList.this.ctGroupWidth, yPosition + p_148279_5_\n\t\t\t\t\t- GuiSnitchList.this.mc.fontRendererObj.FONT_HEIGHT - 1, 16777215);\n\t\t}", "public void draw(SpriteBatch batch, String text, float x, float y, GameContainer c, StyledText style);", "private void setupPlayerScoresPanel(){\n\n // adds Player numbers and scores to String variable text\n sortPlayerScores();\n \n paragraph = new JLabel(text);\n paragraph.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 18));\n\n playerScoresPanel.add(paragraph);\n fullPanel.add(playerScoresPanel,BorderLayout.CENTER);\n }", "private void drawLeftColoumnText(SettingsClass s){\r\n Font font=new Font(\"SanSerif\",Font.BOLD,40);\r\n g.setColor(Color.black);\r\n g.setFont(font);\r\n\r\n g.drawString(\"Players\",50,40+50*1);\r\n g.drawString(\"Match Point\",50,40+50*2);\r\n g.drawString(\"Time Limit\",50,40+50*3);\r\n g.drawString(\"Sudden Death\",50,40+50*4);\r\n \r\n // draws player numbers\r\n font=new Font(\"SanSerif\",Font.BOLD,30);\r\n g.setColor(Color.black);\r\n g.setFont(font);\r\n for(int i=0;i<s.getNumPlayers();i++){\r\n String text=\"Player \"+(char)(i+1+'0');\r\n g.drawString(text,50,300+40*i); \r\n }\r\n }", "public void drawSelf() {\n for (Point p : matches) {\n this.drawPoint(p, Color.WHITE);\n }\n }", "public void showScore()\n {\n showText(\"Score:\" + score,550,50);\n }", "public ScoreIndicator(Counter score, int width, int fontSize, int textY) {\n this.score = score;\n this.width = width;\n this.fontSize = fontSize;\n this.textY = textY;\n }", "public void drawPlayerNames(Graphics g) {\n\t}", "public void drawMultiLine(SpriteBatch batch, String text, float x, float y);", "private void drawTimeMarkers(int numberOfNodes) {\n int offset = OFFSET_SINGLE;\n int x = DEFAULT_NAME_SPACE + 2*DEFAULT_HORIZONTAL_SPACE, y = DEFAULT_HEIGHT_GANTT*(numberOfNodes)+DEFAULT_VERTICAL_SPACE;\n for (int i = 0; i <= latest_finish; i+=25) {\n String s = Integer.toString(i);\n if (i == 25) offset = OFFSET_DOUBLE;\n else if (i == 100) offset = OFFSET_TRIPLE;\n else if (i == 1000) offset = OFFSET_QUADRUPLE;\n \n if (i%50 == 0) {\n drawLine(x+i*PxS, y, x+i*PxS, y+MARKER_SPACE_50, Color.black);\n drawString(s, x+i*PxS-offset, y + MARKER_SPACE_50 + DEFAULT_VERTICAL_SPACE, Color.black);\n } else {\n drawLine(x+i*PxS, y, x+i*PxS, y+MARKER_SPACE_25, Color.black);\n drawString(s, x+i*PxS-offset, y + MARKER_SPACE_50 + DEFAULT_VERTICAL_SPACE, Color.black);\n }\n }\n }", "private static String playersToDrawOnSquare(SquareLM squareLM) throws NullPointerException{\n if(squareLM == null){\n throw new NullPointerException(\"The parameter should not be null\");\n }\n String stringToReturn = \"\";\n for(int idPlayer : squareLM.getPlayers()){\n //'P' if the player is up, 'p' if the player is down\n String markerPlayer;\n if(InfoOnView.getPlayers()[idPlayer].getDown()){\n markerPlayer = \"p\";\n }\n else{\n markerPlayer = \"P\";\n }\n //eg: the player with id 0 is the player 1\n stringToReturn += markerPlayer + (idPlayer + 1);\n }\n //all the rest of the line is blank (' ')\n return lineInsideSquareWithBlankAtTheEnd(stringToReturn);\n }", "public void renderMap(GameMap gameMap, Player player)\n\t{\n\t\tthis.drawMapGlyphs(gameMap, player);\n\t\t// this.getGlyphs(gameMap, player);\n\t\t// for(Text text : this.getGlyphs(gameMap))\n\t\t// window.getRenderWindow().draw(text);\n\t}", "private void paintNumbers() {\n\n g2d.setColor(_BOARDCOLOR);\n g2d.drawString(\"0\", 100, 150);\n g2d.drawString(\"1\", 200, 150);\n g2d.drawString(\"2\", 300, 150);\n g2d.drawString(\"3\", 400, 150);\n g2d.drawString(\"4\", 100, 250);\n g2d.drawString(\"5\", 200, 250);\n g2d.drawString(\"6\", 300, 250);\n g2d.drawString(\"7\", 400, 250);\n g2d.drawString(\"8\", 100, 350);\n g2d.drawString(\"9\", 200, 350);\n g2d.drawString(\"10\", 300, 350);\n g2d.drawString(\"11\", 400, 350);\n g2d.drawString(\"12\", 100, 450);\n g2d.drawString(\"13\", 200, 450);\n g2d.drawString(\"14\", 300, 450);\n g2d.drawString(\"15\", 400, 450);\n }", "@Override\n public void drawOn(DrawSurface d) {\n String scoreString = \"Level Name: \" + this.levelName;\n d.setColor(Color.BLACK);\n d.drawText((GameLevel.BOARD_WIDTH / 2) + DISTANCE_FROM_THE_CENTER_X,\n HEIGHT_OF_TEXT, scoreString, FONT_SIZE);\n }", "void displayScores(int pts)\n\t{\n\t\tString[][] scs = new String[10][2];\n\t\ttry\n\t\t{\n\t\t\tScanner str = new Scanner(new File(\"./scores.log\"));\n\t\t\tfor (int i = 0; i < 10; i++)\n\t\t\t{\n\t\t\t\tscs[i] = str.nextLine().split(\"\\t\");\n\t\t\t}\n\t\t\tstr.close();\n\t\t}\n\t\tcatch (FileNotFoundException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tString scores = \"\";\n\t\tfor (int i = 0; i < 10; i++)\n\t\t\tscores += scs[i][0] + \"\\t\" + scs[i][1] + \"\\n\";\n\t\t\n\t\tint place = 10; // > 9; remains if the new score below the scoreboard\n\t\t\n\t\t// if new highscore\n\t\tif (pts > Integer.parseInt(scs[9][1]))\n\t\t{\n\t\t\t// determine the place\n\t\t\tplace = 9;\n\t\t\twhile (pts > Integer.parseInt(scs[place-1][1])) // place is too low\n\t\t\t{\n\t\t\t\tplace--; // move the \"pointer\" to higher place\n\t\t\t\tif (place == 0) break; // 1st place!\n\t\t\t}\n\t\t\t\n\t\t\t// insert where it should be\n\t\t\tfor (int i = 8; i >= place; i--)\n\t\t\t{\n\t\t\t\tscs[i+1][0] = new String(scs[i][0]); // drop place to lower\n\t\t\t\tscs[i+1][1] = new String(scs[i][1]);\n\t\t\t}\n\t\t\tscs[place][0] = parent.getUsername();\n\t\t\tscs[place][1] = \"\" + pts;\n\t\t}\n\t\t\n\t\t// prepare text for writing to file\n\t\tString textToWrite = \"\";\n\t\tfor (int i = 0; i < 10; i++) // for every place\n\t\t\ttextToWrite += scs[i][0] + \"\\t\" + scs[i][1] + \"\\n\";\n\t\t\n\t\t// write to scores.log\n\t\ttry\n\t\t{\n\t\t\tFileWriter str = new FileWriter(new File(\"./scores.log\"), false);\n\t\t\tstr.write(textToWrite);\n\t\t\tstr.close();\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// prepare text for displaying in the scoreboard\n\t\tString textDisplayed = \"<html><style>p{font-size:40px; font-family:\\\"Lucida Console\\\"}</style>\";\n\t\tfor (int i = 0; i < 10; i++) // for every place\n\t\t{\n\t\t\tif (i == place) textDisplayed += \"<font color=\\\"red\\\">\";\n\t\t\ttextDisplayed += \"<p>\" + scs[i][0] + \" \";\n\t\t\t// add dots to fill places up to 30\n\t\t\tfor (int j = 30; j > scs[i][0].length(); j--)\n\t\t\t\ttextDisplayed += \".\";\n\t\t\ttextDisplayed += \" \" + scs[i][1] + \"</p>\";\n\t\t\tif (i == place) textDisplayed += \"</font>\";\n\t\t}\n\t\t\n\t\tscoreboard.setText(textDisplayed);\n\t}", "public void scores(HashMap<String, Integer> scoreboard) {\r\n\t\tclear_screen();\r\n\t\t// Le tableau de scores arrive déjà trié.\r\n\t\tJLabel sc = new JLabel(\"Partie Terminé. Tableau des scores : \");\r\n\t\tsc.setBounds(0, 0, 1280, 40);\r\n\t\tsc.setFont(new Font(sc.getFont().getName(), Font.BOLD, 30));\r\n\t\tthis.add(sc);\r\n\r\n\t\tint begin = 60;\r\n\r\n\t\tfor (Map.Entry<String, Integer> elt : scoreboard.entrySet()) {\r\n\t\t\tJLabel u_score = new JLabel(elt.getKey()+\" : \"+elt.getValue()+\" points\", SwingConstants.CENTER);\r\n\t\t\tu_score.setFont(new Font(sc.getFont().getName(), Font.PLAIN, 20));\r\n\t\t\tu_score.setBounds(0, begin, 1280, 30);\r\n\t\t\tthis.add(u_score);\r\n\t\t\tbegin+=40;\r\n\t\t}\r\n\r\n\t\tclose = new JButton(\"Fermer\");\r\n\t\tclose.setBounds(5, 640,150,40);\r\n\t\tthis.add(close);\r\n\t\tclose.addActionListener(this);\r\n\t}", "private void refreshScore(){\n String info = players[0] + \" \"+playerScores[0]+\":\" +playerScores[1]+ \" \"+players[1];\n scoreInfo.setText(info);\n }", "private void drawScalesAndLabels(Canvas canvas) {\n Paint.FontMetrics fontMetrics = mTextPaint.getFontMetrics();\n float mTextWidth;\n float mTextHeight = fontMetrics.bottom;\n\n canvas.drawLine(paddingLeft, scaleLinePosition,\n paddingLeft + contentWidth, scaleLinePosition, scaleLinePaint);\n\n float scaleMarginWidth = contentWidth * 1.0f / 24;\n float x = 0;\n for (int i = 0; i <= 24; i++) {\n x = paddingLeft + scaleMarginWidth * i;\n\n if ((i % 2) == 1) {\n //draw scale line\n canvas.drawLine(x, scaleLinePosition, x, scaleLinePosition + mTimeScaleHeight, scaleLinePaint);\n //draw time label\n mTextWidth = mTextPaint.measureText(hourLabels[i]);\n canvas.drawText(hourLabels[i], x - mTextWidth / 2, paddingTop + contentHeight - mTextHeight, mTextPaint);\n } else {\n //draw scale line\n canvas.drawLine(x, scaleLinePosition, x, scaleLinePosition + mTimeScaleHeight * 2, scaleLinePaint);\n }\n }\n }", "@Override\n public void paintComponent(Graphics g) {\n loadScore();\n stage = Board.getStage();\n super.paintComponent(g);\n Font font = loadFont();\n ArrayList<Image> tankList = new ArrayList<>(\n Arrays.asList(imageInstance.getTankBasic(),\n imageInstance.getTankFast(),\n imageInstance.getTankPower(),\n imageInstance.getTankArmor()));\n\n // Display High totalScore\n g.setFont(font);\n g.setColor(Color.WHITE);\n g.drawString(\"STAGE \" + String.valueOf(stage), 230 + SHIFT, 200);\n\n g.setColor(Color.RED);\n g.drawString(\"1-PLAYER\", 235 + SHIFT, 240);\n\n g.setColor(Color.orange);\n g.drawString(\"Total points\", 180 + SHIFT, 270);\n\n g.setColor(Color.orange);\n g.drawString(String.valueOf(totalScore), 385 + SHIFT, 272);\n\n for (int i = 0; i < 4; i++) {\n g.drawImage(tankList.get(i), 380 + SHIFT, 290 + (i * 45), this);\n g.drawImage(imageInstance.getArrow(), 350 + SHIFT, 300 + (i * 45),\n this);\n }\n for (int i = 0; i < 4; i++) {\n g.setColor(Color.WHITE);\n g.drawString(String.valueOf(tankScoreList[i]), 185 + SHIFT,\n 312 + (i * 45));\n g.drawString(\"PTS\", 250 + SHIFT, 312 + (i * 45));\n }\n\n for (int i = 0; i < 4; i++) {\n g.setColor(Color.WHITE);\n g.drawString(String.valueOf(tankNumList[i]), 320 + SHIFT,\n 312 + (i * 45));\n }\n\n // total underline\n g.drawLine(270, 480, 500, 480);\n\n g.drawString(\"TOTAL killed\", 200 + SHIFT, 500);\n g.drawString(String.valueOf(totalTankNum), 400 + SHIFT, 500);\n g.setFont(font);\n g.setColor(Color.WHITE);\n }", "public void displayForTeamK(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_k_score);\n scoreView.setText(String.valueOf(score));\n }", "public ScoreLabel(final ScoreSheet the_sheet, final Font the_font)\n {\n super();\n my_scores = the_sheet;\n my_font = the_font;\n setOpaque(false);\n setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));\n \n my_score_label = new JLabel(\"Score: 0\");\n my_level_label = new JLabel(\"Level: 1\");\n my_lines_label = new JLabel(\"Lines Cleared: 0\");\n addLabels();\n }", "private void initializeMarkersAndCirclesForPlayers(List<Player> players) {\r\n Log.i(TAG, \"made it to initialized markers\");\r\n for(Player player: players) {\r\n Marker marker = mMap.addMarker(new MarkerOptions()\r\n .position(player.getLastLocation())\r\n .title(player.getUsername()));\r\n Circle circle = mMap.addCircle(new CircleOptions()\r\n .center(player.getLastLocation())\r\n .radius(tagDistance)\r\n .fillColor(Color.TRANSPARENT)\r\n .strokeWidth(3));\r\n\r\n // change color of marker depending on if player is it or not\r\n if (player.isIt()) {\r\n marker.setIcon(zombiepin);\r\n circle.setStrokeColor(itColor);\r\n } else {\r\n marker.setIcon(playerpin);\r\n circle.setStrokeColor(notItColor);\r\n }\r\n\r\n player.setCircle(circle);\r\n player.setMarker(marker);\r\n\r\n }\r\n // Add a marker in center of game camera and move the camera\r\n mMap.moveCamera(CameraUpdateFactory.zoomTo(16));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLng(startingPoint));\r\n Circle gameBounds = mMap.addCircle(new CircleOptions()\r\n .center(startingPoint)\r\n .radius(currentSession.radius())\r\n .strokeColor(Color.BLUE)\r\n .fillColor(Color.TRANSPARENT)\r\n .strokeWidth(5));\r\n }", "@Override\n protected void onDraw(Canvas canvas) {\n if (offsetValue < 0) {\n offsetValue += (entries.size());\n }\n\n if (entries != null) {\n int centerIndex = Math.round(offsetValue);\n int offset = (int)(textIntervalDistance * (centerIndex - offsetValue + 0.5));\n centerIndex += entries.size();\n int centerPoint = getHeight() / 2 - (textIntervalDistance / 2);\n canvas.drawText(entries.get((centerIndex - 2) % entries.size()), getWidth() / 2.0f, centerPoint - (textIntervalDistance) * 2 + offset, textPaintBackground);\n canvas.drawText(entries.get((centerIndex - 1) % entries.size()), getWidth() / 2.0f, centerPoint - (textIntervalDistance) + offset, textPaintBackground);\n canvas.drawText(entries.get(centerIndex % entries.size()), getWidth() / 2.0f, centerPoint + offset, textPaintPrimary);\n canvas.drawText(entries.get((centerIndex + 1) % entries.size()), getWidth() / 2.0f, centerPoint + (textIntervalDistance) + offset, textPaintBackground);\n canvas.drawText(entries.get((centerIndex + 2) % entries.size()), getWidth() / 2.0f, centerPoint + (textIntervalDistance) * 2 + offset, textPaintBackground);\n }\n\n super.onDraw(canvas);\n }", "public static void displayHighScorePosition(String playersName, int position){\n System.out.println(playersName + \" managed to get into position \" + position + \" on the high score table\");\n }", "public void drawMultiLine(SpriteBatch batch, String text, float x, float y, float alignWidth, HAlignment alignment);", "@Override\n\tpublic void render(GameContainer gc, Graphics g) {\n\t\tfloat x = getX(), y = getY(), width = getWidth(), height = getHeight();\n\t\tg.setColor(new Color(0.5f, 0.5f, 0.5f, 0.8f));\n\t\tg.fillRoundRect(x, y, width, height, 5);\n\t\t\n\t\tg.setColor(Color.black);\n\t\tg.drawString(\"Map needs to be drawn below\", x + (width - g.getFont().getWidth(\"Map needs to be drawn below\")) * 0.5f , y + 20);\n\t\tg.drawString(\"Orange - current cell\", x + 20, y + 50);\n\t\tg.drawString(\"Green - explored cell\", x + 20, y + 70);\n\t\tg.drawString(\"White - unexplored cell\", x + 20, y + 90);\n\t\tg.drawString(\"Line - connection\", x + 20, y + 110);\n\t\tg.drawString(\"Dot - contains item\", x + 20, y + 130);\n\t\t\n\t\tg.setColor(Color.orange);\n\t\tg.fillRoundRect(x + width/2 - 3, y + height/2 - 3, 46, 46, 5);\n\t\t\n\t\tg.setColor(Color.green);\n\t\tg.fillRoundRect(x + width/2 - 3 + 50, y + height/2 - 3, 46, 46, 5);\n\t\tg.fillRoundRect(x + width/2 - 3 + 100, y + height/2 - 3, 46, 46, 5);\n\t\t\n\t\tg.setColor(Color.white);\n\t\tg.fillRoundRect(x + width/2 - 3 + 100, y + height/2 - 3 + 50, 46, 46, 5);\n\t\t\n\t\tg.setColor(Color.darkGray);\n\t\tg.fillRoundRect(x + width/2, y + height/2, 40, 40, 5);\n\t\tg.fillRoundRect(x + width/2 + 50, y + height/2, 40, 40, 5);\n\t\tg.fillRoundRect(x + width/2 + 100, y + height/2, 40, 40, 5);\n\t\tg.fillRoundRect(x + width/2 + 100, y + height/2 + 50, 40, 40, 5);\n\t\t\n\t\tg.drawLine(x + width/2 + 40, y + height/2 + 20, x + width/2 + 50, y + height/2 + 20);\n\t\tg.drawLine(x + width/2 + 40 + 50, y + height/2 + 20, x + width/2 + 50 + 50, y + height/2 + 20);\n\t\tg.drawLine(x + width/2 + 120, y + height/2 + 40, x + width/2 +\t120, y + height/2 + 50);\n\t\t\n\n g.setColor(Color.cyan);\n g.fillOval(x + width/2 - 3 + 120, y + height/2 + 17, 6, 6);\n\t\t\n\t}", "@Override\n public void paintComponent(Graphics g) {\n // always clear the screen first!\n g.clearRect(0, 0, WIDTH, HEIGHT);\n\n // GAME DRAWING GOES HERE\n \n \n // draw the blocks\n g.setColor(Color.black);\n for(int i = 0; i < blocks.length; i++){\n g.fillRect(blocks[i].x, blocks[i].y, blocks[i].width, blocks[i].height);\n }\n \n // middle ref (no longer needed)\n //g.setColor(Color.black);\n //g.drawRect(WIDTH/2 - 1, 0, 1, HEIGHT);\n \n // scores\n g.setFont(biggerFont);\n g.setColor(Color.blue);\n g.drawString(\"\" + tobyScore, WIDTH/2-100, 75);\n if(tobyWin){\n g.drawString(\"Toby Wins!\", WIDTH/2-115, 120);\n }\n g.setColor(Color.red);\n if(maxWin){\n g.drawString(\"Max Wins!\", WIDTH/2-115, 120);\n }\n g.drawString(\"\" + maxScore, WIDTH/2+100, 75);\n g.setColor(Color.white);\n g.setFont(titleFont);\n g.drawString(\"Toby N' Max: Capture the Flag!\", 25, 20);\n \n // draw the player\n g.setColor(Color.red);\n g.fillRect(max.x, max.y, max.width, max.height);\n g.setColor(Color.blue);\n g.fillRect(toby.x, toby.y, toby.width, toby.height);\n \n // draw the flag\n g.setColor(brown);\n for(int i = 0; i < flagPole.length; i++){\n g.fillRect(flagPole[i].x, flagPole[i].y, flagPole[i].width, flagPole[i].height);\n }\n \n g.setColor(purple);\n for(int i = 0; i < flag.length; i++){\n g.fillRect(flag[i].x, flag[i].y, flag[i].width, flag[i].height);\n }\n \n g.setColor(Color.white);\n for(int i = 0; i < flagLogo.length; i++){\n g.fillRect(flagLogo[i].x, flagLogo[i].y, flagLogo[i].width, flagLogo[i].height);\n }\n \n //g.setColor(Color.gray);\n // for(int i = 0; i < bombs.length; i++){\n // g.fillRect(bombs[i].x, bombs[i].y, bombs[i].width, bombs[i].height); \n //}\n \n \n // GAME DRAWING ENDS HERE\n }", "private void showScore() {\r\n View.show(score, this.getSize().width + 15, 0);\r\n }", "private void renserGameStats(SpriteBatch batch)\n {\n String points = \"Points: \";\n String crumbs = \"Crumbs: \";\n\n float x = 3;\n float y = 3;\n \n font.draw(batch, points + (int)stats.getPoints(), x, y);\n x = camera.viewportWidth - 120;\n font.draw(batch, crumbs + (int)stats.getCrumbs(), x, y);\n }", "public final void drawHoveringText(Minecraft mc, List<String> textLines, int x, int y)\n\t{\n\t\tif (!textLines.isEmpty())\n\t\t{\n\t\t\tGlStateManager.disableRescaleNormal();\n\t\t\tGlStateManager.disableDepth();\n\t\t\tint i = 0;\n\n\t\t\tfor (String s : textLines)\n\t\t\t{\n\t\t\t\tint j = mc.fontRendererObj.getStringWidth(s);\n\n\t\t\t\tif (j > i)\n\t\t\t\t{\n\t\t\t\t\ti = j;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint l1 = x + 12;\n\t\t\tint i2 = y - 12;\n\t\t\tint k = 8;\n\n\t\t\tif (textLines.size() > 1)\n\t\t\t{\n\t\t\t\tk += 2 + (textLines.size() - 1) * 10;\n\t\t\t}\n\n\t\t\tif (l1 + i > guiScreenParent.width)\n\t\t\t{\n\t\t\t\tl1 -= 28 + i;\n\t\t\t}\n\n\t\t\tif (i2 + k + 6 > guiScreenParent.height)\n\t\t\t{\n\t\t\t\ti2 = guiScreenParent.height - k - 6;\n\t\t\t}\n\n\t\t\tthis.zLevel = 300.0F;\n\t\t\tint l = -267386864;\n\t\t\tthis.drawGradientRect(l1 - 3, i2 - 4, l1 + i + 3, i2 - 3, -267386864, -267386864);\n\t\t\tthis.drawGradientRect(l1 - 3, i2 + k + 3, l1 + i + 3, i2 + k + 4, -267386864, -267386864);\n\t\t\tthis.drawGradientRect(l1 - 3, i2 - 3, l1 + i + 3, i2 + k + 3, -267386864, -267386864);\n\t\t\tthis.drawGradientRect(l1 - 4, i2 - 3, l1 - 3, i2 + k + 3, -267386864, -267386864);\n\t\t\tthis.drawGradientRect(l1 + i + 3, i2 - 3, l1 + i + 4, i2 + k + 3, -267386864, -267386864);\n\t\t\tint i1 = 1347420415;\n\t\t\tint j1 = 1344798847;\n\t\t\tthis.drawGradientRect(l1 - 3, i2 - 3 + 1, l1 - 3 + 1, i2 + k + 3 - 1, 1347420415, 1344798847);\n\t\t\tthis.drawGradientRect(l1 + i + 2, i2 - 3 + 1, l1 + i + 3, i2 + k + 3 - 1, 1347420415, 1344798847);\n\t\t\tthis.drawGradientRect(l1 - 3, i2 - 3, l1 + i + 3, i2 - 3 + 1, 1347420415, 1347420415);\n\t\t\tthis.drawGradientRect(l1 - 3, i2 + k + 2, l1 + i + 3, i2 + k + 3, 1344798847, 1344798847);\n\n\t\t\tfor (int k1 = 0; k1 < textLines.size(); ++k1)\n\t\t\t{\n\t\t\t\tString s1 = textLines.get(k1);\n\t\t\t\tmc.fontRendererObj.drawStringWithShadow(s1, (float)l1, (float)i2, -1);\n\n\t\t\t\tif (k1 == 0)\n\t\t\t\t{\n\t\t\t\t\ti2 += 2;\n\t\t\t\t}\n\n\t\t\t\ti2 += 10;\n\t\t\t}\n\n\t\t\tthis.zLevel = 0.0F;\n\t\t\tGlStateManager.enableDepth();\n\t\t\tGlStateManager.enableRescaleNormal();\n\t\t}\n\t}", "public void empSlotText(SpriteBatch batch){\n batch.setProjectionMatrix(textCam.combined);\n String text = \"\"+manager.getEmployees()+\"/\"+manager.getEmployeeSlots();\n batch.begin();\n font2.draw(batch,text, 730, 370);\n batch.end();\n }", "public void initScore(){\n score.setFont(Font.loadFont(\"file:resource/Fonts/PressStart2P.ttf\", 20));\n score.setFill(Color.WHITE);\n score.setText(\"Score:\" + String.format(\"%09d\", score_val));\n scoreText.getChildren().add(score);\n HUD.getChildren().add(scoreText);\n }", "public void paint(MapCanvas canvas, Point insertPoint) {\n Graphics2D graphics = null;\n if ((this.text != null) && (insertPoint != null) && (canvas != null) && \n ((graphics = canvas.graphics) != null)) {\n Font curFont = graphics.getFont();\n Color curColor = graphics.getColor();\n AffineTransform curTransForm = graphics.getTransform();\n try {\n TextStyle style = this.getTextStyle();\n FontMetrics fontMetrics = this.textFont.setCanvas(canvas);\n int textHeight = fontMetrics.getHeight();\n int x = insertPoint.x;\n int y = insertPoint.y;\n int textWidth = fontMetrics.stringWidth(this.text);\n// if ((style.orientation == TextStyle.Orientation.VerticalDn) || \n// (style.orientation == TextStyle.Orientation.VerticalUp)) {\n// if (style.hAlign == TextStyle.Horizontal.Center) {\n// y -= textWidth/2;\n// } else if (style.hAlign == TextStyle.Horizontal.Right) {\n// y -= textWidth;\n// }\n//\n// if (style.vAlign == TextStyle.Vertical.Middle) {\n// x += textHeight/2;\n// } else if (style.vAlign == TextStyle.Vertical.Top) {\n// x += textHeight;\n// }\n// } else {\n if (style.hAlign == TextStyle.Horizontal.Center) {\n x -= textWidth/2;\n } else if (style.hAlign == TextStyle.Horizontal.Right) {\n x -= textWidth;\n }\n\n if (style.vAlign == TextStyle.Vertical.Middle) {\n y += textHeight/2;\n } else if (style.vAlign == TextStyle.Vertical.Top) {\n y += textHeight;\n }\n //} \n float rotate = style.orientation.rotate;\n if (rotate != 0.0f) {\n AffineTransform transform = new AffineTransform();\n transform.translate(0.0d, 0.0d);\n transform.rotate(rotate, insertPoint.x, insertPoint.y);\n graphics.transform(transform);\n }\n \n graphics.drawString(this.text, x, y - fontMetrics.getDescent());\n } catch (Exception exp) {\n LOGGER.log(Level.WARNING, \"{0}.paint Error:\\n {1}\",\n new Object[]{this.getClass().getSimpleName(), exp.getMessage()});\n } finally {\n if (curFont != null) {\n graphics.setFont(curFont);\n }\n if (curColor != null) {\n graphics.setColor(curColor);\n }\n if (curTransForm != null) {\n graphics.setTransform(curTransForm);\n }\n }\n }\n }", "@Override\n public void paint(Graphics g) {\n if (flagged) {\n Font f = new Font(\"Times\", Font.PLAIN, 30);\n g.setFont(f);\n FontMetrics fm = g.getFontMetrics();\n int a = fm.getAscent();\n int h = fm.getHeight();\n int fl = fm.stringWidth(\"F\");\n g.setColor(new Color(170, 171, 167));\n g.fillRect(0, 0, size, size);\n g.setColor(Color.BLACK);\n g.drawRect(0, 0, size, size);\n g.setColor(Color.WHITE);\n g.drawString(\"F\", size / 2 - fl / 2, size / 2 + a - h / 2);\n } else if (clicked) {\n //make the mines spots solid red squares\n if (mine) {\n g.setColor(Color.RED);\n g.fillRect(0, 0, size, size);\n g.setColor(Color.BLACK);\n g.drawRect(0, 0, size, size);\n } else {\n //if the spot has mines around it print the number in a specific color\n if (!numMines.equals(\"0\")) {\n Font f = new Font(\"Times\", Font.PLAIN, 30);\n g.setFont(f);\n FontMetrics fm = g.getFontMetrics();\n int a = fm.getAscent();\n int h = fm.getHeight();\n g.setColor(Color.WHITE);\n g.fillRect(0, 0, size, size);\n g.setColor(Color.BLACK);\n g.drawRect(0, 0, size, size);\n int w = fm.stringWidth(numMines);\n switch (numMines) {\n case \"1\":\n g.setColor(Color.BLACK);\n break;\n case \"2\":\n g.setColor(Color.BLUE);\n break;\n case \"3\":\n g.setColor(Color.RED);\n break;\n case \"4\":\n g.setColor(Color.GREEN);\n break;\n case \"5\":\n g.setColor(Color.ORANGE);\n break;\n case \"6\":\n g.setColor(Color.YELLOW);\n break;\n case \"7\":\n g.setColor(Color.CYAN);\n break;\n case \"8\":\n g.setColor(Color.PINK);\n break;\n default:\n break;\n }\n g.drawString(numMines, size / 2 - w / 2, size / 2 + a - h / 2);\n //if the spot has no mines around it leave it blank\n } else {\n g.setColor(Color.WHITE);\n g.fillRect(0, 0, size, size);\n g.setColor(Color.BLACK);\n g.drawRect(0, 0, size, size);\n }\n }\n //if the spot was not clicked or flagged print the normal color\n } else {\n g.setColor(new Color(170, 171, 167));\n g.fillRect(1, 1, size - 2, size - 2);\n g.setColor(Color.BLACK);\n g.drawRect(0, 0, size, size);\n }\n }", "public void drawHighscores(){\n JFrame highScoreFrame = new JFrame();\n highScoreFrame.setLayout(new BorderLayout());\n highScoreFrame.setSize(new Dimension(280,400));\n String top = \"<h1><u>Highscores</u></h1>\";\n String numbers = getNumbers();\n String scoreString = getTop();\n JLabel enumeration = new JLabel(\"<html>\" + numbers + \"<html>\");\n JLabel scores = new JLabel(\"<html>\" + scoreString + \"<html>\");\n JLabel title = new JLabel(\"<html>\" + top + \"<html>\");\n title.setHorizontalAlignment(SwingConstants.CENTER);\n enumeration.setBorder(BorderFactory.createEmptyBorder(0,85,0,30));\n highScoreFrame.add(title, BorderLayout.PAGE_START);\n highScoreFrame.add(enumeration, BorderLayout.LINE_START);\n highScoreFrame.add(scores, BorderLayout.CENTER);\n highScoreFrame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\n highScoreFrame.setLocationRelativeTo(null);\n highScoreFrame.setVisible(true);\n\n for (int i = 1 ; i <= 10 ; i++){\n System.out.println(i);\n }\n }", "private void drawTxt(Canvas canvas, Rect gridRange){\n\n int length = points.size();\n int gridNumber = 5;\n int step = (gridRange.right - gridRange.left) / gridNumber;\n\n //draw digits\n float max = getMaxX();\n float min = getMinX();\n\n if(length == 1)\n min = 0;\n\n float dis = (max - min) / gridNumber;\n\n tetxPaint.setTextSize(textSize);\n\n\n //draw x digits\n for(int i = 0; i < gridNumber + 1; i++){\n\n String txt = Float.toString(round(min, 1));\n\n Rect bounds = getTxtBounds(tetxPaint, txt);\n canvas.drawText(txt, (gridRange.left + i*step) - (bounds.width()/2), gridRange.bottom + bounds.height(), tetxPaint);\n min += dis;\n }\n\n step = (gridRange.bottom - gridRange.top) / gridNumber;\n\n max = maxVal;\n min = minVal;\n\n if(length == 1)\n min = 0;\n\n dis = (max - min) / gridNumber;\n\n //draw y digits\n for(int i = 0; i < gridNumber + 1; i++){\n\n String txt = Float.toString(round(min, 1));\n\n Rect bounds = getTxtBounds(tetxPaint, txt);\n canvas.drawText(txt, gridRange.left - bounds.width(), gridRange.bottom - step*i, tetxPaint);\n min += dis;\n }\n }", "public void score(){\r\n\t\tint playerLocation = player.getLocationX();\r\n\t\tint obstacleX = obstacle.getLocationX();\r\n\t\tint obstacleY = obstacle.getLocationY();\r\n\r\n\r\n\t\tstr =\"\" + countCoins;\r\n\r\n\t\t//if you hit a coin, the number of points goes up by one.\r\n\t\tif(obstacleY == 280 && obstacleX==300 && playerLocation == 250){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\t\tif(obstacleY== 450 && obstacleX==300 && playerLocation ==450){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\r\n\t\t//if you hit the green monster, you lose one point.\r\n\t\tif((obstacleX-50) == 250 && (obstacleY-240) == 250 && playerLocation ==250){\r\n\t\t\tcountCoins--;\r\n\t\t}\r\n\r\n\t\t//if you hit the blue monster, you lose 3 points.\r\n\t\tif((obstacleX+180) == 480 && (obstacleY+180) == 250 && playerLocation ==450){\r\n\t\t\tcountCoins-=3;\r\n\t\t}\r\n\t}", "private void drawPlayer(Graphics g, Image playerImage){\n \n g.setColor(Color.WHITE);\n g.setFont(new Font(\"Arial\", Font.PLAIN, 20)); \n g.drawString(\"\"+player.getScore(),25,23);\n \n for(int i= 0; i<player.getLives(); i++){\n g.drawImage(lifeImage,600-i*30,5,this);\n }\n \n g.drawImage(playerImage, player.getX(), player.getY(), this); \n \n //Limit the players movement within the bound. Add score when moving\n \n if (key_down && player.getY()<620) {\n player.addY();\n player.addScore();\n }\n \n if (key_up && player.getY()>40) {\n player.subY();\n player.addScore();\n } \n \n if (key_right && player.getX()<650) {\n player.addX();\n player.addScore();\n }\n \n if (key_left && player.getX()>10) {\n player.subX();\n player.addScore();\n }\n \n moveCount++;\n repaint();\n \n }", "@Override\n public void paint(Graphics g) {\n g.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 200));\n\n g.setColor(Color.cyan);\n String GameName = \"BALLAND BAR\";\n int x_pos = 150;\n int y_pos = 300;\n int alpha = 8;\n for (int i = 0; i < GameName.length(); i++) {\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha * 0.1f));\n g.drawString(Character.toString(GameName.charAt(i)), x_pos, y_pos);\n x_pos += 150;\n // alpha -= 1;\n }\n\n g.setColor(Color.orange);\n GameName = \"GAME\";\n x_pos = 700;\n y_pos = 550;\n for (int i = 0; i < GameName.length(); i++) {\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha * 0.1f));\n g.drawString(Character.toString(GameName.charAt(i)), x_pos, y_pos);\n x_pos += 150;\n // alpha -= 1;\n }\n /*\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 7 * 0.1f));\n g.drawString(\"G\", 650, 300);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 6 * 0.1f));\n g.drawString(\"A\", 800, 300);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 5 * 0.1f));\n g.drawString(\"M\", 950, 300);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 4 * 0.1f));\n g.drawString(\"E\", 1150, 300);\n\n g.setColor(Color.cyan);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 4 * 0.1f));\n g.drawString(\"N\", 650, 500);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 5 * 0.1f));\n g.drawString(\"A\", 800, 500);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 6 * 0.1f));\n g.drawString(\"M\", 950, 500);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 7 * 0.1f));\n g.drawString(\"E\", 1150, 500);\n */\n }", "@Override\n\tpublic void render(Canvas canvas) {\n\t\tPaint paint = new Paint();\n\t\tpaint.setColor(Color.parseColor(\"#D95B43\"));\n\t\tpaint.setTextSize(50 * Globals.scaleY);\n\t\tint width = (int)paint.measureText(this.toString(), 0, this.toString().length());\n\t\t\n\t\tthis.x = (int) ((gamePanel.width - width) / 2.0f);\n\t\t\n\t\tcanvas.drawText(this.toString(), x, y, paint);\n\t}", "public void drawMultiLine(SpriteBatch batch, String text, float x, float y, GameContainer c, StyledText style);", "private void drawObjects(Graphics g) {\n\n g.setColor(Color.white);\n g.fillRect(0,0,WIDTH,HEIGHT);\n\n Player player = physics.getPlayer();\n\n\n\n ArrayList<Sprite> sprites = physics.getSprites();\n for( Sprite p: sprites){\n if (p.isVisible()) {\n g.drawImage(p.getImage(), p.getX() - scroll, p.getY(),\n this);\n }\n }\n\n if (player.isVisible()) {\n g.drawImage(player.getImage(), player.getX() - scroll, player.getY(),\n this);\n }\n Font font = new Font(\"Helvetica\", Font.BOLD, 30);\n FontMetrics fm = getFontMetrics(font);\n\n g.setColor(Color.black);\n g.setFont(font);\n g.drawString(Integer.toString(physics.playerScore),5, 25);\n }", "public void update_map(Player player) \n\t{\n\t\tfor (int i = 0; i < this.map.length; i++) \n\t\t{\n\t\t\tfor (int j = 0; j < this.map[i].length;j++) \n\t\t\t{\n\t\t\t\tswitch (map[i][j]) \n\t\t\t\t{\n\t\t\t\tcase GRASS:\n\t\t\t\t\tthis.gc.drawImage(GRASS_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase PATH:\n\t\t\t\t\tthis.gc.drawImage(PATH_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase CROSS_ROADS:\n\t\t\t\t\tthis.gc.drawImage(PATH_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase TA:\n\t\t\t\t\tthis.gc.drawImage(TA_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase RESEARCHER:\n\t\t\t\t\tthis.gc.drawImage(RESEARCHER_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase FIRST_YEAR:\n\t\t\t\t\tthis.gc.drawImage(FIRST_YEAR_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SECOND_YEAR:\n\t\t\t\t\tthis.gc.drawImage(SECOND_YEAR_IMAGE, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SCORE_AREA:\n\t\t\t\t\tthis.gc.drawImage(GRASS_IMAGE, j*64, i*64);\n\t\t\t\t\tFont titleFont = Font.font(\"arial\", FontWeight.EXTRA_BOLD, 25);\n\t\t\t this.gc.setFont(titleFont);\n\t\t\t\t\tString text = \"GPA: \" + player.getGPA();\n\t\t\t\t\tthis.gc.fillText(text, j*64, i*64);\n\t\t\t\t\tthis.gc.strokeText(text, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\tcase TUITION_AREA:\n\t\t\t\t\tthis.gc.drawImage(GRASS_IMAGE, j*64, i*64);\n\t\t\t\t\tFont title = Font.font(\"arial\", FontWeight.EXTRA_BOLD, 25);\n\t\t\t this.gc.setFont(title);\n\t\t\t\t\tString Tuition = \"Tuition: \" + (player.getTuition());\n\t\t\t\t\tthis.gc.fillText(Tuition, j*64, i*64);\n\t\t\t\t\tthis.gc.strokeText(Tuition, j*64, i*64);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void drawStrings(Graphics g, int wid, int hei) {\n Font f = new Font(\"Font.PLAIN\", Font.BOLD, hei / 20);\n g.setFont(f);\n g.setColor(Color.white);\n g.drawString(\"LEVEL\", wid / 2 - 3 * wid / 20 - 2, hei / 10 - 2);\n g.drawString(\"TIME\", wid / 2 - 3 * wid / 20 + 5, hei / 10 * 3 - 2);\n g.drawString(\"CHIPS\", wid / 2 - 3 * wid / 20 - 2, hei / 2 - 2);\n g.drawString(\"LEFT\", wid / 2 - 3 * wid / 20 + hei / 63 - 2, hei / 2 + hei / 20 + 3);\n g.setColor(Color.black);\n g.drawString(\"LEVEL\", wid / 2 - 3 * wid / 20 + 2, hei / 10 + 2);\n g.drawString(\"TIME\", wid / 2 - 3 * wid / 20 + 9, hei / 10 * 3 + 2);\n g.drawString(\"CHIPS\", wid / 2 - 3 * wid / 20 + 2, hei / 2 + 2);\n g.drawString(\"LEFT\", wid / 2 - 3 * wid / 20 + hei / 63 + 2, hei / 2 + hei / 20 + 7);\n g.setColor(Color.red);\n g.drawString(\"LEVEL\", wid / 2 - 3 * wid / 20, hei / 10);\n g.drawString(\"TIME\", wid / 2 - 3 * wid / 20 + 7, hei / 10 * 3);\n g.drawString(\"CHIPS\", wid / 2 - 3 * wid / 20, hei / 2);\n g.drawString(\"LEFT\", wid / 2 - 3 * wid / 20 + hei / 63, hei / 2 + hei / 20 + 5);\n }", "public void displayPositionUI(){\n\t\tfor (Player p: gameLogic.getArrayOfPlayers().getArrayOfPlayers()) {\n\n\t\t\tif (p.getPlayerId() == 0) {\n\t\t\t\tif (!(positionList.isEmpty())) {\n\t\t\t\t\tfor (JLabel item : positionList) {\n\t\t\t\t\t\testimationGame.getContentPane().remove(item);\n\t\t\t\t\t}\n\t\t\t\t\tpositionList.clear();\n\t\t\t\t}\n\n\t\t\t\tJLabel lblPosition = new JLabel(\"Position: \" + (p.getPosition()+1));\n\n\t\t\t\tspringLayout.putConstraint(SpringLayout.WEST, lblPosition, 295, SpringLayout.WEST,\n\t\t\t\t\t\testimationGame.getContentPane());\n\t\t\t\tlblPosition.setForeground(Color.WHITE);\n\t\t\t\tspringLayout.putConstraint(SpringLayout.NORTH, lblPosition, 555, SpringLayout.NORTH,\n\t\t\t\t\t\testimationGame.getContentPane());\n\t\t\t\tlblPosition.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\n\t\t\t\tpositionList.add(lblPosition);\n\t\t\t\testimationGame.getContentPane().add(lblPosition);\n\t\t\t}\n\n\t\t\tif (p.getPlayerId() == 1) {\n\t\t\t\tif (!(positionList1.isEmpty())) {\n\t\t\t\t\tfor (JLabel item : positionList1) {\n\t\t\t\t\t\testimationGame.getContentPane().remove(item);\n\t\t\t\t\t}\n\t\t\t\t\tpositionList1.clear();\n\t\t\t\t}\n\n\t\t\t\tJLabel lblPosition1 = new JLabel(\"Position: \" + (p.getPosition()+1));\n\n\t\t\t\tspringLayout.putConstraint(SpringLayout.WEST, lblPosition1, 190, SpringLayout.WEST,\n\t\t\t\t\t\testimationGame.getContentPane());\n\t\t\t\tlblPosition1.setForeground(Color.WHITE);\n\t\t\t\tspringLayout.putConstraint(SpringLayout.NORTH, lblPosition1, 440, SpringLayout.NORTH,\n\t\t\t\t\t\testimationGame.getContentPane());\n\t\t\t\tlblPosition1.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\n\t\t\t\tpositionList1.add(lblPosition1);\n\t\t\t\testimationGame.getContentPane().add(lblPosition1);\n\t\t\t}\n\n\t\t\tif (p.getPlayerId() == 2) {\n\t\t\t\tif (!(positionList2.isEmpty())) {\n\t\t\t\t\tfor (JLabel item : positionList2) {\n\t\t\t\t\t\testimationGame.getContentPane().remove(item);\n\t\t\t\t\t}\n\t\t\t\t\tpositionList2.clear();\n\t\t\t\t}\n\n\t\t\t\tJLabel lblPosition2 = new JLabel(\"Position: \" + (p.getPosition()+1));\n\n\t\t\t\tspringLayout.putConstraint(SpringLayout.WEST, lblPosition2, 275, SpringLayout.WEST,\n\t\t\t\t\t\testimationGame.getContentPane());\n\t\t\t\tlblPosition2.setForeground(Color.WHITE);\n\t\t\t\tspringLayout.putConstraint(SpringLayout.NORTH, lblPosition2, 150, SpringLayout.NORTH,\n\t\t\t\t\t\testimationGame.getContentPane());\n\t\t\t\tlblPosition2.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\n\t\t\t\tpositionList2.add(lblPosition2);\n\t\t\t\testimationGame.getContentPane().add(lblPosition2);\n\t\t\t}\n\n\t\t\tif (p.getPlayerId() == 3) {\n\t\t\t\tif (!(positionList3.isEmpty())) {\n\t\t\t\t\tfor (JLabel item : positionList3) {\n\t\t\t\t\t\testimationGame.getContentPane().remove(item);\n\t\t\t\t\t}\n\t\t\t\t\tpositionList3.clear();\n\t\t\t\t}\n\n\t\t\t\tJLabel lblPosition3 = new JLabel(\"Position: \" + (p.getPosition()+1));\n\n\t\t\t\tspringLayout.putConstraint(SpringLayout.WEST, lblPosition3, 620, SpringLayout.WEST,\n\t\t\t\t\t\testimationGame.getContentPane());\n\t\t\t\tlblPosition3.setForeground(Color.WHITE);\n\t\t\t\tspringLayout.putConstraint(SpringLayout.NORTH, lblPosition3, 440, SpringLayout.NORTH,\n\t\t\t\t\t\testimationGame.getContentPane());\n\t\t\t\tlblPosition3.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\n\n\t\t\t\tpositionList3.add(lblPosition3);\n\t\t\t\testimationGame.getContentPane().add(lblPosition3);\n\t\t\t}\n\t\t}\n\n\t\testimationGame.validate();\n\t\testimationGame.repaint();\n\t}", "@Override\r\n\tpublic void render(GameContainer gc, Renderer r) {\n\t\tr.drawTextInBox(posX, posY, width, height, color1, text);\r\n\t\t//r.noiseGen();\r\n\t}", "public void changeLableText(int playerScore,int computerScore);", "private void setScoreText(){\n if(color != BLACK && color != WHITE){\n scoreLabel.setText(\"Score: Black - \" + calScore(BLACK) + \" White - \" + calScore(WHITE));\n }else {\n scoreLabel.setText(\"Score: \" + calScore(this.color));\n }\n }", "@Override\n\tpublic void onDraw(Canvas canvas) {\n\t\t//black canvas \n\t\tcanvas.drawRGB(15, 74, 0);\n\n\t\tif( _game.getStatus() != Game.Status.RUNNING) \n\t\t\treturn;\n\t\t\n\t\t//this draws the grid on which the player has to match words\n\t\tshowGrid(canvas);\n\t\t//highlight the final word\n\t\thighlight(canvas);\n\t\t//draw letters in board\n\t\tdrawStrings(canvas);\n\t\t//this shows how much time the player has left\n\t\tshowTimer(canvas);\n\t\t//this shows the number of dictionary words the player has found until\n\t\t//current time\n\t\tshowWordCount(canvas);\n\t\t//draw the score also\n\t\tshowScore(canvas);\n\t\t\n\t}", "@Override\r\n\tpublic void onCustomDraw(Graphics2D g) {\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(x, y, width, height);\r\n\t\tg.setColor(Color.green);\r\n\t\tfor(int i = 0; i < 50; i++){\r\n\t\t\tif(text[i] != null){\r\n\t\t\t\tg.drawString(text[i], 11, (i*10)+20);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void addScoreText(Pane root) throws FileNotFoundException {\n\t\tscore=new Text(level.columnX(2),level.rowX(-1)+10,\"\"+0);\n\t\tscore.setFill(Color.WHITE);\n\t\tscore.setFont(Font.loadFont(\"file:recources\\\\Font\\\\PressStart2P-Regular.ttf\", 20));\n\t\tif(Level.getHieght()==720)\n\t\t\tscore.setFont(Font.loadFont(\"file:recources\\\\Font\\\\PressStart2P-Regular.ttf\", 10));\n\t\troot.getChildren().add(score);\n\t}", "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}", "private void sketchScore() {\r\n View.sketch(score, this.getSize().width + 15, 0);\r\n }", "void drawDeath() {\n background(255, 255, 255);\n fill(0);\n textSize(75);\n textAlign(CENTER);\n text(\"You Died!\", 1024, 100);\n text(\"Kills= \"+ playerScore, 1024,200);\n text(\"Restart Program to try again.\", 1024, 300);\n\n}", "public void draw() {\r\n // Get a lock on the mCanvas\r\n if (mSurfaceHolder.getSurface().isValid()) {\r\n mCanvas = mSurfaceHolder.lockCanvas();\r\n\r\n // Fill the screen with a color\r\n mCanvas.drawColor(Color.argb(255, 26, 128, 182));\r\n\r\n // Set the size and color of the mPaint for the text\r\n mPaint.setColor(Color.argb(255, 255, 255, 255));\r\n mPaint.setTextSize(120);\r\n\r\n // Draw the score\r\n mCanvas.drawText(\"\" + playState.mScore, 20, 120, mPaint);\r\n\r\n // Draw the goodApple, badApple, and the snake\r\n gameObjects.draw(mCanvas, mPaint);\r\n\r\n // Draw some text while paused\r\n if (playState.mPaused) {\r\n\r\n // Set the size and color of the mPaint for the text\r\n mPaint.setColor(Color.argb(255, 255, 255, 255));\r\n mPaint.setTextSize(250);\r\n\r\n // Draw the message\r\n // We will give this an international upgrade soon\r\n //mCanvas.drawText(\"Tap To Play!\", 200, 700, mPaint);\r\n mCanvas.drawText(getResources().\r\n getString(R.string.tap_to_play),\r\n 200, 700, mPaint);\r\n }\r\n\r\n\r\n // Unlock the mCanvas and reveal the graphics for this frame\r\n mSurfaceHolder.unlockCanvasAndPost(mCanvas);\r\n }\r\n }", "@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\tsuper.onDraw(canvas);\n\t\tint w = getMeasuredWidth();\n\t\tint h = getMeasuredHeight();\n\t\tint h1 = h/letter.length;\n\t\tLog.e(\"huang\", \"w:\"+w+\" h:\"+h);\n\t\t\n\t\tPaint paint = new Paint();\n\t\tpaint.setTextSize(12);\n\t\tpaint.setStyle(Style.FILL);\t\t\n\t\tpaint.setTextAlign(Align.CENTER);\n\t\tpaint.setColor(color);\n\t\tfor(int t=0; t<27; ++t){\n\t\t\tif(t==0){\n\t\t\t\tcanvas.drawBitmap(bm, w/2-20, h1*t+h1/2-10, paint);\n\t\t\t} else {\n\t\t\t\tString temp = String.valueOf(letter[t]);\n\t\t\t\tcanvas.drawText(temp, w/2-8, h1/2+h1*t, paint);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void printScore()\n {\n if (score.isEmpty())\n System.out.println(\"\\nThe score is currently empty\");\n else\n {\n for (int i = 0; i < score.size(); i++)\n {\n System.out.format(\"%n%s%d%s %c %d\", \"Note \", i + 1, \":\", score.get(i).getNote(), score.get(i).getBeat());\n }\n System.out.println();\n }\n removeNote();\n }", "private void draw() {\n if (surfaceHolder.getSurface().isValid()) {\n //lock the canvas\n canvas = surfaceHolder.lockCanvas();\n //set background colour\n canvas.drawColor(Color.BLACK);\n //draw stars\n paint.setColor(Color.WHITE);\n starManager.draw(this.canvas, this.paint);\n //draw player\n player.draw(this.canvas, this.paint);\n //draw enemies\n enemyManager.draw(this.canvas, this.paint);\n //draw asteroids\n asteroidManager.draw(this.canvas, this.paint);\n\n //draw the score as well\n paint.setTextSize(100);\n paint.setColor(Color.WHITE);\n canvas.drawText(\"\" + Constants.SCORE, 50, paint.descent() - paint.ascent(), paint);\n\n //if game is over\n if (Constants.GAME_OVER) {\n paint.setTextSize(100);\n paint.setTextAlign(Paint.Align.CENTER);\n paint.setColor(Color.WHITE);\n\n //tell the player\n int yPos = (int) ((canvas.getHeight() / 2) - ((paint.descent() + paint.ascent()) / 2));\n canvas.drawText(\"Game over\", canvas.getWidth() / 2, yPos, paint);\n\n paint.setTextSize(50);\n yPos = (int) ((canvas.getHeight() - 2 * paint.descent()) - ((paint.descent() + paint.ascent()) / 2));\n canvas.drawText(\"Tap anywhere to return to main menu...\", canvas.getWidth() / 2, yPos, paint);\n }\n //unlock canvas\n surfaceHolder.unlockCanvasAndPost(canvas);\n }\n }", "public void drawOn(DrawSurface d) {\r\n String hitCounteString;\r\n d.setColor(Color.black);\r\n hitCounteString = Integer.toString(this.score.getValue());\r\n d.drawText(400, 18, \"score: \" + hitCounteString, 15);\r\n\r\n }", "private void drawControlsText(Graphics2D g2, int player, int horizontalDisplacement)\n\t{\n\t\tFont fontyFont = new Font(\"IMPACT\", Font.BOLD, MEDIUM_FONT);\n\t\tg2.setColor(Color.WHITE);\n\t\tg2.setFont(fontyFont);\n\t\tif (players.get(player).playingGame)\n\t\t{\n\t\t\tint sizeOfDeck = players.get(player).size();\n\t\t\tif (sizeOfDeck != 1)\n\t\t\t\tg2.drawString(players.get(player).size() + \" Cards\",\n\t\t\t\t\t\tframeWidth / 2 - CARD_WIDTH / CARD_DIVISION_DIVISOR + horizontalDisplacement +\n\t\t\t\t\t\t\t\tDISTANCE_FROM_CORNER, frameHeight - CARD_HEIGHT / 2 + DISTANCE_FROM_CORNER);\n\t\t\telse\n\t\t\t\tg2.drawString(players.get(player).size() + \" ers.slapjack.Card\",\n\t\t\t\t\t\tframeWidth / 2 - CARD_WIDTH / CARD_DIVISION_DIVISOR + horizontalDisplacement +\n\t\t\t\t\t\t\t\tDISTANCE_FROM_CORNER, frameHeight - CARD_HEIGHT / 2 + DISTANCE_FROM_CORNER);\n\t\t\tg2.setColor(Color.BLACK);\n\t\t\tfontyFont = new Font(\"IMPACT\", Font.ITALIC, SMALL_FONT);\n\t\t\tg2.setFont(fontyFont);\n\t\t\t//Draw correct controls for each player\n\t\t\tg2.drawString(players.get(player).getPlayButton() + \" - Play\",\n\t\t\t\t\tframeWidth / 2 - CARD_WIDTH / CARD_DIVISION_DIVISOR + horizontalDisplacement +\n\t\t\t\t\t\t\tDISTANCE_FROM_CORNER, frameHeight - DISTANCE_PLAY_FROM_BOTTOM);\n\t\t\tg2.drawString(players.get(player).getSlapButton() + \" - Slap\",\n\t\t\t\t\tframeWidth / 2 - CARD_WIDTH / CARD_DIVISION_DIVISOR + horizontalDisplacement +\n\t\t\t\t\t\t\tDISTANCE_FROM_CORNER, (int) (frameHeight - DISTANCE_SLAP_FROM_BOTTOM));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tg2.drawString(\"OUT\",\n\t\t\t\t\tframeWidth / 2 - CARD_WIDTH / CARD_DIVISION_DIVISOR + horizontalDisplacement +\n\t\t\t\t\t\t\tDISTANCE_FROM_CORNER, frameHeight - CARD_HEIGHT / 2 + DISTANCE_FROM_CORNER);\n\t\t}\n\t}", "private void showGameScore() {\n System.out.println(messageProvider.provideMessage(\"score\"));\n System.out.println(settings.getPlayers().get(0).getScore()\n + \" vs \" + settings.getPlayers().get(1).getScore());\n }", "@Override\n protected void childDraw(Canvas canvas, float factor) {\n LogUtil.e(TAG, \"childDraw\");\n for (int i = 0; i < tspans.size(); i++) {\n Tspan tspan = tspans.get(i);\n paint.setColor(tspan.getFill());\n paint.setTextSize(tspan.getFont_size() * factor);\n paint.setTypeface(tspan.getFont_family());\n canvas.drawText(tspan.text, x, tspan.y * factor,\n paint);\n x += paint.measureText(tspan.getText());\n paint.reset();\n }\n x=0;\n\n }", "private void drawPlayers(Graphics g){\n\t\tg.setColor(Color.BLACK);\n\t\tfor(int i=0; i<grid.length; i++){\n\t\t\tfor(int j=0; j<grid[0].length; j++){\n\t\t\t\tfor(GameMatter itm: grid[i][j].getItems()){\n\t\t\t\t\tif(itm instanceof Bandit){\n\t\t\t\t\t\tif(itm.equals(player))\n\t\t\t\t\t\t\tg.setColor(Color.MAGENTA);\n\t\t\t\t\t\tg.fillRect(j*widthBlock+padding, i*heightBlock+padding, bandit, bandit);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void draw(Canvas canvas) {\n\t\tsuper.draw(canvas);\n\t\tPaint paint2 = new Paint();\n\t\tpaint2.setColor(Color.WHITE);\n\t\tpaint2.setTextSize(50);\n\t\tcanvas.drawText(\"Score:\" + manager.getScore(), 0, 2000, paint2);//Show score at left bottom.\n\t\tsetOnTouchListener(this);\n\t\tmanager.draw(canvas, this);\n\t\tif (manager.isFailed()) {\n\t\t\tPaint paint = new Paint();\n\t\t\tpaint.setColor(Color.WHITE);\n\t\t\tpaint.setTextSize(30);\n\t\t\tcanvas.drawText(\"lose, press anywhere to restart\", 350, 1000, paint);\n\t\t\tcanvas.drawText(\"Score:\" + manager.getScore(), 350, 1100, paint);\n\t\t}\n\t\tsaveGame();\n\t}", "private void printScore() {\r\n View.print(score);\r\n }", "@Override\r\n public void draw(Canvas canvas) {\r\n if (text == null) {\r\n throw new IllegalStateException(\"Attempting to draw a null text.\");\r\n }\r\n\r\n // Draws the bounding box around the TextBlock.\r\n RectF rect = new RectF(text.getBoundingBox());\r\n rect.left = translateX(rect.left);\r\n rect.top = translateY(rect.top);\r\n rect.right = translateX(rect.right);\r\n rect.bottom = translateY(rect.bottom);\r\n canvas.drawRect(rect, rectPaint);\r\n\r\n // Log.d(\"area\", \"text: \" + text.getText() + \"\\nArea: \" + Area);\r\n /**Here we are defining a Map which takes a string(Text) and a Integer X_Axis.The text will act as key to the X_Axis.\r\n Once We Got the X_Axis we will pass its value to a SparseIntArray which will Assign X Axis To Y Axis\r\n .Then We might Create another Map which will Store Both The text and the coordinates*/\r\n int X_Axis = (int) rect.left;\r\n int Y_Axis = (int) rect.bottom;\r\n\r\n // Renders the text at the bottom of the box.\r\n Log.d(\"PositionXY\", \"x: \"+X_Axis +\" |Y: \"+ Y_Axis);\r\n canvas.drawText(text.getText(), rect.left, rect.bottom, textPaint); // rect.left and rect.bottom are the coordinates of the text they can be used for mapping puposes\r\n\r\n\r\n }", "private void renderCardStat(Graphics2D g,String str,int yOffset) {\n\t\twhile((currentCardBounds.x + currentCardBounds.width/2 - this.makeRectangleWidth(g.getFont(), str)/2) + (this.makeRectangleWidth(g.getFont(), str)) > (this.displayCardBounds.x + this.displayCardBounds.width)) {\r\n\t\t\tg.setFont(new Font(g.getFont().getFamily(),g.getFont().getStyle(),g.getFont().getSize()-1));\r\n\t\t}\r\n\t\tg.drawString(str, currentCardBounds.x + currentCardBounds.width/2 - this.makeRectangleWidth(g.getFont(), str)/2, currentCardBounds.y + currentCardBounds.height + this.makeRectangleHeight(g.getFont(), str) + (yOffset));\r\n\t\t//g.setFont(originalFont);\r\n\t}", "void buildLayout(){\n\t\tsetText(\"Score: \" + GameModel.instance().getPoints());\n\t\tsetX(10);\n\t\tsetY(10);\n\t\tsetFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 20));\n\t\t\n\t}", "public void strokeString(float x, float y, String text);", "private void setBoardData(Map<Player, Integer> scores) {\n Map<Player, Integer> sortedMap = MapUtil.sortByValueReverse(scores);\n\n for (Player player : Bukkit.getOnlinePlayers()) {\n int line = 1;\n for (Map.Entry<Player, Integer> entry : sortedMap.entrySet()) {\n if (line > scores.size() || line > 15) return;\n\n Player scoreboardEntry = entry.getKey();\n String score = Integer.toString(entry.getValue());\n\n titleManagerAPI.setScoreboardValue(player, line, score + \" \" + ChatColor.GREEN + scoreboardEntry.getDisplayName());\n\n line++;\n }\n }\n }", "private void renderPlayers() {\n\t\tfor (Player player : this.game.players()) {\n\t\t\t/* So, logically convluted crap ahead.\n\t\t\t * Player position is tracked via a 1-based coordinate system.\n\t\t\t * Our output array is 0-based.\n\t\t\t * Our output array contains an additional row/column on each side for the wall.\n\t\t\t *\n\t\t\t * Hence, when mapping the player's position to an\n\t\t\t * index in the output array, we have to subtract one\n\t\t\t * to switch from 1-basedness to 0-basedness, then add\n\t\t\t * 1 to accomodate for the wall column/row. Which\n\t\t\t * leaves us with a difference of 0. */\n\t\t\tthis.output[player.position().y][player.position().x] = player.sign();\n\t\t}\n\t}", "protected void drawHoveringText( List<String> descriptionLines, int posX, int posY, FontRenderer fontrenderer )\n\t{\n\t\tif( !descriptionLines.isEmpty() )\n\t\t{\n\t\t\tGL11.glDisable( GL_RESCALE_NORMAL );\n\n\t\t\tGL11.glDisable( GL11.GL_LIGHTING );\n\n\t\t\tGL11.glDisable( GL11.GL_DEPTH_TEST );\n\n\t\t\tint maxStringLength = 0;\n\n\t\t\tfor( String string : descriptionLines )\n\t\t\t{\n\n\t\t\t\tint stringLen = fontrenderer.getStringWidth( string );\n\n\t\t\t\tif( stringLen > maxStringLength )\n\t\t\t\t{\n\t\t\t\t\tmaxStringLength = stringLen;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint offsetX = posX + 12;\n\n\t\t\tint offsetY = posY - 12;\n\n\t\t\tint tooltipHeight = 8;\n\n\t\t\tif( descriptionLines.size() > 1 )\n\t\t\t{\n\t\t\t\ttooltipHeight += 2 + ( ( descriptionLines.size() - 1 ) * 10 );\n\t\t\t}\n\n\t\t\tthis.zLevel = 300.0F;\n\n\t\t\tint drawColor = 0xF0100010;\n\t\t\tthis.drawGradientRect( offsetX - 3, offsetY - 4, offsetX + maxStringLength + 3, offsetY - 3, drawColor, drawColor );\n\t\t\tthis.drawGradientRect( offsetX - 3, offsetY + tooltipHeight + 3, offsetX + maxStringLength + 3, offsetY + tooltipHeight + 4, drawColor,\n\t\t\t\tdrawColor );\n\t\t\tthis.drawGradientRect( offsetX - 3, offsetY - 3, offsetX + maxStringLength + 3, offsetY + tooltipHeight + 3, drawColor, drawColor );\n\t\t\tthis.drawGradientRect( offsetX - 4, offsetY - 3, offsetX - 3, offsetY + tooltipHeight + 3, drawColor, drawColor );\n\t\t\tthis.drawGradientRect( offsetX + maxStringLength + 3, offsetY - 3, offsetX + maxStringLength + 4, offsetY + tooltipHeight + 3, drawColor,\n\t\t\t\tdrawColor );\n\n\t\t\tdrawColor = 0x505000FF;\n\t\t\tint fadeColor = ( ( drawColor & 0xFEFEFE ) >> 1 ) | ( drawColor & 0xFF000000 );\n\t\t\tthis.drawGradientRect( offsetX - 3, ( offsetY - 3 ) + 1, ( offsetX - 3 ) + 1, ( offsetY + tooltipHeight + 3 ) - 1, drawColor, fadeColor );\n\t\t\tthis.drawGradientRect( offsetX + maxStringLength + 2, ( offsetY - 3 ) + 1, offsetX + maxStringLength + 3,\n\t\t\t\t( offsetY + tooltipHeight + 3 ) - 1, drawColor, fadeColor );\n\t\t\tthis.drawGradientRect( offsetX - 3, offsetY - 3, offsetX + maxStringLength + 3, ( offsetY - 3 ) + 1, drawColor, drawColor );\n\t\t\tthis.drawGradientRect( offsetX - 3, offsetY + tooltipHeight + 2, offsetX + maxStringLength + 3, offsetY + tooltipHeight + 3, fadeColor,\n\t\t\t\tfadeColor );\n\n\t\t\tfor( int descriptionIndex = 0; descriptionIndex < descriptionLines.size(); descriptionIndex++ )\n\t\t\t{\n\t\t\t\tString s1 = descriptionLines.get( descriptionIndex );\n\t\t\t\tfontrenderer.drawStringWithShadow( s1, offsetX, offsetY, -1 );\n\t\t\t\tif( descriptionIndex == 0 )\n\t\t\t\t{\n\t\t\t\t\toffsetY += 2;\n\t\t\t\t}\n\t\t\t\toffsetY += 10;\n\t\t\t}\n\t\t\tthis.zLevel = 0.0F;\n\n\t\t\tGL11.glEnable( GL11.GL_LIGHTING );\n\n\t\t\tGL11.glEnable( GL11.GL_DEPTH_TEST );\n\n\t\t\tGL11.glEnable( GL_RESCALE_NORMAL );\n\t\t}\n\t}", "public void drawmap(String[][] colours){\r\n\t\tint startingX = interval;\r\n\t\tint startingY = interval;\r\n\t\t\t//number of rows\r\n\t\t\tfor(int y =0;y < colours[0].length;y++){\r\n\t\t\t\t//number of columns \r\n\t\t\t\tfor(int x =0;x < colours.length;x++){\r\n\t\t\t\tif(colours[x][y].equals(food)){\r\n\t\t\t\t\t// if colour of the pixel is yellow, convert it into food and put into the 2D array\r\n\t\t\t\t\tfoodArray[x][y] = new JLabel(\" * \");\r\n\t\t\t\t\tfoodArray[x][y].setBounds(startingX,startingY, interval,interval);\r\n\t\t\t\t\tfoodArray[x][y].setForeground(Color.yellow);\r\n\t\t\t\t\tstartingX += interval;\r\n\t\t\t\t\tpanel.add(foodArray[x][y]);\r\n\t\t\t\t\tfoodCounter ++;\r\n\t\t\t\t}\r\n\t\t\t\telse if(colours[x][y].equals(wall)){\r\n\t\t\t\t\t// if colour of the pixel is blue, convert it into wall and put into the 2D array\r\n\t\t\t\t\tfoodArray[x][y] = new JLabel(new ImageIcon(\"src/misc/wall.png\"));\r\n\t\t\t\t\tfoodArray[x][y].setBounds(startingX,startingY, 15,15);\r\n\t\t\t\t\tfoodArray[x][y].setForeground(Color.pink);\r\n\t\t\t\t\tstartingX += interval;\r\n\t\t\t\t\tpanel.add(foodArray[x][y]);\r\n\t\t\t\t}\r\n\t\t\t\telse{ \r\n\t\t\t\t\tfoodArray[x][y] = new JLabel(\"\");\r\n\t\t\t\t\tfoodArray[x][y].setBounds(startingX,startingY, interval,interval);\r\n\t\t\t\t\tstartingX += interval;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t// add the interval for the next wall/food \r\n\t\t\tstartingY += interval;\r\n\t\t\tstartingX = interval;\r\n\t\t}\r\n\t}", "private void updateScore(int point){\n mScoreView.setText(\"\" + mScore);\n }", "public void calculateScore(){\n\n score.setText(Integer.toString(80));\n\n\n }", "public void setResults(int touchedAmount, int bugsSpawned, int bugsSmashed, int highestFactor, int score){\n\t\tdouble smashPercentage = ((double)bugsSmashed / (double)bugsSpawned) * 100;\n\t\tdouble accuracyPercentage = ((double)bugsSmashed / (double)touchedAmount) * 100;\n\t\t\n\t\tbugsSmashedView.setText(\"Bugs smashed: \" + String.valueOf(bugsSmashed) + \"/\" + String.valueOf(bugsSpawned));\n\t\tbugsSmashedBar.setProgress(0);\n\t\tbugsSmashedBar.setProgress((int)smashPercentage);\n\t\t\n\t\tdouble accuracy = Math.round(accuracyPercentage*100.0)/100.0;\n\t\taccuracyView.setText(\"Accuracy: \" + String.valueOf(accuracy) + \"%\");\n\t\taccuracyBar.setProgress(0);\n\t\taccuracyBar.setProgress((int)accuracyPercentage);\n\t\t\n\t\tstreakView.setText(\"Highest streak: \" + String.valueOf(highestFactor));\n\t\tscoreView.setText(\"Stage score: \" + String.valueOf(score));\n\t}", "private void addLabels()\n {\n add(my_score_label);\n add(my_level_label);\n add(my_lines_label);\n }" ]
[ "0.6838675", "0.67827594", "0.6455823", "0.6327687", "0.6000161", "0.59370226", "0.5874647", "0.5870905", "0.58703864", "0.5865583", "0.58437043", "0.5814351", "0.5783001", "0.5774191", "0.5742534", "0.57276964", "0.5712594", "0.5706504", "0.5685527", "0.5669843", "0.56653666", "0.5648696", "0.56418496", "0.5613148", "0.5593971", "0.55852354", "0.5573513", "0.5544927", "0.5542194", "0.5537504", "0.5533172", "0.5517677", "0.5485088", "0.54735893", "0.54596865", "0.5450368", "0.5439864", "0.5439035", "0.54318523", "0.5421522", "0.54190797", "0.5400589", "0.5399359", "0.5390925", "0.5369912", "0.5359006", "0.5344861", "0.5342687", "0.53417397", "0.53364325", "0.5327075", "0.5320911", "0.53169346", "0.5315335", "0.529964", "0.5299058", "0.52977836", "0.5287906", "0.52859175", "0.5278521", "0.52781016", "0.5258898", "0.52481294", "0.5247796", "0.5244058", "0.5242185", "0.5240959", "0.5234999", "0.5227719", "0.52176934", "0.52145636", "0.52116305", "0.51936585", "0.51825476", "0.5174491", "0.517417", "0.51711535", "0.51553094", "0.5154794", "0.5150078", "0.5142925", "0.51411456", "0.5135205", "0.51350445", "0.5133426", "0.5129708", "0.51275855", "0.5127408", "0.51253176", "0.5115162", "0.5114361", "0.51123154", "0.51069796", "0.5099887", "0.50912744", "0.508352", "0.5076755", "0.5072063", "0.5069459", "0.50677407" ]
0.7029064
0
Create a new conversation URL: /conversations/create Parameters should be: members (list of members for the group, separated by semicolons ';') [string] isgroup (whether this conversation is a group or not) [boolean] Will also enqueue an update for all members On success: Returns the conversation id. Returns a 200 (OK) status code. On failure: Returns no text. Returns a 400 (BAD REQUEST) status code. This likely means that the amount of members was smaller than two, or that the amount of members did not match the given conversation type. OR Returns no text. Returns a 410 (GONE) status code. This likely means that one of the provided members did not exist.
@Override protected void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException { if (!h.isActive()) res.setStatus(HttpStatus.INTERNAL_SERVER_ERROR_500); String[] members = req.getParameter("members").split(";"); boolean group = Boolean.parseBoolean(req.getParameter("isgroup")); Document conversation = null; if (group) { if (members.length < 2) { res.setStatus(HttpStatus.BAD_REQUEST_400); return; } else { conversation = h.createNewConversation(members, true); } } else { if (members.length != 2) { res.setStatus(HttpStatus.BAD_REQUEST_400); return; } else { conversation = h.createNewConversation(members, false); } } if (conversation != null) { h.enqueueUserConversationUpdates(members, Conversation.fromDocument(conversation)); res.getWriter().print(conversation.getObjectId("_id").toString()); res.setStatus(HttpStatus.OK_200); } else { res.setStatus(HttpStatus.GONE_410); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void createConversation(@NonNull final ConversationCreate request, @Nullable Callback<ComapiResult<ConversationDetails>> callback);", "@POST\n @Path(\"/{groupId}\")\n public Response createMessage(Message m,\n @PathParam(\"groupId\") long groupId,\n @QueryParam(\"actorId\") String actorId,\n @Auth Boolean isAuthenticated) throws URISyntaxException, SQLException {\n\n //check group user membership before allowing to post\n if(!isAuthorized(actorId, groupId)) {\n return Response.status(Response.Status.FORBIDDEN).build();\n }\n\n Handle handle = jdbi.open();\n handle.getConnection().setAutoCommit(false);\n try {\n handle.begin();\n MessageDAO mdao = handle.attach(MessageDAO.class);\n //create message and mark it as read for the author\n long messageId = mdao.createMessage(groupId, actorId, m.getContent());\n mdao.createMessageUser(messageId, actorId);\n handle.commit();\n return Response.created(new URI(String.valueOf(messageId))).build();\n } catch (Exception e) {\n handle.rollback();\n e.printStackTrace();\n return Response.serverError().build();\n }\n }", "String createTeam(String userName, String teamName, Set<String> members) throws RemoteException, InterruptedException;", "Conversation newConversation(Uuid id, String title, Uuid owner, Time creationTime);", "public void createGroupChat(View view){\n\t\tif (!AppSharedPreference.getInstance(CreateGroupChatAutoCompleterView.this).getIsConnectedToInternet()){\n\t\t\tDialogUtils.showInternetAlertDialog(CreateGroupChatAutoCompleterView.this);\n\t\t\treturn;\n\t\t}\n\n\t\tif(selectedContactList.size()>0){\n\t\t\tnew GroupCreaterAsyncTask(this,selectedContactList,groupName,groupIcon).execute();\n\t\t}else{\n\t\t\tAppUtils.showTost(this, \"Please select atleast one contact\");\n\t\t}\n\t\t\n\t}", "@PostMapping(\"/memberships\")\n @Timed\n public ResponseEntity<MembershipDTO> createMembership(@RequestBody MembershipDTO membershipDTO) throws URISyntaxException {\n log.debug(\"REST request to save Membership : {}\", membershipDTO);\n if (membershipDTO.getId() != null) {\n throw new RuntimeException(\"A new membership cannot already have an ID\");\n }\n MembershipDTO result = membershipService.save(membershipDTO);\n return ResponseEntity.created(new URI(\"/api/memberships/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "public PostgroupHelper(String groupName, String groupPassword, ArrayList<String> members,\n ArrayList<String> memberIds, Context context,\n PostgroupHelper.CallbackPost cb) {\n this.groupName = groupName;\n this.groupPassword = groupPassword;\n this.members = members;\n this.activity = cb;\n this.memberIds = memberIds;\n RequestQueue queue = Volley.newRequestQueue(context);\n PostgroupHelper.PostRequest request = new PostgroupHelper.PostRequest(Request.Method.POST,\n \"https://ide50-johadiep.legacy.cs50.io:8080/groups\", this,\n this);\n queue.add(request);\n }", "private static boolean addMemberToGroupOrProject(String url, String memberId, int accessLevel) {\n HttpPost post = new HttpPost(url);\n Gson gson = new Gson();\n AddMember member = new AddMember(memberId, accessLevel);\n setPostJson(post, gson.toJson(member));\n try {\n HttpResponse response = sendAuthenticated(post);\n return response.getStatusLine().getStatusCode() == 201;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return false;\n }", "User addMember(String companyId, String name, String memberEmail, boolean isGroupLead)\n throws InvalidRequestException;", "HttpStatus createGroup(final String groupName);", "@PostMapping(\"/new\")\n @ResponseStatus(HttpStatus.CREATED)\n public Boolean newChat(@RequestBody NewChatEvent event) {\n notificationService.notifyAboutNewChat(event.getChatId(), event.getDepartmentId());\n scheduleService.scheduleReassignment(event.getChatId());\n return Boolean.TRUE;\n }", "private void createGroup(View view) {\r\n\r\n // Creates necessary elements of the dialog with input limit of length 30\r\n final int MAX_LENGTH = 30;\r\n AlertDialog.Builder dialogGroup = new AlertDialog.Builder(getActivity());\r\n dialogGroup.setTitle(\"Create group\");\r\n final EditText editGroupName = new EditText(getActivity());\r\n editGroupName.setHint(\"Group name\");\r\n editGroupName.setInputType(InputType.TYPE_TEXT_FLAG_CAP_WORDS);\r\n InputFilter[] FilterArray = new InputFilter[1];\r\n FilterArray[0] = new InputFilter.LengthFilter(MAX_LENGTH);\r\n editGroupName.setFilters(FilterArray);\r\n\r\n // Creates padding for the dialog (for aesthetic)\r\n final int AMOUNT_PADDING = 20;\r\n editGroupName.setSingleLine();\r\n FrameLayout container = new FrameLayout(getActivity());\r\n FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\r\n params.topMargin = convertDpToPx(AMOUNT_PADDING);\r\n params.bottomMargin = convertDpToPx(AMOUNT_PADDING);\r\n params.leftMargin = convertDpToPx(AMOUNT_PADDING);\r\n params.rightMargin = convertDpToPx(AMOUNT_PADDING);\r\n editGroupName.setLayoutParams(params);\r\n container.addView(editGroupName);\r\n\r\n dialogGroup.setView(container);\r\n\r\n // Create group in database if they click \"create\"\r\n dialogGroup.setPositiveButton(\"Create\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n groupName = editGroupName.getText().toString().trim();\r\n\r\n AsyncHttpClient client = new AsyncHttpClient();\r\n\r\n JSONObject group;\r\n StringEntity entity;\r\n try {\r\n group = new JSONObject();\r\n group.put(\"action\", \"create\");\r\n group.put(\"groupName\", groupName);\r\n group.put(\"owner\", currentUser);\r\n entity = new StringEntity(group.toString(), \"UTF-8\");\r\n }\r\n catch (JSONException e) {\r\n throw new IllegalArgumentException(\"unexpected error\", e);\r\n }\r\n\r\n client.post(getActivity().getApplicationContext(), myURL, entity, \"application/json\", new AsyncHttpResponseHandler() {\r\n @Override\r\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\r\n int duration = Toast.LENGTH_SHORT;\r\n CharSequence message = \"Success!\";\r\n Toast.makeText(getActivity().getApplicationContext(), message, duration).show();\r\n\r\n // Refresh page so that it updates when you create group\r\n FragmentTransaction ft = getFragmentManager().beginTransaction();\r\n ft.detach(GroupsFragment.this).attach(GroupsFragment.this).commit();\r\n }\r\n\r\n @Override\r\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\r\n int duration = Toast.LENGTH_SHORT;\r\n CharSequence text;\r\n\r\n if (statusCode == 400) {\r\n text = \"Invalid group\";\r\n }\r\n else {\r\n text = \"Error \" + statusCode + \": \" + error;\r\n }\r\n Toast.makeText(getActivity().getApplicationContext(), text, duration).show();\r\n }\r\n });\r\n }\r\n });\r\n\r\n dialogGroup.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n dialog.cancel();\r\n }\r\n });\r\n\r\n dialogGroup.show();\r\n }", "@POST\n @Path(\"/{a:create|Create}\")\n @Consumes(MediaType.APPLICATION_JSON)\n public abstract Response createGroup(Map<String, String> paramsamsam);", "CreateSubnetGroupResult createSubnetGroup(CreateSubnetGroupRequest createSubnetGroupRequest);", "@POST\n @Path(\"/{groupId}/{messageId}\")\n public Response createMessageUser(@PathParam(\"groupId\") long groupId,\n @PathParam(\"messageId\") long messageId,\n @QueryParam(\"actorId\") String actorId,\n @Auth Boolean isAuthenticated) {\n\n //check group user membership before allowing to mark messages as read\n if(!isAuthorized(actorId, groupId)) {\n return Response.status(Response.Status.FORBIDDEN).build();\n }\n messageDAO.createMessageUser(messageId, actorId);\n return Response.ok().build();\n }", "public ServiceGroup create(String shortName, String title, int cid) throws Exception;", "private Conversation createNewConversation(Node conversationsNode, Node participantsNode, String conversationId, Date date, HistoricalMessageImpl message) {\r\n String jidTo = message.getTo();\r\n String jidFrom = message.getFrom();\r\n Boolean isGroupChat = message.getType().equals(Message.Type.groupchat.name());\r\n Participant participantTo = getParticipant(participantsNode, CodingUtils.encodeToHex(StringUtils.parseName(jidTo)));\r\n InterlocutorImpl interlocutorFrom = new InterlocutorImpl(jidFrom, conversationId, isGroupChat);\r\n if (!isGroupChat) {\r\n if (participantTo != null) {\r\n if (participantTo.getInterlocutorList() != null) {\r\n participantTo.addInterlocutor(interlocutorFrom);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorFrom);\r\n participantTo.setInterlocutorList(list);\r\n }\r\n updateParticipant(participantsNode, participantTo);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorFrom);\r\n participantTo = new Participant(jidTo, list, new ArrayList<InterlocutorImpl>());\r\n addParticipant(participantsNode, participantTo);\r\n }\r\n Participant participantFrom = getParticipant(participantsNode, CodingUtils.encodeToHex(StringUtils.parseName(jidFrom)));\r\n InterlocutorImpl interlocutorTo = new InterlocutorImpl(jidTo, conversationId, isGroupChat);\r\n if (participantFrom != null) {\r\n if (participantFrom.getInterlocutorList() != null) {\r\n participantFrom.addInterlocutor(interlocutorTo);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorTo);\r\n participantFrom.setInterlocutorList(list);\r\n }\r\n updateParticipant(participantsNode, participantFrom);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorTo);\r\n participantFrom = new Participant(jidFrom, list, new ArrayList<InterlocutorImpl>());\r\n addParticipant(participantsNode, participantFrom);\r\n }\r\n } else {\r\n if (participantTo != null) {\r\n if (participantTo.getGroupChatList() != null) {\r\n participantTo.addGroupChat(interlocutorFrom);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorFrom);\r\n participantTo.setGroupChatList(list);\r\n }\r\n updateParticipant(participantsNode, participantTo);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorFrom);\r\n participantTo = new Participant(jidTo, new ArrayList<InterlocutorImpl>(), list);\r\n addParticipant(participantsNode, participantTo);\r\n }\r\n }\r\n Conversation conversation = new Conversation(conversationId, date, date);\r\n conversation.addMessage(message);\r\n addConversation(conversationsNode, conversation);\r\n return conversation;\r\n }", "public static String newGame(final String token,\n final String teamA,\n final String teamB,\n final int gameType,\n final int ageCategory,\n final int court,\n final boolean mirrored) throws IOException {\n\n String NEW_GAME_URL = String.format(RestURI.CREATE_GAME.getValue(), Server.getIp(),\n URLEncoder.encode(teamA, \"UTF8\"),\n URLEncoder.encode(teamB, \"UTF8\"),\n gameType, ageCategory, court, mirrored, token);\n\n Request request = new Request.Builder()\n .url(NEW_GAME_URL)\n .post(emptyBody)\n .build();\n\n try (Response response = getHttpClient(30).newCall(request).execute()) {\n return getResponseMessage(response);\n }\n }", "public boolean createChat(String friendName, String conversationID, MessageListener conversationListener){\n\n\t\tboolean chatCreated = false;\n\n\t\tif(serverConnection.isConnected()){\n\n\t\t\tif(!chatInstanceMap.containsKey(friendName))\n\t\t\t{\n\t\t\t\tChat newConversation = serverConnection.getChatManager().createChat(friendName, conversationID, conversationListener);\n\n\t\t\t\tchatInstanceMap.put(friendName, newConversation);\n\n\t\t\t\tchatCreated = true;\n\t\t\t}\n\t\t}\t\n\n\t\treturn chatCreated;\n\t}", "Message newMessage(Uuid id, Uuid author, Uuid conversation, String body, Time creationTime);", "public abstract boolean create(FolderType type) throws MessagingException;", "@POST\n @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })\n @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })\n public BlockConsistencyGroupRestRep createConsistencyGroup(\n final BlockConsistencyGroupCreate param) {\n checkForDuplicateName(param.getName(), BlockConsistencyGroup.class);\n\n // Validate name\n ArgValidator.checkFieldNotEmpty(param.getName(), \"name\");\n\n // Validate name not greater than 64 characters\n ArgValidator.checkFieldLengthMaximum(param.getName(), CG_MAX_LIMIT, \"name\");\n\n // Validate project\n ArgValidator.checkFieldUriType(param.getProject(), Project.class, \"project\");\n final Project project = _dbClient.queryObject(Project.class, param.getProject());\n ArgValidator\n .checkEntity(project, param.getProject(), isIdEmbeddedInURL(param.getProject()));\n // Verify the user is authorized.\n verifyUserIsAuthorizedForRequest(project);\n\n // Create Consistency Group in db\n final BlockConsistencyGroup consistencyGroup = new BlockConsistencyGroup();\n consistencyGroup.setId(URIUtil.createId(BlockConsistencyGroup.class));\n consistencyGroup.setLabel(param.getName());\n consistencyGroup.setProject(new NamedURI(project.getId(), project.getLabel()));\n consistencyGroup.setTenant(project.getTenantOrg());\n // disable array consistency if user has selected not to create backend replication group\n consistencyGroup.setArrayConsistency(param.getArrayConsistency());\n\n _dbClient.createObject(consistencyGroup);\n\n return map(consistencyGroup, null, _dbClient);\n\n }", "@Headers({\n \"Content-Type:application/json\"\n })\n @POST(\"users/{recipient_id}/messages\")\n Call<ChatMessageResource> postUserMessage(\n @retrofit2.http.Path(\"recipient_id\") Integer recipientId, @retrofit2.http.Body ChatMessageRequest chatMessageRequest\n );", "CreateCategoryResponse createCategory(CreateCategoryRequest request);", "@Override\n\t\tprotected String doInBackground(String... args) {\n\t\t\tString title = inputName.getText().toString();\n\t\t\tString amount = inputAmount.getText().toString();\n\t\t\tint days = numOfDays.getInputType();\n\t\t\tString article = inputArticle.getText().toString();\n\n//\t\t\tList<NameValuePair> params = new ArrayList<NameValuePair>();\n//\t\t\tparams.add(new BasicNameValuePair(\"title\", title));\n//\t\t\tparams.add(new BasicNameValuePair(\"amount\", amount));\n//\t\t\tparams.add(new BasicNameValuePair(\"days\", days));\n//\t\t\tparams.add(new BasicNameValuePair(\"article\", article));\n//\n//\t\t\tJSONObject json = jsonParser.makeHttpRequest(url_create_campaign,\n//\t\t\t\t\t\"POST\", params);\n\t\t\tRestClient client =new RestClient(UrlLink.createCampaign);\n\t\t\tclient.AddParam(\"title\", title);\n\t\t\tclient.AddParam(\"goal\", amount);\n\t\t\tclient.AddParam(\"goalDuration\", Integer.toString(days));\n\t\t\tclient.AddParam(\"category\", Integer.toString(1));\n\t\t\tclient.AddParam(\"brief\", article);\n\t\t\ttry{\n\t\t\t\tclient.Execute(RequestMethod.POST);\n\t\t\t\tString response=client.getResponse();\n\t\t\t\treturn response;\n\t\t\t\t\n\t\t\t}catch(Exception ex){\n\t\t\t\tString response=client.getErrorMessage();\n\t\t\t\tLog.e(\"exception\",\"this\" ,ex);\n\t\t\t\treturn response;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "@PostMapping(\"/chat-messages\")\n @Timed\n public ResponseEntity<ChatMessage> createChatMessage(@RequestBody ChatMessage chatMessage) throws URISyntaxException {\n log.debug(\"REST request to save ChatMessage : {}\", chatMessage);\n if (chatMessage.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new chatMessage cannot already have an ID\")).body(null);\n }\n ChatMessage result = chatMessageRepository.save(chatMessage);\n return ResponseEntity.created(new URI(\"/api/chat-messages/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "public static boolean createSubgroup(String name, String path, String parentId) {\n String url = BASE_URL + \"groups\";\n HttpPost post = new HttpPost(url);\n Gson gson = new Gson();\n NewSubgroup group = new NewSubgroup(name, path, parentId);\n setPostJson(post, gson.toJson(group));\n try {\n HttpResponse response = sendAuthenticated(post);\n return response.getStatusLine().getStatusCode() == 201;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return false;\n }", "private void createNewGroup()\n {\n\n Map<String,String> map = new HashMap<>();\n map.put(\"groupName\",gName);\n map.put(\"groupId\",gId);\n map.put(\"groupAddress\",gAddress);\n map.put(\"groupDescription\",gDescription);\n map.put(\"groupAdmin\",currentUserName);\n map.put(\"date\",someMethod.getDateWithTime());\n map.put(\"groupType\",groupType);\n map.put(\"time\",time);\n PostData postData = new PostData(MakeMyGroup.this,taskInterface);\n postData.InsertData(getResources().getString(R.string.alreadyMember),map);\n\n /*try {\n DATA = URLEncoder.encode(\"groupName\",\"UTF-8\")+\"=\"+URLEncoder.encode(gName,\"UTF-8\")+\"&\"\n +URLEncoder.encode(\"groupId\",\"UTF-8\")+\"=\"+URLEncoder.encode(gId,\"UTF-8\")+\"&\"\n +URLEncoder.encode(\"groupAddress\",\"UTF-8\")+\"=\"+URLEncoder.encode(gAddress,\"UTF-8\")+\"&\"\n +URLEncoder.encode(\"groupDescription\",\"UTF-8\")+\"=\"+URLEncoder.encode(gDescription,\"UTF-8\")+\"&\"\n +URLEncoder.encode(\"groupAdmin\",\"UTF-8\")+\"=\"+URLEncoder.encode(currentUserName,\"UTF-8\")+\"&\"\n +URLEncoder.encode(\"date\",\"UTF-8\")+\"=\"+URLEncoder.encode(someMethod.getDateWithTime(),\"UTF-8\")+\"&\"\n +URLEncoder.encode(\"groupType\",\"UTF-8\")+\"=\"+URLEncoder.encode(groupType,\"UTF-8\")+\"&\"\n +URLEncoder.encode(\"time\",\"UTF-8\")+\"=\"+URLEncoder.encode(time,\"UTF-8\");\n\n DatabaseBackgroundTask backgroundTask = new DatabaseBackgroundTask(this);\n backgroundTask.setOnResultListener(taskInterface);\n backgroundTask.execute(getResources().getString(R.string.createGroup),DATA);\n\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }*/\n }", "UserGroup createGroup(String companyId, String name, String groupLead);", "public boolean addContact(String groupName, List<Integer> ids) {\n\t\tList<Contacto> components = currentUser.getContacts().stream().filter(c -> ids.contains(c.getId()))\n\t\t\t\t.collect(Collectors.toList());\n\t\tint newId = Id.generateUniqueId();\n\t\tint msgId = messageDAO.createMessageList();\n\t\tContacto group = new Grupo(newId, msgId, 0, groupName, null, currentUser.getId(), components);\n\t\tgroup.setMessages(messageDAO.getMessageList(msgId));\n\n\t\t// adds the group as a contact in currentUser\n\t\tcontactDAO.registerContact(group);\n\t\tcurrentUser.addContact(group);\n\t\tuserCatalog.modifyUser(currentUser);\n\n\t\t// Inserts the group in each of it's components\n\t\tcomponents.stream().forEach(component -> {\n\t\t\tUsuario user = userCatalog.getUser(component.getUserId());\n\t\t\tuser.addContact(group);\n\t\t\tuserCatalog.modifyUser(user);\n\t\t});\n\t\tcontactDAO.registerContact(group);\n\t\treturn true;\n\t}", "public abstract void newChatMembersMessage(Message m);", "@OnAlias(value = \"createmessage3\")\n\tpublic void createMessage3(TeamchatAPI api) throws Exception {\n\t\t// populating with message name list\n\t\t// get option name\n\t\tString subject = api.context().currentReply().getField(\"subject\"), content = api\n\t\t\t\t.context().currentReply().getField(\"content\");\n\t\t// posting the message\n\t\tHTTP_Response httpResponse = bah.sendMessage(projectId, subject,\n\t\t\t\tcontent);\n\t\tif ((httpResponse.getResponseCode() == 422)\n\t\t\t\t|| (httpResponse.getResponseCode() == 404)\n\t\t\t\t|| (httpResponse.getResponseCode() == 500)) {\n\t\t\tapi.perform(api\n\t\t\t\t\t.context()\n\t\t\t\t\t.currentRoom()\n\t\t\t\t\t.post(new PrimaryChatlet()\n\t\t\t\t\t\t\t.setQuestionHtml(\"<h3 style=\\\"color:red;\\\">An error occured try again after 5 minutes !</h3>\")));\n\t\t} else {\n\t\t\tString htmlResponse = \"<h3>\"\n\t\t\t\t\t+ subject\n\t\t\t\t\t+ \"</h3>\"\n\t\t\t\t\t+ \"<h4>\"\n\t\t\t\t\t+ content\n\t\t\t\t\t+ \"</h4>\"\n\t\t\t\t\t+ \"<h5 style=\\\"color:blue;\\\">This message was posted successully!</h5>\";\n\t\t\tapi.perform(api.context().currentRoom()\n\t\t\t\t\t.post(new PrimaryChatlet().setQuestionHtml(htmlResponse)));\n\t\t}\n\t}", "@Override\n\tprotected Void doInBackground(String... arg) {\n\t\tString newName = arg[0];\n\t\t\n\t\tString newPres=arg[1];\n\t\t\n\t\t\n\t\t// Preparing post params\n\t\tList<NameValuePair> params = new ArrayList<NameValuePair>();\n\t\tparams.add(new BasicNameValuePair(\"Name\", newName));\n\t\tparams.add(new BasicNameValuePair(\"prescription\",newPres));\n\t\t\n //String par=params.toString();\n\n\t\tServiceHandler serviceClient = new ServiceHandler();\n\n\t\tString json = serviceClient.makeServiceCall(URL_NEW_CATEGORY,\n\t\t\t\tServiceHandler.POST, params);\n\n\t\tLog.d(\"Create Response: \", \"> \" + json);\n\n\t\tif (json != null) {\n\t\t\ttry {\n\t\t\t\tJSONObject jsonObj = new JSONObject(json);\n\t\t\t\tboolean error = jsonObj.getBoolean(\"error\");\n\t\t\t\t// checking for error node in json\n\t\t\t\tif (!error) {\t\n\t\t\t\t\t// new category created successfully\n\t\t\t\t\tisNewCategoryCreated = true;\n\t\t\t\t} else {\n\t\t\t\t\tLog.e(\"Create Category Error: \", \"> \" + jsonObj.getString(\"message\"));\n\t\t\t\t}\n\n\t\t\t} catch (JSONException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} else {\n\t\t\tLog.e(\"JSON Data\", \"Didn't receive any data from server!\");\n\t\t}\n\t\treturn null;\n\t}", "public VcmsDiscussion create(java.lang.String discussionId);", "@OnKeyword(value = \"message\")\n\tpublic void createMessage(TeamchatAPI api) throws Exception {\n\t\tif (isBasecampnotPresent(api)) {\n\t\t\treturn;\n\t\t}\n\t\t// populating with project name list\n\t\tField f = api.objects().select().name(\"project\").label(\"Project\");\n\t\tfor (Project project : bah.getActiveProjects()) {\n\t\t\tf.addOption(project.getName() + \" | \" + project.getId());\n\t\t}\n\t\t// set topic type to message\n\t\ttopicType = \"Message\";\n\t\tapi.perform(api\n\t\t\t\t.context()\n\t\t\t\t.currentRoom()\n\t\t\t\t.post(new PrimaryChatlet()\n\t\t\t\t\t\t.setQuestion(\"Get message(s) from a project\")\n\t\t\t\t\t\t.setReplyScreen(api.objects().form().addField(f))\n\t\t\t\t\t\t.setReplyLabel(\"Select Project\")\n\t\t\t\t\t\t.alias(\"createmessage2\")));\n\t}", "public com.squareup.okhttp.Call createCall(PostGroupsRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {\n Object localVarPostBody = body;\n\n // create path and map variables\n String localVarPath = \"/groups\";\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n if(progressListener != null) {\n apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {\n @Override\n public com.squareup.okhttp.Response intercept(Chain chain) throws IOException {\n com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());\n return originalResponse.newBuilder()\n .body(new ProgressResponseBody(originalResponse.body(), progressListener))\n .build();\n }\n });\n }\n\n String[] localVarAuthNames = new String[] { };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);\n }", "public void addGroupMember(String group_unique_id, String member_phone, String isAdmin, String membership_status) {\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n ContentValues values = new ContentValues();\r\n values.put(\"group_unique_id\", group_unique_id); // values : Group Name\r\n values.put(\"member_phone\", member_phone); //\r\n values.put(\"isAdmin\", isAdmin);// values : 0 or 1\r\n values.put(\"membership_status\", membership_status);// values : left or joined\r\n // Inserting Row\r\n db.replace(\"GROUPMEMBER\", null, values);\r\n db.close(); // Closing database connection\r\n }", "ID create(NewRoamingGroup group);", "public String createCategory()\n {\n logger.info(\"**** In createCategory in Controller ****\");\n if (category != null && StringUtils.isNotEmpty(category.getCategoryName()))\n {\n String creationMessage = categoryService.createCategory(category);\n if (creationMessage.equalsIgnoreCase(Constants.CATEGORY_CREATION_SUCCESS))\n {\n FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, Constants.CATEGORY_CREATION_SUCCESS, Constants.CATEGORY_CREATION_SUCCESS);\n FacesContext.getCurrentInstance().getExternalContext().getFlash().setKeepMessages(true);\n FacesContext.getCurrentInstance().addMessage(null, facesMsg);\n }\n else if (creationMessage.equalsIgnoreCase(Constants.CATEGORY_ALREADY_EXISTS))\n {\n FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, Constants.CATEGORY_ALREADY_EXISTS, Constants.CATEGORY_ALREADY_EXISTS);\n FacesContext.getCurrentInstance().getExternalContext().getFlash().setKeepMessages(true);\n FacesContext.getCurrentInstance().addMessage(null, facesMsg);\n }\n else if (creationMessage.equalsIgnoreCase(Constants.CATEGORY_CREATION_EXCEPTION))\n {\n FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, Constants.CATEGORY_CREATION_EXCEPTION, Constants.CATEGORY_CREATION_EXCEPTION);\n FacesContext.getCurrentInstance().getExternalContext().getFlash().setKeepMessages(true);\n FacesContext.getCurrentInstance().addMessage(null, facesMsg);\n }\n else if (creationMessage.equalsIgnoreCase(Constants.FAILURE))\n {\n FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, Constants.CATEGORY_CREATION_FAILURE, Constants.CATEGORY_CREATION_FAILURE);\n FacesContext.getCurrentInstance().getExternalContext().getFlash().setKeepMessages(true);\n FacesContext.getCurrentInstance().addMessage(null, facesMsg);\n }\n }\n\n return Constants.CREATE_CATEGORY_VIEW;\n }", "public void createGroup(String unique_id, String group_name, int isMute) {\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n ContentValues values = new ContentValues();\r\n values.put(\"group_name\", group_name); // values : Group Name\r\n values.put(\"unique_id\", unique_id); // values : random string\r\n values.put(\"is_mute\", isMute);// values : 0 or 1\r\n\r\n // Inserting Row\r\n db.insert(\"GROUPINFO\", null, values);\r\n\r\n ContentValues args = new ContentValues();\r\n args.put(\"groupid\", unique_id); // values : random string\r\n args.put(\"isMute\", isMute);// values : 0 or 1\r\n args.put(\"muteTime\", \"\");// values : 0 or 1\r\n args.put(\"unMuteTime\", \"\");// values : 0 or 1\r\n db.insert(\"MUTESETTING\", null, args);\r\n\r\n db.close(); // Closing database connection\r\n\r\n }", "@Override\n\t\tprotected String doInBackground(String... params) {\n\t\t\tString httpResponse = null;\n\t\t\tif (params[0].equals(\"new\")) {\n\t\t\t\thttpResponse = HttpConnectionUtils.createNewRelationResponse(\n\t\t\t\t\t\tparams[1],\n\t\t\t\t\t\tparams[2],\n\t\t\t\t\t\tparams[3],\n\t\t\t\t\t\tparams[4],\n\t\t\t\t\t\tparams[5],\n\t\t\t\t\t\tparams[6],\n\t\t\t\t\t\tparams[7],\n\t\t\t\t\t\tparams[8],\n\t\t\t\t\t\tparams[9],\n\t\t\t\t\t\tgetResources().getString(R.string.hostname)\n\t\t\t\t\t\t\t\t+ getResources().getString(R.string.url_add_relation));\n\t\t\t}\n\t\t\treturn httpResponse;\n\t\t}", "private void CreateNewGroup(String group, String current_uid, String push_id) {\n\n mDatabaseInfo = FirebaseDatabase.getInstance().getReference().child(\"Groups\").child(current_uid).child(push_id).child(\"groupinfo\");\n\n HashMap<String, String> userMap = new HashMap<>();\n userMap.put(\"name\", group);\n userMap.put(\"admin\", current_uid);\n userMap.put(\"groupid\", push_id);\n mDatabaseInfo.setValue(userMap);\n\n mDatabaseMember = FirebaseDatabase.getInstance().getReference().child(\"Groups\").child(current_uid).child(push_id).child(\"member\").child(current_uid);\n\n HashMap<String, String> adminMap = new HashMap<>();\n adminMap.put(\"seen\", \"false\");\n mDatabaseMember.setValue(adminMap);\n }", "public void addChat(String to, String from, String from_fullname, String msg, String date, String status,\r\n String uniqueid, String type, String file_type) {\r\n\r\n String myPhone = getUserDetails().get(\"phone\");\r\n String contactPhone = \"\";\r\n if(myPhone.equals(to)) contactPhone = from;\r\n if(myPhone.equals(from)) contactPhone = to;\r\n\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n\r\n ContentValues values = new ContentValues();\r\n values.put(UserChat.USERCHAT_TO, to); // TO\r\n values.put(UserChat.USERCHAT_FROM, from); // FROM\r\n values.put(UserChat.USERCHAT_FROM_FULLNAME, from_fullname); // FROM FULL NAME\r\n values.put(UserChat.USERCHAT_MSG, msg); // CHAT MESSAGE\r\n values.put(UserChat.USERCHAT_DATE, date); // DATE\r\n values.put(\"status\", status); // status: pending, sent, delivered, seen\r\n values.put(\"uniqueid\", uniqueid);\r\n values.put(\"type\", type);\r\n values.put(\"file_type\", file_type);\r\n values.put(\"contact_phone\", contactPhone); // Contact\r\n\r\n // Inserting Row\r\n db.insert(UserChat.TABLE_USERCHAT, null, values);\r\n db.close(); // Closing database connection\r\n }", "CreateParameterGroupResult createParameterGroup(CreateParameterGroupRequest createParameterGroupRequest);", "@PUT()\n @Produces(MediaType.APPLICATION_JSON)\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\n @Path(\"/CreateMessage\")\n public Response createMessage(@FormParam(\"username\") String username,\n @FormParam(\"password\") String password,\n @FormParam(\"gson_message\") String msgJsonString)\n {\n Gson gson = new Gson();\n DTO_Message messageToCreate = gson.fromJson(msgJsonString, DTO_Message.class);\n System.out.println(messageToCreate.getTitle()+\" \"+messageToCreate.getContent()+\" \"+messageToCreate.getToUsername() +\" \"+messageToCreate.getFromId()+\" \"+messageToCreate.isRead());\n\n DB_Manager databaseManager = new DB_Manager();\n DTO_User user = databaseManager.getUserByNameAndPassword(username, password);\n if(user !=null)\n {\n boolean logList = databaseManager.createMessageByUser(messageToCreate, user);\n if(logList)\n {\n return Response.status(200).entity(RESULT_SUCCESS).build();\n }\n }\n return Response.status(403).entity(RESULT_FAILURE).build();\n\n }", "public com.squareup.okhttp.Call memberCreateMemberCall(DkCloudDataModelMembersMember obj, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {\n Object localVarPostBody = obj;\n\n // create path and map variables\n String localVarPath = \"/api/v1/member\";\n\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();\n\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n final String[] localVarAccepts = {\n \"application/json\", \"text/json\", \"application/xml\", \"text/xml\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n if (localVarAccept != null) localVarHeaderParams.put(\"Accept\", localVarAccept);\n\n final String[] localVarContentTypes = {\n \"application/json\", \"text/json\", \"application/xml\", \"text/xml\", \"application/x-www-form-urlencoded\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n localVarHeaderParams.put(\"Content-Type\", localVarContentType);\n\n if(progressListener != null) {\n apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {\n @Override\n public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {\n com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());\n return originalResponse.newBuilder()\n .body(new ProgressResponseBody(originalResponse.body(), progressListener))\n .build();\n }\n });\n }\n\n String[] localVarAuthNames = new String[] { };\n return apiClient.buildCall(localVarPath, \"POST\", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);\n }", "public CreateRemoteClassic<Msg, Ref> create();", "public abstract void groupChatCreatedMessage(Message m);", "@Override\n protected String doInBackground(String... params) {\n String JSONstring = new Gson().toJson(requestForm);\n DefaultHttpClient client1 = new DefaultHttpClient();\n Log.d(TAG, \"InviteMemberServerTask request:\" + JSONstring);\n HttpPost httpPost = new HttpPost(Constants.SERVER_URL + \"/tiger/rest/admin/inviteuser\");\n httpPost = SuperChatApplication.addHeaderInfo(httpPost, true);\n HttpResponse response = null;\n try {\n httpPost.setEntity(new StringEntity(JSONstring));\n try {\n response = client1.execute(httpPost);\n final int statusCode = response.getStatusLine().getStatusCode();\n if (statusCode == HttpStatus.SC_OK) {\n HttpEntity entity = response.getEntity();\n BufferedReader rd = new BufferedReader(new InputStreamReader(entity.getContent()));\n String line = \"\";\n String str = \"\";\n while ((line = rd.readLine()) != null) {\n\n str += line;\n }\n Log.d(TAG, \"invite Result : \" + str);\n if (str != null && !str.equals(\"\")) {\n str = str.trim();\n Gson gson = new GsonBuilder().create();\n if (str == null || str.contains(\"error\")) {\n return str;\n }\n AddMemberResponseModel regObj = gson.fromJson(str, AddMemberResponseModel.class);\n if (regObj != null) {\n if (regObj.accountCreated != null && !regObj.accountCreated.isEmpty()) {\n dialogHandler.sendEmptyMessage(1);//showDialog(\"User invitation sent\",true);\n } else if (regObj.accountAlreadyExists != null && !regObj.accountAlreadyExists.isEmpty()) {\n dialogHandler.sendEmptyMessage(2);//showDialog(\"User already added.\",false);\n } else if (regObj.accountFailed != null && !regObj.accountFailed.isEmpty()) {\n dialogHandler.sendEmptyMessage(3);//showDialog(\"User already added in this domain.\",false);\n }\n }\n return str;\n//\t\t\t\t\t\t\tSharedPrefManager iPrefManager = SharedPrefManager.getInstance();\n//\t\t\t\t\t\t\tif (iPrefManager != null\n//\t\t\t\t\t\t\t\t\t&& iPrefManager.getUserId() != 0) {\n//\t\t\t\t\t\t\t\tif (iPrefManager.getUserId() != regObj.iUserId) {\n//\t\t\t\t\t\t\t\t\ttry {\n//\t\t\t\t\t\t\t\t\t\tDBWrapper.getInstance().clearMessageDB();\n//\t\t\t\t\t\t\t\t\t\tiPrefManager.clearSharedPref();\n//\t\t\t\t\t\t\t\t\t} catch (Exception e) {\n//\t\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\tLog.d(TAG, \"Esia chat registration password mobileNumber: \" + regObj.getPassword()+\" , \"+regObj.iMobileNumber);\n//\t\t\t\t\t\t\tiPrefManager.saveUserDomain(domainNameView.getText().toString());\n//\t\t\t\t\t\t\tiPrefManager.saveUserEmail(memberEmail.getText().toString());\n//\t\t\t\t\t\t\tiPrefManager.saveDisplayName(memberName.getText().toString());\n//\t\t\t\t\t\t\tiPrefManager.saveUserOrgName(memberDeparment.getText().toString());\n//\t\t\t\t\t\t\tiPrefManager.saveAuthStatus(regObj.iStatus);\n//\t\t\t\t\t\t\tiPrefManager.saveDeviceToken(regObj.token);\n//\t\t\t\t\t\t\tiPrefManager.saveUserId(regObj.iUserId);\n//\t\t\t\t\t\t\tiPrefManager.setAppMode(\"VirginMode\");\n//\t\t\t\t\t\t\tiPrefManager.saveUserPhone(regObj.iMobileNumber);\n//\t\t\t\t\t\t\tiPrefManager.saveUserLogedOut(false);\n//\t\t\t\t\t\t\tiPrefManager.setMobileRegistered(iPrefManager.getUserPhone(), true);\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tIntent intent = new Intent(InviteMemberScreen.this, MobileVerificationScreen.class);\n//\t\t\t\t\t\tintent.putExtra(Constants.MOBILE_NUMBER_TXT,formatedNumber);\n//\t\t\t\t\t\tintent.putExtra(Constants.COUNTRY_CODE_TXT, countryCodeView.getText());\n//\t\t\t\t\t\tif(isAdmin)\n//\t\t\t\t\t\t\tintent.putExtra(Constants.REG_TYPE, \"ADMIN\");\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t\tintent.putExtra(Constants.REG_TYPE, \"USER\");\n//\t\t\t\t\t\tstartActivity(intent);\n//\t\t\t\t\t\tfinish();\n }\n }\n } catch (ClientProtocolException e) {\n Log.d(TAG, \"serverUpdateCreateGroupInfo during HttpPost execution ClientProtocolException:\" + e.toString());\n } catch (IOException e) {\n Log.d(TAG, \"serverUpdateCreateGroupInfo during HttpPost execution ClientProtocolException:\" + e.toString());\n }\n\n } catch (UnsupportedEncodingException e1) {\n Log.d(TAG, \"serverUpdateCreateGroupInfo during HttpPost execution UnsupportedEncodingException:\" + e1.toString());\n } catch (Exception e) {\n Log.d(TAG, \"serverUpdateCreateGroupInfo during HttpPost execution Exception:\" + e.toString());\n }\n\n\n return null;\n }", "@PostMapping(\"/class-groups\")\n @Timed\n public ResponseEntity<ClassGroupDTO> createClassGroup(@Valid @RequestBody ClassGroupDTO classGroupDTO) throws URISyntaxException {\n log.debug(\"REST request to save ClassGroup : {}\", classGroupDTO);\n if (classGroupDTO.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new classGroup cannot already have an ID\")).body(null);\n }\n ClassGroupDTO result = classGroupService.save(classGroupDTO);\n return ResponseEntity.created(new URI(\"/api/class-groups/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "@Post \n public JsonRepresentation createActivity(Representation entity) {\n \tJSONObject jsonReturn = new JSONObject();\n \tlog.info(\"createActivity(@Post) entered ..... \");\n\t\tEntityManager em = EMF.get().createEntityManager();\n\t\t\n\t\tString apiStatus = ApiStatusCode.SUCCESS;\n\t\tthis.setStatus(Status.SUCCESS_CREATED);\n\t\tUser currentUser = null;\n try {\n \t\tcurrentUser = (User)this.getRequest().getAttributes().get(RteamApplication.CURRENT_USER);\n \t\tif(currentUser == null) {\n\t\t\t\tthis.setStatus(Status.SERVER_ERROR_INTERNAL);\n \t\t\tlog.severe(\"user could not be retrieved from Request attributes!!\");\n \t\t}\n \t\t//::BUSINESSRULE:: user must be network authenticated to send a message\n \t\telse if(!currentUser.getIsNetworkAuthenticated()) {\n \t\t\tapiStatus = ApiStatusCode.USER_NOT_NETWORK_AUTHENTICATED;\n \t\t}\n \t\t// teamId is required if this is 'Create a new activity' API\n \t\telse if(this.userVote == null) {\n \t\tif(this.teamId == null || this.teamId.length() == 0) {\n \t\t\t\tapiStatus = ApiStatusCode.TEAM_ID_REQUIRED;\n \t\t} else if(!currentUser.isUserMemberOfTeam(this.teamId)) {\n \t\t\t\tapiStatus = ApiStatusCode.USER_NOT_MEMBER_OF_SPECIFIED_TEAM;\n \t\t\t\tlog.info(apiStatus);\n \t}\n \t\t}\n \t\t\n\t\t\tif(!apiStatus.equals(ApiStatusCode.SUCCESS) || !this.getStatus().equals(Status.SUCCESS_CREATED)) {\n\t\t\t\tjsonReturn.put(\"apiStatus\", apiStatus);\n\t\t\t\treturn new JsonRepresentation(jsonReturn);\n\t\t\t}\n\t\t\t\n \t\tJsonRepresentation jsonRep = new JsonRepresentation(entity);\n\t\t\tJSONObject json = jsonRep.toJsonObject();\n\n\t\t\t//////////////////////////////////////////\n \t\t// 'Get Status of Activities for User' API\n \t\t//////////////////////////////////////////\n \t\tif(this.userVote != null) {\n \t\t\t// remainder of processing for this API is delegated to another method\n \t\t\tgetStatusOfActivitiesForUser(currentUser, json, jsonReturn);\n \t\t\treturn new JsonRepresentation(jsonReturn);\n \t\t}\n \t\t\n\t\t\tTeam team = (Team)em.createNamedQuery(\"Team.getByKey\")\n\t\t\t\t.setParameter(\"key\", KeyFactory.stringToKey(this.teamId))\n\t\t\t\t.getSingleResult();\n\t\t\tlog.info(\"team retrieved = \" + team.getTeamName());\n\t\t\t\n\t\t\tString statusUpdate = null;\n\t\t\tif(json.has(\"statusUpdate\")) {\n\t\t\t\tstatusUpdate = json.getString(\"statusUpdate\");\n\t\t\t}\n\t\t\t\n\t\t\tString photoBase64 = null;\n\t\t\tif(json.has(\"photo\")) {\n\t\t\t\tphotoBase64 = json.getString(\"photo\");\n\t\t\t}\n\t\t\t\n\t\t\tBoolean isPortrait = null;\n\t\t\tif(json.has(\"isPortrait\")) {\n\t\t\t\tisPortrait = json.getBoolean(\"isPortrait\");\n\t\t\t\tlog.info(\"json isPortrait = \" + isPortrait);\n\t\t\t}\n\n\t\t\tString videoBase64 = null;\n\t\t\tif(json.has(\"video\")) {\n\t\t\t\tvideoBase64 = json.getString(\"video\");\n\t\t\t}\n\t\t\t\n\t\t\t// Enforce Rules\n\t\t\tif((statusUpdate == null || statusUpdate.length() == 0) && (photoBase64 == null || photoBase64.length() == 0)) {\n\t\t\t\tapiStatus = ApiStatusCode.STATUS_UPDATE_OR_PHOTO_REQUIRED;\n\t\t\t\tlog.info(\"required statusUpdate or photo field required\");\n\t\t\t} else if(statusUpdate != null && statusUpdate.length() > TwitterClient.MAX_TWITTER_CHARACTER_COUNT){\n\t\t\t\tapiStatus = ApiStatusCode.INVALID_STATUS_UPDATE_MAX_SIZE_EXCEEDED;\n\t\t\t} else if(videoBase64 != null && photoBase64 == null) {\n\t\t\t\tapiStatus = ApiStatusCode.VIDEO_AND_PHOTO_MUST_BE_SPECIFIED_TOGETHER;\n\t\t\t} else if(photoBase64 != null && isPortrait == null) {\n\t\t\t\tapiStatus = ApiStatusCode.IS_PORTRAIT_AND_PHOTO_MUST_BE_SPECIFIED_TOGETHER;\n\t\t\t}\n \t\t\n\t\t\tif(!apiStatus.equals(ApiStatusCode.SUCCESS) || !this.getStatus().equals(Status.SUCCESS_CREATED)) {\n\t\t\t\tjsonReturn.put(\"apiStatus\", apiStatus);\n\t\t\t\treturn new JsonRepresentation(jsonReturn);\n\t\t\t}\n\t\t\t\n\t\t\t// No anonymous Activity posts.\n\t\t\t// TODO once twitter API supports the meta data, then user name will not have to be inserted into update\n\t\t\tif(statusUpdate == null || statusUpdate.length() == 0) {\n\t\t\t\tstatusUpdate = currentUser.getFullName() + \" shared a photo fr loc \" + TF.getPassword();\n\t\t\t} else {\n\t\t\t\tstatusUpdate = currentUser.getDisplayName() + \" post: \" + statusUpdate;\n\t\t\t}\n\t\t\t\n\t\t\t///////////////////////////////////////////////////////////////////\n\t\t\t// Cache the activity post whether the team is using Twitter or not\n\t\t\t///////////////////////////////////////////////////////////////////\n\t\t\t// abbreviate only if necessary\n\t\t\tif(statusUpdate.length() > TwitterClient.MAX_TWITTER_CHARACTER_COUNT) {\n\t\t\t\tstatusUpdate = Language.abbreviate(statusUpdate);\n\t\t\t}\n\t\t\t\t\n\t\t\tActivity newActivity = new Activity();\n\t\t\tnewActivity.setText(statusUpdate);\n\t\t\tnewActivity.setCreatedGmtDate(new Date());\n\t\t\tnewActivity.setTeamId(this.teamId);\n\t\t\tnewActivity.setTeamName(team.getTeamName());\n\t\t\t\n\t\t\t// cacheId held in team is the last used.\n\t\t\tLong cacheId = team.getNewestCacheId() + 1;\n\t\t\tnewActivity.setCacheId(cacheId);\n\t\t\tteam.setNewestCacheId(cacheId);\n\t\t\t\n\t\t\t// Only send activity to Twitter if team is using Twitter\n\t\t\ttwitter4j.Status twitterStatus = null;\n\t\t\tif(team.getUseTwitter()) {\n\t\t\t\t// truncate if necessary\n\t\t\t\tif(statusUpdate.length() > TwitterClient.MAX_TWITTER_CHARACTER_COUNT) {\n\t\t\t\t\tstatusUpdate = statusUpdate.substring(0, TwitterClient.MAX_TWITTER_CHARACTER_COUNT - 2) + \"..\";\n\t\t\t\t}\n\n\t\t\t\ttwitterStatus = TwitterClient.updateStatus(statusUpdate, team.getTwitterAccessToken(), team.getTwitterAccessTokenSecret());\n\t\t\t\t\n\t\t\t\t// if Twitter update failed, log error, but continue because activity post will be stored by rTeam\n\t\t\t\tif(twitterStatus == null) {\n\t\t\t\t\tlog.severe(\"Twitter update failed, but continuing on ...\");\n\t\t\t\t\tapiStatus = ApiStatusCode.TWITTER_ERROR;\n\t\t\t\t} else {\n\t\t\t\t\tnewActivity.setTwitterId(twitterStatus.getId());\n\t\t\t\t\t// if posted to twitter, match the exact twitter date\n\t\t\t\t\tnewActivity.setCreatedGmtDate(twitterStatus.getCreatedAt());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tEntityManager emActivity = EMF.get().createEntityManager();\n\t\t\ttry {\n\t\t\t\tif(photoBase64 != null) {\n\t\t\t\t\t// decode the base64 encoding to create the thumb nail\n\t\t\t\t\tbyte[] rawPhoto = Base64.decode(photoBase64);\n\t\t\t\t\tImagesService imagesService = ImagesServiceFactory.getImagesService();\n\t\t\t\t\tImage oldImage = ImagesServiceFactory.makeImage(rawPhoto);\n\t\t\t\t\t\n\t\t\t\t\tint tnWidth = isPortrait == true ? THUMB_NAIL_SHORT_SIDE : THUMB_NAIL_LONG_SIDE;\n\t\t\t\t\tint tnHeight = isPortrait == true ? THUMB_NAIL_LONG_SIDE : THUMB_NAIL_SHORT_SIDE;\n\t\t\t\t\tTransform resize = ImagesServiceFactory.makeResize(tnWidth, tnHeight);\n\t\t\t\t\tImage newImage = imagesService.applyTransform(resize, oldImage);\n\t\t\t\t\tString thumbNailBase64 = Base64.encode(newImage.getImageData());\n\t\t\t\t\tnewActivity.setThumbNailBase64(thumbNailBase64);\n\t\t\t\t\tnewActivity.setPhotoBase64(photoBase64);\n\t\t\t\t\tif(videoBase64 != null) newActivity.setVideoBase64(videoBase64);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\temActivity.persist(newActivity);\n\t\t\t\tlog.info(\"new Activity was successfully persisted\");\n\t\t\t} catch(Exception e) {\n\t\t\t\tlog.severe(\"createActivity() exception = \" + e.getMessage());\n\t\t\t} finally {\n\t\t\t\temActivity.close();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tlog.severe(\"error extracting JSON object from Post\");\n\t\t\te.printStackTrace();\n\t\t\tthis.setStatus(Status.SERVER_ERROR_INTERNAL);\n\t\t} catch (JSONException e) {\n\t\t\tlog.severe(\"error converting json representation into a JSON object\");\n\t\t\te.printStackTrace();\n\t\t\tthis.setStatus(Status.SERVER_ERROR_INTERNAL);\n\t\t} catch (NoResultException e) {\n\t\t\tlog.severe(\"team not found\");\n\t\t\tapiStatus = ApiStatusCode.TEAM_NOT_FOUND;\n\t\t} catch (NonUniqueResultException e) {\n\t\t\tlog.severe(\"should never happen - two or more teams have same team id\");\n\t\t\tthis.setStatus(Status.SERVER_ERROR_INTERNAL);\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t em.close();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tjsonReturn.put(\"apiStatus\", apiStatus);\n\t\t} catch (JSONException e) {\n\t\t\tlog.severe(\"error creating JSON return object\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn new JsonRepresentation(jsonReturn);\n }", "@Override\n\t\tprotected JSONObject doInBackground(Void... params) {\n\t\t\tJSONArray connectionsResponse = null;\n\t\t\tJSONObject CreatBroadcastJsonObject = new JSONObject();\n\n\t\t\ttry {\n\t\t\t\tCreatBroadcastJsonObject.put(\"broadcast_msg_txt\",compose.getText());\n\t\t\t\tif(visibility.equalsIgnoreCase(\"1\")){\n\t\t\t\t\tCreatBroadcastJsonObject.put(\"is_public\",visibility); \n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tCreatBroadcastJsonObject.put(\"is_public\",visibility); \n\t\t\t\t\tCreatBroadcastJsonObject.put(\"filter_csv\",members_id);\n\t\t\t\t\tSystem.out.println(\"members_id\"+members_id);\n\n\t\t\t\t}\n\n\t\t\t} catch (JSONException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\n\t\t\tJSONObject jsonObjectReceived = HttpPostClient.sendHttpPost(createBroadcastURL,CreatBroadcastJsonObject);\n\n\t\t\tSystem.out.println(\"jsonObjectReceived----\"+jsonObjectReceived);\n\t\t\treturn jsonObjectReceived;\n\t\t}", "@RequestMapping(value = \"/groupps\",\n method = RequestMethod.POST,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> create(@Valid @RequestBody GrouppDTO grouppDTO) throws URISyntaxException {\n log.debug(\"REST request to save Groupp : {}\", grouppDTO);\n if (grouppDTO.getId() != null) {\n return ResponseEntity.badRequest().header(\"Failure\", \"A new groupp cannot already have an ID\").build();\n }\n Groupp groupp = grouppMapper.grouppDTOToGroupp(grouppDTO);\n grouppRepository.save(groupp);\n grouppSearchRepository.save(groupp);\n return ResponseEntity.created(new URI(\"/api/groupps/\" + grouppDTO.getId())).build();\n }", "private void createGroup(String groupName, String description, List<String> tags) {\n trCreateNewGroup.setGroupName(groupName);\n trCreateNewGroup.setOwner(user);\n trCreateNewGroup.setDescription(description);\n trCreateNewGroup.setTags(tags);\n\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-d\");\n Date date = new Date();\n String strData = dateFormat.format(date);\n\n trCreateNewGroup.setCreationDate(DateTime.Builder.buildDateString(strData));\n\n try {\n trCreateNewGroup.execute();\n } catch (GroupAlreadyExistingException e) {\n Toast toast = Toast.makeText(this, getString(R.string.group_already_created), Toast.LENGTH_LONG);\n toast.show();\n }\n\n updateMedalProgress(UserAchievement.FOUNDER);\n }", "@SuppressWarnings(\"rawtypes\")\n private com.squareup.okhttp.Call createValidateBeforeCall(PostGroupsRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {\n if (body == null) {\n throw new ApiException(\"Missing the required parameter 'body' when calling create(Async)\");\n }\n \n\n com.squareup.okhttp.Call call = createCall(body, progressListener, progressRequestListener);\n return call;\n\n }", "void create(Member member);", "protected void createGroup(int id, int parentGroupID) {\n\t\tsendMessage(\"/g_new\", new Object[] { id, 0, parentGroupID });\n\n\t}", "public Future<Person> createRelationship( String personId, String friendId );", "private void createNewChat() {\n if (advertisement.getUniqueOwnerID().equals(dataModel.getUserID())) {\n view.showCanNotSendMessageToYourselfToast();\n return;\n }\n\n dataModel.createNewChat(advertisement.getUniqueOwnerID(), advertisement.getOwner(), advertisement.getUniqueID(),\n advertisement.getImageUrl(), chatID -> view.openChat(chatID));\n }", "public PresencePerson createPresencePerson(String id);", "String createUserRequest(String username, UserRequestType type);", "@PostMapping(\"/api/v1/conversations\")\n PersistedConversation postConversation(\n @RequestBody final ConversationRequest conversation)\n {\n final List<PersistedParticipant> participantEntities = new ArrayList<>();\n for (final String participantName : conversation.participantNames()) {\n if (participantRepository.findByName(participantName) == null) {\n final PersistedParticipant persistedParticipant = new PersistedParticipant(UUID.randomUUID(), participantName);\n participantRepository.save(persistedParticipant);\n participantEntities.add(persistedParticipant);\n } else {\n participantEntities.add(participantRepository.findByName(participantName));\n }\n }\n final List<PersistedMessage> messageEntities = new ArrayList<>();\n final PersistedConversation persistedConversation =\n new PersistedConversation(\n UUID.randomUUID(),\n participantEntities,\n messageEntities);\n return conversationRepository.save(persistedConversation);\n }", "public String createAAAGroup(String groupName) {\n\n\t\tString adminToken = this.loginAAA(this.adminUsername,\n\t\t\t\tthis.adminPassword);\n\t\tString errorCode = this\n\t\t\t\t.sendCreateAAAGroupCommand(adminToken, groupName);\n\t\tif (adminToken != null) {\n\t\t\tthis.logoutAAA(adminToken);\n\t\t}\n\n\t\treturn errorCode;\n\t}", "@OnAlias(value = \"createmessage2\")\n\tpublic void createMessage2(TeamchatAPI api) throws Exception {\n\t\t// populating with message name list\n\t\t// get option name\n\t\tString[] project = api.context().currentReply().getField(\"project\")\n\t\t\t\t.split(\"\\\\|\");\n\t\t// get topic id from option name\n\t\tprojectId = project[(project.length - 1)].trim();\n\t\tapi.perform(api\n\t\t\t\t.context()\n\t\t\t\t.currentRoom()\n\t\t\t\t.post(new PrimaryChatlet()\n\t\t\t\t\t\t.setQuestion(\"Write your message\")\n\t\t\t\t\t\t.setReplyScreen(\n\t\t\t\t\t\t\t\tapi.objects()\n\t\t\t\t\t\t\t\t\t\t.form()\n\t\t\t\t\t\t\t\t\t\t.addField(\n\t\t\t\t\t\t\t\t\t\t\t\tapi.objects().input()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.name(\"subject\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.label(\"Title\"))\n\t\t\t\t\t\t\t\t\t\t.addField(\n\t\t\t\t\t\t\t\t\t\t\t\tapi.objects().input()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.name(\"content\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.label(\"Message\")))\n\t\t\t\t\t\t.setReplyLabel(\"Send\").alias(\"createmessage3\")));\n\t}", "public com.google.common.util.concurrent.ListenableFuture<injective.ocr.v1beta1.Tx.MsgCreateFeedResponse> createFeed(\n injective.ocr.v1beta1.Tx.MsgCreateFeed request) {\n return futureUnaryCall(\n getChannel().newCall(getCreateFeedMethod(), getCallOptions()), request);\n }", "public RecipientCardCollection create(Map<String, Object> params, RequestOptions options)\n throws StripeException {\n return ApiResource.request(ApiResource.RequestMethod.POST, String.format(\"%s%s\",\n Stripe.getApiBase(), this.getUrl()), params, RecipientCardCollection.class, options);\n }", "@ResponseStatus(HttpStatus.CREATED)\n\t@RequestMapping(value = \"\", method = RequestMethod.POST)\n\tpublic FriendsList createRequest(@Valid @RequestBody NewFriendRequestDTO friendRequestDTO, Principal principal) {\n\t\tFriendsList friendsList = buildRequestFromRequestDTO(friendRequestDTO);\n\t\t\n\t\tfriendsList = friendListDAO.newRequest(friendsList);\n\t\tif(friendsList.isApproved()) {\n\t\t\treturn friendsList;\n\t\t}\n\t\treturn friendsList;\n\t}", "@PUT\n @Path(\"/addMembers/{group}/user/{userName}\")\n public Response addMember(@PathParam(\"group\") String groupName, @PathParam(\"userName\") String userName) {\n try {\n GroupMessage groupMessage = accountService.getGroupByName(groupName);\n User admin = groupMessage.getAdmin();\n User user = userService.getUserByUsername(userName);\n accountService.addMemberToGroup(groupMessage, user, admin);\n return Response.ok().build();\n } catch (Exception e) {\n return Response.serverError().build();\n }\n\n }", "void addParticipants(@NonNull final String conversationId, @NonNull final List<Participant> participants, @Nullable Callback<ComapiResult<Void>> callback);", "@SuppressWarnings(\"rawtypes\")\n private com.squareup.okhttp.Call memberCreateMemberValidateBeforeCall(DkCloudDataModelMembersMember obj, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {\n if (obj == null) {\n throw new ApiException(\"Missing the required parameter 'obj' when calling memberCreateMember(Async)\");\n }\n \n\n com.squareup.okhttp.Call call = memberCreateMemberCall(obj, progressListener, progressRequestListener);\n return call;\n\n }", "public com.squareup.okhttp.Call createAsync(PostGroupsRequest body, final ApiCallback<PostGroupsResponse> callback) throws ApiException {\n\n ProgressResponseBody.ProgressListener progressListener = null;\n ProgressRequestBody.ProgressRequestListener progressRequestListener = null;\n\n if (callback != null) {\n progressListener = new ProgressResponseBody.ProgressListener() {\n @Override\n public void update(long bytesRead, long contentLength, boolean done) {\n callback.onDownloadProgress(bytesRead, contentLength, done);\n }\n };\n\n progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {\n @Override\n public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {\n callback.onUploadProgress(bytesWritten, contentLength, done);\n }\n };\n }\n\n com.squareup.okhttp.Call call = createValidateBeforeCall(body, progressListener, progressRequestListener);\n Type localVarReturnType = new TypeToken<PostGroupsResponse>(){}.getType();\n apiClient.executeAsync(call, localVarReturnType, callback);\n return call;\n }", "public static boolean newPostWithMultiPics(String status, String pics) {\n\t\tWeiboParameters params = new WeiboParameters();\n\t\tparams.put(\"status\", status);\n\t\tparams.put(\"pic_id\", pics);\n\t\ttry {\n\t\t\tJSONObject json = request(UrlConstants.UPLOAD_URL_TEXT, params, HTTP_POST);\n\t\t\tMessageModel msg = new Gson().fromJson(json.toString(), MessageModel.class);\n\t\t\tif (msg == null || msg.idstr == null || msg.idstr.trim().equals(\"\")) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public void create(ActionEvent actionEvent) {\n String grName = groupName.getText();\n ObservableList memList = addList.getCheckModel().getCheckedItems();\n\n if (memList == null) return;\n\n String memName = \"\";\n for (Object obj : memList ) {\n memName += obj.toString() + \"\\n\";\n }\n if (memName != \"\") {\n sender.requestNewGroup(grName, memName);\n chatUIController.newGr(grName);\n }\n return;\n }", "@GET\n\t@Path(\"/addMessage/{param}\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic void addMessageIdToGroup(@PathParam(\"param\") String param) {\n\t\tString[] parts = param.split(\",\");\n\t\tString groupName = parts[0];\n\t\tString messageId = parts[1];\n\t\tgroupDAO.addMessageIdToGroup(groupName, messageId);\n\t}", "public String clientCreateUser(User caller, String type) throws MupeException {\r\n return Person.clientGetCreator(caller, \"Person\");\r\n }", "@Path(\"adduc\")\n @GET\n @Produces(MediaType.TEXT_PLAIN)\n public String insertUserContact(@QueryParam(\"userid\") int uid, @QueryParam(\"city\") String ct, @QueryParam(\"phone\") int tel, @QueryParam(\"jsonpcallback\") String jsonpcallback) {\n // public String insertUserContact(@QueryParam(\"usercontact\") UserContact uc, @QueryParam(\"jsonpcallback\") String jsonpcallback) {\n String val = \"Error! Check Constraints\";\n UserContact uc = new UserContact();\n uc.setUserid(uid);\n uc.setCity(ct);\n uc.setPhone(tel);\n boolean status = ucs.insertUserContact(uc);\n if (status == true) {\n val = \"Added!!\";\n }\n return jsonpcallback + \"(\\\"\" + val + \"\\\")\";\n }", "public void successfulCreation(String type) {\n switch (type) {\n case \"Attendee\":\n System.out.println(\"Attendee Created\");\n break;\n case \"Organizer\":\n System.out.println(\"Organizer Created\");\n break;\n case \"Speaker\":\n System.out.println(\"Speaker Created\");\n break;\n case \"VIP\":\n System.out.println(\"VIP Created\");\n break;\n }\n }", "public native boolean createChannel(String appId, String channelKey, String name, int uid, RecordingConfig config);", "@POST\n @Path(\"/{groupId}/BatchRead\")\n public Response createMessageUserBatch(List<Message> messages,\n @PathParam(\"groupId\") long groupId,\n @QueryParam(\"actorId\") String actorId,\n @Auth Boolean isAuthenticated) {\n\n //check group user membership before allowing to mark messages as read\n if(!isAuthorized(actorId, groupId)) {\n return Response.status(Response.Status.FORBIDDEN).build();\n }\n\n List<MessageUser> mu = new ArrayList<MessageUser>();\n for(Message m : messages) {\n mu.add(new MessageUser(m.getId(), actorId));\n }\n\n messageDAO.createMessageUserBatch(mu);\n return Response.ok().build();\n }", "public AddNewContactGroupAction() {\r\n\t\tsuper();\r\n\t}", "public void createMessage(int tid, int uid, int rank, String detail);", "public Message handleCreate(Message createRequest) {\n\n Message response = new Message(Message.GENERIC_ERROR);\n\n int SectionNumbers = createRequest.getSectionNumbers();\n String DocumentName = createRequest.getDocumentName();\n String owner = createRequest.getUserName();\n\n // case: clash in register\n if (controlServer.containsDocumentKey(DocumentName)) {\n response.setId(Message.INVALID_DOCNAME);\n }\n\n // case: no clash in register\n else{\n DocumentData data = new DocumentData(DocumentName,owner,SectionNumbers);\n Document nuovoDocumento = new Document(data);\n\n // insert document into register\n controlServer.addDocument(DocumentName,nuovoDocumento);\n\n // update relative userData\n UserData toMod = controlServer.getUserData(owner);\n toMod.addDocument(DocumentName);\n controlServer.replaceUser(owner,toMod);\n\n // sends response to client\n response.setUserData(new UserData(toMod));\n response.setDocumentName(DocumentName);\n response.setSectionNumbers(SectionNumbers);\n response.setId(Message.UPDATE_UD);\n }\n return response;\n }", "@Override\n\t\tprotected String doInBackground(String... params) {\n\t\t\tString httpResponse = null;\n\t\t\tif (params[0].equals(\"invite\")) {\n\t\t\t\trequest_type = 1;\n\t\t\t\thttpResponse = HttpConnectionUtils.createExistRelationResponse(params[1], params[2], params[3],\n\t\t\t\t\t\tparams[4], params[5], activity.getResources().getString(R.string.hostname)\n\t\t\t\t\t\t\t\t+ activity.getResources().getString(R.string.url_invite_user));\n\t\t\t}\n\t\t\tif (params[0].equals(\"recommend\")) {\n\t\t\t\trequest_type = 2;\n\t\t\t\thttpResponse = HttpConnectionUtils.createOthersRelationResponse(params[1], params[2], params[3],\n\t\t\t\t\t\tparams[4], params[5], params[6], activity.getResources().getString(R.string.hostname)\n\t\t\t\t\t\t\t\t+ activity.getResources().getString(R.string.url_invite_user));\n\t\t\t}\n\t\t\treturn httpResponse;\n\t\t}", "UserGroup createGroup(String companyId, String name);", "CreateResponse create(@NonNull CreateRequest request);", "@PutMapping(value=\"/chat/{id}/{userName}/{sentence}\")\n\t\tpublic ResponseEntity<Chat> newChat (@PathVariable long id, @PathVariable String userName, @PathVariable String sentence) {\n\t\t\tif(lobbies.get(id)!=null) {\n\t\t\t\tif(lobbies.get(id).getUser1()!=null) {\n\t\t\t\t\tif(lobbies.get(id).getUser1().getUserName().equals(userName)) {\n\t\t\t\t\t\t//Añadir el chat al lobby que se solicita\n\t\t\t\t\t\tChat chat = new Chat(sentence,userName);\n\t\t\t\t\t\tif(lobbies.get(id).getMummy().equals(userName)) {\n\t\t\t\t\t\t\tchat.setCharacter(\"Mummy\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(lobbies.get(id).getPharaoh().equals(userName)) {\n\t\t\t\t\t\t\tchat.setCharacter(\"Pharaoh\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlobbies.get(id).addChat(chat);\n\t\t\t\t\t\n\t\t\t\t\treturn new ResponseEntity<>(chat, HttpStatus.OK);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(lobbies.get(id).getUser2()!=null) {\n\t\t\t\t\tif(lobbies.get(id).getUser2().getUserName().equals(userName)) {\n\t\t\t\t\t\t//Añadir el chat al lobby que se solicita\n\t\t\t\t\t\tChat chat = new Chat(sentence,userName);\n\t\t\t\t\t\tif(lobbies.get(id).getMummy().equals(userName)) {\n\t\t\t\t\t\t\tchat.setCharacter(\"Mummy\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(lobbies.get(id).getPharaoh().equals(userName)) {\n\t\t\t\t\t\t\tchat.setCharacter(\"Pharaoh\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlobbies.get(id).addChat(chat);\n\t\t\t\t\t\n\t\t\t\t\treturn new ResponseEntity<>(chat, HttpStatus.OK);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t\t}else {\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t\t}\n\t\t}", "@SuppressWarnings(\"rawtypes\")\n private com.squareup.okhttp.Call memberCreateMemberFeeValidateBeforeCall(String number, DkCloudDataModelMembersFee fee, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {\n if (number == null) {\n throw new ApiException(\"Missing the required parameter 'number' when calling memberCreateMemberFee(Async)\");\n }\n \n // verify the required parameter 'fee' is set\n if (fee == null) {\n throw new ApiException(\"Missing the required parameter 'fee' when calling memberCreateMemberFee(Async)\");\n }\n \n\n com.squareup.okhttp.Call call = memberCreateMemberFeeCall(number, fee, progressListener, progressRequestListener);\n return call;\n\n }", "@Test\n @SuppressWarnings({\"PMD.JUnitTestsShouldIncludeAssert\"})\n public void testCreateRoomOkResponse() {\n // given\n final CreateRoomRequest createRoomRequest = CreateRoomRequest.builder().name(TEST_ROOM).build();\n given(clientResponseProvider.sendPostRequest(\n MultiUserChatConstants.MULTI_USER_CHAT_CREATE_ROOM_COMMAND, createRoomRequest))\n .willReturn(OK_RESPONSE);\n\n // when\n multiUserChatService.createRoom(TEST_ROOM);\n\n // then\n\n }", "private AsyncFuture<Void> createMembersNode(final String memberId) {\n return bind(op -> op\n .create()\n .creatingParentContainersIfNeeded()\n .withMode(CreateMode.EPHEMERAL)::inBackground,\n op -> op.forPath(MEMBERS + \"/\" + memberId, EMPTY_BYTES)).directTransform(event -> null);\n }", "@Override\n\tpublic int insertCommunity(JSONObject params) {\n\t\tint result = -1;\n\t\tString communityId = UUIDUtil.getUUID();\n\t\tparams.put(\"communityId\", communityId);\n\t\tJSONObject isExistJSON = this.selectOne(\"selectCommunityNameExist\", params);\n\t\tif(isExistJSON.getIntValue(\"isExist\") !=0){\n\t\t\tresult = -2;\n\t\t\treturn result;\n\t\t}\n\t\tresult = this.insert(\"insertCommunity\", params);\n\t\tif(params.getJSONArray(\"members\")!=null&&params.getJSONArray(\"members\").size()!=0){\n\t\t\tresult = this.insert(\"insertCommunityMember\",params);\n\t\t}\n\t\treturn result;\n\t}", "void create(SportActivity activity);", "public com.vh.locker.ejb.Contact create(java.lang.Long id, java.lang.String name, java.lang.String nickName, java.lang.String phone, java.lang.String email, com.vh.locker.ejb.User anUser) throws javax.ejb.CreateException;", "Community createCommunity( String name, byte[] user_short_pid ) \r\n throws CommunityException;", "public PresenceActivity createPresenceActivity(PresenceActivity.Type acttype, String description);", "@Override\n @POST\n @Path(\"/networks\")\n public Response createNetwork() throws Exception {\n URI resourceUri = new URI(\"/1\");\n return Response.created(resourceUri).build();\n }", "@Override\n public void onStartConversationSuccessful(StartConversation startConversation) {\n\n FragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n chatFragment = new ChatFragment();\n Bundle bundle = new Bundle();\n bundle.putString(\"id\", startConversation.getConversationId());\n bundle.putString(\"token\", startConversation.getToken());\n chatFragment.setArguments(bundle);\n ft.add(R.id.fl_chatlist, chatFragment);\n ft.commit();\n }", "public boolean createGroup(String groupName) {\r\n \t\tboolean result = this.dataLayer.addGroup(groupName);\r\n \r\n \t\t// if succesfuly created on dataLayer, then add into GroupList\r\n \t\tif (result)\r\n \t\t\tthis.groupList.addGroup(groupName);\r\n \r\n \t\treturn result;\r\n \t}", "public void createTeam(){\n\n if(!(validation())){\n return;\n }\n\n final ProgressDialog progressDialog = new ProgressDialog(getActivity());\n progressDialog.setMessage(\"Loading...\");\n progressDialog.show();\n\n RequestQueue requestQueue = Volley.newRequestQueue(getActivity());\n StringRequest stringRequest = new StringRequest(Request.Method.POST, \"http://192.169.138.14:4000/api/teams/create\", new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n Log.v(\"qwe\", response);\n progressDialog.dismiss();\n Gson gson = new Gson();\n TeamSucessWithId sucessResponse = gson.fromJson(response, TeamSucessWithId.class);\n String _message = sucessResponse.getMessage();\n int _status = sucessResponse.getStatus();\n int teamId = sucessResponse.getTeamId();\n //Toast.makeText(getActivity(), _status+\": \"+_message+\" \"+teamId, Toast.LENGTH_LONG).show();\n if(_status == 200){\n Toast.makeText(getActivity(), _status+\": \"+_message+\" \", Toast.LENGTH_LONG).show();\n Prefs.putString(getActivity(), Prefs.TEAM_LOGO, logoBitmap);\n Prefs.putString(getActivity(), Prefs.HOME_SHIRT, homeImgBitmap);\n Prefs.putString(getActivity(), Prefs.AWAY_SHIRT, awayShirtBitmap);\n Prefs.putString(getActivity(), Prefs.TEAM_NAME, teamName.getText().toString());\n Prefs.putString(getActivity(), Prefs.COACH, coachName.getText().toString());\n Prefs.putString(getActivity(), Prefs.COLOR, currentColor+\"\");\n Prefs.putString(getActivity(), Prefs.CITY_ID, mCity_Id+\"\");\n Prefs.putString(getActivity(), Prefs.FIELD_ID, \"\"+mField_Id);\n Prefs.putString(getActivity(), Prefs.TEAM_ID, teamId+\"\");\n startActivity(new Intent(getActivity(), InvitePlayerActivity.class));\n }else {\n\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.dismiss();\n Log.v(\"wsx\", \"======== \"+error+\"\");\n Toast.makeText(getActivity(), \"Unable to connect...\", Toast.LENGTH_LONG).show();\n }\n }){\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<>();\n headers.put(\"x-access-key\", Globels.ACCESS_KEY);\n headers.put(\"x-access-token\", Prefs.getString(getActivity(), Prefs.auth_key));\n headers.put(\"locale\", Globels.LOCAL);\n headers.put(\"Content-Type\", Globels.CONTENT_TYPE);\n return headers;\n }\n\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<>();\n //EditText teamName, colorName, coachName, groundName, teamCity;ss\n\n Log.v(\"kkk\", \"city====\"+mCity_Id);\n Log.v(\"jjj\", \"Field====\"+mField_Id);\n\n params.put(\"team_name\", teamName.getText().toString());\n params.put(\"color\", currentColor+\"\");\n params.put(\"coach\", coachName.getText().toString());\n// params.put(\"team_name\", \"dsfs\");\n// params.put(\"color\", \"\"+currentColor);\n// params.put(\"coach\", \"dsfs\");\n params.put(\"city\", \"\"+mCity_Id);\n params.put(\"shirt_home\", homeImgBitmap);\n params.put(\"shirt_away\", awayShirtBitmap);\n params.put(\"logo\", logoBitmap);\n params.put(\"found_date\", \"2017-05-15\");\n params.put(\"country\", \"1\");\n params.put(\"avg_age\", \"\");\n params.put(\"city_flexible\", \"0\");\n params.put(\"field_flexible\", \"0\");\n params.put(\"field_id\", \"\"+mField_Id);\n return params;\n }\n };;\n\n requestQueue.add(stringRequest);\n }", "Optional<PhoneCall> push(CreatePhoneCallRequest request);", "@ServiceMethod(returns = ReturnType.SINGLE)\n public Mono<CommunicationRoom> createRoom(CreateRoomOptions createRoomOptions) {\n return createRoom(createRoomOptions, null);\n }" ]
[ "0.5734503", "0.5580566", "0.5498081", "0.52259505", "0.51821005", "0.5124526", "0.5054708", "0.5053014", "0.500631", "0.49664152", "0.48231405", "0.48172912", "0.48057568", "0.4787018", "0.47868937", "0.47827163", "0.47720692", "0.47680813", "0.47297543", "0.4711724", "0.47086576", "0.46846396", "0.46769336", "0.4670669", "0.46627808", "0.46605933", "0.4632496", "0.4600618", "0.4586964", "0.45784932", "0.4570519", "0.45684558", "0.45599747", "0.45283282", "0.45113757", "0.45013186", "0.44943503", "0.4453091", "0.4452943", "0.44504508", "0.4450218", "0.44439587", "0.4438228", "0.4435388", "0.44278824", "0.44262534", "0.44173583", "0.4416303", "0.44083366", "0.440708", "0.44031963", "0.44025636", "0.43998587", "0.43980247", "0.43923235", "0.43777272", "0.4372446", "0.43483907", "0.4346454", "0.43447828", "0.43421754", "0.43420032", "0.4340297", "0.4340114", "0.43381837", "0.4337434", "0.4333264", "0.4326966", "0.43253797", "0.4324472", "0.4323612", "0.4315249", "0.42994335", "0.42859986", "0.4282334", "0.42803556", "0.42782822", "0.42657423", "0.4264341", "0.42633146", "0.4263095", "0.42543706", "0.42460698", "0.42402792", "0.42363653", "0.4229073", "0.42267358", "0.4218139", "0.4214335", "0.4213838", "0.4212139", "0.42116407", "0.4208213", "0.41981667", "0.41976357", "0.4197199", "0.41967508", "0.4184531", "0.4179321", "0.41718733" ]
0.5594037
1
navigating to monthly grid
public void getXpathFromGrid(){ System.out.println("Monthly"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n currentCalendar.add(Calendar.MONTH, 1);\n //drawMonth(workingDays);\n //drawMonth(workingDays, holidays);\n Log.i(\"***********\", \"DrawMonth called on nextmonth\");\n drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);\n }", "@Override\n public void onMonthScroll(float positionOffset) {\n }", "private void setDataCurrentMonth() {\r\n\t\tguiControl.sendToServer(new ClientMessage(ClientMessageType.INCOME_REPORT, reportDate));\r\n\t\tMap<Integer, VisitorReport> parkReportMap = (Map<Integer, VisitorReport>) guiControl.getServerMsg()\r\n\t\t\t\t.getMessage();\r\n\t\tXYChart.Series<String, Integer> price = new XYChart.Series<>();\r\n\t\tint total_price = 0;\r\n\t\tint i = 1;\r\n\t\tfor (VisitorReport vr : parkReportMap.values()) {\r\n\t\t\tprice.getData().add(new XYChart.Data<>(String.valueOf(i), new Integer(vr.getPrice())));\r\n\t\t\ti++;\r\n\t\t\ttotal_price = total_price + vr.getPrice();\r\n\t\t}\r\n\t\tlineChar.getData().add(price);\r\n\t\tString totalP = String.valueOf(total_price);\r\n\t\ttotal.setText(totalP + \" \" + \"NIS\");\r\n\r\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tcalendar.moveNextMonth();\n\t\t\t\tdisplayCalendar();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tgetLayouts();\n\n\t\t\t\tCalendar next = (Calendar) calendar.clone();\n\n\t\t\t\tif (currentMonth > 11) {\n\t\t\t\t\tcurrentMonth = 1;\n\t\t\t\t\tcurrentYear++;\n\t\t\t\t} else {\n\t\t\t\t\tcurrentMonth++;\n\t\t\t\t}\n\n\t\t\t\tnext.set(Calendar.MONTH, currentMonth);\n\t\t\t\tnext.set(Calendar.YEAR, currentYear);\n\t\t\t\tnext.set(Calendar.DATE, 1);\n\n\t\t\t\tpositionNext = next.getTime().toString().split(\" \");\n\t\t\t\tgetCalendar(\n\t\t\t\t\t\tReturnCalendarDetails.getCurrentMonth(positionNext[1]),\n\t\t\t\t\t\tReturnCalendarDetails.getPosition(positionNext[0]),\n\t\t\t\t\t\tInteger.parseInt(positionNext[5]));\n\t\t\t}", "@SuppressLint(\"NewApi\")\n @Override\n public boolean performAccessibilityAction(int action, Bundle arguments) {\n if (action != AccessibilityNodeInfo.ACTION_SCROLL_FORWARD &&\n action != AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD) {\n return super.performAccessibilityAction(action, arguments);\n }\n // Figure out what month is showing.\n int firstVisiblePosition = getFirstVisiblePosition();\n int minMonth = mController.getStartDate().get(Calendar.MONTH);\n int month = (firstVisiblePosition + minMonth) % MonthAdapter.MONTHS_IN_YEAR;\n int year = (firstVisiblePosition + minMonth) / MonthAdapter.MONTHS_IN_YEAR + mController.getMinYear();\n MonthAdapter.CalendarDay day = new MonthAdapter.CalendarDay(year, month, 1);\n\n // Scroll either forward or backward one month.\n if (action == AccessibilityNodeInfo.ACTION_SCROLL_FORWARD) {\n day.month++;\n if (day.month == 12) {\n day.month = 0;\n day.year++;\n }\n } else if (action == AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD) {\n View firstVisibleView = getChildAt(0);\n // If the view is fully visible, jump one month back. Otherwise, we'll just jump\n // to the first day of first visible month.\n if (firstVisibleView != null && firstVisibleView.getTop() >= -1) {\n // There's an off-by-one somewhere, so the top of the first visible item will\n // actually be -1 when it's at the exact top.\n day.month--;\n if (day.month == -1) {\n day.month = 11;\n day.year--;\n }\n }\n }\n\n // Go to that month.\n Utils.tryAccessibilityAnnounce(this, getMonthAndYearString(day, mController.getLocale()));\n goTo(day, true, false, true);\n return true;\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tmView.nextMonth();\n\t\t\t\tc.add(Calendar.MONTH, 1);\n\t\t\t\tmonthlyview_month.setText(DateFormat.format(\"d MMMM yyyy\", c));\n\n\t\t\t}", "@Override\n public void onMonthScroll(Date firstDayOfNewMonth) {\n Title.setText(dateFormatForMonth.format(firstDayOfNewMonth));\n getMonthEvent();\n System.out.println(\"ini ganti bulan \"+dateFormatForMonth.format(firstDayOfNewMonth));\n\n }", "private void jumpMonth() {\n\t\tJFrame frame = new JFrame(\"Enter Date\");\n\t\tContainer content = frame.getContentPane();\n\t\tcontent.setLayout(new BorderLayout());\n\t\tframe.setSize(new Dimension(270, 105));\n\t\t\n\t\tJLabel prompt = new JLabel(\"Please enter the target date MM/YYYY\");\n\t\tcontent.add(prompt, BorderLayout.NORTH);\n\t\t\n\t\tTextField input = new TextField(15);\n\t\tcontent.add(input, BorderLayout.CENTER);\n\t\t\n\t\tJButton submit = new JButton(\"OK\");\n\t\tsubmit.addActionListener(e -> {\n\t\t\tString[] strDate = input.getText().split(\"/\");\n\t\t\tDriver.getApp().getMView()\n\t\t\t.jumpToMonth(Integer.parseInt(strDate[0])-1, Integer.parseInt(strDate[1]));\n\t\t\tframe.setVisible(false);\n\t\t});\n\t\tcontent.add(submit, BorderLayout.SOUTH);\n\t\t\n\t\tframe.setVisible(true);\n\t}", "public void initMonthLayout(){\n monthCheckQueue = new LinkedList<>();\n nextMonth = new LinkedList<>();\n monthCount = 0;\n monthCheckQueue.add(MONTH_FLAG+3);\n monthCheckQueue.add(MONTH_FLAG);\n monthCheckQueue.add(MONTH_FLAG);\n nextMonth.add(cMonth);\n nextMonth.add(cMonth-1);\n nextMonth.add(cMonth+1);\n }", "public abstract void monthlyProcess();", "private void monthFormat() {\n\t\ttry {\n\t\t\tString currentMonth = monthFormat.format(new Date()); //Get current month\n\t\t\tstartDate = monthFormat.parse(currentMonth); //Parse to first of the month\n\t\t\tString[] splitCurrent = currentMonth.split(\"-\");\n\t\t\tint month = Integer.parseInt(splitCurrent[0]) + 1; //Increase the month\n\t\t\tif (month == 13) { //If moving to next year\n\t\t\t\tint year = Integer.parseInt(splitCurrent[1]) + 1;\n\t\t\t\tendDate = monthFormat.parse(\"01-\" + year);\n\t\t\t} else {\n\t\t\t\tendDate = monthFormat.parse(month + \"-\" + splitCurrent[1]);\n\t\t\t}\n\t\t\t//Create SQL times\n\t\t\tstartDateSQL = new java.sql.Date(startDate.getTime());\n\t\t\tendDateSQL = new java.sql.Date(endDate.getTime());\n\t\t\tmonthString = new SimpleDateFormat(\"MMMM\").format(startDate);\n\t\t} catch (ParseException e) {\n\t\t\t_.log(Level.SEVERE, GameMode.Sonic, \"Failed to parse dates. Monthly leaderboard disabled.\");\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tmView.previousMonth();\n\t\t\t\tc.add(Calendar.MONTH, -1);\n\t\t\t\tmonthlyview_month.setText(DateFormat.format(\"d MMMM yyyy\", c));\n\t\t\t\t\t}", "@Override\n public void onClick() {\n showMonthViewWithBelowEvents();\n }", "public void populateCalendar(YearMonth yearMonth) {\n LocalDate calendarDate = LocalDate.of(yearMonth.getYear(), yearMonth.getMonthValue(), 1);\n // Dial back the day until it is SUNDAY (unless the month starts on a sunday)\n while (!calendarDate.getDayOfWeek().toString().equals(\"MONDAY\")) {\n calendarDate = calendarDate.minusDays(1);\n }\n // Populate the calendar with day numbers\n for (AnchorPaneNode ap : allCalendarDays) {\n if (ap.getChildren().size() != 0) {\n ap.getChildren().remove(0);\n }\n LocalDate date = calendarDate;\n Text dayText = new Text(String.valueOf(date.getDayOfMonth()));\n ap.setDate(calendarDate);\n AnchorPane.setTopAnchor(dayText, 5.0);\n AnchorPane.setLeftAnchor(dayText, 5.0);\n ap.getChildren().add(dayText);\n MyNotes myNotes = Main.getRepository().getByDate(date);\n if (myNotes.getCountNotes() > 0) {\n Text notes = new Text(String.valueOf(myNotes.getCountNotes()));\n notes.setFill(Color.GREEN);\n AnchorPane.setTopAnchor(notes, 35.0);\n AnchorPane.setLeftAnchor(notes, 35.0);\n ap.getChildren().add(notes);\n }\n calendarDate = calendarDate.plusDays(1);\n }\n // Change the title of the calendar\n calendarTitle.setText(\" \" + Transcription.getMonth(yearMonth) + \" \" + yearMonth.getYear() + \" \");\n }", "private void loadCalendarLabels(){\n int year = Model.getInstance().viewing_year;\n int month = Model.getInstance().viewing_month;\n \n // Note: Java's Gregorian Calendar class gives us the right\n // \"first day of the month\" for a given calendar & month\n // This accounts for Leap Year\n GregorianCalendar gc = new GregorianCalendar(year, month, 1);\n int firstDay = gc.get(Calendar.DAY_OF_WEEK);\n int daysInMonth = gc.getActualMaximum(Calendar.DAY_OF_MONTH);\n \n // We are \"offsetting\" our start depending on what the\n // first day of the month is.\n // For example: Sunday start, Monday start, Wednesday start.. etc\n int offset = firstDay;\n int gridCount = 1;\n int lblCount = 1;\n \n // Go through calendar grid\n for(Node node : calendarGrid.getChildren()){\n \n VBox day = (VBox) node;\n \n day.getChildren().clear();\n day.setStyle(\"-fx-backgroud-color: white\");\n day.setStyle(\"-fx-font: 14px \\\"System\\\" \");\n \n // Start placing labels on the first day for the month\n if (gridCount < offset) {\n gridCount++;\n // Darken color of the offset days\n day.setStyle(\"-fx-background-color: #E9F2F5\"); \n } else {\n \n // Don't place a label if we've reached maximum label for the month\n if (lblCount > daysInMonth) {\n // Instead, darken day color\n day.setStyle(\"-fx-background-color: #E9F2F5\"); \n } else {\n \n // Make a new day label \n Label lbl = new Label(Integer.toString(lblCount));\n lbl.setPadding(new Insets(5));\n lbl.setStyle(\"-fx-text-fill:darkslategray\");\n\n day.getChildren().add(lbl);\n }\n \n lblCount++; \n }\n }\n }", "@Override\n\tpublic void OnBillToActivity() {\n\t\toverViewNavigationListAdapter\n\t\t\t\t.setSubTitle(turnToDate(this.selectedMonth));\n\t\toverViewNavigationListAdapter.notifyDataSetChanged();\n\t\t\n\t\tif (billsFragmentMonth != null) {\n\t\t\tOnActivityToBillListener onActivityToBillListener = (OnActivityToBillListener) (billsFragmentMonth);\n\t\t\tonActivityToBillListener.OnActivityToBill();\n\t\t}\n\t\t\n\n\t}", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n Log.i(\"*********\", \"Here the adapter be created and set\");\n //CalendarAdapter adapter = new CalendarAdapter(getApplicationContext(), drawMonth2(), workingDays, holidays, requestedHolidays, generalCalendar);\n //calendarGrid.setAdapter(adapter);\n drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);//problably will need to add to workingDays the dates read from the database\n\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tcalendar.movePrevMonth();\n\t\t\t\tdisplayCalendar();\n\t\t\t}", "public void getXpathFromGrid(){\n\t\tSystem.out.println(\"Weekly\");\n\t}", "protected void setMonthDisplayed(MonthAdapter.CalendarDay date) {\n mCurrentMonthDisplayed = date.month;\n }", "public void updateView() {\n// LocalDate startDate = LocalDate.of(2017, Month.SEPTEMBER, 1);\n// LocalDate endDate = LocalDate.of(2017, Month.SEPTEMBER, 6);\n// getRecords(startDate, endDate);\n }", "private void setMonthSelection() {\n int displayMonth = getIntent().getIntExtra(\"month\", -1);\n if (displayMonth == -1) {\n Calendar cal = Calendar.getInstance();\n selectMonth.setSelection(cal.get(Calendar.MONTH) + 1);\n } else {\n selectMonth.setSelection(displayMonth);\n }\n }", "public void generateMonth(int year,int month,Graphics g, int offsetX,int offsetY) throws Exception\n {\n int m = month-1;\n //set calendar to get day of week\n Calendar calendar = Calendar.getInstance();\n calendar.set(year,m,1);\n\n int days = months[m];\n if (m==1 && year % 4 == 0)\n days = 29;\n int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK)-1;\n\n int weeks = (int)Math.ceil((days+dayOfWeek)/7.0);\n BufferedImage baseImage = getImageFromFile(basePath+\"/calendar\"+Integer.toString(weeks)+\"Row.png\");\n\n g.drawImage(baseImage, offsetX+mTagWidth, offsetY,null);\n\n BufferedImage baseMonthImage = getImageFromFile(baseMonthPath);\n\n int sx1 = 0;\n int sy1 = mTagHeight*m;\n int sx2 = mTagWidth;\n int sy2 = sy1 + mTagHeight;\n g.drawImage(baseMonthImage, offsetX, offsetY, offsetX+mTagWidth,offsetY+mTagHeight,sx1,sy1,sx2,sy2,null);\n\n //draw date\n drawDate(g,days,dayOfWeek, offsetX, offsetY);\n }", "private void updateMonthMenu() {\r\n String[] months = getDateFormatSymbols().getMonths();\r\n monthMenu.removeAll();\r\n for (int i = 0; i < months.length; i++) {\r\n JMenuItem x = new JMenuItem(months[i]);\r\n x.addActionListener(new DateActionListener(Calendar.MONTH, i));\r\n monthMenu.add(x);\r\n }\r\n if (monthControl != null) {\r\n updateControlsFromTable();\r\n }\r\n }", "private void buildMonthly(int year, int month, int numdays, int dataIndex, Bundle bundle) {\n\n double[] raw_xdata = new double[numdays + 2];\n double[] raw_ydata1 = new double[numdays + 2];\n double[] raw_ydata2 = new double[numdays + 2];\n double[] raw_ydata3 = null;\n if (dataIndex == Constants.DATA_MONTHLY_TEMPERATURE) {\n raw_ydata3 = new double[numdays + 2];\n Arrays.fill(raw_ydata1, Constants.DATA_INVALID);\n Arrays.fill(raw_ydata2, Constants.DATA_INVALID);\n Arrays.fill(raw_ydata3, Constants.DATA_INVALID);\n }\n\n // set the first y1 and y2 values\n int xstart = bundle.getInt(\"xorigin1\", 0);\n raw_xdata[0] = xstart;\n\n // set the y1 and y2 values for the month\n for (int i = 1; i < numdays + 1; i++) {\n raw_xdata[i] = i;\n String filename = UtilsMisc.getDecimalFormat(year, 4) + \"-\" +\n UtilsMisc.getDecimalFormat(month + 1, 2) + \"-\" +\n UtilsMisc.getDecimalFormat(i, 2);\n if (summaryDB.isInSummaryTable(context, filename)) {\n int log_id = summaryDB.getMonitorID(context, filename);\n SummaryProvider.Summary summary = summaryDB.getSummary(context, log_id);\n switch (dataIndex) {\n case Constants.DATA_PEAKWATTS:\n raw_ydata1[i] = summary.getPeak_watts();\n raw_ydata2[i] = summary.getGenerated_watts();\n break;\n case Constants.DATA_PEAKTIME:\n long midnight = UtilsDate.get_midNightTimestamp(summary.getStart_time(), lat, lon);\n raw_ydata1[i] = UtilsDate.getTimeSeconds(summary.getPeak_time() - midnight);\n raw_ydata2[i] = summary.getGenerated_watts();\n break;\n case Constants.DATA_SUNLIGHT:\n raw_ydata1[i] = UtilsDate.getTimeSeconds(summary.getEnd_time() - summary.getStart_time());\n raw_ydata2[i] = summary.getGenerated_watts();\n break;\n case Constants.DATA_READINGS:\n raw_ydata1[i] = summaryDB.getDetailCount(context, log_id);\n raw_ydata2[i] = summary.getGenerated_watts();\n break;\n case Constants.DATA_MONTHLY_TEMPERATURE:\n raw_ydata1[i] = summary.getMinTemperature();\n raw_ydata2[i] = summary.getMaxTemperature();\n raw_ydata3[i] = summary.getGenerated_watts();\n break;\n case Constants.DATA_MONTHLY_CLOUDS:\n raw_ydata1[i] = summary.getAvgClouds();\n raw_ydata2[i] = summary.getGenerated_watts();\n break;\n default:\n break;\n }\n } else {\n if (dataIndex != Constants.DATA_MONTHLY_TEMPERATURE) {\n raw_ydata1[i] = 0.0;\n raw_ydata2[i] = 0.0;\n }\n }\n }\n\n // set the first and last y1 and y2 values\n int xend = numdays;\n raw_xdata[numdays+1] = xend + 1;\n switch (dataIndex) {\n case Constants.DATA_PEAKWATTS :\n raw_ydata1[numdays+1] = raw_ydata1[numdays]; raw_ydata2[numdays+1] = raw_ydata2[numdays];\n raw_ydata1[0] = raw_ydata1[1]; raw_ydata2[0] = raw_ydata2[1]; break;\n case Constants.DATA_PEAKTIME :\n raw_ydata1[numdays+1] = raw_ydata1[numdays]; raw_ydata2[numdays+1] = raw_ydata2[numdays];\n raw_ydata1[0] = raw_ydata1[1]; raw_ydata2[0] = raw_ydata2[1]; break;\n case Constants.DATA_SUNLIGHT :\n raw_ydata1[numdays+1] = raw_ydata1[numdays]; raw_ydata2[numdays+1] = raw_ydata2[numdays];\n raw_ydata1[0] = raw_ydata1[1]; raw_ydata2[0] = raw_ydata2[1]; break;\n case Constants.DATA_READINGS :\n raw_ydata1[numdays+1] = raw_ydata1[numdays]; raw_ydata2[numdays+1] = raw_ydata2[numdays];\n raw_ydata1[0] = raw_ydata1[1]; raw_ydata2[0] = raw_ydata2[1]; break;\n case Constants.DATA_MONTHLY_CLOUDS :\n raw_ydata1[numdays+1] = raw_ydata1[numdays]; raw_ydata2[numdays+1] = raw_ydata2[numdays];\n raw_ydata1[0] = raw_ydata1[1]; raw_ydata2[0] = raw_ydata2[1]; break;\n case Constants.DATA_MONTHLY_TEMPERATURE :\n Number[] numbers = UtilsMisc.toNumber(raw_ydata1, -273); // convert from kelvin to centigrade\n numbers = UtilsMisc.fix_end_numbers(numbers, true);\n numbers = UtilsMisc.fix_mid_numbers(numbers);\n raw_ydata1 = UtilsMisc.toDouble(numbers);\n\n numbers = UtilsMisc.toNumber(raw_ydata2, -273);\n numbers = UtilsMisc.fix_end_numbers(numbers, true);\n numbers = UtilsMisc.fix_mid_numbers(numbers);\n raw_ydata2 = UtilsMisc.toDouble(numbers);\n\n numbers = UtilsMisc.toNumber(raw_ydata3);\n numbers = UtilsMisc.fix_end_numbers(numbers, true);\n numbers = UtilsMisc.fix_mid_numbers(numbers);\n raw_ydata3 = UtilsMisc.toDouble(numbers);\n default :\n break;\n }\n\n LinearInterpolation lp1 = new LinearInterpolation(raw_xdata, raw_ydata1);\n LinearInterpolation lp2 = new LinearInterpolation(raw_xdata, raw_ydata2);\n LinearInterpolation lp3 = (raw_ydata3 != null)? new LinearInterpolation(raw_xdata, raw_ydata3): null;\n int time = xstart;\n ArrayList<Integer> xList = new ArrayList<>();\n ArrayList<Float> yList1 = new ArrayList<>();\n ArrayList<Float> yList2 = new ArrayList<>();\n ArrayList<Float> yList3 = new ArrayList<>();\n while (time < (xend+1)) {\n xList.add(time);\n yList1.add((float) lp1.interpolate(time));\n yList2.add((float) lp2.interpolate(time));\n if (lp3 != null)\n yList3.add((float) lp3.interpolate(time));\n time += 1;\n }\n\n int[] xdata = Ints.toArray(xList);\n float[] ydata1 = Floats.toArray(yList1);\n float[] ydata2 = Floats.toArray(yList2);\n float[] ydata3 = Floats.toArray(yList3);\n bundle.putIntArray(\"xdata1\", xdata);\n bundle.putIntArray(\"xdata2\", xdata);\n bundle.putIntArray(\"xdata3\", xdata);\n bundle.putFloatArray(\"ydata1\", ydata1);\n bundle.putFloatArray(\"ydata2\", ydata2);\n bundle.putFloatArray(\"ydata3\", ydata3.length > 0? ydata3: null);\n\n switch (dataIndex) {\n case Constants.DATA_MONTHLY_TEMPERATURE:\n smooth_plot(bundle, true, \"1\");\n smooth_plot(bundle, true, \"2\");\n break;\n case Constants.DATA_MONTHLY_CLOUDS:\n smooth_plot(bundle, true, \"1\");\n break;\n }\n\n }", "public void buildMonth()\r\n {\r\n int i=0,k=0;\r\n date=LocalDate.of(year,month,1);\r\n String st;\r\n for(int j=0;date.getMonthValue()==month;j++)\r\n {\r\n\r\n if(date.getDayOfWeek().name()==\"SUNDAY\"){k=0;i++;}\r\n else if(date.getDayOfWeek().name()==\"MONDAY\"){k=1;}\r\n else if(date.getDayOfWeek().name()==\"TUESDAY\"){k=2;}\r\n else if(date.getDayOfWeek().name()==\"WEDNESDAY\"){k=3;}\r\n else if(date.getDayOfWeek().name()==\"THURSDAY\"){k=4;}\r\n else if(date.getDayOfWeek().name()==\"FRIDAY\"){k=5;}\r\n else if(date.getDayOfWeek().name()==\"SATURDAY\"){k=6;}\r\n st=String.valueOf(date.getDayOfMonth());\r\n cmdDate=new JButton(st);\r\n cmdDate.setBounds(xpos+k*110,ypos+i*50,100,50);\r\n this.cmdDate.addActionListener(new DayListner());\r\n panel.add(cmdDate);\r\n date = date.plusDays(1);\r\n }\r\n\r\n }", "@Override\n public boolean onLongClick(View v) {\n controller.setView(ViewType.Month);\n controller.getTabHost().setCurrentTab(controller.getViewInt());\n return false;\n }", "void updateMonthAndData(int i) {\n c.getFirstDayOfWeek();\n //compute change in month and year. Note we are operating on the calendar range of 0-11\n month = month + i;\n if (month < 0) {\n year--;\n month = 11;\n } else if (month > 11) {\n year++;\n month = 0;\n }\n //set the new date in calendar\n c.set(Calendar.YEAR, year);\n c.set(Calendar.MONTH, month);\n monthName = c.getDisplayName(Calendar.MONTH, Calendar.LONG, Locale.getDefault());\n daysInMonth = c.getActualMaximum(Calendar.DAY_OF_MONTH);\n dayOfWeek = c.get(Calendar.DAY_OF_WEEK_IN_MONTH);\n\n //notify the adapter of new date. This will also change the selected date in the grid part\n //and pull new data if necessary.\n calendarAdapter.update(year, month);\n //this is fact also passes the calendarAdapter new list of days with events\n // and calls notifyDataSetChanged on it!\n listEvents.update(year, month);\n //so that events are displayed for the first day of month or, if the month is the current one,\n //for \"today\"\n listEvents.setmSelectedDayOfMonth(calendarAdapter.getDayNumber(calendarAdapter.getCurrentlySelected()));\n //ask listEvents to redraw. Note that calendarAdapter already did that when we updated listEvents!\n listEvents.notifyDataSetChanged();\n //set the proper name of month at the header of the calendar\n ((TextView) ((RelativeLayout) (((RelativeLayout) rootView).getChildAt(0))).getChildAt(1)).setText(monthName);\n }", "public void setSMonth(int m)\n\t{\n\t\tsmonth = getMonthAdapter().getPosition(Integer.toString(m));\n\t}", "public void updateGridX();", "@Override\n\t/**\n\t * Defines the look of the day view grid (the division of hours and events throughout the day) \n\t * @param c GregorianCalendar holding the year to be drawn\n\t * @param d the data model holding event information \n\t * @param g2 the graphics package\n\t * @param container the container that will rely on this method to define it's look and feel \n\t */\n\tpublic void drawEventGrid(GregorianCalendar c, DataModel d, Graphics2D g2, Component container)\n\t{\n\t\t\t\tLine2D.Double vertLine = new Line2D.Double(60, 0, 60, container.getHeight()); \n\t\t\t\tg2.setColor(Color.LIGHT_GRAY);\n\t\t\t\tg2.draw(vertLine);\n\n\t\t\t\t//Draw the time text\n\t\t\t\tint hour = 1; \n\t\t\t\tString halfOfDay = \"am\"; \n\n\t\t\t\tfor (int i = 0; i<24; i ++)\n\t\t\t\t{\t\n\t\t\t\t\tif (i < 23)\n\t\t\t\t\t{\n\t\t\t\t\t\tg2.setColor(Color.BLACK);\n\t\t\t\t\t\tif (i == 11)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\thalfOfDay = \"pm\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (i == 12)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\thour = 1; \n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tString time = Integer.toString(hour) + halfOfDay; \n\t\t\t\t\t\thour++; \n\t\t\t\t\t\tg2.drawString(time, 20, ( i + 1 )*60);\n\t\t\t\t\t}\n\n\n\t\t\t\t\t//Draw the Lines indicating where hours begin \n\t\t\t\t\tg2.setColor(Color.LIGHT_GRAY);\n\t\t\t\t\tLine2D.Double hourLine = new Line2D.Double(60, i*60, container.getWidth(), i*60); \n\t\t\t\t\tg2.draw(hourLine); \n\n\t\t\t\t}\n\n\t\t\t\t//Get events from the datModel \n\t\t\t\tTreeSet<Event> events = d.getEvents(c.get(Calendar.MONTH) + 1 , c.get(Calendar.DAY_OF_MONTH), c.get(Calendar.YEAR));\n\t\t\t\tif (events.size() != 0)\n\t\t\t\t{\n\t\t\t\t\tfor (Event e : events)\n\t\t\t\t\t{\n\t\t\t\t\t\tg2.setColor(Color.BLUE);\n\t\t\t\t\t\tString eventStart = e.getStartTime(); \n\t\t\t\t\t\tString eventEnd = e.getEndTime(); \n\t\t\t\t\t\tint startHour = Integer.parseInt(eventStart.substring(0,2)); \n\t\t\t\t\t\tint startMin = Integer.parseInt(eventStart.substring(3)); \n\t\t\t\t\t\tint endHour = Integer.parseInt(eventEnd.substring(0,2)); \n\t\t\t\t\t\tint endMin = Integer.parseInt(eventEnd.substring(3)); \n\n\t\t\t\t\t\t//Draw the Rectangle representing the scheduled event \n\t\t\t\t\t\tRectangle2D.Double eventBox = new Rectangle2D.Double(60, ((startHour * 60) + startMin), \n\t\t\t\t\t\t\t\tcontainer.getWidth(), ((endHour * 60) - (startHour * 60) + (endMin - startMin)) ); \n\t\t\t\t\t\tg2.fill(eventBox);\n\n\t\t\t\t\t\t//Draw the event details onto the rectangle\n\t\t\t\t\t\tFontMetrics fm = g2.getFontMetrics(container.getFont()); \n\t\t\t\t\t\tg2.setColor(Color.WHITE);\n\t\t\t\t\t\tg2.drawString( \" \" + e.getName() + \" \" + e.getStartTime() + \" - \" + e.getEndTime(), 60, ((startHour * 60) + startMin + fm.getHeight())); \n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t}", "private void dashboard() {\n\n Timeline timeline = new Timeline(\n new KeyFrame(Duration.seconds(0),\n new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent actionEvent) {\n Calendar time = Calendar.getInstance();\n\n String hourString = POSUtilies.pad(2, ' ', time.get(Calendar.HOUR) == 0 ? \"12\" : time.get(Calendar.HOUR) + \"\");\n String minuteString = POSUtilies.pad(2, '0', time.get(Calendar.MINUTE) + \"\");\n String secondString = POSUtilies.pad(2, '0', time.get(Calendar.SECOND) + \"\");\n String am_pm = POSUtilies.pad(2, '0', time.get(Calendar.AM_PM) + \"\");\n if (am_pm.equalsIgnoreCase(\"00\")) {\n am_pm = \"AM\";\n\n }\n if (am_pm.equalsIgnoreCase(\"01\")) {\n am_pm = \"PM\";\n\n }\n\n lblTime.setText(hourString + \":\" + minuteString + \":\" + secondString + \" \" + am_pm);\n lblDate.setText(d.format(date));\n }\n }\n ),\n new KeyFrame(Duration.seconds(1))\n );\n timeline.setCycleCount(Animation.INDEFINITE);\n timeline.play();\n }", "public static void monthSelect(WebDriver driver, String munth, String dey) {\n\tdriver.findElement(By.id(\"travel_date\")).click();// opens up calender\n\t\n\t\n\t\t\n\t\tString month = driver.findElement(By.cssSelector(\"[class='datepicker-days'] [class='datepicker-switch']\")).getText();\n\t\tSystem.out.println(month);\n\t\t// prints out the first visible month\n\t\t\n\t\t\n\t\twhile(!\tdriver.findElement(By.cssSelector(\"[class='datepicker-days'] [class='datepicker-switch']\")).getText().contains(munth)) {\n\t\t\t\tdriver.findElement(By.cssSelector(\"[class=' table-condensed'] [class='next']\")).click();\n\t\t\t\t// clicks on the next button\n\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\tList <WebElement> dates = driver.findElements(By.cssSelector(\".day\"));\n\t\t//42\n\t\t// select all calenders\n\t\t\n\t\tint count = dates.size();\n\t\t// returns the size as 0\n\t\t\n\t\t\n\t\tfor(int i =0; i<count;i++) {\n\t\t\t//String Day = \"24\";\n\t\t\tString text = driver.findElements(By.cssSelector(\".day\")).get(i).getText();\n\t\t\tSystem.out.println(text);\n\t\t\t\n\t\t\tif(text.equalsIgnoreCase(dey)){\n\t\t\t\tdriver.findElements(By.cssSelector(\".day\")).get(i).click();\n\t\t\t\t// clicks on the 24\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void displayMonths(ArrayList<ArrayList<String>> monthList) {\n ArrayList<String> eventDescriptionList = initializeDescriptionList();\n int maxNumberOfEvents = getMaxNumberOfEvents(monthList);\n monthList = make2DArray(monthList, maxNumberOfEvents);\n displayEvents(eventDescriptionList, monthList, maxNumberOfEvents);\n\n }", "public void showByMonthBtn(ActionEvent event) throws IOException, Exception {\r\n\r\n appointments.clear();\r\n appointments.addAll(Appointment.getAppointmentsByMonth());\r\n\r\n }", "private void newAppointmentGridPane(LocalDateTime start, Duration duration) {\n // style gridPane\n GridPane gridPane = new GridPane();\n gridPane.setHgap(20);\n gridPane.setVgap(15);\n gridPane.setAlignment(Pos.CENTER);\n\n // add nodes\n gridPane.add(customerNameLbl, 0, 0);\n gridPane.add(customerNameTxt, 1, 0);\n gridPane.add(titleLbl, 0, 1);\n gridPane.add(titleTxt, 1, 1);\n gridPane.add(descriptionLbl, 0, 2);\n gridPane.add(descriptionTxt, 1, 2);\n gridPane.add(locationLbl, 0, 3);\n gridPane.add(locationTxt, 1, 3);\n gridPane.add(contactLbl, 0, 4);\n gridPane.add(contactTxt, 1, 4);\n gridPane.add(typeLbl, 0, 5);\n gridPane.add(typeTxt, 1, 5);\n gridPane.add(urlLbl, 0, 6);\n gridPane.add(urlTxt, 1, 6);\n gridPane.add(datePickerLbl, 0, 7);\n datePicker.setValue(start.toLocalDate());\n gridPane.add(datePicker, 1, 7);\n gridPane.add(startLbl, 0, 8);\n startTxt.getSelectionModel().select(LocalTime.from(start));\n gridPane.add(startTxt, 1, 8);\n gridPane.add(endLbl, 0, 9);\n endTxt.setValue((int) duration.toMinutes());\n gridPane.add(endTxt, 1, 9);\n gridPane.add(newAppointmentButtonBar(), 1, 10);\n\n\n this.stage.setScene(new Scene(gridPane));\n }", "@Override\n public void onClick(View v) {\n currentCalendar.add(Calendar.MONTH, -1);\n Log.i(\"***********\", \"DrawMonth called on previousmonth\");\n drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);\n\n }", "public static void printMonthBody(int year, int month) {\n int startDay = getStartDay(year, month);\n //call the method getStartDay to get the start day for each month of the year \n print(startDay,year,month);\n //call the method print to print the calender for the month and pass the first day of the month as the parameter \n \n }", "private MonthlyCalendar(YearMonth targetMonth) {\n stageChangeListener = new ParentWindowChangeListener(sceneProperty());\n stageChangeListener.currentStageProperty().addListener((observable, oldValue, newValue) -> {\n if (null != newValue) {\n newValue.setTitle(\"Month Calendar\");\n }\n LOG.exiting(LogHelper.toLambdaSourceClass(LOG, \"new\", \"stageChangeHandler#currentStage\"), \"change\");\n });\n this.targetMonth = new ReadOnlyObjectWrapper<>(this, \"targetMonth\", (null == targetMonth) ? YearMonth.now() : targetMonth);\n modelFilter = new ReadOnlyObjectWrapper<>(this, \"modelFilter\");\n allAppointments = FXCollections.observableArrayList();\n appointmentDays = FXCollections.observableArrayList();\n root = new TreeItem<>();\n allAppointments.addListener(this::onAllAppointmentsChanged);\n modelFilter.addListener(this::onModelFilterChanged);\n appointmentInsertEventHandler = WeakEventHandlingReference.create(this::onAppointmentInserted);\n appointmentUpdateEventHandler = WeakEventHandlingReference.create(this::onAppointmentUpdated);\n appointmentDeleteEventHandler = WeakEventHandlingReference.create(this::onAppointmentDeleted);\n }", "@Override\n public List<? extends WeekViewEvent> onMonthChange(int newYear, int newMonth) {\n\n List<WeekViewEvent> eventsList = new ArrayList<WeekViewEvent>();\n\n for (int i = 0; i < events.size(); i++) {\n if (newMonth - 2 == fromEpoch(events.get(i).getTimeInMillis())) {\n Calendar startTime = Calendar.getInstance();\n WeekViewEvent event;\n startTime.setTimeInMillis(events.get(i).getTimeInMillis());\n //startTime.set(Calendar.MONTH, newMonth-2);\n Calendar endTime = (Calendar) startTime.clone();\n endTime.setTimeInMillis(events.get(i).getTimeInMillis() + (3600000 * events.get(i).getDurationHour())\n + (60000 * events.get(i).getDurationMin()));\n //endTime.set(Calendar.MONTH, newMonth-2);\n event = new WeekViewEvent(events.get(i).getID(), events.get(i).getData().toString(), startTime, endTime);\n event.setColor(events.get(i).getColor());\n eventsList.add(event);\n }\n }\n\n return eventsList;\n }", "@FXML\r\n void onActionMonth(ActionEvent event) {\r\n appointmentListType();\r\n }", "private MonthCellWithMonthIndex getMonthCellWithIndexByDate(Date date) {\n\t\tint index = 0;\n\t\tCalendar searchCal = Calendar.getInstance(locale);\n\t\tsearchCal.setTime(date);\n\t\tCalendar actCal = Calendar.getInstance(locale);\n\n\t\tfor (List<List<MonthCellDescriptor>> monthCells : cells) {\n\t\t\tfor (List<MonthCellDescriptor> weekCells : monthCells) {\n\t\t\t\tfor (MonthCellDescriptor actCell : weekCells) {\n\t\t\t\t\tactCal.setTime(actCell.getDate());\n\t\t\t\t\tif (sameDate(actCal, searchCal) && actCell.isSelectable()) {\n\t\t\t\t\t\treturn new MonthCellWithMonthIndex(actCell, index);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tindex++;\n\t\t}\n\t\treturn null;\n\t}", "private void updateMonthInToolbar(int direction, boolean updateCategoryInfo){\n pieChartFragment.resetPieChart();\n updateBothPriceStatus(0); //reset it back to 0\n\n currentMonth = DateUtil.getMonthWithDirection(currentMonth, direction);\n mListener.updateToolbar(DateUtil.convertDateToStringFormat2(getContext(), currentMonth));\n\n if(updateCategoryInfo) {\n categoryIncomeFragment.updateMonthCategoryInfo(currentMonth);\n categoryExpenseFragment.updateMonthCategoryInfo(currentMonth);\n }\n }", "@Override\n public void onMonthChanged(Date date) {\n }", "@FXML\n private void changeMonth() throws NoSuchMethodException\n {\n String selected = cmbMonth.getValue();\n for (int i = 0; i < months.size(); i++)\n {\n if (selected.equals(months.get(i)))\n {\n month = i;\n }\n }\n fillCalendar();\n setMonth();\n parentContr.updatePieChart();\n\n }", "public static void print(int startDay, int year, int month) {\n //call the method getNumberOfdaysInMonth to find out the number of the days in the month \n //use a for loop to print spaces up to the start day for each month\n //use another for loop to print the rest of the days in the calender\n //if the month is November calculate the thanksgiving day and output }\n int amount = getNumberOfDaysInMonth(year,month);\n for(int e = 0; e < startDay; e++){//this print outs the spaces for the months and aligns the dates together\n System.out.print(\" \");//use a for loop to print spaces up to the start day for each month\n }\n for(int e = 1; e <= amount; e++){//use another for loop to print the rest of the days in the calender\n if(e < 10){\n System.out.print(\" \" + e + \" \");//for the spaces\n }\n else{\n System.out.print(\" \" + e + \" \");\n }\n if((startDay + e) % 7 == 0){ \n System.out.println();\n }\n }\n thanks(startDay, month);//call the method thanks so it can work correctly\n }", "@Override\n public List<WeekViewEvent> onMonthChange(int newYear, int newMonth) {\n List<WeekViewEvent> events = getEvents(newYear, newMonth);\n return events;\n }", "public void setMonth(int month)\n {\n this.month = month;\n }", "public GridCellAdapter(Context context, int textViewResourceId,\n int month, int year) {\n super();\n this._context = context;\n this.list = new ArrayList<String>();\n Log.d(tag, \"==> Passed in Date FOR Month: \" + month + \" \"\n + \"Year: \" + year);\n Calendar calendar = Calendar.getInstance();\n setCurrentDayOfMonth(calendar.get(Calendar.DAY_OF_MONTH));\n setCurrentWeekDay(calendar.get(Calendar.DAY_OF_WEEK));\n Log.d(tag, \"New Calendar:= \" + calendar.getTime().toString());\n Log.d(tag, \"CurrentDayOfWeek :\" + getCurrentWeekDay());\n Log.d(tag, \"CurrentDayOfMonth :\" + getCurrentDayOfMonth());\n\n // Print Month\n printMonth(month, year);\n\n // Find Number of Events\n eventsPerMonthMap = findNumberOfEventsPerMonth(year, month);\n }", "public void createCalenderView() {\n fill();\n\n int currentDateGrid = 0;\n everydayGridPane.setBackground(new Background(\n new BackgroundFill(Color.valueOf(\"383838\"), CornerRadii.EMPTY, Insets.EMPTY)));\n dateGridPane.setBackground(new Background(\n new BackgroundFill(Color.valueOf(\"383838\"), CornerRadii.EMPTY, Insets.EMPTY)));\n\n for (int row = 0; row <= 5; row++) {\n for (int col = 0; col <= 6; col++) {\n VBox holder = placeHolderForLabel();\n\n if ((currentDateGrid < previousMonthBalance)\n || (currentDateGrid > TOTAL_NUM_OF_DATEGRID - 1 - nextMonthBalance)) {\n holder.setBlendMode(BlendMode.SOFT_LIGHT);\n }\n\n if ((currentDateGrid == previousMonthBalance + day - 1)\n && (isSameMonth(datePointer, fixedDatePointer))) {\n holder.setBackground(new Background(\n new BackgroundFill(Color.DARKORANGE.darker(), CornerRadii.EMPTY, Insets.EMPTY)));\n\n holder.setBorder(new Border(new BorderStroke(Color.valueOf(\"#FFFFFF\"),\n BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(1))));\n }\n\n Label labelDay = createLabelDay(simulateGridPane[currentDateGrid]);\n holder.getChildren().add(labelDay);\n dateGridPane.add(holder, col, row);\n GridPane.setHalignment(holder, HPos.CENTER);\n GridPane.setValignment(holder, VPos.CENTER);\n\n currentDateGrid++;\n }\n }\n }", "public static void viewBy() {\n\t\tMONTHS[] arrayOfMonths = MONTHS.values();\n\t\tLONGDAYS[] arrayOfLongDays = LONGDAYS.values();\n\t\tSystem.out.println(\"[D]ay view or [M]onth view ? \");\n\t\tScanner sc = new Scanner(System.in);\n\t\tString input;\n\t\tif (sc.hasNextLine()) {\n\t\t\tinput = sc.nextLine().toLowerCase();\n\n\t\t\tif (input.equals(\"d\")) { //day view\t\t\t\t\n\t\t\t\tGregorianCalendar cal1 = new GregorianCalendar();\n\t\t\t\tGregorianCalendar cal = new GregorianCalendar(cal1.get(Calendar.YEAR), cal1.get(Calendar.MONTH)+1, cal1.get(Calendar.DAY_OF_MONTH));\n\t\t\t\tSystem.out.print(arrayOfLongDays[cal1.get(Calendar.DAY_OF_WEEK) - 1]);\n\t\t\t\tSystem.out.print(\", \");\n\t\t\t\tSystem.out.print(arrayOfMonths[cal.get(Calendar.MONTH)-1]);\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t\tSystem.out.print(cal.get(Calendar.DAY_OF_MONTH));\n\t\t\t\tSystem.out.print(\", \");\n\t\t\t\tSystem.out.print(cal.get(Calendar.YEAR));\n\t\t\t\tString values = getValues(cal);\n\t\t\t\tif (values != \"\") {\n\t\t\t\t\tSystem.out.println(\"\\n\" + values);\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"\\nThere are no events scheduled for this day\");\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"\\n[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\tinput = sc.nextLine().toLowerCase();\n\t\t\t\twhile (input.equals(\"n\") || input.equals(\"p\")) {\n\t\t\t\t\tif (input.equals(\"p\")) { // previous\n\t\t\t\t\t\tcal.add(Calendar.DAY_OF_MONTH, -1);\n\t\t\t\t\t\tcal1.add(Calendar.DAY_OF_MONTH, -1);\n\t\t\t\t\t\tSystem.out.print(arrayOfLongDays[cal1.get(Calendar.DAY_OF_WEEK) - 1]);\n\t\t\t\t\t\tSystem.out.print(\", \");\n\t\t\t\t\t\tSystem.out.print(arrayOfMonths[cal.get(Calendar.MONTH)-1]);\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t\tSystem.out.print(cal.get(Calendar.DAY_OF_MONTH));\n\t\t\t\t\t\tSystem.out.print(\", \");\n\t\t\t\t\t\tSystem.out.print(cal.get(Calendar.YEAR) + \"\\n\");\n\t\t\t\t\t\tString value = getValues(cal);\n\t\t\t\t\t\tif (value != \"\") {\n\t\t\t\t\t\t\tSystem.out.println(value);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\"\\nThere are no events scheduled for this day\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"\\n[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\t\t\tinput = sc.nextLine().toLowerCase();\n\t\t\t\t\t} else if (input.equals(\"n\")) { // next\n\t\t\t\t\t\tcal.add(Calendar.DAY_OF_MONTH, 1);\n\t\t\t\t\t\tcal1.add(Calendar.DAY_OF_MONTH, 1);\n\t\t\t\t\t\tSystem.out.print(arrayOfLongDays[cal1.get(Calendar.DAY_OF_WEEK) - 1]);\n\t\t\t\t\t\tSystem.out.print(\", \");\n\t\t\t\t\t\tSystem.out.print(arrayOfMonths[cal.get(Calendar.MONTH)-1]);\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t\tSystem.out.print(cal.get(Calendar.DAY_OF_MONTH));\n\t\t\t\t\t\tSystem.out.print(\", \");\n\t\t\t\t\t\tSystem.out.print(cal.get(Calendar.YEAR) + \"\\n\");\n\t\t\t\t\t\tString values1 = getValues(cal);\n\t\t\t\t\t\tif (values1 != \"\") {\n\t\t\t\t\t\t\tSystem.out.println(values1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\"\\nThere are no events scheduled for this day\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"\\n[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\t\t\tinput = sc.nextLine().toLowerCase();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (input.equals(\"m\")) { // main menu\n\t\t\t\t\tSystem.out.println(\"main menu\");\n\t\t\t\t} else { // user didn't input a valid option\n\t\t\t\t\tSystem.out.println(\"\\n[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\t}\n\n\t\t\t} else if (input.equals(\"m\")) { // month view\n\t\t\t\tGregorianCalendar cal = new GregorianCalendar();\n\t\t\t\tdisplayMainMenuWithEvents(cal);\n\t\t\t\tSystem.out.println(\"[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\tinput = sc.nextLine().toLowerCase();\n\t\t\t\twhile (input.equals(\"p\") || input.equals(\"n\")) {\n\t\t\t\t\tif (input.equals(\"p\")) { // previous\n\t\t\t\t\t\tcal.add(Calendar.MONTH, -1);\n\t\t\t\t\t\tdisplayMainMenuWithEvents(cal);\n\t\t\t\t\t\tSystem.out.println(\"\\n[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\t\t\tinput = sc.nextLine().toLowerCase();\n\t\t\t\t\t} else if (input.equals(\"n\")) { // next\n\t\t\t\t\t\tcal.add(Calendar.MONTH, 1);\n\t\t\t\t\t\tdisplayMainMenuWithEvents(cal);\n\t\t\t\t\t\tSystem.out.println(\"\\n[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\t\t\tinput = sc.nextLine().toLowerCase();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (input.equals(\"m\")) { // main menu\n\t\t\t\t\tSystem.out.println(\"main menu\");\n\t\t\t\t} else { // user didn't input a valid option\n\t\t\t\t\tSystem.out.println(\"\\n[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void scanCurrentDay(){\n month.getMyCalendar().setDate(dp.getYear(), dp.getMonth(), dp.getDayOfMonth());\n month.setSelectDay(dp.getDayOfMonth());\n month.invalidate();\n this.dismiss();\n }", "public static void main(String[] args) {\n for (int month=0; month <5; month++){\n int year =2020;\n System.out.println(\"Month: \"+month+\" \\n*********\");\n for ( month=0; month<=6; month+=2 ){\n System.out.println(\"/\"+month+\"/\"+year);\n }\n if (month!=12)\n System.out.printf(\"----------\\n\");\n }\n\n }", "private void todayReport() {\n\t\tListSeries dollarEarning = new ListSeries();\n\t\tString[] dates = new String[1];\n\t\t/* Create a DateField with the default style. */\n Calendar calendar=Calendar.getInstance();\n\t\t\n\t\tvReportDisplayLayout.removeAllComponents();\n\t\tdates[0] = String.valueOf(calendar.get(Calendar.MONTH)+1) + \"/\" + \n\t\t\t\tString.valueOf(calendar.get(Calendar.DATE)) + \"/\" + \n\t\t\t\tString.valueOf(calendar.get(Calendar.YEAR));\n\t\tdollarEarning = getTodayData();\n\t\t\n\t\tdisplayChart chart = new displayChart();\n\t\t\n\t\tdReportPanel.setContent(chart.getDisplayChart(dates, dollarEarning));\n\t\tvReportDisplayLayout.addComponent(dReportPanel);\n\t}", "void setBoardStart(int month, int day, int year) throws IllegalDateException;", "public static int getCurrentMonth(int month) {\n month++;\n return month;\n }", "private void apptByMonthTableFill(){\n try {\n //get data from database\n monthReports = AppointmentDB.getMonthsReport();\n }\n catch (SQLException e){\n dialog(\"ERROR\",\"SQL Error\",\"Error: \"+ e.getMessage());\n }\n apptByMonthTable.setItems(monthReports);\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n String[] tokens = {\"next_month\"};\n try {\n caseScanner.processInstructions(tokens);\n } catch (IOException ioException) {\n ioException.printStackTrace();\n } catch (ClassNotFoundException classNotFoundException) {\n classNotFoundException.printStackTrace();\n }\n /* Close current panel*/\n currentDate.setText(\"Current Time: \" + TestCaseReader.getMonthTimeStamp() + \"/\" + TestCaseReader.getYearTimeStamp());\n }", "public void exportPlan(List<Map<String,Object>> plan,String month){\n int curmonth = MobicloudManager.getInstance().getCurMonth(month);\n int monthlastday = MobicloudManager.getInstance().getMonthLastDay(curmonth);\n StreamRender render=new StreamRender(curmonth,monthlastday,plan);\n render(render);\n }", "int calDateMonth(int mC,int yC,int mG,int yG){//(current-month, current-year, goal-month, goal-year)\n int x = 0,i,countM=0;\n if(yC<=yG){\n for(i = yC; i < yG; i++)\n countM += 12;\n }\n\n countM -= mC;\n countM += mG;\n return (countM);\n }", "public static List<Order> viewsalesbymonth() {\n\t\tList<Order> monthly_sales = new ArrayList<Order>();\n\n\t\ttry {\n\t\t\tconnect = ConnectionManager.getConnection();\n\t\t\tps = connect.prepareStatement(\n\t\t\t\t\t\"SELECT MONTHNAME(order_date) AS month_name, COUNT(MONTHNAME(order_date)) AS total FROM orders WHERE YEAR(order_date) = YEAR(CURRENT_DATE) GROUP BY MONTHNAME(order_date) ORDER BY MONTH(order_date)\");\n\t\t\tResultSet rs = ps.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tOrder order_month_current = new Order();\n\t\t\t\torder_month_current.setOrderMonth(rs.getString(\"month_name\"));\n\t\t\t\torder_month_current.setTotalByMonth(rs.getInt(\"total\"));\n\n\t\t\t\tmonthly_sales.add(order_month_current);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn monthly_sales;\n\t}", "public void changeMonth(int newMonth) {\n this.month = newMonth;\n }", "private void buildProjectMonthTotals(List<TimeEntry> timeEntries) {\n projects.clear();\n for(TimeEntry te: timeEntries) {\n if(te.getStart().getYear() == selectedYear && te.getProject() != null) {\n String projectName = te.getProject().getName();\n String month = formatMonthName(te.getStart().getMonth());\n ProjectModel projectData = projects.get(projectName);\n if(projectData == null) {\n // First entry for the project\n projectData = new ProjectModel(projectName);\n projects.put(projectName, projectData);\n }\n projectData.addHours(month, (float) te.getDuration() / 3600.0);\n }\n }\n }", "@Test(dependsOnMethods = {\"shouldBeAbleToNavigateToCalculatePaymentPage\"})\n public void shouldBeAbleToClick24Months() {\n calculatePaymentPage.selectMonth(\"24\");\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent t = new Intent(mContext, Month.class);\r\n\t\t\t\tt.putExtra(\"day\", day);\r\n\t\t\t\tt.putExtra(\"month\", month);\r\n\t\t\t\tt.putExtra(\"year\", year);\r\n\t\t\t\tstartActivity(t);\r\n\t\t\t\tfinish();\r\n\t\t\t}", "public void initializeCalendarGrid(){\n int rows = 6;\n int cols = 7;\n for (int i = 0; i < rows; i++){\n for (int j = 0; j < cols; j++){\n \n // Add VBox and style it\n VBox vPane = new VBox();\n vPane.getStyleClass().add(\"calendar_pane\");\n vPane.setMinWidth(weekdayHeader.getPrefWidth()/7);\n \n vPane.addEventHandler(MouseEvent.MOUSE_CLICKED, (e)->{\n addEvent(vPane);\n });\n \n GridPane.setVgrow(vPane, Priority.ALWAYS);\n \n // Add it to the grid\n calendarGrid.add(vPane, j, i); \n }\n } \n \n // Set up Row Constraints\n for (int i = 0; i < 7; i++) {\n RowConstraints row = new RowConstraints();\n row.setMinHeight(scrollPane.getHeight()/7);\n calendarGrid.getRowConstraints().add(row);\n }\n }", "@Test(dependsOnMethods = {\"shouldBeAbleToClick60Months\"})\n public void shouldBeAbleToClick72Months() {\n calculatePaymentPage.selectMonth(\"72\");\n }", "public void printMonth() {\r\n switch (cur.getMonth()){\r\n case 1:\r\n System.out.println(\"JANUARY\");\r\n break;\r\n case 2:\r\n System.out.println(\"FEBRUARY\");\r\n break;\r\n case 3:\r\n System.out.println(\"MARCH\");\r\n break;\r\n case 4:\r\n System.out.println(\"APRIL\");\r\n break;\r\n case 5:\r\n System.out.println(\"MAY\");\r\n break;\r\n case 6:\r\n System.out.println(\"JUNE\");\r\n break;\r\n case 7:\r\n System.out.println(\"JULY\");\r\n break;\r\n case 8:\r\n System.out.println(\"AUGUST\");\r\n break;\r\n case 9:\r\n System.out.println(\"SEPTEMBER\");\r\n break;\r\n case 10:\r\n System.out.println(\"OCTOBER\");\r\n break;\r\n case 11:\r\n System.out.println(\"NOVEMBER\");\r\n break;\r\n case 12:\r\n System.out.println(\"DECEMBER\");\r\n break;\r\n }\r\n }", "public static void displayData(){\n for (int i = 0; i < 12; i++){\n int month = i + 1;\n System.out.println(\"Month \"+ month +\"; Total rainfall: \"+ monthlyTotalRain[i]+\"; Highest temperature: \"+ monthlyHighestTemp[i] );\n }\n }", "private void showMonth() {\n\t\tJPanel monthList = new JPanel();\n\t\tmonthList.setLayout(new BoxLayout(monthList, BoxLayout.Y_AXIS));\n\t\tString currentMonth = this.currentMonday.getDisplayName(Calendar.MONTH,\n\t\t\t\tCalendar.LONG, DEFAULT_LOCALE);\n\t\tJLabel monthName = new JLabel(currentMonth);\n\t\tmonthList.add(monthName);\n\t\tArrayList<Event> thismonth = this.calendar\n\t\t\t\t.getMonthsEvents(this.currentMonday);\n\t\tif (thismonth.isEmpty()) {\n\t\t\tmonthList.add(new JLabel(\"No high-priority\"));\n\t\t\tmonthList.add(new JLabel(\"events this month\"));\n\t\t} else {\n\t\t\tHashMap<String, Long> durations = new HashMap<String, Long>(\n\t\t\t\t\tthismonth.size());\n\t\t\tLong duration;\n\t\t\tLong previous;\n\t\t\tGregorianCalendar firstOf = (GregorianCalendar) this.currentMonday\n\t\t\t\t\t.clone();\n\t\t\tfirstOf = DateCalc.startOf(firstOf, Calendar.MONTH);\n\t\t\tfor (Event current : thismonth) {\n\t\t\t\tduration = new Long(current.getDurationInMonth(firstOf));\n\t\t\t\tprevious = durations.get(current.getCategory());\n\t\t\t\tif (previous != null) {\n\t\t\t\t\tprevious += duration;\n\t\t\t\t} else {\n\t\t\t\t\tdurations.put(current.getCategory(), duration);\n\t\t\t\t}\n\t\t\t\tmonthList.add(new JEventPreview(this, current));\n\t\t\t}\n\n\t\t\tJPanel summary = new JPanel();\n\t\t\tsummary.setLayout(new BoxLayout(summary, BoxLayout.Y_AXIS));\n\n\t\t\tJLabel label = new JLabel(\"Durations:\");\n\t\t\tsummary.add(label);\n\t\t\tJLabel line;\n\t\t\tfor (String current : durations.keySet()) {\n\t\t\t\tline = new JLabel(current\n\t\t\t\t\t\t+ \": \"\n\t\t\t\t\t\t+ TCalParser.presentDuration(durations.get(current)\n\t\t\t\t\t\t\t\t.longValue()));\n\t\t\t\tsummary.add(line);\n\t\t\t}\n\n\t\t\tmonthList.add(summary);\n\t\t}\n\n\t\tthis.toolPane.add(monthList);\n\t\tthis.toolPane.validate();\n\t}", "private static void printMonth(int start, int days) {\n for (int day = -(start - 2); day <= days; day++) {\n if (day < 1) {\n // Empty space before start of month.\n System.out.printf(\" \");\n } else if (day <= (7 - (start - 1))) {\n // Possibly short first week.\n System.out.printf(\"%4d%c\", day, day == (7 - (start - 1)) ? '\\n' : ' ');\n } else {\n // Full and last weeks.\n System.out.printf(\"%4d%c\", day, (day - (7 - (start - 1))) % 7 == 0 ? '\\n' : ' ');\n }\n }\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tint month;\n\t\tdouble maxtempereture,monthlytempereture,mintempereture;\n\t\tResultSet rs;\n\t\tlib.MySQL mysql = new lib.MySQL();\n\t\trs = mysql.selectAll();\n\t\tDefaultCategoryDataset data = new DefaultCategoryDataset();\n\t\ttry{\n\t\t\twhile(rs.next()){\n\t\t\t\tmonth = rs.getInt(\"Month\");\n\t\t\t\tmaxtempereture = rs.getDouble(\"MaxTempereture\");\n\t\t\t\tmonthlytempereture = rs.getDouble(\"MonthkyTempereture\");\n\t\t\t\tmintempereture = rs.getDouble(\"MinTempereture\");\n System.out.println(\"月:\" + month);\n System.out.println(\"最高気温:\" + maxtempereture);\n System.out.println(\"月間平均気温:\" + monthlytempereture);\n System.out.println(\"最低気温:\" + mintempereture);\n data.addValue(maxtempereture,\"MaxTempereture\",month+\"\");\n data.addValue(monthlytempereture,\"MonthlyTempereture\",month+\"\");\n data.addValue(mintempereture,\"MinTempereture\",month+\"\");\n\t\t }\n\t\t}catch(SQLException et){}\n\t\t JFreeChart chart = \n\t\t\t ChartFactory.createLineChart(\"TOKYO TEMPERETURE\",\n\t\t\t \"month\",\n\t\t\t \"tempereture\",\n\t\t\t data,\n\t\t\t PlotOrientation.VERTICAL,\n\t\t\t true,\n\t\t\t false,\n\t\t\t false);\n \n\n ChartPanel cpanel = new ChartPanel(chart);\n panel1.add(cpanel);\n cardlayout.next(this);\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n gsd = GlobalDataStore.getInstance();\n loggedInUser = gsd.getLoggedInUser();\n Date date = new Date();\n Calendar cal = Calendar.getInstance();\n cal.setTime(date);\n month = cal.get(Calendar.MONTH);\n month++; \n year = cal.get(Calendar.YEAR);\n week = cal.get(Calendar.WEEK_OF_YEAR);\n\n try {\n getByMonthAppts(month, year); \n } catch (Exception e) {\n e.printStackTrace();\n }\n \n viewByMonth.setOnAction((ActionEvent event) -> {\n\n try {\n \n getByMonthAppts(month, year);\n } catch (Exception e) {\n System.err.println(e);\n }\n \n }); \n \n viewByWeek.setOnAction((ActionEvent event) -> {\n try {\n getByWeekAppts(week, year);\n } catch (Exception e) {\n }\n });\n \n incrementWeekMonth.setOnAction((ActionEvent event) -> {\n if (isMonthlyView)\n if (month == 12) {\n month = 1;\n year++;\n getByMonthAppts(month, year);}\n else {month++;\n getByMonthAppts(month, year);\n }\n \n else {\n if (week == 52) {\n week = 1;\n year++;\n }\n else {\n week++;\n }\n try { \n getByWeekAppts(week, year);\n } catch (Exception e) {\n week--;\n e.printStackTrace();\n }\n }\n \n });\n \n \n \n decrementWeekMonth.setOnAction((ActionEvent event) -> {\n if (isMonthlyView)\n \n if (month == 1) {\n month = 12;\n year--;\n getByMonthAppts(month, year);}\n else {\n month--;\n getByMonthAppts(month, year);\n }\n else {\n if (week == 1) {\n week = 52;\n year--;\n }\n else {\n week--;\n }\n try { \n getByWeekAppts(week, year);\n } catch (Exception e) {\n week++;\n e.printStackTrace();\n }\n }\n \n });\n \n addNewAppt.setOnAction((ActionEvent event) -> {\n\n try {\n Control c = Control.getInstance();\n \n Stage stage = c.getStage();\n c.SetStage(stage);\n c.SetPane(\"newAppt\"); \n\t\t\t\t\n } catch (Exception e1) {\n System.err.println(e1);\n \n }\n });\n \n\n }", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\chromedriver.exe\");\n\t\tWebDriver driver=new ChromeDriver();\n\t\tdriver.get(\"https://www.path2usa.com/travel-companions\");\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"travel_date\\\"]\")).click();\n\t\twhile(!driver.findElement(By.xpath(\"//div[@class='datepicker-days']//th[@class='datepicker-switch']\")).getText().contains(\"May\"))//while loop keep on executing until it becomes false\n\t\t{\n\t\t\tdriver.findElement(By.xpath(\"//div[@class='datepicker-days']//th[@class='next']\")).click();\n\t\t\n\t\t}\n\t\t/*while(!driver.findElement(By.xpath(\"//div[@class='datepicker-months']//th[@class='datepicker-switch']\")).getText().contains(\"2020\"))\n\t\t{\n\t\t\tdriver.findElement(By.xpath(\"//div[@class='datepicker-months']//th[@class='next']\")).click();\n\t\t}*/\n\t\t\n\t\tList<WebElement> dates= driver.findElements(By.className(\"day\"));\n\t\tint count=driver.findElements(By.className(\"day\")).size();\n\t\tfor(int i= 0; i<count; i++) {\n\t\t\tString text= driver.findElements(By.className(\"day\")).get(i).getText();\n\t\t\tif(text.equalsIgnoreCase(\"23\"))\n\t\t\t{\n\t\t\t\tdriver.findElements(By.className(\"day\")).get(i).click();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\n\t}", "public static void printMonth(int year, int month) {\n System.out.println(\" \");\n System.out.println(\" \");\n getMonthName(month,year);\n printTitle(year,month);//call the method printTitle with the values year and month\n printMonthBody(year,month);//call the method printMonthBody with the values year and month\n }", "private void dateView(){\n Jan1.setBackgroundResource(R.color.black);\n Jan2.setBackgroundResource(R.color.black);\n Jan3.setBackgroundResource(R.color.black);\n Jan4.setBackgroundResource(R.color.black);\n Jan5.setBackgroundResource(R.color.black);\n Jan6.setBackgroundResource(R.color.black);\n Jan7.setBackgroundResource(R.color.black);\n Jan8.setBackgroundResource(R.color.black);\n Jan9.setBackgroundResource(R.color.black);\n Jan10.setBackgroundResource(R.color.black);\n Jan11.setBackgroundResource(R.color.black);\n Jan12.setBackgroundResource(R.color.black);\n Jan13.setBackgroundResource(R.color.black);\n Jan14.setBackgroundResource(R.color.black);\n Jan15.setBackgroundResource(R.color.black);\n Jan16.setBackgroundResource(R.color.black);\n Jan17.setBackgroundResource(R.color.black);\n Jan18.setBackgroundResource(R.color.black);\n Jan19.setBackgroundResource(R.color.black);\n Jan20.setBackgroundResource(R.color.black);\n Jan21.setBackgroundResource(R.color.black);\n Jan22.setBackgroundResource(R.color.black);\n Jan23.setBackgroundResource(R.color.black);\n Jan24.setBackgroundResource(R.color.black);\n Jan25.setBackgroundResource(R.color.black);\n Jan26.setBackgroundResource(R.color.black);\n Jan27.setBackgroundResource(R.color.black);\n Jan28.setBackgroundResource(R.color.black);\n Jan29.setBackgroundResource(R.color.black);\n Jan30.setBackgroundResource(R.color.black);\n Jan31.setBackgroundResource(R.color.black);\n Feb1.setBackgroundResource(R.color.black);\n Feb2.setBackgroundResource(R.color.black);\n Feb3.setBackgroundResource(R.color.black);\n Feb4.setBackgroundResource(R.color.black);\n Feb5.setBackgroundResource(R.color.black);\n Feb6.setBackgroundResource(R.color.black);\n Feb7.setBackgroundResource(R.color.black);\n Feb8.setBackgroundResource(R.color.black);\n Feb9.setBackgroundResource(R.color.black);\n Feb10.setBackgroundResource(R.color.black);\n Feb11.setBackgroundResource(R.color.black);\n Feb12.setBackgroundResource(R.color.black);\n Feb13.setBackgroundResource(R.color.black);\n Feb14.setBackgroundResource(R.color.black);\n Feb15.setBackgroundResource(R.color.black);\n Feb16.setBackgroundResource(R.color.black);\n Feb17.setBackgroundResource(R.color.black);\n Feb18.setBackgroundResource(R.color.black);\n Feb19.setBackgroundResource(R.color.black);\n Feb20.setBackgroundResource(R.color.black);\n Feb21.setBackgroundResource(R.color.black);\n Feb22.setBackgroundResource(R.color.black);\n Feb23.setBackgroundResource(R.color.black);\n Feb24.setBackgroundResource(R.color.black);\n Feb25.setBackgroundResource(R.color.black);\n Feb26.setBackgroundResource(R.color.black);\n Feb27.setBackgroundResource(R.color.black);\n Feb28.setBackgroundResource(R.color.black);\n Feb29.setBackgroundResource(R.color.black);\n Mar1.setBackgroundResource(R.color.black);\n Mar2.setBackgroundResource(R.color.black);\n Mar3.setBackgroundResource(R.color.black);\n Mar4.setBackgroundResource(R.color.black);\n Mar5.setBackgroundResource(R.color.black);\n Mar6.setBackgroundResource(R.color.black);\n Mar7.setBackgroundResource(R.color.black);\n Mar8.setBackgroundResource(R.color.black);\n Mar9.setBackgroundResource(R.color.black);\n Mar10.setBackgroundResource(R.color.black);\n Mar11.setBackgroundResource(R.color.black);\n Mar12.setBackgroundResource(R.color.black);\n Mar13.setBackgroundResource(R.color.black);\n Mar14.setBackgroundResource(R.color.black);\n Mar15.setBackgroundResource(R.color.black);\n Mar16.setBackgroundResource(R.color.black);\n Mar17.setBackgroundResource(R.color.black);\n Mar18.setBackgroundResource(R.color.black);\n Mar19.setBackgroundResource(R.color.black);\n Mar20.setBackgroundResource(R.color.black);\n Mar21.setBackgroundResource(R.color.black);\n Mar22.setBackgroundResource(R.color.black);\n Mar23.setBackgroundResource(R.color.black);\n Mar24.setBackgroundResource(R.color.black);\n Mar25.setBackgroundResource(R.color.black);\n Mar26.setBackgroundResource(R.color.black);\n Mar27.setBackgroundResource(R.color.black);\n Mar28.setBackgroundResource(R.color.black);\n Mar29.setBackgroundResource(R.color.black);\n Mar30.setBackgroundResource(R.color.black);\n Mar31.setBackgroundResource(R.color.black);\n Apr1.setBackgroundResource(R.color.black);\n Apr2.setBackgroundResource(R.color.black);\n Apr3.setBackgroundResource(R.color.black);\n Apr4.setBackgroundResource(R.color.black);\n Apr5.setBackgroundResource(R.color.black);\n Apr6.setBackgroundResource(R.color.black);\n Apr7.setBackgroundResource(R.color.black);\n Apr8.setBackgroundResource(R.color.black);\n Apr9.setBackgroundResource(R.color.black);\n Apr10.setBackgroundResource(R.color.black);\n Apr11.setBackgroundResource(R.color.black);\n Apr12.setBackgroundResource(R.color.black);\n Apr13.setBackgroundResource(R.color.black);\n Apr14.setBackgroundResource(R.color.black);\n Apr15.setBackgroundResource(R.color.black);\n Apr16.setBackgroundResource(R.color.black);\n Apr17.setBackgroundResource(R.color.black);\n Apr18.setBackgroundResource(R.color.black);\n Apr19.setBackgroundResource(R.color.black);\n Apr20.setBackgroundResource(R.color.black);\n Apr21.setBackgroundResource(R.color.black);\n Apr22.setBackgroundResource(R.color.black);\n Apr23.setBackgroundResource(R.color.black);\n Apr24.setBackgroundResource(R.color.black);\n Apr25.setBackgroundResource(R.color.black);\n Apr26.setBackgroundResource(R.color.black);\n Apr27.setBackgroundResource(R.color.black);\n Apr28.setBackgroundResource(R.color.black);\n Apr29.setBackgroundResource(R.color.black);\n Apr30.setBackgroundResource(R.color.black);\n May1.setBackgroundResource(R.color.black);\n May2.setBackgroundResource(R.color.black);\n May3.setBackgroundResource(R.color.black);\n May4.setBackgroundResource(R.color.black);\n May5.setBackgroundResource(R.color.black);\n May6.setBackgroundResource(R.color.black);\n May7.setBackgroundResource(R.color.black);\n May8.setBackgroundResource(R.color.black);\n May9.setBackgroundResource(R.color.black);\n May10.setBackgroundResource(R.color.black);\n May11.setBackgroundResource(R.color.black);\n May12.setBackgroundResource(R.color.black);\n May13.setBackgroundResource(R.color.black);\n May14.setBackgroundResource(R.color.black);\n May15.setBackgroundResource(R.color.black);\n May16.setBackgroundResource(R.color.black);\n May17.setBackgroundResource(R.color.black);\n May18.setBackgroundResource(R.color.black);\n May19.setBackgroundResource(R.color.black);\n May20.setBackgroundResource(R.color.black);\n May21.setBackgroundResource(R.color.black);\n May22.setBackgroundResource(R.color.black);\n May23.setBackgroundResource(R.color.black);\n May24.setBackgroundResource(R.color.black);\n May25.setBackgroundResource(R.color.black);\n May26.setBackgroundResource(R.color.black);\n May27.setBackgroundResource(R.color.black);\n May28.setBackgroundResource(R.color.black);\n May29.setBackgroundResource(R.color.black);\n May30.setBackgroundResource(R.color.black);\n May31.setBackgroundResource(R.color.black);\n Jun1.setBackgroundResource(R.color.black);\n Jun2.setBackgroundResource(R.color.black);\n Jun3.setBackgroundResource(R.color.black);\n Jun4.setBackgroundResource(R.color.black);\n Jun5.setBackgroundResource(R.color.black);\n Jun6.setBackgroundResource(R.color.black);\n Jun7.setBackgroundResource(R.color.black);\n Jun8.setBackgroundResource(R.color.black);\n Jun9.setBackgroundResource(R.color.black);\n Jun10.setBackgroundResource(R.color.black);\n Jun11.setBackgroundResource(R.color.black);\n Jun12.setBackgroundResource(R.color.black);\n Jun13.setBackgroundResource(R.color.black);\n Jun14.setBackgroundResource(R.color.black);\n Jun15.setBackgroundResource(R.color.black);\n Jun16.setBackgroundResource(R.color.black);\n Jun17.setBackgroundResource(R.color.black);\n Jun18.setBackgroundResource(R.color.black);\n Jun19.setBackgroundResource(R.color.black);\n Jun20.setBackgroundResource(R.color.black);\n Jun21.setBackgroundResource(R.color.black);\n Jun22.setBackgroundResource(R.color.black);\n Jun23.setBackgroundResource(R.color.black);\n Jun24.setBackgroundResource(R.color.black);\n Jun25.setBackgroundResource(R.color.black);\n Jun26.setBackgroundResource(R.color.black);\n Jun27.setBackgroundResource(R.color.black);\n Jun28.setBackgroundResource(R.color.black);\n Jun29.setBackgroundResource(R.color.black);\n Jun30.setBackgroundResource(R.color.black);\n Jul1.setBackgroundResource(R.color.black);\n Jul2.setBackgroundResource(R.color.black);\n Jul3.setBackgroundResource(R.color.black);\n Jul4.setBackgroundResource(R.color.black);\n Jul5.setBackgroundResource(R.color.black);\n Jul6.setBackgroundResource(R.color.black);\n Jul7.setBackgroundResource(R.color.black);\n Jul8.setBackgroundResource(R.color.black);\n Jul9.setBackgroundResource(R.color.black);\n Jul10.setBackgroundResource(R.color.black);\n Jul11.setBackgroundResource(R.color.black);\n Jul12.setBackgroundResource(R.color.black);\n Jul13.setBackgroundResource(R.color.black);\n Jul14.setBackgroundResource(R.color.black);\n Jul15.setBackgroundResource(R.color.black);\n Jul16.setBackgroundResource(R.color.black);\n Jul17.setBackgroundResource(R.color.black);\n Jul18.setBackgroundResource(R.color.black);\n Jul19.setBackgroundResource(R.color.black);\n Jul20.setBackgroundResource(R.color.black);\n Jul21.setBackgroundResource(R.color.black);\n Jul22.setBackgroundResource(R.color.black);\n Jul23.setBackgroundResource(R.color.black);\n Jul24.setBackgroundResource(R.color.black);\n Jul25.setBackgroundResource(R.color.black);\n Jul26.setBackgroundResource(R.color.black);\n Jul27.setBackgroundResource(R.color.black);\n Jul28.setBackgroundResource(R.color.black);\n Jul29.setBackgroundResource(R.color.black);\n Jul30.setBackgroundResource(R.color.black);\n Jul31.setBackgroundResource(R.color.black);\n Aug1.setBackgroundResource(R.color.black);\n Aug2.setBackgroundResource(R.color.black);\n Aug3.setBackgroundResource(R.color.black);\n Aug4.setBackgroundResource(R.color.black);\n Aug5.setBackgroundResource(R.color.black);\n Aug6.setBackgroundResource(R.color.black);\n Aug7.setBackgroundResource(R.color.black);\n Aug8.setBackgroundResource(R.color.black);\n Aug9.setBackgroundResource(R.color.black);\n Aug10.setBackgroundResource(R.color.black);\n Aug11.setBackgroundResource(R.color.black);\n Aug12.setBackgroundResource(R.color.black);\n Aug13.setBackgroundResource(R.color.black);\n Aug14.setBackgroundResource(R.color.black);\n Aug15.setBackgroundResource(R.color.black);\n Aug16.setBackgroundResource(R.color.black);\n Aug17.setBackgroundResource(R.color.black);\n Aug18.setBackgroundResource(R.color.black);\n Aug19.setBackgroundResource(R.color.black);\n Aug20.setBackgroundResource(R.color.black);\n Aug21.setBackgroundResource(R.color.black);\n Aug22.setBackgroundResource(R.color.black);\n Aug23.setBackgroundResource(R.color.black);\n Aug24.setBackgroundResource(R.color.black);\n Aug25.setBackgroundResource(R.color.black);\n Aug26.setBackgroundResource(R.color.black);\n Aug27.setBackgroundResource(R.color.black);\n Aug28.setBackgroundResource(R.color.black);\n Aug29.setBackgroundResource(R.color.black);\n Aug30.setBackgroundResource(R.color.black);\n Aug31.setBackgroundResource(R.color.black);\n Sep1.setBackgroundResource(R.color.black);\n Sep2.setBackgroundResource(R.color.black);\n Sep3.setBackgroundResource(R.color.black);\n Sep4.setBackgroundResource(R.color.black);\n Sep5.setBackgroundResource(R.color.black);\n Sep6.setBackgroundResource(R.color.black);\n Sep7.setBackgroundResource(R.color.black);\n Sep8.setBackgroundResource(R.color.black);\n Sep9.setBackgroundResource(R.color.black);\n Sep10.setBackgroundResource(R.color.black);\n Sep11.setBackgroundResource(R.color.black);\n Sep12.setBackgroundResource(R.color.black);\n Sep13.setBackgroundResource(R.color.black);\n Sep14.setBackgroundResource(R.color.black);\n Sep15.setBackgroundResource(R.color.black);\n Sep16.setBackgroundResource(R.color.black);\n Sep17.setBackgroundResource(R.color.black);\n Sep18.setBackgroundResource(R.color.black);\n Sep19.setBackgroundResource(R.color.black);\n Sep20.setBackgroundResource(R.color.black);\n Sep21.setBackgroundResource(R.color.black);\n Sep22.setBackgroundResource(R.color.black);\n Sep23.setBackgroundResource(R.color.black);\n Sep24.setBackgroundResource(R.color.black);\n Sep25.setBackgroundResource(R.color.black);\n Sep26.setBackgroundResource(R.color.black);\n Sep27.setBackgroundResource(R.color.black);\n Sep28.setBackgroundResource(R.color.black);\n Sep29.setBackgroundResource(R.color.black);\n Sep30.setBackgroundResource(R.color.black);\n Oct1.setBackgroundResource(R.color.black);\n Oct2.setBackgroundResource(R.color.black);\n Oct3.setBackgroundResource(R.color.black);\n Oct4.setBackgroundResource(R.color.black);\n Oct5.setBackgroundResource(R.color.black);\n Oct6.setBackgroundResource(R.color.black);\n Oct7.setBackgroundResource(R.color.black);\n Oct8.setBackgroundResource(R.color.black);\n Oct9.setBackgroundResource(R.color.black);\n Oct10.setBackgroundResource(R.color.black);\n Oct11.setBackgroundResource(R.color.black);\n Oct12.setBackgroundResource(R.color.black);\n Oct13.setBackgroundResource(R.color.black);\n Oct14.setBackgroundResource(R.color.black);\n Oct15.setBackgroundResource(R.color.black);\n Oct16.setBackgroundResource(R.color.black);\n Oct17.setBackgroundResource(R.color.black);\n Oct18.setBackgroundResource(R.color.black);\n Oct19.setBackgroundResource(R.color.black);\n Oct20.setBackgroundResource(R.color.black);\n Oct21.setBackgroundResource(R.color.black);\n Oct22.setBackgroundResource(R.color.black);\n Oct23.setBackgroundResource(R.color.black);\n Oct24.setBackgroundResource(R.color.black);\n Oct25.setBackgroundResource(R.color.black);\n Oct26.setBackgroundResource(R.color.black);\n Oct27.setBackgroundResource(R.color.black);\n Oct28.setBackgroundResource(R.color.black);\n Oct29.setBackgroundResource(R.color.black);\n Oct30.setBackgroundResource(R.color.black);\n Oct31.setBackgroundResource(R.color.black);\n Nov1.setBackgroundResource(R.color.black);\n Nov2.setBackgroundResource(R.color.black);\n Nov3.setBackgroundResource(R.color.black);\n Nov4.setBackgroundResource(R.color.black);\n Nov5.setBackgroundResource(R.color.black);\n Nov6.setBackgroundResource(R.color.black);\n Nov7.setBackgroundResource(R.color.black);\n Nov8.setBackgroundResource(R.color.black);\n Nov9.setBackgroundResource(R.color.black);\n Nov10.setBackgroundResource(R.color.black);\n Nov11.setBackgroundResource(R.color.black);\n Nov12.setBackgroundResource(R.color.black);\n Nov13.setBackgroundResource(R.color.black);\n Nov14.setBackgroundResource(R.color.black);\n Nov15.setBackgroundResource(R.color.black);\n Nov16.setBackgroundResource(R.color.black);\n Nov17.setBackgroundResource(R.color.black);\n Nov18.setBackgroundResource(R.color.black);\n Nov19.setBackgroundResource(R.color.black);\n Nov20.setBackgroundResource(R.color.black);\n Nov21.setBackgroundResource(R.color.black);\n Nov22.setBackgroundResource(R.color.black);\n Nov23.setBackgroundResource(R.color.black);\n Nov24.setBackgroundResource(R.color.black);\n Nov25.setBackgroundResource(R.color.black);\n Nov26.setBackgroundResource(R.color.black);\n Nov27.setBackgroundResource(R.color.black);\n Nov28.setBackgroundResource(R.color.black);\n Nov29.setBackgroundResource(R.color.black);\n Nov30.setBackgroundResource(R.color.black);\n Dec1.setBackgroundResource(R.color.black);\n Dec2.setBackgroundResource(R.color.black);\n Dec3.setBackgroundResource(R.color.black);\n Dec4.setBackgroundResource(R.color.black);\n Dec5.setBackgroundResource(R.color.black);\n Dec6.setBackgroundResource(R.color.black);\n Dec7.setBackgroundResource(R.color.black);\n Dec8.setBackgroundResource(R.color.black);\n Dec9.setBackgroundResource(R.color.black);\n Dec10.setBackgroundResource(R.color.black);\n Dec11.setBackgroundResource(R.color.black);\n Dec12.setBackgroundResource(R.color.black);\n Dec13.setBackgroundResource(R.color.black);\n Dec14.setBackgroundResource(R.color.black);\n Dec15.setBackgroundResource(R.color.black);\n Dec16.setBackgroundResource(R.color.black);\n Dec17.setBackgroundResource(R.color.black);\n Dec18.setBackgroundResource(R.color.black);\n Dec19.setBackgroundResource(R.color.black);\n Dec20.setBackgroundResource(R.color.black);\n Dec21.setBackgroundResource(R.color.black);\n Dec22.setBackgroundResource(R.color.black);\n Dec23.setBackgroundResource(R.color.black);\n Dec24.setBackgroundResource(R.color.black);\n Dec25.setBackgroundResource(R.color.black);\n Dec26.setBackgroundResource(R.color.black);\n Dec27.setBackgroundResource(R.color.black);\n Dec28.setBackgroundResource(R.color.black);\n Dec29.setBackgroundResource(R.color.black);\n Dec30.setBackgroundResource(R.color.black);\n Dec31.setBackgroundResource(R.color.black);\n\n /* Sets active date */\n switch (currentDateSelection) {\n case \"1/1\":\n Jan1.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan1);\n readDatabase();\n break;\n case \"1/2\":\n Jan2.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan1);\n break;\n case \"1/3\":\n Jan3.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan1);\n break;\n case \"1/4\":\n Jan4.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan2);\n break;\n case \"1/5\":\n Jan5.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan3);\n break;\n case \"1/6\":\n Jan6.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan4);\n break;\n case \"1/7\":\n Jan7.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan5);\n break;\n case \"1/8\":\n Jan8.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan6);\n break;\n case \"1/9\":\n Jan9.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan7);\n break;\n case \"1/10\":\n Jan10.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan8);\n break;\n case \"1/11\":\n Jan11.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan9);\n break;\n case \"1/12\":\n Jan12.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan10);\n break;\n case \"1/13\":\n Jan13.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan11);\n break;\n case \"1/14\":\n Jan14.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan12);\n break;\n case \"1/15\":\n Jan15.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan13);\n break;\n case \"1/16\":\n Jan16.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan14);\n break;\n case \"1/17\":\n Jan17.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan15);\n break;\n case \"1/18\":\n Jan18.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan16);\n break;\n case \"1/19\":\n Jan19.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan17);\n break;\n case \"1/20\":\n Jan20.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan18);\n break;\n case \"1/21\":\n Jan21.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan19);\n break;\n case \"1/22\":\n Jan22.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan20);\n break;\n case \"1/23\":\n Jan23.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan21);\n break;\n case \"1/24\":\n Jan24.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan22);\n break;\n case \"1/25\":\n Jan25.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan23);\n break;\n case \"1/26\":\n Jan26.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan24);\n break;\n case \"1/27\":\n Jan27.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan25);\n break;\n case \"1/28\":\n Jan28.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan26);\n break;\n case \"1/29\":\n Jan29.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan27);\n break;\n case \"1/30\":\n Jan30.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan28);\n break;\n case \"1/31\":\n Jan31.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan29);\n break;\n case \"2/1\":\n Feb1.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan30);\n break;\n case \"2/2\":\n Feb2.setBackgroundResource(R.color.darkGray);\n focusOnView(Jan31);\n break;\n case \"2/3\":\n Feb3.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb1);\n break;\n case \"2/4\":\n Feb4.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb2);\n break;\n case \"2/5\":\n Feb5.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb3);\n break;\n case \"2/6\":\n Feb6.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb4);\n break;\n case \"2/7\":\n Feb7.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb5);\n break;\n case \"2/8\":\n Feb8.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb6);\n break;\n case \"2/9\":\n Feb9.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb7);\n break;\n case \"2/10\":\n Feb10.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb8);\n break;\n case \"2/11\":\n Feb11.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb9);\n break;\n case \"2/12\":\n Feb12.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb10);\n break;\n case \"2/13\":\n Feb13.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb11);\n break;\n case \"2/14\":\n Feb14.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb12);\n break;\n case \"2/15\":\n Feb15.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb13);\n break;\n case \"2/16\":\n Feb16.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb14);\n break;\n case \"2/17\":\n Feb17.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb15);\n break;\n case \"2/18\":\n Feb18.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb16);\n break;\n case \"2/19\":\n Feb19.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb17);\n break;\n case \"2/20\":\n Feb20.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb18);\n break;\n case \"2/21\":\n Feb21.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb19);\n break;\n case \"2/22\":\n Feb22.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb20);\n break;\n case \"2/23\":\n Feb23.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb21);\n break;\n case \"2/24\":\n Feb24.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb22);\n break;\n case \"2/25\":\n Feb25.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb23);\n break;\n case \"2/26\":\n Feb26.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb24);\n break;\n case \"2/27\":\n Feb27.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb25);\n break;\n case \"2/28\":\n Feb28.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb26);\n break;\n case \"2/29\":\n Feb29.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb27);\n break;\n case \"3/1\":\n Mar1.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb28);\n break;\n case \"3/2\":\n Mar2.setBackgroundResource(R.color.darkGray);\n focusOnView(Feb29);\n break;\n case \"3/3\":\n Mar3.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar1);\n break;\n case \"3/4\":\n Mar4.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar2);\n break;\n case \"3/5\":\n Mar5.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar3);\n break;\n case \"3/6\":\n Mar6.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar4);\n break;\n case \"3/7\":\n Mar7.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar5);\n break;\n case \"3/8\":\n Mar8.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar6);\n break;\n case \"3/9\":\n Mar9.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar7);\n break;\n case \"3/10\":\n Mar10.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar8);\n break;\n case \"3/11\":\n Mar11.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar9);\n break;\n case \"3/12\":\n Mar12.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar10);\n break;\n case \"3/13\":\n Mar13.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar11);\n break;\n case \"3/14\":\n Mar14.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar12);\n break;\n case \"3/15\":\n Mar15.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar13);\n break;\n case \"3/16\":\n Mar16.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar14);\n break;\n case \"3/17\":\n Mar17.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar15);\n break;\n case \"3/18\":\n Mar18.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar16);\n break;\n case \"3/19\":\n Mar19.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar17);\n break;\n case \"3/20\":\n Mar20.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar18);\n break;\n case \"3/21\":\n Mar21.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar19);\n break;\n case \"3/22\":\n Mar22.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar20);\n break;\n case \"3/23\":\n Mar23.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar21);\n break;\n case \"3/24\":\n Mar24.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar22);\n break;\n case \"3/25\":\n Mar25.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar23);\n break;\n case \"3/26\":\n Mar26.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar24);\n break;\n case \"3/27\":\n Mar27.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar25);\n break;\n case \"3/28\":\n Mar28.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar26);\n break;\n case \"3/29\":\n Mar29.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar27);\n break;\n case \"3/30\":\n Mar30.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar28);\n break;\n case \"3/31\":\n Mar31.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar29);\n break;\n case \"4/1\":\n Apr1.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar30);\n break;\n case \"4/2\":\n Apr2.setBackgroundResource(R.color.darkGray);\n focusOnView(Mar31);\n break;\n case \"4/3\":\n Apr3.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr1);\n break;\n case \"4/4\":\n Apr4.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr2);\n break;\n case \"4/5\":\n Apr5.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr3);\n break;\n case \"4/6\":\n Apr6.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr4);\n break;\n case \"4/7\":\n Apr7.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr5);\n break;\n case \"4/8\":\n Apr8.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr6);\n break;\n case \"4/9\":\n Apr9.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr7);\n break;\n case \"4/10\":\n Apr10.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr8);\n break;\n case \"4/11\":\n Apr11.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr9);\n break;\n case \"4/12\":\n Apr12.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr10);\n break;\n case \"4/13\":\n Apr13.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr11);\n break;\n case \"4/14\":\n Apr14.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr12);\n break;\n case \"4/15\":\n Apr15.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr13);\n break;\n case \"4/16\":\n Apr16.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr14);\n break;\n case \"4/17\":\n Apr17.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr15);\n break;\n case \"4/18\":\n Apr18.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr16);\n break;\n case \"4/19\":\n Apr19.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr17);\n break;\n case \"4/20\":\n Apr20.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr18);\n break;\n case \"4/21\":\n Apr21.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr19);\n break;\n case \"4/22\":\n Apr22.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr20);\n break;\n case \"4/23\":\n Apr23.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr21);\n break;\n case \"4/24\":\n Apr24.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr22);\n break;\n case \"4/25\":\n Apr25.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr23);\n break;\n case \"4/26\":\n Apr26.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr24);\n break;\n case \"4/27\":\n Apr27.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr25);\n break;\n case \"4/28\":\n Apr28.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr26);\n break;\n case \"4/29\":\n Apr29.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr27);\n break;\n case \"4/30\":\n Apr30.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr28);\n break;\n case \"5/1\":\n May1.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr29);\n break;\n case \"5/2\":\n May2.setBackgroundResource(R.color.darkGray);\n focusOnView(Apr30);\n break;\n case \"5/3\":\n May3.setBackgroundResource(R.color.darkGray);\n focusOnView(May1);\n break;\n case \"5/4\":\n May4.setBackgroundResource(R.color.darkGray);\n focusOnView(May2);\n break;\n case \"5/5\":\n May5.setBackgroundResource(R.color.darkGray);\n focusOnView(May3);\n break;\n case \"5/6\":\n May6.setBackgroundResource(R.color.darkGray);\n focusOnView(May4);\n break;\n case \"5/7\":\n May7.setBackgroundResource(R.color.darkGray);\n focusOnView(May5);\n break;\n case \"5/8\":\n May8.setBackgroundResource(R.color.darkGray);\n focusOnView(May6);\n break;\n case \"5/9\":\n May9.setBackgroundResource(R.color.darkGray);\n focusOnView(May7);\n break;\n case \"5/10\":\n May10.setBackgroundResource(R.color.darkGray);\n focusOnView(May8);\n break;\n case \"5/11\":\n May11.setBackgroundResource(R.color.darkGray);\n focusOnView(May9);\n break;\n case \"5/12\":\n May12.setBackgroundResource(R.color.darkGray);\n focusOnView(May10);\n break;\n case \"5/13\":\n May13.setBackgroundResource(R.color.darkGray);\n focusOnView(May11);\n break;\n case \"5/14\":\n May14.setBackgroundResource(R.color.darkGray);\n focusOnView(May12);\n break;\n case \"5/15\":\n May15.setBackgroundResource(R.color.darkGray);\n focusOnView(May13);\n break;\n case \"5/16\":\n May16.setBackgroundResource(R.color.darkGray);\n focusOnView(May14);\n break;\n case \"5/17\":\n May17.setBackgroundResource(R.color.darkGray);\n focusOnView(May15);\n break;\n case \"5/18\":\n May18.setBackgroundResource(R.color.darkGray);\n focusOnView(May16);\n break;\n case \"5/19\":\n May19.setBackgroundResource(R.color.darkGray);\n focusOnView(May17);\n break;\n case \"5/20\":\n May20.setBackgroundResource(R.color.darkGray);\n focusOnView(May18);\n break;\n case \"5/21\":\n May21.setBackgroundResource(R.color.darkGray);\n focusOnView(May19);\n break;\n case \"5/22\":\n May22.setBackgroundResource(R.color.darkGray);\n focusOnView(May20);\n break;\n case \"5/23\":\n May23.setBackgroundResource(R.color.darkGray);\n focusOnView(May21);\n break;\n case \"5/24\":\n May24.setBackgroundResource(R.color.darkGray);\n focusOnView(May22);\n break;\n case \"5/25\":\n May25.setBackgroundResource(R.color.darkGray);\n focusOnView(May23);\n break;\n case \"5/26\":\n May26.setBackgroundResource(R.color.darkGray);\n focusOnView(May24);\n break;\n case \"5/27\":\n May27.setBackgroundResource(R.color.darkGray);\n focusOnView(May25);\n break;\n case \"5/28\":\n May28.setBackgroundResource(R.color.darkGray);\n focusOnView(May26);\n break;\n case \"5/29\":\n May29.setBackgroundResource(R.color.darkGray);\n focusOnView(May27);\n break;\n case \"5/30\":\n May30.setBackgroundResource(R.color.darkGray);\n focusOnView(May28);\n break;\n case \"5/31\":\n May31.setBackgroundResource(R.color.darkGray);\n focusOnView(May29);\n break;\n case \"6/1\":\n Jun1.setBackgroundResource(R.color.darkGray);\n focusOnView(May30);\n break;\n case \"6/2\":\n Jun2.setBackgroundResource(R.color.darkGray);\n focusOnView(May31);\n break;\n case \"6/3\":\n Jun3.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun1);\n break;\n case \"6/4\":\n Jun4.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun2);\n break;\n case \"6/5\":\n Jun5.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun3);\n break;\n case \"6/6\":\n Jun6.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun4);\n break;\n case \"6/7\":\n Jun7.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun5);\n break;\n case \"6/8\":\n Jun8.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun6);\n break;\n case \"6/9\":\n Jun9.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun7);\n break;\n case \"6/10\":\n Jun10.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun8);\n break;\n case \"6/11\":\n Jun11.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun9);\n break;\n case \"6/12\":\n Jun12.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun10);\n break;\n case \"6/13\":\n Jun13.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun11);\n break;\n case \"6/14\":\n Jun14.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun12);\n break;\n case \"6/15\":\n Jun15.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun13);\n break;\n case \"6/16\":\n Jun16.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun14);\n break;\n case \"6/17\":\n Jun17.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun15);\n break;\n case \"6/18\":\n Jun18.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun16);\n break;\n case \"6/19\":\n Jun19.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun17);\n break;\n case \"6/20\":\n Jun20.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun18);\n break;\n case \"6/21\":\n Jun21.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun19);\n break;\n case \"6/22\":\n Jun22.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun20);\n break;\n case \"6/23\":\n Jun23.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun21);\n break;\n case \"6/24\":\n Jun24.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun22);\n break;\n case \"6/25\":\n Jun25.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun23);\n break;\n case \"6/26\":\n Jun26.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun24);\n break;\n case \"6/27\":\n Jun27.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun25);\n break;\n case \"6/28\":\n Jun28.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun26);\n break;\n case \"6/29\":\n Jun29.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun27);\n break;\n case \"6/30\":\n Jun30.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun28);\n break;\n case \"7/1\":\n Jul1.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun29);\n break;\n case \"7/2\":\n Jul2.setBackgroundResource(R.color.darkGray);\n focusOnView(Jun30);\n break;\n case \"7/3\":\n Jul3.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul1);\n break;\n case \"7/4\":\n Jul4.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul2);\n break;\n case \"7/5\":\n Jul5.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul3);\n break;\n case \"7/6\":\n Jul6.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul4);\n break;\n case \"7/7\":\n Jul7.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul5);\n break;\n case \"7/8\":\n Jul8.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul6);\n break;\n case \"7/9\":\n Jul9.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul7);\n break;\n case \"7/10\":\n Jul10.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul8);\n break;\n case \"7/11\":\n Jul11.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul9);\n break;\n case \"7/12\":\n Jul12.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul10);\n break;\n case \"7/13\":\n Jul13.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul11);\n break;\n case \"7/14\":\n Jul14.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul12);\n break;\n case \"7/15\":\n Jul15.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul13);\n break;\n case \"7/16\":\n Jul16.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul14);\n break;\n case \"7/17\":\n Jul17.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul15);\n break;\n case \"7/18\":\n Jul18.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul16);\n break;\n case \"7/19\":\n Jul19.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul17);\n break;\n case \"7/20\":\n Jul20.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul18);\n break;\n case \"7/21\":\n Jul21.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul19);\n break;\n case \"7/22\":\n Jul22.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul20);\n break;\n case \"7/23\":\n Jul23.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul21);\n break;\n case \"7/24\":\n Jul24.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul22);\n break;\n case \"7/25\":\n Jul25.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul23);\n break;\n case \"7/26\":\n Jul26.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul24);\n break;\n case \"7/27\":\n Jul27.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul25);\n break;\n case \"7/28\":\n Jul28.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul26);\n break;\n case \"7/29\":\n Jul29.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul27);\n break;\n case \"7/30\":\n Jul30.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul28);\n break;\n case \"7/31\":\n Jul31.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul29);\n break;\n case \"8/1\":\n Aug1.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul30);\n break;\n case \"8/2\":\n Aug2.setBackgroundResource(R.color.darkGray);\n focusOnView(Jul31);\n break;\n case \"8/3\":\n Aug3.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug1);\n break;\n case \"8/4\":\n Aug4.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug2);\n break;\n case \"8/5\":\n Aug5.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug3);\n break;\n case \"8/6\":\n Aug6.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug4);\n break;\n case \"8/7\":\n Aug7.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug5);\n break;\n case \"8/8\":\n Aug8.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug6);\n break;\n case \"8/9\":\n Aug9.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug7);\n break;\n case \"8/10\":\n Aug10.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug8);\n break;\n case \"8/11\":\n Aug11.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug9);\n break;\n case \"8/12\":\n Aug12.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug10);\n break;\n case \"8/13\":\n Aug13.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug11);\n break;\n case \"8/14\":\n Aug14.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug12);\n break;\n case \"8/15\":\n Aug15.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug13);\n break;\n case \"8/16\":\n Aug16.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug14);\n break;\n case \"8/17\":\n Aug17.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug15);\n break;\n case \"8/18\":\n Aug18.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug16);\n break;\n case \"8/19\":\n Aug19.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug17);\n break;\n case \"8/20\":\n Aug20.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug18);\n break;\n case \"8/21\":\n Aug21.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug19);\n break;\n case \"8/22\":\n Aug22.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug20);\n break;\n case \"8/23\":\n Aug23.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug21);\n break;\n case \"8/24\":\n Aug24.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug22);\n break;\n case \"8/25\":\n Aug25.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug23);\n break;\n case \"8/26\":\n Aug26.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug24);\n break;\n case \"8/27\":\n Aug27.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug25);\n break;\n case \"8/28\":\n Aug28.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug26);\n break;\n case \"8/29\":\n Aug29.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug27);\n break;\n case \"8/30\":\n Aug30.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug28);\n break;\n case \"8/31\":\n Aug31.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug29);\n break;\n case \"9/1\":\n Sep1.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug30);\n break;\n case \"9/2\":\n Sep2.setBackgroundResource(R.color.darkGray);\n focusOnView(Aug31);\n break;\n case \"9/3\":\n Sep3.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep1);\n break;\n case \"9/4\":\n Sep4.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep2);\n break;\n case \"9/5\":\n Sep5.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep3);\n break;\n case \"9/6\":\n Sep6.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep4);\n break;\n case \"9/7\":\n Sep7.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep5);\n break;\n case \"9/8\":\n Sep8.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep6);\n break;\n case \"9/9\":\n Sep9.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep7);\n break;\n case \"9/10\":\n Sep10.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep8);\n break;\n case \"9/11\":\n Sep11.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep9);\n break;\n case \"9/12\":\n Sep12.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep10);\n break;\n case \"9/13\":\n Sep13.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep11);\n break;\n case \"9/14\":\n Sep14.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep12);\n break;\n case \"9/15\":\n Sep15.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep13);\n break;\n case \"9/16\":\n Sep16.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep14);\n break;\n case \"9/17\":\n Sep17.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep15);\n break;\n case \"9/18\":\n Sep18.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep16);\n break;\n case \"9/19\":\n Sep19.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep17);\n break;\n case \"9/20\":\n Sep20.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep18);\n break;\n case \"9/21\":\n Sep21.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep19);\n break;\n case \"9/22\":\n Sep22.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep20);\n break;\n case \"9/23\":\n Sep23.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep21);\n break;\n case \"9/24\":\n Sep24.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep22);\n break;\n case \"9/25\":\n Sep25.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep23);\n break;\n case \"9/26\":\n Sep26.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep24);\n break;\n case \"9/27\":\n Sep27.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep25);\n break;\n case \"9/28\":\n Sep28.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep26);\n break;\n case \"9/29\":\n Sep29.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep27);\n break;\n case \"9/30\":\n Sep30.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep28);\n break;\n case \"10/1\":\n Oct1.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep29);\n break;\n case \"10/2\":\n Oct2.setBackgroundResource(R.color.darkGray);\n focusOnView(Sep30);\n break;\n case \"10/3\":\n Oct3.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct1);\n break;\n case \"10/4\":\n Oct4.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct2);\n break;\n case \"10/5\":\n Oct5.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct3);\n break;\n case \"10/6\":\n Oct6.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct4);\n break;\n case \"10/7\":\n Oct7.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct5);\n break;\n case \"10/8\":\n Oct8.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct6);\n break;\n case \"10/9\":\n Oct9.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct7);\n break;\n case \"10/10\":\n Oct10.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct8);\n break;\n case \"10/11\":\n Oct11.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct9);\n break;\n case \"10/12\":\n Oct12.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct10);\n break;\n case \"10/13\":\n Oct13.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct11);\n break;\n case \"10/14\":\n Oct14.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct12);\n break;\n case \"10/15\":\n Oct15.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct13);\n break;\n case \"10/16\":\n Oct16.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct14);\n break;\n case \"10/17\":\n Oct17.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct15);\n break;\n case \"10/18\":\n Oct18.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct16);\n break;\n case \"10/19\":\n Oct19.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct17);\n break;\n case \"10/20\":\n Oct20.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct18);\n break;\n case \"10/21\":\n Oct21.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct19);\n break;\n case \"10/22\":\n Oct22.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct20);\n break;\n case \"10/23\":\n Oct23.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct21);\n break;\n case \"10/24\":\n Oct24.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct22);\n break;\n case \"10/25\":\n Oct25.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct23);\n break;\n case \"10/26\":\n Oct26.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct24);\n break;\n case \"10/27\":\n Oct27.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct25);\n break;\n case \"10/28\":\n Oct28.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct26);\n break;\n case \"10/29\":\n Oct29.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct27);\n break;\n case \"10/30\":\n Oct30.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct28);\n break;\n case \"10/31\":\n Oct31.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct29);\n break;\n case \"11/1\":\n Nov1.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct30);\n break;\n case \"11/2\":\n Nov2.setBackgroundResource(R.color.darkGray);\n focusOnView(Oct31);\n break;\n case \"11/3\":\n Nov3.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov1);\n break;\n case \"11/4\":\n Nov4.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov2);\n break;\n case \"11/5\":\n Nov5.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov3);\n break;\n case \"11/6\":\n Nov6.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov4);\n break;\n case \"11/7\":\n Nov7.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov5);\n break;\n case \"11/8\":\n Nov8.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov6);\n break;\n case \"11/9\":\n Nov9.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov7);\n break;\n case \"11/10\":\n Nov10.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov8);\n break;\n case \"11/11\":\n Nov11.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov9);\n break;\n case \"11/12\":\n Nov12.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov10);\n break;\n case \"11/13\":\n Nov13.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov11);\n break;\n case \"11/14\":\n Nov14.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov12);\n break;\n case \"11/15\":\n Nov15.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov13);\n break;\n case \"11/16\":\n Nov16.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov14);\n break;\n case \"11/17\":\n Nov17.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov15);\n break;\n case \"11/18\":\n Nov18.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov16);\n break;\n case \"11/19\":\n Nov19.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov17);\n break;\n case \"11/20\":\n Nov20.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov18);\n break;\n case \"11/21\":\n Nov21.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov19);\n break;\n case \"11/22\":\n Nov22.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov20);\n break;\n case \"11/23\":\n Nov23.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov21);\n break;\n case \"11/24\":\n Nov24.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov22);\n break;\n case \"11/25\":\n Nov25.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov23);\n break;\n case \"11/26\":\n Nov26.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov24);\n break;\n case \"11/27\":\n Nov27.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov25);\n break;\n case \"11/28\":\n Nov28.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov26);\n break;\n case \"11/29\":\n Nov29.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov27);\n break;\n case \"11/30\":\n Nov30.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov28);\n break;\n case \"12/1\":\n Dec1.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov29);\n break;\n case \"12/2\":\n Dec2.setBackgroundResource(R.color.darkGray);\n focusOnView(Nov30);\n break;\n case \"12/3\":\n Dec3.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec1);\n break;\n case \"12/4\":\n Dec4.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec2);\n break;\n case \"12/5\":\n Dec5.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec3);\n break;\n case \"12/6\":\n Dec6.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec4);\n break;\n case \"12/7\":\n Dec7.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec5);\n break;\n case \"12/8\":\n Dec8.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec6);\n break;\n case \"12/9\":\n Dec9.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec7);\n break;\n case \"12/10\":\n Dec10.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec8);\n break;\n case \"12/11\":\n Dec11.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec9);\n break;\n case \"12/12\":\n Dec12.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec10);\n break;\n case \"12/13\":\n Dec13.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec11);\n break;\n case \"12/14\":\n Dec14.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec12);\n //readDatabase();\n break;\n case \"12/15\":\n Dec15.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec13);\n break;\n case \"12/16\":\n Dec16.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec14);\n break;\n case \"12/17\":\n Dec17.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec15);\n break;\n case \"12/18\":\n Dec18.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec16);\n break;\n case \"12/19\":\n Dec19.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec17);\n break;\n case \"12/20\":\n Dec20.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec18);\n break;\n case \"12/21\":\n Dec21.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec19);\n break;\n case \"12/22\":\n Dec22.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec20);\n break;\n case \"12/23\":\n Dec23.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec21);\n break;\n case \"12/24\":\n Dec24.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec22);\n break;\n case \"12/25\":\n Dec25.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec23);\n break;\n case \"12/26\":\n Dec26.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec24);\n break;\n case \"12/27\":\n Dec27.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec25);\n break;\n case \"12/28\":\n Dec28.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec26);\n break;\n case \"12/29\":\n Dec29.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec27);\n break;\n case \"12/30\":\n Dec30.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec28);\n break;\n case \"12/31\":\n Dec31.setBackgroundResource(R.color.darkGray);\n focusOnView(Dec29);\n break;\n default:\n wodTest.setText(\"Error\");\n break;\n }\n\n\n\n }", "public GridCellAdapter(Context context, int textViewResourceId,\n\t\t\t\tint month, int year) {\n\t\t\tsuper();\n\t\t\tthis._context = context;\n\t\t\tthis.list = new ArrayList<String>();\n\t\t\tLog.d(tag, \"==> Passed in Date FOR Month: \" + month + \" \"+ \"Year: \" + year);\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tsetCurrentDayOfMonth(calendar.get(Calendar.DAY_OF_MONTH));\n\t\t\tsetCurrentWeekDay(calendar.get(Calendar.DAY_OF_WEEK));\n\t\t\tLog.d(tag, \"New Calendar:= \" + calendar.getTime().toString());\n\t\t\tLog.d(tag, \"CurrentDayOfWeek :\" + getCurrentWeekDay());\n\t\t\tLog.d(tag, \"CurrentDayOfMonth :\" + getCurrentDayOfMonth());\n\n\t\t\t// Print Month\n\t\t\tprintMonth(month+1, year);\n\n\t\t\t// Find Number of Events\n\t\t\teventsPerMonthMap = findNumberOfEventsPerMonth(year, month);\n\t\t}", "public void setMonths(int months) {\n this.months = months;\n }", "public void refreshReportLastMonths(){\n String tagName = \"android:switcher:\" + R.id.timer_pager + \":\" + 1; // Your pager name & tab no of Second Fragment\n //Get SecondFragment object from FirstFragment\n ReportLastMonthsFragment fragLastMonths = (ReportLastMonthsFragment) getSupportFragmentManager().findFragmentByTag(tagName);\n fragLastMonths.animateChart();\n }", "public void run() {\n printMonthNameByNumber();\n }", "private void monthChanged(int oldMonthValue, int oldYearValue) {\r\n updateControlsFromTable();\r\n\r\n // fire property change\r\n firePropertyChange(MONTH_PROPERTY, oldMonthValue, getMonth());\r\n int newYearValue = getYear();\r\n if (oldYearValue != newYearValue) {\r\n firePropertyChange(YEAR_PROPERTY, oldYearValue, newYearValue);\r\n }\r\n\r\n // clear selection when changing the month in view\r\n calendarTable.getSelectionModel().clearSelection();\r\n\r\n calendarTable.repaint();\r\n }", "private static void printMonthHeader(int month, int year) {\n System.out.printf(\" %s %d\\n\", monthNames[month - 1], year);\n for (String d : dayNames) {\n System.out.printf(\" %s \", d);\n }\n System.out.println();\n }", "private void milestonesLayoutHandler() {\n layoutMilestones = (LinearLayout) findViewById(R.id.layoutMilestones);\n txtViewMilestonesCountToday = (AutoResizeTextView) findViewById(R.id.txtViewMilestonesCountToday);\n txtMilestonesYesterdayValue = (TextView) findViewById(R.id.txtMilestonesYesterdayValue);\n\n layoutMilestones.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(context, \"Coming soon\", Toast.LENGTH_SHORT).show();\n }\n });\n\n txtViewMilestonesCountToday.setText(String.valueOf(userSharedPreferences.getInt(HPIApp.Prefs.SHARED_KEY_MILESTONES_TODAY, 0)));\n txtMilestonesYesterdayValue.setText(\"-\");\n }", "public void setMonth(Integer month) {\r\n this.month = month;\r\n }", "private void setMonthListAdapter(final ArrayList<HashMap<String, String>> monthEntryList) {\n RvAdapterMonthList adapter = new RvAdapterMonthList(monthEntryList);\n RecyclerView myView = (RecyclerView)findViewById(R.id.content_main_recyclerview);\n myView.setHasFixedSize(true);\n myView.setAdapter(adapter);\n LinearLayoutManager llm = new LinearLayoutManager(HomeActivity.this);\n llm.setOrientation(LinearLayoutManager.VERTICAL);\n myView.setLayoutManager(llm);\n\n myView.addOnItemTouchListener(\n new RecyclerItemClickListener(HomeActivity.this, myView ,new RecyclerItemClickListener.OnItemClickListener() {\n @Override public void onItemClick(View view, int position) {\n Intent i = new Intent(HomeActivity.this, MonthEntriesActivity.class);\n i.putExtra(MONTH_KEY, mMonthsList.get(position).get(MONTH_KEY));\n i.putExtra(YEAR_KEY, mMonthsList.get(position).get(YEAR_KEY));\n startActivity(i);\n }\n\n @Override public void onLongItemClick(View view, int position) {\n // do whatever\n }\n })\n );\n }", "@FXML\n private void dailyTab() {\n openReservation(false);\n openEventInfo(false, null);\n }", "@Test(dependsOnMethods = {\"shouldBeAbleToClick48Months\"})\n public void shouldBeAbleToClick60Months() {\n calculatePaymentPage.selectMonth(\"60\");\n }", "public void setMonth(int newMonth) {\n setMonth(newMonth, true);\n }", "@TargetApi(Build.VERSION_CODES.JELLY_BEAN)\n public void onCreate(Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n setTheme(R.style.AppTheme);\n setContentView(R.layout.calendar_layout); // points to calendar layout(it is shown)\n\n\n\n\n userState = new SessionState();\n\n eventDates = (ArrayList<ArrayList<String>>) getIntent().getSerializableExtra(\"saved_data\");\n Log.d(TAG, String.valueOf(eventDates.isEmpty()));\n\n myAnimationleft = AnimationUtils.loadAnimation(this, R.anim.slide_in_left);\n myAnimationright = AnimationUtils.loadAnimation(this, R.anim.slide_in_right);\n myAnimationtop = AnimationUtils.loadAnimation(this, R.anim.slide_in_top);\n myAnimationbottom = AnimationUtils.loadAnimation(this, R.anim.slide_in_bottom);\n myAnimationgrid = AnimationUtils.loadAnimation(this, R.anim.fade_in);\n\n\n prevMonth = Calendar.getInstance().get(Calendar.MONTH) - 1;\n nextMonth = Calendar.getInstance().get(Calendar.MONTH) + 1;\n CurrentMonth = Calendar.getInstance().get(Calendar.MONTH);\n CurrentYear = Calendar.getInstance().get(Calendar.YEAR);\n\n\n\n prevButton = (Button)findViewById(R.id.calendar_prev_button);\n nextButton = (Button)findViewById(R.id.calendar_next_button);\n mTitle = (TextView)findViewById(R.id.calendar_title);\n\n prevButton.setText(buttonmonths(prevMonth).substring(0,3));\n nextButton.setText(buttonmonths(nextMonth).substring(0,3));\n mTitle.setText(buttonmonths(CurrentMonth)+ \" \" + CurrentYear);\n\n// set adapter\n mGridView = (GridView) findViewById(R.id.gridview);\n mGridView.setAdapter(new CalendarAdapter(this, mGregorianCalendar, eventDates));\n mGridView.setBackgroundColor(Color.WHITE);\n mGridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n public void onItemClick(AdapterView<?> parent, View v,\n int position, long id) {\n\n if (mfirst == 0) {\n mfirst++;\n previd = v;\n previd.findViewById(R.id.grid_calendar_date).setSelected(true);\n Log.d(TAG, v.findViewById(R.id.grid_calendar_date).toString());\n } else {\n if (v.findViewById(R.id.grid_calendar_date) != previd) {\n previd.findViewById(R.id.grid_calendar_date).setSelected(false);\n previd = v;\n previd.findViewById(R.id.grid_calendar_date).setSelected(true);\n }\n }\n\n startActivity(new Intent(mainView_Activity.this, EventItemListActivity.class));\n Toast.makeText(getApplicationContext(), \"\" + position,\n Toast.LENGTH_SHORT).show();\n\n\n }\n });\n\n monday = (TextView)findViewById(R.id.monday);\n monday.setWidth(mGridView.getColumnWidth());\n\n sunday = (TextView)findViewById(R.id.sunday);\n sunday.setWidth(mGridView.getColumnWidth());\n\n tuesday = (TextView)findViewById(R.id.tuesday);\n tuesday.setWidth(mGridView.getColumnWidth());\n\n wednesday = (TextView)findViewById(R.id.wednesday);\n wednesday.setWidth(mGridView.getColumnWidth());\n\n thursday = (TextView)findViewById(R.id.thursday);\n thursday.setWidth(mGridView.getColumnWidth());\n\n friday = (TextView)findViewById(R.id.friday);\n friday.setWidth(mGridView.getColumnWidth());\n\n saturday = (TextView)findViewById(R.id.saturday);\n saturday.setWidth(mGridView.getColumnWidth());\n\n prevButton.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v)\n {\n v.startAnimation(myAnimationleft);\n nextButton.startAnimation(myAnimationright);\n mTitle.startAnimation(myAnimationbottom);\n mGridView.startAnimation(myAnimationleft);\n\n prevMonth = changingMonths(prevMonth, false);\n nextMonth = changingMonths(nextMonth, false);\n CurrentMonth = changingMonths(CurrentMonth, false);\n CurrentYear = yearCheck(CurrentMonth, false, CurrentYear);\n\n GregorianCalendar newCalendar = new GregorianCalendar(CurrentYear, CurrentMonth, getInstance().get(Calendar.DATE));\n mGridView.setAdapter(new CalendarAdapter(getApplicationContext(), newCalendar, eventDates));\n\n prevButton.setText(buttonmonths(prevMonth).substring(0, 3));\n nextButton.setText(buttonmonths(nextMonth).substring(0, 3));\n mTitle.setText(buttonmonths(CurrentMonth)+ \" \" + CurrentYear);\n\n Log.d(TAG, \"\" + prevMonth + \" \" + nextMonth + \" \" + CurrentMonth + \" \" + mGridView.getColumnWidth());\n }\n\n });\n\n nextButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n v.startAnimation(myAnimationright);\n prevButton.startAnimation(myAnimationleft);\n mTitle.startAnimation(myAnimationtop);\n mGridView.startAnimation(myAnimationright);\n\n prevMonth = changingMonths(prevMonth , true);\n nextMonth = changingMonths(nextMonth , true);\n CurrentMonth = changingMonths(CurrentMonth, true);\n CurrentYear = yearCheck(CurrentMonth, true, CurrentYear);\n\n GregorianCalendar newCalendar = new GregorianCalendar(CurrentYear, CurrentMonth, getInstance().get(Calendar.DATE));\n mGridView.setAdapter(new CalendarAdapter(getApplicationContext(), newCalendar, eventDates));\n\n prevButton.setText(buttonmonths(prevMonth).substring(0, 3));\n nextButton.setText(buttonmonths(nextMonth).substring(0, 3));\n mTitle.setText(buttonmonths(CurrentMonth)+ \" \" + CurrentYear);\n Log.d(TAG, \"\" + prevMonth + \" \" +nextMonth + \" \" + CurrentMonth);\n }\n });\n\n }", "public MonthPanel(DayPanel dp) {\n \t\tsuper(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n \t\t\n \t\tJPanel panel = new JPanel(new GridLayout(6,7));\n \n \t\tDayDto day = dp.getDay();\n \t\tthis.d = day.getDate();\n \t\t\n \t\t//GregorianCalendar cal = new GregorianCalendar();\n \t\tCalendar cal = GregorianCalendar.getInstance();\n \t\tcal.setTime(this.d);\n \t\t\n \t\t//cal.set(Calendar.DATE, 1);\n \t\t//cal.set(Calendar.MONTH, d.getMonth() - 1);\n \t\t//cal.set(Calendar.YEAR, d.getYear());\n \t\t\n \t\tint m= cal.get(Calendar.MONTH) + 1;\n \t\t\n \t\tString month = \"December\";\n \t\tif (m == 1) month = \"January\";\n \t\telse if (m == 2) month = \"February\";\n \t\telse if (m == 3) month = \"March\";\n \t\telse if (m == 4) month = \"April\";\n \t\telse if (m == 5) month = \"May\";\n \t\telse if (m == 6) month = \"June\";\n \t\telse if (m == 7) month = \"July\";\n \t\telse if (m == 8) month = \"August\";\n \t\telse if (m == 9) month = \"September\";\n \t\telse if (m == 10) month = \"October\";\n \t\telse if (m == 11) month = \"November\";\n \t\t\n \t\tmonth = month + \" \" + cal.get(Calendar.YEAR);\n \t\t\n \t\t//prevDays is the number of boxes in the upper left, before the first of the month, needed since the \n \t\t//calendar is going to be a 6x7 set of boxes. Calendar.SUNDAY is 1 and so forth, so we use day of week - 1\n \t\tint prevDays = cal.get(Calendar.DAY_OF_WEEK) - 1; \n \t\tint endDays = 42 - cal.getActualMaximum(Calendar.DAY_OF_MONTH) - prevDays;\n \t\t\n \t\t/*System.out.println(\"Calendar.DAY_OF_WEEK: \" + Calendar.DAY_OF_WEEK);\n \t\t//System.out.println(\"Calendar.DATE\" + Calendar.DATE);\n \t\t//System.out.println(\"Calendar.MONTH\" + cal.get(Calendar.MONTH));\n \t\t//System.out.println(\"Calendar.YEAR\" + cal.get(Calendar.YEAR));\n \t\t//System.out.println(\"prevDays: \" + prevDays);\n \t\t//System.out.println(\"endDays: \" + endDays);*/\n \t\t\n\t\tcal.roll(Calendar.MONTH, false);\n \t\t\n \t\tfor (int i = 1; i <= prevDays; i++) {\n\t\t\tCalendar c = new GregorianCalendar(cal.get(Calendar.MONTH) + 1, cal.getActualMaximum(Calendar.DAY_OF_MONTH) - prevDays + i, cal.get(Calendar.YEAR));\n \t\t\tjava.sql.Date date = new Date(c.getTime().getTime());\n \t\t\tpanel.add(new DayBlock(date, Color.LIGHT_GRAY));\n \t\t}\n\t\t\n\t\tcal.roll(Calendar.MONTH, true);\n\t\t\n \t\tfor (int i = 1; i <= cal.getActualMaximum(Calendar.DAY_OF_MONTH); i++) {\n\t\t\tCalendar c = new GregorianCalendar(cal.get(Calendar.MONTH), i, cal.get(Calendar.YEAR));\n \t\t\tjava.sql.Date date = new Date(c.getTime().getTime());\n \t\t\tpanel.add(new DayBlock(date));\n \t\t}\n \t\t\n\t\tcal.roll(Calendar.MONTH, true);\n\t\t\n \t\tfor (int i = 1; i <= endDays; i++) {\n\t\t\tCalendar c = new GregorianCalendar(cal.get(Calendar.MONTH) + 1, i, cal.get(Calendar.YEAR));\n \t\t\tjava.sql.Date date = new Date(c.getTime().getTime());\n \t\t\tpanel.add(new DayBlock(date, Color.LIGHT_GRAY));\n \t\t}\n \t\t\n \t\tMonthHeadingPanel mhp = new MonthHeadingPanel(month);\n \t\tJPanel main = new JPanel(new BorderLayout());\n \t\tmain.add(mhp, BorderLayout.NORTH);\n \t\t\n \t\tmain.add(panel, BorderLayout.CENTER);\n \t\t\n \t\tsetViewportView(main);\n \t}", "public salesDetail() throws SQLException {\n monthsVal=new HashMap();\n String months=\"Jan Feb Mar Apr May Jun Jul Aug Sept Oct Nov Dec\";\n String[] monthsList = months.split(\" \");\n int mthCount=1;\n \n for(String mthVal:monthsList)\n { String mth=\"1\";\n if(mthCount<10)\n mth=\"0\"+mthCount;\n else mth=mthCount+\"\";\n monthsVal.put(mthVal,mth);\n mthCount++;\n }\n dft=new DefaultTableModel();\n dft.addColumn(\"Date\");\n dft.addColumn(\"Bill No.\");\n dft.addColumn(\"Sales Man\");\n dft.addColumn(\"Item\");\n dft.addColumn(\"Quantity\");\n dft.addColumn(\"Rate\");\n dft.addColumn(\"Amount\");\n SalesModel sm = new SalesModel(); \n Vector<Vector<String>> resultSet=sm.getAllDetails();\n for(Vector<String> list : resultSet)\n {\n dft.addRow(list);\n }\n \n usr=new DefaultTableModel();\n usr.addColumn(\"User Name\");\n usr.addColumn(\"Amount(NRS)\");\n Calendar currentDate = Calendar.getInstance(); //Get the current date\n SimpleDateFormat formatter= new SimpleDateFormat(\"yyyy-MM-dd\"); //format it as per your requirement\n String dateStr = formatter.format(currentDate.getTime());\n resultSet=sm.userSalesRecord(dateStr);\n for(Vector<String> list : resultSet)\n {\n usr.addRow(list);\n } \ninitComponents();\ngraphPanel=new GraphPanel(); \ngraphPanel.setBackground(new java.awt.Color(204, 204, 204));\nthis.add(graphPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 340,700,350));\nthis.setVisible(true);\n }", "void onClickDateRange();", "public void processShowGrid(boolean selected) {\n dataManager.showGrid(selected);\n }", "public void setMonth(Integer month) {\n this.month = month;\n }", "public void setMonth(Integer month) {\n this.month = month;\n }", "public void addMonthActionListener(ActionListener l)\n {\n nextButton.addActionListener(l);\n }", "@Override\r\n public List<? extends WeekViewEvent> onMonthChange(int newYear, int newMonth) {\n int[] colors = this.getColors(calendarTheme);\r\n List<WeekViewEvent> events = new ArrayList<>();\r\n int id = 0;\r\n for(EventIncomingStruct event: eventList) {\r\n String eventStartTime = event.getStartTime();\r\n String eventStartDate = event.getStartDate();\r\n String eventEndTime = event.getEndTime();\r\n String eventEndDate = event.getEndDate();\r\n String[] strStTime = eventStartTime.split(\":\");\r\n String[] strStDate = eventStartDate.split(\"/\");\r\n String[] strEndTime = eventEndTime.split(\":\");\r\n String[] strEndDate = eventEndDate.split(\"/\");\r\n Log.i(\"Calendar\", eventStartDate);\r\n if (Integer.parseInt(strStDate[2]) == newYear\r\n && Integer.parseInt(strStDate[1]) == newMonth) {\r\n WeekViewEvent wkEvent = new WeekViewEvent(id, event.getName(),\r\n Integer.parseInt(strStDate[2]),\r\n Integer.parseInt(strStDate[1]),\r\n Integer.parseInt(strStDate[0]),\r\n Integer.parseInt(strStTime[0]),\r\n Integer.parseInt(strStTime[1]),\r\n Integer.parseInt(strEndDate[2]),\r\n Integer.parseInt(strEndDate[1]),\r\n Integer.parseInt(strEndDate[0]),\r\n Integer.parseInt(strEndTime[0]),\r\n Integer.parseInt(strEndTime[1]));\r\n wkEvent.setColor(colors[id % 5]);\r\n events.add(wkEvent);\r\n }\r\n id++;\r\n }\r\n\r\n return events;\r\n }", "@Test(dependsOnMethods = {\"shouldBeAbleToClick36Months\"})\n public void shouldBeAbleToClick48Months() {\n calculatePaymentPage.selectMonth(\"48\");\n }", "@Override\n public void goToDate(Calendar date) {\n super.goToDate(date);\n startOriginForScroll = mCurrentOrigin.x;\n }" ]
[ "0.5843702", "0.58206165", "0.57768583", "0.574883", "0.56935155", "0.5672603", "0.56444585", "0.561436", "0.56136036", "0.5537387", "0.551539", "0.5506975", "0.54774666", "0.54520583", "0.54517466", "0.54338765", "0.5425905", "0.5397856", "0.5384866", "0.5366016", "0.5358169", "0.5354068", "0.53441286", "0.53375196", "0.53260565", "0.5324554", "0.53243476", "0.5322872", "0.53211266", "0.53167534", "0.53053355", "0.530519", "0.53036606", "0.5282153", "0.52776426", "0.527655", "0.5272428", "0.5244359", "0.5243902", "0.52326024", "0.52033925", "0.5187817", "0.51813114", "0.51634645", "0.51595336", "0.5159213", "0.5157924", "0.5156227", "0.51527494", "0.5139154", "0.513748", "0.51287013", "0.51261806", "0.51195025", "0.5090729", "0.5089066", "0.50671005", "0.5040443", "0.5037238", "0.50156534", "0.5013726", "0.5012965", "0.49896163", "0.49889177", "0.49846688", "0.49824613", "0.4978598", "0.49776447", "0.49712783", "0.49676362", "0.49602965", "0.4951422", "0.4948141", "0.49458462", "0.4945078", "0.4944422", "0.49436158", "0.49421814", "0.49413288", "0.49362847", "0.49335796", "0.49243483", "0.49187833", "0.49100497", "0.4909112", "0.4905673", "0.4902745", "0.4902704", "0.489338", "0.48925424", "0.48904902", "0.4882632", "0.48825145", "0.48758757", "0.48747015", "0.48747015", "0.48695362", "0.48681182", "0.48583513", "0.48550987" ]
0.6479215
0
navigating to weekly grid
public void getXpathFromGrid(){ System.out.println("Weekly"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void refreshWeek() {\n\t\tthis.showWeek(this.currentMonday);\n\t}", "public static void viewWeekSchedule() {\n\t\tWeek w = new Week();\n\t\t\n\t\tprintWeekTitles();\n\t\tint weekID = Utility.askInt(\"\\nSelect week to view: \");\n\t\tw = aweek.get(weekID);\n\t\t\n\t\tviewWeek(w);\n\t\t\n\t}", "public void displayNextWeek() {\n setDisplayedDateTime(currentDateTime.plusWeeks(1));\n }", "public void setWeeklyView(){\n\t\tthis.weeklyView=true;\n\t\tnotifyDataSetChanged();\n\t\tnotifyDataSetInvalidated();\n\t}", "public void drawEventsForWeek(){\n WeekController.getController().drawEvents(PersonInfo.getPersonInfo().getEventsForWeek(weekNumber));\n }", "public void generateWeeklySchedule(){\r\n for (int i = 0; i < numDayWorkWeek; i++)\r\n weeklySchedule.get(i).clear();\r\n\r\n int day = 0;\r\n int workHrs = 0;\r\n\r\n for (Task unfinishedTask: unfinished){\r\n if (day > numDayWorkWeek - 1) break;\r\n\r\n //if there is room for this task --> add it. Else, move to the next day\r\n if (workHrs + unfinishedTask.getHrsLeft() <= dailyWorkload){\r\n weeklySchedule.get(day).add(unfinishedTask);\r\n workHrs += unfinishedTask.getHrsLeft();\r\n }\r\n else{\r\n day++;\r\n weeklySchedule.get(day).add(unfinishedTask);\r\n workHrs = unfinishedTask.getHrsLeft();\r\n }\r\n }\r\n }", "public void AllWeekLessonReport(int weeks)\r\n {\r\n for (int i = 0; i < weeks; i++)\r\n {\r\n for (int j = 0; j < daysPerWeek; j++)\r\n {\r\n for (int k = 0; k < totalSlots; k++)\r\n {\r\n LessonClass l = weekArray[(i)].dayArray[j].dayMap.get(roomNtime[k]);\r\n \r\n // if lesson exists, and isnt a parent appointment\r\n if (l != null && l.subject != subjects.PARENT)\r\n {\r\n System.out.println(\"\\n| WEEK: \" + (i+1) + \" | \" + \"DAY: \" + days[j] \r\n + \" | \" + \"TIME: \" + l.time + \"pm | \" + l.room + \" |\");\r\n System.out.println(l.toReport());\r\n }\r\n }\r\n }\r\n }\r\n }", "@FXML\n private void incrementWeek() {\n date = date.plusWeeks(1);\n updateDates();\n }", "private void nextWeek() {\r\n tmp.setDay(tmp.getDay() + daysInWeek);\r\n upDMYcountDMYcount();\r\n }", "public static void SWM_GAME_7DaysWeek(String[][] SWM_table, int SWM_row_num, int SWM_col_num, String[][] organizedTable, String[][] organizedTable2, double[][] sessionDate_asNum, String[][] sessionDate,\n\t\t int sessionDate_row_num, int sessionDate_col_num, Workbook workbook_w)\n{\n\t\n\t//Finished SWM\n}", "private void refreshWeeklyStats() {\n TextView weekView = findViewById(R.id.weekView);\n weekView.setText(WeeklyStatistics.getWeek());\n\n String userId = Login.getUserId();\n DocumentReference cycleReference = WeeklyStatistics.getSportWeeklyStat(userId, Sport.CYCLING);\n DocumentReference runReference = WeeklyStatistics.getSportWeeklyStat(userId, Sport.RUNNING);\n DocumentReference walkReference = WeeklyStatistics.getSportWeeklyStat(userId, Sport.WALKING);\n\n setCycleStats(cycleReference);\n setRunStats(runReference);\n setWalkStats(walkReference);\n }", "private void getActivatedWeekdays() {\n }", "private void updateWeekView() {\r\n // Store the scroll value\r\n double scrollValue = this.weekScrollPane.getVvalue();\r\n\r\n // Pair time markers with the week columns and set that as the scroll content\r\n HBox weekView = new HBox();\r\n weekView.getChildren().addAll(new TimeMarks(), this.updateDayCols());\r\n this.weekScrollPane.setContent(weekView);\r\n\r\n // Wrap the scroll pane in a border pane and add the day labels to the top\r\n BorderPane weekScreen = new BorderPane();\r\n weekScreen.setCenter(this.weekScrollPane);\r\n weekScreen.setTop(this.updateDayLabels());\r\n\r\n // Set the scroll value to the previous scroll value\r\n this.weekScrollPane.setVvalue(scrollValue);\r\n\r\n // Set the border pane as the center of this calendar view\r\n this.setCenter(weekScreen);\r\n }", "public void startWeek()\n\t{\n\t\tsynchronized (date_db_lock) {\t\t\t\n\t\t\tsynchronized (write_student_db_lock) {\n\t\t\t\tclearAllDatabases();\n\t\t\t}\n\t\t}\n\t}", "private void setProgramsForWeekTable()\r\n {\n long day = System.currentTimeMillis();\r\n long day2 = day + 1000 * 60 * 60 * 24; //seconds in day\r\n long day3 = day2 + 1000 * 60 * 60 * 24; //seconds in day\r\n long day4 = day3 + 1000 * 60 * 60 * 24; //seconds in day\r\n long day5 = day4 + 1000 * 60 * 60 * 24; //seconds in day\r\n long day6 = day5 + 1000 * 60 * 60 * 24; //seconds in day\r\n long day7 = day6 + 1000 * 60 * 60 * 24; //seconds in day\r\n\r\n String urlday = DownloadsManager.PROGRAMM_URL + day;\r\n String urlday2 = DownloadsManager.PROGRAMM_URL + day2;\r\n String urlday3 = DownloadsManager.PROGRAMM_URL + day3;\r\n String urlday4 = DownloadsManager.PROGRAMM_URL + day4;\r\n String urlday5 = DownloadsManager.PROGRAMM_URL + day5;\r\n String urlday6 = DownloadsManager.PROGRAMM_URL + day6;\r\n String urlday7 = DownloadsManager.PROGRAMM_URL + day7;\r\n\r\n String[] urls = {urlday, urlday2, urlday3, urlday4, urlday5, urlday6, urlday7};\r\n\r\n for (int i=0; i<urls.length; i++)\r\n {\r\n if(dataBase.getProgramsCount() == 0)\r\n setProgramsTable(urls[i]);\r\n else\r\n updateProgramsTable(urls[i]);\r\n }\r\n\r\n }", "private void setWeeksCell(int row, int col, String text, boolean isCurrentWeek) {\n\t\tweeksTable.setText(row, col, text);\n\t\tweeksTable.getCellFormatter().setAlignment(row, col, HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE);\n\t\tif (isCurrentWeek) {\n\t\t\tweeksTable.getCellFormatter().addStyleName(row, col, style.currentWeek());\n\t\t\tweeksTable.getCellFormatter().removeStyleName(row, col, style.defaultWeek());\n\t\t}\n\t\telse {\n\t\t\tweeksTable.getCellFormatter().addStyleName(row, col, style.defaultWeek());\n\t\t\tweeksTable.getCellFormatter().removeStyleName(row, col, style.currentWeek());\t\n\t\t}\n\t}", "public void AllWeekAppointmentReport(int weeks)\r\n {\r\n for (int i = 0; i < weeks; i++)\r\n {\r\n for (int j = 0; j < daysPerWeek; j++)\r\n {\r\n for (int k = 0; k < totalSlots; k++)\r\n {\r\n LessonClass a = weekArray[(i)].dayArray[j].dayMap.get(roomNtime[k]);\r\n \r\n // if appointment exists and is parent appointment\r\n if (a != null && a.subject == subjects.PARENT)\r\n {\r\n System.out.println(\"\\n| WEEK: \" + (i+1) + \" | \" + \"DAY: \" + days[j] \r\n + \" | \" + \"TIME: \" + a.time + \"pm | \" + a.room + \" |\");\r\n System.out.println(a.toReport());\r\n System.out.println(\"Visitor offspring ID: \");\r\n \r\n // track if anybody has booked this slot\r\n boolean visitor = false;\r\n \r\n // for each entry in register\r\n for (String s : a.register)\r\n {\r\n if (s != null)\r\n {\r\n System.out.print(s + \"\\n\");\r\n visitor = true;\r\n }\r\n }\r\n // feedback for nobody booked this slot\r\n if (visitor == false)\r\n {\r\n System.out.println(\"No visits booked\");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }", "void onWeekNumberClick ( @NonNull MaterialCalendarView widget, @NonNull CalendarDay date );", "private void refreshScheduleTable() {\n\t\tint gameIdx = 0;\n\t\tList<GameDetails> games = getGames();\n\t\tif (games != null) {\n\t\t\tfor (GameDetails game : games) {\n\t\t\t\tfor (int i = 0; i < 2; i++) {\n\t\t\t\t\tboolean isHome = (i == 0);\n\n\t\t\t\t\tTeamDetails team = (isHome ? game.getHomeTeam() : game.getAwayTeam()); \n\n\t\t\t\t\tboolean isSelected = false;\n\t\t\t\t\tboolean canSelect = true;\n\t\t\t\t\tif (getUiHandlers() != null) {\n\t\t\t\t\t\tisSelected = getUiHandlers().isTeamSelected(team);\n\t\t\t\t\t\tcanSelect = getUiHandlers().canSelectTeam(team);\n\t\t\t\t\t}\n\n\t\t\t\t\tString text = (isHome ? \"@ \" + team.getDisplayName() : team.getDisplayName());\n\n\t\t\t\t\tint row = rowFromGameIdx(gameIdx, isHome);\n\t\t\t\t\tint col = colFromGameIdx(gameIdx, isHome);\n\n\t\t\t\t\tsetScheduleCell(row, col, text, isSelected, canSelect);\t\n\t\t\t\t}\n\n\t\t\t\tgameIdx++;\n\t\t\t}\n\t\t}\n\n\t\t// Clear out any remaining cells (in case of bye weeks).\n\t\tfor (; gameIdx < NFLConstants.MAX_GAMES_PER_WEEK; gameIdx++) {\n\t\t\tfor (int i = 0; i < 2; i++) {\n\t\t\t\tboolean isHome = (i == 0);\n\t\t\t\t\n\t\t\t\tint row = rowFromGameIdx(gameIdx, isHome);\n\t\t\t\tint col = colFromGameIdx(gameIdx, isHome);\n\n\t\t\t\tsetScheduleCell(row, col, \"\", false, true);\n\t\t\t}\n\t\t}\n\t}", "@FXML\n private void weeklyTab(){\n openReservation(false);\n openEventInfo(false, null);\n }", "int getWeek();", "public static void activateProjectScheduling(Week week, NonFixedTask[] projectTasksToSchedule){\n//\n NonFixedTask[] projectTasksToPut = Scheduler.ScheduleProject(week, projectTasksToSchedule);\n Putter.putProject(projectTasksToPut[0].getName(), week, projectTasksToPut);\n }", "private void weeklyPlannerSetup() {\n //Setup the 7 Days of the planner\n Days monday = new Days(\"Monday\");\n Days tuesday = new Days(\"Tuesday\");\n Days wednesday = new Days(\"Wednesday\");\n Days thursday = new Days(\"Thursday\");\n Days friday = new Days(\"Friday\");\n Days saturday = new Days(\"Saturday\");\n Days sunday = new Days(\"Sunday\");\n\n //Add days to list and set them to listView\n ObservableWeekList.addAll(monday, tuesday, wednesday, thursday, friday, saturday, sunday);\n weekList.setItems(ObservableWeekList);\n\n //get listViews Height\n double listViewHeight = weekList.getPrefHeight();\n double cellHeight = Math.round(listViewHeight / 7);\n double cellWidth = weekList.getPrefWidth();\n\n //set planners cell format\n weekList.setCellFactory(new Callback<ListView<Days>, ListCell<Days>>() {\n @Override\n public ListCell<Days> call(ListView<Days> daysListView) {\n return new WeekCell(breakfastColor, lunchColor, dinnerColor, breakfastColorLight,\n lunchColorLight, dinnerColorLight, weekCellFontColor, cellHeight, cellWidth);\n }\n });\n\n //Setup a weekList View Change Listener, that will set the comboBoxs selected Recipes / Meals to match\n //the Recipes / Meals of the selected day and will then display the appropriate nutritional information\n weekList.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Days>() {\n @Override\n public void changed(ObservableValue<? extends Days> observableValue, Days days, Days t1) {\n previouslySelected = t1;\n if (t1 != null) {\n if (t1.isBreakfastSet()){\n //get the breakfast recipe id. Then use it to find the recipe in the breakfastCombo\n //this is done as when the program is loaded weekplanner.dat is loaded and the\n //recipes in here will be loaded to a new memory location to find via an object search\n Recipe breakfast = findRecipeFromID(t1.getBreakfast().getId(), breakfastCombo);\n breakfastCombo.getSelectionModel().select(breakfast);\n //set breakfast nutrition information\n displayBreakfastNutrition(t1.getBreakfast());\n\n } else {\n breakfastCombo.getSelectionModel().clearSelection();\n breakfastCombo.setValue(null);\n //clear the nutritional labels if there is no meal\n clearBreakfastNutrition();\n }\n\n if(t1.isLunchSet()){\n Recipe lunch = findRecipeFromID(t1.getLunch().getId(), lunchCombo);\n lunchCombo.getSelectionModel().select(lunch);\n displayLunchNutrition(t1.getLunch());\n } else {\n lunchCombo.getSelectionModel().clearSelection();\n clearLunchNutrition();\n lunchCombo.setValue(null);\n }\n\n if(t1.isDinnerSet()){\n Recipe dinner = findRecipeFromID(t1.getDinner().getId(), dinnerCombo);\n dinnerCombo.getSelectionModel().select(dinner);\n displayDinnerNutrition(t1.getDinner());\n } else {\n dinnerCombo.getSelectionModel().clearSelection();\n dinnerCombo.setValue(null);\n clearDinnerNutrition();\n }\n\n textDay.setText(t1.getDay());\n }\n }\n });\n\n //select the first day in the weekList\n weekList.getSelectionModel().selectFirst();\n\n setupPlannerMealComboboxs(breakfastCombo);\n setupPlannerMealComboboxs(lunchCombo);\n setupPlannerMealComboboxs(dinnerCombo);\n\n clearBreakfastNutrition();\n clearDinnerNutrition();\n clearLunchNutrition();\n clearTotalNutrition();\n }", "public void getXpathFromGrid(){\n\t\tSystem.out.println(\"Monthly\");\n\t}", "public void setWeek(String week) {\r\n this.week = week;\r\n }", "private void flushWeek() {\n\t\tComponent[] days = this.weekPanel.getComponents();\n\t\tComponent[] blocks;\n\t\tint i;\n\t\tfor (Component day : days) {\n\t\t\tblocks = ((Container) day).getComponents();\n\t\t\ti = 1;\n\t\t\tfor (Component unit : blocks) {\n\t\t\t\t((JTimeBlock) unit).flush();\n\t\t\t\tif (((JTimeBlock) unit).getComponentCount() != 0) {\n\t\t\t\t\t((JTimeBlock) unit).removeAll();\n\t\t\t\t}\n\t\t\t\tif (i % BLOCKS_IN_HOUR == 0) {\n\t\t\t\t\t((JTimeBlock) unit).setBorder(BorderFactory\n\t\t\t\t\t\t\t.createMatteBorder(0, 1, 1, 1, Color.LIGHT_GRAY));\n\t\t\t\t} else {\n\t\t\t\t\t((JTimeBlock) unit).setBorder(BorderFactory\n\t\t\t\t\t\t\t.createMatteBorder(0, 1, 0, 1, Color.LIGHT_GRAY));\n\t\t\t\t}\n\t\t\t\ti++;\n\n\t\t\t}\n\t\t}\n\t}", "@FXML\n private void updateDates() {\n WeekFields weekFields = WeekFields.of(Locale.ENGLISH);\n weekNumber = date.get(weekFields.weekOfWeekBasedYear());\n weekNr.setText(\"\" + weekNumber);\n\n /* Update drawn events when changing week */\n drawEventsForWeek();\n \n\t\t/* Set current month/year */\n month_Year.setText(date.getMonth() + \" \" + date.getYear());\n\t\t\n\t\t/* Set date of weekday_labels */\n for (int i = 0; i < weekday_labels.size(); i++) {\n int date_value = date.with(DayOfWeek.MONDAY).plusDays(i).getDayOfMonth();\n weekday_labels.get(i).setText(\"\" + date_value + \".\");\n }\n }", "public void updateGridX();", "@Override\n\t/**\n\t * Defines the look of the day view grid (the division of hours and events throughout the day) \n\t * @param c GregorianCalendar holding the year to be drawn\n\t * @param d the data model holding event information \n\t * @param g2 the graphics package\n\t * @param container the container that will rely on this method to define it's look and feel \n\t */\n\tpublic void drawEventGrid(GregorianCalendar c, DataModel d, Graphics2D g2, Component container)\n\t{\n\t\t\t\tLine2D.Double vertLine = new Line2D.Double(60, 0, 60, container.getHeight()); \n\t\t\t\tg2.setColor(Color.LIGHT_GRAY);\n\t\t\t\tg2.draw(vertLine);\n\n\t\t\t\t//Draw the time text\n\t\t\t\tint hour = 1; \n\t\t\t\tString halfOfDay = \"am\"; \n\n\t\t\t\tfor (int i = 0; i<24; i ++)\n\t\t\t\t{\t\n\t\t\t\t\tif (i < 23)\n\t\t\t\t\t{\n\t\t\t\t\t\tg2.setColor(Color.BLACK);\n\t\t\t\t\t\tif (i == 11)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\thalfOfDay = \"pm\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (i == 12)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\thour = 1; \n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tString time = Integer.toString(hour) + halfOfDay; \n\t\t\t\t\t\thour++; \n\t\t\t\t\t\tg2.drawString(time, 20, ( i + 1 )*60);\n\t\t\t\t\t}\n\n\n\t\t\t\t\t//Draw the Lines indicating where hours begin \n\t\t\t\t\tg2.setColor(Color.LIGHT_GRAY);\n\t\t\t\t\tLine2D.Double hourLine = new Line2D.Double(60, i*60, container.getWidth(), i*60); \n\t\t\t\t\tg2.draw(hourLine); \n\n\t\t\t\t}\n\n\t\t\t\t//Get events from the datModel \n\t\t\t\tTreeSet<Event> events = d.getEvents(c.get(Calendar.MONTH) + 1 , c.get(Calendar.DAY_OF_MONTH), c.get(Calendar.YEAR));\n\t\t\t\tif (events.size() != 0)\n\t\t\t\t{\n\t\t\t\t\tfor (Event e : events)\n\t\t\t\t\t{\n\t\t\t\t\t\tg2.setColor(Color.BLUE);\n\t\t\t\t\t\tString eventStart = e.getStartTime(); \n\t\t\t\t\t\tString eventEnd = e.getEndTime(); \n\t\t\t\t\t\tint startHour = Integer.parseInt(eventStart.substring(0,2)); \n\t\t\t\t\t\tint startMin = Integer.parseInt(eventStart.substring(3)); \n\t\t\t\t\t\tint endHour = Integer.parseInt(eventEnd.substring(0,2)); \n\t\t\t\t\t\tint endMin = Integer.parseInt(eventEnd.substring(3)); \n\n\t\t\t\t\t\t//Draw the Rectangle representing the scheduled event \n\t\t\t\t\t\tRectangle2D.Double eventBox = new Rectangle2D.Double(60, ((startHour * 60) + startMin), \n\t\t\t\t\t\t\t\tcontainer.getWidth(), ((endHour * 60) - (startHour * 60) + (endMin - startMin)) ); \n\t\t\t\t\t\tg2.fill(eventBox);\n\n\t\t\t\t\t\t//Draw the event details onto the rectangle\n\t\t\t\t\t\tFontMetrics fm = g2.getFontMetrics(container.getFont()); \n\t\t\t\t\t\tg2.setColor(Color.WHITE);\n\t\t\t\t\t\tg2.drawString( \" \" + e.getName() + \" \" + e.getStartTime() + \" - \" + e.getEndTime(), 60, ((startHour * 60) + startMin + fm.getHeight())); \n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t}", "private void weeklyScores(RoutingContext context) {\n\t}", "private RepeatWeekdays() {}", "boolean getWeek1();", "public static void boarDay (Grid grid) {\n grid.weekday = dateArray[(int) (Math.random() * 7)];\n }", "private void showWeek(GregorianCalendar reference) {\n\t\tComponent[] days = this.weekPanel.getComponents();\n\n\t\tthis.flushWeek();\n\n\t\tthis.weekDateUpdate(reference);\n\t\treference = (GregorianCalendar) reference.clone();\n\t\treference = DateCalc.startOf(reference, Calendar.WEEK_OF_YEAR);\n\n\t\tthis.currentYear.setText(\"\"+ reference.get(Calendar.YEAR));\n\n\t\tfor (Component day : days) {\n\t\t\tthis.updateDay(reference, (JPanel) day);\n\t\t\treference.add(Calendar.DAY_OF_MONTH, 1);\n\t\t}\n\t\tthis.topFrame.validate();\n\t}", "public WeekPanel(CalendarEx calendar) {\n initComponents();\n cal = calendar;\n startEndDay(CalendarEx.getCurrentDay(), CalendarEx.getCurrentMonth(), CalendarEx.getCurrentYear());\n //startDay = new CalendarDate(CalendarEx.getCurrentDay(), CalendarEx.getCurrentMonth(), CalendarEx.getCurrentYear());\n //endDay = new CalendarDate(CalendarEx.getCurrentDay() + 6, CalendarEx.getCurrentMonth(), CalendarEx.getCurrentYear());\n \n ListAppointMents();\n WeekLabel.setText(startDay.toString() + \" - \" + endDay.toString());\n }", "boolean getWeek6();", "private void fillWeek(Boolean canRepeatPoint) {\n Map<Long, List<Long>> workerPointMap = new LinkedHashMap<>();\n for (DayDTO day : week.getDays()) {\n // Generamos una lista con los trabajadores que ya han sido ocupados para este dia.\n List<Long> busyWorkersToday = checkBusyBreaks(day);\n for (TouristPointDTO touristPoint : touristPoints) {\n // Comprobamos que no existen turnos para este dia en este punto establecido ya.\n if (checkPointNotAssignedDay(day, touristPoint)) {\n // Comprobamos que existena algun trabajador con horas disponibles del equipo que necesitamos.\n if (haveAvailableHours(touristPoint)) {\n Iterator<Map.Entry<TouristInformerDTO, Double>> iterator = availableWorkersHours.entrySet().iterator();\n Map.Entry<TouristInformerDTO, Double> entry = iterator.next();\n // Si el trabajador no es correcto, busca el siguiente trabajador (si hay mas).\n while (iterator.hasNext()\n && !isCorrectWorker(workerPointMap, busyWorkersToday, touristPoint, entry, day,\n canRepeatPoint)) {\n entry = iterator.next();\n }\n // Si el trabajador es correcto lo asocia al punto ese dia.\n if (isCorrectWorker(workerPointMap, busyWorkersToday, touristPoint, entry, day,\n canRepeatPoint)) {\n associateShift(day, touristPoint, entry.getKey(), workerPointMap);\n // Actualizamos la lista de trabajadores ocupados para hoy\n busyWorkersToday.add(entry.getKey().getId());\n // Actualizamos las horas disponibles de esta semana para el trabajador\n entry.setValue(entry.getValue() - touristPoint.getTime());\n } else {\n errorPoints.add(new TouristPointDayProblemDTO(touristPoint, day));\n }\n } else {\n errorPoints.add(new TouristPointDayProblemDTO(touristPoint, day));\n }\n }\n }\n orderByAvailableHours();\n }\n }", "public void initializeCalendarGrid(){\n int rows = 6;\n int cols = 7;\n for (int i = 0; i < rows; i++){\n for (int j = 0; j < cols; j++){\n \n // Add VBox and style it\n VBox vPane = new VBox();\n vPane.getStyleClass().add(\"calendar_pane\");\n vPane.setMinWidth(weekdayHeader.getPrefWidth()/7);\n \n vPane.addEventHandler(MouseEvent.MOUSE_CLICKED, (e)->{\n addEvent(vPane);\n });\n \n GridPane.setVgrow(vPane, Priority.ALWAYS);\n \n // Add it to the grid\n calendarGrid.add(vPane, j, i); \n }\n } \n \n // Set up Row Constraints\n for (int i = 0; i < 7; i++) {\n RowConstraints row = new RowConstraints();\n row.setMinHeight(scrollPane.getHeight()/7);\n calendarGrid.getRowConstraints().add(row);\n }\n }", "public void setNextWeek()\n\t{\n\t\tm_calendar.set(Calendar.WEEK_OF_MONTH,getWeekOfMonth()+1);\n\n\t}", "@FXML\n private void decrementWeek() {\n date = date.minusWeeks(1);\n updateDates();\n }", "private void drawRoutes () {\n // Lay ngay cua tour\n Date tourDate = OnlineManager.getInstance().mTourList.get(tourOrder).getmDate();\n // Kiem tra xem ngay dien ra tour la truoc hay sau hom nay. 0: hom nay, 1: sau, -1: truoc\n int dateEqual = Tour.afterToday(tourDate);\n // Kiem tra xem tour da dien ra chua\n if (dateEqual == -1) {\n // Tour da dien ra, khong ve gi ca\n } else if (dateEqual == 1) {\n // Tour chua dien ra, khong ve gi ca\n } else {\n // Tour dang dien ra thi kiem tra gio\n /* Chang sap toi mau do, today nam trong khoang src start va src end\n Chang dang di chuyen mau xanh, today nam trong khoang src end va dst start\n Chang vua di qua mau xam, today nam trong khoang dst start va dst end */\n ArrayList<TourTimesheet> timesheets = OnlineManager.getInstance().mTourList.get(tourOrder).getmTourTimesheet();\n // Danh dau chang dang di qua\n int changDangDiQuaOrder = -1;\n // Danh dau chang sap di qua\n int changSapDiQuaOrder = -1;\n if(Tour.afterCurrentHour(timesheets.get(0).getmStartTime()) == 1){\n // Chang sap di qua mau do\n // Neu chua ve chang sap di, ve duong mau do\n if (timesheets.size() >= 2) {\n drawRoute(Color.RED, timesheets.get(0).getmBuildingLocation(), timesheets.get(1).getmBuildingLocation());\n }\n } else {\n for (int i = 0; i < timesheets.size() - 1; i++) {\n // Kiem tra xem chang hien tai la truoc hay sau gio nay. 0: gio nay, 1: gio sau, -1: gio truoc\n int srcStartEqual = Tour.afterCurrentHour(timesheets.get(i).getmStartTime());\n int srcEndEqual = Tour.afterCurrentHour(timesheets.get(i).getmEndTime());\n int dstStartEqual = Tour.afterCurrentHour(timesheets.get(i + 1).getmStartTime());\n // 2 vi tri chang\n LatLng srcLocation = timesheets.get(i).getmBuildingLocation();\n LatLng dstLocation = timesheets.get(i + 1).getmBuildingLocation();\n if (srcStartEqual == -1 && srcEndEqual == 1) {\n // Chang dang di qua mau xanh\n // Neu chua ve chang dang di, ve duong mau xanh\n drawRoute(Color.BLUE, srcLocation, dstLocation);\n // Danh dau chang dang di qua\n changDangDiQuaOrder = i;\n // Thoat khoi vong lap\n break;\n } else if (srcEndEqual == -1 && dstStartEqual == 1) {\n // Chang sap toi mau do\n // Neu chua ve chang sap toi, ve duong mau do\n drawRoute(Color.RED, srcLocation, dstLocation);\n // Danh dau chang sap di qua\n changSapDiQuaOrder = i;\n // Thoat khoi vong lap\n break;\n }\n }\n }\n // Kiem tra xem da ve duoc nhung duong nao roi\n if (changDangDiQuaOrder != - 1) {\n // Neu ve duoc chang dang di qua roi thi ve tiep 2 chang con lai\n if (changDangDiQuaOrder < timesheets.size() - 2) {\n // Neu khong phai chang ket thuc thi ve tiep chang sap di qua\n // 2 vi tri chang\n LatLng srcLocation = timesheets.get(changDangDiQuaOrder + 1).getmBuildingLocation();\n LatLng dstLocation = timesheets.get(changDangDiQuaOrder + 2).getmBuildingLocation();\n drawRoute(Color.RED, srcLocation, dstLocation);\n }\n if (changDangDiQuaOrder > 0) {\n // Neu khong phai chang bat dau thi ve tiep chang da di qua\n // 2 vi tri chang\n LatLng srcLocation = timesheets.get(changDangDiQuaOrder - 1).getmBuildingLocation();\n LatLng dstLocation = timesheets.get(changDangDiQuaOrder).getmBuildingLocation();\n drawRoute(Color.GRAY, srcLocation, dstLocation);\n }\n }\n if (changSapDiQuaOrder != - 1) {\n // Neu ve duoc chang sap di qua roi thi ve tiep 2 chang con lai\n if (changSapDiQuaOrder > 0) {\n // Neu khong phai chang bat dau thi ve tiep chang dang di qua\n // 2 vi tri chang\n LatLng srcLocation = timesheets.get(changSapDiQuaOrder - 1).getmBuildingLocation();\n LatLng dstLocation = timesheets.get(changSapDiQuaOrder).getmBuildingLocation();\n drawRoute(Color.BLUE, srcLocation, dstLocation);\n }\n if (changSapDiQuaOrder > 1) {\n // Neu khong phai chang bat dau thi ve tiep chang da di qua\n // 2 vi tri chang\n LatLng srcLocation = timesheets.get(changSapDiQuaOrder - 2).getmBuildingLocation();\n LatLng dstLocation = timesheets.get(changSapDiQuaOrder - 1).getmBuildingLocation();\n drawRoute(Color.GRAY, srcLocation, dstLocation);\n }\n }\n }\n }", "public void createWeeklyList(){\n\t\tArrayList<T> days=new ArrayList<T>();\n\t\tArrayList<ArrayList<T>> weeks=new ArrayList<ArrayList<T>> ();\n\t\tList<ArrayList<ArrayList<T>>> years=new ArrayList<ArrayList<ArrayList<T>>> ();\n\t\tif(models.size()!=0) days.add(models.get(models.size()-1));\n\t\telse return;\n\t\tfor(int i=modelNames.size()-2;i>=0;i--){\n\t\t\t//check the new entry\n\t\t\tCalendar pre=DateManager.getCalendar(DateManager.convert2DisplayDate(modelNames.get(i+1)));\n\t\t\tCalendar cur=DateManager.getCalendar(DateManager.convert2DisplayDate(modelNames.get(i)));\n\t\t\tif (pre.get(Calendar.YEAR)==cur.get(Calendar.YEAR)){\n\t\t\t\tif(pre.get(Calendar.WEEK_OF_YEAR)==cur.get(Calendar.WEEK_OF_YEAR)){\n\t\t\t\t\tdays.add(models.get(i));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tweeks.add(days);\n\t\t\t\t\tdays=new ArrayList<T>();\n\t\t\t\t\tdays.add(models.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tweeks.add(days);\n\t\t\t\tyears.add(weeks);\n\t\t\t\tdays=new ArrayList<T>();\n\t\t\t\tdays.add(models.get(i));\n\t\t\t\tweeks=new ArrayList<ArrayList<T>> ();\n\t\t\t}\n\t\t}\n\t\tweeks.add(days);\n\t\tyears.add(weeks);\n\t\tweeklyModels=years;\n\n\t}", "private void previousWeek() {\r\n tmp.setDay(tmp.getDay() - daysInWeek);\r\n upDMYcountDMYcount();\r\n }", "boolean getWeek7();", "public Schedule4Week() {\n\n\t\tm_WeekSchedule = new HashMap<String, Schedule>();\n\t\t\t\n\t\tm_WeekSchedule.put(ms_Mon, new Schedule());\n\t\tm_WeekSchedule.put(ms_Tue, new Schedule());\n\t\tm_WeekSchedule.put(ms_Wed, new Schedule());\n\t\tm_WeekSchedule.put(ms_Thu, new Schedule());\n\t\tm_WeekSchedule.put(ms_Fri, new Schedule());\n\t\tm_WeekSchedule.put(ms_Sat, new Schedule());\n\t\tm_WeekSchedule.put(ms_Sun, new Schedule());\n\t\t\n\t}", "private void weekDateUpdate(GregorianCalendar reference) {\n\t\treference = (GregorianCalendar) reference.clone();\n\t\tthis.weekdates.removeAll();\n\t\treference = DateCalc.startOf(reference, Calendar.WEEK_OF_YEAR);\n\t\tint day = 1;\n\t\tJLabel current;\n\t\twhile (day <= 7) {\n\t\t\tStringBuilder date = new StringBuilder();\n\t\t\tdate.append(reference.getDisplayName(Calendar.DAY_OF_WEEK,\n\t\t\t\t\tCalendar.SHORT, DEFAULT_LOCALE)\n\t\t\t\t\t+ \" \");\n\t\t\tdate.append(reference.get(Calendar.DAY_OF_MONTH));\n\t\t\tdate.append('.');\n\t\t\tdate.append((reference.get(Calendar.MONTH) + 1));\n\n\t\t\tcurrent = new JLabel(date.toString());\n\t\t\tthis.weekdates.add(current);\n\t\t\tthis.weekdates.addSeparator();\n\t\t\treference.add(Calendar.DAY_OF_WEEK, 1);\n\t\t\tday++;\n\t\t}\n\t}", "boolean getWeek5();", "private void startWeek(int amtTellers) {\n for (int i =0; i< amtTellers; i++) {\n employees.add(new Teller(i+1, this));\n }\n }", "private void setupCurrentGames() {\n add(announcementBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(chatRoomBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(friendsListBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(leaderboardBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(settingsBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n }", "public void clearWeeklyView(){\n\t\tthis.weeklyView=false;\n\t\tnotifyDataSetChanged();\n\t\tnotifyDataSetInvalidated();\n\t}", "@FXML\r\n void onActionWeek(ActionEvent event) {\r\n\r\n appointmentListType();\r\n\r\n }", "public void display() {\n updateTileButtons();\n gridView.setAdapter(new CustomAdapter(tileButtons, columnWidth, columnHeight));\n }", "boolean getWeek3();", "@Override\n\tpublic void OnWeekSelected(long selectedDate) {\n\t\tthis.selectedDate = selectedDate;\n\t\toverViewNavigationListAdapter\n\t\t\t\t.setSubTitle(turnToDate(this.selectedDate));\n\t\toverViewNavigationListAdapter.notifyDataSetChanged();\n\t\tif (overviewFragment != null) {\n\t\t\tonUpdateListListener = (OnUpdateListListener) overviewFragment;\n\t\t\tonUpdateListListener.OnUpdateList(this.selectedDate);\n\t\t}\n\n\t}", "public List<Week> getAllWeeks() { return weekService.getAllWeeks(); }", "boolean hasWeek1();", "boolean hasWeek6();", "private void populateWeeks(YearlySchedule yearlySchedule) {\n\t\tMap<Integer, Set<DailySchedule>> weeksMap = yearlySchedule.getWeeks();\n\t\t\n\t\tfor (Iterator<MonthlySchedule> iterator = yearlySchedule.getMonthlySchedule().values().iterator(); iterator.hasNext();) {\n\t\t\tMonthlySchedule monthSchedule = (MonthlySchedule) iterator.next();\n\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.set(Calendar.YEAR, yearlySchedule.getYearValue());\n\t\t\tcalendar.set(Calendar.MONTH, monthSchedule.getMonthValue());\n\t\t\tcalendar.set(Calendar.DATE, 1);\n\t\t\tint numDays = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\t\n\t\t\tfor(int day=1;day<=numDays;day++){ // ITERATE THROUGH THE MONTH\n\t\t\t\tcalendar.set(Calendar.DATE, day);\n\t\t\t\tint dayofweek = calendar.get(Calendar.DAY_OF_WEEK);\n\t\t\t\tint weekofyear = calendar.get(Calendar.WEEK_OF_YEAR);\n\n\t\t\t\tSet<DailySchedule> week = null;\n\t\t\t\tif(monthSchedule.getMonthValue() == 11 && weekofyear == 1){ // HANDLE 1st WEEK OF NEXT YEAR\n\t\t\t\t\tYearlySchedule nextyear = getYearlySchedule(yearlySchedule.getYearValue()+1);\n\t\t\t\t\tif(nextyear == null){\n\t\t\t\t\t\t// dont generate anything \n\t\t\t\t\t\t// advance iterator to end\n\t\t\t\t\t\tday = numDays;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tweek = nextyear.getWeeks().get(weekofyear);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tweek = weeksMap.get(weekofyear);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(week == null){\n\t\t\t\t\tweek = new HashSet<DailySchedule>();\n\t\t\t\t\tweeksMap.put(weekofyear, week);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(dayofweek == 1 && day+6 <= numDays){ // FULL 7 DAYS\n\t\t\t\t\tfor(int z=day; z<=day+6;z++){\n\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(z));\n\t\t\t\t\t}\n\t\t\t\t\tday += 6; // Increment to the next week\n\t\t\t\t}else if (dayofweek == 1 && day+6 > numDays){ // WEEK EXTENDS INTO NEXT MONTH\n\t\t\t\t\tint daysInNextMonth = (day+6) - numDays;\n\t\t\t\t\t\n\t\t\t\t\t// GET DAYS IN NEXT MONTH\n\t\t\t\t\tif(monthSchedule.getMonthValue()+1 <= 11){ // IF EXCEEDS CURRENT CALENDAR HANDLE IN ESLE BLOCK \n\t\t\t\t\t\tMonthlySchedule nextMonthSchedule = getScheduleForMonth(monthSchedule.getMonthValue()+1, yearlySchedule.getYearValue()); // GET NEXT MONTH\n\t\t\t\t\t\tfor(int n = 1; n<=daysInNextMonth; n++){\n\t\t\t\t\t\t\tweek.add(nextMonthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\tfor(int n = day; n<=numDays; n++){\n\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t// TODO HANDLE ROLL OVER INTO NEXT YEAR\n\t\t\t\t\t\t// TODO SHOULD SCHEDULE CONSIDER ROLLING OVER INTO NEXT AND PREVIOUS YEARS???\n\t\t\t\t\t\tif(!exceedRange(yearlySchedule.getYearValue()-1)){\n\t\t\t\t\t\t\tMonthlySchedule nextMonthScheudle = getScheduleForMonth(0, yearlySchedule.getYearValue()+1); // GET JANUARY MONTH OF NEXT YEAR\n\t\t\t\t\t\t\tfor(int n = 1; n<=daysInNextMonth; n++){\n\t\t\t\t\t\t\t\tweek.add(nextMonthScheudle.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\t\tfor(int n = day; n<=numDays; n++){\n\t\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak; // DONE WITH CURRENT MONTH NO NEED TO CONTINUE LOOPING OVER MONTH\n\t\t\t\t}else if(day-dayofweek < 0){ // WEEK EXTENDS INTO PREVIOUS MONTH\n\t\t\t\t\tint daysInPreviousMonth = dayofweek-day;\n\t\t\t\t\tint daysInCurrentMonth = 7-daysInPreviousMonth;\n\t\t\t\t\t\n\t\t\t\t\t// GET DAYS IN PREVIOUS MONTH\n\t\t\t\t\tif(monthSchedule.getMonthValue()-1 >= 0){ // IF PRECEEDS CURRENT CALENDAR HANDLE IN ESLE BLOCK\n\t\t\t\t\t\tMonthlySchedule previousMonthSchedule = getScheduleForMonth(monthSchedule.getMonthValue()-1, yearlySchedule.getYearValue()); // GET PREVIOUS MONTH\n\t\t\t\t\t\tcalendar.set(Calendar.MONTH, previousMonthSchedule.getMonthValue());\n\t\t\t\t\t\tint numDaysInPreviousMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int n = numDaysInPreviousMonth-(daysInPreviousMonth-1); n<=numDaysInPreviousMonth; n++){ // WHICH DAY TO START ON IN PREVIOUS MONTH\n\t\t\t\t\t\t\tweek.add(previousMonthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcalendar.set(Calendar.MONTH, monthSchedule.getMonthValue()); // RESET CALENDAR MONTH BACK TO CURRENT\n\t\t\t\t\t\t\n\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\tfor(int n = day; n<day+daysInCurrentMonth; n++){\n\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t// TODO HANDLE ROLL OVER INTO PREVIOUS YEAR **DONE**\n\t\t\t\t\t\tif(!exceedRange(yearlySchedule.getYearValue()-1)){\n\t\t\t\t\t\t\tMonthlySchedule previousMonthSchedule = getScheduleForMonth(11, yearlySchedule.getYearValue()-1); // GET DECEMEBER MONTH OF PREVIOUS YEAR\n\t\t\t\t\t\t\tcalendar.set(Calendar.MONTH, previousMonthSchedule.getMonthValue());\n\t\t\t\t\t\t\tcalendar.set(Calendar.YEAR, previousMonthSchedule.getYearValue());\n\t\t\t\t\t\t\tint numDaysInPreviousMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int n = numDaysInPreviousMonth-(daysInPreviousMonth-1); n<=numDaysInPreviousMonth; n++){ // WHICH DAY TO START ON IN PREVIOUS MONTH\n\t\t\t\t\t\t\t\tweek.add(previousMonthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcalendar.set(Calendar.MONTH, monthSchedule.getMonthValue()); // RESET CALENDAR MONTH BACK TO CURRENT\n\t\t\t\t\t\t\tcalendar.set(Calendar.YEAR, monthSchedule.getYearValue()); // RESET CALENDAR YEAR BACK TO CURRENT\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\t\tfor(int n = day; n<day+daysInCurrentMonth; n++){\n\t\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tday += (daysInCurrentMonth-1); // Increment to the next week (-1 because ITERATION WITH DO A ++ )\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void viewBy() {\n\t\tMONTHS[] arrayOfMonths = MONTHS.values();\n\t\tLONGDAYS[] arrayOfLongDays = LONGDAYS.values();\n\t\tSystem.out.println(\"[D]ay view or [M]onth view ? \");\n\t\tScanner sc = new Scanner(System.in);\n\t\tString input;\n\t\tif (sc.hasNextLine()) {\n\t\t\tinput = sc.nextLine().toLowerCase();\n\n\t\t\tif (input.equals(\"d\")) { //day view\t\t\t\t\n\t\t\t\tGregorianCalendar cal1 = new GregorianCalendar();\n\t\t\t\tGregorianCalendar cal = new GregorianCalendar(cal1.get(Calendar.YEAR), cal1.get(Calendar.MONTH)+1, cal1.get(Calendar.DAY_OF_MONTH));\n\t\t\t\tSystem.out.print(arrayOfLongDays[cal1.get(Calendar.DAY_OF_WEEK) - 1]);\n\t\t\t\tSystem.out.print(\", \");\n\t\t\t\tSystem.out.print(arrayOfMonths[cal.get(Calendar.MONTH)-1]);\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t\tSystem.out.print(cal.get(Calendar.DAY_OF_MONTH));\n\t\t\t\tSystem.out.print(\", \");\n\t\t\t\tSystem.out.print(cal.get(Calendar.YEAR));\n\t\t\t\tString values = getValues(cal);\n\t\t\t\tif (values != \"\") {\n\t\t\t\t\tSystem.out.println(\"\\n\" + values);\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"\\nThere are no events scheduled for this day\");\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"\\n[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\tinput = sc.nextLine().toLowerCase();\n\t\t\t\twhile (input.equals(\"n\") || input.equals(\"p\")) {\n\t\t\t\t\tif (input.equals(\"p\")) { // previous\n\t\t\t\t\t\tcal.add(Calendar.DAY_OF_MONTH, -1);\n\t\t\t\t\t\tcal1.add(Calendar.DAY_OF_MONTH, -1);\n\t\t\t\t\t\tSystem.out.print(arrayOfLongDays[cal1.get(Calendar.DAY_OF_WEEK) - 1]);\n\t\t\t\t\t\tSystem.out.print(\", \");\n\t\t\t\t\t\tSystem.out.print(arrayOfMonths[cal.get(Calendar.MONTH)-1]);\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t\tSystem.out.print(cal.get(Calendar.DAY_OF_MONTH));\n\t\t\t\t\t\tSystem.out.print(\", \");\n\t\t\t\t\t\tSystem.out.print(cal.get(Calendar.YEAR) + \"\\n\");\n\t\t\t\t\t\tString value = getValues(cal);\n\t\t\t\t\t\tif (value != \"\") {\n\t\t\t\t\t\t\tSystem.out.println(value);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\"\\nThere are no events scheduled for this day\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"\\n[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\t\t\tinput = sc.nextLine().toLowerCase();\n\t\t\t\t\t} else if (input.equals(\"n\")) { // next\n\t\t\t\t\t\tcal.add(Calendar.DAY_OF_MONTH, 1);\n\t\t\t\t\t\tcal1.add(Calendar.DAY_OF_MONTH, 1);\n\t\t\t\t\t\tSystem.out.print(arrayOfLongDays[cal1.get(Calendar.DAY_OF_WEEK) - 1]);\n\t\t\t\t\t\tSystem.out.print(\", \");\n\t\t\t\t\t\tSystem.out.print(arrayOfMonths[cal.get(Calendar.MONTH)-1]);\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t\tSystem.out.print(cal.get(Calendar.DAY_OF_MONTH));\n\t\t\t\t\t\tSystem.out.print(\", \");\n\t\t\t\t\t\tSystem.out.print(cal.get(Calendar.YEAR) + \"\\n\");\n\t\t\t\t\t\tString values1 = getValues(cal);\n\t\t\t\t\t\tif (values1 != \"\") {\n\t\t\t\t\t\t\tSystem.out.println(values1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\"\\nThere are no events scheduled for this day\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"\\n[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\t\t\tinput = sc.nextLine().toLowerCase();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (input.equals(\"m\")) { // main menu\n\t\t\t\t\tSystem.out.println(\"main menu\");\n\t\t\t\t} else { // user didn't input a valid option\n\t\t\t\t\tSystem.out.println(\"\\n[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\t}\n\n\t\t\t} else if (input.equals(\"m\")) { // month view\n\t\t\t\tGregorianCalendar cal = new GregorianCalendar();\n\t\t\t\tdisplayMainMenuWithEvents(cal);\n\t\t\t\tSystem.out.println(\"[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\tinput = sc.nextLine().toLowerCase();\n\t\t\t\twhile (input.equals(\"p\") || input.equals(\"n\")) {\n\t\t\t\t\tif (input.equals(\"p\")) { // previous\n\t\t\t\t\t\tcal.add(Calendar.MONTH, -1);\n\t\t\t\t\t\tdisplayMainMenuWithEvents(cal);\n\t\t\t\t\t\tSystem.out.println(\"\\n[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\t\t\tinput = sc.nextLine().toLowerCase();\n\t\t\t\t\t} else if (input.equals(\"n\")) { // next\n\t\t\t\t\t\tcal.add(Calendar.MONTH, 1);\n\t\t\t\t\t\tdisplayMainMenuWithEvents(cal);\n\t\t\t\t\t\tSystem.out.println(\"\\n[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\t\t\tinput = sc.nextLine().toLowerCase();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (input.equals(\"m\")) { // main menu\n\t\t\t\t\tSystem.out.println(\"main menu\");\n\t\t\t\t} else { // user didn't input a valid option\n\t\t\t\t\tSystem.out.println(\"\\n[P]revious or [N]ext or [M]ain menu ? \");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void weekCalendar() throws InterruptedException{\n\t\tgetEBN(\"openWeek\").click();\r\n\t\tThread.sleep(waiteTime);\r\n\t\tWebElement element1 = driver.findElement(By.xpath(\".//*[@id='ir_week']/tbody/tr[1]/th[2]/span\"));\r\n\t\tString date1 = element1.getText();\r\n\t\t//System.out.println(date1);\r\n\t\tgetEBN(\"openCaln\").click();\r\n\t\tThread.sleep(waiteTime);\r\n\t\tgetEBN(\"chooseDayInCalendar\").click();\r\n\t\tThread.sleep(waiteTime);\r\n\t\tWebElement element2 = driver.findElement(By.xpath(\".//*[@id='ir_week']/tbody/tr[1]/th[2]/span\"));\r\n\t\tString date2 = element2.getText();\r\n\t\tif (date1.equals(date2)) {\r\n\t\t\tfail(\"Дата не изменилась\");\r\n\t\t}\r\n\t\t//getEBN(\"openWeek\").click();\t\r\n\t}", "@FXML\n private void dailyTab() {\n openReservation(false);\n openEventInfo(false, null);\n }", "com.czht.face.recognition.Czhtdev.Week getWeekday();", "boolean hasWeek7();", "boolean hasWeek5();", "private List<Object[]> executeWeekQuery(String week, String year) {\n try {\n //Clear all tables\n //################# Declared Harness Data #################### \n Helper.startSession();\n\n String query_str_1 = \"(SELECT \"\n + year + \" as year, \" + week + \" as week, 'Matin' as SHIFT, segment, workplace, harness_part, harness_index, supplier_part_number, harness_type, SUM(qty_read) as total_qty \"\n + \"FROM base_container bc \"\n + \"WHERE EXTRACT(HOUR FROM bc.closed_time) in (6,7,8,9,10,11,12,13) \"\n + \"AND EXTRACT(WEEK FROM bc.closed_time) = \" + week\n + \"AND EXTRACT(YEAR FROM bc.closed_time) = \" + year\n + \"GROUP BY segment, workplace, harness_part, harness_index, supplier_part_number, harness_type)\";\n\n String query_str_2 = \"(SELECT \"\n + year + \" as year, \" + week + \" as week, 'Soir' as SHIFT, segment, workplace, harness_part, harness_index, supplier_part_number, harness_type, SUM(qty_read) as total_qty \"\n + \"FROM base_container bc \"\n + \"WHERE EXTRACT(HOUR FROM bc.closed_time) in (14,15,16,17,18,19,20,21) \"\n + \"AND EXTRACT(WEEK FROM bc.closed_time) = \" + week\n + \"AND EXTRACT(YEAR FROM bc.closed_time) = \" + year\n + \"GROUP BY segment, workplace, harness_part, harness_index, supplier_part_number, harness_type)\";\n\n String query_str_3 = \"(SELECT \"\n + year + \" as year, \" + week + \" as week, 'Nuit' as SHIFT, segment, workplace, harness_part, harness_index, supplier_part_number, harness_type, SUM(qty_read) as total_qty \"\n + \"FROM base_container bc \"\n + \"WHERE EXTRACT(HOUR FROM bc.closed_time) in (22,23,0,1,2,3,4,5) \"\n + \"AND EXTRACT(WEEK FROM bc.closed_time) = \" + week\n + \"AND EXTRACT(YEAR FROM bc.closed_time) = \" + year\n + \"GROUP BY segment, workplace, harness_part, harness_index, supplier_part_number, harness_type)\";\n\n String query_str = \"SELECT * FROM (\"\n + query_str_1 + \" UNION \"\n + query_str_2 + \" UNION \"\n + query_str_3\n + \") results ORDER BY shift, segment, workplace;\";\n\n SQLQuery query = Helper.sess.createSQLQuery(query_str);\n\n this.dataResultList = query.list();\n\n Helper.sess.getTransaction().commit();\n\n return this.dataResultList;\n\n } catch (HibernateException e) {\n if (Helper.sess.getTransaction() != null) {\n Helper.sess.getTransaction().rollback();\n }\n }\n\n return this.dataResultList;\n }", "private void paintGrid() {\n\n g2d.setColor(_BOARDCOLOR); //Set the color to specific color of the board.\n\n for(int i = 0; i < grids.size(); i++) { //Iterating the 16 grids while drawing each on JComponent.\n\n g2d.draw(grids.get(i));\n }\n }", "private static void addSchedule(Container pane){\r\n pane.setLayout(null);\r\n pane.setBackground(Color.WHITE);\r\n for (MyButton b : mylist.getAllButtons()){\r\n pane.add(b);\r\n }\r\n setButtonsPlaced();\r\n Insets insets = pane.getInsets();\r\n \r\n int leftOffset = (int) monLabel.getPreferredSize().getWidth() + space;\r\n int topOffset = addDayTime(pane, leftOffset);\r\n \r\n Dimension d;\r\n int maxX = pane.getPreferredSize().width;\r\n\r\n monLabel.setBounds(insets.left, topOffset, monLabel.getPreferredSize().width, monLabel.getPreferredSize().height); \r\n d = setDay(mylist.getMonday(), leftOffset, topOffset);\r\n topOffset = d.height; \r\n if(d.width > maxX){\r\n maxX = d.width;\r\n }\r\n \r\n tueLabel.setBounds(insets.left, topOffset, tueLabel.getPreferredSize().width, tueLabel.getPreferredSize().height); \r\n d = setDay(mylist.getTuesday(), leftOffset, topOffset);\r\n topOffset = d.height; \r\n if(d.width > maxX){\r\n maxX = d.width;\r\n }\r\n \r\n wedLabel.setBounds(insets.left, topOffset, wedLabel.getPreferredSize().width, wedLabel.getPreferredSize().height); \r\n d = setDay(mylist.getWednesday(), leftOffset, topOffset);\r\n topOffset = d.height; \r\n if(d.width > maxX){\r\n maxX = d.width;\r\n }\r\n \r\n thuLabel.setBounds(insets.left, topOffset, thuLabel.getPreferredSize().width, thuLabel.getPreferredSize().height); \r\n d = setDay(mylist.getThursday(), leftOffset, topOffset);\r\n topOffset = d.height; \r\n if(d.width > maxX){\r\n maxX = d.width;\r\n }\r\n \r\n friLabel.setBounds(insets.left, topOffset, friLabel.getPreferredSize().width, friLabel.getPreferredSize().height); \r\n d = setDay(mylist.getFriday(), leftOffset, topOffset);\r\n topOffset = d.height; \r\n if(d.width > maxX){\r\n maxX = d.width;\r\n }\r\n \r\n pane.setPreferredSize(new Dimension(maxX, topOffset));\r\n frame.pack();\r\n }", "@Override\n\tpublic void girth() {\n\t\tSystem.out.println(this.name+\"的周长:\"+ (land1+land2+land3));\n\t}", "private void newAppointmentGridPane(LocalDateTime start, Duration duration) {\n // style gridPane\n GridPane gridPane = new GridPane();\n gridPane.setHgap(20);\n gridPane.setVgap(15);\n gridPane.setAlignment(Pos.CENTER);\n\n // add nodes\n gridPane.add(customerNameLbl, 0, 0);\n gridPane.add(customerNameTxt, 1, 0);\n gridPane.add(titleLbl, 0, 1);\n gridPane.add(titleTxt, 1, 1);\n gridPane.add(descriptionLbl, 0, 2);\n gridPane.add(descriptionTxt, 1, 2);\n gridPane.add(locationLbl, 0, 3);\n gridPane.add(locationTxt, 1, 3);\n gridPane.add(contactLbl, 0, 4);\n gridPane.add(contactTxt, 1, 4);\n gridPane.add(typeLbl, 0, 5);\n gridPane.add(typeTxt, 1, 5);\n gridPane.add(urlLbl, 0, 6);\n gridPane.add(urlTxt, 1, 6);\n gridPane.add(datePickerLbl, 0, 7);\n datePicker.setValue(start.toLocalDate());\n gridPane.add(datePicker, 1, 7);\n gridPane.add(startLbl, 0, 8);\n startTxt.getSelectionModel().select(LocalTime.from(start));\n gridPane.add(startTxt, 1, 8);\n gridPane.add(endLbl, 0, 9);\n endTxt.setValue((int) duration.toMinutes());\n gridPane.add(endTxt, 1, 9);\n gridPane.add(newAppointmentButtonBar(), 1, 10);\n\n\n this.stage.setScene(new Scene(gridPane));\n }", "private void timeInitializer(View view){\n currentDate = view.findViewById(R.id.schedule_textView_currentDate);\n GregorianCalendar now = new GregorianCalendar();\n DateFormat df= DateFormat.getDateInstance(DateFormat.SHORT);\n currentDate.setText(df.format(now.getTime()));\n\n currentWeek=view.findViewById(R.id.calendar_week_switch);\n Calendar c = Calendar.getInstance();\n c.setTime(new Date());\n int num_week = c.get(Calendar.WEEK_OF_YEAR);\n if(num_week%2==0){\n currentWeek.setText(R.string.even);\n isEven=true;\n }\n else{\n currentWeek.setText(R.string.odd);\n isEven=false;\n }\n\n }", "public List<String> getWeekSchedule() {\n\t\tList<String> schedule = new ArrayList<String>();\n\t\tfor (DelegatedWork dw: this.delegatedWork) {\n\t\t\tActivity currentActivity = dw.getActivity();\n\t\t\tint totalRegHours = 0;\n\t\t\tfor (RegisteredWork rw: this.registeredWork) {\n\t\t\t\tif (rw.getActivity().equals(currentActivity)) {\n\t\t\t\t\ttotalRegHours += rw.getHalfHoursWorked();\n\t\t\t\t}\n\t\t\t}\n\t\t\ttotalRegHours /= 2;\n\t\t\tschedule.add(currentActivity.getName() + \": \" + totalRegHours + \"/\" + dw.getHalfHoursWorked()/2);\n\t\t}\n\t\treturn schedule;\n\t}", "boolean getWeek4();", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n gsd = GlobalDataStore.getInstance();\n loggedInUser = gsd.getLoggedInUser();\n Date date = new Date();\n Calendar cal = Calendar.getInstance();\n cal.setTime(date);\n month = cal.get(Calendar.MONTH);\n month++; \n year = cal.get(Calendar.YEAR);\n week = cal.get(Calendar.WEEK_OF_YEAR);\n\n try {\n getByMonthAppts(month, year); \n } catch (Exception e) {\n e.printStackTrace();\n }\n \n viewByMonth.setOnAction((ActionEvent event) -> {\n\n try {\n \n getByMonthAppts(month, year);\n } catch (Exception e) {\n System.err.println(e);\n }\n \n }); \n \n viewByWeek.setOnAction((ActionEvent event) -> {\n try {\n getByWeekAppts(week, year);\n } catch (Exception e) {\n }\n });\n \n incrementWeekMonth.setOnAction((ActionEvent event) -> {\n if (isMonthlyView)\n if (month == 12) {\n month = 1;\n year++;\n getByMonthAppts(month, year);}\n else {month++;\n getByMonthAppts(month, year);\n }\n \n else {\n if (week == 52) {\n week = 1;\n year++;\n }\n else {\n week++;\n }\n try { \n getByWeekAppts(week, year);\n } catch (Exception e) {\n week--;\n e.printStackTrace();\n }\n }\n \n });\n \n \n \n decrementWeekMonth.setOnAction((ActionEvent event) -> {\n if (isMonthlyView)\n \n if (month == 1) {\n month = 12;\n year--;\n getByMonthAppts(month, year);}\n else {\n month--;\n getByMonthAppts(month, year);\n }\n else {\n if (week == 1) {\n week = 52;\n year--;\n }\n else {\n week--;\n }\n try { \n getByWeekAppts(week, year);\n } catch (Exception e) {\n week++;\n e.printStackTrace();\n }\n }\n \n });\n \n addNewAppt.setOnAction((ActionEvent event) -> {\n\n try {\n Control c = Control.getInstance();\n \n Stage stage = c.getStage();\n c.SetStage(stage);\n c.SetPane(\"newAppt\"); \n\t\t\t\t\n } catch (Exception e1) {\n System.err.println(e1);\n \n }\n });\n \n\n }", "public CalendarDemo() {\r\n super();\r\n JPanel tmpPanel = new JPanel();\r\n tmpPanel.setLayout( new GridBagLayout() );\r\n GridBagConstraints c = new GridBagConstraints();\r\n\r\n c.fill = GridBagConstraints.BOTH;\r\n c.gridx = 0;\r\n c.gridy = 0;\r\n c.weightx = 1;\r\n c.weighty = 1;\r\n c.gridheight = 2;\r\n tmpPanel.add(chart[0], c);\r\n\r\n c.gridx = 1;\r\n c.gridy = 0;\r\n c.weightx = 0.4;\r\n c.weighty = 0.4;\r\n c.gridheight = 1;\r\n tmpPanel.add(chart[1], c);\r\n\r\n c.gridx = 1;\r\n c.gridy = 1;\r\n c.weightx = 0.3;\r\n c.weighty = 0.6;\r\n c.gridheight = 1;\r\n tmpPanel.add(chart[2], c);\r\n\r\n setSamplePane(tmpPanel);\r\n\r\n weekDaysButton.addItemListener(this);\r\n monthNameButton.addItemListener(this);\r\n editButton.addActionListener(this);\r\n }", "void setGridX(int i);", "public boolean scheduleAlg1(int currBoolReset, int maxGuidesPerTourInt, int maxToursPerGuideInt, int minGuidesPerTourInt, int minToursPerGuideInt){\n\t\t\r\n\t\tint numberOfWeeks = findNumWeeks();\r\n\t\tfor(int x = 0; x < numberOfWeeks; x++){\r\n\t\t\tfor(int y = 0; y < personList.size(); y++){\r\n\t\t\t\t//System.out.println(\"a\");\r\n\t\t\t\tpersonList.get(y).weeks.add(false);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//System.out.println(\"here it's \" + personList.get(0).weeks.size());\r\n\t\t\r\n\t\tint currentAvailabilityBool; //This is the index in the availability boolean array list that is currently relevant. \r\n\t\tint week = 0;\r\n\t\tboolean innerWhile, outerWhile;\r\n\t\tint currentAvailabilityInt, currentToursGivenInt; \r\n\t\tcurrentHighestTourCount = 0;\r\n\t\tif(currBoolReset >= toursInTheWeek){\r\n\t\t\tcurrBoolReset = 0;\t\t\t\r\n\t\t}\r\n\t\tfor(int i = 0; i < maxGuidesPerTourInt; i++){\r\n\t\t\t//System.out.println(\"guide: \" + i);\r\n\t\t\t//System.out.println(\"Adding guide \" + i);\r\n\t\t\tcurrentAvailabilityBool = currBoolReset; //Have to reset it each time we loop through. \r\n\t\t\t//System.out.println(\"OUTERMOST LOOP IS \" + i);\r\n\t\t\tfor(int j = 0; j < dayList.size(); j++){\r\n\t\t\t\tweek = getWeekFromDay(j);\r\n\t\t\t\t//System.out.println(\"Day: \" + j + \" Week: \" + week);\r\n\t\t\t\tif(!dayList.get(j).holiday){ //If the current day isn't a holiday.\r\n\t\t\t\t\t//Go through all the tours on the current day.\r\n\t\t\t\t\t//System.out.println(dayList.get(j).numberOfTours + \" tours today\");\r\n\t\t\t\t\tfor(int k = 0; k < dayList.get(j).numberOfTours; k++){\r\n\t\t\t\t\t\t//System.out.println(\"Looking at tour \" + k);\r\n\t\t\t\t\t\touterWhile = true;\r\n\t\t\t\t\t\tcurrentToursGivenInt = 0;\r\n\t\t\t\t\t\twhile(outerWhile){\r\n\t\t\t\t\t\t\tinnerWhile = true;\r\n\t\t\t\t\t\t\t//System.out.println(\"OUTER WHILE - Looking at guides who have given \" + currentToursGivenInt + \" tours\");\r\n\t\t\t\t\t\t\tcurrentAvailabilityInt = 0;\r\n\t\t\t\t\t\t\twhile(innerWhile){\r\n\t\t\t\t\t\t\t\t//System.out.println(\"INNER WHILE - Availability of \" + currentAvailabilityInt);\r\n\t\t\t\t\t\t\t\t//numOfAvailableSlots\r\n\t\t\t\t\t\t\t\t//Go through guides and find one with an availability matching the currentAvailabilityInt and a true value \r\n\t\t\t\t\t\t\t\t//at the currentAvailabilityBool. Set lookingForAGuide to true and add that guide to the current tour's list,\r\n\t\t\t\t\t\t\t\t//as long as all the requirements are met. \r\n\t\t\t\t\t\t\t\t//Remember to check if currentHighestTourCount needs to be incremented.\r\n\t\t\t\t\t\t\t\tfor(int m = 0; m < personList.size(); m++){\r\n\t\t\t\t\t\t\t\t\t//System.out.println(\"m is \" + m + \" and currentAvailabilityBool is \" + currentAvailabilityBool);\r\n\t\t\t\t\t\t\t\t\tif(personList.get(m).toursThisMonth == currentToursGivenInt && personList.get(m).numOfAvailableSlots == currentAvailabilityInt && personList.get(m).availabilityBooleans.get(currentAvailabilityBool))\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t//Then we've found a guide that's got the minimum availability and is available at this time.\r\n\t\t\t\t\t\t\t\t\t\t//Check requirements, then add them if they're met. \r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tif(personList.get(m).toursThisMonth < maxToursPerGuideInt){\r\n\t\t\t\t\t\t\t\t\t\t\t//Have to check if they've already given a tour that day. \r\n\t\t\t\t\t\t\t\t\t\t\tif(personList.get(m).checkIfScheduled(j) && personList.get(m).weeks.get(week) == false){ //Make sure they haven't been given a tour on this day before.\r\n\t\t\t\t\t\t\t\t\t\t\t\tpersonList.get(m).toursThisMonth++;\r\n\t\t\t\t\t\t\t\t\t\t\t\tpersonList.get(m).scheduledDays.add(j); //Add this day to the list. \r\n\t\t\t\t\t\t\t\t\t\t\t\tif(personList.get(m).toursThisMonth > currentHighestTourCount){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentHighestTourCount = personList.get(m).toursThisMonth;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//System.out.println(\"Current highest tour count is \" + currentHighestTourCount);\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\tdayList.get(j).tourList.get(k).addGuide(personList.get(m));\r\n\t\t\t\t\t\t\t\t\t\t\t\tpersonList.get(m).tourList.add(dayList.get(j).tourList.get(k)); //Add the tour to that guide's list of tours.\r\n\t\t\t\t\t\t\t\t\t\t\t\t//System.out.println(\"We just added \" + personList.get(m).name);\r\n\t\t\t\t\t\t\t\t\t\t\t\tinnerWhile = false;\r\n\t\t\t\t\t\t\t\t\t\t\t\touterWhile = false;\r\n\t\t\t\t\t\t\t\t\t\t\t\tpersonList.get(m).weeks.set(week, true);\r\n\t\t\t\t\t\t\t\t\t\t\t\tm = personList.size();\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}//For m\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tcurrentAvailabilityInt++;\r\n\t\t\t\t\t\t\t\tif(currentAvailabilityInt > toursInTheWeek){\r\n\t\t\t\t\t\t\t\t\tinnerWhile = false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} //inner while\r\n\t\t\t\t\t\t\tcurrentToursGivenInt++;\r\n\t\t\t\t\t\t\tif(currentToursGivenInt > currentHighestTourCount){\r\n\t\t\t\t\t\t\t\t//We couldn't find a tour guide. Do we break somehow?\r\n\t\t\t\t\t\t\t\tif(i < minGuidesPerTourInt){\r\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Returned here\");\r\n\t\t\t\t\t\t\t\t\treturn false; //Because we never reached the minimum guides per tour number.\r\n\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t//Otherwise we can just skip this tour. \r\n\t\t\t\t\t\t\t\touterWhile = false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} //outer while\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Here's where we update the counter for which availability bool we're looking at.\r\n\t\t\t\t\t\tcurrentAvailabilityBool++;\r\n\t\t\t\t\t\tif(currentAvailabilityBool >= toursInTheWeek){\r\n\t\t\t\t\t\t\tcurrentAvailabilityBool = 0; //Time to reset it.\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//For k\r\n\t\t\t\t}//If not a holiday.\r\n\t\t\t\telse{\r\n\t\t\t\t\tfor(int k = 0; k < dayList.get(j).numberOfTours; k++){\r\n\t\t\t\t\t\tcurrentAvailabilityBool++;\r\n\t\t\t\t\t\tif(currentAvailabilityBool >= toursInTheWeek){\r\n\t\t\t\t\t\t\tcurrentAvailabilityBool = 0; //Time to reset it.\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}//For j\r\n\t\t}//For i\r\n\t\t//Check if minToursPerGuide has been met.\r\n\t\tif(!checkMinToursPerGuide(minToursPerGuideInt)){\r\n\t\t\tSystem.out.println(\"Min tours per guide not met\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true; //It worked!\r\n\t}", "public void refreshTitle() {\n adminPanel.setText(logic.getUiTaskList().getAdminWeekRange());\n topicPanel.setText(logic.getUiTaskList().getTopicWeekRange());\n ipPanel.setText(logic.getUiTaskList().getIpWeekRange());\n tpPanel.setText(logic.getUiTaskList().getTpWeekRange());\n }", "boolean getWeek2();", "public void updateWeekday(){\n Date curDate=new Date(System.currentTimeMillis());\n SimpleDateFormat format=new SimpleDateFormat(\"EEEE\");\n String weekday1=format.format(curDate);\n int numberWeekday1=turnWeekdayToNumber(weekday1);\n updateSpecificDay(numberWeekday1);\n TextView TextWeekday=(TextView)this.findViewById(R.id.tv_weekday);\n TextWeekday.setText(weekday1);\n }", "@FXML\n public void OAWeekView(ActionEvent event) {\n Appointment.clearWeeklyAppointments();\n Appointment.setWeekAppointments();\n Appointments.setItems(Appointment.getWeekAppointments());\n }", "private void projectWeekAnxiety() {\n increaseStat(Stat.ANXIETY, 10);\n }", "private void getWeekCalorieData(String accessToken, boolean getGoal) {\r\n ArrayList<String> taskParamsList = new ArrayList<>();\r\n taskParamsList.add(accessToken);\r\n\r\n Calendar startDate = getFirstMondayInWeek(endDate);\r\n\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(getString(R.string.fitbit_date_format));\r\n String formattedStartDate = dateFormat.format(startDate.getTime());\r\n String formattedEndDate = dateFormat.format(endDate.getTime());\r\n\r\n taskParamsList.add(\"https://api.fitbit.com/1/user/-/activities/calories/date/\" +\r\n formattedStartDate + \"/\" + formattedEndDate + \".json\");\r\n\r\n if(getGoal) {\r\n taskParamsList.add(\"https://api.fitbit.com/1/user/-/activities/date/\" +\r\n formattedEndDate + \".json\");\r\n }\r\n\r\n String[] taskParams = new String[taskParamsList.size()];\r\n taskParams = taskParamsList.toArray(taskParams);\r\n\r\n updateRequestCount(taskParams.length - 1);\r\n\r\n new FitbitGetRequestTask(this).execute(taskParams);\r\n }", "@Override\n public void onWeekChange(List<Calendar> weekCalendars) {\n String firstDateString = weekCalendars.get(0).toString();\n try {\n firstDateOfWeek = sdfLibraryDate.parse(firstDateString);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n assert firstDateOfWeek != null;\n firstDateString = sdfMyDate.format(firstDateOfWeek);\n try {\n firstDateOfWeek = sdfMyDate.parse(firstDateString);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n Log.e(\"HDT0309\", \"firstDateOfWeek \" + firstDateOfWeek); //Oke\n ///\n for (Calendar calendar : weekCalendars) {\n //Log.e(\"HDT0309\", \"(3)onWeekChange:\" + calendar.toString());\n }\n }", "private void setupButtonListeners() {\r\n final SharedPreferences sharedPref = getSharedPreferences(getString(R.string.pref_file_key),\r\n Context.MODE_PRIVATE);\r\n final String accessToken = sharedPref.getString(getString(R.string.access_token_key), null);\r\n\r\n final BarChart chart = findViewById(R.id.chart);\r\n\r\n final Button btnNext = findViewById(R.id.btn_next);\r\n btnNext.setVisibility(View.GONE); // current week is displayed on create, so no next week\r\n btnNext.setOnClickListener(new View.OnClickListener() {\r\n\r\n public void onClick(View v) {\r\n // Clear old data\r\n chart.invalidate();\r\n chart.clear();\r\n\r\n offsetFromToday--;\r\n\r\n // Calculate new endDate used to keep track of which day or week is displayed\r\n // and update the date heading\r\n if(dataType.equals(\"NON-SED\")) {\r\n endDate.add(Calendar.DATE, 1);\r\n updateDateHeading(null);\r\n } else {\r\n Calendar startDate = endDate;\r\n startDate.add(Calendar.DATE, 1);\r\n endDate = calcEndDateFromStart(startDate);\r\n updateDateHeading(startDate);\r\n }\r\n\r\n // Request new data\r\n getActivityData(accessToken, false);\r\n }\r\n });\r\n\r\n final Button btnPrev = findViewById(R.id.btn_prev);\r\n btnPrev.setOnClickListener(new View.OnClickListener() {\r\n\r\n public void onClick(View v) {\r\n // Clear old data\r\n chart.invalidate();\r\n chart.clear();\r\n\r\n offsetFromToday++;\r\n\r\n // Calculate new endDate used to keep track of which day or week is displayed\r\n // and update the date heading\r\n if(dataType.equals(\"NON-SED\")) {\r\n endDate.add(Calendar.DATE, -1);\r\n updateDateHeading(null);\r\n } else {\r\n endDate = calcPrevEndDate(endDate);\r\n Calendar startDate = getFirstMondayInWeek(endDate);\r\n updateDateHeading(startDate);\r\n }\r\n\r\n // Request new data\r\n getActivityData(accessToken, false);\r\n }\r\n });\r\n }", "public void levelSevenScreen() {\n timer.stop();\n gameModel.setState(\"Level 7\");\n currentScene = levelSetup.getLevelSeven().getScene(levelSevenInitialEntrance);\n currentBoard = levelSetup.getLevelSeven().getBoard();\n currentLevelScreen = levelSetup.getLevelSeven();\n levelSevenInitialEntrance = (levelSevenInitialEntrance ? false : false);\n moveCharacter(mainWindow, currentScene, hero, currentBoard);\n }", "@Override\n public void onClick() {\n showMonthViewWithBelowEvents();\n }", "public void updateView() {\n// LocalDate startDate = LocalDate.of(2017, Month.SEPTEMBER, 1);\n// LocalDate endDate = LocalDate.of(2017, Month.SEPTEMBER, 6);\n// getRecords(startDate, endDate);\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n Log.i(\"*********\", \"Here the adapter be created and set\");\n //CalendarAdapter adapter = new CalendarAdapter(getApplicationContext(), drawMonth2(), workingDays, holidays, requestedHolidays, generalCalendar);\n //calendarGrid.setAdapter(adapter);\n drawMonth(workingDays, holidays, requestedHolidays, generalCalendar);//problably will need to add to workingDays the dates read from the database\n\n }", "public void updateSpecificDay(int i){\n String[] weekArray = {\"MON\",\"TUE\",\"WED\",\"THU\",\"FRI\",\"SAT\",\"SUN\"};\n int weekday2=i;\n weekday2=weekday2%7;\n String weekday2string=weekArray[weekday2];\n TextView TVweekday2=(TextView)this.findViewById(R.id.weekday2);\n TVweekday2.setText(weekday2string);\n\n int weekday3=i+1;\n weekday3=weekday3%7;\n String weekday3string=weekArray[weekday3];\n TextView TVweekday3=(TextView)this.findViewById(R.id.weekday3);\n TVweekday3.setText(weekday3string);\n\n int weekday4=i+2;\n weekday4=weekday4%7;\n String weekday4string=weekArray[weekday4];\n TextView TVweekday4=(TextView)this.findViewById(R.id.weekday4);\n TVweekday4.setText(weekday4string);\n\n int weekday5=i+3;\n weekday5=weekday5%7;\n String weekday5string=weekArray[weekday5];\n TextView TVweekday5=(TextView)this.findViewById(R.id.weekday5);\n TVweekday5.setText(weekday5string);\n }", "private void loadCalendarLabels(){\n int year = Model.getInstance().viewing_year;\n int month = Model.getInstance().viewing_month;\n \n // Note: Java's Gregorian Calendar class gives us the right\n // \"first day of the month\" for a given calendar & month\n // This accounts for Leap Year\n GregorianCalendar gc = new GregorianCalendar(year, month, 1);\n int firstDay = gc.get(Calendar.DAY_OF_WEEK);\n int daysInMonth = gc.getActualMaximum(Calendar.DAY_OF_MONTH);\n \n // We are \"offsetting\" our start depending on what the\n // first day of the month is.\n // For example: Sunday start, Monday start, Wednesday start.. etc\n int offset = firstDay;\n int gridCount = 1;\n int lblCount = 1;\n \n // Go through calendar grid\n for(Node node : calendarGrid.getChildren()){\n \n VBox day = (VBox) node;\n \n day.getChildren().clear();\n day.setStyle(\"-fx-backgroud-color: white\");\n day.setStyle(\"-fx-font: 14px \\\"System\\\" \");\n \n // Start placing labels on the first day for the month\n if (gridCount < offset) {\n gridCount++;\n // Darken color of the offset days\n day.setStyle(\"-fx-background-color: #E9F2F5\"); \n } else {\n \n // Don't place a label if we've reached maximum label for the month\n if (lblCount > daysInMonth) {\n // Instead, darken day color\n day.setStyle(\"-fx-background-color: #E9F2F5\"); \n } else {\n \n // Make a new day label \n Label lbl = new Label(Integer.toString(lblCount));\n lbl.setPadding(new Insets(5));\n lbl.setStyle(\"-fx-text-fill:darkslategray\");\n\n day.getChildren().add(lbl);\n }\n \n lblCount++; \n }\n }\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_teaher_schedule, container, false);\r\n\r\n\r\n\r\n// The week view has infinite scrolling horizontally. We have to provide the events of a\r\n// month every time the month changes on the week view.\r\n\r\n\r\n// Set long press listener for events.\r\n\r\n\r\n\r\n tcSunStart = (TextView) v.findViewById(R.id.tcSunStart) ;\r\n tcSunEnd = (TextView) v.findViewById(R.id.tcSunEnd) ;\r\n\r\n tcMonStart = (TextView) v.findViewById(R.id.tcMonStart) ;\r\n tcMonEnd = (TextView) v.findViewById(R.id.tcMonEnd) ;\r\n\r\n tcTuStart = (TextView) v.findViewById(R.id.tcTuStart) ;\r\n tcTuEnd = (TextView) v.findViewById(R.id.tcTuEnd) ;\r\n\r\n tcWeStart = (TextView) v.findViewById(R.id.tcWeStart) ;\r\n tcWeEnd = (TextView) v.findViewById(R.id.tcWeEnd) ;\r\n\r\n tcThuStart = (TextView) v.findViewById(R.id.tcThuStart) ;\r\n tcThuEnd = (TextView) v.findViewById(R.id.tcThuEnd) ;\r\n\r\n tcFriStart = (TextView) v.findViewById(R.id.tcFriStart) ;\r\n tcFriEnd = (TextView) v.findViewById(R.id.tcFriEnd) ;\r\n\r\n tcSatStart = (TextView) v.findViewById(R.id.tcSatStart) ;\r\n tcSatEnd = (TextView) v.findViewById(R.id.tcSatEnd) ;\r\n\r\n btnSetAll = (Button) v.findViewById(R.id.btnSetAll) ;\r\n btnSave = (Button) v.findViewById(R.id.btnSave) ;\r\n\r\n\r\n\r\n\r\n// tcSunStart.setOnClickListener(new View.OnClickListener() {\r\n// @Override\r\n// public void onClick(View v) {\r\n// setSingleTimeZone(v);\r\n// }\r\n// });\r\n//\r\n// tcSunEnd.setOnClickListener(new View.OnClickListener() {\r\n// @Override\r\n// public void onClick(View v) {\r\n// setSingleTimeZone(v);\r\n// }\r\n// });\r\n\r\n final ProgressDialog pd = new ProgressDialog(getActivity()) ;\r\n pd.show();\r\n\r\n FirebaseDatabase.getInstance().getReference().child(\"teacherSchedule\").child(FirebaseAuth.getInstance().getCurrentUser().getUid())\r\n .addListenerForSingleValueEvent(new ValueEventListener() {\r\n @Override\r\n public void onDataChange(DataSnapshot dataSnapshot) {\r\n Schedule sch = null;\r\n if (dataSnapshot.exists()){\r\n sch = dataSnapshot.getValue(Schedule.class);\r\n fillTP(sch);\r\n\r\n pd.dismiss();\r\n }else\r\n pd.dismiss();\r\n\r\n\r\n }\r\n\r\n @Override\r\n public void onCancelled(DatabaseError databaseError) {\r\n\r\n }\r\n });\r\n\r\n tcSunStart.setOnClickListener(this);\r\n tcSunEnd.setOnClickListener(this);\r\n tcMonStart.setOnClickListener(this);\r\n tcMonEnd.setOnClickListener(this);\r\n tcTuStart.setOnClickListener(this);\r\n tcTuEnd.setOnClickListener(this);\r\n tcWeStart.setOnClickListener(this);\r\n tcWeEnd.setOnClickListener(this);\r\n tcThuStart.setOnClickListener(this);\r\n tcThuEnd.setOnClickListener(this);\r\n tcFriStart.setOnClickListener(this);\r\n tcFriEnd.setOnClickListener(this);\r\n tcSatStart.setOnClickListener(this);\r\n tcSatEnd.setOnClickListener(this);\r\n\r\n\r\n\r\n\r\n\r\n btnSetAll.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n timePickerForSetAll();\r\n }\r\n });\r\n\r\n\r\n\r\n v.setFocusableInTouchMode(true);\r\n v.requestFocus();\r\n v.setOnKeyListener(new View.OnKeyListener() {\r\n @Override\r\n public boolean onKey(View v, int keyCode, KeyEvent event) {\r\n // Log.i(tag, \"keyCode: \" + keyCode);\r\n if( keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_UP) {\r\n //Log.i(tag, \"onKey Back listener is working!!!\");\r\n // getFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);\r\n getFragmentManager().beginTransaction().replace(R.id.container , new TeacherDay()).commit() ;\r\n return true;\r\n }\r\n return false;\r\n }\r\n });\r\n\r\n\r\n return v;\r\n }", "public void extractSevenDays(View view) {\n showExtractOnListView();\n }", "private void refreshGoalData () {\n DateTime now = DateTime.now();\n if((now.getWeekOfWeekyear() > userGoals.getWeekOfYear()) || now.getWeekOfWeekyear() == 0 ) {\n userGoals.setWeekOfYear(now.getWeekOfWeekyear());\n userGoals.setRunsPerWeekActual(0);\n userGoals.setMilesPerWeekActual(0.0);\n }\n\n //Calculates weekly mileage and runs per week\n double mileage = 0.0;\n int numOfRuns = 0;\n if(runMap != null && !(runMap.isEmpty())) {\n //Get current year and current week of the year\n int year = now.getYear();\n int currWeek = now.getWeekOfWeekyear();\n Calendar c = Calendar.getInstance();\n c.clear();\n //Set calendar to beginning of week\n c.set(Calendar.YEAR, year);\n c.set(Calendar.WEEK_OF_YEAR, currWeek);\n Date beginningOfWeek = c.getTime();\n\n SimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yyyy\");\n\n for (String key : runMap.keySet()) {\n Run run = runMap.get(key);\n //Date stored as MM/dd/yyyy\n try {\n Date dateOfRun = formatter.parse(run.getDate());\n if (dateOfRun.compareTo(beginningOfWeek) >= 0) {\n mileage += run.getMileage();\n numOfRuns++;\n }\n }catch (ParseException p) {\n //idfk\n }\n\n }\n\n if(userShoes != null && !userShoes.isEmpty()) {\n //While we're here, we're going to update the mileage for each shoe\n for (String shoeKey : userShoes.keySet()) {\n Shoe currShoe = userShoes.get(shoeKey);\n currShoe.setMileage(0.0);\n for (String runKey : runMap.keySet()) {\n if (currShoe.getName().equals(runMap.get(runKey).getShoe())) {\n currShoe.addMileage(runMap.get(runKey).getMileage());\n }\n }\n }\n }\n\n }\n userGoals.setRunsPerWeekActual(numOfRuns);\n userGoals.setMilesPerWeekActual(mileage);\n\n\n goalRef.setValue(userGoals);\n shoeRef.setValue(userShoes);\n\n check = 1;\n }", "public void setPrevWeek()\n\t{\n\t\tm_calendar.set(Calendar.WEEK_OF_MONTH,getWeekOfMonth()-1);\n\n\t}", "public void normalizeWeek(int weekDay) {\r\n\t\tvalidateInput(weekDay, 0);\r\n\t\tfor(int i = MIN_WEEKDAY; i <= MAX_WEEKDAY; i++)\r\n\t\t\tif(i != weekDay) {\r\n\t\t\t\tfor(int j = MIN_SEGMENT; j <= MAX_SEGMENT; j++) {\r\n\t\t\t\t\tschedule[i][j] = schedule[weekDay][j];\r\n\t\t\t\t\tnotifyListeners(i, j);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t}", "public void setBeginningBoard() {\n clearBooleanBoard();\n\n figBoard[0][0] = new Rook(\"white\", 00, white[0]);\n figBoard[0][1] = new Knight(\"white\", 01, white[1]);\n figBoard[0][2] = new Bishop(\"white\", 02, white[2]);\n figBoard[0][4] = new King(\"white\", 04, white[3]);\n figBoard[0][3] = new Queen(\"white\", 03, white[4]);\n figBoard[0][5] = new Bishop(\"white\", 05, white[2]);\n figBoard[0][6] = new Knight(\"white\", 06, white[1]);\n figBoard[0][7] = new Rook(\"white\", 07, white[0]);\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[0][i] = true;\n gA.getBoard()[0][i].setRotation(180);\n }\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[1][i] = true;\n gA.getBoard()[1][i].setRotation(180);\n figBoard[1][i] = new Pawn(\"white\", 10 + i, white[8]);\n }\n\n figBoard[7][0] = new Rook(\"black\", 70, black[0]);\n figBoard[7][1] = new Knight(\"black\", 71, black[1]);\n figBoard[7][2] = new Bishop(\"black\", 72, black[2]);\n figBoard[7][4] = new King(\"black\", 74, black[3]);\n figBoard[7][3] = new Queen(\"black\", 73, black[4]);\n figBoard[7][5] = new Bishop(\"black\", 75, black[2]);\n figBoard[7][6] = new Knight(\"black\", 76, black[1]);\n figBoard[7][7] = new Rook(\"black\", 77, black[0]);\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[7][i] = true;\n gA.getBoard()[7][i].setRotation(0);\n }\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[6][i] = true;\n gA.getBoard()[6][i].setRotation(0);\n figBoard[6][i] = new Pawn(\"black\", 60 + i, black[8]);\n }\n\n clearFallenFigures();\n clearBoardBackground();\n clearStringBoard();\n showBoard(); //shows the figures\n showScore();\n setBoardClickable();\n\n if (beginner % 2 == 0)\n this.turn = 0;\n else this.turn = 1;\n\n beginner++;\n\n numberOfBlackFallen = 0;\n numberOfWhiteFallen = 0;\n fallenFiguresWhite = new ArrayList<Figure>();\n fallenFiguresBlack = new ArrayList<Figure>();\n\n showCheck();\n showTurn();\n }", "private void setupOpenHoursListView() {\n }", "void placePowerStation() {\n this.board.get(powerRow).get(powerCol).placePowerStation();\n }", "private void setupChessBoard() {\n add(announcementBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(currentGamesBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(chatRoomBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(friendsListBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(leaderboardBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(settingsBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n }", "boolean hasWeek3();" ]
[ "0.6482476", "0.6290918", "0.6028853", "0.601467", "0.5861197", "0.5798345", "0.57429636", "0.5733093", "0.5690108", "0.56856805", "0.5670086", "0.5666206", "0.564864", "0.56136334", "0.5579397", "0.5561899", "0.55455846", "0.552137", "0.5491046", "0.54483515", "0.5427534", "0.5392837", "0.53781974", "0.5367807", "0.5358247", "0.53483397", "0.53368706", "0.53179586", "0.52961904", "0.5285054", "0.5267468", "0.5264463", "0.52546334", "0.5251881", "0.52418345", "0.5207783", "0.52069813", "0.5206688", "0.51764745", "0.5139218", "0.51317537", "0.5131487", "0.5129539", "0.51252437", "0.51243544", "0.5110309", "0.5103156", "0.50854856", "0.506919", "0.50659275", "0.50487965", "0.5047461", "0.5044396", "0.50376886", "0.50199246", "0.5012722", "0.50012124", "0.49941933", "0.49908742", "0.49843597", "0.49694932", "0.4966656", "0.49479124", "0.49387488", "0.49316028", "0.4928778", "0.492729", "0.49173906", "0.49123386", "0.49040365", "0.49012205", "0.4900068", "0.48974952", "0.48918462", "0.48887357", "0.48852572", "0.48808017", "0.4879533", "0.48773095", "0.487062", "0.4869163", "0.48685884", "0.48593596", "0.48581263", "0.48511282", "0.48345134", "0.48337469", "0.48282632", "0.4823568", "0.48128906", "0.4806748", "0.4800336", "0.47969475", "0.47916737", "0.4787347", "0.47833377", "0.47766545", "0.4773208", "0.47729567", "0.4771707" ]
0.66928005
0
Get Last(Max) Leave Application Id : from upto this max Leave Application Id, Leave Applications are moved to KeyPayIntLeaveApplication table
private void updateKeyPayIntLeaveAppTable(Long companyId) { Long maxLeaveApplicationId = keyPayIntLeaveApplicationDAO .getMaxApprovedLeaveAppId(companyId); if (maxLeaveApplicationId == null) { maxLeaveApplicationId = 0l; } // maxLeaveApplicationId = 62409l; // Get Leave Approved and Leave Cancel applications (i.e. those // applications are not still moved to KeyPayIntLeaveApplication table) List<LeaveApplication> approvedLeaveForKeyPayInt = leaveApplicationDAO .getApprovedNCancelLeaveForKeyPayInt(maxLeaveApplicationId, companyId, PayAsiaConstants.LEAVE_STATUS_COMPLETED); for (LeaveApplication leaveApplication : approvedLeaveForKeyPayInt) { KeyPayIntLeaveApplication keyPayIntLeaveApplication = new KeyPayIntLeaveApplication(); keyPayIntLeaveApplication.setLeaveApplication(leaveApplication); keyPayIntLeaveApplication.setCompany(leaveApplication.getCompany()); keyPayIntLeaveApplication.setEmployeeNumber(leaveApplication .getEmployee().getEmployeeNumber()); keyPayIntLeaveApplication.setStartDate(leaveApplication .getStartDate()); keyPayIntLeaveApplication.setEndDate(leaveApplication.getEndDate()); keyPayIntLeaveApplication.setHours(new BigDecimal(leaveApplication .getTotalDays())); keyPayIntLeaveApplication.setLeaveTypeName(leaveApplication .getEmployeeLeaveSchemeType().getLeaveSchemeType() .getLeaveTypeMaster().getLeaveTypeName()); keyPayIntLeaveApplication.setRemarks(leaveApplication.getReason()); if (leaveApplication.getLeaveCancelApplication() == null) { keyPayIntLeaveApplication .setLeaveStatus(PayAsiaConstants.LEAVE_STATUS_APPROVED); } else { keyPayIntLeaveApplication .setLeaveStatus(PayAsiaConstants.LEAVE_STATUS_CANCELLED); keyPayIntLeaveApplication .setCancelLeaveApplicationId(leaveApplication .getLeaveCancelApplication() .getLeaveApplicationId()); } keyPayIntLeaveApplication .setSyncStatus(PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_UNPROCESS); keyPayIntLeaveApplicationDAO.save(keyPayIntLeaveApplication); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getLastId() {\n for (int i = 0; i < remindersTable.getRowCount(); i++) {\n if (parseInt(remindersTable.getValueAt(i, 7).toString()) > maxId) {\n maxId = parseInt(remindersTable.getValueAt(i, 7).toString());\n }\n }\n }", "public int getLastLoginAppid() {\n\t\t\treturn lastLoginAppid;\n\t\t}", "public long getMaxId(MigrationType type);", "public Integer getMaxId(){\n\t\tInteger max=0;\n\t\tfor(Integer i : getIdList()){\n\t\t\tif (i>max)\n\t\t\t\tmax=i;\n\t\t}\n\t\treturn max;\n\t}", "private int getLastID() {\n\t\t\n\t\tArrayList<Integer> domandeIdList = new ArrayList<>();\n\t\tdomandeIdList.add(0);\n\t\tDB db = getDB();\n\t\tMap<Long, Domanda> domande = db.getTreeMap(\"domande\");\n\t\t\n\t\tfor(Map.Entry<Long, Domanda> domanda : domande.entrySet())\n\t\t\tif(domanda.getValue() instanceof Domanda)\n\t\t\t\tdomandeIdList.add(domanda.getValue().getId());\n\t\t\n\t\tInteger id = Collections.max(domandeIdList);\n\t\treturn id;\n\t}", "public void getBlankLeaveRecord(LeaveApproval leaveApp) {\n\t\t\tObject empObject[] = new Object[1];\r\n\t\t\tempObject[0] = leaveApp.getUserEmpId();\r\n\t\t\tObject[][] data = getSqlModel().getSingleResult(getQuery(2),empObject);\r\n\t\t\t\r\n\t\t\tlogger.info(\"data----------: \"+String.valueOf(empObject[0]));\r\n\t\t\t\r\n\t\t\tArrayList<Object> appList = new ArrayList<Object>();\r\n\t\t\t\r\n\t\t\tfor(int i=0; i<data.length; i++) {\t\r\n\t\t\tLeaveApproval bean1= new LeaveApproval();\r\n\t\t\tLeaveApplication appBean = new LeaveApplication();\r\n\t\t\t\tbean1.setAppCode(String.valueOf(data[i][0]));\r\n\t\r\n\t\t\t\tbean1.setEmpId(String.valueOf(data[i][1]));\r\n\t\t\t\tbean1.setEmpName(String.valueOf(data[i][2]));\r\n\t\t\t\tbean1.setAppDate(String.valueOf(data[i][3]));\r\n\t\t\t\tbean1.setFromDate(String.valueOf(data[i][4]));\r\n\t\t\t\tbean1.setToDate(String.valueOf(data[i][5]));\r\n\t\t\t\tbean1.setTotalDays(String.valueOf(data[i][6]));\r\n\t\t\t\t\r\n\t\t\tappList.add(bean1);\r\n\t\t}\r\n\t\t\tleaveApp.setAppList(appList);\r\n\t\t\t\r\n\t}", "private int getLastIDRisposte() {\n\n\t\tArrayList<Integer> risposteIdList = new ArrayList<>();\n\t\trisposteIdList.add(0);\n\t\tDB db = getDB();\t\t\n\t\tMap<Long, Risposta> risposte = db.getTreeMap(\"risposte\");\n\t\t\n\t\tfor(Map.Entry<Long, Risposta> risposta : risposte.entrySet())\n\t\t\tif(risposta.getValue() instanceof Risposta)\n\t\t\t\trisposteIdList.add(risposta.getValue().getId());\n\t\t\n\t\tInteger id = Collections.max(risposteIdList);\n\t\treturn id;\n\t}", "private long findMaxId() {\n\t\tlong max = 0;\n\t\tfor (Block block : this.getBlockCollection()) {\n\t\t\tif (block.getId() > max) {\n\t\t\t\tmax = block.getId();\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}", "@Query(value = \"select max(sec_id) from section where course_id = ?1\",nativeQuery = true)\n Optional<Integer> currentSecId(Long courseId);", "public int largestEntry() throws SQLException {\r\n String statement = \"SELECT Appointment_ID FROM appointments ORDER BY Appointment_ID DESC LIMIT 0,1\";\r\n ResultSet rs = conn.prepareStatement(statement).executeQuery();\r\n rs.next();\r\n return rs.getInt(\"Appointment_ID\");\r\n }", "@Override\n\tpublic List<Application> getLatestActivity(int maxResults) {\n\t\treturn wrapApplication(flatPushMessageInformationDao.findLatestActivity(loginName.get(), maxResults));\n\t}", "private long maxIdFromTable(String ename) {\n\t\tEOEntity entity = EOModelGroup.defaultGroup().entityNamed(ename);\n\t\tif (entity == null) throw new NullPointerException(\"could not find an entity named \" + ename);\n\t\tString tableName = entity.externalName();\n\t\tString colName = entity.primaryKeyAttributes().lastObject().columnName();\n\t\tString sql = \"select max(\" + colName + \") from \" + tableName;\n\n\t\tERXJDBCConnectionBroker broker = ERXJDBCConnectionBroker.connectionBrokerForEntityNamed(ename);\n\t\tConnection con = broker.getConnection();\n\t\tResultSet resultSet;\n\t\ttry {\n\t\t\tresultSet = con.createStatement().executeQuery(sql);\n\t\t\tcon.commit();\n\n\t\t\tboolean hasNext = resultSet.next();\n\t\t\tlong v = 1l;\n\t\t\tif (hasNext) {\n\t\t\t\tv = resultSet.getLong(1);\n\t\t\t\tlog.debug(\"received max id from table {}, setting value in PK_TABLE to {}\", tableName, v);\n\t\t\t\tif(encodeEntityInPkValue()) {\n\t\t\t\t\tv = v >> CODE_LENGTH;\n\t\t\t\t}\n\t\t\t\tif(encodeHostInPkValue()) {\n\t\t\t\t\tv = v >> HOST_CODE_LENGTH;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn v + 1;\n\n\t\t} catch (SQLException e) {\n\t\t\tlog.error(\"could not call database with sql {}\", sql, e);\n\t\t\tthrow new IllegalStateException(\"could not get value from \" + sql);\n\t\t} finally {\n\t\t\tbroker.freeConnection(con);\n\t\t}\n\t}", "int getMaxID() throws DatabaseNotAccessibleException;", "public static int getMaxId() {\r\n\t\treturn maxId++;\r\n\t}", "int findMaximumOrderByWorkflowId( int nWorkflowId );", "protected void obtainLiveMaxChatId() {\n\t\tfor (int i = 0; i < liveModels.size();i++) {\n\t\t\tSquareLiveChatModel squareLiveChatModel = liveModels.get(i);\n\t\t\tif (squareLiveChatModel.getIsTop() == 0) {//置顶\n\t\t\t\tlong tempLiveMaxChatId = squareLiveChatModel.getChatId();\n\t\t\t\tif (tempLiveMaxChatId>liveMaxChatId) {\n\t\t\t\t\tliveMaxChatId = tempLiveMaxChatId;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t} \n\t\t}\n\t}", "@Override\n @SuppressWarnings(\"unchecked\")\n public long getUpperBound() {\n AuditReader auditService = Framework.getService(AuditReader.class);\n String auditQuery = \"from LogEntry log order by log.id desc\";\n log.debug(\"Querying audit log for greatest id: {}\", auditQuery);\n\n List<LogEntry> entries = (List<LogEntry>) auditService.nativeQuery(auditQuery, 1, 1);\n if (entries.isEmpty()) {\n log.debug(\"Found no audit log entries, returning -1\");\n return -1;\n }\n return entries.get(0).getId();\n }", "public Application getLastModifyingApplication()\r\n\t{\r\n\t\treturn lastModifyingApplication;\r\n\t}", "private static int getEndID(HashMap<Integer, ActivityPrediction> model) {\n int endID = 0;\n for (ActivityPrediction predictionNode : model.values()) {\n if (predictionNode.isEnd()) {\n endID = predictionNode.getActivityID();\n }\n }\n return endID;\n }", "public int getHighestId() {\n final SQLiteStatement statement = db.compileStatement(\"SELECT MAX(_id) FROM Games\");\n return (int) statement.simpleQueryForLong();\n }", "private int getMaxIfIpId() {\n\n // get maxRundowId\n Integer maxIfIpId = this.baseMapper.getSqlSession().selectOne(this.getSqlId(\"getMaxIfIpId\"));\n\n // get form databse\n return maxIfIpId == null ? IntDef.INT_ONE : maxIfIpId.intValue();\n }", "public List<LeaveApplication> getAll();", "@Query(value = \"select max(user_id) from tbl_rating\", nativeQuery = true)\n Long getHighestId();", "@Query(value = \"select max(sec_no) from section where course_id = ?1\",nativeQuery = true)\n Optional<Integer> currentSecNo(Long courseId);", "public long peakId() {\n\t\treturn currentMaxId;\n\t}", "public Integer returnMaxRecord(String library_id, String sublibrary_id) {\n Session session = HibernateUtil.getSessionFactory().openSession();\n Integer maxbiblio =null;\n\n try {\n session.beginTransaction();\n Criteria criteria = session.createCriteria(AccessionRegister.class);\n Criterion a = Restrictions.eq(\"id.libraryId\", library_id);\n Criterion b = Restrictions.eq(\"id.sublibraryId\", sublibrary_id);\n LogicalExpression lexp = Restrictions.and(a, b);\n maxbiblio = (Integer) criteria.add(lexp).setProjection(Projections.max(\"id.recordNo\")).uniqueResult();\n if (maxbiblio == null) {\n maxbiblio = 1;\n } else {\n maxbiblio++;\n }\nsession.getTransaction().commit();\n \n } catch(Exception e){\n e.printStackTrace();\n }\n finally {\n session.close();\n }\n return maxbiblio;\n }", "public int getMaxIdPermit() {\n\n\t\t\tConnection con = null;\n\t\t\tPreparedStatement pstmt = null;\n\t\t\tResultSet rs = null;\n\t\t\tString query = null;\n\t\t\t\n\t\t\t\n\t\t\tquery = \" SELECT max(seq) as id FROM bwfl_license.import_permit_duty \";\n\n\t\t\tint maxid = 0;\n\t\t\ttry {\n\t\t\t\tcon = ConnectionToDataBase.getConnection();\n\t\t\t\tpstmt = con.prepareStatement(query);\n\t\t\t\trs = pstmt.executeQuery();\n\t\t\t\tif (rs.next()) {\n\t\t\t\t\tmaxid = rs.getInt(\"id\");\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (pstmt != null)\n\t\t\t\t\t\tpstmt.close();\n\t\t\t\t\tif (rs != null)\n\t\t\t\t\t\trs.close();\n\t\t\t\t\tif (con != null)\n\t\t\t\t\t\tcon.close();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn maxid + 1;\n\n\t\t}", "MaxIDs getMaxIds();", "@Override\n\tpublic void sendCancelledLeaveApp(Long companyId,\n\t\t\tMap<String, Long> leaveCategoryMap, String baseURL, String apiKey) {\n\n\t\tSimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();\n\n\t\tsetInternalProxy(requestFactory);\n\n\t\tCompany companyVO = companyDAO.findById(companyId);\n\n\t\t// Find All Leave which is not send(Sync) to KeyPay\n\t\tList<KeyPayIntLeaveApplication> keyPayIntLeaveAppList = keyPayIntLeaveApplicationDAO\n\t\t\t\t.findByCondition(\n\t\t\t\t\t\tPayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_SUCCESS,\n\t\t\t\t\t\tPayAsiaConstants.LEAVE_TRANSACTION_TYPE_LEAVE_CANCELLED,\n\t\t\t\t\t\tcompanyId);\n\n\t\tMap<String, String> empNumExternalIdMap = new HashMap<String, String>();\n\t\tif (!keyPayIntLeaveAppList.isEmpty()) {\n\t\t\tHRISPreference hrisPreferenceVO = hrisPreferenceDAO\n\t\t\t\t\t.findByCompanyId(companyId);\n\t\t\tif (hrisPreferenceVO != null\n\t\t\t\t\t&& hrisPreferenceVO.getExternalId() != null) {\n\t\t\t\tList<Object[]> keyPayEmpExternalIdList = getKeyPayExternalIdList(\n\t\t\t\t\t\thrisPreferenceVO.getExternalId(), companyId,\n\t\t\t\t\t\tcompanyVO.getDateFormat(), null);\n\t\t\t\tfor (Object[] extIdObj : keyPayEmpExternalIdList) {\n\t\t\t\t\tif (extIdObj != null && extIdObj[0] != null\n\t\t\t\t\t\t\t&& extIdObj[1] != null) {\n\t\t\t\t\t\tempNumExternalIdMap.put(String.valueOf(extIdObj[1]),\n\t\t\t\t\t\t\t\tString.valueOf(extIdObj[0]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (KeyPayIntLeaveApplication keyPayIntLeaveApplication : keyPayIntLeaveAppList) {\n\t\t\t\tif (empNumExternalIdMap.get(keyPayIntLeaveApplication\n\t\t\t\t\t\t.getEmployeeNumber()) == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tString leaveRequestId = \"\";\n\t\t\t\tKeyPayIntLeaveApplication leaveApplication = keyPayIntLeaveApplicationDAO\n\t\t\t\t\t\t.findByLeaveAppId(\n\t\t\t\t\t\t\t\tcompanyId,\n\t\t\t\t\t\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t\t\t\t\t\t.getCancelLeaveApplicationId(),\n\t\t\t\t\t\t\t\tPayAsiaConstants.LEAVE_TRANSACTION_TYPE_LEAVE_CANCELLED);\n\t\t\t\tif (leaveApplication != null\n\t\t\t\t\t\t&& leaveApplication.getExternalLeaveRequestId() != null) {\n\t\t\t\t\tleaveRequestId = String.valueOf(leaveApplication\n\t\t\t\t\t\t\t.getExternalLeaveRequestId());\n\t\t\t\t} else {\n\t\t\t\t\tleaveRequestId = getLeaveRequestForEmployee(\n\t\t\t\t\t\t\tempNumExternalIdMap.get(keyPayIntLeaveApplication\n\t\t\t\t\t\t\t\t\t.getEmployeeNumber()),\n\t\t\t\t\t\t\tkeyPayIntLeaveApplication, leaveCategoryMap,\n\t\t\t\t\t\t\tbaseURL, apiKey);\n\t\t\t\t}\n\n\t\t\t\tif (StringUtils.isNotBlank(leaveRequestId)) {\n\t\t\t\t\tRestTemplate restTemplate = new RestTemplate(requestFactory);\n\t\t\t\t\tString url = baseURL\n\t\t\t\t\t\t\t+ \"/employee/\"\n\t\t\t\t\t\t\t+ empNumExternalIdMap.get(keyPayIntLeaveApplication\n\t\t\t\t\t\t\t\t\t.getEmployeeNumber()) + \"/leaverequest/\"\n\t\t\t\t\t\t\t+ leaveRequestId;\n\n\t\t\t\t\tHttpHeaders headers = new HttpHeaders();\n\t\t\t\t\theaders.setContentType(MediaType.APPLICATION_JSON);\n\t\t\t\t\theaders.add(\"Authorization\", \"Basic \" + apiKey);\n\n\t\t\t\t\tMap<String, String> params = new HashMap<String, String>();\n\t\t\t\t\tHttpEntity<Map> entity = new HttpEntity<Map>(params,\n\t\t\t\t\t\t\theaders);\n\n\t\t\t\t\trestTemplate.getMessageConverters().add(\n\t\t\t\t\t\t\tnew StringHttpMessageConverter());\n\n\t\t\t\t\tJSONObject jsonObj;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tResponseEntity<String> response1 = restTemplate\n\t\t\t\t\t\t\t\t.exchange(url, HttpMethod.DELETE, entity,\n\t\t\t\t\t\t\t\t\t\tString.class);\n\n\t\t\t\t\t\t// System.out.println(\"response>>>\");\n\t\t\t\t\t\t// System.out.println(response1.getBody());\n\t\t\t\t\t\tjsonObj = new JSONObject(response1.getBody());\n\t\t\t\t\t\tif (jsonObj.getString(\"status\") != null\n\t\t\t\t\t\t\t\t&& jsonObj\n\t\t\t\t\t\t\t\t\t\t.getString(\"status\")\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\n\t\t\t\t\t\t\t\t\t\t\t\tPayAsiaConstants.LEAVE_TRANSACTION_TYPE_LEAVE_CANCELLED)) {\n\t\t\t\t\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t\t\t\t\t.setExternalLeaveRequestId(jsonObj\n\t\t\t\t\t\t\t\t\t\t\t.getLong(\"id\"));\n\t\t\t\t\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t\t\t\t\t.setSyncStatus(PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_SUCCESS);\n\t\t\t\t\t\t\tkeyPayIntLeaveApplicationDAO\n\t\t\t\t\t\t\t\t\t.update(keyPayIntLeaveApplication);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t\t\t\t.setSyncStatus(PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_FAILED);\n\t\t\t\t\t\tkeyPayIntLeaveApplicationDAO\n\t\t\t\t\t\t\t\t.update(keyPayIntLeaveApplication);\n\t\t\t\t\t\tLOGGER.error(e.getMessage(), e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public int getMaxIdTask()\n {\n SQLiteDatabase db = this.getReadableDatabase();\n \n String query = \"SELECT MAX(id) AS max_id FROM \" + TASK_TABLE_NAME;\n Cursor cursor = db.rawQuery(query, null);\n\n int id = 0; \n if (cursor.moveToFirst())\n {\n do\n { \n id = cursor.getInt(0); \n } while(cursor.moveToNext()); \n }\n \n return id;\n }", "private Integer getSequence() {\r\n\t\t\tInteger seq;\r\n\t\t\tString sql = \"select MAX(vendorid)from vendorTable\";\r\n\t\t\tseq = template.queryForObject(sql, new Object[] {}, Integer.class);\r\n\t\t\treturn seq;\r\n\t\t}", "private int getIDFromDb(String codeItemID) {\n\n\t\t// StringBuffer buffer = new StringBuffer();\n\t\tcodeItemID = codeItemID.toUpperCase();\n\t\tString sql = \"SELECT max_sequence FROM do_code_maxsequence WHERE upper(code_ItemUid)=? for update\";\n\n\t\tStringBuffer insertSql = new StringBuffer(\n\t\t\t\t\"insert into do_code_maxsequence(OBJUID,SEQUENCE_NAME,CODE_ITEMUID,PROPERTYUID,PROPERTYVALUE,YEARSEQ,MAX_SEQUENCE) values(\")\n\t\t\t\t.append(\"?,?,?,null,?,?,?)\");\n\n\t\tStringBuffer sqlUpdate = new StringBuffer(\n\t\t\t\t\"update do_code_maxsequence SET max_sequence=max_sequence+1\")\n\t\t\t\t.append(\" WHERE upper(code_ItemUid)=?\");\n\t\tConnection con = null;\n\t\tPreparedStatement stmt = null;\n\t\tDOBO bo = DOBO.getDOBOByName(\"do_authorization\");\n\t\tDODataSource dss = bo.getDataBase();\n\n\t\ttry {\n\t\t\t// query\n\t\t\tcon = dss.getConnection();\n\t\t\tcon.setAutoCommit(false);\n\t\t\tstmt = con.prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\tResultSet.CONCUR_READ_ONLY);\n\t\t\tint retId = 1;\n\n\t\t\tstmt.setString(1, codeItemID);\n\t\t\tResultSet rs = stmt.executeQuery();\n\n\t\t\tSystem.out.println(\"The SQL\" + sql);\n\n\t\t\tif (rs.next()) {\n\t\t\t\tretId = rs.getInt(\"max_sequence\") + 1;\n\t\t\t\t// update\n\t\t\t\t// //update\n\t\t\t\tstmt = con.prepareStatement(sqlUpdate.toString());\n\t\t\t\tstmt.setString(1, codeItemID);\n\t\t\t\tstmt.execute();\n\t\t\t} else {\n\t\t\t\t// //////////////insert\n\t\t\t\tstmt = con.prepareStatement(insertSql.toString());\n\t\t\t\tstmt.setString(1, UUIDHex.getInstance().generate());\n\t\t\t\tstmt.setString(2, null);\n\t\t\t\tstmt.setString(3, codeItemID);\n\t\t\t\tstmt.setString(4, null);\n\t\t\t\tstmt.setInt(5, 0);\n\t\t\t\tstmt.setLong(6, retId);\n\t\t\t\tstmt.execute();\n\t\t\t}\n\t\t\t// stmt.close();\n\t\t\t//\n\n\t\t\tcon.commit();\n\t\t\treturn retId;\n\n\t\t} catch (SQLException ex) {\n\t\t\ttry {\n\t\t\t\tcon.rollback();\n\t\t\t} catch (SQLException e) {\n\n\t\t\t}\n\t\t\tex.printStackTrace();\n\t\t\treturn 0;\n\t\t} finally {// Close Connection\n\t\t\ttry {\n\t\t\t\tif (stmt != null) {\n\t\t\t\t\tstmt.close();\n\t\t\t\t}\n\t\t\t con.close();\n\t\t\t} catch (Exception ex1) {\n\t\t\t\tex1.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public String getMaxKey();", "public void setLastLoginAppid(int lastLoginAppid) {\n\t\t\tthis.lastLoginAppid = lastLoginAppid;\n\t\t}", "public static TransactionIsolation max(TransactionIsolation head, TransactionIsolation... tail) {\n TransactionIsolation acc = head;\n for (TransactionIsolation current : tail) {\n if (current.compareTo(acc) >= 1) {\n acc = current;\n }\n }\n return acc;\n }", "public Integer nextPk() throws ApplicationException {\n\t\t//\tlog.debug(\"Faculty Model nextPK method Started\");\n\t\t\tConnection conn = null;\n\t\t\tint pk = 0;\n\t\t\ttry {\n\t\t\t\tconn = JDBCDataSource.getConnection();\n\t\t\t\tPreparedStatement pstmt = conn.prepareStatement(\"SELECT MAX(id) FROM ST_FACULTY\");\n\t\t\t\tResultSet rs = pstmt.executeQuery();\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tpk = rs.getInt(1);\n\t\t\t\t}\n\t\t\t\trs.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\t//log.error(\"DataBase Exception ..\", e);\n\t\t\t\tthrow new ApplicationException(\"Exception in Getting the PK\");\n\t\t\t} finally {\n\t\t\t\tJDBCDataSource.closeConnection(conn);\n\t\t\t}\n\t\t\t//log.debug(\"Faculty Model nextPK method End\");\n\t\t\treturn pk + 1;\n\t\t}", "public int getImportedMaxId();", "public int getMaxAccountsIdValue () throws Exception {\r\n String sql = \"SELECT MAX(ID) AS MAX FROM `accounts`;\";\r\n ResultSet result = stmt.executeQuery(sql);\r\n result.next();\r\n return result.getInt(\"MAX\");\r\n }", "@Query(value = \"SELECT * FROM `ob_order` ORDER BY id DESC\", nativeQuery = true)\n List<Order> findHighestId();", "public Integer returnMaxBiblioId(String library_id, String sublibrary_id) {\n Session session = HibernateUtil.getSessionFactory().openSession();\n Integer maxbiblio=null;\n try {\n session.beginTransaction();\n\n Criteria criteria = session.createCriteria(BibliographicDetails.class);\n Criterion a = Restrictions.eq(\"id.libraryId\", library_id);\n Criterion b = Restrictions.eq(\"id.sublibraryId\", sublibrary_id);\n LogicalExpression le = Restrictions.and(a, b);\n maxbiblio = (Integer) criteria.add(le).setProjection(Projections.max(\"id.biblioId\")).uniqueResult();\n if (maxbiblio == null) {\n maxbiblio = 1;\n } else {\n maxbiblio++;\n }\n\n session.getTransaction().commit();\n } catch(Exception e){\n e.printStackTrace();\n }\n finally {\n session.close();\n }\n return maxbiblio;\n }", "public static Long getNextAvailableId(Context iContext) throws MapperException\n {\n try\n {\n Long id = MedicalHistoryTDG.getNextAvailableId(iContext);\n return id;\n } \n catch (PersistenceException e)\n {\n throw new MapperException(\n \"The mapper failed to complete an operation because the persistence layer returned the following error: \"\n + e.getMessage());\n } \n catch (Exception e)\n {\n throw new MapperException(\n \"The mapper failed to complete an operation for the following unforeseen reason: \"\n + e.getMessage());\n }\n }", "public Integer returnMaxDocumentId(String library_id, String sublibrary_id) {\n Session session = HibernateUtil.getSessionFactory().openSession();\n Integer maxbiblio=null;\n try {\n session.beginTransaction();\n\n Criteria criteria = session.createCriteria(DocumentDetails.class);\n Criterion a = Restrictions.eq(\"id.libraryId\", library_id);\n Criterion b = Restrictions.eq(\"id.sublibraryId\", sublibrary_id);\n LogicalExpression le = Restrictions.and(a, b);\n maxbiblio = (Integer) criteria.add(le).setProjection(Projections.max(\"id.documentId\")).uniqueResult();\n if (maxbiblio == null) {\n maxbiblio = 1;\n } else {\n maxbiblio++;\n }\nsession.getTransaction().commit();\n \n } catch(Exception e){\n e.printStackTrace();\n }\n finally {\n session.close();\n }\n return maxbiblio;\n }", "public int getLastSubIndex() {\n\t\t\tint maxRVI = 0, subIndex = 0;\n\t\t\tfor (Map.Entry<Integer, Integer> entry : subIndices.entrySet()) {\n\t\t\t\tif (entry.getKey() < currentRVIndex) {\n\t\t\t\t\tif (entry.getKey() > maxRVI) {\n\t\t\t\t\t\tmaxRVI = entry.getKey();\n\t\t\t\t\t\tsubIndex = entry.getValue();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn subIndex;\n\t\t}", "@Override\n\tpublic void sendApprovedLeaveApp(Long companyId,\n\t\t\tMap<String, Long> leaveCategoryMap, String baseURL, String apiKey) {\n\n\t\tSimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();\n\n\t\tsetInternalProxy(requestFactory);\n\n\t\tCompany companyVO = companyDAO.findById(companyId);\n\n\t\t// Find All Leave which is not send(Sync) to KeyPay\n\t\tList<KeyPayIntLeaveApplication> keyPayIntLeaveAppList = keyPayIntLeaveApplicationDAO\n\t\t\t\t.findByCondition(\n\t\t\t\t\t\tPayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_SUCCESS,\n\t\t\t\t\t\tPayAsiaConstants.LEAVE_TRANSACTION_TYPE_LEAVE_APPROVED,\n\t\t\t\t\t\tcompanyId);\n\n\t\tMap<String, String> empNumExternalIdMap = new HashMap<String, String>();\n\t\tif (!keyPayIntLeaveAppList.isEmpty()) {\n\t\t\tHRISPreference hrisPreferenceVO = hrisPreferenceDAO\n\t\t\t\t\t.findByCompanyId(companyId);\n\t\t\tif (hrisPreferenceVO != null\n\t\t\t\t\t&& hrisPreferenceVO.getExternalId() != null) {\n\t\t\t\tList<Object[]> keyPayEmpExternalIdList = getKeyPayExternalIdList(\n\t\t\t\t\t\thrisPreferenceVO.getExternalId(), companyId,\n\t\t\t\t\t\tcompanyVO.getDateFormat(), null);\n\t\t\t\tfor (Object[] extIdObj : keyPayEmpExternalIdList) {\n\t\t\t\t\tif (extIdObj != null && extIdObj[0] != null\n\t\t\t\t\t\t\t&& extIdObj[1] != null) {\n\t\t\t\t\t\tempNumExternalIdMap.put(String.valueOf(extIdObj[1]),\n\t\t\t\t\t\t\t\tString.valueOf(extIdObj[0]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (KeyPayIntLeaveApplication keyPayIntLeaveApplication : keyPayIntLeaveAppList) {\n\t\t\t\tif (empNumExternalIdMap.get(keyPayIntLeaveApplication\n\t\t\t\t\t\t.getEmployeeNumber()) == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tRestTemplate restTemplate = new RestTemplate(requestFactory);\n\t\t\t\tString url = baseURL\n\t\t\t\t\t\t+ \"/employee/\"\n\t\t\t\t\t\t+ empNumExternalIdMap.get(keyPayIntLeaveApplication\n\t\t\t\t\t\t\t\t.getEmployeeNumber()) + \"/leaverequest\";\n\n\t\t\t\tHttpHeaders headers = new HttpHeaders();\n\t\t\t\theaders.setContentType(MediaType.APPLICATION_JSON);\n\t\t\t\theaders.add(\"Authorization\", \"Basic \" + apiKey);\n\n\t\t\t\t// create request body\n\t\t\t\tJSONObject request = new JSONObject();\n\t\t\t\ttry {\n\t\t\t\t\trequest.put(\"EmployeeId\", empNumExternalIdMap\n\t\t\t\t\t\t\t.get(keyPayIntLeaveApplication.getEmployeeNumber()));\n\t\t\t\t\trequest.put(\"FromDate\", DateUtils.timeStampToString(\n\t\t\t\t\t\t\tkeyPayIntLeaveApplication.getStartDate(),\n\t\t\t\t\t\t\tPayAsiaConstants.DATE_FORMAT_YYYY_MM_DD));\n\t\t\t\t\trequest.put(\"ToDate\", DateUtils.timeStampToString(\n\t\t\t\t\t\t\tkeyPayIntLeaveApplication.getEndDate(),\n\t\t\t\t\t\t\tPayAsiaConstants.DATE_FORMAT_YYYY_MM_DD));\n\t\t\t\t\trequest.put(\"Hours\", keyPayIntLeaveApplication.getHours());\n\t\t\t\t\trequest.put(\"LeaveCategoryId\", leaveCategoryMap\n\t\t\t\t\t\t\t.get(keyPayIntLeaveApplication.getLeaveTypeName()));\n\n\t\t\t\t\tif (StringUtils.isNotBlank(keyPayIntLeaveApplication\n\t\t\t\t\t\t\t.getRemarks())\n\t\t\t\t\t\t\t&& keyPayIntLeaveApplication.getRemarks().length() > 250) {\n\t\t\t\t\t\trequest.put(\"Notes\", keyPayIntLeaveApplication\n\t\t\t\t\t\t\t\t.getRemarks().substring(0, 250));\n\t\t\t\t\t} else {\n\t\t\t\t\t\trequest.put(\"Notes\",\n\t\t\t\t\t\t\t\tkeyPayIntLeaveApplication.getRemarks());\n\t\t\t\t\t}\n\n\t\t\t\t\trequest.put(\"AutomaticallyApprove\", true);\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\tLOGGER.error(e.getMessage(), e);\n\t\t\t\t}\n\t\t\t\tHttpEntity<String> entity = new HttpEntity<String>(\n\t\t\t\t\t\trequest.toString(), headers);\n\n\t\t\t\trestTemplate.getMessageConverters().add(\n\t\t\t\t\t\tnew StringHttpMessageConverter());\n\n\t\t\t\tJSONObject jsonObj;\n\t\t\t\tResponseEntity<String> response1 =null;\n\t\t\t\ttry {\n\t\t\t\t\tLOGGER.info(\"Request: \"+request.toString());\n\t\t\t\t\t response1 = restTemplate.exchange(\n\t\t\t\t\t\t\turl, HttpMethod.POST, entity, String.class);\n LOGGER.info(\"Response Body In Try Section: \"+response1.getBody());\n\t\t\t\t\t// System.out.println(\"response>>>\");\n\t\t\t\t\t// System.out.println(response1.getBody());\n\t\t\t\t\tjsonObj = new JSONObject(response1.getBody());\n\t\t\t\t\tif (jsonObj.getString(\"status\") != null\n\t\t\t\t\t\t\t&& jsonObj\n\t\t\t\t\t\t\t\t\t.getString(\"status\")\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\n\t\t\t\t\t\t\t\t\t\t\tPayAsiaConstants.LEAVE_TRANSACTION_TYPE_LEAVE_APPROVED)) {\n\t\t\t\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t\t\t\t.setExternalLeaveRequestId(jsonObj\n\t\t\t\t\t\t\t\t\t\t.getLong(\"id\"));\n\t\t\t\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t\t\t\t.setSyncStatus(PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_SUCCESS);\n\t\t\t\t\t\tkeyPayIntLeaveApplicationDAO\n\t\t\t\t\t\t\t\t.update(keyPayIntLeaveApplication);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t\t\t.setSyncStatus(PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_FAILED);\n\t\t\t\t\tkeyPayIntLeaveApplicationDAO\n\t\t\t\t\t\t\t.update(keyPayIntLeaveApplication);\n\t\t\t\t\tLOGGER.info(\"In Catch Response : \"+response1);\n\t\t\t\t\tLOGGER.info(\"In Catch Response Body: \"+response1.getBody());\n\t\t\t\t\tLOGGER.error(e.getMessage(), e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public List<SMREntry> remainingUpTo(long maxGlobal) {\n if (TransactionalContext.getTransactionStack().size()\n > contexts.size()) {\n contexts = TransactionalContext.getTransactionStackAsList();\n } else if (TransactionalContext.getTransactionStack().size()\n < contexts.size()) {\n mergeTransaction();\n }\n List<SMREntry> entryList = new LinkedList<>();\n\n\n for (int i = currentContext; i < contexts.size(); i++) {\n final List<SMREntry> writeSet = contexts.get(i)\n .getWriteSetEntryList(id);\n long readContextStart = i == currentContext ? currentContextPos + 1 : 0;\n for (long j = readContextStart; j < writeSet.size(); j++) {\n entryList.add(writeSet.get((int) j));\n writePos++;\n }\n if (writeSet.size() > 0) {\n currentContext = i;\n currentContextPos = writeSet.size() - 1;\n }\n }\n return entryList;\n }", "public final Integer getMaxSceneId() {\n return getNextNumberInList(scenes.toArray());\n }", "long getLastProducerSequenceId(ProducerId id) throws IOException;", "public long popId() {\n\t\tif (currentMaxId == Long.MAX_VALUE) {\n\t\t\tthrow new IllegalStateException(\"Id reached max value. Current value: \" + currentMaxId);\n\t\t}\n\t\treturn ++currentMaxId;\n\t}", "public int[] longestSequence(int arrayParameter[]) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tint arrayLength=arrayParameter.length;\r\n\t\tint maxSequenceFirstIndex=0;\r\n\t\tint maxSequenceLength=0;\r\n\t\tint temperarySequenceLength=1;\r\n\t\tint arrayFirstIndex;\r\n\t\tint arrayLastIndex;\r\n\t\tint maxSequenceIndex;\r\n\t\tfor(arrayFirstIndex=0,arrayLastIndex=0;arrayLastIndex<(arrayLength-1);arrayLastIndex++){\r\n\t\t\tif(arrayParameter[arrayLastIndex]<arrayParameter[arrayLastIndex+1]){\r\n\t\t\t\ttemperarySequenceLength++;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\tif(temperarySequenceLength>maxSequenceLength){\r\n\t\t\t\t\t\tmaxSequenceLength=temperarySequenceLength;\r\n\t\t\t\t\t\ttemperarySequenceLength=1;\r\n\t\t\t\t\t\tmaxSequenceFirstIndex=arrayFirstIndex;\r\n\t\t\t\t\t\tarrayFirstIndex=arrayLastIndex+1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\ttemperarySequenceLength=1;\r\n\t\t\t\t\t\tarrayFirstIndex=arrayLastIndex+1;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(temperarySequenceLength>maxSequenceLength){\r\n\t\t\tmaxSequenceLength=temperarySequenceLength;\r\n\t\t\tmaxSequenceFirstIndex=arrayFirstIndex;\r\n\t\t}\r\n\t\tint temeraryArrayIndex=0;\r\n\t\tint temperaryArray[]=new int[maxSequenceLength];\r\n\t\tfor(maxSequenceIndex=maxSequenceFirstIndex;maxSequenceIndex<(maxSequenceFirstIndex+maxSequenceLength);maxSequenceIndex++){\r\n\t\t\ttemperaryArray[temeraryArrayIndex]=arrayParameter[maxSequenceIndex];\r\n\t\t\ttemeraryArrayIndex++;\r\n\t\t}\r\n\t\treturn temperaryArray;\r\n\t}", "public String getMaxKey() {\n return dll.tail.prev == dll.head ? \"\" : (String) dll.tail.prev.keySet.iterator().next();\n }", "private static Integer getSeq()throws SQLException{\r\n String selectSql = \"SELECT max(idArt) from Artigo\";\r\n Statement statement = dbConnection.createStatement();\r\n ResultSet rs = statement.executeQuery(selectSql);\r\n int seqIdPe = -1;\r\n if(rs.next()){\r\n seqIdPe = rs.getInt(1);\r\n }\r\n return seqIdPe + 1; \r\n }", "public static int idUltimoRegistroEntradaSalida(){\n\t\tint idRegistro=-1;\n\t\tString sql = \"SELECT MAX(id) as ultimoId FROM registro_entrada_salida\";\n\t\tPreparedStatement comando;\n\t\tResultSet resultadoConsulta;\n\t\ttry {\n\t\t\tcomando = conexion.prepareStatement(sql);\n\t\t\tresultadoConsulta = comando.executeQuery();\n\t\t\twhile(resultadoConsulta.next()){\n\t\t\t\tidRegistro = resultadoConsulta.getInt(\"ultimoId\");\n\t\t\t}\n\t\t\treturn idRegistro;\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 idRegistro;\n\t}", "public String getMaxKey() {\n\t\treturn maxkey;\n \n }", "public M csmiIdMax(Object max){this.put(\"csmiIdMax\", max);return this;}", "public int getIdOfLastAddress(String addressBook) {\n\t\tAddressList addressList = controller.listAllAddresses(addressBook);\n\t\tSet<Person> addresses = addressList.getAddresses();\n\t\tif(addressList == null || addresses == null)\n\t\t\treturn 1;\n\t\telse {\t\t\n\t\t\tif(addresses.size() != 0) {\n\t\t\t\tint count = 0;\n\t\t\t\tfor(Person p : addresses) {\n\t\t\t\t\tif(count < p.getId()) {\n\t\t\t\t\t\tcount = p.getId();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn count;\n\t\t\t}\n\t\t\treturn 1;\n\t\t}\n\t}", "public long findMax(long[] incomes) {\n long current_max_index = 0;\n long current_max = incomes[0];\n for (long income : incomes)\n if (current_max < income)\n current_max = income;\n return current_max;\n }", "@Override\r\n\tpublic int findMaxSaleRecordID(int promoterId) {\n\t\treturn iImportSalesRecordDao.findMaxSaleRecordID(promoterId);\r\n\t}", "private Integer getNewId(){\n List<Integer> allIds = new ArrayList<>();\n for (T entity : allEntities) {\n allIds.add(entity.getId());\n }\n return allIds.size() > 0 ? Collections.max(allIds) + 1 : 1;\n }", "public Integer generateID(){\n String sqlSelect = \"SELECT max(id) from friends\";\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n int maxId=0;\n try {\n connection = new DBConnection().connect();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sqlSelect);\n while (resultSet.next())\n maxId = resultSet.getInt(1);\n \n } catch (SQLException e) {\n System.err.print(\"err in select \" + e);\n } finally {\n try {\n if (resultSet != null) {\n resultSet.close();\n }\n if (statement != null) {\n statement.close();\n }\n if (connection != null) {\n connection.close();\n }\n } catch (SQLException e) {\n System.err.print(\"err in close select \" + e);\n }\n }\n\n return ++maxId;\n }", "public Long getMaxHospitalID() {\n\t\tConnection conn = null; // Resets the connection to the database\n\t\tLong max = new Long(0);\n\t\t\n\t\ttry {\n\t\t\tconn = dataSource.getConnection();\n\t\t\t\n\t\t\tString sql = \"Select max(id) from hospital\";\n\t\t\tPreparedStatement ps = conn.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\t\n\t\t\tif (rs.next()) {\n\t\t\t\tmax = rs.getLong(1);\n\t\t\t}\n\t\t\t\n\t\t\trs.close();\n\t\t\tps.close();\n\t\t\treturn max;\n\t\t} catch (SQLException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t} finally {\n\t\t\tif (conn != null) {\n\t\t\t\ttry {\n\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {}\n\t\t\t}\n\t\t}\n\t}", "public int getLastSavedId() {\n\t\tNativeQuery query = session.createNativeQuery(\"SELECT Id FROM terms ORDER BY Id DESC LIMIT 1\");\n\t\t// int lastUpdatedValue=(int)query;\n\t\tint lastUpdatedValue = ((Number) query.getSingleResult()).intValue();\n\t\tSystem.out.println(\"the result is\" + lastUpdatedValue);\n\t\treturn lastUpdatedValue;\n\t}", "public int getMaxIndex(int[] paraArray) {\r\n\t\tint maxIndex = 0;\r\n\t\tint tempIndex = 0;\r\n\t\tint max = paraArray[0];\r\n\r\n\t\tfor (int i = 0; i < paraArray.length; i++) {\r\n\t\t\tif (paraArray[i] > max) {\r\n\t\t\t\tmax = paraArray[i];\r\n\t\t\t\ttempIndex = i;\r\n\t\t\t} // of if\r\n\t\t} // of for i\r\n\t\tmaxIndex = tempIndex;\r\n\t\treturn maxIndex;\r\n\t}", "public int getMaxId() {\n int count = driver.findElements(By.xpath(xpathTableRows)).size();\n int maxID = -1;\n if (count > 0) {\n maxID = Integer.parseInt(assertAndGetText(xpathTableRows + \"[\" + count + \"]//td[1]\"));\n }\n return maxID;\n }", "private int findEndIndex(){\n\t\tint end=models.size()-1;\n\t\tfor(int i=0;i<modelNames.size();i++){\n\t\t\tif(Integer.parseInt(modelNames.get(i).substring(0,8))>this.date_end)\n\t\t\t{end=i-1;break;}\n\t\t}\n\t\treturn end;\n\t}", "List<Integer> getIdUsersToSendOtherAlert( Timestamp alertMaxDate, Timestamp timeBetweenAlerts, int maxNumberAlerts );", "public static int getMaxID() {\r\n\r\n\t\tResultSet rs = null;\r\n\r\n\t\tString query = \"SELECT MAX(salesman_id) FROM salesman\";\r\n\t\tint id = 0;\r\n\t\ttry (Connection con = Connect.getConnection()) {\r\n\r\n\t\t\tst = con.createStatement();\r\n\t\t\trs = st.executeQuery(query);\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tid = rs.getInt(1);\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(id);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn id;\r\n\t}", "@Override\n\tpublic int getMaxID() {\n\t\tResultSet resultSet = null;\n\t\tint max = 0;\n\t\ttry {\n\t\t\tresultSet = DBManager.getInstance().readFromDB(\"SELECT max(planeid) from fleet\");\n\t\t\tresultSet.next();\n\t\t\tmax = resultSet.getInt(1);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif(max == 0) {\n\t\t\treturn 999;\n\t\t}\n\t\treturn max;\n\t}", "public static Long getHighestAlertNumber(String schema, Long running_sim_id) {\r\n\r\n\t\tLong returnLong = new Long(0);\r\n\r\n\t\tString query = \"select max(id) from Alert where running_sim_id = \" + running_sim_id;\r\n\r\n\t\tMultiSchemaHibernateUtil.beginTransaction(schema);\r\n\r\n\t\tList<Long> returnList = MultiSchemaHibernateUtil.getSession(schema).createQuery(query).list();\r\n\r\n\t\tif (returnList != null) {\r\n\t\t\treturnLong = (Long) returnList.get(0);\r\n\r\n\t\t}\r\n\r\n\t\tMultiSchemaHibernateUtil.commitAndCloseTransaction(schema);\r\n\r\n\t\treturn returnLong;\r\n\t}", "@Override\n\tpublic Integer getLastMenuId() {\n\t\treturn this.menuDao.getLastMenuId();\n\t}", "protected int maxPktsOut() { return Integer.MAX_VALUE; }", "public String getMaxKey() {\n if (list.isEmpty()) {\n return \"\";\n }\n return v.get(list.getFirst()).iterator().next();\n }", "@Override\n\tpublic Long getNextPjpeNo(Long pjId) {\n\t\tSession session = sessionAnnotationFactory.getCurrentSession();\t\t\n\t\tQuery query =session.createQuery( \"select max(pstJobPayExt.id.pjpeNo) from PstJobPayExt pstJobPayExt where pstJobPayExt.id.pjId=\"+pjId);\n\t\tObject obj=query.uniqueResult();\n\t\tif(obj!=null){\n\t\t\treturn ((Long)obj)+1;\n\t\t}\n\t\treturn 1l;\n\t}", "public final Integer getMaxLayerId() {\n return getNextNumberInList(getActiveScene().getLayers().toArray());\n }", "public int getMaxID(){\n return recipes.get(recipes.size() - 1).getID();\n }", "public static int max(int[] arr){\n return maxInRange(arr, 0, arr.length-1);\n }", "public int getMaxPanelistCodeValue () throws Exception {\r\n String sql = \"call NEXT VALUE FOR PANELIST_CODE_SEQUENCE;\";\r\n ResultSet result = stmt.executeQuery(sql);\r\n result.next();\r\n return result.getInt(1);\r\n }", "public static Long getNextAvailableId(Context iContext) throws MapperException\n {\n try\n {\n Long id = AllergiesTDG.getNextAvailableId(iContext);\n return id;\n } \n catch (PersistenceException e)\n {\n throw new MapperException(\n \"The mapper failed to complete an operation because the persistence layer returned the following error: \"\n + e.getMessage());\n } \n catch (Exception e)\n {\n throw new MapperException(\n \"The mapper failed to complete an operation for the following unforeseen reason: \"\n + e.getMessage());\n }\n }", "@Override\n\tpublic int getMaxID() throws SQLException {\n\t\treturn 0;\n\t}", "public int assignIdToNextUser () {\n int currentMax;\n User maxUserId = null;\n try {\n List lst = this.readAllUsers();\n maxUserId = Collections.max(lst, new UserCompar());\n } catch (DaoException exc) {\n exc.printStackTrace();\n }\n currentMax = maxUserId.getId();\n return ++currentMax;\n }", "public final Integer getNewId(final String key){\r\n\t\tmaxId++;\r\n\t\twhile (idKeyMap.containsKey(maxId)){\r\n\t\t\tmaxId++; // probably not going to happen...\r\n\t\t}\r\n\t\tidKeyMap.put(maxId, key);\r\n\t\tkeyIdMap.put(key, maxId);\r\n\t\treturn maxId;\r\n\t}", "@In Integer max();", "@In Integer max();", "int arraykey(int max);", "public int getHighestChromID();", "@Override\r\n\tpublic int getLastId() {\n\t\treturn adminDAO.getLastId();\r\n\t}", "public String getMaxKey() {\n if (map.size() == 0)\n return \"\";\n return maxKey;\n }", "public int getMaxKey() {\r\n return getMax(this.root).getKey();\r\n }", "public M csmiMemberIdMax(Object max){this.put(\"csmiMemberIdMax\", max);return this;}", "public long getMaxObjectID() {\n\t\treturn maxObjectID;\n\t}", "int getNextID(String table, String primaryKey) {\n try {\n ResultSet result = connection\n .prepareStatement(\"SELECT MAX(\" + primaryKey + \") FROM \" + table + \";\")\n .executeQuery();\n return result.getInt(1) + 1;\n }\n catch (SQLException e) {\n System.err.println(e.getMessage()\n + \"\\nFailed to get MAX(\" + primaryKey + \") from \" + table + \".\");\n return -1;\n }\n }", "public int getMaxQuestionnaireWinesIdValue () throws Exception {\r\n String sql = \"SELECT MAX(ID) AS MAX FROM QUESTIONNAIREWINES;\";\r\n ResultSet result = stmt.executeQuery(sql);\r\n result.next();\r\n return result.getInt(\"MAX\");\r\n }", "public static <V extends Comparable<? super V>> V maxValueKey(List<V> list)\n\t{\n\t\tCollections.sort(list);\n\t\treturn list.get(list.size() - 1);\n\t}", "private static Key max(Key... ks) {\n\t\tif (ks == null || ks.length == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tKey max = ks[0];\n\t\tfor (int i = 1; i < ks.length; i++) {\n\t\t\tif (ks[i].compareTo(max) > 0) {\n\t\t\t\tmax = ks[i];\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}", "public long getMaxObjectID() {\n\t\t\treturn maxObjectID;\n\t\t}", "public GameMessage getLatestBid(String gameId) {\r\n Deque<GameMessage> msgs = (Deque)msgMapping.get(gameId);\r\n if (msgs != null) {\r\n return msgs.getLast();\r\n }\r\n return null;\r\n }", "static public long max(long[] valarray) {\r\n long max = 0;\r\n for (long i : valarray) {\r\n if (i > max)\r\n max = i;\r\n }\r\n return max;\r\n }", "public Long getSubAppId() {\n return this.SubAppId;\n }", "public String getNextBookId(){ \n return \"book-\" + dbmanager.getNextId(); \n }", "@Override\n\tpublic long getApplicationId() {\n\t\treturn _userSync.getApplicationId();\n\t}", "public String getApplicationId();" ]
[ "0.5817684", "0.56551164", "0.5598903", "0.5580223", "0.5500423", "0.5483742", "0.54796547", "0.54522747", "0.54216844", "0.54056734", "0.5393098", "0.53757477", "0.53688157", "0.5361286", "0.5326121", "0.5308371", "0.52630496", "0.52065", "0.51753265", "0.5167277", "0.51613116", "0.5134235", "0.5114226", "0.51100934", "0.51039845", "0.5089503", "0.5085107", "0.5064504", "0.5024076", "0.50233334", "0.50011516", "0.49950477", "0.49904054", "0.49506322", "0.49470776", "0.4947047", "0.49382263", "0.49288473", "0.4926462", "0.49102584", "0.4907461", "0.49072397", "0.48987877", "0.48973754", "0.4895921", "0.4894306", "0.48928136", "0.4885339", "0.48594067", "0.48560092", "0.48558876", "0.48423082", "0.4840477", "0.48355442", "0.4812209", "0.48024723", "0.47981045", "0.47967976", "0.47792286", "0.47719455", "0.4761007", "0.4758166", "0.4747662", "0.47420633", "0.47293642", "0.47208655", "0.47084615", "0.4708413", "0.47052205", "0.4704873", "0.4703376", "0.46899715", "0.46891117", "0.46889284", "0.46812835", "0.4680046", "0.46782827", "0.4677673", "0.46747008", "0.46688417", "0.46671456", "0.46671456", "0.46583962", "0.46506983", "0.46502078", "0.46409163", "0.46352902", "0.4633626", "0.4626456", "0.46208036", "0.46109042", "0.46107322", "0.4607902", "0.4604227", "0.45907077", "0.4590269", "0.45850623", "0.45846498", "0.45842654", "0.45815194" ]
0.7068298
0
move Leave Applications(Approved and cancel leave) to KeyPayIntLeaveApplication table updateKeyPayIntLeaveAppTable(companyId);
@Override public void sendApprovedLeaveApp(Long companyId, Map<String, Long> leaveCategoryMap, String baseURL, String apiKey) { SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory(); setInternalProxy(requestFactory); Company companyVO = companyDAO.findById(companyId); // Find All Leave which is not send(Sync) to KeyPay List<KeyPayIntLeaveApplication> keyPayIntLeaveAppList = keyPayIntLeaveApplicationDAO .findByCondition( PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_SUCCESS, PayAsiaConstants.LEAVE_TRANSACTION_TYPE_LEAVE_APPROVED, companyId); Map<String, String> empNumExternalIdMap = new HashMap<String, String>(); if (!keyPayIntLeaveAppList.isEmpty()) { HRISPreference hrisPreferenceVO = hrisPreferenceDAO .findByCompanyId(companyId); if (hrisPreferenceVO != null && hrisPreferenceVO.getExternalId() != null) { List<Object[]> keyPayEmpExternalIdList = getKeyPayExternalIdList( hrisPreferenceVO.getExternalId(), companyId, companyVO.getDateFormat(), null); for (Object[] extIdObj : keyPayEmpExternalIdList) { if (extIdObj != null && extIdObj[0] != null && extIdObj[1] != null) { empNumExternalIdMap.put(String.valueOf(extIdObj[1]), String.valueOf(extIdObj[0])); } } } for (KeyPayIntLeaveApplication keyPayIntLeaveApplication : keyPayIntLeaveAppList) { if (empNumExternalIdMap.get(keyPayIntLeaveApplication .getEmployeeNumber()) == null) { continue; } RestTemplate restTemplate = new RestTemplate(requestFactory); String url = baseURL + "/employee/" + empNumExternalIdMap.get(keyPayIntLeaveApplication .getEmployeeNumber()) + "/leaverequest"; HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_JSON); headers.add("Authorization", "Basic " + apiKey); // create request body JSONObject request = new JSONObject(); try { request.put("EmployeeId", empNumExternalIdMap .get(keyPayIntLeaveApplication.getEmployeeNumber())); request.put("FromDate", DateUtils.timeStampToString( keyPayIntLeaveApplication.getStartDate(), PayAsiaConstants.DATE_FORMAT_YYYY_MM_DD)); request.put("ToDate", DateUtils.timeStampToString( keyPayIntLeaveApplication.getEndDate(), PayAsiaConstants.DATE_FORMAT_YYYY_MM_DD)); request.put("Hours", keyPayIntLeaveApplication.getHours()); request.put("LeaveCategoryId", leaveCategoryMap .get(keyPayIntLeaveApplication.getLeaveTypeName())); if (StringUtils.isNotBlank(keyPayIntLeaveApplication .getRemarks()) && keyPayIntLeaveApplication.getRemarks().length() > 250) { request.put("Notes", keyPayIntLeaveApplication .getRemarks().substring(0, 250)); } else { request.put("Notes", keyPayIntLeaveApplication.getRemarks()); } request.put("AutomaticallyApprove", true); } catch (JSONException e) { LOGGER.error(e.getMessage(), e); } HttpEntity<String> entity = new HttpEntity<String>( request.toString(), headers); restTemplate.getMessageConverters().add( new StringHttpMessageConverter()); JSONObject jsonObj; ResponseEntity<String> response1 =null; try { LOGGER.info("Request: "+request.toString()); response1 = restTemplate.exchange( url, HttpMethod.POST, entity, String.class); LOGGER.info("Response Body In Try Section: "+response1.getBody()); // System.out.println("response>>>"); // System.out.println(response1.getBody()); jsonObj = new JSONObject(response1.getBody()); if (jsonObj.getString("status") != null && jsonObj .getString("status") .equalsIgnoreCase( PayAsiaConstants.LEAVE_TRANSACTION_TYPE_LEAVE_APPROVED)) { keyPayIntLeaveApplication .setExternalLeaveRequestId(jsonObj .getLong("id")); keyPayIntLeaveApplication .setSyncStatus(PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_SUCCESS); keyPayIntLeaveApplicationDAO .update(keyPayIntLeaveApplication); } } catch (Exception e) { keyPayIntLeaveApplication .setSyncStatus(PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_FAILED); keyPayIntLeaveApplicationDAO .update(keyPayIntLeaveApplication); LOGGER.info("In Catch Response : "+response1); LOGGER.info("In Catch Response Body: "+response1.getBody()); LOGGER.error(e.getMessage(), e); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateKeyPayIntLeaveAppTable(Long companyId) {\n\t\tLong maxLeaveApplicationId = keyPayIntLeaveApplicationDAO\n\t\t\t\t.getMaxApprovedLeaveAppId(companyId);\n\t\tif (maxLeaveApplicationId == null) {\n\t\t\tmaxLeaveApplicationId = 0l;\n\t\t}\n\t\t// maxLeaveApplicationId = 62409l;\n\n\t\t// Get Leave Approved and Leave Cancel applications (i.e. those\n\t\t// applications are not still moved to KeyPayIntLeaveApplication table)\n\t\tList<LeaveApplication> approvedLeaveForKeyPayInt = leaveApplicationDAO\n\t\t\t\t.getApprovedNCancelLeaveForKeyPayInt(maxLeaveApplicationId,\n\t\t\t\t\t\tcompanyId, PayAsiaConstants.LEAVE_STATUS_COMPLETED);\n\t\tfor (LeaveApplication leaveApplication : approvedLeaveForKeyPayInt) {\n\t\t\tKeyPayIntLeaveApplication keyPayIntLeaveApplication = new KeyPayIntLeaveApplication();\n\t\t\tkeyPayIntLeaveApplication.setLeaveApplication(leaveApplication);\n\t\t\tkeyPayIntLeaveApplication.setCompany(leaveApplication.getCompany());\n\t\t\tkeyPayIntLeaveApplication.setEmployeeNumber(leaveApplication\n\t\t\t\t\t.getEmployee().getEmployeeNumber());\n\t\t\tkeyPayIntLeaveApplication.setStartDate(leaveApplication\n\t\t\t\t\t.getStartDate());\n\t\t\tkeyPayIntLeaveApplication.setEndDate(leaveApplication.getEndDate());\n\t\t\tkeyPayIntLeaveApplication.setHours(new BigDecimal(leaveApplication\n\t\t\t\t\t.getTotalDays()));\n\t\t\tkeyPayIntLeaveApplication.setLeaveTypeName(leaveApplication\n\t\t\t\t\t.getEmployeeLeaveSchemeType().getLeaveSchemeType()\n\t\t\t\t\t.getLeaveTypeMaster().getLeaveTypeName());\n\t\t\tkeyPayIntLeaveApplication.setRemarks(leaveApplication.getReason());\n\t\t\tif (leaveApplication.getLeaveCancelApplication() == null) {\n\t\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t\t.setLeaveStatus(PayAsiaConstants.LEAVE_STATUS_APPROVED);\n\t\t\t} else {\n\t\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t\t.setLeaveStatus(PayAsiaConstants.LEAVE_STATUS_CANCELLED);\n\t\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t\t.setCancelLeaveApplicationId(leaveApplication\n\t\t\t\t\t\t\t\t.getLeaveCancelApplication()\n\t\t\t\t\t\t\t\t.getLeaveApplicationId());\n\t\t\t}\n\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t.setSyncStatus(PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_UNPROCESS);\n\t\t\tkeyPayIntLeaveApplicationDAO.save(keyPayIntLeaveApplication);\n\t\t}\n\t}", "@Override\n\tpublic void sendCancelledLeaveApp(Long companyId,\n\t\t\tMap<String, Long> leaveCategoryMap, String baseURL, String apiKey) {\n\n\t\tSimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();\n\n\t\tsetInternalProxy(requestFactory);\n\n\t\tCompany companyVO = companyDAO.findById(companyId);\n\n\t\t// Find All Leave which is not send(Sync) to KeyPay\n\t\tList<KeyPayIntLeaveApplication> keyPayIntLeaveAppList = keyPayIntLeaveApplicationDAO\n\t\t\t\t.findByCondition(\n\t\t\t\t\t\tPayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_SUCCESS,\n\t\t\t\t\t\tPayAsiaConstants.LEAVE_TRANSACTION_TYPE_LEAVE_CANCELLED,\n\t\t\t\t\t\tcompanyId);\n\n\t\tMap<String, String> empNumExternalIdMap = new HashMap<String, String>();\n\t\tif (!keyPayIntLeaveAppList.isEmpty()) {\n\t\t\tHRISPreference hrisPreferenceVO = hrisPreferenceDAO\n\t\t\t\t\t.findByCompanyId(companyId);\n\t\t\tif (hrisPreferenceVO != null\n\t\t\t\t\t&& hrisPreferenceVO.getExternalId() != null) {\n\t\t\t\tList<Object[]> keyPayEmpExternalIdList = getKeyPayExternalIdList(\n\t\t\t\t\t\thrisPreferenceVO.getExternalId(), companyId,\n\t\t\t\t\t\tcompanyVO.getDateFormat(), null);\n\t\t\t\tfor (Object[] extIdObj : keyPayEmpExternalIdList) {\n\t\t\t\t\tif (extIdObj != null && extIdObj[0] != null\n\t\t\t\t\t\t\t&& extIdObj[1] != null) {\n\t\t\t\t\t\tempNumExternalIdMap.put(String.valueOf(extIdObj[1]),\n\t\t\t\t\t\t\t\tString.valueOf(extIdObj[0]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (KeyPayIntLeaveApplication keyPayIntLeaveApplication : keyPayIntLeaveAppList) {\n\t\t\t\tif (empNumExternalIdMap.get(keyPayIntLeaveApplication\n\t\t\t\t\t\t.getEmployeeNumber()) == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tString leaveRequestId = \"\";\n\t\t\t\tKeyPayIntLeaveApplication leaveApplication = keyPayIntLeaveApplicationDAO\n\t\t\t\t\t\t.findByLeaveAppId(\n\t\t\t\t\t\t\t\tcompanyId,\n\t\t\t\t\t\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t\t\t\t\t\t.getCancelLeaveApplicationId(),\n\t\t\t\t\t\t\t\tPayAsiaConstants.LEAVE_TRANSACTION_TYPE_LEAVE_CANCELLED);\n\t\t\t\tif (leaveApplication != null\n\t\t\t\t\t\t&& leaveApplication.getExternalLeaveRequestId() != null) {\n\t\t\t\t\tleaveRequestId = String.valueOf(leaveApplication\n\t\t\t\t\t\t\t.getExternalLeaveRequestId());\n\t\t\t\t} else {\n\t\t\t\t\tleaveRequestId = getLeaveRequestForEmployee(\n\t\t\t\t\t\t\tempNumExternalIdMap.get(keyPayIntLeaveApplication\n\t\t\t\t\t\t\t\t\t.getEmployeeNumber()),\n\t\t\t\t\t\t\tkeyPayIntLeaveApplication, leaveCategoryMap,\n\t\t\t\t\t\t\tbaseURL, apiKey);\n\t\t\t\t}\n\n\t\t\t\tif (StringUtils.isNotBlank(leaveRequestId)) {\n\t\t\t\t\tRestTemplate restTemplate = new RestTemplate(requestFactory);\n\t\t\t\t\tString url = baseURL\n\t\t\t\t\t\t\t+ \"/employee/\"\n\t\t\t\t\t\t\t+ empNumExternalIdMap.get(keyPayIntLeaveApplication\n\t\t\t\t\t\t\t\t\t.getEmployeeNumber()) + \"/leaverequest/\"\n\t\t\t\t\t\t\t+ leaveRequestId;\n\n\t\t\t\t\tHttpHeaders headers = new HttpHeaders();\n\t\t\t\t\theaders.setContentType(MediaType.APPLICATION_JSON);\n\t\t\t\t\theaders.add(\"Authorization\", \"Basic \" + apiKey);\n\n\t\t\t\t\tMap<String, String> params = new HashMap<String, String>();\n\t\t\t\t\tHttpEntity<Map> entity = new HttpEntity<Map>(params,\n\t\t\t\t\t\t\theaders);\n\n\t\t\t\t\trestTemplate.getMessageConverters().add(\n\t\t\t\t\t\t\tnew StringHttpMessageConverter());\n\n\t\t\t\t\tJSONObject jsonObj;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tResponseEntity<String> response1 = restTemplate\n\t\t\t\t\t\t\t\t.exchange(url, HttpMethod.DELETE, entity,\n\t\t\t\t\t\t\t\t\t\tString.class);\n\n\t\t\t\t\t\t// System.out.println(\"response>>>\");\n\t\t\t\t\t\t// System.out.println(response1.getBody());\n\t\t\t\t\t\tjsonObj = new JSONObject(response1.getBody());\n\t\t\t\t\t\tif (jsonObj.getString(\"status\") != null\n\t\t\t\t\t\t\t\t&& jsonObj\n\t\t\t\t\t\t\t\t\t\t.getString(\"status\")\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\n\t\t\t\t\t\t\t\t\t\t\t\tPayAsiaConstants.LEAVE_TRANSACTION_TYPE_LEAVE_CANCELLED)) {\n\t\t\t\t\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t\t\t\t\t.setExternalLeaveRequestId(jsonObj\n\t\t\t\t\t\t\t\t\t\t\t.getLong(\"id\"));\n\t\t\t\t\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t\t\t\t\t.setSyncStatus(PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_SUCCESS);\n\t\t\t\t\t\t\tkeyPayIntLeaveApplicationDAO\n\t\t\t\t\t\t\t\t\t.update(keyPayIntLeaveApplication);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t\t\t\t.setSyncStatus(PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_FAILED);\n\t\t\t\t\t\tkeyPayIntLeaveApplicationDAO\n\t\t\t\t\t\t\t\t.update(keyPayIntLeaveApplication);\n\t\t\t\t\t\tLOGGER.error(e.getMessage(), e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean unlockRecord(LeaveEncashmentProcess leaveEncashProcess, String empCode[]) {\n\t\tboolean result = false;\r\n\t\ttry {\r\n\t\t\tString query = \" UPDATE HRMS_ENCASHMENT_PROCESS_HDR \"\r\n\t\t\t\t\t+ \" SET ENCASHMENT_PROCESS_FLAG='N' WHERE ENCASHMENT_PROCESS_CODE=\"\r\n\t\t\t\t\t+ leaveEncashProcess.getProcessCode();\r\n\t\t\tresult = getSqlModel().singleExecute(query);\r\n\t\t\t\r\n\t\t\tif (empCode != null && empCode.length > 0\r\n\t\t\t\t\t&& !leaveEncashProcess.getSalarymonth().equals(\"\") \r\n\t\t\t\t\t&& !leaveEncashProcess.getSalaryyear().equals(\"\")) {\r\n\t\t\t\t\r\n\t\t\t\tquery = \"DELETE FROM HRMS_MISC_SALARY_UPLOAD WHERE APPL_CODE = \"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getProcessCode()\r\n\t\t\t\t\t\t+ \" AND APPL_TYPE = 'L'\"\r\n\t\t\t\t\t\t+ \" AND MONTH = \"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getSalarymonth()\r\n\t\t\t\t\t\t+ \" AND YEAR = \"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getSalaryyear();\r\n\r\n\t\t\t\tresult = getSqlModel().singleExecute(query);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public boolean lockRecord(LeaveEncashmentProcess leaveEncashProcess, String empCode[], \r\n\t\t\tString encashAmount[], String tds[]) {\n\t\tboolean result = false;\r\n\t\ttry {\r\n\t\t\tString month = leaveEncashProcess.getSalarymonth();\r\n\t\t\tString fromYear = leaveEncashProcess.getSalaryyear();\r\n\t\t\tString toYear = \"\";\r\n\t\t\tif(Integer.parseInt(month) < 4){\r\n\t\t\t\ttoYear = fromYear;\r\n\t\t\t\tfromYear = String.valueOf((Integer.parseInt(fromYear) - 1));\r\n\t\t\t} else{\r\n\t\t\t\ttoYear = String.valueOf((Integer.parseInt(fromYear) + 1));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString TDS_DEBIT_CODE=\"\";\r\n\t\t\tString query = \" SELECT NVL(TDS_DEBIT_CODE,0) FROM HRMS_TAX_PARAMETER\"\r\n\t\t\t\t\t+ \" WHERE TDS_FINANCIALYEAR_FROM = \"\r\n\t\t\t\t\t+ fromYear\r\n\t\t\t\t\t+ \" AND TDS_FINANCIALYEAR_TO = \"\r\n\t\t\t\t\t+ toYear;\r\n\t\t\tObject [][] tdsDebitCodeObj=getSqlModel().getSingleResult(query)\t;\r\n\t\t\tif(tdsDebitCodeObj!=null && tdsDebitCodeObj.length>0){\r\n\t\t\t\tTDS_DEBIT_CODE=String.valueOf(tdsDebitCodeObj[0][0]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tquery = \" UPDATE HRMS_ENCASHMENT_PROCESS_HDR \"\r\n\t\t\t\t\t+ \" SET ENCASHMENT_PROCESS_FLAG='Y' WHERE ENCASHMENT_PROCESS_CODE=\"\r\n\t\t\t\t\t+ leaveEncashProcess.getProcessCode();\r\n\t\t\tresult = getSqlModel().singleExecute(query);\r\n\t\t\t\r\n\t\t\tif (empCode != null && empCode.length > 0 \r\n\t\t\t\t&& !leaveEncashProcess.getSalarymonth().equals(\"\") \r\n\t\t\t\t&& !leaveEncashProcess.getSalaryyear().equals(\"\")) {\r\n\t\t\t\tquery = \"DELETE FROM HRMS_MISC_SALARY_UPLOAD WHERE APPL_CODE = \"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getProcessCode()\r\n\t\t\t\t\t\t+ \" AND APPL_TYPE = 'L'\"\r\n\t\t\t\t\t\t+ \" AND MONTH = \"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getSalarymonth()\r\n\t\t\t\t\t\t+ \" AND YEAR = \"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getSalaryyear();\r\n\r\n\t\t\t\tresult = getSqlModel().singleExecute(query);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(leaveEncashProcess.getSalaryCheck().equals(\"true\")){\r\n\t\t\t\tif(empCode != null && empCode.length > 0 && encashAmount != null && encashAmount.length > 0 ){\r\n\t\t\t\t\tfor (int i = 0; i < empCode.length; i++) {\r\n\t\t\t\t\t\tquery = \"INSERT INTO HRMS_MISC_SALARY_UPLOAD (EMP_ID, MONTH, YEAR, UPLOAD_PAY_TYPE, \" +\r\n\t\t\t\t\t\t\t\t\"SALARY_CODE, SALARY_AMOUNT, UPLOAD_IS_OVERWRITE, APPL_CODE, \" +\r\n\t\t\t\t\t\t\t\t\"APPL_TYPE, DISPLAY_FLAG, COMMENTS) \" +\r\n\t\t\t\t\t\t\t\t\"VALUES ( \" + empCode[i] + \r\n\t\t\t\t\t\t\t\t\",\" + leaveEncashProcess.getSalarymonth() + \r\n\t\t\t\t\t\t\t\t\",\" + leaveEncashProcess.getSalaryyear() + \r\n\t\t\t\t\t\t\t\t\",'C',\" + leaveEncashProcess.getCreditCode() + \r\n\t\t\t\t\t\t\t\t\",\" + encashAmount[i] + \r\n\t\t\t\t\t\t\t\t\",'Y'\" +\r\n\t\t\t\t\t\t\t\t\",\" + leaveEncashProcess.getProcessCode() +\r\n\t\t\t\t\t\t\t\t\",'L','Y','LEAVE ENCASHMENT AMOUNT')\" ;\r\n\t\t\t\r\n\t\t\t\t\t\tresult = getSqlModel().singleExecute(query);\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!TDS_DEBIT_CODE.equals(\"\")){\r\n\t\t\t\t\t\t\tquery = \"INSERT INTO HRMS_MISC_SALARY_UPLOAD (EMP_ID, MONTH, YEAR, UPLOAD_PAY_TYPE, \" +\r\n\t\t\t\t\t\t\t\t\"SALARY_CODE, SALARY_AMOUNT, UPLOAD_IS_OVERWRITE, APPL_CODE, \" +\r\n\t\t\t\t\t\t\t\t\"APPL_TYPE, DISPLAY_FLAG, COMMENTS) \" +\r\n\t\t\t\t\t\t\t\t\"VALUES ( \" + empCode[i] + \r\n\t\t\t\t\t\t\t\t\",\" + leaveEncashProcess.getSalarymonth() + \r\n\t\t\t\t\t\t\t\t\",\" + leaveEncashProcess.getSalaryyear() + \r\n\t\t\t\t\t\t\t\t\",'D',\" + TDS_DEBIT_CODE + \r\n\t\t\t\t\t\t\t\t\",\" + tds[i] + \r\n\t\t\t\t\t\t\t\t\",'Y'\" +\r\n\t\t\t\t\t\t\t\t\",\" + leaveEncashProcess.getProcessCode() +\r\n\t\t\t\t\t\t\t\t\",'L','N','LEAVE ENCASHMENT AMOUNT')\" ;\r\n\t\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t\tresult = getSqlModel().singleExecute(query);\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tquery = \"UPDATE HRMS_SALARY_\" +leaveEncashProcess.getSalaryyear() \r\n\t\t\t\t\t\t\t+ \" SET EMP_MISC_UPLOAD_FLAG='Y' \"\r\n\t\t\t\t\t\t\t+ \" WHERE EMP_ID = \" + empCode[i]\r\n\t\t\t\t\t\t\t+ \" AND SAL_MONTH=\" + leaveEncashProcess.getSalarymonth() \r\n\t\t\t\t\t\t\t+ \" AND SAL_YEAR =\" + leaveEncashProcess.getSalaryyear();\r\n\t\t\t\t\t\tresult = getSqlModel().singleExecute(query);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "@Override\n\tpublic String approveLeaveByLeaveRequestIdTemp(String leaveRequestId, String leaveApproveReason,\n\t\t\tString changeLeaveType,final float mpcl,final float mpel,final float mplwp) {\n\t\t//String moveRowIntoHistory=\"INSERT INTO emp_leave_history select * from emp_leave_requests_tbl where requestId = '\"+leaveRequestId+\"'\";\n\t\t//super.getJdbcTemplate().execute(moveRowIntoHistory);\n\t\t//String deleteRowByEmpid=\"delete from emp_leave_requests_tbl where requestId='\"+leaveRequestId+\"'\";\n\t\t//super.getJdbcTemplate().execute(deleteRowByEmpid);\n\t\t//String squery =\"select lh.empid,lh.leaveType,lh.leaveCategory,lh.totalDays,lh.lwpDays,lh.lwp,lh.inAccount,lh.leaveDays from emp_leave_history as lh where lh.requestId=?\";\n\t\tString squery =\"select lh.empid,lh.leaveType,lh.leaveCategory,lh.totalDays,lh.lwpDays,lh.lwp,lh.cel,lh.ccl,lh.inAccount,lh.leaveDays,lh.leaveDates from emp_leave_requests_tbl as lh where lh.requestId=?\";\n\t FaculityLeaveMasterEntity faculityLeaveMasterEntity = super.getJdbcTemplate().queryForObject(squery,new Object[] {leaveRequestId},new BeanPropertyRowMapper<FaculityLeaveMasterEntity>(FaculityLeaveMasterEntity.class));\n\t\t\n\t List<String> leaveTypes=new ArrayList<String>();\n\t leaveTypes.add(\"CL\");\n\t leaveTypes.add(\"EL\");\n\t leaveTypes.add(\"LWP\");\n\t \n\t\tif(!BASApplicationConstants.NO_CHANGE.equalsIgnoreCase(changeLeaveType) && !leaveTypes.contains(faculityLeaveMasterEntity.getLeaveType()) && mplwp>0) {\n\t\t\tString leaveDates=faculityLeaveMasterEntity.getLeaveDates();\t\n\t\t\tList<String> dateTokensList=new ArrayList<String>();\n\t\t\tsetComputedDatesForLeaveTypes(leaveDates, faculityLeaveMasterEntity.getTotalDays(), mplwp, dateTokensList);\n\t\t\tString updateLeaveComputatedDates=\"update emp_leave_requests_tbl set ccl=?,leaveDays=?,lwp=?,lwpDays=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\tObject[] pdata=new Object[]{mpcl,dateTokensList.get(0),mplwp,dateTokensList.get(1)};\n\t\t\tsuper.getJdbcTemplate().update(updateLeaveComputatedDates,pdata);\n\t\t}\n\t\telse if(!BASApplicationConstants.NO_CHANGE.equalsIgnoreCase(changeLeaveType)) {\n\t\t\t LeaveBalanceEntity leaveBalanceEntity=findLeaveCurrentLeaveBalanceByEmpId(faculityLeaveMasterEntity.getEmpid()+\"\");\n\t\t\t\t//finding total leaves applied and checking whether mcl is less than available cls\n\t\t\t\tfloat totalAvailableCls=leaveBalanceEntity.getCl();\n\t\t\t\tString totalClLeavesDays=faculityLeaveMasterEntity.getLeaveDays();\n\t\t\t\tint totalClLeavesCountDays=0;\n\t\t\t\tif(totalClLeavesDays!=null && totalClLeavesDays.length()>0) {\n\t\t\t\t\tString totalDaysTokens[]=totalClLeavesDays.split(\",\");\n\t\t\t\t\ttotalClLeavesCountDays=totalDaysTokens.length;\n\t\t\t\t\t\tfor(String str:totalDaysTokens) {\n\t\t\t\t\t\t\tfloat cp=Float.parseFloat(str.substring(str.indexOf(\"(\")+1,str.indexOf(\")\")));\n\t\t\t\t\t\t\ttotalAvailableCls=totalAvailableCls+cp;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//if modified cl is less than available CL of the employee\n\t\t\t\t//04(1),05(0.75),\n\t\t\t\tString totalDbClDays=\"\";\n\t\t\t\tif(mpcl<totalAvailableCls) {\n\t\t\t\t\t //float remainingCl=totalAvailableCls -mpcl; //1.75 ->>.25\n\t\t\t\t\t String totalDaysTokens[]=totalClLeavesDays.split(\",\");\n\t\t\t\t\t if(totalClLeavesCountDays==1) {\n\t\t\t\t\t\t \t//current computated cl into applied leaves request tables\n\t\t\t\t\t\t \tfloat ccl=Float.parseFloat(totalDaysTokens[0].substring(totalDaysTokens[0].indexOf(\"(\")+1,totalDaysTokens[0].indexOf(\")\")));\n\t\t\t\t\t\t \tif((ccl-mpcl) >0) {\n\t\t\t\t\t\t \t\t totalDbClDays=totalDaysTokens[0].substring(0,2)+\"(\"+(ccl-mpcl)+\")\";\n\t\t\t\t\t\t \t}\n\t\t\t\t\t }else{\n\t\t\t\t\t\t int mpclcount=(int) Math.ceil(mpcl);\n\t\t\t\t\t\t float tmpcl=mpcl;\n\t\t\t\t\t\t for(int i=0;i<mpclcount;i++) {\n\t\t\t\t\t\t \t if(tmpcl>=1) {\n\t\t\t\t\t\t \t\t totalDbClDays=totalDbClDays+\",\"+totalDaysTokens[i]; \n\t\t\t\t\t\t \t }\t \n\t\t\t\t\t\t \t else {\n\t\t\t\t\t\t \t\t totalDbClDays=totalDbClDays+\",\"+ totalDaysTokens[i].substring(0, 2)+\"(\"+tmpcl+\")\"; \n\t\t\t\t\t\t \t }\t\t \n\t\t\t\t\t\t \t tmpcl=tmpcl-1;\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t} //end of CL computation\n\t\t\t\t\n\t\t\t\t//compute total leaves dd from dates\n\t\t\t\t//2016-07-04,2016-07-05,2016-07-06\n\t\t\t\tString leaveDates=faculityLeaveMasterEntity.getLeaveDates();\n\t\t\t\tString ddDates=\"\";\n\t\t\t\tString leaveDatesTokens[]=leaveDates.split(\",\");\n\t\t\t\tfor(String dddate:leaveDatesTokens) {\n\t\t\t\t\t\tString dddateTokens[]=dddate.split(\"-\");\n\t\t\t\t\t\tString dd=dddateTokens[2];\n\t\t\t\t\t\tddDates=ddDates+dd+\",\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Case 1 when all CL ,EL,LWP is not zero\n\t\t\t\tif(mpcl>0 && mpel>0 && mplwp>0) {\n\t\t\t\t\t\t\t\tString cldates=ddDates+\"-> (\"+mpcl+\")\";\n\t\t\t\t\t\t\t\tString eldates=ddDates+\"-> (\"+mpel+\")\";\n\t\t\t\t\t\t\t\tString lwpdates=ddDates+\"-> (\"+mplwp+\")\";\n\t\t\t\t\t\t\t\tString updateLeaveComputatedDates=\"update emp_leave_requests_tbl set ccl=?,leaveDays=?,lwp=?,lwpDays=?,cel=?,elDays=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\t\t\tObject[] pdata=new Object[]{mpcl,cldates,mplwp,lwpdates,mpel,eldates};\n\t\t\t\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveComputatedDates,pdata);\n\t\t\t\t}else if(mpcl>0 && mplwp>0 && mpel==0) {\n\t\t\t\t\t\tList<String> dateTokensList=new ArrayList<String>();\n\t\t\t\t\t\tsetComputedDatesForLeaveTypes(leaveDates, faculityLeaveMasterEntity.getTotalDays(), mplwp, dateTokensList);\n\t\t\t\t\t\tString updateLeaveComputatedDates=\"update emp_leave_requests_tbl set ccl=?,leaveDays=?,lwp=?,lwpDays=?,cel=?,elDays=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\tObject[] pdata=new Object[]{mpcl,dateTokensList.get(0),mplwp,dateTokensList.get(1),0,\"\"};\n\t\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveComputatedDates,pdata);\n\t\t\t\t}else if(mpcl>0 && mpel>0 && mplwp==0) {\n\t\t\t\t\tList<String> dateTokensList=new ArrayList<String>();\n\t\t\t\t\tsetComputedDatesForLeaveTypes(leaveDates, faculityLeaveMasterEntity.getTotalDays(), mpel, dateTokensList);\n\t\t\t\t\tString updateLeaveComputatedDates=\"update emp_leave_requests_tbl set ccl=?,leaveDays=?,lwp=?,lwpDays=?,cel=?,elDays=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\tObject[] pdata=new Object[]{mpcl,dateTokensList.get(0),0,\"\",mpel,dateTokensList.get(1)};\n\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveComputatedDates,pdata);\n\t\t\t\t}else if(mpcl==0 && mpel>0 && mplwp>0) {\n\t\t\t\t\tList<String> dateTokensList=new ArrayList<String>();\n\t\t\t\t\tsetComputedDatesForLeaveTypes(leaveDates, faculityLeaveMasterEntity.getTotalDays(), mplwp, dateTokensList);\n\t\t\t\t\tString updateLeaveComputatedDates=\"update emp_leave_requests_tbl set ccl=?,leaveDays=?,lwp=?,lwpDays=?,cel=?,elDays=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\tObject[] pdata=new Object[]{0,\"\",mplwp,dateTokensList.get(1),mpel,dateTokensList.get(0)};\n\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveComputatedDates,pdata);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tLeavesModifiedEntity leavesModifiedEntity=findModifiedLeaveByRequestId(leaveRequestId);\n\t\t\t\tfloat clbalanceDiff=leavesModifiedEntity.getCl()-mpcl;\n\t\t\t\tfloat elbalanceDiff=leavesModifiedEntity.getEl()-mpel;\n\t\t\t\tString updateLeaveBalance=\"\";\n\t\t\t\tif(clbalanceDiff>0 && elbalanceDiff>0){\n\t\t\t\t\t updateLeaveBalance=\"update emp_leave_balance set CL=CL+\"+clbalanceDiff+\", EL=EL+\"+elbalanceDiff+\" where empid=\"+faculityLeaveMasterEntity.getEmpid();\n\t\t\t\t}else if(clbalanceDiff<=0 && elbalanceDiff<=0){\n\t\t\t\t\t updateLeaveBalance=\"update emp_leave_balance set CL=CL-\"+clbalanceDiff+\", EL=EL-\"+elbalanceDiff+\" where empid=\"+faculityLeaveMasterEntity.getEmpid();\n\t\t\t\t}else if(clbalanceDiff<=0 && elbalanceDiff>0){\n\t\t\t\t\t updateLeaveBalance=\"update emp_leave_balance set CL=CL-\"+clbalanceDiff+\", EL=EL+\"+elbalanceDiff+\" where empid=\"+faculityLeaveMasterEntity.getEmpid();\n\t\t\t\t} if(clbalanceDiff>0 && elbalanceDiff<=0){\n\t\t\t\t\t updateLeaveBalance=\"update emp_leave_balance set CL=CL+\"+clbalanceDiff+\", EL=EL-\"+elbalanceDiff+\" where empid=\"+faculityLeaveMasterEntity.getEmpid();\n\t\t\t\t}\n\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveBalance);\n\t}\n\t\t\n\t\t//end of no change\n\t\t//Approving the status of Management and moving record from leave_request_tbl into leave_history_tbl\n\t\tapproveLeaveByManagementRequestId(leaveRequestId,leaveApproveReason);\n\t\t//update Leave Balance Table\n\t\t\n\t/*\tString updateLeaveStatus=\"update emp_leave_requests_tbl set description=?,hrApproval=?,dom=? where requestId='\"+leaveRequestId+\"'\";\n\t\tsuper.getJdbcTemplate().update(updateLeaveStatus,new Object[]{leaveApproveReason,LeaveStatus.APPROVED_STATUS,DateUtils.getCurrentTimestatmp()});*/\n\t\treturn BaoConstants.SUCCESS;\n\t}", "@Override\n\tpublic String approveLeaveByLeaveRequestId(String leaveRequestId, String leaveApproveReason,\n\t\t\tString changeLeaveType,final float cl,final float el,final float plwp) {\n\t\t//String moveRowIntoHistory=\"INSERT INTO emp_leave_history select * from emp_leave_requests_tbl where requestId = '\"+leaveRequestId+\"'\";\n\t\t//super.getJdbcTemplate().execute(moveRowIntoHistory);\n\t\t//String deleteRowByEmpid=\"delete from emp_leave_requests_tbl where requestId='\"+leaveRequestId+\"'\";\n\t\t//super.getJdbcTemplate().execute(deleteRowByEmpid);\n\t\t//String squery =\"select lh.empid,lh.leaveType,lh.leaveCategory,lh.totalDays,lh.lwpDays,lh.lwp,lh.inAccount,lh.leaveDays from emp_leave_history as lh where lh.requestId=?\";\n\t\tString squery =\"select lh.empid,lh.leaveType,lh.leaveCategory,lh.totalDays,lh.lwpDays,lh.lwp,lh.inAccount,lh.leaveDays from emp_leave_requests_tbl as lh where lh.requestId=?\";\n\t\tif(!BASApplicationConstants.NO_CHANGE.equalsIgnoreCase(changeLeaveType)) {\n\t\t\t FaculityLeaveMasterEntity faculityLeaveMasterEntity = super.getJdbcTemplate().queryForObject(squery,new Object[] {leaveRequestId},new BeanPropertyRowMapper<FaculityLeaveMasterEntity>(FaculityLeaveMasterEntity.class));\n\t\t\t\tLeaveBalanceEntity leaveBalanceEntity=findLeaveCurrentLeaveBalanceByEmpId(faculityLeaveMasterEntity.getEmpid()+\"\");\n\t\t\t\tif(BASApplicationConstants.CL_LEAVE.equalsIgnoreCase(faculityLeaveMasterEntity.getLeaveType())) {\n\t\t\t\t\tif(BASApplicationConstants.EL_LEAVE.equalsIgnoreCase(changeLeaveType)) {\n\t\t\t\t\t\t\tfloat cel=0;\n\t\t\t\t\t\t String elDays=null;\n\t\t\t\t\t\t\tString lwpdays=faculityLeaveMasterEntity.getLwpDays();\n\t\t\t\t\t\t float lwp=faculityLeaveMasterEntity.getLwp();//2.5 , el=1.5\n\t\t\t\t\t\t float tel=leaveBalanceEntity.getEl(); //1\n\t\t\t\t\t\t float remel=tel-lwp; //remel =>>remainning el /5 //5.5\n\t\t\t\t\t\t if(remel>0) {\n\t\t\t\t\t\t \tlwp=0;\n\t\t\t\t\t\t \telDays=lwpdays;\n\t\t\t\t\t\t \tlwpdays=null;\n\t\t\t\t\t\t \tcel=faculityLeaveMasterEntity.getLwp();\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t \tlwp=-remel; //when lwp>=total el\n\t\t\t\t\t\t \tcel=faculityLeaveMasterEntity.getLwp();\n\t\t\t\t\t\t \t///2\n\t\t\t\t\t\t \tint lwpCount=(int)Math.ceil(lwp);\n\t\t\t\t\t\t \tint lwpLessCount=(int)Math.floor(lwp);\n\t\t\t\t\t\t \tString lwpdaysTokens[]=lwpdays.split(\",\");\n\t\t\t\t\t\t \t elDays=\"\";\n\t\t\t\t\t\t for(int x=0;x<lwp;x++) { //\n\t\t\t\t\t\t \telDays=elDays+lwpdaysTokens[lwpdaysTokens.length-1-x]+\",\";\n\t\t\t\t\t\t }\n\t\t\t\t\t\t lwpdays=\"\";\n\t\t\t\t\t\t for(int x=0;x<lwpdaysTokens.length-lwp;x++) { //\n\t\t\t\t\t\t \tlwpdays=lwpdays+lwpdaysTokens[x]+\",\";\n\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t\t String updateLeaveStatus=\"update emp_leave_requests_tbl set elDays=?,cel=?,lwp=?,lwpDays=?,changeLeaveType=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\t super.getJdbcTemplate().update(updateLeaveStatus,new Object[]{elDays,cel,lwp,lwpdays,changeLeaveType});\n\t\t\t\t\t\t updateEmployeeEL(leaveBalanceEntity.getEmpNo(),0F);\n\t\t\t\t\t}\n\t\t\t\t}else if(BASApplicationConstants.EL_LEAVE.equalsIgnoreCase(faculityLeaveMasterEntity.getLeaveType())) {\n\t\t\t\t\t if(BASApplicationConstants.LWP_LEAVE.equalsIgnoreCase(changeLeaveType)) {\n\t\t\t\t\t\t float totalDays=faculityLeaveMasterEntity.getTotalDays();\n\t\t\t\t\t\t String totalLeaveDays=faculityLeaveMasterEntity.getLeaveDays();\n\t\t\t\t\t\t\tString lwpDays=faculityLeaveMasterEntity.getLwpDays();\n\t\t\t\t\t\t\tlwpDays=totalLeaveDays+lwpDays;\n\t\t\t\t\t\t\tfloat lwp=totalDays;\n\t\t\t\t\t\t\tupdateEmployeeEL(faculityLeaveMasterEntity.getEmpid()+\"\",totalDays-faculityLeaveMasterEntity.getLwp()); \n\t\t\t\t\t\t\tString updateLeaveStatus=\"update emp_leave_requests_tbl set leaveDays=?,lwp=?,lwpDays=?,changeLeaveType=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveStatus,new Object[]{null,lwp,lwpDays,changeLeaveType});\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(BASApplicationConstants.LWP_LEAVE.equalsIgnoreCase(changeLeaveType)){\n\t\t\t\t\t float totalDays=faculityLeaveMasterEntity.getTotalDays();\n\t\t\t\t\t String totalLeaveDays=faculityLeaveMasterEntity.getLeaveDays();\n\t\t\t\t\t\tString lwpDays=faculityLeaveMasterEntity.getLwpDays();\n\t\t\t\t\t\tlwpDays=totalLeaveDays+(lwpDays!=null?lwpDays:\"\");\n\t\t\t\t\t\tfloat lwp=totalDays;\n\t\t\t\t\t\t//updateEmployeeEL(faculityLeaveMasterEntity.getEmpid()+\"\",totalDays-faculityLeaveMasterEntity.getLwp()); \n\t\t\t\t\t\tString updateLeaveStatus=\"update emp_leave_requests_tbl set leaveDays=?,lwp=?,lwpDays=?,changeLeaveType=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveStatus,new Object[]{null,lwp,lwpDays,changeLeaveType});\n\t\t\t\t }else if(BASApplicationConstants.CL_LEAVE.equalsIgnoreCase(changeLeaveType)){\n\t\t\t\t\t float totalDays=faculityLeaveMasterEntity.getTotalDays();\n\t\t\t\t\t\tupdateEmployeeCL(faculityLeaveMasterEntity.getEmpid()+\"\",totalDays); \n\t\t\t\t\t\tString updateLeaveStatus=\"update emp_leave_requests_tbl set changeLeaveType=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveStatus,new Object[]{changeLeaveType});\n\t\t\t\t }else if(BASApplicationConstants.EL_LEAVE.equalsIgnoreCase(changeLeaveType)){\n\t\t\t\t\t float totalDays=faculityLeaveMasterEntity.getTotalDays();\n\t\t\t\t\t\tupdateEmployeeEL(faculityLeaveMasterEntity.getEmpid()+\"\",totalDays); \n\t\t\t\t\t\tString updateLeaveStatus=\"update emp_leave_requests_tbl set changeLeaveType=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveStatus,new Object[]{changeLeaveType});\n\t\t\t\t }\n\t\t\t\t\t\n\t\t\t}\n\t\t}//end of no change\n\t\t\n\t\t//Approving the status of Management and moving record from leave_request_tbl into leave_history_tbl\n\t\tapproveLeaveByManagementRequestId(leaveRequestId,leaveApproveReason);\n\t/*\tString updateLeaveStatus=\"update emp_leave_requests_tbl set description=?,hrApproval=?,dom=? where requestId='\"+leaveRequestId+\"'\";\n\t\tsuper.getJdbcTemplate().update(updateLeaveStatus,new Object[]{leaveApproveReason,LeaveStatus.APPROVED_STATUS,DateUtils.getCurrentTimestatmp()});*/\n\t\treturn BaoConstants.SUCCESS;\n\t}", "public void getBlankLeaveRecord(LeaveApproval leaveApp) {\n\t\t\tObject empObject[] = new Object[1];\r\n\t\t\tempObject[0] = leaveApp.getUserEmpId();\r\n\t\t\tObject[][] data = getSqlModel().getSingleResult(getQuery(2),empObject);\r\n\t\t\t\r\n\t\t\tlogger.info(\"data----------: \"+String.valueOf(empObject[0]));\r\n\t\t\t\r\n\t\t\tArrayList<Object> appList = new ArrayList<Object>();\r\n\t\t\t\r\n\t\t\tfor(int i=0; i<data.length; i++) {\t\r\n\t\t\tLeaveApproval bean1= new LeaveApproval();\r\n\t\t\tLeaveApplication appBean = new LeaveApplication();\r\n\t\t\t\tbean1.setAppCode(String.valueOf(data[i][0]));\r\n\t\r\n\t\t\t\tbean1.setEmpId(String.valueOf(data[i][1]));\r\n\t\t\t\tbean1.setEmpName(String.valueOf(data[i][2]));\r\n\t\t\t\tbean1.setAppDate(String.valueOf(data[i][3]));\r\n\t\t\t\tbean1.setFromDate(String.valueOf(data[i][4]));\r\n\t\t\t\tbean1.setToDate(String.valueOf(data[i][5]));\r\n\t\t\t\tbean1.setTotalDays(String.valueOf(data[i][6]));\r\n\t\t\t\t\r\n\t\t\tappList.add(bean1);\r\n\t\t}\r\n\t\t\tleaveApp.setAppList(appList);\r\n\t\t\t\r\n\t}", "int updateByPrimaryKey(Leave record);", "@Override\n\tpublic int updApp(ApplicationEntity App) {\n\t\tint id=App.A_id;\n\t\tString zt=null;\n\t\tApplicationEntity app=appdao.selectappById(id);\n\t\tif(\"0\".equals(app.A_state)){\n\t\t\t zt=\"1\";\n\t\t\t\n\t\t}\n\t\tApplicationEntity app1=new ApplicationEntity();\n\t\tapp1.A_state=zt;\n\t\tapp1.A_id=id;\n\t\treturn appdao.updapp(app1);\n\t}", "int updateByPrimaryKeySelective(NeeqCompanyAccountingFirmOnline record);", "public int applyleave(LeaveBean leave) {\n\t\t// TODO Auto-generated method stub\n\t\tleave.setStatus(\"Pending\");\n\t\tOptional<AdminBean> list = crud2.findById(leave.getEmpid());\n\t\tcrud2.applyleave(leave.getEmpid());\n\t\tleave.setManagerid(list.get().getReportingTo());\n\t\tcrud3.save(leave);\n\t\treturn 0;\n\t}", "int updateByPrimaryKeySelective(Leave record);", "int updateByPrimaryKey(NeeqCompanyAccountingFirmOnline record);", "int updateByPrimaryKey(CmIndustryConfig record);", "public boolean calculateEncashAmount(String noOfEncashLeave,\r\n\t\t\tString empCode, LeaveEncashmentProcess leaveEncashProcess) {\n\t\tboolean result = false;\r\n\t\ttry {\r\n\r\n\t\t\tObject encashQueryObj[][] = null;\r\n\t\t\tArrayList list = new ArrayList();\r\n\t\t\tObject empIdsObj[][] = getEmpIdsAndPolicyCodes(leaveEncashProcess);\r\n\r\n\t\t\tif (empIdsObj != null && empIdsObj.length > 0) {\r\n\t\t\t\tfor (int j = 0; j < empIdsObj.length; j++) {\r\n\t\t\t\t\tString policyCode = \" SELECT LEAVE_POLICY_CODE FROM HRMS_LEAVE_POLICY_TEMP \"\r\n\t\t\t\t\t\t\t+ \" WHERE EMP_ID=\"\r\n\t\t\t\t\t\t\t+ String.valueOf(empIdsObj[j][0]);\r\n\t\t\t\t\tObject policy_CodeObj[][] = getSqlModel().getSingleResult(\r\n\t\t\t\t\t\t\tpolicyCode);\r\n\r\n\t\t\t\t\tif (policy_CodeObj != null && policy_CodeObj.length > 0) {\r\n\t\t\t\t\t\tfor (int k = 0; k < policy_CodeObj.length; k++) {\r\n\t\t\t\t\t\t\tString encashQuery = \" SELECT NVL(HRMS_EMP_OFFC.EMP_TOKEN,' '),NVL(HRMS_EMP_OFFC.EMP_FNAME,' ')||' '||NVL(HRMS_EMP_OFFC.EMP_MNAME,' ')||' '||NVL(HRMS_EMP_OFFC.EMP_LNAME,' ') NAME,TO_CHAR(LEAVE_NAME) ,NVL(LEAVE_CLOSING_BALANCE,0) AS AVAILABLE_BALANCE, \"\r\n\t\t\t\t\t\t\t\t\t+ \" NVL(LEAVE_CLOSING_BALANCE,0)-\"\r\n\t\t\t\t\t\t\t\t\t+ leaveEncashProcess.getGreaterEncashBal()\r\n\t\t\t\t\t\t\t\t\t+ \" ENCASH_BAL,HRMS_LEAVE.LEAVE_ID, \"\r\n\t\t\t\t\t\t\t\t\t+ \" HRMS_LEAVE_POLICY_DTL.LEAVE_ENC_FORMULA ,HRMS_EMP_OFFC.EMP_ID \"\r\n\t\t\t\t\t\t\t\t\t+ \" FROM HRMS_LEAVE \"\r\n\t\t\t\t\t\t\t\t\t+ \" LEFT JOIN HRMS_LEAVE_BALANCE ON(HRMS_LEAVE.LEAVE_ID=HRMS_LEAVE_BALANCE.LEAVE_CODE AND EMP_ID =\"\r\n\t\t\t\t\t\t\t\t\t+ String.valueOf(empIdsObj[j][0])\r\n\t\t\t\t\t\t\t\t\t+ \") \"\r\n\t\t\t\t\t\t\t\t\t+ \" LEFT JOIN HRMS_EMP_OFFC ON(HRMS_LEAVE_BALANCE.EMP_ID=HRMS_EMP_OFFC.EMP_ID) \"\r\n\t\t\t\t\t\t\t\t\t+ \" INNER JOIN HRMS_LEAVE_POLICY_DTL ON(HRMS_LEAVE_POLICY_DTL.LEAVE_CODE=HRMS_LEAVE_BALANCE.LEAVE_CODE \"\r\n\t\t\t\t\t\t\t\t\t+ \" AND LEAVE_APPLICABLE='Y' AND LEAVE_ENC_FLAG='Y'AND HRMS_LEAVE_POLICY_DTL.LEAVE_POLICY_CODE=\"\r\n\t\t\t\t\t\t\t\t\t+ String.valueOf(policy_CodeObj[k][0])\r\n\t\t\t\t\t\t\t\t\t+ \") \"\r\n\t\t\t\t\t\t\t\t\t+ \" AND HRMS_LEAVE_BALANCE.LEAVE_CLOSING_BALANCE >\"\r\n\t\t\t\t\t\t\t\t\t+ leaveEncashProcess.getGreaterEncashBal()\r\n\t\t\t\t\t\t\t\t\t+ \" \"\r\n\t\t\t\t\t\t\t\t\t+ \" AND HRMS_LEAVE_BALANCE.LEAVE_CODE=\"\r\n\t\t\t\t\t\t\t\t\t+ leaveEncashProcess.getLevCode()\r\n\t\t\t\t\t\t\t\t\t+ \" AND LEAVE_ENC_FORMULA IS NOT NULL ORDER BY LEAVE_ID \";\r\n\r\n\t\t\t\t\t\t\tencashQueryObj = getSqlModel().getSingleResult(\r\n\t\t\t\t\t\t\t\t\tencashQuery);\r\n\r\n\t\t\t\t\t\t\tif (encashQueryObj != null\r\n\t\t\t\t\t\t\t\t\t&& encashQueryObj.length > 0) {\r\n\t\t\t\t\t\t\t\tfor (int e = 0; e < encashQueryObj.length; e++) {\r\n\r\n\t\t\t\t\t\t\t\t\tresult = true;\r\n\t\t\t\t\t\t\t\t\tLeaveEncashmentProcess bean = new LeaveEncashmentProcess();\r\n\r\n\t\t\t\t\t\t\t\t\tbean.setEmpToken(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][0])));\r\n\t\t\t\t\t\t\t\t\tbean.setEmpName(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][1])));\r\n\t\t\t\t\t\t\t\t\tbean.setLeaveName(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][2])));\r\n\t\t\t\t\t\t\t\t\tbean.setAvailableBal(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][3])));\r\n\t\t\t\t\t\t\t\t\tbean.setNoOfencashLeave(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][4]));\r\n\t\t\t\t\t\t\t\t\tbean.setLeaveCode(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][5])));\r\n\t\t\t\t\t\t\t\t\tbean.setEncashFormula(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][6])));\r\n\t\t\t\t\t\t\t\t\tbean.setEmployeeId(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][7])));\r\n\r\n\t\t\t\t\t\t\t\t\tdouble amount = 0;\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tamount = Utility\r\n\t\t\t\t\t\t\t\t\t\t\t\t.expressionEvaluate(new Utility()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.generateFormula(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][7]),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][6]),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsession));\r\n\t\t\t\t\t\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\t\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tlogger\r\n\t\t\t\t\t\t\t\t\t\t\t.info(\"Value of amount \"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ amount);\r\n\t\t\t\t\t\t\t\t\tbean.setAmtPerDay(String.valueOf((amount)));\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tString delTempQueryAfter = \" DELETE FROM HRMS_LEAVE_POLICY_TEMP \";\r\n\t\t\tgetSqlModel().singleExecute(delTempQueryAfter);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public String rejectApprovedApplication(Bwfl_permit_tracking_action act){\n\n\n\t\t\tint saveStatus = 0;\n\t\t\tConnection con = null;\n\t\t\tPreparedStatement pstmt = null;\t\t\t\n\t\t\tString updtQr = \"\";\n\t\t\tString delQr = \"\";\n\t\t\tString insQr = \"\";\n\t\t\tint seq = getRejctedSeq();\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\ttry {\n\t\t\t\tcon = ConnectionToDataBase.getConnection();\n\t\t\t\tcon.setAutoCommit(false);\n\t\t\t\tDate date = new Date();\n\t\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\t\tString time = sdf.format(cal.getTime());\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n\n\t\t\t\t\tupdtQr = \t\" UPDATE bwfl_license.import_permit_20_21 \"+\n\t\t\t\t\t\t\t \t\" SET deo_time=?, deo_date=?, deo_remark=?, \"+\n\t\t\t\t\t\t\t \t\" deo_user=?, vch_approved=?, vch_status=?, import_fee_challan_no=?, spcl_fee_challan_no=? \" +\n\t\t\t\t\t\t\t \t\" WHERE id=? AND district_id=? AND login_type=? AND app_id=? \";\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\tpstmt = con.prepareStatement(updtQr);\n\n\n\t\t\t\t\tpstmt.setString(1, time);\n\t\t\t\t\tpstmt.setDate(2, Utility.convertUtilDateToSQLDate(new Date()));\n\t\t\t\t\tpstmt.setString(3, act.getFillRemrks());\t\n\t\t\t\t\tpstmt.setString(4, ResourceUtil.getUserNameAllReq().trim());\n\t\t\t\t\tpstmt.setString(5, \"REJECTED\");\n\t\t\t\t\tpstmt.setString(6, \"Rejected By DEO after Approval\");\n\t\t\t\t\tpstmt.setString(7, null);\n\t\t\t\t\tpstmt.setString(8, null);\n\t\t\t\t\tpstmt.setInt(9, act.getRequestID());\n\t\t\t\t\tpstmt.setInt(10, act.getDistrictId());\n\t\t\t\t\tpstmt.setString(11, act.getLoginType());\n\t\t\t\t\tpstmt.setInt(12, act.getAppId());\n\t\n\t\t\t\t\tsaveStatus = pstmt.executeUpdate();\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"status1------rejectttt----- \"+saveStatus);\n\t\t\t\t\t\t\n\t\t\t\t\tif(saveStatus > 0){\n\t\t\t\t\t\n\t\t\t\t\t\tinsQr = \t\" INSERT INTO bwfl_license.rejected_permit_after_approval_20_21( \" +\n\t\t\t\t\t\t\t\t\t\" seq, district_id, bwfl_id, bwfl_type, cr_date, approval_time, approval_remark, \" +\n\t\t\t\t\t\t\t\t\t\" approval_user, approval_date, lic_no, permit_nmbr, login_type, reject_dt_time, reject_remark, app_id_fk) \" +\n\t\t\t\t\t\t\t\t\t\" VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); \";\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\tpstmt = con.prepareStatement(insQr);\n\n\n\t\t\t\t\tpstmt.setInt(1, seq);\n\t\t\t\t\tpstmt.setInt(2, act.getDistrictId());\n\t\t\t\t\tpstmt.setInt(3, act.getBwflId());\n\t\t\t\t\tpstmt.setString(4, act.getLicenseType());\n\t\t\t\t\tpstmt.setDate(5, Utility.convertUtilDateToSQLDate(new Date()));\n\t\t\t\t\tpstmt.setString(6, act.getApprovalTym());\n\t\t\t\t\tpstmt.setString(7, act.getDeoRemrks());\n\t\t\t\t\tpstmt.setString(8, act.getApprovalUser());\n\t\t\t\t\tpstmt.setDate(9, Utility.convertUtilDateToSQLDate(act.getApprovalDate()));\n\t\t\t\t\tpstmt.setString(10, act.getLicenseNmbr());\t\n\t\t\t\t\tpstmt.setString(11, act.getPermitNmbr());\n\t\t\t\t\tpstmt.setString(12, act.getLoginType());\n\t\t\t\t\tpstmt.setString(13, dateFormat.format(new Date()));\n\t\t\t\t\tpstmt.setString(14, act.getFillRemrks());\n\t\t\t\t\tpstmt.setInt(15, act.getAppId());\n\n\t\t\t\t\tsaveStatus = pstmt.executeUpdate();\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"status2------rejectttt----- \"+saveStatus);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(saveStatus > 0){\n\t\t\t\t\t\tfor (int i = 0; i < act.getDisplayBrandDetails().size(); i++) {\n\n\t\t\t\t\t\t\tBwfl_permit_tracking_dt dt = (Bwfl_permit_tracking_dt) act.getDisplayBrandDetails().get(i);\n\n\t\t\t\t\t\t\tsaveStatus = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(act.getLoginType().equalsIgnoreCase(\"BWFL\")){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdelQr = \t\" DELETE FROM bwfl_license.mst_bottling_plan_20_21 \"+\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t \t\t\" WHERE int_distillery_id=? AND int_brand_id=? AND int_pack_id=? AND plan_dt=? \" +\n\t\t\t\t\t\t\t\t \t\t\" AND permitno=? AND (finalized_flag!='F' or finalized_flag IS NULL) \";\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\tpstmt = con.prepareStatement(delQr);\n\t\t\t\n\t\t\t\n\t\t\t\t\t\t\t\tpstmt.setInt(1, act.getBwflId());\n\t\t\t\t\t\t\t\tpstmt.setInt(2, dt.getBrandId_dt());\n\t\t\t\t\t\t\t\tpstmt.setInt(3, dt.getPckgID_dt());\n\t\t\t\t\t\t\t\tpstmt.setDate(4, Utility.convertUtilDateToSQLDate(act.getApprovalDate()));\n\t\t\t\t\t\t\t\tpstmt.setString(5, act.getPermitNmbr());\t\n\t\t\t\n\t\t\t\t\t\t\t\tsaveStatus = pstmt.executeUpdate();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(act.getLoginType().equalsIgnoreCase(\"FL2D\")){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdelQr = \t\" DELETE FROM fl2d.mst_stock_receive_20_21 \"+\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t \t\t\" WHERE int_fl2d_id=? AND int_brand_id=? AND int_pack_id=? AND plan_dt=? \" +\n\t\t\t\t\t\t\t\t \t\t\" AND permit_no=? AND (finalized_flag!='F' or finalized_flag IS NULL) \";\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\tpstmt = con.prepareStatement(delQr);\n\t\t\t\n\t\t\t\n\t\t\t\t\t\t\t\tpstmt.setInt(1, act.getBwflId());\n\t\t\t\t\t\t\t\tpstmt.setInt(2, dt.getBrandId_dt());\n\t\t\t\t\t\t\t\tpstmt.setInt(3, dt.getPckgID_dt());\n\t\t\t\t\t\t\t\tpstmt.setDate(4, Utility.convertUtilDateToSQLDate(act.getApprovalDate()));\n\t\t\t\t\t\t\t\tpstmt.setString(5, act.getPermitNmbr());\t\n\t\t\t\n\t\t\t\t\t\t\t\tsaveStatus = pstmt.executeUpdate();\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\t\t\n\t\t\t\t\t\t\t\tSystem.out.println(\"status3------rejectttt----- \"+saveStatus);\n\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\n\t\t\t\tif (saveStatus > 0) {\n\t\t\t\t\tcon.commit();\n\t\t\t\t\tact.closeApplication();\n\t\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_INFO,\n\t\t\t\t\t\" Application Rejected !!! \",\"Application Rejected !!!\"));\n\t\t\t\t\t\n\n\t\t\t\t} else {\n\t\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_ERROR,\n\t\t\t\t\t\"Error !!! \", \"Error!!!\"));\n\n\t\t\t\t\tcon.rollback();\n\n\t\t\t\t}\n\t\t\t} catch (Exception se) {\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,new FacesMessage(se.getMessage(), se.getMessage()));\n\t\t\t\tse.printStackTrace();\n\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (pstmt != null)\n\t\t\t\t\t\tpstmt.close();\n\t\t\t\t\tif (con != null)\n\t\t\t\t\t\tcon.close();\n\n\t\t\t\t} catch (Exception se) {\n\t\t\t\t\tse.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn \"\";\n\n\t\t\n\t\t}", "int updateByPrimaryKeySelective(CmIndustryConfig record);", "public int Appbr(Long broker_id)throws SQLException {\nint i=DbConnect.getStatement().executeUpdate(\"update login set status='approved' where login_id=\"+broker_id+\"\");\r\n\treturn i;\r\n}", "public static String update_leave(int empId,int leave_id,String start_date,String end_date,int no_ldays,String leave_type,String leave_reason )\r\n throws ParseException {\r\n Employee emp = Employee.listById(empId);\r\n Leave leavedetails = Leave.listById(leave_id);\r\n String s=null;\r\n int prevDays = leavedetails.getNoLeaveDays();\r\n if (emp != null) {\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n Date leave_from = sdf.parse(start_date);\r\n Date leave_to = sdf.parse(end_date);\r\n Calendar start = Calendar.getInstance();\r\n start.setTime(leave_from);\r\n Calendar end = Calendar.getInstance();\r\n end.setTime(leave_to);\r\n int counts = 0;\r\n for (Date date = start.getTime(); start.before(end); start.add(Calendar.DATE, 1), date = start.getTime()) {\r\n Calendar c = Calendar.getInstance();\r\n c.setTime(date);\r\n int dayOfWeek = c.get(Calendar.DAY_OF_WEEK);\r\n if (dayOfWeek == 1 || dayOfWeek == 7) {\r\n counts++;\r\n}\r\n }\r\n System.out.println(counts);\r\n long diff1 = leave_to.getTime() - leave_from.getTime();\r\n System.out.println(diff1);\r\n long day1 = diff1 / (1000 * 60 * 60 * 24);\r\n Date today = new Date();\r\n String appliedOn = sdf.format(today);\r\n day1 = day1 + 1;\r\n long availBalance = 0;\r\n long diff = 0;\r\n long updLeave = 0;\r\n String leaveStatus = null;\r\n // int overl = Leave.countNo(empId,start_date,end_date);\r\n availBalance = emp.getavailleaves();\r\n diff = availBalance - day1;\r\n updLeave = day1 - counts;\r\n int bal = (int) updLeave;\r\n if (empId != Leave.listById(leave_id).getEmployeeId()) {\r\n s=\"You are not authorised to update this leave.\";\r\n } else if (day1 <= 0) {\r\n s=\"Start Date Must be Greater than EndDate...\";\r\n } else if (diff < 0) {\r\n s=\"insufficient leave balance\";\r\n } else if (no_ldays != day1) {\r\n s=\"NO Of day Should be right\";\r\n } else if (leave_from.compareTo(sdf.parse(appliedOn)) < 0) {\r\n s=\"Start should be greater or equal to current date\";\r\n } else {\r\n if (emp.getMgr_id() == 0) {\r\n leaveStatus = \"APPROVED\";\r\n dao().update_leave(start_date, end_date, bal,\r\n leave_type, leaveStatus, leave_reason, leave_id);\r\n s=\"Leave updated Successfully...\";\r\n } else {\r\n leaveStatus = \"PENDING\";\r\n dao().update_leave(start_date, end_date, bal,\r\n leave_type, leaveStatus, leave_reason, leave_id);\r\n if (bal - prevDays > 0) {\r\n bal = bal - prevDays;\r\n edao().decrement(empId, bal);\r\n } else if (bal - prevDays < 0) {\r\n bal = prevDays - bal;\r\n edao().increment(empId, bal);\r\n } else {\r\n bal = bal - prevDays;\r\n edao().decrement(empId, bal);\r\n }\r\n System.out.println(\"Leave updated Successfully For \" + (day1 - counts) + \" day.\");\r\n }\r\n }\r\n } else {\r\n s=\"invalid employee\";\r\n }\r\n return s;\r\n }", "int updateByPrimaryKey(ExamineApproveResult record);", "public int Editcomp(Long comp_id, String compname, String address, String city,\r\n\t\tString state, Long offno, Long faxno, String website, String e_mail) throws SQLException {\nint i =DbConnect.getStatement().executeUpdate(\"update company set address='\"+address+\"',city='\"+city+\"',state='\"+state+\"',offno=\"+offno+\",faxno=\"+faxno+\",website='\"+website+\"',email='\"+e_mail+\"'where comp_id=\"+comp_id+\" \");\r\n\treturn i;\r\n}", "public static void updateManualEncumAppAmt(EscmProposalMgmt proposalmgmt, Boolean iscancel) {\n\n try {\n EscmProposalMgmt baseProposalObj = proposalmgmt.getEscmBaseproposal();\n OBContext.setAdminMode();\n List<EscmProposalmgmtLine> prolineList = proposalmgmt.getEscmProposalmgmtLineList();\n // checking with propsal line\n if (baseProposalObj == null) {\n for (EscmProposalmgmtLine proposalline : prolineList) {\n if (!proposalline.isSummary()) {\n EfinBudgetManencumlines encline = proposalline.getEfinBudgmanencumline();\n if (encline != null) {\n if (\"PAWD\".equals(proposalmgmt.getProposalstatus())) {\n encline.setAPPAmt(encline.getAPPAmt().subtract(proposalline.getAwardedamount()));\n } else {\n encline.setAPPAmt(encline.getAPPAmt().subtract(proposalline.getLineTotal()));\n }\n OBDal.getInstance().save(encline);\n }\n if (iscancel) {\n // BidManagementDAO.insertEncumbranceModification(encline,\n // proposalline.getLineTotal().negate(), null, \"PRO\", null, null);\n } else {\n proposalline.setEfinBudgmanencumline(null);\n OBDal.getInstance().save(proposalline);\n }\n }\n }\n } else if (baseProposalObj != null) {\n for (EscmProposalmgmtLine lines : prolineList) {\n if (!lines.isSummary()) {\n if (lines.getStatus() == null) {\n EfinBudgetManencumlines encline = lines.getEscmOldProposalline()\n .getEfinBudgmanencumline();\n // if reserved then consider new proposal line total\n BigDecimal amountDiffernce = lines.getEscmOldProposalline().getLineTotal()\n .subtract(lines.getLineTotal());\n\n // update in remaining amount\n EfinBudgetManencumlines encumLn = Utility.getObject(EfinBudgetManencumlines.class,\n encline.getId());\n encumLn.setAPPAmt(encumLn.getAPPAmt().add(amountDiffernce));\n encumLn.setRemainingAmount(encumLn.getRemainingAmount().subtract(amountDiffernce));\n OBDal.getInstance().save(encumLn);\n } else if (lines.getStatus() != null && lines.getEscmOldProposalline() != null\n && lines.getEscmOldProposalline().getStatus() == null) {\n EfinBudgetManencumlines encline = lines.getEscmOldProposalline()\n .getEfinBudgmanencumline();\n // if reserved then consider new proposal line total\n BigDecimal amountDiffernce = lines.getEscmOldProposalline().getLineTotal();\n\n // update in remaining amount\n EfinBudgetManencumlines encumLn = Utility.getObject(EfinBudgetManencumlines.class,\n encline.getId());\n encumLn.setAPPAmt(encumLn.getAPPAmt().add(amountDiffernce));\n encumLn.setRemainingAmount(encumLn.getRemainingAmount().subtract(amountDiffernce));\n OBDal.getInstance().save(encumLn);\n }\n }\n }\n }\n\n } catch (final Exception e) {\n log.error(\"Exception in updateManualEncumAppAmt after Reject : \", e);\n } finally {\n OBContext.restorePreviousMode();\n }\n }", "int updateByPrimaryKeySelective(ExamineApproveResult record);", "@Override\n\tpublic int updblu(ApplicationEntity App) {\n\t\tint id=App.A_id;\n\t\tString zt=null;\n\t\tApplicationEntity app=appdao.selectappById(id);\n\t\tif(\"0\".equals(app.A_state)){\n\t\t\t zt=\"2\";\n\t\t\t\n\t\t}\n\t\tApplicationEntity app1=new ApplicationEntity();\n\t\tapp1.A_state=zt;\n\t\tapp1.A_id=id;\n\t\treturn appdao.updapp(app1);\n\t}", "int updateByPrimaryKey(CompanyExtend record);", "void updatePurchaseOrderLinkedSaleOrderStatus(long pohId);", "public boolean processData(LeaveEncashmentProcess leaveEncashProcess) {\n\t\tboolean result = false;\r\n\t\ttry {\r\n\r\n\t\t\tObject encashQueryObj[][] = null;\r\n\t\t\tArrayList list = new ArrayList();\r\n\t\t\tObject empObj[][] = null;\r\n\t\t\tObject empIdsObj[][] = getEmpIdsAndPolicyCodes(leaveEncashProcess);\r\n\r\n\t\t\tString month = leaveEncashProcess.getSalarymonth();\r\n\t\t\tString fromYear = leaveEncashProcess.getSalaryyear();\r\n\t\t\tString toYear = \"\";\r\n\t\t\tif(Integer.parseInt(month) < 4){\r\n\t\t\t\ttoYear = fromYear;\r\n\t\t\t\tfromYear = String.valueOf((Integer.parseInt(fromYear) - 1));\r\n\t\t\t} else{\r\n\t\t\t\ttoYear = String.valueOf((Integer.parseInt(fromYear) + 1));\r\n\t\t\t}\r\n\r\n\t\t\tdouble totalEncashAmt = 0.0; \r\n\t\t\tif (empIdsObj != null && empIdsObj.length > 0) {\r\n\t\t\t\t\r\n\t\t\t\tfor (int j = 0; j < empIdsObj.length; j++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tString policyCode = \" SELECT HRMS_LEAVE_POLICY_TEMP.LEAVE_POLICY_CODE FROM HRMS_LEAVE_POLICY_TEMP \"\r\n\t\t\t\t\t\t\t+ \" WHERE HRMS_LEAVE_POLICY_TEMP.EMP_ID=\"\r\n\t\t\t\t\t\t\t+ String.valueOf(empIdsObj[j][0]);\r\n\t\t\t\t\tObject policy_CodeObj[][] = getSqlModel().getSingleResult(\r\n\t\t\t\t\t\t\tpolicyCode);\r\n\r\n\t\t\t\t\tif (policy_CodeObj != null && policy_CodeObj.length > 0) {\r\n\r\n\t\t\t\t\t\tString encashQuery = \" SELECT DISTINCT NVL(HRMS_EMP_OFFC.EMP_TOKEN,' '),NVL(HRMS_EMP_OFFC.EMP_FNAME,' ')||' '||NVL(HRMS_EMP_OFFC.EMP_MNAME,' ')||' '||NVL(HRMS_EMP_OFFC.EMP_LNAME,' ') NAME,TO_CHAR(LEAVE_NAME) ,NVL(LEAVE_CLOSING_BALANCE,0) AS AVAILABLE_BALANCE, \"\r\n\t\t\t\t\t\t\t\t+ \" NVL(LEAVE_CLOSING_BALANCE,0)-\"\r\n\t\t\t\t\t\t\t\t+ leaveEncashProcess.getGreaterEncashBal()\r\n\t\t\t\t\t\t\t\t+ \" ENCASH_BAL,HRMS_LEAVE.LEAVE_ID, \"\r\n\t\t\t\t\t\t\t\t+ \" HRMS_LEAVE_POLICY_DTL.LEAVE_ENC_FORMULA ,HRMS_EMP_OFFC.EMP_ID, NVL(HRMS_EMP_OFFC.EMP_GENDER,'') \"\r\n\t\t\t\t\t\t\t\t+ \" FROM HRMS_LEAVE \"\r\n\t\t\t\t\t\t\t\t+ \" LEFT JOIN HRMS_LEAVE_BALANCE ON(HRMS_LEAVE.LEAVE_ID=HRMS_LEAVE_BALANCE.LEAVE_CODE AND EMP_ID =\"\r\n\t\t\t\t\t\t\t\t+ String.valueOf(empIdsObj[j][0])\r\n\t\t\t\t\t\t\t\t+ \") \"\r\n\t\t\t\t\t\t\t\t+ \" LEFT JOIN HRMS_EMP_OFFC ON(HRMS_LEAVE_BALANCE.EMP_ID=HRMS_EMP_OFFC.EMP_ID) \"\r\n\t\t\t\t\t\t\t\t+ \" INNER JOIN HRMS_LEAVE_POLICY_DTL ON(HRMS_LEAVE_POLICY_DTL.LEAVE_CODE=HRMS_LEAVE_BALANCE.LEAVE_CODE \"\r\n\t\t\t\t\t\t\t\t+ \" AND LEAVE_APPLICABLE='Y' AND LEAVE_ENC_FLAG='Y'AND HRMS_LEAVE_POLICY_DTL.LEAVE_POLICY_CODE=\"\r\n\t\t\t\t\t\t\t\t+ String.valueOf(policy_CodeObj[0][0])\r\n\t\t\t\t\t\t\t\t+ \") \"\r\n\t\t\t\t\t\t\t\t+ \" AND HRMS_LEAVE_BALANCE.LEAVE_CLOSING_BALANCE >\"\r\n\t\t\t\t\t\t\t\t+ leaveEncashProcess.getGreaterEncashBal()\r\n\t\t\t\t\t\t\t\t+ \" \"\r\n\t\t\t\t\t\t\t\t+ \" AND HRMS_LEAVE_BALANCE.LEAVE_CODE IN(\"\r\n\t\t\t\t\t\t\t\t+ leaveEncashProcess.getLevCode()\r\n\t\t\t\t\t\t\t\t+ \") AND LEAVE_ENC_FORMULA IS NOT NULL ORDER BY LEAVE_ID \";\r\n\r\n\t\t\t\t\t\tencashQueryObj = getSqlModel().getSingleResult(encashQuery);\r\n\r\n\t\t\t\t\t\tif (encashQueryObj != null && encashQueryObj.length > 0) {\r\n\t\t\t\t\t\t\tfor (int e = 0; e < encashQueryObj.length; e++) {\r\n\r\n\t\t\t\t\t\t\t\tempObj = new Object[1][3];\r\n\t\t\t\t\t\t\t\tempObj[0][0] = String.valueOf(empIdsObj[j][0]);\r\n\t\t\t\t\t\t\t\tempObj[0][1] = \"0\";\r\n\t\t\t\t\t\t\t\tempObj[0][2] = \"\";\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tresult = true;\r\n\t\t\t\t\t\t\t\tLeaveEncashmentProcess bean = new LeaveEncashmentProcess();\r\n\t\t\t\t\t\t\t\tbean.setSrNo(String.valueOf(e + 1));\r\n\t\t\t\t\t\t\t\tbean.setEmpToken(checkNull(String.valueOf(encashQueryObj[e][0])));\r\n\t\t\t\t\t\t\t\tbean.setEmpName(checkNull(String.valueOf(encashQueryObj[e][1])));\r\n\t\t\t\t\t\t\t\tbean.setLeaveName(checkNull(String.valueOf(encashQueryObj[e][2])));\r\n\t\t\t\t\t\t\t\tbean.setAvailableBal(checkNull(String.valueOf(encashQueryObj[e][3])));\r\n\t\t\t\t\t\t\t\tbean.setNoOfencashLeave(String.valueOf(encashQueryObj[e][4]));\r\n\t\t\t\t\t\t\t\tbean.setLeaveCode(checkNull(String.valueOf(encashQueryObj[e][5])));\r\n\t\t\t\t\t\t\t\tbean.setEncashFormula(checkNull(String.valueOf(encashQueryObj[e][6])));\r\n\t\t\t\t\t\t\t\tbean.setEmployeeId(checkNull(String.valueOf(encashQueryObj[e][7])));\r\n\t\t\t\t\t\t\t\tbean.setHiddenEncashDays(\"0\");\r\n\t\t\t\t\t\t\t\tbean.setCurrentBal(checkNull(String.valueOf(encashQueryObj[e][3])));\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\tdouble amount = 0;\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tamount = Utility.expressionEvaluate(new Utility()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.generateFormula(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString.valueOf(encashQueryObj[e][7]),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString.valueOf(encashQueryObj[e][6]),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext, session));\r\n\t\t\t\t\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tlogger.info(\"Value of amount \"\r\n\t\t\t\t\t\t\t\t\t\t+ amount);\r\n\t\t\t\t\t\t\t\tbean.setAmtPerDay(String.valueOf((amount)));\r\n\t\t\t\t\t\t\t\tdouble totAmt = 0;\r\n\t\t\t\t\t\t\t\tdouble noOfEncashLeave = Double\r\n\t\t\t\t\t\t\t\t\t\t.parseDouble(String.valueOf(String\r\n\t\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][4])));\r\n\t\t\t\t\t\t\t\tlogger.info(\"Value of noOfEncashLeave \"\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ noOfEncashLeave);\r\n\r\n\t\t\t\t\t\t\t\ttotAmt = (amount) * noOfEncashLeave;\r\n\r\n\t\t\t\t\t\t\t\tlogger.info(\"Value of totAmt \"\r\n\t\t\t\t\t\t\t\t\t\t+ totAmt);\r\n\t\t\t\t\t\t\t\tbean.setEncashAmount(formatter.format(Double.parseDouble(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t.valueOf(Math.round(totAmt))))));\r\n\t\t\t\t\t\t\t\tbean.setEmpGender(String.valueOf(encashQueryObj[e][8]));\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(leaveEncashProcess.getDeductIncomeTax().equals(\"true\")){\r\n\t\t\t\t\t\t\t\t\tempObj[0][1] = Math.round(totAmt);\r\n\t\t\t\t\t\t\t\t\tempObj[0][2] = String.valueOf(encashQueryObj[e][8]);\r\n\t\t\t\t\t\t\t\t\temployeeTaxCalculation.initiate(context, session);\r\n\t\t\t\t\t\t\t\t\tObject[][] empTdsObject = employeeTaxCalculation.getEmpSlabTaxAmount(empObj,fromYear,toYear);\r\n\t\t\t\t\t\t\t\t\tif(empTdsObject != null && empTdsObject.length > 0 && list != null){\r\n\t\t\t\t\t\t\t\t\t\tbean.setNetAmount(formatter.format(Double.parseDouble((empTdsObject[0][1]).toString())));\r\n\t\t\t\t\t\t\t\t\t\tbean.setTds(formatter.format(Double.parseDouble((empTdsObject[0][2]).toString())));\r\n\t\t\t\t\t\t\t\t\t\tbean.setDeductIncomeTax(\"true\");\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\tbean.setNetAmount(\"0.00\");\r\n\t\t\t\t\t\t\t\t\tbean.setTds(\"0.00\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tlist.add(bean);\r\n\t\t\t\t\t\t\t\ttotalEncashAmt = totalEncashAmt + totAmt;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tleaveEncashProcess.setList(list);\r\n\t\t\t\tleaveEncashProcess.setTotalEncashAmt(formatter.format(Double.parseDouble(String.valueOf(totalEncashAmt))));\r\n\t\t\t}\r\n\r\n\t\t\tString delTempQueryAfter = \" DELETE FROM HRMS_LEAVE_POLICY_TEMP \";\r\n\t\t\tgetSqlModel().singleExecute(delTempQueryAfter);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "private static Map<String, Object> storePaymentApplication(Delegator delegator, GenericValue paymentApplication, Locale locale) {\n Map<String, Object> results = ServiceUtil.returnSuccess(UtilProperties.getMessage(RESOURCE,\n \"AccountingSuccessful\", locale));\n boolean debug = true;\n if (debug) {\n Debug.logInfo(\"Start updating the paymentApplication table \", MODULE);\n }\n\n if (DECIMALS == -1 || ROUNDING == null) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingAritmeticPropertiesNotConfigured\", locale));\n }\n\n // check if a record already exists with this data\n List<GenericValue> checkAppls = null;\n try {\n checkAppls = EntityQuery.use(delegator).from(\"PaymentApplication\")\n .where(\"invoiceId\", paymentApplication.get(\"invoiceId\"),\n \"invoiceItemSeqId\", paymentApplication.get(\"invoiceItemSeqId\"),\n \"billingAccountId\", paymentApplication.get(\"billingAccountId\"),\n \"paymentId\", paymentApplication.get(\"paymentId\"),\n \"toPaymentId\", paymentApplication.get(\"toPaymentId\"),\n \"taxAuthGeoId\", paymentApplication.get(\"taxAuthGeoId\"))\n .queryList();\n } catch (GenericEntityException e) {\n return ServiceUtil.returnError(e.getMessage());\n }\n if (!checkAppls.isEmpty()) {\n if (debug) {\n Debug.logInfo(checkAppls.size() + \" records already exist\", MODULE);\n }\n // 1 record exists just update and if different ID delete other record and add together.\n GenericValue checkAppl = checkAppls.get(0);\n // if new record add to the already existing one.\n if (paymentApplication.get(\"paymentApplicationId\") == null) {\n // add 2 amounts together\n checkAppl.set(\"amountApplied\", paymentApplication.getBigDecimal(\"amountApplied\")\n .add(checkAppl.getBigDecimal(\"amountApplied\")).setScale(DECIMALS, ROUNDING));\n if (debug) {\n Debug.logInfo(\"Update paymentApplication record: \" + checkAppl.getString(\"paymentApplicationId\") + \" with appliedAmount:\"\n + checkAppl.getBigDecimal(\"amountApplied\"), MODULE);\n }\n try {\n checkAppl.store();\n } catch (GenericEntityException e) {\n return ServiceUtil.returnError(e.getMessage());\n }\n } else if (paymentApplication.getString(\"paymentApplicationId\").equals(checkAppl.getString(\"paymentApplicationId\"))) {\n // update existing record in-place\n checkAppl.set(\"amountApplied\", paymentApplication.getBigDecimal(\"amountApplied\"));\n if (debug) {\n Debug.logInfo(\"Update paymentApplication record: \" + checkAppl.getString(\"paymentApplicationId\") + \" with appliedAmount:\"\n + checkAppl.getBigDecimal(\"amountApplied\"), MODULE);\n }\n try {\n checkAppl.store();\n } catch (GenericEntityException e) {\n return ServiceUtil.returnError(e.getMessage());\n }\n } else { // two existing records, an updated one added to the existing one\n // add 2 amounts together\n checkAppl.set(\"amountApplied\", paymentApplication.getBigDecimal(\"amountApplied\")\n .add(checkAppl.getBigDecimal(\"amountApplied\")).setScale(DECIMALS, ROUNDING));\n // delete paymentApplication record and update the checkAppls one.\n if (debug) {\n Debug.logInfo(\"Delete paymentApplication record: \" + paymentApplication.getString(\"paymentApplicationId\") + \" with \"\n + \"appliedAmount:\" + paymentApplication.getBigDecimal(\"amountApplied\"), MODULE);\n }\n try {\n paymentApplication.remove();\n } catch (GenericEntityException e) {\n return ServiceUtil.returnError(e.getMessage());\n }\n // update amount existing record\n if (debug) {\n Debug.logInfo(\"Update paymentApplication record: \" + checkAppl.getString(\"paymentApplicationId\") + \" with appliedAmount:\"\n + checkAppl.getBigDecimal(\"amountApplied\"), MODULE);\n }\n try {\n checkAppl.store();\n } catch (GenericEntityException e) {\n return ServiceUtil.returnError(e.getMessage());\n }\n }\n } else {\n if (debug) {\n Debug.logInfo(\"No records found with paymentId, invoiceid..etc probaly changed one of them...\", MODULE);\n }\n // create record if ID null;\n if (paymentApplication.get(\"paymentApplicationId\") == null) {\n paymentApplication.set(\"paymentApplicationId\", delegator.getNextSeqId(\"PaymentApplication\"));\n if (debug) {\n Debug.logInfo(\"Create new paymentAppication record: \" + paymentApplication.getString(\"paymentApplicationId\") + \" with \"\n + \"appliedAmount:\" + paymentApplication.getBigDecimal(\"amountApplied\"), MODULE);\n }\n try {\n paymentApplication.create();\n } catch (GenericEntityException e) {\n return ServiceUtil.returnError(e.getMessage());\n }\n } else {\n // update existing record (could not be found because a non existing combination of paymentId/invoiceId/invoiceSeqId/ etc... was\n // provided\n if (debug) {\n Debug.logInfo(\"Update existing paymentApplication record: \" + paymentApplication.getString(\"paymentApplicationId\") + \" with \"\n + \"appliedAmount:\" + paymentApplication.getBigDecimal(\"amountApplied\"), MODULE);\n }\n try {\n paymentApplication.store();\n } catch (GenericEntityException e) {\n return ServiceUtil.returnError(e.getMessage());\n }\n }\n }\n return results;\n }", "int updateByPrimaryKey(PensionRoleMenu record);", "public boolean addEmployee(String[] srNo, String[] empToken,\r\n\t\t\tString[] employeeId, String[] empName, String[] leaveCode,\r\n\t\t\tString[] leaveName, String[] availableBal,\r\n\t\t\tString[] noOfencashLeave, String[] encashFormula,\r\n\t\t\tString[] encashAmount, String[] amtPerDay, String[] oldEncashDays,\r\n\t\t\tString[] currentBal, String[] addFlagItt, LeaveEncashmentProcess leaveEncashProcess,\r\n\t\t\tString[] tds, String[] netAmount, String[] gender) {\n\t\tObject[][] encashQueryObj = null;\r\n\t\tArrayList list = new ArrayList();\r\n\t\tboolean result = false;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tString policyCode = getLeavePolicyCode(leaveEncashProcess\r\n\t\t\t\t\t.getEmployeeCode());\r\n\t\t\tdouble totalEncashAmt = 0.0d;\r\n\t\t\tif(encashAmount != null && encashAmount.length > 0){\r\n\t\t\t\tfor (int i = 0; i < encashAmount.length; i++) {\r\n\t\t\t\t\ttotalEncashAmt = totalEncashAmt + Double.parseDouble(String.valueOf(encashAmount[i]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (policyCode != null && policyCode.length() > 0) {\r\n\t\t\t\tString encashQuery = \" SELECT NVL(HRMS_EMP_OFFC.EMP_TOKEN,' '),NVL(HRMS_EMP_OFFC.EMP_FNAME,' ')||' '||NVL(HRMS_EMP_OFFC.EMP_MNAME,' ')||' '||NVL(HRMS_EMP_OFFC.EMP_LNAME,' ') NAME,TO_CHAR(LEAVE_NAME) ,NVL(LEAVE_CLOSING_BALANCE,0) AS AVAILABLE_BALANCE, \"\r\n\t\t\t\t\t\t+ \" NVL(LEAVE_CLOSING_BALANCE,0)-\"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getGreaterEncashBal()\r\n\t\t\t\t\t\t+ \" ENCASH_BAL,HRMS_LEAVE.LEAVE_ID, \"\r\n\t\t\t\t\t\t+ \" HRMS_LEAVE_POLICY_DTL.LEAVE_ENC_FORMULA ,HRMS_EMP_OFFC.EMP_ID, NVL(HRMS_EMP_OFFC.EMP_GENDER,'') \"\r\n\t\t\t\t\t\t+ \" FROM HRMS_LEAVE \"\r\n\t\t\t\t\t\t+ \" LEFT JOIN HRMS_LEAVE_BALANCE ON(HRMS_LEAVE.LEAVE_ID=HRMS_LEAVE_BALANCE.LEAVE_CODE AND EMP_ID =\"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getEmployeeCode()\r\n\t\t\t\t\t\t+ \") \"\r\n\t\t\t\t\t\t+ \" LEFT JOIN HRMS_EMP_OFFC ON(HRMS_LEAVE_BALANCE.EMP_ID=HRMS_EMP_OFFC.EMP_ID) \"\r\n\t\t\t\t\t\t+ \" INNER JOIN HRMS_LEAVE_POLICY_DTL ON(HRMS_LEAVE_POLICY_DTL.LEAVE_CODE=HRMS_LEAVE_BALANCE.LEAVE_CODE \"\r\n\t\t\t\t\t\t+ \" AND LEAVE_APPLICABLE='Y' AND LEAVE_ENC_FLAG='Y'AND HRMS_LEAVE_POLICY_DTL.LEAVE_POLICY_CODE=\"\r\n\t\t\t\t\t\t+ policyCode\r\n\t\t\t\t\t\t+ \")\"\r\n\t\t\t\t\t\t+ \" AND HRMS_LEAVE_BALANCE.LEAVE_CLOSING_BALANCE >\"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getGreaterEncashBal()\r\n\t\t\t\t\t\t+ \" \"\r\n\t\t\t\t\t\t+ \" AND HRMS_LEAVE_BALANCE.LEAVE_CODE IN(\"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getLevCode()\r\n\t\t\t\t\t\t+ \") AND LEAVE_ENC_FORMULA IS NOT NULL ORDER BY LEAVE_ID \";\r\n\r\n\t\t\t\tencashQueryObj = getSqlModel().getSingleResult(encashQuery);\r\n\r\n\t\t\t\tLeaveEncashmentProcess bean = null;\r\n\r\n\t\t\t\tint dtlCode = 0;\r\n\r\n\t\t\t\tif (encashQueryObj != null && encashQueryObj.length > 0) {\r\n\t\t\t\t\tArrayList List = null;\r\n\t\t\t\t\tList = displayNewValue(srNo, empToken,\r\n\t\t\t\t\t\t\temployeeId, empName, leaveCode, leaveName,\r\n\t\t\t\t\t\t\tavailableBal, noOfencashLeave, encashFormula,\r\n\t\t\t\t\t\t\tencashAmount, amtPerDay, oldEncashDays,currentBal,addFlagItt,\r\n\t\t\t\t\t\t\tleaveEncashProcess, tds, netAmount, gender);\r\n\t\t\t\t\tfor (int e = 0; e < encashQueryObj.length; e++) {\r\n\r\n\t\t\t\t\t\tresult = true;\r\n\t\t\t\t\t\tbean = new LeaveEncashmentProcess();\r\n\t\t\t\t\t\tbean.setEmpToken(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][0])));\r\n\t\t\t\t\t\tbean.setEmpName(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][1])));\r\n\t\t\t\t\t\tbean.setLeaveName(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][2])));\r\n\t\t\t\t\t\tbean.setAvailableBal(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][3])));\r\n\t\t\t\t\t\tbean.setNoOfencashLeave(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][4]));\r\n\t\t\t\t\t\tbean.setLeaveCode(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][5])));\r\n\t\t\t\t\t\tbean.setEncashFormula(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][6])));\r\n\t\t\t\t\t\tbean.setEmployeeId(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][7])));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tbean.setEmpGender(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][8])));\r\n\t\t\t\t\t\tbean.setAddFlagItt(\"Y\");\r\n\t\t\t\t\t\tbean.setHiddenEncashDays(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][4]));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tbean.setCurrentBal(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][3])));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdtlCode++;\r\n\r\n\t\t\t\t\t\tdouble amount = 0;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tamount = Utility.expressionEvaluate(new Utility()\r\n\t\t\t\t\t\t\t\t\t.generateFormula(leaveEncashProcess\r\n\t\t\t\t\t\t\t\t\t\t\t.getEmployeeCode(), String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][6]),\r\n\t\t\t\t\t\t\t\t\t\t\tcontext, session));\r\n\t\t\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tlogger\r\n\t\t\t\t\t\t\t\t.info(\"Value of amount \"\r\n\t\t\t\t\t\t\t\t\t\t+ amount);\r\n\t\t\t\t\t\tbean.setAmtPerDay(String.valueOf((amount)));\r\n\t\t\t\t\t\tdouble totAmt = 0;\r\n\t\t\t\t\t\tdouble noOfEncashLeave = Double.parseDouble(String\r\n\t\t\t\t\t\t\t\t.valueOf(String.valueOf(encashQueryObj[e][4])));\r\n\t\t\t\t\t\tlogger.info(\"Value of noOfEncashLeave \"\r\n\t\t\t\t\t\t\t\t+ noOfEncashLeave);\r\n\r\n\t\t\t\t\t\ttotAmt = (amount) * noOfEncashLeave;\r\n\r\n\t\t\t\t\t\tlogger\r\n\t\t\t\t\t\t\t\t.info(\"Value of totAmt \"\r\n\t\t\t\t\t\t\t\t\t\t+ totAmt);\r\n\t\t\t\t\t\tbean.setEncashAmount(checkNull(String.valueOf(Math\r\n\t\t\t\t\t\t\t\t.round(totAmt))));\r\n\t\t\t\t\t\t// list.add(bean);\r\n\t\t\t\t\t//}\r\n\t\t\t\t\t\ttotalEncashAmt = totalEncashAmt + totAmt;\r\n\t\t\t\t\t\tif(leaveEncashProcess.getDeductIncomeTax().equals(\"true\")){\r\n\t\t\t\t\t\t\tObject[][] empObj = new Object[1][3];\r\n\t\t\t\t\t\t\tString month = leaveEncashProcess.getSalarymonth();\r\n\t\t\t\t\t\t\tString fromYear = leaveEncashProcess.getSalaryyear();\r\n\t\t\t\t\t\t\tString toYear = \"\";\r\n\t\t\t\t\t\t\tif(Integer.parseInt(month) < 4){\r\n\t\t\t\t\t\t\t\ttoYear = fromYear;\r\n\t\t\t\t\t\t\t\tfromYear = String.valueOf((Integer.parseInt(fromYear) - 1));\r\n\t\t\t\t\t\t\t} else{\r\n\t\t\t\t\t\t\t\ttoYear = String.valueOf((Integer.parseInt(fromYear) + 1));\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tempObj[0][0] = String.valueOf(checkNull(String.valueOf(encashQueryObj[e][7])));\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tempObj[0][1] = Math.round(totAmt);\r\n\t\t\t\t\t\t\tempObj[0][2] = String.valueOf(encashQueryObj[e][8]);\r\n\t\t\t\t\t\t\temployeeTaxCalculation.initiate(context, session);\r\n\t\t\t\t\t\t\tObject[][] empTdsObject = employeeTaxCalculation.getEmpSlabTaxAmount(empObj,fromYear,toYear);\r\n\t\t\t\t\t\t\tif(empTdsObject != null && empTdsObject.length > 0 && list != null){\r\n\t\t\t\t\t\t\t\tbean.setNetAmount(formatter.format(Double.parseDouble((empTdsObject[0][1]).toString())));\r\n\t\t\t\t\t\t\t\tbean.setTds(formatter.format(Double.parseDouble((empTdsObject[0][2]).toString())));\r\n\t\t\t\t\t\t\t\tbean.setDeductIncomeTax(\"true\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tbean.setNetAmount(\"0.00\");\r\n\t\t\t\t\t\t\tbean.setTds(\"0.00\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tbean.setSrNo(String.valueOf(List.size() + 1));// sr no\r\n\r\n\t\t\t\t\tList.add(bean);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// leaveList.add(uploadLinks);\r\n\t\t\t\t\tleaveEncashProcess.setList(List);\r\n\t\t\t\t\tleaveEncashProcess.setTotalEncashAmt(formatter.format(Double.parseDouble(checkNull(String.valueOf(totalEncashAmt)))));\r\n\r\n\t\t\t\t\t// leaveEncashProcess.setList(list);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}", "int updateByPrimaryKeySelective(CompanyExtend record);", "public static String approveDeny(int leave_id,int empId,EnumLeaveStatus l_status) {\r\n Leave ld = Leave.listById(leave_id);\r\n String s=null;\r\n if (ld != null) {\r\n int noOfDays = ld.getNoLeaveDays();\r\n int emplId = ld.getEmployeeId();\r\n int empdId = Leave.showManager(leave_id);\r\n String dbStatus = null;\r\n System.out.println(l_status);\r\n System.out.println(ld.getLeaveStatus());\r\n if (empId != empdId) {\r\n s=\"You are not authorised to access this employee.\";\r\n return s;\r\n }\r\n if (l_status.equals(\"approved\") && ld.getLeaveStatus().equals(l_status.pending)) {\r\n dbStatus = \"approved\";\r\n edao().decrement(emplId, noOfDays);\r\n dao().comment( dbStatus, leave_id);\r\n s=\"Leave Approved Successfully\";\r\n \r\n } else if (l_status.equals(\"denied\") && ld.getLeaveStatus().equals(l_status.approved)) {\r\n dbStatus = \"denied\";\r\n edao().increment(emplId, noOfDays);\r\n dao().comment( dbStatus, leave_id);\r\n s=\"Leave Rejected\";\r\n } else if (l_status.equals(\"approved\") && ld.getLeaveStatus().equals(l_status.denied)) {\r\n dbStatus = \"approved\";\r\n edao().decrement(emplId, noOfDays);\r\n dao().comment(dbStatus, leave_id);\r\n s=\"Leave Approved Successfully\";\r\n } else {\r\n if (l_status.equals(\"denied\") && ld.getLeaveStatus().equals(l_status.pending)) {\r\n dbStatus = \"denied\";\r\n edao().increment(emplId, noOfDays);\r\n dao().comment( dbStatus, leave_id);\r\n s=\"Leave Rejected\";\r\n } else {\r\n s=\"Already on given status\";\r\n }\r\n }\r\n } else {\r\n s=\"Invalid LeaveId\";\r\n }\r\n return s;\r\n }", "@Update({ \"update iiot_app_list\", \"set app_name = #{appName,jdbcType=VARCHAR},\", \"node = #{node,jdbcType=VARCHAR},\",\n\t\t\t\"status = #{status,jdbcType=INTEGER},\", \"restart_times = #{restartTimes,jdbcType=CHAR},\",\n\t\t\t\"up_time = #{upTime,jdbcType=VARCHAR},\", \"template = #{template,jdbcType=VARCHAR},\",\n\t\t\t\"owner = #{owner,jdbcType=VARCHAR},\", \"note = #{note,jdbcType=VARCHAR},\",\n\t\t\t\"rest3 = #{rest3,jdbcType=VARCHAR},\", \"rest4 = #{rest4,jdbcType=VARCHAR},\",\n\t\t\t\"rest5 = #{rest5,jdbcType=VARCHAR},\", \"create_time = #{createTime,jdbcType=TIMESTAMP},\",\n\t\t\t\"uuid = #{uuid,jdbcType=CHAR}\", \"where app_id = #{appId,jdbcType=INTEGER}\" })\n\tint updateByPrimaryKey(IiotAppList record);", "int updateByPrimaryKey(ErpOaLicKey record);", "public void syncApprovedApplicantsFromErp() {\n\t\tList<String> allErpCodes = applicationDao.getAllProcessedApplicationFileNos();\r\n\t\t// List<String> allErpCodes = Arrays.asList(\"C/20293\", \"C/20292\",\r\n\t\t// \"C/20390\");\r\n\t\tList<ApplicationSyncPayLoad> syncedApplicants = new ArrayList<>();\r\n\t\tint successCounter = 0;\r\n\t\tint totalToBeSynced = 0;\r\n\t\tif (!allErpCodes.isEmpty()) {\r\n\t\t\ttotalToBeSynced = allErpCodes.size();\r\n\t\t\tJSONArray mJSONArray = new JSONArray(allErpCodes);\r\n\r\n\t\t\t// Send this to ERP\r\n\t\t\ttry {\r\n\t\t\t\tString results = postErpCodesToERP(mJSONArray);\r\n\t\t\t\tif (results.equals(\"null\")) {\r\n\t\t\t\t\tlogger.error(\" ===>>><<<< === NO REPLY FROM ERP ===>><<<>>== \");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tJSONArray jo = null;\r\n\t\t\t\t\tjo = new JSONArray(results);\r\n\t\t\t\t\tfor (int i = 0; i < jo.length(); i++) {\r\n\t\t\t\t\t\tJSONObject jObject = null;\r\n\t\t\t\t\t\tjObject = jo.getJSONObject(i);\r\n\t\t\t\t\t\tApplicationSyncPayLoad syncPayLoad = new ApplicationSyncPayLoad();\r\n\t\t\t\t\t\tsyncPayLoad.setApplicationNo_(jObject.getString(\"Application No_\"));\r\n\t\t\t\t\t\tsyncPayLoad.setEmail(jObject.getString(\"email\"));\r\n\t\t\t\t\t\tsyncPayLoad.setReg_no(jObject.getString(\"reg_no\"));\r\n\t\t\t\t\t\tsyncedApplicants.add(syncPayLoad);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfor (ApplicationSyncPayLoad appSync : syncedApplicants) {\r\n\t\t\t\t\t\t// Update this Applications\r\n\t\t\t\t\t\tlogger.info(\"Finding application:\" + appSync.getApplicationNo_());\r\n\t\t\t\t\t\tList<ApplicationFormHeader> applications = applicationDao\r\n\t\t\t\t\t\t\t\t.findByErpCode(appSync.getApplicationNo_());\r\n\r\n\t\t\t\t\t\tApplicationFormHeader application = null;\r\n\t\t\t\t\t\tif (applications.size() > 0) {\r\n\t\t\t\t\t\t\tapplication = applications.get(0);\r\n\t\t\t\t\t\t\tif (application != null) {\r\n\t\t\t\t\t\t\t\t// Find the User and Member Object and User\r\n\t\t\t\t\t\t\t\tif (application.getUserRefId() != null) {\r\n\t\t\t\t\t\t\t\t\tlogger.info(\"marking this application as approved:\" + application.getRefId());\r\n\t\t\t\t\t\t\t\t\tapplication.setApplicationStatus(ApplicationStatus.APPROVED);\r\n\t\t\t\t\t\t\t\t\tUser user = userDao.findByUserId(application.getUserRefId(), false);\r\n\t\t\t\t\t\t\t\t\tMember m = null;\r\n\t\t\t\t\t\t\t\t\tif (user != null) {\r\n\t\t\t\t\t\t\t\t\t\tuser.setMemberNo(appSync.getReg_no());\r\n\t\t\t\t\t\t\t\t\t\tuserDao.deleteAllRolesForCurrentUser(user.getId());\r\n\t\t\t\t\t\t\t\t\t\tRole role = roleDao.getByName(\"MEMBER\");\r\n\t\t\t\t\t\t\t\t\t\tif (role != null) {\r\n\t\t\t\t\t\t\t\t\t\t\tuser.addRole(role);\r\n\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Changing the user role from basic_member to member.\");\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (user.getMember() != null) {\r\n\t\t\t\t\t\t\t\t\t\t\tm = user.getMember();\r\n\t\t\t\t\t\t\t\t\t\t\tm.setMemberNo(appSync.getReg_no());\r\n\t\t\t\t\t\t\t\t\t\t\tm.setRegistrationDate(application.getCreated());\r\n\t\t\t\t\t\t\t\t\t\t\tm.setUserRefId(user.getRefId());\r\n\t\t\t\t\t\t\t\t\t\t\tm.setMemberShipStatus(MembershipStatus.ACTIVE);\r\n\t\t\t\t\t\t\t\t\t\t\tm.setMemberQrCode(m.getRefId());\r\n\t\t\t\t\t\t\t\t\t\t\tuserDao.save(m);\r\n\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Updating member record.\");\r\n\t\t\t\t\t\t\t\t\t\t\t// Save all this parameters\r\n\t\t\t\t\t\t\t\t\t\t\t// Applicant, Member, User\r\n\t\t\t\t\t\t\t\t\t\t\tapplicationDao.save(application);\r\n\t\t\t\t\t\t\t\t\t\t\tuserDao.save(user);\r\n\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Updating user record.\");\r\n\t\t\t\t\t\t\t\t\t\t\tsuccessCounter = successCounter + 1;\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Member Record is Null for user with memberNo:\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ user.getMemberNo()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \". Checking if the member record exist or create a new record.\");\r\n\t\t\t\t\t\t\t\t\t\t\t// Check if there was a previous\r\n\t\t\t\t\t\t\t\t\t\t\t// member\r\n\t\t\t\t\t\t\t\t\t\t\t// Record created\r\n\t\t\t\t\t\t\t\t\t\t\tMember member = null;\r\n\t\t\t\t\t\t\t\t\t\t\tmember = memberDao.findByMemberNo(appSync.getReg_no());\r\n\t\t\t\t\t\t\t\t\t\t\tif (member == null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tmember = new Member();\r\n\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Member doesn't exist. Creating new MemberRecord\");\r\n\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Member already exist. Just ammending it.\");\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tmember.setMemberNo(appSync.getReg_no());\r\n\t\t\t\t\t\t\t\t\t\t\tmember.setRegistrationDate(application.getCreated());\r\n\t\t\t\t\t\t\t\t\t\t\tmember.setUserRefId(user.getRefId());\r\n\t\t\t\t\t\t\t\t\t\t\tmember.setMemberShipStatus(MembershipStatus.ACTIVE);\r\n\t\t\t\t\t\t\t\t\t\t\tmember.setMemberQrCode(member.getRefId());\r\n\t\t\t\t\t\t\t\t\t\t\tuserDao.save(member);\r\n\t\t\t\t\t\t\t\t\t\t\tuser.setMember(member);\r\n\t\t\t\t\t\t\t\t\t\t\t// Save all this parameters\r\n\t\t\t\t\t\t\t\t\t\t\t// Applicant, Member, User\r\n\t\t\t\t\t\t\t\t\t\t\tapplicationDao.save(application);\r\n\t\t\t\t\t\t\t\t\t\t\tuserDao.save(user);\r\n\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Updating user record.\");\r\n\t\t\t\t\t\t\t\t\t\t\tsuccessCounter = successCounter + 1;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tSystem.err.println(\"Total To Be Synced:\" + totalToBeSynced + \"\\n\");\r\n\t\t\t\t\tSystem.err.println(\"Total Success:\" + successCounter + \"\\n\");\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t} catch (URISyntaxException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (ParseException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (JSONException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean InsertPolicy(String appid, String category, String key, String value, long dueDate) {\n \tif(IS_DEBUG) Log.d(TAG,\"[InsertPolicy] appid: \"+appid+\", category : \"+category+\", key: \"+key+\", value: \"+value+\", due date:\"+dueDate);\n boolean bChanged = false;\n if(!TextUtils.isEmpty(appid) && !TextUtils.isEmpty(category) \n && !TextUtils.isEmpty(key) && !TextUtils.isEmpty(value)){\n \n final String whereClause = POLICY_APPID + \"=?\" + \" AND \" + POLICY_CATEGORY + \"=?\"\n + \" AND \" + POLICY_KEY + \"=?\";\n final String[] whereArgs = new String[]{appid, category, key};\n \n SQLiteDatabase db = null;\n Cursor c = null;\n try {\n db = getWritableDatabase();\n c = db.query(POLICY_TABLE_NAME, \n new String []{POLICY_ID, POLICY_VALUE, POLICY_DUE_DATE}, \n whereClause, \n whereArgs, \n null, null, null);\n // for existed policy, update the value and due date, therefore no need to update default value\n if(c != null && c.getCount() > 0 && c.moveToFirst()) {\n \tif(IS_DEBUG) Log.d(\"cursor[0]: \"+c.getInt(0)+\", cursor[1]: \"+c.getString(1)+\", cursor[2]: \"+c.getLong(2));\n //Has the previous SIE setting, no need to update\n if(dueDate==-1) bChanged=false;\n else if(!value.equals(c.getString(1)) || dueDate != c.getLong(2)) {\n int id = c.getInt(0);\n ContentValues values = new ContentValues();\n values.put(POLICY_VALUE, value);\n values.put(POLICY_DUE_DATE, dueDate);\n db.update(POLICY_TABLE_NAME, values, POLICY_ID+\"=?\", new String []{Integer.toString(id)});\n bChanged = true;\n }\n }\n else {\n // New policies,including those are default\n ContentValues values = new ContentValues();\n values.put(POLICY_APPID, appid);\n values.put(POLICY_CATEGORY, category);\n values.put(POLICY_KEY, key);\n values.put(POLICY_VALUE, value);\n values.put(POLICY_DUE_DATE, dueDate);\n // Default : values.put(POLICY_IS_DEFAULT,1)\n // Add one more column for default value\n if(dueDate==-1) //This is the default policy\n values.put(POLICY_DEFAULT_VALUE,value);\n db.insert(POLICY_TABLE_NAME, \"garbge\", values);\n bChanged = true;\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try{\n if(c != null){\n c.close();\n c = null;\n }\n if(db != null) {\n db.close();\n db = null;\n }\n } catch(Exception e) {}\n }\n }\n return bChanged;\n }", "private void createApplications(){\n Application application;\n Person applicant;\n Role role = roleRepository.findByName(\"applicant\");\n Status status = statusRepository.findByName(\"UNHANDLED\");\n java.sql.Date date = new java.sql.Date(Calendar.getInstance().getTime().getTime());\n\n for (Map.Entry<Long, Long> person : person.entrySet()){\n applicant = personRepository.findById(person.getValue());\n if(applicant.getUser().getRoles().contains(role)){\n Set<CompetenceProfile> competenceProfiles = new HashSet<>();\n Set<Availability> availabilities = new HashSet<>();\n for (Map.Entry<Long, Long> competenceProfile : competenceProfile.entrySet()){\n if(Objects.equals(competenceProfile.getValue(), person.getKey())){\n competenceProfiles.add(competenceProfileRepository.findById(competenceProfile.getKey()));\n }\n }\n for (Map.Entry<Long, Long> availabilitys : availability.entrySet()){\n if(Objects.equals(availabilitys.getValue(), person.getKey())){\n availabilities.add(availabilityRepository.findById(availabilitys.getKey()));\n }\n }\n application = applicationRepository.save(new Application(applicant, null, null, status, date));\n\n application = applicationRepository.findById(application.getId()).get(); //without re-finding this, the we get an optimistic locking error cause version changed within transaction. now new transaction starts and were fine\n application.setAvailabilities(availabilities);\n application.setCompetenceProfiles(competenceProfiles);\n applicationRepository.save(application);\n }\n }\n\n }", "public int Approvecomp(Long id) throws SQLException {\n\tLong idd=null;\r\n\trs=DbConnect.getStatement().executeQuery(\"select login_id from company where comp_id=\"+id+\"\");\r\n\tif(rs.next())\r\n\t{\r\n\t\tidd=rs.getLong(1);\r\n\t}\r\n\tSystem.out.println(idd);\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update login set status='approved' where login_id=\"+idd+\"\");\r\n\treturn i;\r\n\t\r\n}", "private void upgradeToDataApprovalWorkflows()\r\n {\r\n if ( executeSql( \"update dataset set approvedata = approvedata where datasetid < 0\" ) < 0 )\r\n {\r\n return; // Already converted because dataset.approvedata no longer exists.\r\n }\r\n\r\n executeSql( \"insert into dataapprovalworkflow ( workflowid, uid, created, lastupdated, name, periodtypeid, userid, publicaccess ) \"\r\n + \"select \" + statementBuilder.getAutoIncrementValue() + \", \" + statementBuilder.getUid() + \", now(), now(), ds.name, ds.periodtypeid, ds.userid, ds.publicaccess \"\r\n + \"from (select datasetid from dataset where approvedata = true union select distinct datasetid from dataapproval) as a \"\r\n + \"join dataset ds on ds.datasetid = a.datasetid\" );\r\n\r\n executeSql( \"insert into dataapprovalworkflowlevels (workflowid, dataapprovallevelid) \"\r\n + \"select w.workflowid, l.dataapprovallevelid from dataapprovalworkflow w \"\r\n + \"cross join dataapprovallevel l\" );\r\n\r\n executeSql( \"update dataset set workflowid = ( select w.workflowid from dataapprovalworkflow w where w.name = dataset.name)\" );\r\n executeSql( \"alter table dataset drop column approvedata cascade\" ); // Cascade to SQL Views, if any.\r\n\r\n executeSql( \"update dataapproval set workflowid = ( select ds.workflowid from dataset ds where ds.datasetid = dataapproval.datasetid)\" );\r\n executeSql( \"alter table dataapproval drop constraint dataapproval_unique_key\" );\r\n executeSql( \"alter table dataapproval drop column datasetid cascade\" ); // Cascade to SQL Views, if any.\r\n\r\n log.info( \"Added any workflows needed for approvble datasets and/or approved data.\" );\r\n }", "@Override\n\tpublic void updateComfirmPeo(Integer comfirm_peo, String bc_id) {\n\t\t\n\t}", "int updateByPrimaryKeySelective(DrpCommissionRule record);", "int updateByPrimaryKeySelective(ApplicationDO record);", "int updateByPrimaryKeySelective(PensionRoleMenu record);", "int updateByPrimaryKey(BusinessRepayment record);", "int updateByPrimaryKey(ActivityHongbaoPrize record);", "int updateByPrimaryKey(PaymentTrade record);", "int updateByPrimaryKey(BachAlarmRole record);", "int updateByPrimaryKeySelective(ErpOaLicKey record);", "int updateByPrimaryKeySelective(ActivityHongbaoPrize record);", "int updateByPrimaryKey(AccountPaymentMethodEntity record);", "int updateByPrimaryKeySelective(PaymentTrade record);", "int updateByPrimaryKey(ProEmployee record);", "public static String apply_for_leave(int empId,String start_date, String end_date, int no_ldays,String leave_type, String leave_reason)\r\n throws ParseException {\r\n String s=null;\r\n Employee e = Employee.listById(empId);\r\n if (e != null) {\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n Date leave_from = sdf.parse(start_date);\r\n Date leave_to = sdf.parse(end_date);\r\n Calendar start = Calendar.getInstance();\r\n start.setTime(leave_from);\r\n Calendar end = Calendar.getInstance();\r\n end.setTime(leave_to);\r\n int count = 0;\r\n for (Date date = start.getTime(); start.before(end); start.add(Calendar.DATE, 1), date = start.getTime()) {\r\n Calendar c = Calendar.getInstance();\r\n c.setTime(date);\r\n int dayOfWeek = c.get(Calendar.DAY_OF_WEEK);\r\n if (dayOfWeek == 1 || dayOfWeek == 7) {\r\n count++;\r\n }\r\n }\r\n System.out.println(count);\r\n long diff = leave_to.getTime() - leave_from.getTime();\r\n System.out.println(diff);\r\n long days = diff / (1000 * 60 * 60 * 24);\r\n Date today = new Date();\r\n String appliedOn = sdf.format(today);\r\n days = days + 1;\r\n long availBal = 0;\r\n long dif = 0;\r\n long updLeave = 0;\r\n String leaveStatus = null;\r\n // int overl = Leave.countNo(empId, start_date, end_date);\r\n availBal = e.getavailleaves();\r\n dif = availBal - days;\r\n updLeave = days - count;\r\n int bal = (int) updLeave;\r\n if (days <= 0) {\r\n s=\"Start Date Must be Greater than EndDate...\";\r\n } else if (dif < 0) {\r\n s=\"insufficient leav balance\";\r\n } else if (no_ldays != days) {\r\n s=\"NO Of Days Should be right\";\r\n } else if (leave_from.compareTo(sdf.parse(appliedOn)) < 0) {\r\n s=\"Start should be greater or equal to current date\";\r\n // } else if (overl > 0) {\r\n // s=\"already applied on given date\";\r\n } else {\r\n if (e.getMgr_id() == 0) {\r\n leaveStatus = \"APPROVED\";\r\n dao().apply_for_leave(empId, start_date, end_date, bal, leave_type, leaveStatus, leave_reason, appliedOn);\r\n s=\"Leave Applied Successfully...\";\r\n } else {\r\n leaveStatus = \"PENDING\";\r\n dao().apply_for_leave(empId, start_date, end_date, bal,\r\n leave_type, leaveStatus, leave_reason, appliedOn);\r\n edao().decrement(empId, bal);\r\n s = \"Leave Applied Successfully For \" + (days - count) + \" Days.\";\r\n }\r\n }\r\n } else {\r\n s=\"invalid employee\";\r\n }\r\n return s;\r\n }", "int updateByPrimaryKeySelective(SdkMobileVcode record);", "int updateByPrimaryKey(MedicalOrdersExecutePlan record);", "com.microsoft.schemas.crm._2011.contracts.ArrayOfAppointmentsToIgnore addNewAppointmentsToIgnore();", "public int Approvedbroker(Long id) throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"update login set userstatus='approved'where loginid=\"+id+\"\");\r\n\treturn i;\r\n}", "int updateByPrimaryKeySelective(SwmsStockOutRecordDetail record);", "int updateByPrimaryKeySelective(MedicalOrdersExecutePlan record);", "public void onClick(View v) {\n final ContentValues data = new ContentValues();\n final ContentValues data2 = new ContentValues();\n\n Intent intent_main_return = this.getIntent();\n final String table_name = intent_main_return.getExtras().getString(\"table\");\n final String table_date = intent_main_return.getExtras().getString(\"table_date\");\n bbb = intent_main_return.getExtras().getString(\"amount_column\");\n String s_r= null;\n String p=\"Present\";\n String a=\"Absent\";\n s=e1.getText().toString();\n\n assert table_date != null;\n s_r = table_date.replace(\"/\",\"_\");\n int date_col_index = Integer.parseInt(bbb);\n String where2 = \"id ='\"+s+\"' \" ;\n String where = \"name ='\"+s+\"' AND date ='\"+table_date+\"'\" ;\n\n int id=v.getId();\n\n switch(id) {\n case R.id.button22:\n\n if(e1 != null && s.length()>0){\n data.put(\"address\",p);\n dbx.update(table_name,data, where, null);\n\n for(int ll=1;ll<=date_col_index;ll++){\n String sss= s_r+\"__\"+ll;\n data2.put(\"'\"+sss+\"'\",p);\n db_net.update(table_name,data2, where2, null);\n }\n\n Toast.makeText(getBaseContext(),\"Roll no. \"+s+\" set to be Present\", Toast.LENGTH_LONG).show();\n }\n\n else\n {\n Toast.makeText(Edit_records.this,\"Please type roll no.\", Toast.LENGTH_SHORT).show();\n }\n\n break;\n\n case R.id.button23:\n\n if(e1 != null && s.length()>0){\n data.put(\"address\",a);\n dbx.update(table_name,data, where, null);\n\n for(int ll=1;ll<=date_col_index;ll++){\n String sss= s_r+\"__\"+ll;\n data2.put(\"'\"+sss+\"'\",a);\n db_net.update(table_name,data2, where2, null);\n }\n\n Toast.makeText(getBaseContext(),\"Roll no. \"+s+\" set to be Absent\", Toast.LENGTH_LONG).show();\n }\n\n else\n {\n Toast.makeText(Edit_records.this,\"Please type roll no.\", Toast.LENGTH_SHORT).show();\n }\n\n break;\n }\n\n }", "public int updateByPrimaryKey(AlManageOnAir record) {\r\n int rows = getSqlMapClientTemplate().update(\"AL_MANAGE_ON_AIR.ibatorgenerated_updateByPrimaryKey\", record);\r\n return rows;\r\n }", "int updateByPrimaryKeySelective(BachAlarmRole record);", "public int updateByPrimaryKeySelective(AlManageOnAir record) {\r\n int rows = getSqlMapClientTemplate().update(\"AL_MANAGE_ON_AIR.ibatorgenerated_updateByPrimaryKeySelective\", record);\r\n return rows;\r\n }", "int updateByPrimaryKeySelective(ProEmployee record);", "@Override\r\n\tpublic ArrayList<List<ConcurrentHashMap<String, Object>>> update(EmployeeLeaveTypes employeeLeaveTypes) {\n\t\treturn null;\r\n\t}", "int updateByPrimaryKey(ApplicationDO record);", "int updateByPrimaryKeySelective(SysCode record);", "int updateByPrimaryKey(CmGroupRelIndustry record);", "int updateByPrimaryKeySelective(ResumePractice record);", "int updateByPrimaryKey(SdkMobileVcode record);", "int updateByPrimaryKeySelective(AccessKeyRecordEntity record);", "int updateByPrimaryKey(AccessKeyRecordEntity record);", "int updateByPrimaryKey(BsUserRole record);", "void updatePurchaseOrderLinkedBoqStatus(long pohId);", "int updateByPrimaryKeySelective(MWeixinCodeDTO record);", "int updateByPrimaryKeySelective(BsUserRole record);", "int updateByPrimaryKey(DrpCommissionRule record);", "public boolean approveAppointment() {\n\t\tSet <String> set=(HealthCareDAO.map).keySet();\r\n\t\tint count=1;\r\n\t\tfor(String s:set)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"You have a center \"+map.get(s).getCenterName() +\"--\"+\"Center and id is \"+s);\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\tSystem.out.println(\"Enter Center id :\");\r\n\t\tString str=scan.next();\r\n\t\tDiagnoisticCenter center=HealthCareDAO.map.get(str); //get Diagonistic object of given key \r\n\t\tList<Appointment> l=center.getAppointmentList();\r\n\t\t//System.out.println(l);\r\n\t\tint y=1;\r\n\t\tfor(Appointment a:l)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Enter Approval or disapproval\");\r\n\t\tboolean decision=scan.nextBoolean()\t;\r\n\t\t\ta.setApproved(decision);\r\n\t\t\tif(a.isApproved()==true)\r\n\t\t\t{\tSystem.out.println(\"Appointment id number \"+a.getAppointmentid()+\"---is Approved\");}\r\n\t\t\telse {System.out.println(\"Appointment id number \"+a.getAppointmentid()+\"---is not Approved\");}\r\n\t\t\ty++;\r\n\t\t\tif(y>3)\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t}\r\n\t\tcenter.setAppointmentList(l);\r\n\t\tSystem.out.println(\"Appointment List count :\"+l.size());\r\n\t\t\r\n\t\treturn false;\r\n\t}", "int updateByPrimaryKeySelective(AdminTab record);", "int updateByPrimaryKeySelective(DepAcctDO record);", "int updateByPrimaryKey(ParkCurrent record);", "int updateByPrimaryKey(FinancialManagement record);", "int updateByPrimaryKey(SysRoleFunction record);", "int updateByPrimaryKey(SellType record);", "int updateByPrimaryKeySelective(SsPaymentBillPerson record);", "int updateByPrimaryKey(ec_environment record);", "public int approve_reject_Request(int approval_status, String approvedBy, String approverComment, Timestamp time_approved,String social_Email)\r\n\t{\r\n\t\tConnection conn=getConnection();\r\n\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tint result=0;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tString query = \"update SOCIAL_EAI_APPROVAL set (APPROVAL_STATUS,APPROVED_BY,APPROVER_COMMENT,TIME_APPROVED)=(?,?,?,?) where REQ_SOCIAL_EMAIL=?\";\r\n\t\t\tpstmt = conn.prepareStatement(query); \r\n\t\t\tpstmt.setInt(1,approval_status); \r\n\t\t\tpstmt.setString(2,approvedBy); \r\n\t\t\tpstmt.setString(3,approverComment);\r\n\t\t\tpstmt.setTimestamp(4,time_approved);\r\n\t\t\tpstmt.setString(5,social_Email);\r\n\r\n\t\t\tresult=pstmt.executeUpdate(); \r\n\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\r\n\t\t\tSystem.out.println(\"EXception:\");\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\r\n\r\n\t\treturn result;\r\n\t}", "int updateByPrimaryKey(SysCode record);", "int updateByPrimaryKeySelective(SmsEmployeeTeam record);", "int updateByPrimaryKeySelective(SysOrganization record);", "int updateByPrimaryKey(UmsMenu record);", "int updateByPrimaryKey(UserOperateProject record);", "int updateByPrimaryKeySelective(R_dept_trade record);", "int updateByPrimaryKeySelective(ShopAccount record);", "int updateByPrimaryKeySelective(TbInvCategory record);", "int updateByPrimaryKey(R_dept_trade record);", "int updateByPrimaryKey(SysRole record);", "int updateByPrimaryKeySelective(ec_environment record);", "public void setStatusToMerroy(VAppModel vapp, List<VAppModel> vAppModelList) {\n \t_LOG.info(\"setStatusToMerroy().......................\");\n String vappName = vapp.getName();\n _LOG.info(\"vappName ------------> \"+vappName);\n int i = 0;\n for (i = 0; i < vAppModelList.size(); i++) {\n if (vAppModelList.get(i).getName().equals(vappName)) {\n VAppModel vappFromServlet = vAppModelList.get(i);\n for (int j = 0; j < vapp.getVmModelList().size(); j++) {\n for (int k = 0; k < vappFromServlet.getVmModelList().size(); k++) {\n if (vapp.getVmModelList().get(j).getVmName().equals(\n vappFromServlet.getVmModelList().get(k).getVmName())) {\n \t_LOG.info(\"getVmName(); ----------> \"+vappFromServlet.getVmModelList().get(k).getVmName());\n vappFromServlet.getVmModelList().get(k).setVmConsole(\n vapp.getVmModelList().get(j).getVmConsole());\n vappFromServlet.getVmModelList().get(k).setVmRdp(vapp.getVmModelList().get(j).getVmRdp());\n \n _LOG.info(\"Final vmConsole --------> \"+vapp.getVmModelList().get(j).getVmConsole());\n _LOG.info(\"Final vmRdp -----------> \"+vapp.getVmModelList().get(j).getVmRdp());\n break;\n }\n }\n\n }\n break;\n }\n }\n }", "int updateByPrimaryKey(ResumePractice record);" ]
[ "0.84211814", "0.60841256", "0.58360153", "0.58166134", "0.56354785", "0.5615822", "0.5501015", "0.54624516", "0.53917503", "0.5378986", "0.53750384", "0.53539264", "0.53428626", "0.5338168", "0.53190005", "0.52996093", "0.51591086", "0.5149847", "0.5142345", "0.5107866", "0.50978243", "0.5092364", "0.5067209", "0.50469255", "0.50462943", "0.5042207", "0.5029999", "0.5020242", "0.5016487", "0.5010764", "0.50060606", "0.50046337", "0.49936247", "0.4954339", "0.49115634", "0.48969194", "0.489591", "0.48932385", "0.4872217", "0.48616526", "0.48602375", "0.48558187", "0.48275533", "0.48163384", "0.4812207", "0.48115203", "0.47945035", "0.47823218", "0.4780063", "0.4774254", "0.4773359", "0.47668144", "0.47650358", "0.47524717", "0.47502312", "0.4745395", "0.47446725", "0.47317496", "0.4722426", "0.4719686", "0.47140685", "0.47124588", "0.47110522", "0.4706383", "0.4706303", "0.46875414", "0.46856865", "0.46830592", "0.46813366", "0.46802244", "0.4679039", "0.46774086", "0.46771508", "0.46698254", "0.46692717", "0.4663106", "0.46628672", "0.4661803", "0.46613887", "0.46490562", "0.46367404", "0.46363583", "0.4632196", "0.4631951", "0.46308744", "0.46291015", "0.46277297", "0.46273825", "0.4623296", "0.46206698", "0.46151134", "0.46126568", "0.46098837", "0.4608517", "0.46049955", "0.46045426", "0.46032894", "0.45997268", "0.45917407", "0.45882976" ]
0.62615085
1
move Leave Applications(Approved and cancel leave) to KeyPayIntLeaveApplication table updateKeyPayIntLeaveAppTable(companyId);
@Override public void sendCancelledLeaveApp(Long companyId, Map<String, Long> leaveCategoryMap, String baseURL, String apiKey) { SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory(); setInternalProxy(requestFactory); Company companyVO = companyDAO.findById(companyId); // Find All Leave which is not send(Sync) to KeyPay List<KeyPayIntLeaveApplication> keyPayIntLeaveAppList = keyPayIntLeaveApplicationDAO .findByCondition( PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_SUCCESS, PayAsiaConstants.LEAVE_TRANSACTION_TYPE_LEAVE_CANCELLED, companyId); Map<String, String> empNumExternalIdMap = new HashMap<String, String>(); if (!keyPayIntLeaveAppList.isEmpty()) { HRISPreference hrisPreferenceVO = hrisPreferenceDAO .findByCompanyId(companyId); if (hrisPreferenceVO != null && hrisPreferenceVO.getExternalId() != null) { List<Object[]> keyPayEmpExternalIdList = getKeyPayExternalIdList( hrisPreferenceVO.getExternalId(), companyId, companyVO.getDateFormat(), null); for (Object[] extIdObj : keyPayEmpExternalIdList) { if (extIdObj != null && extIdObj[0] != null && extIdObj[1] != null) { empNumExternalIdMap.put(String.valueOf(extIdObj[1]), String.valueOf(extIdObj[0])); } } } for (KeyPayIntLeaveApplication keyPayIntLeaveApplication : keyPayIntLeaveAppList) { if (empNumExternalIdMap.get(keyPayIntLeaveApplication .getEmployeeNumber()) == null) { continue; } String leaveRequestId = ""; KeyPayIntLeaveApplication leaveApplication = keyPayIntLeaveApplicationDAO .findByLeaveAppId( companyId, keyPayIntLeaveApplication .getCancelLeaveApplicationId(), PayAsiaConstants.LEAVE_TRANSACTION_TYPE_LEAVE_CANCELLED); if (leaveApplication != null && leaveApplication.getExternalLeaveRequestId() != null) { leaveRequestId = String.valueOf(leaveApplication .getExternalLeaveRequestId()); } else { leaveRequestId = getLeaveRequestForEmployee( empNumExternalIdMap.get(keyPayIntLeaveApplication .getEmployeeNumber()), keyPayIntLeaveApplication, leaveCategoryMap, baseURL, apiKey); } if (StringUtils.isNotBlank(leaveRequestId)) { RestTemplate restTemplate = new RestTemplate(requestFactory); String url = baseURL + "/employee/" + empNumExternalIdMap.get(keyPayIntLeaveApplication .getEmployeeNumber()) + "/leaverequest/" + leaveRequestId; HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_JSON); headers.add("Authorization", "Basic " + apiKey); Map<String, String> params = new HashMap<String, String>(); HttpEntity<Map> entity = new HttpEntity<Map>(params, headers); restTemplate.getMessageConverters().add( new StringHttpMessageConverter()); JSONObject jsonObj; try { ResponseEntity<String> response1 = restTemplate .exchange(url, HttpMethod.DELETE, entity, String.class); // System.out.println("response>>>"); // System.out.println(response1.getBody()); jsonObj = new JSONObject(response1.getBody()); if (jsonObj.getString("status") != null && jsonObj .getString("status") .equalsIgnoreCase( PayAsiaConstants.LEAVE_TRANSACTION_TYPE_LEAVE_CANCELLED)) { keyPayIntLeaveApplication .setExternalLeaveRequestId(jsonObj .getLong("id")); keyPayIntLeaveApplication .setSyncStatus(PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_SUCCESS); keyPayIntLeaveApplicationDAO .update(keyPayIntLeaveApplication); } } catch (Exception e) { keyPayIntLeaveApplication .setSyncStatus(PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_FAILED); keyPayIntLeaveApplicationDAO .update(keyPayIntLeaveApplication); LOGGER.error(e.getMessage(), e); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateKeyPayIntLeaveAppTable(Long companyId) {\n\t\tLong maxLeaveApplicationId = keyPayIntLeaveApplicationDAO\n\t\t\t\t.getMaxApprovedLeaveAppId(companyId);\n\t\tif (maxLeaveApplicationId == null) {\n\t\t\tmaxLeaveApplicationId = 0l;\n\t\t}\n\t\t// maxLeaveApplicationId = 62409l;\n\n\t\t// Get Leave Approved and Leave Cancel applications (i.e. those\n\t\t// applications are not still moved to KeyPayIntLeaveApplication table)\n\t\tList<LeaveApplication> approvedLeaveForKeyPayInt = leaveApplicationDAO\n\t\t\t\t.getApprovedNCancelLeaveForKeyPayInt(maxLeaveApplicationId,\n\t\t\t\t\t\tcompanyId, PayAsiaConstants.LEAVE_STATUS_COMPLETED);\n\t\tfor (LeaveApplication leaveApplication : approvedLeaveForKeyPayInt) {\n\t\t\tKeyPayIntLeaveApplication keyPayIntLeaveApplication = new KeyPayIntLeaveApplication();\n\t\t\tkeyPayIntLeaveApplication.setLeaveApplication(leaveApplication);\n\t\t\tkeyPayIntLeaveApplication.setCompany(leaveApplication.getCompany());\n\t\t\tkeyPayIntLeaveApplication.setEmployeeNumber(leaveApplication\n\t\t\t\t\t.getEmployee().getEmployeeNumber());\n\t\t\tkeyPayIntLeaveApplication.setStartDate(leaveApplication\n\t\t\t\t\t.getStartDate());\n\t\t\tkeyPayIntLeaveApplication.setEndDate(leaveApplication.getEndDate());\n\t\t\tkeyPayIntLeaveApplication.setHours(new BigDecimal(leaveApplication\n\t\t\t\t\t.getTotalDays()));\n\t\t\tkeyPayIntLeaveApplication.setLeaveTypeName(leaveApplication\n\t\t\t\t\t.getEmployeeLeaveSchemeType().getLeaveSchemeType()\n\t\t\t\t\t.getLeaveTypeMaster().getLeaveTypeName());\n\t\t\tkeyPayIntLeaveApplication.setRemarks(leaveApplication.getReason());\n\t\t\tif (leaveApplication.getLeaveCancelApplication() == null) {\n\t\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t\t.setLeaveStatus(PayAsiaConstants.LEAVE_STATUS_APPROVED);\n\t\t\t} else {\n\t\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t\t.setLeaveStatus(PayAsiaConstants.LEAVE_STATUS_CANCELLED);\n\t\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t\t.setCancelLeaveApplicationId(leaveApplication\n\t\t\t\t\t\t\t\t.getLeaveCancelApplication()\n\t\t\t\t\t\t\t\t.getLeaveApplicationId());\n\t\t\t}\n\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t.setSyncStatus(PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_UNPROCESS);\n\t\t\tkeyPayIntLeaveApplicationDAO.save(keyPayIntLeaveApplication);\n\t\t}\n\t}", "@Override\n\tpublic void sendApprovedLeaveApp(Long companyId,\n\t\t\tMap<String, Long> leaveCategoryMap, String baseURL, String apiKey) {\n\n\t\tSimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();\n\n\t\tsetInternalProxy(requestFactory);\n\n\t\tCompany companyVO = companyDAO.findById(companyId);\n\n\t\t// Find All Leave which is not send(Sync) to KeyPay\n\t\tList<KeyPayIntLeaveApplication> keyPayIntLeaveAppList = keyPayIntLeaveApplicationDAO\n\t\t\t\t.findByCondition(\n\t\t\t\t\t\tPayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_SUCCESS,\n\t\t\t\t\t\tPayAsiaConstants.LEAVE_TRANSACTION_TYPE_LEAVE_APPROVED,\n\t\t\t\t\t\tcompanyId);\n\n\t\tMap<String, String> empNumExternalIdMap = new HashMap<String, String>();\n\t\tif (!keyPayIntLeaveAppList.isEmpty()) {\n\t\t\tHRISPreference hrisPreferenceVO = hrisPreferenceDAO\n\t\t\t\t\t.findByCompanyId(companyId);\n\t\t\tif (hrisPreferenceVO != null\n\t\t\t\t\t&& hrisPreferenceVO.getExternalId() != null) {\n\t\t\t\tList<Object[]> keyPayEmpExternalIdList = getKeyPayExternalIdList(\n\t\t\t\t\t\thrisPreferenceVO.getExternalId(), companyId,\n\t\t\t\t\t\tcompanyVO.getDateFormat(), null);\n\t\t\t\tfor (Object[] extIdObj : keyPayEmpExternalIdList) {\n\t\t\t\t\tif (extIdObj != null && extIdObj[0] != null\n\t\t\t\t\t\t\t&& extIdObj[1] != null) {\n\t\t\t\t\t\tempNumExternalIdMap.put(String.valueOf(extIdObj[1]),\n\t\t\t\t\t\t\t\tString.valueOf(extIdObj[0]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (KeyPayIntLeaveApplication keyPayIntLeaveApplication : keyPayIntLeaveAppList) {\n\t\t\t\tif (empNumExternalIdMap.get(keyPayIntLeaveApplication\n\t\t\t\t\t\t.getEmployeeNumber()) == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tRestTemplate restTemplate = new RestTemplate(requestFactory);\n\t\t\t\tString url = baseURL\n\t\t\t\t\t\t+ \"/employee/\"\n\t\t\t\t\t\t+ empNumExternalIdMap.get(keyPayIntLeaveApplication\n\t\t\t\t\t\t\t\t.getEmployeeNumber()) + \"/leaverequest\";\n\n\t\t\t\tHttpHeaders headers = new HttpHeaders();\n\t\t\t\theaders.setContentType(MediaType.APPLICATION_JSON);\n\t\t\t\theaders.add(\"Authorization\", \"Basic \" + apiKey);\n\n\t\t\t\t// create request body\n\t\t\t\tJSONObject request = new JSONObject();\n\t\t\t\ttry {\n\t\t\t\t\trequest.put(\"EmployeeId\", empNumExternalIdMap\n\t\t\t\t\t\t\t.get(keyPayIntLeaveApplication.getEmployeeNumber()));\n\t\t\t\t\trequest.put(\"FromDate\", DateUtils.timeStampToString(\n\t\t\t\t\t\t\tkeyPayIntLeaveApplication.getStartDate(),\n\t\t\t\t\t\t\tPayAsiaConstants.DATE_FORMAT_YYYY_MM_DD));\n\t\t\t\t\trequest.put(\"ToDate\", DateUtils.timeStampToString(\n\t\t\t\t\t\t\tkeyPayIntLeaveApplication.getEndDate(),\n\t\t\t\t\t\t\tPayAsiaConstants.DATE_FORMAT_YYYY_MM_DD));\n\t\t\t\t\trequest.put(\"Hours\", keyPayIntLeaveApplication.getHours());\n\t\t\t\t\trequest.put(\"LeaveCategoryId\", leaveCategoryMap\n\t\t\t\t\t\t\t.get(keyPayIntLeaveApplication.getLeaveTypeName()));\n\n\t\t\t\t\tif (StringUtils.isNotBlank(keyPayIntLeaveApplication\n\t\t\t\t\t\t\t.getRemarks())\n\t\t\t\t\t\t\t&& keyPayIntLeaveApplication.getRemarks().length() > 250) {\n\t\t\t\t\t\trequest.put(\"Notes\", keyPayIntLeaveApplication\n\t\t\t\t\t\t\t\t.getRemarks().substring(0, 250));\n\t\t\t\t\t} else {\n\t\t\t\t\t\trequest.put(\"Notes\",\n\t\t\t\t\t\t\t\tkeyPayIntLeaveApplication.getRemarks());\n\t\t\t\t\t}\n\n\t\t\t\t\trequest.put(\"AutomaticallyApprove\", true);\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\tLOGGER.error(e.getMessage(), e);\n\t\t\t\t}\n\t\t\t\tHttpEntity<String> entity = new HttpEntity<String>(\n\t\t\t\t\t\trequest.toString(), headers);\n\n\t\t\t\trestTemplate.getMessageConverters().add(\n\t\t\t\t\t\tnew StringHttpMessageConverter());\n\n\t\t\t\tJSONObject jsonObj;\n\t\t\t\tResponseEntity<String> response1 =null;\n\t\t\t\ttry {\n\t\t\t\t\tLOGGER.info(\"Request: \"+request.toString());\n\t\t\t\t\t response1 = restTemplate.exchange(\n\t\t\t\t\t\t\turl, HttpMethod.POST, entity, String.class);\n LOGGER.info(\"Response Body In Try Section: \"+response1.getBody());\n\t\t\t\t\t// System.out.println(\"response>>>\");\n\t\t\t\t\t// System.out.println(response1.getBody());\n\t\t\t\t\tjsonObj = new JSONObject(response1.getBody());\n\t\t\t\t\tif (jsonObj.getString(\"status\") != null\n\t\t\t\t\t\t\t&& jsonObj\n\t\t\t\t\t\t\t\t\t.getString(\"status\")\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\n\t\t\t\t\t\t\t\t\t\t\tPayAsiaConstants.LEAVE_TRANSACTION_TYPE_LEAVE_APPROVED)) {\n\t\t\t\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t\t\t\t.setExternalLeaveRequestId(jsonObj\n\t\t\t\t\t\t\t\t\t\t.getLong(\"id\"));\n\t\t\t\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t\t\t\t.setSyncStatus(PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_SUCCESS);\n\t\t\t\t\t\tkeyPayIntLeaveApplicationDAO\n\t\t\t\t\t\t\t\t.update(keyPayIntLeaveApplication);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tkeyPayIntLeaveApplication\n\t\t\t\t\t\t\t.setSyncStatus(PayAsiaConstants.PAYASIA_KEYPAY_INT_LEAVE_SYNC_STATUS_FAILED);\n\t\t\t\t\tkeyPayIntLeaveApplicationDAO\n\t\t\t\t\t\t\t.update(keyPayIntLeaveApplication);\n\t\t\t\t\tLOGGER.info(\"In Catch Response : \"+response1);\n\t\t\t\t\tLOGGER.info(\"In Catch Response Body: \"+response1.getBody());\n\t\t\t\t\tLOGGER.error(e.getMessage(), e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean unlockRecord(LeaveEncashmentProcess leaveEncashProcess, String empCode[]) {\n\t\tboolean result = false;\r\n\t\ttry {\r\n\t\t\tString query = \" UPDATE HRMS_ENCASHMENT_PROCESS_HDR \"\r\n\t\t\t\t\t+ \" SET ENCASHMENT_PROCESS_FLAG='N' WHERE ENCASHMENT_PROCESS_CODE=\"\r\n\t\t\t\t\t+ leaveEncashProcess.getProcessCode();\r\n\t\t\tresult = getSqlModel().singleExecute(query);\r\n\t\t\t\r\n\t\t\tif (empCode != null && empCode.length > 0\r\n\t\t\t\t\t&& !leaveEncashProcess.getSalarymonth().equals(\"\") \r\n\t\t\t\t\t&& !leaveEncashProcess.getSalaryyear().equals(\"\")) {\r\n\t\t\t\t\r\n\t\t\t\tquery = \"DELETE FROM HRMS_MISC_SALARY_UPLOAD WHERE APPL_CODE = \"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getProcessCode()\r\n\t\t\t\t\t\t+ \" AND APPL_TYPE = 'L'\"\r\n\t\t\t\t\t\t+ \" AND MONTH = \"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getSalarymonth()\r\n\t\t\t\t\t\t+ \" AND YEAR = \"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getSalaryyear();\r\n\r\n\t\t\t\tresult = getSqlModel().singleExecute(query);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public boolean lockRecord(LeaveEncashmentProcess leaveEncashProcess, String empCode[], \r\n\t\t\tString encashAmount[], String tds[]) {\n\t\tboolean result = false;\r\n\t\ttry {\r\n\t\t\tString month = leaveEncashProcess.getSalarymonth();\r\n\t\t\tString fromYear = leaveEncashProcess.getSalaryyear();\r\n\t\t\tString toYear = \"\";\r\n\t\t\tif(Integer.parseInt(month) < 4){\r\n\t\t\t\ttoYear = fromYear;\r\n\t\t\t\tfromYear = String.valueOf((Integer.parseInt(fromYear) - 1));\r\n\t\t\t} else{\r\n\t\t\t\ttoYear = String.valueOf((Integer.parseInt(fromYear) + 1));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString TDS_DEBIT_CODE=\"\";\r\n\t\t\tString query = \" SELECT NVL(TDS_DEBIT_CODE,0) FROM HRMS_TAX_PARAMETER\"\r\n\t\t\t\t\t+ \" WHERE TDS_FINANCIALYEAR_FROM = \"\r\n\t\t\t\t\t+ fromYear\r\n\t\t\t\t\t+ \" AND TDS_FINANCIALYEAR_TO = \"\r\n\t\t\t\t\t+ toYear;\r\n\t\t\tObject [][] tdsDebitCodeObj=getSqlModel().getSingleResult(query)\t;\r\n\t\t\tif(tdsDebitCodeObj!=null && tdsDebitCodeObj.length>0){\r\n\t\t\t\tTDS_DEBIT_CODE=String.valueOf(tdsDebitCodeObj[0][0]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tquery = \" UPDATE HRMS_ENCASHMENT_PROCESS_HDR \"\r\n\t\t\t\t\t+ \" SET ENCASHMENT_PROCESS_FLAG='Y' WHERE ENCASHMENT_PROCESS_CODE=\"\r\n\t\t\t\t\t+ leaveEncashProcess.getProcessCode();\r\n\t\t\tresult = getSqlModel().singleExecute(query);\r\n\t\t\t\r\n\t\t\tif (empCode != null && empCode.length > 0 \r\n\t\t\t\t&& !leaveEncashProcess.getSalarymonth().equals(\"\") \r\n\t\t\t\t&& !leaveEncashProcess.getSalaryyear().equals(\"\")) {\r\n\t\t\t\tquery = \"DELETE FROM HRMS_MISC_SALARY_UPLOAD WHERE APPL_CODE = \"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getProcessCode()\r\n\t\t\t\t\t\t+ \" AND APPL_TYPE = 'L'\"\r\n\t\t\t\t\t\t+ \" AND MONTH = \"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getSalarymonth()\r\n\t\t\t\t\t\t+ \" AND YEAR = \"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getSalaryyear();\r\n\r\n\t\t\t\tresult = getSqlModel().singleExecute(query);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(leaveEncashProcess.getSalaryCheck().equals(\"true\")){\r\n\t\t\t\tif(empCode != null && empCode.length > 0 && encashAmount != null && encashAmount.length > 0 ){\r\n\t\t\t\t\tfor (int i = 0; i < empCode.length; i++) {\r\n\t\t\t\t\t\tquery = \"INSERT INTO HRMS_MISC_SALARY_UPLOAD (EMP_ID, MONTH, YEAR, UPLOAD_PAY_TYPE, \" +\r\n\t\t\t\t\t\t\t\t\"SALARY_CODE, SALARY_AMOUNT, UPLOAD_IS_OVERWRITE, APPL_CODE, \" +\r\n\t\t\t\t\t\t\t\t\"APPL_TYPE, DISPLAY_FLAG, COMMENTS) \" +\r\n\t\t\t\t\t\t\t\t\"VALUES ( \" + empCode[i] + \r\n\t\t\t\t\t\t\t\t\",\" + leaveEncashProcess.getSalarymonth() + \r\n\t\t\t\t\t\t\t\t\",\" + leaveEncashProcess.getSalaryyear() + \r\n\t\t\t\t\t\t\t\t\",'C',\" + leaveEncashProcess.getCreditCode() + \r\n\t\t\t\t\t\t\t\t\",\" + encashAmount[i] + \r\n\t\t\t\t\t\t\t\t\",'Y'\" +\r\n\t\t\t\t\t\t\t\t\",\" + leaveEncashProcess.getProcessCode() +\r\n\t\t\t\t\t\t\t\t\",'L','Y','LEAVE ENCASHMENT AMOUNT')\" ;\r\n\t\t\t\r\n\t\t\t\t\t\tresult = getSqlModel().singleExecute(query);\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!TDS_DEBIT_CODE.equals(\"\")){\r\n\t\t\t\t\t\t\tquery = \"INSERT INTO HRMS_MISC_SALARY_UPLOAD (EMP_ID, MONTH, YEAR, UPLOAD_PAY_TYPE, \" +\r\n\t\t\t\t\t\t\t\t\"SALARY_CODE, SALARY_AMOUNT, UPLOAD_IS_OVERWRITE, APPL_CODE, \" +\r\n\t\t\t\t\t\t\t\t\"APPL_TYPE, DISPLAY_FLAG, COMMENTS) \" +\r\n\t\t\t\t\t\t\t\t\"VALUES ( \" + empCode[i] + \r\n\t\t\t\t\t\t\t\t\",\" + leaveEncashProcess.getSalarymonth() + \r\n\t\t\t\t\t\t\t\t\",\" + leaveEncashProcess.getSalaryyear() + \r\n\t\t\t\t\t\t\t\t\",'D',\" + TDS_DEBIT_CODE + \r\n\t\t\t\t\t\t\t\t\",\" + tds[i] + \r\n\t\t\t\t\t\t\t\t\",'Y'\" +\r\n\t\t\t\t\t\t\t\t\",\" + leaveEncashProcess.getProcessCode() +\r\n\t\t\t\t\t\t\t\t\",'L','N','LEAVE ENCASHMENT AMOUNT')\" ;\r\n\t\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t\tresult = getSqlModel().singleExecute(query);\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tquery = \"UPDATE HRMS_SALARY_\" +leaveEncashProcess.getSalaryyear() \r\n\t\t\t\t\t\t\t+ \" SET EMP_MISC_UPLOAD_FLAG='Y' \"\r\n\t\t\t\t\t\t\t+ \" WHERE EMP_ID = \" + empCode[i]\r\n\t\t\t\t\t\t\t+ \" AND SAL_MONTH=\" + leaveEncashProcess.getSalarymonth() \r\n\t\t\t\t\t\t\t+ \" AND SAL_YEAR =\" + leaveEncashProcess.getSalaryyear();\r\n\t\t\t\t\t\tresult = getSqlModel().singleExecute(query);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "@Override\n\tpublic String approveLeaveByLeaveRequestIdTemp(String leaveRequestId, String leaveApproveReason,\n\t\t\tString changeLeaveType,final float mpcl,final float mpel,final float mplwp) {\n\t\t//String moveRowIntoHistory=\"INSERT INTO emp_leave_history select * from emp_leave_requests_tbl where requestId = '\"+leaveRequestId+\"'\";\n\t\t//super.getJdbcTemplate().execute(moveRowIntoHistory);\n\t\t//String deleteRowByEmpid=\"delete from emp_leave_requests_tbl where requestId='\"+leaveRequestId+\"'\";\n\t\t//super.getJdbcTemplate().execute(deleteRowByEmpid);\n\t\t//String squery =\"select lh.empid,lh.leaveType,lh.leaveCategory,lh.totalDays,lh.lwpDays,lh.lwp,lh.inAccount,lh.leaveDays from emp_leave_history as lh where lh.requestId=?\";\n\t\tString squery =\"select lh.empid,lh.leaveType,lh.leaveCategory,lh.totalDays,lh.lwpDays,lh.lwp,lh.cel,lh.ccl,lh.inAccount,lh.leaveDays,lh.leaveDates from emp_leave_requests_tbl as lh where lh.requestId=?\";\n\t FaculityLeaveMasterEntity faculityLeaveMasterEntity = super.getJdbcTemplate().queryForObject(squery,new Object[] {leaveRequestId},new BeanPropertyRowMapper<FaculityLeaveMasterEntity>(FaculityLeaveMasterEntity.class));\n\t\t\n\t List<String> leaveTypes=new ArrayList<String>();\n\t leaveTypes.add(\"CL\");\n\t leaveTypes.add(\"EL\");\n\t leaveTypes.add(\"LWP\");\n\t \n\t\tif(!BASApplicationConstants.NO_CHANGE.equalsIgnoreCase(changeLeaveType) && !leaveTypes.contains(faculityLeaveMasterEntity.getLeaveType()) && mplwp>0) {\n\t\t\tString leaveDates=faculityLeaveMasterEntity.getLeaveDates();\t\n\t\t\tList<String> dateTokensList=new ArrayList<String>();\n\t\t\tsetComputedDatesForLeaveTypes(leaveDates, faculityLeaveMasterEntity.getTotalDays(), mplwp, dateTokensList);\n\t\t\tString updateLeaveComputatedDates=\"update emp_leave_requests_tbl set ccl=?,leaveDays=?,lwp=?,lwpDays=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\tObject[] pdata=new Object[]{mpcl,dateTokensList.get(0),mplwp,dateTokensList.get(1)};\n\t\t\tsuper.getJdbcTemplate().update(updateLeaveComputatedDates,pdata);\n\t\t}\n\t\telse if(!BASApplicationConstants.NO_CHANGE.equalsIgnoreCase(changeLeaveType)) {\n\t\t\t LeaveBalanceEntity leaveBalanceEntity=findLeaveCurrentLeaveBalanceByEmpId(faculityLeaveMasterEntity.getEmpid()+\"\");\n\t\t\t\t//finding total leaves applied and checking whether mcl is less than available cls\n\t\t\t\tfloat totalAvailableCls=leaveBalanceEntity.getCl();\n\t\t\t\tString totalClLeavesDays=faculityLeaveMasterEntity.getLeaveDays();\n\t\t\t\tint totalClLeavesCountDays=0;\n\t\t\t\tif(totalClLeavesDays!=null && totalClLeavesDays.length()>0) {\n\t\t\t\t\tString totalDaysTokens[]=totalClLeavesDays.split(\",\");\n\t\t\t\t\ttotalClLeavesCountDays=totalDaysTokens.length;\n\t\t\t\t\t\tfor(String str:totalDaysTokens) {\n\t\t\t\t\t\t\tfloat cp=Float.parseFloat(str.substring(str.indexOf(\"(\")+1,str.indexOf(\")\")));\n\t\t\t\t\t\t\ttotalAvailableCls=totalAvailableCls+cp;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//if modified cl is less than available CL of the employee\n\t\t\t\t//04(1),05(0.75),\n\t\t\t\tString totalDbClDays=\"\";\n\t\t\t\tif(mpcl<totalAvailableCls) {\n\t\t\t\t\t //float remainingCl=totalAvailableCls -mpcl; //1.75 ->>.25\n\t\t\t\t\t String totalDaysTokens[]=totalClLeavesDays.split(\",\");\n\t\t\t\t\t if(totalClLeavesCountDays==1) {\n\t\t\t\t\t\t \t//current computated cl into applied leaves request tables\n\t\t\t\t\t\t \tfloat ccl=Float.parseFloat(totalDaysTokens[0].substring(totalDaysTokens[0].indexOf(\"(\")+1,totalDaysTokens[0].indexOf(\")\")));\n\t\t\t\t\t\t \tif((ccl-mpcl) >0) {\n\t\t\t\t\t\t \t\t totalDbClDays=totalDaysTokens[0].substring(0,2)+\"(\"+(ccl-mpcl)+\")\";\n\t\t\t\t\t\t \t}\n\t\t\t\t\t }else{\n\t\t\t\t\t\t int mpclcount=(int) Math.ceil(mpcl);\n\t\t\t\t\t\t float tmpcl=mpcl;\n\t\t\t\t\t\t for(int i=0;i<mpclcount;i++) {\n\t\t\t\t\t\t \t if(tmpcl>=1) {\n\t\t\t\t\t\t \t\t totalDbClDays=totalDbClDays+\",\"+totalDaysTokens[i]; \n\t\t\t\t\t\t \t }\t \n\t\t\t\t\t\t \t else {\n\t\t\t\t\t\t \t\t totalDbClDays=totalDbClDays+\",\"+ totalDaysTokens[i].substring(0, 2)+\"(\"+tmpcl+\")\"; \n\t\t\t\t\t\t \t }\t\t \n\t\t\t\t\t\t \t tmpcl=tmpcl-1;\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t} //end of CL computation\n\t\t\t\t\n\t\t\t\t//compute total leaves dd from dates\n\t\t\t\t//2016-07-04,2016-07-05,2016-07-06\n\t\t\t\tString leaveDates=faculityLeaveMasterEntity.getLeaveDates();\n\t\t\t\tString ddDates=\"\";\n\t\t\t\tString leaveDatesTokens[]=leaveDates.split(\",\");\n\t\t\t\tfor(String dddate:leaveDatesTokens) {\n\t\t\t\t\t\tString dddateTokens[]=dddate.split(\"-\");\n\t\t\t\t\t\tString dd=dddateTokens[2];\n\t\t\t\t\t\tddDates=ddDates+dd+\",\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Case 1 when all CL ,EL,LWP is not zero\n\t\t\t\tif(mpcl>0 && mpel>0 && mplwp>0) {\n\t\t\t\t\t\t\t\tString cldates=ddDates+\"-> (\"+mpcl+\")\";\n\t\t\t\t\t\t\t\tString eldates=ddDates+\"-> (\"+mpel+\")\";\n\t\t\t\t\t\t\t\tString lwpdates=ddDates+\"-> (\"+mplwp+\")\";\n\t\t\t\t\t\t\t\tString updateLeaveComputatedDates=\"update emp_leave_requests_tbl set ccl=?,leaveDays=?,lwp=?,lwpDays=?,cel=?,elDays=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\t\t\tObject[] pdata=new Object[]{mpcl,cldates,mplwp,lwpdates,mpel,eldates};\n\t\t\t\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveComputatedDates,pdata);\n\t\t\t\t}else if(mpcl>0 && mplwp>0 && mpel==0) {\n\t\t\t\t\t\tList<String> dateTokensList=new ArrayList<String>();\n\t\t\t\t\t\tsetComputedDatesForLeaveTypes(leaveDates, faculityLeaveMasterEntity.getTotalDays(), mplwp, dateTokensList);\n\t\t\t\t\t\tString updateLeaveComputatedDates=\"update emp_leave_requests_tbl set ccl=?,leaveDays=?,lwp=?,lwpDays=?,cel=?,elDays=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\tObject[] pdata=new Object[]{mpcl,dateTokensList.get(0),mplwp,dateTokensList.get(1),0,\"\"};\n\t\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveComputatedDates,pdata);\n\t\t\t\t}else if(mpcl>0 && mpel>0 && mplwp==0) {\n\t\t\t\t\tList<String> dateTokensList=new ArrayList<String>();\n\t\t\t\t\tsetComputedDatesForLeaveTypes(leaveDates, faculityLeaveMasterEntity.getTotalDays(), mpel, dateTokensList);\n\t\t\t\t\tString updateLeaveComputatedDates=\"update emp_leave_requests_tbl set ccl=?,leaveDays=?,lwp=?,lwpDays=?,cel=?,elDays=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\tObject[] pdata=new Object[]{mpcl,dateTokensList.get(0),0,\"\",mpel,dateTokensList.get(1)};\n\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveComputatedDates,pdata);\n\t\t\t\t}else if(mpcl==0 && mpel>0 && mplwp>0) {\n\t\t\t\t\tList<String> dateTokensList=new ArrayList<String>();\n\t\t\t\t\tsetComputedDatesForLeaveTypes(leaveDates, faculityLeaveMasterEntity.getTotalDays(), mplwp, dateTokensList);\n\t\t\t\t\tString updateLeaveComputatedDates=\"update emp_leave_requests_tbl set ccl=?,leaveDays=?,lwp=?,lwpDays=?,cel=?,elDays=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\tObject[] pdata=new Object[]{0,\"\",mplwp,dateTokensList.get(1),mpel,dateTokensList.get(0)};\n\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveComputatedDates,pdata);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tLeavesModifiedEntity leavesModifiedEntity=findModifiedLeaveByRequestId(leaveRequestId);\n\t\t\t\tfloat clbalanceDiff=leavesModifiedEntity.getCl()-mpcl;\n\t\t\t\tfloat elbalanceDiff=leavesModifiedEntity.getEl()-mpel;\n\t\t\t\tString updateLeaveBalance=\"\";\n\t\t\t\tif(clbalanceDiff>0 && elbalanceDiff>0){\n\t\t\t\t\t updateLeaveBalance=\"update emp_leave_balance set CL=CL+\"+clbalanceDiff+\", EL=EL+\"+elbalanceDiff+\" where empid=\"+faculityLeaveMasterEntity.getEmpid();\n\t\t\t\t}else if(clbalanceDiff<=0 && elbalanceDiff<=0){\n\t\t\t\t\t updateLeaveBalance=\"update emp_leave_balance set CL=CL-\"+clbalanceDiff+\", EL=EL-\"+elbalanceDiff+\" where empid=\"+faculityLeaveMasterEntity.getEmpid();\n\t\t\t\t}else if(clbalanceDiff<=0 && elbalanceDiff>0){\n\t\t\t\t\t updateLeaveBalance=\"update emp_leave_balance set CL=CL-\"+clbalanceDiff+\", EL=EL+\"+elbalanceDiff+\" where empid=\"+faculityLeaveMasterEntity.getEmpid();\n\t\t\t\t} if(clbalanceDiff>0 && elbalanceDiff<=0){\n\t\t\t\t\t updateLeaveBalance=\"update emp_leave_balance set CL=CL+\"+clbalanceDiff+\", EL=EL-\"+elbalanceDiff+\" where empid=\"+faculityLeaveMasterEntity.getEmpid();\n\t\t\t\t}\n\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveBalance);\n\t}\n\t\t\n\t\t//end of no change\n\t\t//Approving the status of Management and moving record from leave_request_tbl into leave_history_tbl\n\t\tapproveLeaveByManagementRequestId(leaveRequestId,leaveApproveReason);\n\t\t//update Leave Balance Table\n\t\t\n\t/*\tString updateLeaveStatus=\"update emp_leave_requests_tbl set description=?,hrApproval=?,dom=? where requestId='\"+leaveRequestId+\"'\";\n\t\tsuper.getJdbcTemplate().update(updateLeaveStatus,new Object[]{leaveApproveReason,LeaveStatus.APPROVED_STATUS,DateUtils.getCurrentTimestatmp()});*/\n\t\treturn BaoConstants.SUCCESS;\n\t}", "@Override\n\tpublic String approveLeaveByLeaveRequestId(String leaveRequestId, String leaveApproveReason,\n\t\t\tString changeLeaveType,final float cl,final float el,final float plwp) {\n\t\t//String moveRowIntoHistory=\"INSERT INTO emp_leave_history select * from emp_leave_requests_tbl where requestId = '\"+leaveRequestId+\"'\";\n\t\t//super.getJdbcTemplate().execute(moveRowIntoHistory);\n\t\t//String deleteRowByEmpid=\"delete from emp_leave_requests_tbl where requestId='\"+leaveRequestId+\"'\";\n\t\t//super.getJdbcTemplate().execute(deleteRowByEmpid);\n\t\t//String squery =\"select lh.empid,lh.leaveType,lh.leaveCategory,lh.totalDays,lh.lwpDays,lh.lwp,lh.inAccount,lh.leaveDays from emp_leave_history as lh where lh.requestId=?\";\n\t\tString squery =\"select lh.empid,lh.leaveType,lh.leaveCategory,lh.totalDays,lh.lwpDays,lh.lwp,lh.inAccount,lh.leaveDays from emp_leave_requests_tbl as lh where lh.requestId=?\";\n\t\tif(!BASApplicationConstants.NO_CHANGE.equalsIgnoreCase(changeLeaveType)) {\n\t\t\t FaculityLeaveMasterEntity faculityLeaveMasterEntity = super.getJdbcTemplate().queryForObject(squery,new Object[] {leaveRequestId},new BeanPropertyRowMapper<FaculityLeaveMasterEntity>(FaculityLeaveMasterEntity.class));\n\t\t\t\tLeaveBalanceEntity leaveBalanceEntity=findLeaveCurrentLeaveBalanceByEmpId(faculityLeaveMasterEntity.getEmpid()+\"\");\n\t\t\t\tif(BASApplicationConstants.CL_LEAVE.equalsIgnoreCase(faculityLeaveMasterEntity.getLeaveType())) {\n\t\t\t\t\tif(BASApplicationConstants.EL_LEAVE.equalsIgnoreCase(changeLeaveType)) {\n\t\t\t\t\t\t\tfloat cel=0;\n\t\t\t\t\t\t String elDays=null;\n\t\t\t\t\t\t\tString lwpdays=faculityLeaveMasterEntity.getLwpDays();\n\t\t\t\t\t\t float lwp=faculityLeaveMasterEntity.getLwp();//2.5 , el=1.5\n\t\t\t\t\t\t float tel=leaveBalanceEntity.getEl(); //1\n\t\t\t\t\t\t float remel=tel-lwp; //remel =>>remainning el /5 //5.5\n\t\t\t\t\t\t if(remel>0) {\n\t\t\t\t\t\t \tlwp=0;\n\t\t\t\t\t\t \telDays=lwpdays;\n\t\t\t\t\t\t \tlwpdays=null;\n\t\t\t\t\t\t \tcel=faculityLeaveMasterEntity.getLwp();\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t \tlwp=-remel; //when lwp>=total el\n\t\t\t\t\t\t \tcel=faculityLeaveMasterEntity.getLwp();\n\t\t\t\t\t\t \t///2\n\t\t\t\t\t\t \tint lwpCount=(int)Math.ceil(lwp);\n\t\t\t\t\t\t \tint lwpLessCount=(int)Math.floor(lwp);\n\t\t\t\t\t\t \tString lwpdaysTokens[]=lwpdays.split(\",\");\n\t\t\t\t\t\t \t elDays=\"\";\n\t\t\t\t\t\t for(int x=0;x<lwp;x++) { //\n\t\t\t\t\t\t \telDays=elDays+lwpdaysTokens[lwpdaysTokens.length-1-x]+\",\";\n\t\t\t\t\t\t }\n\t\t\t\t\t\t lwpdays=\"\";\n\t\t\t\t\t\t for(int x=0;x<lwpdaysTokens.length-lwp;x++) { //\n\t\t\t\t\t\t \tlwpdays=lwpdays+lwpdaysTokens[x]+\",\";\n\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t\t String updateLeaveStatus=\"update emp_leave_requests_tbl set elDays=?,cel=?,lwp=?,lwpDays=?,changeLeaveType=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\t super.getJdbcTemplate().update(updateLeaveStatus,new Object[]{elDays,cel,lwp,lwpdays,changeLeaveType});\n\t\t\t\t\t\t updateEmployeeEL(leaveBalanceEntity.getEmpNo(),0F);\n\t\t\t\t\t}\n\t\t\t\t}else if(BASApplicationConstants.EL_LEAVE.equalsIgnoreCase(faculityLeaveMasterEntity.getLeaveType())) {\n\t\t\t\t\t if(BASApplicationConstants.LWP_LEAVE.equalsIgnoreCase(changeLeaveType)) {\n\t\t\t\t\t\t float totalDays=faculityLeaveMasterEntity.getTotalDays();\n\t\t\t\t\t\t String totalLeaveDays=faculityLeaveMasterEntity.getLeaveDays();\n\t\t\t\t\t\t\tString lwpDays=faculityLeaveMasterEntity.getLwpDays();\n\t\t\t\t\t\t\tlwpDays=totalLeaveDays+lwpDays;\n\t\t\t\t\t\t\tfloat lwp=totalDays;\n\t\t\t\t\t\t\tupdateEmployeeEL(faculityLeaveMasterEntity.getEmpid()+\"\",totalDays-faculityLeaveMasterEntity.getLwp()); \n\t\t\t\t\t\t\tString updateLeaveStatus=\"update emp_leave_requests_tbl set leaveDays=?,lwp=?,lwpDays=?,changeLeaveType=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveStatus,new Object[]{null,lwp,lwpDays,changeLeaveType});\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(BASApplicationConstants.LWP_LEAVE.equalsIgnoreCase(changeLeaveType)){\n\t\t\t\t\t float totalDays=faculityLeaveMasterEntity.getTotalDays();\n\t\t\t\t\t String totalLeaveDays=faculityLeaveMasterEntity.getLeaveDays();\n\t\t\t\t\t\tString lwpDays=faculityLeaveMasterEntity.getLwpDays();\n\t\t\t\t\t\tlwpDays=totalLeaveDays+(lwpDays!=null?lwpDays:\"\");\n\t\t\t\t\t\tfloat lwp=totalDays;\n\t\t\t\t\t\t//updateEmployeeEL(faculityLeaveMasterEntity.getEmpid()+\"\",totalDays-faculityLeaveMasterEntity.getLwp()); \n\t\t\t\t\t\tString updateLeaveStatus=\"update emp_leave_requests_tbl set leaveDays=?,lwp=?,lwpDays=?,changeLeaveType=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveStatus,new Object[]{null,lwp,lwpDays,changeLeaveType});\n\t\t\t\t }else if(BASApplicationConstants.CL_LEAVE.equalsIgnoreCase(changeLeaveType)){\n\t\t\t\t\t float totalDays=faculityLeaveMasterEntity.getTotalDays();\n\t\t\t\t\t\tupdateEmployeeCL(faculityLeaveMasterEntity.getEmpid()+\"\",totalDays); \n\t\t\t\t\t\tString updateLeaveStatus=\"update emp_leave_requests_tbl set changeLeaveType=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveStatus,new Object[]{changeLeaveType});\n\t\t\t\t }else if(BASApplicationConstants.EL_LEAVE.equalsIgnoreCase(changeLeaveType)){\n\t\t\t\t\t float totalDays=faculityLeaveMasterEntity.getTotalDays();\n\t\t\t\t\t\tupdateEmployeeEL(faculityLeaveMasterEntity.getEmpid()+\"\",totalDays); \n\t\t\t\t\t\tString updateLeaveStatus=\"update emp_leave_requests_tbl set changeLeaveType=? where requestId='\"+leaveRequestId+\"'\";\n\t\t\t\t\t\tsuper.getJdbcTemplate().update(updateLeaveStatus,new Object[]{changeLeaveType});\n\t\t\t\t }\n\t\t\t\t\t\n\t\t\t}\n\t\t}//end of no change\n\t\t\n\t\t//Approving the status of Management and moving record from leave_request_tbl into leave_history_tbl\n\t\tapproveLeaveByManagementRequestId(leaveRequestId,leaveApproveReason);\n\t/*\tString updateLeaveStatus=\"update emp_leave_requests_tbl set description=?,hrApproval=?,dom=? where requestId='\"+leaveRequestId+\"'\";\n\t\tsuper.getJdbcTemplate().update(updateLeaveStatus,new Object[]{leaveApproveReason,LeaveStatus.APPROVED_STATUS,DateUtils.getCurrentTimestatmp()});*/\n\t\treturn BaoConstants.SUCCESS;\n\t}", "public void getBlankLeaveRecord(LeaveApproval leaveApp) {\n\t\t\tObject empObject[] = new Object[1];\r\n\t\t\tempObject[0] = leaveApp.getUserEmpId();\r\n\t\t\tObject[][] data = getSqlModel().getSingleResult(getQuery(2),empObject);\r\n\t\t\t\r\n\t\t\tlogger.info(\"data----------: \"+String.valueOf(empObject[0]));\r\n\t\t\t\r\n\t\t\tArrayList<Object> appList = new ArrayList<Object>();\r\n\t\t\t\r\n\t\t\tfor(int i=0; i<data.length; i++) {\t\r\n\t\t\tLeaveApproval bean1= new LeaveApproval();\r\n\t\t\tLeaveApplication appBean = new LeaveApplication();\r\n\t\t\t\tbean1.setAppCode(String.valueOf(data[i][0]));\r\n\t\r\n\t\t\t\tbean1.setEmpId(String.valueOf(data[i][1]));\r\n\t\t\t\tbean1.setEmpName(String.valueOf(data[i][2]));\r\n\t\t\t\tbean1.setAppDate(String.valueOf(data[i][3]));\r\n\t\t\t\tbean1.setFromDate(String.valueOf(data[i][4]));\r\n\t\t\t\tbean1.setToDate(String.valueOf(data[i][5]));\r\n\t\t\t\tbean1.setTotalDays(String.valueOf(data[i][6]));\r\n\t\t\t\t\r\n\t\t\tappList.add(bean1);\r\n\t\t}\r\n\t\t\tleaveApp.setAppList(appList);\r\n\t\t\t\r\n\t}", "int updateByPrimaryKey(Leave record);", "@Override\n\tpublic int updApp(ApplicationEntity App) {\n\t\tint id=App.A_id;\n\t\tString zt=null;\n\t\tApplicationEntity app=appdao.selectappById(id);\n\t\tif(\"0\".equals(app.A_state)){\n\t\t\t zt=\"1\";\n\t\t\t\n\t\t}\n\t\tApplicationEntity app1=new ApplicationEntity();\n\t\tapp1.A_state=zt;\n\t\tapp1.A_id=id;\n\t\treturn appdao.updapp(app1);\n\t}", "int updateByPrimaryKeySelective(NeeqCompanyAccountingFirmOnline record);", "public int applyleave(LeaveBean leave) {\n\t\t// TODO Auto-generated method stub\n\t\tleave.setStatus(\"Pending\");\n\t\tOptional<AdminBean> list = crud2.findById(leave.getEmpid());\n\t\tcrud2.applyleave(leave.getEmpid());\n\t\tleave.setManagerid(list.get().getReportingTo());\n\t\tcrud3.save(leave);\n\t\treturn 0;\n\t}", "int updateByPrimaryKeySelective(Leave record);", "int updateByPrimaryKey(NeeqCompanyAccountingFirmOnline record);", "int updateByPrimaryKey(CmIndustryConfig record);", "public boolean calculateEncashAmount(String noOfEncashLeave,\r\n\t\t\tString empCode, LeaveEncashmentProcess leaveEncashProcess) {\n\t\tboolean result = false;\r\n\t\ttry {\r\n\r\n\t\t\tObject encashQueryObj[][] = null;\r\n\t\t\tArrayList list = new ArrayList();\r\n\t\t\tObject empIdsObj[][] = getEmpIdsAndPolicyCodes(leaveEncashProcess);\r\n\r\n\t\t\tif (empIdsObj != null && empIdsObj.length > 0) {\r\n\t\t\t\tfor (int j = 0; j < empIdsObj.length; j++) {\r\n\t\t\t\t\tString policyCode = \" SELECT LEAVE_POLICY_CODE FROM HRMS_LEAVE_POLICY_TEMP \"\r\n\t\t\t\t\t\t\t+ \" WHERE EMP_ID=\"\r\n\t\t\t\t\t\t\t+ String.valueOf(empIdsObj[j][0]);\r\n\t\t\t\t\tObject policy_CodeObj[][] = getSqlModel().getSingleResult(\r\n\t\t\t\t\t\t\tpolicyCode);\r\n\r\n\t\t\t\t\tif (policy_CodeObj != null && policy_CodeObj.length > 0) {\r\n\t\t\t\t\t\tfor (int k = 0; k < policy_CodeObj.length; k++) {\r\n\t\t\t\t\t\t\tString encashQuery = \" SELECT NVL(HRMS_EMP_OFFC.EMP_TOKEN,' '),NVL(HRMS_EMP_OFFC.EMP_FNAME,' ')||' '||NVL(HRMS_EMP_OFFC.EMP_MNAME,' ')||' '||NVL(HRMS_EMP_OFFC.EMP_LNAME,' ') NAME,TO_CHAR(LEAVE_NAME) ,NVL(LEAVE_CLOSING_BALANCE,0) AS AVAILABLE_BALANCE, \"\r\n\t\t\t\t\t\t\t\t\t+ \" NVL(LEAVE_CLOSING_BALANCE,0)-\"\r\n\t\t\t\t\t\t\t\t\t+ leaveEncashProcess.getGreaterEncashBal()\r\n\t\t\t\t\t\t\t\t\t+ \" ENCASH_BAL,HRMS_LEAVE.LEAVE_ID, \"\r\n\t\t\t\t\t\t\t\t\t+ \" HRMS_LEAVE_POLICY_DTL.LEAVE_ENC_FORMULA ,HRMS_EMP_OFFC.EMP_ID \"\r\n\t\t\t\t\t\t\t\t\t+ \" FROM HRMS_LEAVE \"\r\n\t\t\t\t\t\t\t\t\t+ \" LEFT JOIN HRMS_LEAVE_BALANCE ON(HRMS_LEAVE.LEAVE_ID=HRMS_LEAVE_BALANCE.LEAVE_CODE AND EMP_ID =\"\r\n\t\t\t\t\t\t\t\t\t+ String.valueOf(empIdsObj[j][0])\r\n\t\t\t\t\t\t\t\t\t+ \") \"\r\n\t\t\t\t\t\t\t\t\t+ \" LEFT JOIN HRMS_EMP_OFFC ON(HRMS_LEAVE_BALANCE.EMP_ID=HRMS_EMP_OFFC.EMP_ID) \"\r\n\t\t\t\t\t\t\t\t\t+ \" INNER JOIN HRMS_LEAVE_POLICY_DTL ON(HRMS_LEAVE_POLICY_DTL.LEAVE_CODE=HRMS_LEAVE_BALANCE.LEAVE_CODE \"\r\n\t\t\t\t\t\t\t\t\t+ \" AND LEAVE_APPLICABLE='Y' AND LEAVE_ENC_FLAG='Y'AND HRMS_LEAVE_POLICY_DTL.LEAVE_POLICY_CODE=\"\r\n\t\t\t\t\t\t\t\t\t+ String.valueOf(policy_CodeObj[k][0])\r\n\t\t\t\t\t\t\t\t\t+ \") \"\r\n\t\t\t\t\t\t\t\t\t+ \" AND HRMS_LEAVE_BALANCE.LEAVE_CLOSING_BALANCE >\"\r\n\t\t\t\t\t\t\t\t\t+ leaveEncashProcess.getGreaterEncashBal()\r\n\t\t\t\t\t\t\t\t\t+ \" \"\r\n\t\t\t\t\t\t\t\t\t+ \" AND HRMS_LEAVE_BALANCE.LEAVE_CODE=\"\r\n\t\t\t\t\t\t\t\t\t+ leaveEncashProcess.getLevCode()\r\n\t\t\t\t\t\t\t\t\t+ \" AND LEAVE_ENC_FORMULA IS NOT NULL ORDER BY LEAVE_ID \";\r\n\r\n\t\t\t\t\t\t\tencashQueryObj = getSqlModel().getSingleResult(\r\n\t\t\t\t\t\t\t\t\tencashQuery);\r\n\r\n\t\t\t\t\t\t\tif (encashQueryObj != null\r\n\t\t\t\t\t\t\t\t\t&& encashQueryObj.length > 0) {\r\n\t\t\t\t\t\t\t\tfor (int e = 0; e < encashQueryObj.length; e++) {\r\n\r\n\t\t\t\t\t\t\t\t\tresult = true;\r\n\t\t\t\t\t\t\t\t\tLeaveEncashmentProcess bean = new LeaveEncashmentProcess();\r\n\r\n\t\t\t\t\t\t\t\t\tbean.setEmpToken(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][0])));\r\n\t\t\t\t\t\t\t\t\tbean.setEmpName(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][1])));\r\n\t\t\t\t\t\t\t\t\tbean.setLeaveName(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][2])));\r\n\t\t\t\t\t\t\t\t\tbean.setAvailableBal(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][3])));\r\n\t\t\t\t\t\t\t\t\tbean.setNoOfencashLeave(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][4]));\r\n\t\t\t\t\t\t\t\t\tbean.setLeaveCode(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][5])));\r\n\t\t\t\t\t\t\t\t\tbean.setEncashFormula(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][6])));\r\n\t\t\t\t\t\t\t\t\tbean.setEmployeeId(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][7])));\r\n\r\n\t\t\t\t\t\t\t\t\tdouble amount = 0;\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tamount = Utility\r\n\t\t\t\t\t\t\t\t\t\t\t\t.expressionEvaluate(new Utility()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.generateFormula(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][7]),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][6]),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsession));\r\n\t\t\t\t\t\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\t\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tlogger\r\n\t\t\t\t\t\t\t\t\t\t\t.info(\"Value of amount \"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ amount);\r\n\t\t\t\t\t\t\t\t\tbean.setAmtPerDay(String.valueOf((amount)));\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tString delTempQueryAfter = \" DELETE FROM HRMS_LEAVE_POLICY_TEMP \";\r\n\t\t\tgetSqlModel().singleExecute(delTempQueryAfter);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public String rejectApprovedApplication(Bwfl_permit_tracking_action act){\n\n\n\t\t\tint saveStatus = 0;\n\t\t\tConnection con = null;\n\t\t\tPreparedStatement pstmt = null;\t\t\t\n\t\t\tString updtQr = \"\";\n\t\t\tString delQr = \"\";\n\t\t\tString insQr = \"\";\n\t\t\tint seq = getRejctedSeq();\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\ttry {\n\t\t\t\tcon = ConnectionToDataBase.getConnection();\n\t\t\t\tcon.setAutoCommit(false);\n\t\t\t\tDate date = new Date();\n\t\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\t\tString time = sdf.format(cal.getTime());\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n\n\t\t\t\t\tupdtQr = \t\" UPDATE bwfl_license.import_permit_20_21 \"+\n\t\t\t\t\t\t\t \t\" SET deo_time=?, deo_date=?, deo_remark=?, \"+\n\t\t\t\t\t\t\t \t\" deo_user=?, vch_approved=?, vch_status=?, import_fee_challan_no=?, spcl_fee_challan_no=? \" +\n\t\t\t\t\t\t\t \t\" WHERE id=? AND district_id=? AND login_type=? AND app_id=? \";\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\tpstmt = con.prepareStatement(updtQr);\n\n\n\t\t\t\t\tpstmt.setString(1, time);\n\t\t\t\t\tpstmt.setDate(2, Utility.convertUtilDateToSQLDate(new Date()));\n\t\t\t\t\tpstmt.setString(3, act.getFillRemrks());\t\n\t\t\t\t\tpstmt.setString(4, ResourceUtil.getUserNameAllReq().trim());\n\t\t\t\t\tpstmt.setString(5, \"REJECTED\");\n\t\t\t\t\tpstmt.setString(6, \"Rejected By DEO after Approval\");\n\t\t\t\t\tpstmt.setString(7, null);\n\t\t\t\t\tpstmt.setString(8, null);\n\t\t\t\t\tpstmt.setInt(9, act.getRequestID());\n\t\t\t\t\tpstmt.setInt(10, act.getDistrictId());\n\t\t\t\t\tpstmt.setString(11, act.getLoginType());\n\t\t\t\t\tpstmt.setInt(12, act.getAppId());\n\t\n\t\t\t\t\tsaveStatus = pstmt.executeUpdate();\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"status1------rejectttt----- \"+saveStatus);\n\t\t\t\t\t\t\n\t\t\t\t\tif(saveStatus > 0){\n\t\t\t\t\t\n\t\t\t\t\t\tinsQr = \t\" INSERT INTO bwfl_license.rejected_permit_after_approval_20_21( \" +\n\t\t\t\t\t\t\t\t\t\" seq, district_id, bwfl_id, bwfl_type, cr_date, approval_time, approval_remark, \" +\n\t\t\t\t\t\t\t\t\t\" approval_user, approval_date, lic_no, permit_nmbr, login_type, reject_dt_time, reject_remark, app_id_fk) \" +\n\t\t\t\t\t\t\t\t\t\" VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); \";\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\tpstmt = con.prepareStatement(insQr);\n\n\n\t\t\t\t\tpstmt.setInt(1, seq);\n\t\t\t\t\tpstmt.setInt(2, act.getDistrictId());\n\t\t\t\t\tpstmt.setInt(3, act.getBwflId());\n\t\t\t\t\tpstmt.setString(4, act.getLicenseType());\n\t\t\t\t\tpstmt.setDate(5, Utility.convertUtilDateToSQLDate(new Date()));\n\t\t\t\t\tpstmt.setString(6, act.getApprovalTym());\n\t\t\t\t\tpstmt.setString(7, act.getDeoRemrks());\n\t\t\t\t\tpstmt.setString(8, act.getApprovalUser());\n\t\t\t\t\tpstmt.setDate(9, Utility.convertUtilDateToSQLDate(act.getApprovalDate()));\n\t\t\t\t\tpstmt.setString(10, act.getLicenseNmbr());\t\n\t\t\t\t\tpstmt.setString(11, act.getPermitNmbr());\n\t\t\t\t\tpstmt.setString(12, act.getLoginType());\n\t\t\t\t\tpstmt.setString(13, dateFormat.format(new Date()));\n\t\t\t\t\tpstmt.setString(14, act.getFillRemrks());\n\t\t\t\t\tpstmt.setInt(15, act.getAppId());\n\n\t\t\t\t\tsaveStatus = pstmt.executeUpdate();\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"status2------rejectttt----- \"+saveStatus);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(saveStatus > 0){\n\t\t\t\t\t\tfor (int i = 0; i < act.getDisplayBrandDetails().size(); i++) {\n\n\t\t\t\t\t\t\tBwfl_permit_tracking_dt dt = (Bwfl_permit_tracking_dt) act.getDisplayBrandDetails().get(i);\n\n\t\t\t\t\t\t\tsaveStatus = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(act.getLoginType().equalsIgnoreCase(\"BWFL\")){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdelQr = \t\" DELETE FROM bwfl_license.mst_bottling_plan_20_21 \"+\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t \t\t\" WHERE int_distillery_id=? AND int_brand_id=? AND int_pack_id=? AND plan_dt=? \" +\n\t\t\t\t\t\t\t\t \t\t\" AND permitno=? AND (finalized_flag!='F' or finalized_flag IS NULL) \";\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\tpstmt = con.prepareStatement(delQr);\n\t\t\t\n\t\t\t\n\t\t\t\t\t\t\t\tpstmt.setInt(1, act.getBwflId());\n\t\t\t\t\t\t\t\tpstmt.setInt(2, dt.getBrandId_dt());\n\t\t\t\t\t\t\t\tpstmt.setInt(3, dt.getPckgID_dt());\n\t\t\t\t\t\t\t\tpstmt.setDate(4, Utility.convertUtilDateToSQLDate(act.getApprovalDate()));\n\t\t\t\t\t\t\t\tpstmt.setString(5, act.getPermitNmbr());\t\n\t\t\t\n\t\t\t\t\t\t\t\tsaveStatus = pstmt.executeUpdate();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(act.getLoginType().equalsIgnoreCase(\"FL2D\")){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdelQr = \t\" DELETE FROM fl2d.mst_stock_receive_20_21 \"+\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t \t\t\" WHERE int_fl2d_id=? AND int_brand_id=? AND int_pack_id=? AND plan_dt=? \" +\n\t\t\t\t\t\t\t\t \t\t\" AND permit_no=? AND (finalized_flag!='F' or finalized_flag IS NULL) \";\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\tpstmt = con.prepareStatement(delQr);\n\t\t\t\n\t\t\t\n\t\t\t\t\t\t\t\tpstmt.setInt(1, act.getBwflId());\n\t\t\t\t\t\t\t\tpstmt.setInt(2, dt.getBrandId_dt());\n\t\t\t\t\t\t\t\tpstmt.setInt(3, dt.getPckgID_dt());\n\t\t\t\t\t\t\t\tpstmt.setDate(4, Utility.convertUtilDateToSQLDate(act.getApprovalDate()));\n\t\t\t\t\t\t\t\tpstmt.setString(5, act.getPermitNmbr());\t\n\t\t\t\n\t\t\t\t\t\t\t\tsaveStatus = pstmt.executeUpdate();\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\t\t\n\t\t\t\t\t\t\t\tSystem.out.println(\"status3------rejectttt----- \"+saveStatus);\n\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\n\t\t\t\tif (saveStatus > 0) {\n\t\t\t\t\tcon.commit();\n\t\t\t\t\tact.closeApplication();\n\t\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_INFO,\n\t\t\t\t\t\" Application Rejected !!! \",\"Application Rejected !!!\"));\n\t\t\t\t\t\n\n\t\t\t\t} else {\n\t\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_ERROR,\n\t\t\t\t\t\"Error !!! \", \"Error!!!\"));\n\n\t\t\t\t\tcon.rollback();\n\n\t\t\t\t}\n\t\t\t} catch (Exception se) {\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,new FacesMessage(se.getMessage(), se.getMessage()));\n\t\t\t\tse.printStackTrace();\n\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (pstmt != null)\n\t\t\t\t\t\tpstmt.close();\n\t\t\t\t\tif (con != null)\n\t\t\t\t\t\tcon.close();\n\n\t\t\t\t} catch (Exception se) {\n\t\t\t\t\tse.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn \"\";\n\n\t\t\n\t\t}", "int updateByPrimaryKeySelective(CmIndustryConfig record);", "public int Appbr(Long broker_id)throws SQLException {\nint i=DbConnect.getStatement().executeUpdate(\"update login set status='approved' where login_id=\"+broker_id+\"\");\r\n\treturn i;\r\n}", "public static String update_leave(int empId,int leave_id,String start_date,String end_date,int no_ldays,String leave_type,String leave_reason )\r\n throws ParseException {\r\n Employee emp = Employee.listById(empId);\r\n Leave leavedetails = Leave.listById(leave_id);\r\n String s=null;\r\n int prevDays = leavedetails.getNoLeaveDays();\r\n if (emp != null) {\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n Date leave_from = sdf.parse(start_date);\r\n Date leave_to = sdf.parse(end_date);\r\n Calendar start = Calendar.getInstance();\r\n start.setTime(leave_from);\r\n Calendar end = Calendar.getInstance();\r\n end.setTime(leave_to);\r\n int counts = 0;\r\n for (Date date = start.getTime(); start.before(end); start.add(Calendar.DATE, 1), date = start.getTime()) {\r\n Calendar c = Calendar.getInstance();\r\n c.setTime(date);\r\n int dayOfWeek = c.get(Calendar.DAY_OF_WEEK);\r\n if (dayOfWeek == 1 || dayOfWeek == 7) {\r\n counts++;\r\n}\r\n }\r\n System.out.println(counts);\r\n long diff1 = leave_to.getTime() - leave_from.getTime();\r\n System.out.println(diff1);\r\n long day1 = diff1 / (1000 * 60 * 60 * 24);\r\n Date today = new Date();\r\n String appliedOn = sdf.format(today);\r\n day1 = day1 + 1;\r\n long availBalance = 0;\r\n long diff = 0;\r\n long updLeave = 0;\r\n String leaveStatus = null;\r\n // int overl = Leave.countNo(empId,start_date,end_date);\r\n availBalance = emp.getavailleaves();\r\n diff = availBalance - day1;\r\n updLeave = day1 - counts;\r\n int bal = (int) updLeave;\r\n if (empId != Leave.listById(leave_id).getEmployeeId()) {\r\n s=\"You are not authorised to update this leave.\";\r\n } else if (day1 <= 0) {\r\n s=\"Start Date Must be Greater than EndDate...\";\r\n } else if (diff < 0) {\r\n s=\"insufficient leave balance\";\r\n } else if (no_ldays != day1) {\r\n s=\"NO Of day Should be right\";\r\n } else if (leave_from.compareTo(sdf.parse(appliedOn)) < 0) {\r\n s=\"Start should be greater or equal to current date\";\r\n } else {\r\n if (emp.getMgr_id() == 0) {\r\n leaveStatus = \"APPROVED\";\r\n dao().update_leave(start_date, end_date, bal,\r\n leave_type, leaveStatus, leave_reason, leave_id);\r\n s=\"Leave updated Successfully...\";\r\n } else {\r\n leaveStatus = \"PENDING\";\r\n dao().update_leave(start_date, end_date, bal,\r\n leave_type, leaveStatus, leave_reason, leave_id);\r\n if (bal - prevDays > 0) {\r\n bal = bal - prevDays;\r\n edao().decrement(empId, bal);\r\n } else if (bal - prevDays < 0) {\r\n bal = prevDays - bal;\r\n edao().increment(empId, bal);\r\n } else {\r\n bal = bal - prevDays;\r\n edao().decrement(empId, bal);\r\n }\r\n System.out.println(\"Leave updated Successfully For \" + (day1 - counts) + \" day.\");\r\n }\r\n }\r\n } else {\r\n s=\"invalid employee\";\r\n }\r\n return s;\r\n }", "int updateByPrimaryKey(ExamineApproveResult record);", "public int Editcomp(Long comp_id, String compname, String address, String city,\r\n\t\tString state, Long offno, Long faxno, String website, String e_mail) throws SQLException {\nint i =DbConnect.getStatement().executeUpdate(\"update company set address='\"+address+\"',city='\"+city+\"',state='\"+state+\"',offno=\"+offno+\",faxno=\"+faxno+\",website='\"+website+\"',email='\"+e_mail+\"'where comp_id=\"+comp_id+\" \");\r\n\treturn i;\r\n}", "public static void updateManualEncumAppAmt(EscmProposalMgmt proposalmgmt, Boolean iscancel) {\n\n try {\n EscmProposalMgmt baseProposalObj = proposalmgmt.getEscmBaseproposal();\n OBContext.setAdminMode();\n List<EscmProposalmgmtLine> prolineList = proposalmgmt.getEscmProposalmgmtLineList();\n // checking with propsal line\n if (baseProposalObj == null) {\n for (EscmProposalmgmtLine proposalline : prolineList) {\n if (!proposalline.isSummary()) {\n EfinBudgetManencumlines encline = proposalline.getEfinBudgmanencumline();\n if (encline != null) {\n if (\"PAWD\".equals(proposalmgmt.getProposalstatus())) {\n encline.setAPPAmt(encline.getAPPAmt().subtract(proposalline.getAwardedamount()));\n } else {\n encline.setAPPAmt(encline.getAPPAmt().subtract(proposalline.getLineTotal()));\n }\n OBDal.getInstance().save(encline);\n }\n if (iscancel) {\n // BidManagementDAO.insertEncumbranceModification(encline,\n // proposalline.getLineTotal().negate(), null, \"PRO\", null, null);\n } else {\n proposalline.setEfinBudgmanencumline(null);\n OBDal.getInstance().save(proposalline);\n }\n }\n }\n } else if (baseProposalObj != null) {\n for (EscmProposalmgmtLine lines : prolineList) {\n if (!lines.isSummary()) {\n if (lines.getStatus() == null) {\n EfinBudgetManencumlines encline = lines.getEscmOldProposalline()\n .getEfinBudgmanencumline();\n // if reserved then consider new proposal line total\n BigDecimal amountDiffernce = lines.getEscmOldProposalline().getLineTotal()\n .subtract(lines.getLineTotal());\n\n // update in remaining amount\n EfinBudgetManencumlines encumLn = Utility.getObject(EfinBudgetManencumlines.class,\n encline.getId());\n encumLn.setAPPAmt(encumLn.getAPPAmt().add(amountDiffernce));\n encumLn.setRemainingAmount(encumLn.getRemainingAmount().subtract(amountDiffernce));\n OBDal.getInstance().save(encumLn);\n } else if (lines.getStatus() != null && lines.getEscmOldProposalline() != null\n && lines.getEscmOldProposalline().getStatus() == null) {\n EfinBudgetManencumlines encline = lines.getEscmOldProposalline()\n .getEfinBudgmanencumline();\n // if reserved then consider new proposal line total\n BigDecimal amountDiffernce = lines.getEscmOldProposalline().getLineTotal();\n\n // update in remaining amount\n EfinBudgetManencumlines encumLn = Utility.getObject(EfinBudgetManencumlines.class,\n encline.getId());\n encumLn.setAPPAmt(encumLn.getAPPAmt().add(amountDiffernce));\n encumLn.setRemainingAmount(encumLn.getRemainingAmount().subtract(amountDiffernce));\n OBDal.getInstance().save(encumLn);\n }\n }\n }\n }\n\n } catch (final Exception e) {\n log.error(\"Exception in updateManualEncumAppAmt after Reject : \", e);\n } finally {\n OBContext.restorePreviousMode();\n }\n }", "int updateByPrimaryKeySelective(ExamineApproveResult record);", "@Override\n\tpublic int updblu(ApplicationEntity App) {\n\t\tint id=App.A_id;\n\t\tString zt=null;\n\t\tApplicationEntity app=appdao.selectappById(id);\n\t\tif(\"0\".equals(app.A_state)){\n\t\t\t zt=\"2\";\n\t\t\t\n\t\t}\n\t\tApplicationEntity app1=new ApplicationEntity();\n\t\tapp1.A_state=zt;\n\t\tapp1.A_id=id;\n\t\treturn appdao.updapp(app1);\n\t}", "int updateByPrimaryKey(CompanyExtend record);", "void updatePurchaseOrderLinkedSaleOrderStatus(long pohId);", "public boolean processData(LeaveEncashmentProcess leaveEncashProcess) {\n\t\tboolean result = false;\r\n\t\ttry {\r\n\r\n\t\t\tObject encashQueryObj[][] = null;\r\n\t\t\tArrayList list = new ArrayList();\r\n\t\t\tObject empObj[][] = null;\r\n\t\t\tObject empIdsObj[][] = getEmpIdsAndPolicyCodes(leaveEncashProcess);\r\n\r\n\t\t\tString month = leaveEncashProcess.getSalarymonth();\r\n\t\t\tString fromYear = leaveEncashProcess.getSalaryyear();\r\n\t\t\tString toYear = \"\";\r\n\t\t\tif(Integer.parseInt(month) < 4){\r\n\t\t\t\ttoYear = fromYear;\r\n\t\t\t\tfromYear = String.valueOf((Integer.parseInt(fromYear) - 1));\r\n\t\t\t} else{\r\n\t\t\t\ttoYear = String.valueOf((Integer.parseInt(fromYear) + 1));\r\n\t\t\t}\r\n\r\n\t\t\tdouble totalEncashAmt = 0.0; \r\n\t\t\tif (empIdsObj != null && empIdsObj.length > 0) {\r\n\t\t\t\t\r\n\t\t\t\tfor (int j = 0; j < empIdsObj.length; j++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tString policyCode = \" SELECT HRMS_LEAVE_POLICY_TEMP.LEAVE_POLICY_CODE FROM HRMS_LEAVE_POLICY_TEMP \"\r\n\t\t\t\t\t\t\t+ \" WHERE HRMS_LEAVE_POLICY_TEMP.EMP_ID=\"\r\n\t\t\t\t\t\t\t+ String.valueOf(empIdsObj[j][0]);\r\n\t\t\t\t\tObject policy_CodeObj[][] = getSqlModel().getSingleResult(\r\n\t\t\t\t\t\t\tpolicyCode);\r\n\r\n\t\t\t\t\tif (policy_CodeObj != null && policy_CodeObj.length > 0) {\r\n\r\n\t\t\t\t\t\tString encashQuery = \" SELECT DISTINCT NVL(HRMS_EMP_OFFC.EMP_TOKEN,' '),NVL(HRMS_EMP_OFFC.EMP_FNAME,' ')||' '||NVL(HRMS_EMP_OFFC.EMP_MNAME,' ')||' '||NVL(HRMS_EMP_OFFC.EMP_LNAME,' ') NAME,TO_CHAR(LEAVE_NAME) ,NVL(LEAVE_CLOSING_BALANCE,0) AS AVAILABLE_BALANCE, \"\r\n\t\t\t\t\t\t\t\t+ \" NVL(LEAVE_CLOSING_BALANCE,0)-\"\r\n\t\t\t\t\t\t\t\t+ leaveEncashProcess.getGreaterEncashBal()\r\n\t\t\t\t\t\t\t\t+ \" ENCASH_BAL,HRMS_LEAVE.LEAVE_ID, \"\r\n\t\t\t\t\t\t\t\t+ \" HRMS_LEAVE_POLICY_DTL.LEAVE_ENC_FORMULA ,HRMS_EMP_OFFC.EMP_ID, NVL(HRMS_EMP_OFFC.EMP_GENDER,'') \"\r\n\t\t\t\t\t\t\t\t+ \" FROM HRMS_LEAVE \"\r\n\t\t\t\t\t\t\t\t+ \" LEFT JOIN HRMS_LEAVE_BALANCE ON(HRMS_LEAVE.LEAVE_ID=HRMS_LEAVE_BALANCE.LEAVE_CODE AND EMP_ID =\"\r\n\t\t\t\t\t\t\t\t+ String.valueOf(empIdsObj[j][0])\r\n\t\t\t\t\t\t\t\t+ \") \"\r\n\t\t\t\t\t\t\t\t+ \" LEFT JOIN HRMS_EMP_OFFC ON(HRMS_LEAVE_BALANCE.EMP_ID=HRMS_EMP_OFFC.EMP_ID) \"\r\n\t\t\t\t\t\t\t\t+ \" INNER JOIN HRMS_LEAVE_POLICY_DTL ON(HRMS_LEAVE_POLICY_DTL.LEAVE_CODE=HRMS_LEAVE_BALANCE.LEAVE_CODE \"\r\n\t\t\t\t\t\t\t\t+ \" AND LEAVE_APPLICABLE='Y' AND LEAVE_ENC_FLAG='Y'AND HRMS_LEAVE_POLICY_DTL.LEAVE_POLICY_CODE=\"\r\n\t\t\t\t\t\t\t\t+ String.valueOf(policy_CodeObj[0][0])\r\n\t\t\t\t\t\t\t\t+ \") \"\r\n\t\t\t\t\t\t\t\t+ \" AND HRMS_LEAVE_BALANCE.LEAVE_CLOSING_BALANCE >\"\r\n\t\t\t\t\t\t\t\t+ leaveEncashProcess.getGreaterEncashBal()\r\n\t\t\t\t\t\t\t\t+ \" \"\r\n\t\t\t\t\t\t\t\t+ \" AND HRMS_LEAVE_BALANCE.LEAVE_CODE IN(\"\r\n\t\t\t\t\t\t\t\t+ leaveEncashProcess.getLevCode()\r\n\t\t\t\t\t\t\t\t+ \") AND LEAVE_ENC_FORMULA IS NOT NULL ORDER BY LEAVE_ID \";\r\n\r\n\t\t\t\t\t\tencashQueryObj = getSqlModel().getSingleResult(encashQuery);\r\n\r\n\t\t\t\t\t\tif (encashQueryObj != null && encashQueryObj.length > 0) {\r\n\t\t\t\t\t\t\tfor (int e = 0; e < encashQueryObj.length; e++) {\r\n\r\n\t\t\t\t\t\t\t\tempObj = new Object[1][3];\r\n\t\t\t\t\t\t\t\tempObj[0][0] = String.valueOf(empIdsObj[j][0]);\r\n\t\t\t\t\t\t\t\tempObj[0][1] = \"0\";\r\n\t\t\t\t\t\t\t\tempObj[0][2] = \"\";\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tresult = true;\r\n\t\t\t\t\t\t\t\tLeaveEncashmentProcess bean = new LeaveEncashmentProcess();\r\n\t\t\t\t\t\t\t\tbean.setSrNo(String.valueOf(e + 1));\r\n\t\t\t\t\t\t\t\tbean.setEmpToken(checkNull(String.valueOf(encashQueryObj[e][0])));\r\n\t\t\t\t\t\t\t\tbean.setEmpName(checkNull(String.valueOf(encashQueryObj[e][1])));\r\n\t\t\t\t\t\t\t\tbean.setLeaveName(checkNull(String.valueOf(encashQueryObj[e][2])));\r\n\t\t\t\t\t\t\t\tbean.setAvailableBal(checkNull(String.valueOf(encashQueryObj[e][3])));\r\n\t\t\t\t\t\t\t\tbean.setNoOfencashLeave(String.valueOf(encashQueryObj[e][4]));\r\n\t\t\t\t\t\t\t\tbean.setLeaveCode(checkNull(String.valueOf(encashQueryObj[e][5])));\r\n\t\t\t\t\t\t\t\tbean.setEncashFormula(checkNull(String.valueOf(encashQueryObj[e][6])));\r\n\t\t\t\t\t\t\t\tbean.setEmployeeId(checkNull(String.valueOf(encashQueryObj[e][7])));\r\n\t\t\t\t\t\t\t\tbean.setHiddenEncashDays(\"0\");\r\n\t\t\t\t\t\t\t\tbean.setCurrentBal(checkNull(String.valueOf(encashQueryObj[e][3])));\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\tdouble amount = 0;\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tamount = Utility.expressionEvaluate(new Utility()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.generateFormula(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString.valueOf(encashQueryObj[e][7]),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString.valueOf(encashQueryObj[e][6]),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext, session));\r\n\t\t\t\t\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tlogger.info(\"Value of amount \"\r\n\t\t\t\t\t\t\t\t\t\t+ amount);\r\n\t\t\t\t\t\t\t\tbean.setAmtPerDay(String.valueOf((amount)));\r\n\t\t\t\t\t\t\t\tdouble totAmt = 0;\r\n\t\t\t\t\t\t\t\tdouble noOfEncashLeave = Double\r\n\t\t\t\t\t\t\t\t\t\t.parseDouble(String.valueOf(String\r\n\t\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][4])));\r\n\t\t\t\t\t\t\t\tlogger.info(\"Value of noOfEncashLeave \"\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ noOfEncashLeave);\r\n\r\n\t\t\t\t\t\t\t\ttotAmt = (amount) * noOfEncashLeave;\r\n\r\n\t\t\t\t\t\t\t\tlogger.info(\"Value of totAmt \"\r\n\t\t\t\t\t\t\t\t\t\t+ totAmt);\r\n\t\t\t\t\t\t\t\tbean.setEncashAmount(formatter.format(Double.parseDouble(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t.valueOf(Math.round(totAmt))))));\r\n\t\t\t\t\t\t\t\tbean.setEmpGender(String.valueOf(encashQueryObj[e][8]));\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(leaveEncashProcess.getDeductIncomeTax().equals(\"true\")){\r\n\t\t\t\t\t\t\t\t\tempObj[0][1] = Math.round(totAmt);\r\n\t\t\t\t\t\t\t\t\tempObj[0][2] = String.valueOf(encashQueryObj[e][8]);\r\n\t\t\t\t\t\t\t\t\temployeeTaxCalculation.initiate(context, session);\r\n\t\t\t\t\t\t\t\t\tObject[][] empTdsObject = employeeTaxCalculation.getEmpSlabTaxAmount(empObj,fromYear,toYear);\r\n\t\t\t\t\t\t\t\t\tif(empTdsObject != null && empTdsObject.length > 0 && list != null){\r\n\t\t\t\t\t\t\t\t\t\tbean.setNetAmount(formatter.format(Double.parseDouble((empTdsObject[0][1]).toString())));\r\n\t\t\t\t\t\t\t\t\t\tbean.setTds(formatter.format(Double.parseDouble((empTdsObject[0][2]).toString())));\r\n\t\t\t\t\t\t\t\t\t\tbean.setDeductIncomeTax(\"true\");\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\tbean.setNetAmount(\"0.00\");\r\n\t\t\t\t\t\t\t\t\tbean.setTds(\"0.00\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tlist.add(bean);\r\n\t\t\t\t\t\t\t\ttotalEncashAmt = totalEncashAmt + totAmt;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tleaveEncashProcess.setList(list);\r\n\t\t\t\tleaveEncashProcess.setTotalEncashAmt(formatter.format(Double.parseDouble(String.valueOf(totalEncashAmt))));\r\n\t\t\t}\r\n\r\n\t\t\tString delTempQueryAfter = \" DELETE FROM HRMS_LEAVE_POLICY_TEMP \";\r\n\t\t\tgetSqlModel().singleExecute(delTempQueryAfter);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "private static Map<String, Object> storePaymentApplication(Delegator delegator, GenericValue paymentApplication, Locale locale) {\n Map<String, Object> results = ServiceUtil.returnSuccess(UtilProperties.getMessage(RESOURCE,\n \"AccountingSuccessful\", locale));\n boolean debug = true;\n if (debug) {\n Debug.logInfo(\"Start updating the paymentApplication table \", MODULE);\n }\n\n if (DECIMALS == -1 || ROUNDING == null) {\n return ServiceUtil.returnError(UtilProperties.getMessage(RESOURCE,\n \"AccountingAritmeticPropertiesNotConfigured\", locale));\n }\n\n // check if a record already exists with this data\n List<GenericValue> checkAppls = null;\n try {\n checkAppls = EntityQuery.use(delegator).from(\"PaymentApplication\")\n .where(\"invoiceId\", paymentApplication.get(\"invoiceId\"),\n \"invoiceItemSeqId\", paymentApplication.get(\"invoiceItemSeqId\"),\n \"billingAccountId\", paymentApplication.get(\"billingAccountId\"),\n \"paymentId\", paymentApplication.get(\"paymentId\"),\n \"toPaymentId\", paymentApplication.get(\"toPaymentId\"),\n \"taxAuthGeoId\", paymentApplication.get(\"taxAuthGeoId\"))\n .queryList();\n } catch (GenericEntityException e) {\n return ServiceUtil.returnError(e.getMessage());\n }\n if (!checkAppls.isEmpty()) {\n if (debug) {\n Debug.logInfo(checkAppls.size() + \" records already exist\", MODULE);\n }\n // 1 record exists just update and if different ID delete other record and add together.\n GenericValue checkAppl = checkAppls.get(0);\n // if new record add to the already existing one.\n if (paymentApplication.get(\"paymentApplicationId\") == null) {\n // add 2 amounts together\n checkAppl.set(\"amountApplied\", paymentApplication.getBigDecimal(\"amountApplied\")\n .add(checkAppl.getBigDecimal(\"amountApplied\")).setScale(DECIMALS, ROUNDING));\n if (debug) {\n Debug.logInfo(\"Update paymentApplication record: \" + checkAppl.getString(\"paymentApplicationId\") + \" with appliedAmount:\"\n + checkAppl.getBigDecimal(\"amountApplied\"), MODULE);\n }\n try {\n checkAppl.store();\n } catch (GenericEntityException e) {\n return ServiceUtil.returnError(e.getMessage());\n }\n } else if (paymentApplication.getString(\"paymentApplicationId\").equals(checkAppl.getString(\"paymentApplicationId\"))) {\n // update existing record in-place\n checkAppl.set(\"amountApplied\", paymentApplication.getBigDecimal(\"amountApplied\"));\n if (debug) {\n Debug.logInfo(\"Update paymentApplication record: \" + checkAppl.getString(\"paymentApplicationId\") + \" with appliedAmount:\"\n + checkAppl.getBigDecimal(\"amountApplied\"), MODULE);\n }\n try {\n checkAppl.store();\n } catch (GenericEntityException e) {\n return ServiceUtil.returnError(e.getMessage());\n }\n } else { // two existing records, an updated one added to the existing one\n // add 2 amounts together\n checkAppl.set(\"amountApplied\", paymentApplication.getBigDecimal(\"amountApplied\")\n .add(checkAppl.getBigDecimal(\"amountApplied\")).setScale(DECIMALS, ROUNDING));\n // delete paymentApplication record and update the checkAppls one.\n if (debug) {\n Debug.logInfo(\"Delete paymentApplication record: \" + paymentApplication.getString(\"paymentApplicationId\") + \" with \"\n + \"appliedAmount:\" + paymentApplication.getBigDecimal(\"amountApplied\"), MODULE);\n }\n try {\n paymentApplication.remove();\n } catch (GenericEntityException e) {\n return ServiceUtil.returnError(e.getMessage());\n }\n // update amount existing record\n if (debug) {\n Debug.logInfo(\"Update paymentApplication record: \" + checkAppl.getString(\"paymentApplicationId\") + \" with appliedAmount:\"\n + checkAppl.getBigDecimal(\"amountApplied\"), MODULE);\n }\n try {\n checkAppl.store();\n } catch (GenericEntityException e) {\n return ServiceUtil.returnError(e.getMessage());\n }\n }\n } else {\n if (debug) {\n Debug.logInfo(\"No records found with paymentId, invoiceid..etc probaly changed one of them...\", MODULE);\n }\n // create record if ID null;\n if (paymentApplication.get(\"paymentApplicationId\") == null) {\n paymentApplication.set(\"paymentApplicationId\", delegator.getNextSeqId(\"PaymentApplication\"));\n if (debug) {\n Debug.logInfo(\"Create new paymentAppication record: \" + paymentApplication.getString(\"paymentApplicationId\") + \" with \"\n + \"appliedAmount:\" + paymentApplication.getBigDecimal(\"amountApplied\"), MODULE);\n }\n try {\n paymentApplication.create();\n } catch (GenericEntityException e) {\n return ServiceUtil.returnError(e.getMessage());\n }\n } else {\n // update existing record (could not be found because a non existing combination of paymentId/invoiceId/invoiceSeqId/ etc... was\n // provided\n if (debug) {\n Debug.logInfo(\"Update existing paymentApplication record: \" + paymentApplication.getString(\"paymentApplicationId\") + \" with \"\n + \"appliedAmount:\" + paymentApplication.getBigDecimal(\"amountApplied\"), MODULE);\n }\n try {\n paymentApplication.store();\n } catch (GenericEntityException e) {\n return ServiceUtil.returnError(e.getMessage());\n }\n }\n }\n return results;\n }", "int updateByPrimaryKey(PensionRoleMenu record);", "public boolean addEmployee(String[] srNo, String[] empToken,\r\n\t\t\tString[] employeeId, String[] empName, String[] leaveCode,\r\n\t\t\tString[] leaveName, String[] availableBal,\r\n\t\t\tString[] noOfencashLeave, String[] encashFormula,\r\n\t\t\tString[] encashAmount, String[] amtPerDay, String[] oldEncashDays,\r\n\t\t\tString[] currentBal, String[] addFlagItt, LeaveEncashmentProcess leaveEncashProcess,\r\n\t\t\tString[] tds, String[] netAmount, String[] gender) {\n\t\tObject[][] encashQueryObj = null;\r\n\t\tArrayList list = new ArrayList();\r\n\t\tboolean result = false;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tString policyCode = getLeavePolicyCode(leaveEncashProcess\r\n\t\t\t\t\t.getEmployeeCode());\r\n\t\t\tdouble totalEncashAmt = 0.0d;\r\n\t\t\tif(encashAmount != null && encashAmount.length > 0){\r\n\t\t\t\tfor (int i = 0; i < encashAmount.length; i++) {\r\n\t\t\t\t\ttotalEncashAmt = totalEncashAmt + Double.parseDouble(String.valueOf(encashAmount[i]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (policyCode != null && policyCode.length() > 0) {\r\n\t\t\t\tString encashQuery = \" SELECT NVL(HRMS_EMP_OFFC.EMP_TOKEN,' '),NVL(HRMS_EMP_OFFC.EMP_FNAME,' ')||' '||NVL(HRMS_EMP_OFFC.EMP_MNAME,' ')||' '||NVL(HRMS_EMP_OFFC.EMP_LNAME,' ') NAME,TO_CHAR(LEAVE_NAME) ,NVL(LEAVE_CLOSING_BALANCE,0) AS AVAILABLE_BALANCE, \"\r\n\t\t\t\t\t\t+ \" NVL(LEAVE_CLOSING_BALANCE,0)-\"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getGreaterEncashBal()\r\n\t\t\t\t\t\t+ \" ENCASH_BAL,HRMS_LEAVE.LEAVE_ID, \"\r\n\t\t\t\t\t\t+ \" HRMS_LEAVE_POLICY_DTL.LEAVE_ENC_FORMULA ,HRMS_EMP_OFFC.EMP_ID, NVL(HRMS_EMP_OFFC.EMP_GENDER,'') \"\r\n\t\t\t\t\t\t+ \" FROM HRMS_LEAVE \"\r\n\t\t\t\t\t\t+ \" LEFT JOIN HRMS_LEAVE_BALANCE ON(HRMS_LEAVE.LEAVE_ID=HRMS_LEAVE_BALANCE.LEAVE_CODE AND EMP_ID =\"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getEmployeeCode()\r\n\t\t\t\t\t\t+ \") \"\r\n\t\t\t\t\t\t+ \" LEFT JOIN HRMS_EMP_OFFC ON(HRMS_LEAVE_BALANCE.EMP_ID=HRMS_EMP_OFFC.EMP_ID) \"\r\n\t\t\t\t\t\t+ \" INNER JOIN HRMS_LEAVE_POLICY_DTL ON(HRMS_LEAVE_POLICY_DTL.LEAVE_CODE=HRMS_LEAVE_BALANCE.LEAVE_CODE \"\r\n\t\t\t\t\t\t+ \" AND LEAVE_APPLICABLE='Y' AND LEAVE_ENC_FLAG='Y'AND HRMS_LEAVE_POLICY_DTL.LEAVE_POLICY_CODE=\"\r\n\t\t\t\t\t\t+ policyCode\r\n\t\t\t\t\t\t+ \")\"\r\n\t\t\t\t\t\t+ \" AND HRMS_LEAVE_BALANCE.LEAVE_CLOSING_BALANCE >\"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getGreaterEncashBal()\r\n\t\t\t\t\t\t+ \" \"\r\n\t\t\t\t\t\t+ \" AND HRMS_LEAVE_BALANCE.LEAVE_CODE IN(\"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getLevCode()\r\n\t\t\t\t\t\t+ \") AND LEAVE_ENC_FORMULA IS NOT NULL ORDER BY LEAVE_ID \";\r\n\r\n\t\t\t\tencashQueryObj = getSqlModel().getSingleResult(encashQuery);\r\n\r\n\t\t\t\tLeaveEncashmentProcess bean = null;\r\n\r\n\t\t\t\tint dtlCode = 0;\r\n\r\n\t\t\t\tif (encashQueryObj != null && encashQueryObj.length > 0) {\r\n\t\t\t\t\tArrayList List = null;\r\n\t\t\t\t\tList = displayNewValue(srNo, empToken,\r\n\t\t\t\t\t\t\temployeeId, empName, leaveCode, leaveName,\r\n\t\t\t\t\t\t\tavailableBal, noOfencashLeave, encashFormula,\r\n\t\t\t\t\t\t\tencashAmount, amtPerDay, oldEncashDays,currentBal,addFlagItt,\r\n\t\t\t\t\t\t\tleaveEncashProcess, tds, netAmount, gender);\r\n\t\t\t\t\tfor (int e = 0; e < encashQueryObj.length; e++) {\r\n\r\n\t\t\t\t\t\tresult = true;\r\n\t\t\t\t\t\tbean = new LeaveEncashmentProcess();\r\n\t\t\t\t\t\tbean.setEmpToken(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][0])));\r\n\t\t\t\t\t\tbean.setEmpName(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][1])));\r\n\t\t\t\t\t\tbean.setLeaveName(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][2])));\r\n\t\t\t\t\t\tbean.setAvailableBal(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][3])));\r\n\t\t\t\t\t\tbean.setNoOfencashLeave(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][4]));\r\n\t\t\t\t\t\tbean.setLeaveCode(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][5])));\r\n\t\t\t\t\t\tbean.setEncashFormula(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][6])));\r\n\t\t\t\t\t\tbean.setEmployeeId(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][7])));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tbean.setEmpGender(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][8])));\r\n\t\t\t\t\t\tbean.setAddFlagItt(\"Y\");\r\n\t\t\t\t\t\tbean.setHiddenEncashDays(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][4]));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tbean.setCurrentBal(checkNull(String\r\n\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][3])));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdtlCode++;\r\n\r\n\t\t\t\t\t\tdouble amount = 0;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tamount = Utility.expressionEvaluate(new Utility()\r\n\t\t\t\t\t\t\t\t\t.generateFormula(leaveEncashProcess\r\n\t\t\t\t\t\t\t\t\t\t\t.getEmployeeCode(), String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][6]),\r\n\t\t\t\t\t\t\t\t\t\t\tcontext, session));\r\n\t\t\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tlogger\r\n\t\t\t\t\t\t\t\t.info(\"Value of amount \"\r\n\t\t\t\t\t\t\t\t\t\t+ amount);\r\n\t\t\t\t\t\tbean.setAmtPerDay(String.valueOf((amount)));\r\n\t\t\t\t\t\tdouble totAmt = 0;\r\n\t\t\t\t\t\tdouble noOfEncashLeave = Double.parseDouble(String\r\n\t\t\t\t\t\t\t\t.valueOf(String.valueOf(encashQueryObj[e][4])));\r\n\t\t\t\t\t\tlogger.info(\"Value of noOfEncashLeave \"\r\n\t\t\t\t\t\t\t\t+ noOfEncashLeave);\r\n\r\n\t\t\t\t\t\ttotAmt = (amount) * noOfEncashLeave;\r\n\r\n\t\t\t\t\t\tlogger\r\n\t\t\t\t\t\t\t\t.info(\"Value of totAmt \"\r\n\t\t\t\t\t\t\t\t\t\t+ totAmt);\r\n\t\t\t\t\t\tbean.setEncashAmount(checkNull(String.valueOf(Math\r\n\t\t\t\t\t\t\t\t.round(totAmt))));\r\n\t\t\t\t\t\t// list.add(bean);\r\n\t\t\t\t\t//}\r\n\t\t\t\t\t\ttotalEncashAmt = totalEncashAmt + totAmt;\r\n\t\t\t\t\t\tif(leaveEncashProcess.getDeductIncomeTax().equals(\"true\")){\r\n\t\t\t\t\t\t\tObject[][] empObj = new Object[1][3];\r\n\t\t\t\t\t\t\tString month = leaveEncashProcess.getSalarymonth();\r\n\t\t\t\t\t\t\tString fromYear = leaveEncashProcess.getSalaryyear();\r\n\t\t\t\t\t\t\tString toYear = \"\";\r\n\t\t\t\t\t\t\tif(Integer.parseInt(month) < 4){\r\n\t\t\t\t\t\t\t\ttoYear = fromYear;\r\n\t\t\t\t\t\t\t\tfromYear = String.valueOf((Integer.parseInt(fromYear) - 1));\r\n\t\t\t\t\t\t\t} else{\r\n\t\t\t\t\t\t\t\ttoYear = String.valueOf((Integer.parseInt(fromYear) + 1));\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tempObj[0][0] = String.valueOf(checkNull(String.valueOf(encashQueryObj[e][7])));\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tempObj[0][1] = Math.round(totAmt);\r\n\t\t\t\t\t\t\tempObj[0][2] = String.valueOf(encashQueryObj[e][8]);\r\n\t\t\t\t\t\t\temployeeTaxCalculation.initiate(context, session);\r\n\t\t\t\t\t\t\tObject[][] empTdsObject = employeeTaxCalculation.getEmpSlabTaxAmount(empObj,fromYear,toYear);\r\n\t\t\t\t\t\t\tif(empTdsObject != null && empTdsObject.length > 0 && list != null){\r\n\t\t\t\t\t\t\t\tbean.setNetAmount(formatter.format(Double.parseDouble((empTdsObject[0][1]).toString())));\r\n\t\t\t\t\t\t\t\tbean.setTds(formatter.format(Double.parseDouble((empTdsObject[0][2]).toString())));\r\n\t\t\t\t\t\t\t\tbean.setDeductIncomeTax(\"true\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tbean.setNetAmount(\"0.00\");\r\n\t\t\t\t\t\t\tbean.setTds(\"0.00\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tbean.setSrNo(String.valueOf(List.size() + 1));// sr no\r\n\r\n\t\t\t\t\tList.add(bean);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// leaveList.add(uploadLinks);\r\n\t\t\t\t\tleaveEncashProcess.setList(List);\r\n\t\t\t\t\tleaveEncashProcess.setTotalEncashAmt(formatter.format(Double.parseDouble(checkNull(String.valueOf(totalEncashAmt)))));\r\n\r\n\t\t\t\t\t// leaveEncashProcess.setList(list);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}", "public static String approveDeny(int leave_id,int empId,EnumLeaveStatus l_status) {\r\n Leave ld = Leave.listById(leave_id);\r\n String s=null;\r\n if (ld != null) {\r\n int noOfDays = ld.getNoLeaveDays();\r\n int emplId = ld.getEmployeeId();\r\n int empdId = Leave.showManager(leave_id);\r\n String dbStatus = null;\r\n System.out.println(l_status);\r\n System.out.println(ld.getLeaveStatus());\r\n if (empId != empdId) {\r\n s=\"You are not authorised to access this employee.\";\r\n return s;\r\n }\r\n if (l_status.equals(\"approved\") && ld.getLeaveStatus().equals(l_status.pending)) {\r\n dbStatus = \"approved\";\r\n edao().decrement(emplId, noOfDays);\r\n dao().comment( dbStatus, leave_id);\r\n s=\"Leave Approved Successfully\";\r\n \r\n } else if (l_status.equals(\"denied\") && ld.getLeaveStatus().equals(l_status.approved)) {\r\n dbStatus = \"denied\";\r\n edao().increment(emplId, noOfDays);\r\n dao().comment( dbStatus, leave_id);\r\n s=\"Leave Rejected\";\r\n } else if (l_status.equals(\"approved\") && ld.getLeaveStatus().equals(l_status.denied)) {\r\n dbStatus = \"approved\";\r\n edao().decrement(emplId, noOfDays);\r\n dao().comment(dbStatus, leave_id);\r\n s=\"Leave Approved Successfully\";\r\n } else {\r\n if (l_status.equals(\"denied\") && ld.getLeaveStatus().equals(l_status.pending)) {\r\n dbStatus = \"denied\";\r\n edao().increment(emplId, noOfDays);\r\n dao().comment( dbStatus, leave_id);\r\n s=\"Leave Rejected\";\r\n } else {\r\n s=\"Already on given status\";\r\n }\r\n }\r\n } else {\r\n s=\"Invalid LeaveId\";\r\n }\r\n return s;\r\n }", "int updateByPrimaryKeySelective(CompanyExtend record);", "@Update({ \"update iiot_app_list\", \"set app_name = #{appName,jdbcType=VARCHAR},\", \"node = #{node,jdbcType=VARCHAR},\",\n\t\t\t\"status = #{status,jdbcType=INTEGER},\", \"restart_times = #{restartTimes,jdbcType=CHAR},\",\n\t\t\t\"up_time = #{upTime,jdbcType=VARCHAR},\", \"template = #{template,jdbcType=VARCHAR},\",\n\t\t\t\"owner = #{owner,jdbcType=VARCHAR},\", \"note = #{note,jdbcType=VARCHAR},\",\n\t\t\t\"rest3 = #{rest3,jdbcType=VARCHAR},\", \"rest4 = #{rest4,jdbcType=VARCHAR},\",\n\t\t\t\"rest5 = #{rest5,jdbcType=VARCHAR},\", \"create_time = #{createTime,jdbcType=TIMESTAMP},\",\n\t\t\t\"uuid = #{uuid,jdbcType=CHAR}\", \"where app_id = #{appId,jdbcType=INTEGER}\" })\n\tint updateByPrimaryKey(IiotAppList record);", "int updateByPrimaryKey(ErpOaLicKey record);", "public void syncApprovedApplicantsFromErp() {\n\t\tList<String> allErpCodes = applicationDao.getAllProcessedApplicationFileNos();\r\n\t\t// List<String> allErpCodes = Arrays.asList(\"C/20293\", \"C/20292\",\r\n\t\t// \"C/20390\");\r\n\t\tList<ApplicationSyncPayLoad> syncedApplicants = new ArrayList<>();\r\n\t\tint successCounter = 0;\r\n\t\tint totalToBeSynced = 0;\r\n\t\tif (!allErpCodes.isEmpty()) {\r\n\t\t\ttotalToBeSynced = allErpCodes.size();\r\n\t\t\tJSONArray mJSONArray = new JSONArray(allErpCodes);\r\n\r\n\t\t\t// Send this to ERP\r\n\t\t\ttry {\r\n\t\t\t\tString results = postErpCodesToERP(mJSONArray);\r\n\t\t\t\tif (results.equals(\"null\")) {\r\n\t\t\t\t\tlogger.error(\" ===>>><<<< === NO REPLY FROM ERP ===>><<<>>== \");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tJSONArray jo = null;\r\n\t\t\t\t\tjo = new JSONArray(results);\r\n\t\t\t\t\tfor (int i = 0; i < jo.length(); i++) {\r\n\t\t\t\t\t\tJSONObject jObject = null;\r\n\t\t\t\t\t\tjObject = jo.getJSONObject(i);\r\n\t\t\t\t\t\tApplicationSyncPayLoad syncPayLoad = new ApplicationSyncPayLoad();\r\n\t\t\t\t\t\tsyncPayLoad.setApplicationNo_(jObject.getString(\"Application No_\"));\r\n\t\t\t\t\t\tsyncPayLoad.setEmail(jObject.getString(\"email\"));\r\n\t\t\t\t\t\tsyncPayLoad.setReg_no(jObject.getString(\"reg_no\"));\r\n\t\t\t\t\t\tsyncedApplicants.add(syncPayLoad);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfor (ApplicationSyncPayLoad appSync : syncedApplicants) {\r\n\t\t\t\t\t\t// Update this Applications\r\n\t\t\t\t\t\tlogger.info(\"Finding application:\" + appSync.getApplicationNo_());\r\n\t\t\t\t\t\tList<ApplicationFormHeader> applications = applicationDao\r\n\t\t\t\t\t\t\t\t.findByErpCode(appSync.getApplicationNo_());\r\n\r\n\t\t\t\t\t\tApplicationFormHeader application = null;\r\n\t\t\t\t\t\tif (applications.size() > 0) {\r\n\t\t\t\t\t\t\tapplication = applications.get(0);\r\n\t\t\t\t\t\t\tif (application != null) {\r\n\t\t\t\t\t\t\t\t// Find the User and Member Object and User\r\n\t\t\t\t\t\t\t\tif (application.getUserRefId() != null) {\r\n\t\t\t\t\t\t\t\t\tlogger.info(\"marking this application as approved:\" + application.getRefId());\r\n\t\t\t\t\t\t\t\t\tapplication.setApplicationStatus(ApplicationStatus.APPROVED);\r\n\t\t\t\t\t\t\t\t\tUser user = userDao.findByUserId(application.getUserRefId(), false);\r\n\t\t\t\t\t\t\t\t\tMember m = null;\r\n\t\t\t\t\t\t\t\t\tif (user != null) {\r\n\t\t\t\t\t\t\t\t\t\tuser.setMemberNo(appSync.getReg_no());\r\n\t\t\t\t\t\t\t\t\t\tuserDao.deleteAllRolesForCurrentUser(user.getId());\r\n\t\t\t\t\t\t\t\t\t\tRole role = roleDao.getByName(\"MEMBER\");\r\n\t\t\t\t\t\t\t\t\t\tif (role != null) {\r\n\t\t\t\t\t\t\t\t\t\t\tuser.addRole(role);\r\n\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Changing the user role from basic_member to member.\");\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (user.getMember() != null) {\r\n\t\t\t\t\t\t\t\t\t\t\tm = user.getMember();\r\n\t\t\t\t\t\t\t\t\t\t\tm.setMemberNo(appSync.getReg_no());\r\n\t\t\t\t\t\t\t\t\t\t\tm.setRegistrationDate(application.getCreated());\r\n\t\t\t\t\t\t\t\t\t\t\tm.setUserRefId(user.getRefId());\r\n\t\t\t\t\t\t\t\t\t\t\tm.setMemberShipStatus(MembershipStatus.ACTIVE);\r\n\t\t\t\t\t\t\t\t\t\t\tm.setMemberQrCode(m.getRefId());\r\n\t\t\t\t\t\t\t\t\t\t\tuserDao.save(m);\r\n\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Updating member record.\");\r\n\t\t\t\t\t\t\t\t\t\t\t// Save all this parameters\r\n\t\t\t\t\t\t\t\t\t\t\t// Applicant, Member, User\r\n\t\t\t\t\t\t\t\t\t\t\tapplicationDao.save(application);\r\n\t\t\t\t\t\t\t\t\t\t\tuserDao.save(user);\r\n\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Updating user record.\");\r\n\t\t\t\t\t\t\t\t\t\t\tsuccessCounter = successCounter + 1;\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Member Record is Null for user with memberNo:\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ user.getMemberNo()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \". Checking if the member record exist or create a new record.\");\r\n\t\t\t\t\t\t\t\t\t\t\t// Check if there was a previous\r\n\t\t\t\t\t\t\t\t\t\t\t// member\r\n\t\t\t\t\t\t\t\t\t\t\t// Record created\r\n\t\t\t\t\t\t\t\t\t\t\tMember member = null;\r\n\t\t\t\t\t\t\t\t\t\t\tmember = memberDao.findByMemberNo(appSync.getReg_no());\r\n\t\t\t\t\t\t\t\t\t\t\tif (member == null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tmember = new Member();\r\n\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Member doesn't exist. Creating new MemberRecord\");\r\n\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Member already exist. Just ammending it.\");\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tmember.setMemberNo(appSync.getReg_no());\r\n\t\t\t\t\t\t\t\t\t\t\tmember.setRegistrationDate(application.getCreated());\r\n\t\t\t\t\t\t\t\t\t\t\tmember.setUserRefId(user.getRefId());\r\n\t\t\t\t\t\t\t\t\t\t\tmember.setMemberShipStatus(MembershipStatus.ACTIVE);\r\n\t\t\t\t\t\t\t\t\t\t\tmember.setMemberQrCode(member.getRefId());\r\n\t\t\t\t\t\t\t\t\t\t\tuserDao.save(member);\r\n\t\t\t\t\t\t\t\t\t\t\tuser.setMember(member);\r\n\t\t\t\t\t\t\t\t\t\t\t// Save all this parameters\r\n\t\t\t\t\t\t\t\t\t\t\t// Applicant, Member, User\r\n\t\t\t\t\t\t\t\t\t\t\tapplicationDao.save(application);\r\n\t\t\t\t\t\t\t\t\t\t\tuserDao.save(user);\r\n\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Updating user record.\");\r\n\t\t\t\t\t\t\t\t\t\t\tsuccessCounter = successCounter + 1;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tSystem.err.println(\"Total To Be Synced:\" + totalToBeSynced + \"\\n\");\r\n\t\t\t\t\tSystem.err.println(\"Total Success:\" + successCounter + \"\\n\");\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t} catch (URISyntaxException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (ParseException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (JSONException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean InsertPolicy(String appid, String category, String key, String value, long dueDate) {\n \tif(IS_DEBUG) Log.d(TAG,\"[InsertPolicy] appid: \"+appid+\", category : \"+category+\", key: \"+key+\", value: \"+value+\", due date:\"+dueDate);\n boolean bChanged = false;\n if(!TextUtils.isEmpty(appid) && !TextUtils.isEmpty(category) \n && !TextUtils.isEmpty(key) && !TextUtils.isEmpty(value)){\n \n final String whereClause = POLICY_APPID + \"=?\" + \" AND \" + POLICY_CATEGORY + \"=?\"\n + \" AND \" + POLICY_KEY + \"=?\";\n final String[] whereArgs = new String[]{appid, category, key};\n \n SQLiteDatabase db = null;\n Cursor c = null;\n try {\n db = getWritableDatabase();\n c = db.query(POLICY_TABLE_NAME, \n new String []{POLICY_ID, POLICY_VALUE, POLICY_DUE_DATE}, \n whereClause, \n whereArgs, \n null, null, null);\n // for existed policy, update the value and due date, therefore no need to update default value\n if(c != null && c.getCount() > 0 && c.moveToFirst()) {\n \tif(IS_DEBUG) Log.d(\"cursor[0]: \"+c.getInt(0)+\", cursor[1]: \"+c.getString(1)+\", cursor[2]: \"+c.getLong(2));\n //Has the previous SIE setting, no need to update\n if(dueDate==-1) bChanged=false;\n else if(!value.equals(c.getString(1)) || dueDate != c.getLong(2)) {\n int id = c.getInt(0);\n ContentValues values = new ContentValues();\n values.put(POLICY_VALUE, value);\n values.put(POLICY_DUE_DATE, dueDate);\n db.update(POLICY_TABLE_NAME, values, POLICY_ID+\"=?\", new String []{Integer.toString(id)});\n bChanged = true;\n }\n }\n else {\n // New policies,including those are default\n ContentValues values = new ContentValues();\n values.put(POLICY_APPID, appid);\n values.put(POLICY_CATEGORY, category);\n values.put(POLICY_KEY, key);\n values.put(POLICY_VALUE, value);\n values.put(POLICY_DUE_DATE, dueDate);\n // Default : values.put(POLICY_IS_DEFAULT,1)\n // Add one more column for default value\n if(dueDate==-1) //This is the default policy\n values.put(POLICY_DEFAULT_VALUE,value);\n db.insert(POLICY_TABLE_NAME, \"garbge\", values);\n bChanged = true;\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try{\n if(c != null){\n c.close();\n c = null;\n }\n if(db != null) {\n db.close();\n db = null;\n }\n } catch(Exception e) {}\n }\n }\n return bChanged;\n }", "private void createApplications(){\n Application application;\n Person applicant;\n Role role = roleRepository.findByName(\"applicant\");\n Status status = statusRepository.findByName(\"UNHANDLED\");\n java.sql.Date date = new java.sql.Date(Calendar.getInstance().getTime().getTime());\n\n for (Map.Entry<Long, Long> person : person.entrySet()){\n applicant = personRepository.findById(person.getValue());\n if(applicant.getUser().getRoles().contains(role)){\n Set<CompetenceProfile> competenceProfiles = new HashSet<>();\n Set<Availability> availabilities = new HashSet<>();\n for (Map.Entry<Long, Long> competenceProfile : competenceProfile.entrySet()){\n if(Objects.equals(competenceProfile.getValue(), person.getKey())){\n competenceProfiles.add(competenceProfileRepository.findById(competenceProfile.getKey()));\n }\n }\n for (Map.Entry<Long, Long> availabilitys : availability.entrySet()){\n if(Objects.equals(availabilitys.getValue(), person.getKey())){\n availabilities.add(availabilityRepository.findById(availabilitys.getKey()));\n }\n }\n application = applicationRepository.save(new Application(applicant, null, null, status, date));\n\n application = applicationRepository.findById(application.getId()).get(); //without re-finding this, the we get an optimistic locking error cause version changed within transaction. now new transaction starts and were fine\n application.setAvailabilities(availabilities);\n application.setCompetenceProfiles(competenceProfiles);\n applicationRepository.save(application);\n }\n }\n\n }", "public int Approvecomp(Long id) throws SQLException {\n\tLong idd=null;\r\n\trs=DbConnect.getStatement().executeQuery(\"select login_id from company where comp_id=\"+id+\"\");\r\n\tif(rs.next())\r\n\t{\r\n\t\tidd=rs.getLong(1);\r\n\t}\r\n\tSystem.out.println(idd);\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update login set status='approved' where login_id=\"+idd+\"\");\r\n\treturn i;\r\n\t\r\n}", "private void upgradeToDataApprovalWorkflows()\r\n {\r\n if ( executeSql( \"update dataset set approvedata = approvedata where datasetid < 0\" ) < 0 )\r\n {\r\n return; // Already converted because dataset.approvedata no longer exists.\r\n }\r\n\r\n executeSql( \"insert into dataapprovalworkflow ( workflowid, uid, created, lastupdated, name, periodtypeid, userid, publicaccess ) \"\r\n + \"select \" + statementBuilder.getAutoIncrementValue() + \", \" + statementBuilder.getUid() + \", now(), now(), ds.name, ds.periodtypeid, ds.userid, ds.publicaccess \"\r\n + \"from (select datasetid from dataset where approvedata = true union select distinct datasetid from dataapproval) as a \"\r\n + \"join dataset ds on ds.datasetid = a.datasetid\" );\r\n\r\n executeSql( \"insert into dataapprovalworkflowlevels (workflowid, dataapprovallevelid) \"\r\n + \"select w.workflowid, l.dataapprovallevelid from dataapprovalworkflow w \"\r\n + \"cross join dataapprovallevel l\" );\r\n\r\n executeSql( \"update dataset set workflowid = ( select w.workflowid from dataapprovalworkflow w where w.name = dataset.name)\" );\r\n executeSql( \"alter table dataset drop column approvedata cascade\" ); // Cascade to SQL Views, if any.\r\n\r\n executeSql( \"update dataapproval set workflowid = ( select ds.workflowid from dataset ds where ds.datasetid = dataapproval.datasetid)\" );\r\n executeSql( \"alter table dataapproval drop constraint dataapproval_unique_key\" );\r\n executeSql( \"alter table dataapproval drop column datasetid cascade\" ); // Cascade to SQL Views, if any.\r\n\r\n log.info( \"Added any workflows needed for approvble datasets and/or approved data.\" );\r\n }", "@Override\n\tpublic void updateComfirmPeo(Integer comfirm_peo, String bc_id) {\n\t\t\n\t}", "int updateByPrimaryKeySelective(DrpCommissionRule record);", "int updateByPrimaryKeySelective(ApplicationDO record);", "int updateByPrimaryKeySelective(PensionRoleMenu record);", "int updateByPrimaryKey(BusinessRepayment record);", "int updateByPrimaryKey(ActivityHongbaoPrize record);", "int updateByPrimaryKey(PaymentTrade record);", "int updateByPrimaryKey(BachAlarmRole record);", "int updateByPrimaryKeySelective(ErpOaLicKey record);", "int updateByPrimaryKeySelective(ActivityHongbaoPrize record);", "int updateByPrimaryKey(AccountPaymentMethodEntity record);", "int updateByPrimaryKeySelective(PaymentTrade record);", "int updateByPrimaryKey(ProEmployee record);", "public static String apply_for_leave(int empId,String start_date, String end_date, int no_ldays,String leave_type, String leave_reason)\r\n throws ParseException {\r\n String s=null;\r\n Employee e = Employee.listById(empId);\r\n if (e != null) {\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n Date leave_from = sdf.parse(start_date);\r\n Date leave_to = sdf.parse(end_date);\r\n Calendar start = Calendar.getInstance();\r\n start.setTime(leave_from);\r\n Calendar end = Calendar.getInstance();\r\n end.setTime(leave_to);\r\n int count = 0;\r\n for (Date date = start.getTime(); start.before(end); start.add(Calendar.DATE, 1), date = start.getTime()) {\r\n Calendar c = Calendar.getInstance();\r\n c.setTime(date);\r\n int dayOfWeek = c.get(Calendar.DAY_OF_WEEK);\r\n if (dayOfWeek == 1 || dayOfWeek == 7) {\r\n count++;\r\n }\r\n }\r\n System.out.println(count);\r\n long diff = leave_to.getTime() - leave_from.getTime();\r\n System.out.println(diff);\r\n long days = diff / (1000 * 60 * 60 * 24);\r\n Date today = new Date();\r\n String appliedOn = sdf.format(today);\r\n days = days + 1;\r\n long availBal = 0;\r\n long dif = 0;\r\n long updLeave = 0;\r\n String leaveStatus = null;\r\n // int overl = Leave.countNo(empId, start_date, end_date);\r\n availBal = e.getavailleaves();\r\n dif = availBal - days;\r\n updLeave = days - count;\r\n int bal = (int) updLeave;\r\n if (days <= 0) {\r\n s=\"Start Date Must be Greater than EndDate...\";\r\n } else if (dif < 0) {\r\n s=\"insufficient leav balance\";\r\n } else if (no_ldays != days) {\r\n s=\"NO Of Days Should be right\";\r\n } else if (leave_from.compareTo(sdf.parse(appliedOn)) < 0) {\r\n s=\"Start should be greater or equal to current date\";\r\n // } else if (overl > 0) {\r\n // s=\"already applied on given date\";\r\n } else {\r\n if (e.getMgr_id() == 0) {\r\n leaveStatus = \"APPROVED\";\r\n dao().apply_for_leave(empId, start_date, end_date, bal, leave_type, leaveStatus, leave_reason, appliedOn);\r\n s=\"Leave Applied Successfully...\";\r\n } else {\r\n leaveStatus = \"PENDING\";\r\n dao().apply_for_leave(empId, start_date, end_date, bal,\r\n leave_type, leaveStatus, leave_reason, appliedOn);\r\n edao().decrement(empId, bal);\r\n s = \"Leave Applied Successfully For \" + (days - count) + \" Days.\";\r\n }\r\n }\r\n } else {\r\n s=\"invalid employee\";\r\n }\r\n return s;\r\n }", "int updateByPrimaryKeySelective(SdkMobileVcode record);", "int updateByPrimaryKey(MedicalOrdersExecutePlan record);", "public int Approvedbroker(Long id) throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"update login set userstatus='approved'where loginid=\"+id+\"\");\r\n\treturn i;\r\n}", "com.microsoft.schemas.crm._2011.contracts.ArrayOfAppointmentsToIgnore addNewAppointmentsToIgnore();", "int updateByPrimaryKeySelective(SwmsStockOutRecordDetail record);", "public void onClick(View v) {\n final ContentValues data = new ContentValues();\n final ContentValues data2 = new ContentValues();\n\n Intent intent_main_return = this.getIntent();\n final String table_name = intent_main_return.getExtras().getString(\"table\");\n final String table_date = intent_main_return.getExtras().getString(\"table_date\");\n bbb = intent_main_return.getExtras().getString(\"amount_column\");\n String s_r= null;\n String p=\"Present\";\n String a=\"Absent\";\n s=e1.getText().toString();\n\n assert table_date != null;\n s_r = table_date.replace(\"/\",\"_\");\n int date_col_index = Integer.parseInt(bbb);\n String where2 = \"id ='\"+s+\"' \" ;\n String where = \"name ='\"+s+\"' AND date ='\"+table_date+\"'\" ;\n\n int id=v.getId();\n\n switch(id) {\n case R.id.button22:\n\n if(e1 != null && s.length()>0){\n data.put(\"address\",p);\n dbx.update(table_name,data, where, null);\n\n for(int ll=1;ll<=date_col_index;ll++){\n String sss= s_r+\"__\"+ll;\n data2.put(\"'\"+sss+\"'\",p);\n db_net.update(table_name,data2, where2, null);\n }\n\n Toast.makeText(getBaseContext(),\"Roll no. \"+s+\" set to be Present\", Toast.LENGTH_LONG).show();\n }\n\n else\n {\n Toast.makeText(Edit_records.this,\"Please type roll no.\", Toast.LENGTH_SHORT).show();\n }\n\n break;\n\n case R.id.button23:\n\n if(e1 != null && s.length()>0){\n data.put(\"address\",a);\n dbx.update(table_name,data, where, null);\n\n for(int ll=1;ll<=date_col_index;ll++){\n String sss= s_r+\"__\"+ll;\n data2.put(\"'\"+sss+\"'\",a);\n db_net.update(table_name,data2, where2, null);\n }\n\n Toast.makeText(getBaseContext(),\"Roll no. \"+s+\" set to be Absent\", Toast.LENGTH_LONG).show();\n }\n\n else\n {\n Toast.makeText(Edit_records.this,\"Please type roll no.\", Toast.LENGTH_SHORT).show();\n }\n\n break;\n }\n\n }", "int updateByPrimaryKeySelective(MedicalOrdersExecutePlan record);", "public int updateByPrimaryKey(AlManageOnAir record) {\r\n int rows = getSqlMapClientTemplate().update(\"AL_MANAGE_ON_AIR.ibatorgenerated_updateByPrimaryKey\", record);\r\n return rows;\r\n }", "int updateByPrimaryKeySelective(BachAlarmRole record);", "public int updateByPrimaryKeySelective(AlManageOnAir record) {\r\n int rows = getSqlMapClientTemplate().update(\"AL_MANAGE_ON_AIR.ibatorgenerated_updateByPrimaryKeySelective\", record);\r\n return rows;\r\n }", "@Override\r\n\tpublic ArrayList<List<ConcurrentHashMap<String, Object>>> update(EmployeeLeaveTypes employeeLeaveTypes) {\n\t\treturn null;\r\n\t}", "int updateByPrimaryKeySelective(ProEmployee record);", "int updateByPrimaryKey(ApplicationDO record);", "int updateByPrimaryKeySelective(SysCode record);", "int updateByPrimaryKey(CmGroupRelIndustry record);", "int updateByPrimaryKeySelective(ResumePractice record);", "int updateByPrimaryKey(SdkMobileVcode record);", "int updateByPrimaryKey(BsUserRole record);", "int updateByPrimaryKeySelective(AccessKeyRecordEntity record);", "int updateByPrimaryKey(AccessKeyRecordEntity record);", "void updatePurchaseOrderLinkedBoqStatus(long pohId);", "int updateByPrimaryKeySelective(MWeixinCodeDTO record);", "int updateByPrimaryKeySelective(BsUserRole record);", "int updateByPrimaryKeySelective(AdminTab record);", "int updateByPrimaryKey(DrpCommissionRule record);", "public boolean approveAppointment() {\n\t\tSet <String> set=(HealthCareDAO.map).keySet();\r\n\t\tint count=1;\r\n\t\tfor(String s:set)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"You have a center \"+map.get(s).getCenterName() +\"--\"+\"Center and id is \"+s);\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\tSystem.out.println(\"Enter Center id :\");\r\n\t\tString str=scan.next();\r\n\t\tDiagnoisticCenter center=HealthCareDAO.map.get(str); //get Diagonistic object of given key \r\n\t\tList<Appointment> l=center.getAppointmentList();\r\n\t\t//System.out.println(l);\r\n\t\tint y=1;\r\n\t\tfor(Appointment a:l)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Enter Approval or disapproval\");\r\n\t\tboolean decision=scan.nextBoolean()\t;\r\n\t\t\ta.setApproved(decision);\r\n\t\t\tif(a.isApproved()==true)\r\n\t\t\t{\tSystem.out.println(\"Appointment id number \"+a.getAppointmentid()+\"---is Approved\");}\r\n\t\t\telse {System.out.println(\"Appointment id number \"+a.getAppointmentid()+\"---is not Approved\");}\r\n\t\t\ty++;\r\n\t\t\tif(y>3)\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t}\r\n\t\tcenter.setAppointmentList(l);\r\n\t\tSystem.out.println(\"Appointment List count :\"+l.size());\r\n\t\t\r\n\t\treturn false;\r\n\t}", "int updateByPrimaryKeySelective(DepAcctDO record);", "int updateByPrimaryKey(ParkCurrent record);", "int updateByPrimaryKey(FinancialManagement record);", "int updateByPrimaryKey(SellType record);", "int updateByPrimaryKey(SysRoleFunction record);", "int updateByPrimaryKeySelective(SsPaymentBillPerson record);", "int updateByPrimaryKey(ec_environment record);", "public int approve_reject_Request(int approval_status, String approvedBy, String approverComment, Timestamp time_approved,String social_Email)\r\n\t{\r\n\t\tConnection conn=getConnection();\r\n\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tint result=0;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tString query = \"update SOCIAL_EAI_APPROVAL set (APPROVAL_STATUS,APPROVED_BY,APPROVER_COMMENT,TIME_APPROVED)=(?,?,?,?) where REQ_SOCIAL_EMAIL=?\";\r\n\t\t\tpstmt = conn.prepareStatement(query); \r\n\t\t\tpstmt.setInt(1,approval_status); \r\n\t\t\tpstmt.setString(2,approvedBy); \r\n\t\t\tpstmt.setString(3,approverComment);\r\n\t\t\tpstmt.setTimestamp(4,time_approved);\r\n\t\t\tpstmt.setString(5,social_Email);\r\n\r\n\t\t\tresult=pstmt.executeUpdate(); \r\n\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\r\n\t\t\tSystem.out.println(\"EXception:\");\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\r\n\r\n\t\treturn result;\r\n\t}", "int updateByPrimaryKey(SysCode record);", "int updateByPrimaryKeySelective(SmsEmployeeTeam record);", "int updateByPrimaryKeySelective(SysOrganization record);", "int updateByPrimaryKey(UmsMenu record);", "int updateByPrimaryKey(UserOperateProject record);", "int updateByPrimaryKeySelective(R_dept_trade record);", "int updateByPrimaryKeySelective(ShopAccount record);", "int updateByPrimaryKeySelective(TbInvCategory record);", "int updateByPrimaryKey(R_dept_trade record);", "int updateByPrimaryKey(SysRole record);", "int updateByPrimaryKeySelective(ec_environment record);", "public void setStatusToMerroy(VAppModel vapp, List<VAppModel> vAppModelList) {\n \t_LOG.info(\"setStatusToMerroy().......................\");\n String vappName = vapp.getName();\n _LOG.info(\"vappName ------------> \"+vappName);\n int i = 0;\n for (i = 0; i < vAppModelList.size(); i++) {\n if (vAppModelList.get(i).getName().equals(vappName)) {\n VAppModel vappFromServlet = vAppModelList.get(i);\n for (int j = 0; j < vapp.getVmModelList().size(); j++) {\n for (int k = 0; k < vappFromServlet.getVmModelList().size(); k++) {\n if (vapp.getVmModelList().get(j).getVmName().equals(\n vappFromServlet.getVmModelList().get(k).getVmName())) {\n \t_LOG.info(\"getVmName(); ----------> \"+vappFromServlet.getVmModelList().get(k).getVmName());\n vappFromServlet.getVmModelList().get(k).setVmConsole(\n vapp.getVmModelList().get(j).getVmConsole());\n vappFromServlet.getVmModelList().get(k).setVmRdp(vapp.getVmModelList().get(j).getVmRdp());\n \n _LOG.info(\"Final vmConsole --------> \"+vapp.getVmModelList().get(j).getVmConsole());\n _LOG.info(\"Final vmRdp -----------> \"+vapp.getVmModelList().get(j).getVmRdp());\n break;\n }\n }\n\n }\n break;\n }\n }\n }", "int updateByPrimaryKey(ResumePractice record);" ]
[ "0.8419399", "0.62589043", "0.58363", "0.5817725", "0.56377053", "0.56173813", "0.5502781", "0.54663676", "0.5394459", "0.53800184", "0.5377041", "0.53567016", "0.5344791", "0.533971", "0.5318392", "0.53008765", "0.51597255", "0.51534855", "0.5146121", "0.5109783", "0.5099707", "0.50924796", "0.5068273", "0.50492513", "0.50461024", "0.50428325", "0.50293887", "0.50210655", "0.5018641", "0.5010952", "0.5006287", "0.50050884", "0.49969602", "0.4956543", "0.49118838", "0.48975837", "0.4896408", "0.48944905", "0.4873923", "0.48629224", "0.48602188", "0.48577943", "0.4828967", "0.48191264", "0.4814437", "0.4813262", "0.47962928", "0.47836354", "0.47816038", "0.47759536", "0.4773987", "0.47692272", "0.47671497", "0.47538897", "0.4752223", "0.47477937", "0.47455308", "0.47330195", "0.47241366", "0.47235873", "0.47158936", "0.47133204", "0.4711853", "0.47092012", "0.470796", "0.46905735", "0.46875355", "0.46840996", "0.46829724", "0.468254", "0.46804434", "0.46803582", "0.46796766", "0.46699205", "0.46696874", "0.46655557", "0.46649092", "0.46637604", "0.46612275", "0.4650458", "0.46394783", "0.46384528", "0.46354544", "0.46348295", "0.46324548", "0.46322677", "0.4630317", "0.46300954", "0.46245694", "0.46222496", "0.46176022", "0.46147162", "0.4610595", "0.46100837", "0.46068847", "0.4606236", "0.46060646", "0.46019444", "0.45930925", "0.4590729" ]
0.60807383
2
Set proxy for development
private void setInternalProxy(SimpleClientHttpRequestFactory requestFactory) { if (PAYASIA_MIND_PROXY_ENABLED_FOR_DEV) { Proxy proxy = new Proxy(Type.HTTP, new InetSocketAddress( PAYASIA_MIND_PROXY_HOSTNAME, PAYASIA_MIND_PROXY_PORT)); requestFactory.setProxy(proxy); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static void setProxyLocation(URI proxyLocation) {\n Program.proxyLocation = proxyLocation;\n Program.proxyLocationSet = true;\n }", "public void setHttpProxyHost(String host);", "public void setProxy(Proxy proxy) {\n\t\tthis.proxy = proxy;\n\t}", "public void setProxyHost(java.lang.String newProxyHost)\r\n {\r\n System.out.println(\"Host: \" + newProxyHost);\r\n proxyHost = newProxyHost;\r\n }", "public void setProxyBaseUrl(String baseURL) {\n this.proxyBaseUrl = baseURL;\n }", "public Proxy(){\n\t\tthis.useProxy = false;\n\t\tthis.host = null;\n\t\tthis.port = -1;\n\t}", "public void initProxy() {\n\n System.setProperty(\"http.proxyHost\", \"199.101.97.159\"); // set proxy server\n System.setProperty(\"http.proxyPort\", \"60099\"); // set proxy port\n //System.setProperty(\"http.proxyUser\", authUser);\n //System.setProperty(\"http.proxyPassword\", authPassword);\n Authenticator.setDefault(\n new Authenticator() {\n @Override\n public PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(\n authUser, authPassword.toCharArray());\n }\n }\n );\n }", "public void setProxyHost(String hostname) {\n proxyHost = hostname;\n }", "public void setHttpProxyPort(int port);", "public void setDefaultProxyConfig(ProxyConfig config);", "public void applyWebProxySettings() {\n boolean settingsChanged = false;\n boolean enablingProxy = false;\n Properties sysprops = System.getProperties();\n if (proxyHost != null) {\n settingsChanged = true;\n if (proxyHost.length() != 0) {\n traceSettingInfo();\n enablingProxy = true;\n sysprops.put(\"http.proxyHost\", proxyHost);\n String portString = Integer.toString(proxyPort);\n sysprops.put(\"http.proxyPort\", portString);\n sysprops.put(\"https.proxyHost\", proxyHost);\n sysprops.put(\"https.proxyPort\", portString);\n sysprops.put(\"ftp.proxyHost\", proxyHost);\n sysprops.put(\"ftp.proxyPort\", portString);\n if (nonProxyHosts != null) {\n sysprops.put(\"http.nonProxyHosts\", nonProxyHosts);\n sysprops.put(\"https.nonProxyHosts\", nonProxyHosts);\n sysprops.put(\"ftp.nonProxyHosts\", nonProxyHosts);\n }\n if(proxyUser!=null) {\n sysprops.put(\"http.proxyUser\", proxyUser);\n sysprops.put(\"http.proxyPassword\", proxyPassword);\n }\n } else {\n log(\"resetting http proxy\", Project.MSG_VERBOSE);\n sysprops.remove(\"http.proxyHost\");\n sysprops.remove(\"http.proxyPort\");\n sysprops.remove(\"http.proxyUser\");\n sysprops.remove(\"http.proxyPassword\");\n sysprops.remove(\"https.proxyHost\");\n sysprops.remove(\"https.proxyPort\");\n sysprops.remove(\"ftp.proxyHost\");\n sysprops.remove(\"ftp.proxyPort\");\n }\n }\n\n //socks\n if (socksProxyHost != null) {\n settingsChanged = true;\n if (socksProxyHost.length() != 0) {\n enablingProxy = true;\n sysprops.put(\"socksProxyHost\", socksProxyHost);\n sysprops.put(\"socksProxyPort\", Integer.toString(socksProxyPort));\n if (proxyUser != null) {\n //this may be a java1.4 thingy only\n sysprops.put(\"java.net.socks.username\", proxyUser);\n sysprops.put(\"java.net.socks.password\", proxyPassword);\n }\n\n } else {\n log(\"resetting socks proxy\", Project.MSG_VERBOSE);\n sysprops.remove(\"socksProxyHost\");\n sysprops.remove(\"socksProxyPort\");\n sysprops.remove(\"java.net.socks.username\");\n sysprops.remove(\"java.net.socks.password\");\n }\n }\n\n\n //for Java1.1 we need to tell the system that the settings are new\n if (settingsChanged &&\n JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)) {\n legacyResetProxySettingsCall(enablingProxy);\n }\n }", "public void setProxyHost(String proxyHost) {\n this.proxyHost = proxyHost;\n }", "public void setProxyUser(String proxyUser) {\n this.proxyUser = proxyUser;\n }", "public void setProxyHost(String proxyHost) {\n\t proxyHandler.setProxyHost(proxyHost);\n \n if ((proxyHost != null) && (proxyHost.length() > 1)) {\n isProxyActivated.set(true);\n } \n resetChain();\n\t}", "@Test\r\n public void testSetProxy() {\r\n // Not required\r\n }", "protected static void setProxyUsername(String username) {\n Program.proxyUsername = username;\n proxyUsernameSet = true;\n }", "public void setProxyAddress(String proxyAddress) {\n this.proxyAddress = proxyAddress;\n }", "public MyProxyLogon() {\n super();\n host = System.getenv(\"MYPROXY_SERVER\");\n if (host == null) {\n host = \"myproxy.teragrid.org\";\n }\n String portString = System.getenv(\"MYPROXY_SERVER_PORT\");\n if (portString != null) {\n port = Integer.parseInt(portString);\n }\n username = System.getProperty(\"user.name\");\n }", "public void setProxyPort(int port) {\n proxyPort = port;\n }", "public void setProxyPort(String newProxyPort)\r\n {\r\n proxyPort = newProxyPort;\r\n }", "public static boolean initEdgeProxy() {\n /**\n * Configure default proxy based on environment, this can be programmatically overriden\n * for testing purposes\n */\n StringBuilder sb = new StringBuilder(\"restedge.default.proxy.\");\n if (Play.isDev()) {\n sb.append(\"dev\");\n } else if (Play.isTest()) {\n sb.append(\"stage\");\n } else if (Play.isProd()) {\n sb.append(\"prod\");\n }\n PROXIED_HOST = Play.application().configuration().getString(sb.toString());\n if (PROXIED_HOST.isEmpty()) {\n Logger.warn(\"DEFAULT PROXIED HOST IS EMPTY\");\n return false;\n }\n return true;\n }", "public ProxyConfig createProxyConfig();", "protected void setProxiedClient(URL paramURL, String paramString, int paramInt, boolean paramBoolean) throws IOException {\n/* 143 */ this.delegate.setProxiedClient(paramURL, paramString, paramInt, paramBoolean);\n/* */ }", "static void saveProxyConfig(final String proxyUrl) {\r\n\t\tAppPreferences.setUrlProxy(proxyUrl);\r\n\t}", "public void setProxyPort(int proxyPort) {\n this.proxyPort = proxyPort;\n }", "public void setProxyPort(int proxyPort) {\n this.proxyPort = proxyPort;\n }", "public ClientBuilder proxy(@Nullable Proxy proxy) {\n this.proxy = proxy;\n return this;\n }", "public void setProxyPort(String proxyPort) {\n this.proxyPort = proxyPort;\n }", "private void traceSettingInfo() {\n log(\"Setting proxy to \"\n + (proxyHost != null ? proxyHost : \"''\")\n + \":\" + proxyPort,\n Project.MSG_VERBOSE);\n }", "public void setProxyServer(String proxyServer) {\n this.proxyServer = proxyServer;\n }", "Proxy getProxy();", "public ProxySettings(Proxy proxy)\n {\n this(proxy, null, null);\n }", "public void setSocksProxyHost(String host) {\n this.socksProxyHost = host;\n }", "public String getHttpProxyHost();", "public void setProxyPort(int newProxyPort)\r\n {\r\n System.out.println(\"Port: \" + newProxyPort);\r\n proxyPort = \"\" + newProxyPort;\r\n }", "protected void setProxiedClient(URL paramURL, String paramString, int paramInt) throws IOException {\n/* 127 */ this.delegate.setProxiedClient(paramURL, paramString, paramInt);\n/* */ }", "public void setProxyPswd(java.lang.String newProxyPswd)\r\n {\r\n proxyPswd = newProxyPswd;\r\n }", "public String getProxyHost() {\n return proxyHost;\n }", "public final GetHTTP setProxyHost(final String proxyHost) {\n properties.put(PROXY_HOST_PROPERTY, proxyHost);\n return this;\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Set the HTTP proxy server.\")\n @JsonProperty(JSON_PROPERTY_HTTP_PROXY)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public String getHttpProxy() {\n return httpProxy;\n }", "public void updateSystemSettings()\r\n {\r\n System.setProperty( \"http.agent\", Environment.getPhexVendor() );\r\n if ( isHttpProxyUsed )\r\n {\r\n System.setProperty( \"http.proxyHost\", httpProxyHost );\r\n System.setProperty( \"http.proxyPort\", String.valueOf( httpProxyPort ) );\r\n }\r\n else\r\n {\r\n System.setProperty( \"http.proxyHost\", \"\" );\r\n System.setProperty( \"http.proxyPort\", \"\" );\r\n }\r\n \r\n // cache DNS name lookups for only 30 minutes\r\n System.setProperty( \"networkaddress.cache.ttl\", \"1800\" );\r\n Security.setProperty( \"networkaddress.cache.ttl\", \"1800\" );\r\n }", "@Override\n public void setServerProxy(IServerProxy theProxy) {\n assert theProxy != null;\n m_theProxy = theProxy;\n }", "String getHttpProxyHost();", "@Before\r\n public void setUp() { \r\n ApiProxy.setEnvironmentForCurrentThread(new TestEnvironment());\r\n //ApiProxy.setDelegate(new ApiProxyLocalImpl(new File(\".\")){});\r\n \t\r\n //helper.setUp();\r\n }", "protected boolean legacyResetProxySettingsCall(boolean setProxy) {\n System.getProperties().put(\"http.proxySet\", new Boolean(setProxy).toString());\n try {\n Class c = Class.forName(\"sun.net.www.http.HttpClient\");\n Method reset = c.getMethod(\"resetProperties\", null);\n reset.invoke(null, null);\n return true;\n }\n catch (ClassNotFoundException cnfe) {\n return false;\n }\n catch (NoSuchMethodException e) {\n return false;\n }\n catch (IllegalAccessException e) {\n return false;\n }\n catch (InvocationTargetException e) {\n return false;\n }\n }", "public void addProxyConfig(ProxyConfig config);", "public boolean isProxyEnvironment() {\n return \"proxy\".equals(activeProfile);\n }", "public java.lang.String getProxyHost()\r\n {\r\n return proxyHost;\r\n }", "@Nonnull\n public String getProxyHost() {\n return proxyHost;\n }", "private void setResolverAsGoProxy(ArtifactoryManager artifactoryClient) throws Exception {\n String rtUrl = PackageManagerUtils.createArtifactoryUrlWithCredentials(artifactoryClient.getUrl(), resolverUsername, resolverPassword, ARTIFACTORY_GO_API + resolutionRepository);\n String proxyValue = rtUrl + \",\" + GOPROXY_VCS_FALLBACK;\n env.put(GOPROXY_ENV_VAR, proxyValue);\n }", "private void setHttpclientProxy(DefaultHttpClient httpClient) {\r\n Proxy proxy = ProxyProvider.getProxy();\r\n String proxyUser = ProxyProvider.getProxyUserName();\r\n String proxyPwd = ProxyProvider.getProxyUserPassword();\r\n // set by other components like tSetProxy\r\n if (proxy != null) {\r\n\r\n final HttpHost httpHost = new HttpHost(((InetSocketAddress) proxy.address()).getHostName(),\r\n ((InetSocketAddress) proxy.address()).getPort());\r\n // Sets usage of HTTP proxy\r\n httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, httpHost);\r\n\r\n // Sets proxy authentication, if credentials were provided\r\n // TODO Because the proxy of get accesToken can't support authentication. remove this ?\r\n if (proxyUser != null && proxyPwd != null) {\r\n httpClient.getCredentialsProvider().setCredentials(new AuthScope(httpHost),\r\n new UsernamePasswordCredentials(proxyUser, proxyPwd));\r\n }\r\n\r\n }\r\n\r\n }", "protected static void setProxyPassphrase(String passphrase) {\n Program.proxyPassphrase = passphrase;\n }", "public interface IProxySettings\n{\n /**\n * @return The proxy type to be used. May not be <code>null</code>.\n */\n @Nonnull\n Proxy.Type getProxyType ();\n\n /**\n * @return The proxy host name of IP address. May be <code>null</code> if\n * proxy type is DIRECT.\n */\n @Nullable\n String getProxyHost ();\n\n /**\n * @return The proxy port for this HTTP proxy type. Should be &gt; 0. May be\n * &le; 0 if the proxy type is DIRECT.\n */\n int getProxyPort ();\n\n /**\n * @return The proxy user name. May be <code>null</code>.\n */\n @Nullable\n String getProxyUserName ();\n\n default boolean hasProxyUserName ()\n {\n return StringHelper.hasText (getProxyUserName ());\n }\n\n /**\n * @return The proxy password for the provided user. May be <code>null</code>.\n * Note: an empty password may be valid. Only <code>null</code>\n * indicates \"no password\".\n */\n @Nullable\n String getProxyPassword ();\n\n default boolean hasProxyPassword ()\n {\n return getProxyPassword () != null;\n }\n\n /**\n * Check if hostname and port match the ones from the provided\n * {@link InetSocketAddress}.\n *\n * @param aAddr\n * The address to compare with. May be <code>null</code>.\n * @return <code>true</code> if the unresolved hostname and the port match.\n */\n default boolean hasInetSocketAddress (@Nullable final InetSocketAddress aAddr)\n {\n return aAddr != null && EqualsHelper.equals (aAddr.getHostString (), getProxyHost ()) && getProxyPort () == aAddr.getPort ();\n }\n\n /**\n * Check if these settings have the provided socket address.\n *\n * @param aAddr\n * The socket address to compare to. May be <code>null</code>.\n * @return <code>true</code> if the proxy type is DIRECT and the address is\n * <code>null</code>, or if the object is of type\n * {@link InetSocketAddress} and the values match.\n * @see #hasInetSocketAddress(InetSocketAddress)\n */\n boolean hasSocketAddress (@Nullable SocketAddress aAddr);\n\n /**\n * @return A non-<code>null</code> {@link Proxy} instance. Only uses proxy\n * host and port.\n * @see #getProxyHost()\n * @see #getProxyPort()\n */\n @Nonnull\n default Proxy getAsProxy ()\n {\n return getAsProxy (true);\n }\n\n /**\n * @param bResolveHostname\n * <code>true</code> to resolve host names (needed in production) or\n * <code>false</code> to not resolve them (mainly for testing\n * purposes). This flag has no impact if the proxy type is DIRECT.\n * @return A non-<code>null</code> {@link Proxy} instance. Only uses proxy\n * host and port.\n * @see #getProxyHost()\n * @see #getProxyPort()\n */\n @Nonnull\n Proxy getAsProxy (boolean bResolveHostname);\n\n /**\n * @return The {@link PasswordAuthentication} instances matching the\n * credentials contained in this object or <code>null</code> if no\n * username is present.\n */\n @Nullable\n default PasswordAuthentication getAsPasswordAuthentication ()\n {\n // If no user name is set, no Authenticator needs to be created\n if (!hasProxyUserName ())\n return null;\n\n final String sProxyPassword = getProxyPassword ();\n // Constructor does not take null password!\n return new PasswordAuthentication (getProxyUserName (),\n sProxyPassword == null ? ArrayHelper.EMPTY_CHAR_ARRAY : sProxyPassword.toCharArray ());\n }\n}", "@Override\n\tpublic boolean usingProxy() {\n\t\treturn false;\n\t}", "void setProxyConnectionState(ProxyConnectionState proxyConnectionState) {\n this.proxyConnectionState = proxyConnectionState;\n }", "public void setProxyUsername(String proxyUsername) {\n this.proxyUsername = proxyUsername;\n }", "public void setProxyName(java.lang.String newProxyName)\r\n {\r\n System.out.println(\"Name: \" + newProxyName);\r\n proxyName = newProxyName;\r\n }", "public void setProxyPassword(String proxyPassword) {\n this.proxyPassword = proxyPassword;\n }", "public void setProxyPassword(String proxyPassword) {\n this.proxyPassword = proxyPassword;\n }", "public String getProxyHost() {\n return cfg.getProxyHost();\n }", "public void setProxyUser(String proxyUser) {\n\t proxyHandler.setProxyUser(proxyUser);\n\t}", "public LoginInfoClientProxy(URL proxyURL) {\n this.proxyURL = proxyURL;\n }", "@Test\n public void testLocalIPOverride() throws Exception {\n System.setProperty(PacScriptMethods.OVERRIDE_LOCAL_IP, \"123.123.123.123\");\n try {\n PacProxySelector pacProxySelector = new PacProxySelector(\n new UrlPacScriptSource(toUrl(\"testLocalIP.pac\")));\n List<Proxy> result = pacProxySelector.select(TestUtil.HTTP_TEST_URI);\n assertEquals(\n result.get(0),\n new Proxy(Type.HTTP, InetSocketAddress.createUnresolved(\n \"123.123.123.123\", 8080)));\n } finally {\n System.setProperty(PacScriptMethods.OVERRIDE_LOCAL_IP, \"\");\n }\n\n }", "public void setProxyScheme(java.lang.String newProxyScheme)\r\n {\r\n System.out.println(\"Scheme: \" + newProxyScheme);\r\n proxyScheme = newProxyScheme;\r\n }", "public Proxy getProxy() {\n return proxy;\n }", "@Override\n\tpublic boolean gcSetAutoBackupProxy(BluetoothDevice device, int port, byte security,\n\t\t\tString ssid, String proxy) {\n\t\treturn false;\n\t}", "private HttpProxyCacheServer getProxy() {\n\n return proxy == null ? (proxy = newProxy()) : proxy;\n }", "public FakeBasicProxyPreparer() {\n\tsuper();\n }", "private static void initialiseBrowser() {\n\t\tif (System.getProperty(\"proxyname\") != null) {\n\t\t\tFirefoxProfile profile = new FirefoxProfile();\n\t\t\tprofile.setPreference(\"network.proxy.type\", 1);\n\t\t\tprofile.setPreference(\"network.proxy.http\", System.getProperty(\"proxyname\"));\n\t\t\tprofile.setPreference(\"network.proxy.http_port\", 3128);\n\n\t\t\tdriver = new FirefoxDriver(profile);\n\t\t\tsetDriver(driver);\n\t\t}\n\t\telse{\n\t\t\tdriver = new FirefoxDriver();\n\t\t\tsetDriver(driver);\n\t\t}\n\t}", "public final String getProxyHost() {\n return properties.get(PROXY_HOST_PROPERTY);\n }", "public final String getProxyHost() {\n return properties.get(PROXY_HOST_PROPERTY);\n }", "public String getProxyServer() {\n return proxyServer;\n }", "public final ListS3 setProxyHost(final String proxyHost) {\n properties.put(PROXY_HOST_PROPERTY, proxyHost);\n return this;\n }", "public static void updateProxySettings(String host,String port,String username,String password){\n\t\tHttpPosterCommons.host\t\t\t= (!host.equals(\"\"))?host:HttpPosterCommons.host;\n\t\tHttpPosterCommons.port \t\t\t= (!port.equals(\"\"))?port:HttpPosterCommons.port;\n\t\tHttpPosterCommons.username\t\t= (!username.equals(\"\"))?username:HttpPosterCommons.username;\n\t\tHttpPosterCommons.password \t\t= (!password.equals(\"\"))?password:HttpPosterCommons.password;\t\t\n\t}", "public void setAvoidProxy(boolean avoidProxy) {\n this.avoidProxy = avoidProxy;\n }", "public Proxy(String host, int port){\n\t\tthis.useProxy = true;\n\t\tthis.host = host;\n\t\tthis.port = port;\n\t}", "public final GetHTTP setProxyPort(final String proxyPort) {\n properties.put(PROXY_PORT_PROPERTY, proxyPort);\n return this;\n }", "public ProxyConfiguration(@NotNull String proxyName, int port) {\n this.host = new HttpHost(proxyName, port);\n }", "public void setProxyEntities(boolean proxyEntities) {\n this.proxyEntities = proxyEntities;\n }", "public boolean isProxyEnabled() {\n return isProxyEnabled;\n }", "public void setProxyRealm(java.lang.String newProxyRealm)\r\n {\r\n System.out.println(\"Realm: \" + newProxyRealm);\r\n proxyRealm = newProxyRealm;\r\n }", "public void unsetProxy() {\n remote.setProxy(null);\n }", "public void clearProxyConfig();", "public void setHost(String host);", "public int getHttpProxyPort();", "public void setProxyInjectionMode(boolean proxyInjectionMode) {\n this.proxyInjectionMode = proxyInjectionMode;\n }", "protected void configureBrowserWithSelenIde(String baseUrl, String proxyHost, String proxyPort) \n {\n Configuration.timeout = 10000;\n Configuration.baseUrl = baseUrl;\n Configuration.startMaximized = false;\n Configuration.browser = WEB_DRIVER_PROVIDER;\n Configuration.browserPosition = \"200x20\";\n Configuration.browserSize = \"1440x1024\";\n Configuration.reportsFolder = \"target/reports/\";\n Configuration.reportsUrl = \"file:///root/dhbwtest_selenide/target/reports/\";\n Configuration.proxyEnabled = (proxyHost != null && proxyPort != null);\n if (proxyHost != null && proxyPort != null)\n {\n Configuration.proxyHost = proxyHost;\n Configuration.proxyPort = Integer.parseInt(proxyPort);\n Configuration.fileDownload = FileDownloadMode.PROXY;\n }\n else\n {\n Configuration.fileDownload = FileDownloadMode.FOLDER;\n }\n addListener(new Highlighter());\n }", "public interface IRemoteEnvProxyManager extends IRemoteProxyManager {\n \t/**\n \t * Method to get system's environment variables.\n \t *\n\t * @param Project\n\t * IProject\n \t * @return Mapping of environment variables\n \t * @since 2.1\n\t*/\t\n \tpublic Map<String, String> getEnv(IProject project) throws CoreException;\n /**\n * Method to get system's environment variables.\n * \n * @param Resource URI\n * URI\n * @return Mapping of environment variables\n * @since 2.1\n */\n \tpublic Map<String, String> getEnv(URI uri) throws CoreException;\n }", "public String getProxyPort()\r\n {\r\n return proxyPort;\r\n }", "public interface ProxyConnector {\n\n /**\n * Comprueba que se cumplan los requisitos para la conexi&oacute;n con el servicio proxy.\n * @throws IOException Cuando ocurre alg&uacute;n error en la comprobaci&oacute;n.\n */\n void init() throws IOException;\n\n /**\n * Comprueba si el servicio configurado pertenece a un proxy compatible.\n * @return {@code true} si el proxy configurado es compatible, {@code false} en caso contrario.\n * @throws IOException Cuando se produce un error al conectarse al proxy.\n */\n boolean isCompatibleService() throws IOException;\n\n /**\n * Indica si el servicio de Portafirmas correspondiente a este conector requiere un proceso\n * de login previo.\n * @return {@code true} si el servicio requiere login, {@code false} en caso contrario.\n */\n boolean needLogin();\n\n /**\n * Solicita el acceso para el usuario.\n * @return Respuesta a la petici&oacute;n con el token de acceso.\n * @throws Exception Cuando ocurre un error en la comunicaci&oacute;n.\n */\n RequestResult loginRequest() throws Exception;\n\n /**\n * Envia el token de acceso firmado al servidor para validar el acceso del usuario.\n * @param pkcs1 Firma PKCS#1 del token de acceso.\n * @param cert Certificado usado para firmar.\n * @return @code true} si el acceso se completo correctamente, {@code false} en caso contrario.\n * @throws Exception Cuando ocurre un error en la comunicaci&oacute;n.\n */\n boolean tokenValidation(byte[] pkcs1, String cert) throws Exception;\n\n /**\n * Env&aacute;a una solicitud de cierre de sesi&oacute;n.\n * @throws Exception Cuando se produce un error en la comunicaci&oacute;n.\n */\n void logoutRequest() throws Exception;\n\n /**\n * Obtiene la peticiones de firma. Las peticiones devueltas deben cumplir\n * las siguientes condiciones:\n * <ul>\n * <li>Estar en el estado se&ntilde;alado (unresolved, signed o rejected).</li>\n * <li>Que todos los documentos que contiene se tengan que firmar con los\n * formatos de firma indicados (s&oacute;lo si se indica alguno)</li>\n * <li>Que las solicitudes cumplan con los filtros establecidos. Estos\n * filtros tendran la forma: key=value</li>\n * </ul>\n * @param signRequestState Estado de las peticiones que se desean obtener.\n * @param filters\n * Listado de filtros que deben cumplir las peticiones\n * recuperadas. Los filtros soportados son:\n * <ul>\n * <li><b>orderAscDesc:</b> con valor \"asc\" para que sea orden\n * ascendente en la consulta, en cualquier otro caso ser&aacute;\n * descendente</li>\n * <li><b>initDateFilter:</b> fecha de inicio de las peticiones</li>\n * <li><b>endDateFilter:</b> fecha de fin de las peticiones</li>\n * <li><b>orderAttribute:</b> par&aacute;metro para ordenar por\n * una columna de la petici&oacute;n</li>\n * <li><b>searchFilter:</b> busca la cadena introducida en\n * cualquier texto de la petici&oacute;n (asunto, referencia,\n * etc)</li>\n * <li><b>labelFilter:</b> texto con el nombre de una etiqueta.\n * Filtra las peticiones en base a esa etiqueta, ej: \"IMPORTANTE\"\n * </li>\n * <li><b>applicationFilter:</b> texto con el identificador de\n * una aplicaci&oacute;n. Filtra las peticiones en base a la\n * aplicaci&oacute;n, ej: \"SANCIONES\"</li>\n * </ul>\n * @param numPage N&uacute;mero de p&aacute;gina del listado.\n * @param pageSize N&uacute;mero de peticiones por p&aacute;gina.\n * @return Lista de peticiones de firma\n * @throws SAXException\n * Si el XML obtenido del servidor no puede analizarse\n * @throws IOException\n * Si ocurre un error de entrada / salida\n */\n PartialSignRequestsList getSignRequests(\n String signRequestState, String[] filters, int numPage, int pageSize)\n throws SAXException, IOException;\n\n /** Inicia la pre-firma remota de las peticiones.\n * @param request Petici&oacute;n de firma.\n * @return Prefirmas de las peticiones enviadas.\n * @throws IOException Si ocurre algun error durante el tratamiento de datos.\n * @throws CertificateEncodingException Si no se puede obtener la codificaci&oacute;n del certificado.\n * @throws SAXException Si ocurren errores analizando el XML de respuesta. */\n TriphaseRequest[] preSignRequests(SignRequest request) throws IOException,\n CertificateException,\n SAXException;\n\n /**\n * Inicia la post-firma remota de las peticiones.\n *\n * @param requests\n * Peticiones a post-firmar\n * @return Listado con el resultado de la operaci&oacute;n de firma de cada\n * petici&oacute;n.\n * @throws IOException\n * Si ocurre algun error durante el proceso\n * @throws CertificateEncodingException\n * Cuando el certificado est&aacute; mal codificado.\n * @throws SAXException\n * Si ocurren errores analizando el XML de respuesta\n */\n RequestResult postSignRequests(TriphaseRequest[] requests) throws IOException,\n CertificateEncodingException, SAXException;\n\n /**\n * Obtiene los datos de un documento.\n *\n * @param requestId\n * Identificador de la petici&oacute;n.\n * @return Datos del documento.\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n RequestDetail getRequestDetail(String requestId) throws SAXException, IOException;\n\n /**\n * Obtiene el listado de aplicaciones para las que hay peticiones de firma.\n * @return Configuracion de aplicaci&oacute;n.\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n AppConfiguration getApplicationList()\n throws SAXException, IOException;\n\n /**\n * Rechaza las peticiones de firma indicadas.\n *\n * @param requestIds\n * Identificadores de las peticiones de firma que se quieren\n * rechazar.\n * @return Resultado de la operacion para cada una de las peticiones de\n * firma.\n * @throws SAXException\n * Si el XML obtenido del servidor no puede analizarse\n * @throws IOException\n * Si ocurre un error de entrada / salida\n */\n RequestResult[] rejectRequests(String[] requestIds,\n String reason) throws SAXException, IOException;\n\n /** Obtiene la previsualizaci&oacute;n de un documento.\n * @param documentId Identificador del documento.\n * @param filename Nombre del fichero.\n * @param mimetype MIME-Type del documento.\n * @return Datos del documento.\n * @throws IOException Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor. */\n DocumentData getPreviewDocument(String documentId,\n String filename,\n String mimetype) throws IOException;\n\n /** Obtiene la previsualizaci&oacute;n de una firma.\n * @param documentId Identificador del documento.\n * @param filename Nombre del fichero.\n * @return Datos del documento.\n * @throws IOException Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor. */\n DocumentData getPreviewSign(String documentId,\n String filename) throws IOException;\n\n /** Obtiene la previsualizaci&oacute;n de un informe de firma.\n * @param documentId Identificador del documento.\n * @param filename Nombre del fichero.\n * @param mimetype MIME-Type del documento.\n * @return Datos del documento.\n * @throws IOException Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor. */\n DocumentData getPreviewReport(String documentId,\n String filename, String mimetype) throws IOException;\n\n /**\n * Aprueba peticiones de firma (les da el visto bueno).\n *\n * @param requestIds\n * Identificador de las peticiones.\n * @return Resultado de la operaci&oacute;n.\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n RequestResult[] approveRequests(String[] requestIds) throws SAXException, IOException;\n\n /**\n * Indica si el conector soporta las funciones de notificaci&oacute;n.\n * @return {@code true} si se soportan las notificaciones, {@code false} en caso contrario.\n */\n boolean isNotificationsSupported();\n\n /**\n * Da de alta en el sistema de notificaciones.\n * @param token\n * \t\t\tToken de registro en GCM.\n * @param device\n * \t\t\tIdentificador de dispositivo.\n * @param certB64\n * \t\t\tCertificado en base 64 del usuario.\n * @return Resultado del proceso de alta en el sistema de notificaciones.\n * \t\t\tIndica\n * @throws SAXException\n * Cuando se encuentra un XML mal formado.\n * @throws IOException\n * Cuando existe alg&uacute;n problema en la lectura/escritura\n * de XML o al recuperar la respuesta del servidor.\n */\n NotificationState signOnNotificationService(\n String token, String device, String certB64)\n throws SAXException, IOException;\n\n\n}", "@Before\r\n\tpublic void setUp() {\r\n\t\tthis.httpURLBuilder = new HttpURLBuilder();\r\n\t\tthis.httpURLBuilder.setHost(\"localhost\");\r\n\t\tthis.httpURLBuilder.setParam(\"name\", \"value\");\r\n\t\tthis.httpURLBuilder.setPath(\"/xampp\");\r\n\t\tthis.httpURLBuilder.setPort(80);\r\n\t\tthis.httpURLBuilder.setSecure(false);\r\n\t\tthis.map = new ListMap<>();\r\n\t\tthis.map.putValue(\"key\", \"value\");\r\n\t}", "public void setProxyId(Long proxyId) {\n this.proxyId = proxyId;\n }", "public int getProxyPort() {\n return proxyPort;\n }", "public int getProxyPort() {\n return proxyPort;\n }", "int getHttpProxyPort();", "public void setNexusProxyBypassed(boolean nexusProxyBypass) {\n this.nexusProxyBypass = nexusProxyBypass;\n }", "private void httpProxyConnect(String host, int port) throws IOException {\n // connect to the proxy\n // _proxyPort validated in superconstrutor, no need to set default here\n if (_fetchHeaderTimeout > 0) {\n _proxy = new Socket();\n _proxy.setSoTimeout(_fetchHeaderTimeout);\n _proxy.connect(new InetSocketAddress(_proxyHost, _proxyPort), _fetchHeaderTimeout);\n } else {\n _proxy = new Socket(_proxyHost, _proxyPort);\n }\n httpProxyConnect(_proxy, host, port);\n }", "public io.confluent.developer.InterceptTest.Builder setReqRemoteAddr(java.lang.String value) {\n validate(fields()[3], value);\n this.req_remote_addr = value;\n fieldSetFlags()[3] = true;\n return this;\n }", "public static void configureLocal() {\r\n configure(getProperties(true));\r\n }", "public void setSmtpUseSOCKSProxy(boolean value) {\n this.smtpUseSOCKSProxy = value;\n }" ]
[ "0.7251816", "0.7221039", "0.7142096", "0.70636666", "0.6853375", "0.6769172", "0.6766359", "0.6718576", "0.67178184", "0.66542464", "0.6648983", "0.6565342", "0.6547425", "0.65199876", "0.64890647", "0.6433156", "0.64257073", "0.63596004", "0.6352448", "0.6348069", "0.63291276", "0.631924", "0.6310572", "0.62765914", "0.624882", "0.624882", "0.62390906", "0.6226285", "0.6223793", "0.6219655", "0.6201338", "0.6197552", "0.6195059", "0.61842203", "0.617129", "0.61331975", "0.61314845", "0.6098686", "0.6085252", "0.6083898", "0.6050576", "0.60488564", "0.60406774", "0.60387444", "0.6019626", "0.60124403", "0.60062754", "0.59965336", "0.5988047", "0.59872836", "0.59559137", "0.5955801", "0.5950039", "0.5890586", "0.58694607", "0.5840924", "0.5840076", "0.5821843", "0.5821843", "0.58198744", "0.57954806", "0.5791241", "0.5772979", "0.57706463", "0.5730095", "0.57199824", "0.5715652", "0.5691066", "0.567711", "0.5675258", "0.5675258", "0.56661004", "0.56567436", "0.56535304", "0.5650773", "0.5649663", "0.56432915", "0.56289315", "0.55795795", "0.55765057", "0.5563263", "0.5552643", "0.55390024", "0.5524527", "0.5510283", "0.54994696", "0.548591", "0.54829097", "0.5464922", "0.54330194", "0.5432591", "0.54247516", "0.5423369", "0.5423369", "0.54026276", "0.5372763", "0.5363267", "0.535245", "0.53519356", "0.5338521" ]
0.7533088
0
Check Whether keyPayRunTimestamp exist between Leave Calendar Year Start and end date
private boolean isKeypayPayRunDateExist(Timestamp keyPayRunTimestamp, Long companyId, EmployeeLeaveSchemeTypeHistory employeeLeaveSchemeTypeHistory) { if ((keyPayRunTimestamp.after(employeeLeaveSchemeTypeHistory .getStartDate()) && keyPayRunTimestamp .before(employeeLeaveSchemeTypeHistory.getEndDate())) || (keyPayRunTimestamp.equals(employeeLeaveSchemeTypeHistory .getStartDate())) || (keyPayRunTimestamp.equals(employeeLeaveSchemeTypeHistory .getEndDate()))) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasEndDate();", "protected boolean isInYearEndLowerBound(Date runDate, String yearEndPeriodLowerBound, String lastDayOfFiscalYear) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"MMdd\");\n String today = sdf.format(runDate);\n return today.compareTo(yearEndPeriodLowerBound) >= 0 && today.compareTo(lastDayOfFiscalYear) <= 0;\n }", "boolean hasDepositEndTime();", "boolean hasStartDate();", "if (payDateTime == adhocTicket.getPaidDateTime()) {\n System.out.println(\"Paid Date Time is passed\");\n }", "private static boolean checkIfYearContinue(Sheet sheet) {\r\n String last = sheet.getCellAt(\"A\" + sheet.getRowCount()).getTextValue(); \r\n return !last.equals(\"end\");\r\n }", "@Test\n void calculatePeriodRangeOver2Years() throws ParseException {\n LocalDate testDateStart = LocalDate.parse(\"2013-03-07\");\n LocalDate testDateEnd = LocalDate.parse(\"2017-12-17\");\n Map<String, String> periodMap = datesHelper.calculatePeriodRange(testDateStart, testDateEnd, false);\n assertEquals(\"57 months\", periodMap.get(PERIOD_START));\n assertEquals(\"17 December 2017\", periodMap.get(PERIOD_END));\n }", "private boolean checkStartDateBeforeEndDate(String startDate, String endDate) {\n SimpleDateFormat date = new SimpleDateFormat(\"ddMMyy\");\n Date startingDate = null;\n try {\n startingDate = date.parse(startDate);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n Date endingDate = null;\n try {\n endingDate = date.parse(endDate);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if (startingDate.before(endingDate)) {\n return true;\n } else {\n return false;\n }\n }", "private boolean checkEmployeesAnnualLeaveRecordForYear(AbsentYear absYear, long numDaysRequested, int empId) {\n\t\tlong numDaysAbsent = empAbsentRepo.numDaysEmployeeHasBeenAbsent(absYear.getYear(), empId, \"Annual Leave\");\n\t\tlong annualLeave = rasRepo.findSeniority(empId).getHolidayEntitlement();\n\t\tlong diff = (annualLeave - numDaysAbsent) - numDaysRequested;\n\t\treturn (numDaysRequested <= (diff)) ? true : false;\n\t}", "protected boolean isInYearEndUpperBound(Date runDate, String yearEndPeriodUpperBound, String lastDayOfFiscalYear) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"MMdd\");\n String today = sdf.format(runDate);\n\n String month = StringUtils.mid(lastDayOfFiscalYear, 0, 2);\n String date = StringUtils.mid(lastDayOfFiscalYear, 2, 2);\n\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, Integer.parseInt(month) - 1);\n calendar.set(Calendar.DATE, Integer.parseInt(date));\n calendar.add(Calendar.DATE, 1);\n String firstDayOfNewFiscalYear = sdf.format(calendar.getTime());\n\n return today.compareTo(yearEndPeriodUpperBound) <= 0 && today.compareTo(firstDayOfNewFiscalYear) >= 0;\n }", "boolean hasTradeDate();", "private static Boolean checkYear(){\r\n try{\r\n int year = Integer.parseInt(yearField.getText().trim());\r\n int now = LocalDate.now().getYear();\r\n \r\n if(LocalDate.now().getMonth().compareTo(Month.SEPTEMBER) < 0){\r\n now--;\r\n }\r\n //SIS stores the schedule for last 3 years only \r\n if(year <= now && year >= now - 3 ){\r\n return true;\r\n }\r\n }\r\n catch(Exception e){\r\n Logger.getLogger(\"Year checker\").log(Level.WARNING, \"Exception while resolving the year \", e);\r\n }\r\n return false;\r\n }", "private boolean hasDateThreshold() {\r\n if (entity.getExpirationDate() == null) {\r\n return false;\r\n }\r\n Calendar calendar = Calendar.getInstance();\r\n calendar.add(Calendar.MONTH, 1);\r\n if (entity.getExpirationDate().before(calendar.getTime())) {\r\n return true;\r\n }\r\n return false;\r\n }", "if (exitDateTime == adhocTicket.getExitDateTime()) {\n System.out.println(\"Exit Date Time is passed\");\n }", "private boolean checkDate(PoliceObject po, LocalDate start, LocalDate end) {\n LocalDate formattedEvent = LocalDate.parse(po.getDate());\n boolean isAfter = formattedEvent.isAfter(start) || formattedEvent.isEqual(start);\n boolean isBefore = formattedEvent.isBefore(end) || formattedEvent.isEqual(end);\n return (isAfter && isBefore);\n }", "OffsetDateTime validUntil();", "protected boolean isInYearEndPeriod(Date runDate, String yearEndPeriodLowerBound, String yearEndPeriodUpperBound, String lastDayOfFiscalYear) {\n return isInYearEndLowerBound(runDate, yearEndPeriodLowerBound, lastDayOfFiscalYear) || isInYearEndUpperBound(runDate, yearEndPeriodUpperBound, lastDayOfFiscalYear);\n }", "@Test(expected = IllegalDateException.class)\n\tpublic void testBookStartDateInPast() throws Exception {\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.HOUR, -2);\n\t\t// start is current date - 2\n\t\tDate invalidStartDate = cal.getTime();\n\t\tbookingManagement.book(USER_ID, Arrays.asList(room1.getId()), invalidStartDate, validEndDate);\n\t}", "private void verifyPeriod(Date start, Date end){\n List dates = logRepositoy.findAllByDateGreaterThanEqualAndDateLessThanEqual(start, end);\n if(dates.isEmpty()){\n throw new ResourceNotFoundException(\"Date range not found\");\n }\n }", "public Boolean checkPeriod( ){\r\n\r\n Date dstart = new Date();\r\n Date dend = new Date();\r\n Date dnow = new Date();\r\n\r\n\r\n\r\n // this part will read the openndate file in specific formate\r\n try (BufferedReader in = new BufferedReader(new FileReader(\"opendate.txt\"))) {\r\n String str;\r\n while ((str = in.readLine()) != null) {\r\n // splitting lines on the basis of token\r\n String[] tokens = str.split(\",\");\r\n String [] d1 = tokens[0].split(\"-\");\r\n String [] d2 = tokens[1].split(\"-\");\r\n \r\n int a = Integer.parseInt(d1[0]);\r\n dstart.setDate(a);\r\n a = Integer.parseInt(d1[1]);\r\n dstart.setMonth(a);\r\n a = Integer.parseInt(d1[2]);\r\n dstart.setYear(a);\r\n\r\n a = Integer.parseInt(d2[0]);\r\n dend.setDate(a);\r\n a = Integer.parseInt(d2[1]);\r\n dend.setMonth(a);\r\n a = Integer.parseInt(d2[2]);\r\n dend.setYear(a);\r\n\r\n }\r\n } catch (Exception e) {\r\n System.out.println(\"File Read Error\");\r\n }\r\n\r\n \r\n\r\n if ( dnow.before(dend) && dnow.after(dstart) )\r\n return true; \r\n\r\n return true;\r\n }", "public static boolean appointmentOverlap(Timestamp startTimestamp, Timestamp endTimestamp) {\n updateAppointmentList();\n ObservableList<Appointment> appointmentList = AppointmentList.getAppointmentList();\n for (Appointment appointment: appointmentList) {\n Timestamp existingStartTimestamp = appointment.getStartTimestamp();\n Timestamp existingEndTimestamp = appointment.getEndTimestamp();\n // Check various scenarios for where overlap would occur and return true if any occur\n if (startTimestamp.after(existingStartTimestamp) && startTimestamp.before(existingEndTimestamp)) {\n return true;\n }\n if (endTimestamp.after(existingStartTimestamp) && endTimestamp.before(existingEndTimestamp)) {\n return true;\n }\n if (startTimestamp.after(existingStartTimestamp) && endTimestamp.before(existingEndTimestamp)) {\n return true;\n }\n if (startTimestamp.before(existingStartTimestamp) && endTimestamp.after(existingEndTimestamp)) {\n return true;\n }\n if (startTimestamp.equals(existingStartTimestamp)) {\n return true;\n }\n if (endTimestamp.equals(existingEndTimestamp)) {\n return true;\n }\n }\n // If none of the above scenarios occur, return false\n return false;\n }", "public static boolean checkLeaveAppDates(List<LeaveApplication> lalist,LocalDate start,LocalDate end)\r\n {\r\n \tLocalDate appStartDate,appEndDate;\r\n \tlong days;\r\n \tlong daysbet=start.until(end,ChronoUnit.DAYS);\r\n \tfor(LeaveApplication la:lalist)\r\n \t{\r\n \t\t\r\n \t\tappStartDate=la.getStartdate().toLocalDate();\r\n \t\tappEndDate=la.getEnddate().toLocalDate();\r\n \t\t\r\n \t\tdays=appStartDate.until(appEndDate, ChronoUnit.DAYS);\r\n \t\t\r\n \t\t if(daysbet>days)\r\n \t\t {\r\n \t\t for(LocalDate date = start; date.isBefore(end.plusDays(1)); date = date.plusDays(1)) {\r\n \t\t\tif(date.isEqual(appStartDate) || date.isEqual(appEndDate))\r\n \t\t\t\treturn true;\r\n \t\t }\r\n \t\t }\r\n \t\t else\r\n \t\t {\r\n \t\t\tfor(LocalDate date = appStartDate; date.isBefore(appEndDate.plusDays(1)); date = date.plusDays(1)) {\r\n \t\t\tif(date.isEqual(start) || date.isEqual(end))\r\n \t\t\t\treturn true;\r\n \t }\t\r\n \t\t }\r\n \t\t\r\n \t}\r\n \treturn false;\r\n }", "public boolean overlaps (DayPeriod other) {\n\t\tif (getDate().isEqual(other.getDate()))\n\t\t\treturn getStartTime().isBefore(other.getEndTime()) && other.getStartTime().isBefore(getEndTime());\n\t\treturn false;\n\t}", "boolean hasBeginDate();", "boolean hasAcquireDate();", "@Test\n public void testDateRangeValidDate() throws Exception {\n Map<String, String> fields = new HashMap<String, String>();\n fields.put(\"generatedTimestamp\", \"12/31/1981\");\n \n this.addSingleDayDateRange.invoke(this.lockService, fields);\n \n Assert.assertEquals(\"does not contain valid date range \" + fields.get(\"generatedTimestamp\"),\n \"12/31/1981..01/01/1982\", fields.get(\"generatedTimestamp\"));\n }", "public static void before2(){\n Calendar class0 = Calendar.getInstance();\n class0.set(2019,1,2,3,4,5);\n Calendar when = Calendar.getInstance();\n when.set(2019,1,2,3,4,4);\n boolean ret0 = class0.before(when);\n assert(class0.get(Calendar.YEAR)==2019);\n assert(class0.get(Calendar.MONTH)==1);\n assert(class0.get(Calendar.DATE)==2);\n assert(class0.get(Calendar.HOUR_OF_DAY)==3);\n assert(class0.get(Calendar.MINUTE)==4);\n assert(class0.get(Calendar.SECOND)==5);\n assert(when.get(Calendar.YEAR)==2019);\n assert(when.get(Calendar.MONTH)==1);\n assert(when.get(Calendar.DATE)==2);\n assert(when.get(Calendar.HOUR_OF_DAY)==3);\n assert(when.get(Calendar.MINUTE)==4);\n assert(when.get(Calendar.SECOND)==4);\n assert(ret0==false);\n System.out.println(ret0);\n }", "@Test\n void calculatePeriodRangeOver380() throws ParseException {\n LocalDate testDateStart = LocalDate.parse(\"2015-03-07\");\n LocalDate testDateEnd = LocalDate.parse(\"2017-12-17\");\n Map<String, String> periodMap = datesHelper.calculatePeriodRange(testDateStart, testDateEnd, false);\n assertEquals(\"33 months\", periodMap.get(PERIOD_START));\n assertEquals(\"17 December 2017\", periodMap.get(PERIOD_END));\n }", "boolean hasTransactionDateTime();", "@Test\n void calculatePeriodRangeBelow350() throws ParseException {\n LocalDate testDateStart = LocalDate.parse(\"2016-08-03\");\n LocalDate testDateEnd = LocalDate.parse(\"2017-02-16\");\n Map<String, String> periodMap = datesHelper.calculatePeriodRange(testDateStart, testDateEnd, false);\n assertEquals(\"6 months\", periodMap.get(PERIOD_START));\n assertEquals(\"16 February 2017\", periodMap.get(PERIOD_END));\n }", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "String isOoseChangeDateAllowed(Record inputRecord);", "private static boolean isPast(long[][] dates){\n if(dates[0][0] > dates[1][0])\n return true;\n else if(dates[0][0] == dates[1][0]){\n // If the year matches, then check if the month of Start Date is greater than the month of End Date\n // If the month matches, then check if the day of Start Date is greater than the day of End Date\n if(dates[0][1] > dates[1][1])\n return true;\n else if(dates[0][1] == dates[1][1] && dates[0][2] > dates[1][2])\n return true;\n }\n \n // If the Start Date is older than End Date, return false\n return false;\n }", "boolean hasExpirationDate();", "@Test(expected = IllegalDateException.class)\n\tpublic void testBookStartDateAfterEndDate() throws Exception {\n\t\t// switched end and start\n\t\tbookingManagement.book(USER_ID, Arrays.asList(room1.getId()), validEndDate, validStartDate);\n\t}", "public static boolean CheckOverlap(int Customer_ID, LocalDate date, LocalTime start, LocalTime end, int Appointment_ID) {\n\n ObservableList<Appointment> AList = DBAppointments.GetAllAppointment();\n ObservableList<Appointment> FList = AList.filtered(A -> {\n if (A.getAppointment_ID() != Appointment_ID /*&& A.getCustomerid() == Customer_ID*/) {\n return true;\n\n }\n return false;\n });\n\n LocalDateTime ps = LocalDateTime.of(date, start);\n LocalDateTime pe = LocalDateTime.of(date, end);\n for (Appointment a : FList) {\n LocalDateTime as = LocalDateTime.of(a.getDate(), a.getStartTime());\n LocalDateTime ae = LocalDateTime.of(a.getDate(), a.getEndTime());\n\n if ((as.isAfter(ps) || as.isEqual(ps)) && as.isBefore(pe)) {\n return true;\n }\n if (ae.isAfter(ps) && (ae.isBefore(pe) || ae.isEqual(pe))) {\n return true;\n }\n if ((as.isBefore(ps) || as.isEqual(ps)) && (ae.isAfter(pe) || ae.isEqual(pe))) {\n return true;\n }\n }\n\n return false;\n }", "public void compareStartEndDate() {\n String[] startDateArray = startDate.split(dateOperator);\n String[] endDateArray = endDate.split(dateOperator);\n \n // Compares year first, then month, and then day.\n if (Integer.parseInt(startDateArray[2]) > Integer.parseInt(endDateArray[2])) {\n endDate = endDateArray[0] +\"/\"+ endDateArray[1] +\"/\"+ startDateArray[2];\n } else if (Integer.parseInt(startDateArray[2]) == Integer.parseInt(endDateArray[2])) {\n if (Integer.parseInt(startDateArray[1]) > Integer.parseInt(endDateArray[1])) {\n endDate = endDateArray[0] +\"/\"+endDateArray[1] +\"/\"+(Integer.parseInt(startDateArray[2])+1);\n } else if (Integer.parseInt(startDateArray[1]) == Integer.parseInt(endDateArray[1]) && \n Integer.parseInt(startDateArray[0]) > Integer.parseInt(endDateArray[0])) {\n endDate = endDateArray[0] +\"/\"+endDateArray[1] +\"/\"+(Integer.parseInt(startDateArray[2])+1);\n }\n }\n }", "@NoProxy\n @NoWrap\n public boolean inDateTimeRange(final String start, final String end) {\n if ((getEntityType() == IcalDefs.entityTypeTodo) &&\n getNoStart()) {\n // XXX Wrong? - true if start - end covers today?\n return true;\n }\n\n String evStart = getDtstart().getDate();\n String evEnd = getDtend().getDate();\n\n int evstSt;\n\n if (end == null) {\n evstSt = -1; // < infinity\n } else {\n evstSt = evStart.compareTo(end);\n }\n\n if (evstSt >= 0) {\n return false;\n }\n\n int evendSt;\n\n if (start == null) {\n evendSt = 1; // > infinity\n } else {\n evendSt = evEnd.compareTo(start);\n }\n\n return (evendSt > 0) ||\n (evStart.equals(evEnd) && (evendSt >= 0));\n }", "public boolean hasEndDate() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }", "private boolean checkIfTransferHasBeenLongerThanAWeek(String lastTimeStamp, String currentTimeStamp) {\n // should be in same format now\n\n String[] previousDate = getDateFormatToCompare(lastTimeStamp);\n String[] currentDate = getDateFormatToCompare(currentTimeStamp);\n\n //2020-01-01T12:34:56.000Z\n //2020-01-07T13:14:52.777Z\n\n LOGGER.debug(\"Check for over week since last transfer default false\");\n return false;\n }", "public Timestamp getHC_WorkEndDate();", "public boolean validateOverlap(ObservableList<Appointment> test){\n LocalDateTime A = startLDT;\n LocalDateTime Z = endLDT;\n\n for(Appointment appt : test){\n if(appt.getId() == selectedRow.getId()){\n continue;\n }\n LocalDateTime S = LocalDateTime.parse(appt.getStart(), formatter);\n LocalDateTime E = LocalDateTime.parse(appt.getEnd(), formatter);\n //case 1 - when the start is in the window\n if((A.isAfter(S) || A.isEqual(S)) && A.isBefore(E)){\n return false;\n }\n //case 2 - when the end is in the window\n if(Z.isAfter(S) && (Z.isBefore(E) || Z.isEqual(E))){\n return false;\n }\n //case 3 - when the start and end are outside of the window\n if(((A.isBefore(S) || A.isEqual(S)) && (Z.isAfter(E) || Z.isEqual(E)))){\n return false;\n }\n }\n return true;\n }", "public boolean hasEndDate() {\n return fieldSetFlags()[2];\n }", "private boolean CheckAvailableDate(TimePeriod tp)\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\tString query = \"SELECT * FROM Available WHERE available_hid = '\"+hid+\"' AND \"+\n\t\t\t\t\t\t\t\"startDate = '\"+tp.stringStart+\"' AND endDate = '\"+tp.stringEnd+\"'\"; \n\t\t\t\n\t\t\tResultSet rs = con.stmt.executeQuery(query); \n\t\t\t\n\t\t\tcon.closeConnection();\n\t\t\tif(rs.next())\n\t\t\t{\n\t\t\t\treturn true; \n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn false;\n\t}", "public boolean expired(){\n return !Period.between(dateOfPurchase.plusYears(1), LocalDate.now()).isNegative();\n }", "public static void before0(){\n Calendar class0 = Calendar.getInstance();\n class0.set(2019,1,2,3,4,5);\n Calendar when = Calendar.getInstance();\n when.set(2019,1,2,3,4,6);\n boolean ret0 = class0.before(when);\n assert(class0.get(Calendar.YEAR)==2019);\n assert(class0.get(Calendar.MONTH)==1);\n assert(class0.get(Calendar.DATE)==2);\n assert(class0.get(Calendar.HOUR_OF_DAY)==3);\n assert(class0.get(Calendar.MINUTE)==4);\n assert(class0.get(Calendar.SECOND)==5);\n assert(when.get(Calendar.YEAR)==2019);\n assert(when.get(Calendar.MONTH)==1);\n assert(when.get(Calendar.DATE)==2);\n assert(when.get(Calendar.HOUR_OF_DAY)==3);\n assert(when.get(Calendar.MINUTE)==4);\n assert(when.get(Calendar.SECOND)==6);\n assert(ret0==true);\n System.out.println(ret0);\n }", "public static boolean verifyApplyDates(final String startDate, final String endDate) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n try {\n Date fromDate = sdf.parse(startDate);\n Date toDate = sdf.parse(endDate);\n Date curDate = new Date();\n if (!fromDate.after(curDate)) {\n System.out.println(\"Start Date must be greater than Current Date\");\n return false;\n } else if (!toDate.after(fromDate)) {\n System.out.println(\"End Date must be greater than Start Date\");\n return false;\n }\n } catch (Exception e) {\n System.out.println(e);\n }\n return true;\n }", "public static void before1(){\n Calendar class0 = Calendar.getInstance();\n class0.set(2019,1,2,3,4,5);\n Calendar when = Calendar.getInstance();\n when.set(2019,1,2,3,4,5);\n boolean ret0 = class0.before(when);\n assert(class0.get(Calendar.YEAR)==2019);\n assert(class0.get(Calendar.MONTH)==1);\n assert(class0.get(Calendar.DATE)==2);\n assert(class0.get(Calendar.HOUR_OF_DAY)==3);\n assert(class0.get(Calendar.MINUTE)==4);\n assert(class0.get(Calendar.SECOND)==5);\n assert(when.get(Calendar.YEAR)==2019);\n assert(when.get(Calendar.MONTH)==1);\n assert(when.get(Calendar.DATE)==2);\n assert(when.get(Calendar.HOUR_OF_DAY)==3);\n assert(when.get(Calendar.MINUTE)==4);\n assert(when.get(Calendar.SECOND)==5);\n assert(ret0==false);\n System.out.println(ret0);\n }", "public void validateEndDate(Date value)\n {\n \n if (value != null)\n {\n OADBTransaction transaction = getOADBTransaction();\n\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, you cannot compare \n // oracle.jbo.domain.Date objects directly. Instead, convert the value to \n // a long as shown.\n \n long sysdate = transaction.getCurrentDBDate().dateValue().getTime();\n long endDate = value.dateValue().getTime();\n\n if (endDate < sysdate)\n { \n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"EndDate\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_END_DATE_PAST\"); // Message name\n } \n }\n\n }", "public boolean hasEndDate() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }", "int existsSame(String startDate1,String endDate1,String startDate2,String endDate2) throws SQLException, ParseException {\n Connection con = db.connection();\n PreparedStatement stmt = con.prepareStatement(\"select id from rateplan where rp1startdate = ? and rp1enddate = ? and rp2startdate = ? and rp2enddate = ?\");\n stmt.setDate(1,getDate(startDate1));\n stmt.setDate(2,getDate(endDate1));\n stmt.setDate(3,getDate(startDate2));\n stmt.setDate(4,getDate(endDate2));\n\n ResultSet rs = stmt.executeQuery();\n if (rs.next())\n return rs.getInt(1);\n return -1;\n\n }", "boolean hasSettlementDate();", "public boolean isValid() {\n\t\tboolean result;\n\t\tDate mySD = this.getStartDate();\n\t\tDate myED = this.getEndDate();\n\t\tTime myST = this.getStartTime();\n\t\tTime myET = this.getEndTime();\n\n\t\tif (myED.isBefore(mySD)) { //end is before start\n\t\t\tresult = false;\n\t\t} else if (myED.isEquals(mySD)) { //start and end same day\n\t\t\tif (myET.compareTo(myST) < 0) { //end time before start time\n\t\t\t\tresult = false;\n\t\t\t} else { result = true;\t}\n\t\t} else { result = true;\t}\n\n\t\treturn result;\n\t}", "java.lang.String getEndDateYYYY();", "boolean hasExpiryTimeSecs();", "public boolean checkReservationDateFromToday(String resMonth, String resDay, String resYear){\n int daysDiff,monthDiff,yearDiff; //date difference\n int monthToday,dayToday,yearToday; //date today\n int monthReserved,dayReserved,yearReserved; //date of reservation\n \n //date of reservation\n String sMonth,sDay,sYear;\n sMonth = resMonth;\n sDay = resDay;\n sYear = resYear;\n \n getCurrentDate(); //call to get current date\n \n boolean dateValid = false;\n sMonth = convertMonthToDigit(sMonth); //convert string month to string number\n \n monthToday = parseInt(month);\n dayToday = parseInt(day);\n yearToday = parseInt(year);\n \n //convert to integer\n monthReserved = parseInt(sMonth);\n dayReserved = parseInt(sDay);\n yearReserved = parseInt(sYear);\n \n //get the difference\n monthDiff = monthReserved - monthToday;\n daysDiff = dayReserved - dayToday;\n yearDiff = yearReserved - yearToday;\n \n System.out.println(\"startMonth: \"+ sMonth);\n System.out.println(\"yearDiff: \" + yearDiff);\n System.out.println(\"daysDiff: \" + daysDiff);\n System.out.println(\"monthDiff: \" + monthDiff);\n \n if(yearDiff > 0){ //next year\n return true;\n }\n \n if(yearDiff == 0){ //this year\n if(monthDiff >= 0){\n if(monthDiff == 0 && daysDiff == 0){ //cannot reserve room on the day\n //invalid day, the date is today\n dateValid = false;\n System.out.println(\"reservation day must not today.\");\n }else if(monthDiff==0 && daysDiff < 0){ // same month today, invalid day diff\n dateValid = false; \n System.out.println(\"reservation day must not in the past\");\n }else if(monthDiff>0 && daysDiff < 0){ //not the same month today, accept negative day diff\n dateValid = true;\n }else{ //the same month and valid future day\n dateValid = true;\n }\n }else{\n //invalid month\n System.out.println(\"reservation month must not in the past.\");\n }\n }else{\n //invalid year\n System.out.println(\"reservation year must not in the past.\");\n }\n \n return dateValid;\n }", "public boolean checkDate(){\n Calendar c = Calendar.getInstance();\n Date currentDate = new Date(c.get(Calendar.DAY_OF_MONTH),c.get(Calendar.MONTH)+1, c.get(Calendar.YEAR));\n return (isEqualOther(currentDate) || !isEarlyThanOther(currentDate));\n\n }", "private boolean checksForAnnualLeaveAreOk(String reason, AbsentYear absYear, long numDaysRequested, int empId) {\n\t\tif(reason.compareTo(\"Annual Leave\") == 0) {\n\t\t\treturn (checkAnnualLeaveRequest(absYear, numDaysRequested, empId)) ? true : false;\n\t\t}\n\t\treturn true;\n\t}", "private boolean verify_AdjustedTimeIsSet() {\n \n boolean res = adjustedTimeIsSet();\n \n try {\n\n if (!res) {\n throw new Exception(\"Cannot provide data related to 'adjusted timestamp'\"\n + \" until it has been generated by a successful call to\"\n + \" `adjust(Shift)`. Data passed may be incorrect.\");\n }\n \n } catch(Exception e) {\n System.err.println(e.toString());\n }\n \n return res;\n \n }", "private boolean isCollision(Date currentStart, Date currentEnd,\n Date otherStart, Date otherEnd)\n {\n return currentStart.compareTo(otherEnd) <= 0\n && otherStart.compareTo(currentEnd) <= 0;\n }", "@Test\n public void testValidateUpdateLifeTimeWithGoodDates() {\n updates.add(mockAssetView(\"endDate\", new Timestamp(20000).toString()));\n updates.add(mockAssetView(\"startDate\", new Timestamp(25000).toString()));\n defaultRuleAssetValidator.validateUpdateAsset(editorInfo, updates, null);\n verify(assetService).addError(eq(RuleProperty.END_DATE), anyString()); \n }", "boolean hasFromDay();", "private int beforeNowAfter(Date lectureDate, int start, int end){\n Date now = new Date();\n if(lectureDate.getYear()<now.getYear()){\n return 0;\n }else if(lectureDate.getYear()>now.getYear()){\n return 2;\n }else{\n if(lectureDate.getMonth()<now.getMonth()){\n return 0;\n }else if(lectureDate.getMonth()>now.getMonth()){\n return 2;\n }else{\n if(lectureDate.getDate()<now.getDate()){\n return 0;\n }else if(lectureDate.getDate()>now.getDate()){\n return 2;\n }else{\n if(end==now.getHours()&&now.getMinutes()>15){ //Lectures end officially after 15min past the end hour.\n return 0;\n }else if(end<now.getHours()){\n return 0;\n }else if(start>now.getHours()){\n return 2;\n }else{\n return 1;\n }\n }\n }\n }\n }", "public boolean checkRoomAvailabilty(String date,String startTime,String endTime ,String confID);", "public boolean validDateRange() {\n\t\treturn dateEnd.compareTo(dateStart) > 0;\n\t}", "@Test\r\n\tpublic void testCancelAuctionOnAuctionExsistsForNonProfitPastAuctionDate(){\r\n\t\t\r\n\t\tCalendar c = new Calendar();\t\t\r\n\t\tc.addAuction(new AuctionRequest(d1, t1, myNonProfit.getOrgName()));\t\t\r\n\t\tassertFalse(c.cancelAuction(myNonProfit, myAuctDateAfterAuctionDate, myCurrDate));\r\n\t\t\r\n\t}", "@Test\r\n\tpublic void testCancelAuctionOnAuctionExsistsForNonProfitEqualAuctionDate(){\r\n\t\t\r\n\t\tCalendar c = new Calendar();\t\t\r\n\t\tc.addAuction(new AuctionRequest(d1, t1, myNonProfit.getOrgName()));\t\t\r\n\t\tassertFalse(c.cancelAuction(myNonProfit, myCurrDate, myCurrDate));\r\n\t\t\r\n\t}", "@Test\n void calculatePeriodLessThanOneMonth() throws ParseException {\n LocalDate testDateStart = LocalDate.parse(\"2015-03-07\");\n LocalDate testDateEnd = LocalDate.parse(\"2015-04-01\");\n Map<String, String> periodMap = datesHelper.calculatePeriodRange(testDateStart, testDateEnd, false);\n assertEquals(\"1 month\", periodMap.get(PERIOD_START));\n assertEquals(\"1 April 2015\", periodMap.get(PERIOD_END));\n }", "boolean JoiningCriteriaMet() {\n\t\tfor(int i = timeService.getCurrentYear()-1; i > timeService.getCurrentYear() - KyotoEntryYears; i--) {\n\t\t\tif (carbonOutputMap.get(i) > emissionsTargetMap.get(i)) {\n\t\t\t\treturn(false);\n\t\t\t}\n\t\t}\n\t\treturn(true); // \n\t}", "private static boolean intersect(\n\t\tDateTime start1, DateTime end1,\n\t\tDateTime start2, DateTime end2)\n\t{\n\t\tif (DateTime.op_LessThanOrEqual(end2, start1) || DateTime.op_LessThanOrEqual(end1, start2))\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "private boolean isAppointmentExist(String day, String startTime, String endTime){\n String[] start = startTime.split(\":\");\n String[] end = endTime.split(\":\");\n\n //Set the 2 hours\n int hourStart = Integer.parseInt(start[0]);\n int hourEnd = Integer.parseInt(end[0]);\n\n //Set the minutes\n int minuteStart = Integer.parseInt(start[1]);\n int minuteEnd = Integer.parseInt(end[1]);\n\n int dayID = getDay(day).getDayID();\n\n for(Appointment Appointment: appointments){\n\n int dayIDApp = Appointment.getDay_id();\n\n Log.d(\"BUGDATABASEHANDLER\",\"Day:\" + dayID + \" day 2 : \" + dayIDApp);\n\n //If the same day, make sure it doesnt overlap\n if(dayID == dayIDApp){\n int hourStartApp = Appointment.getStartHour();\n int hourEndApp = Appointment.getEndHour();\n\n int minuteStartApp = Appointment.getStartMinute();\n int minuteEndApp = Appointment.getEndTimeMinute();\n\n if(hourStart == hourStartApp && minuteStart >= minuteStartApp)\n return(false);\n if(hourEnd == hourEndApp && minuteEnd <= minuteEndApp){\n return(false);\n }\n //If the new hour is between the hourStart and hourEnd of existing availability\n if(hourStart < hourEndApp && hourStart > hourStartApp)\n return(false);\n //If the new hour is between the hourStart and hourEnd of existing availability\n if(hourEnd > hourStartApp && hourEnd < hourEndApp)\n return(false);\n //If the new end is the same as the start but the minute overlap\n if(hourEnd == hourStartApp && minuteStartApp <= minuteEnd)\n return(false);\n\n if(hourStart == hourEndApp && minuteEndApp >= minuteStart)\n return(false);\n\n }\n }\n\n return(true);\n }", "@Test\r\n\tpublic void testCancelAuctionOnAuctionDoesntExistForNonProfit(){\r\n\t\tCalendar c = new Calendar();\t\r\n\t\tassertFalse(c.cancelAuction(myNonProfit, myAuctDateMoreThan2Days, myCurrDate));\t\t\r\n\t}", "public boolean isSetActivedEndTimestamp() {\n return EncodingUtils.testBit(__isset_bitfield, __ACTIVEDENDTIMESTAMP_ISSET_ID);\n }", "boolean hasContainerTimestamp();", "boolean hasVotingEndTime();", "boolean hasStartTime();", "public boolean checkTimePeriod(String from, String to) throws ParseException{\r\n\t\r\n\tDateFormat df = new SimpleDateFormat (\"yyyy-MM-dd\");\r\n boolean b = true;\r\n // Get Date 1\r\n Date d1 = df.parse(from);\r\n\r\n // Get Date 2\r\n Date d2 = df.parse(to);\r\n\r\n //String relation=\"\";\r\n if (d1.compareTo(d2)<=0){\r\n \t b=true;\r\n // relation = \"the date is less\";\r\n }\r\n else {\r\n b=false;\r\n }\r\n return b;\r\n}", "public boolean checkOverlappingTimes(LocalDateTime startA, LocalDateTime endA,\n LocalDateTime startB, LocalDateTime endB){\n return (endB == null || startA == null || !startA.isAfter(endB))\n && (endA == null || startB == null || !endA.isBefore(startB));\n }", "private boolean hasCoolOffPeriodExpired(Jwt jwt) {\n\n Date issuedAtTime = jwt.getClaimsSet().getIssuedAtTime();\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(new Date());\n calendar.set(Calendar.MILLISECOND, 0);\n calendar.add(Calendar.MINUTE, -1);\n\n return calendar.getTime().compareTo(issuedAtTime) > 0;\n }", "public boolean DateValidation(String date, String startTime, String currentTime) {\n\n boolean state = false;\n\n //String x = dateChooser.getDate().toString();\n String Hyear = date.substring(24, 28); // get user input date\n String Hmonth = monthToCompare(date);\n String Hdate = date.substring(8, 10);\n String stHr = startTime.substring(0, 2);\n String stMin = startTime.substring(3, 5);\n\n int userYr, userMnth, userDate, userHour, userMin = 0;\n userYr = Integer.parseInt(Hyear); // conversion of user entered year to int\n userMnth = Integer.parseInt(Hmonth);\n userDate = Integer.parseInt(Hdate);\n userHour = Integer.parseInt(stHr);\n userMin = Integer.parseInt(stMin);\n\n String yyr = currentTime.substring(0, 4); // get currrent year from the string f\n String mmnth = currentTime.substring(5, 7);\n String ddt = currentTime.substring(8, 10); // get current date from the string f\n String hours = currentTime.substring(11, 13);\n String mins = currentTime.substring(14, 16);\n\n int yr, mnth, dt, shr, smin = 0;\n yr = Integer.parseInt(yyr); // convert current year from string to int\n mnth = Integer.parseInt(mmnth);\n dt = Integer.parseInt(ddt);\n shr = Integer.parseInt(hours);\n smin = Integer.parseInt(mins);\n\n if ((userYr == yr) || (userYr > yr)) { // if user entered year is the current year or future year, ok \n if (((userYr == yr) && (userMnth >= mnth)) || ((userYr > yr) && (userMnth >= mnth)) || ((userYr > yr) && (userMnth < mnth))) {\n if (((userYr == yr) && (userMnth >= mnth) && (userDate >= dt)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt)) || ((userYr == yr) && (userMnth > mnth) && (userDate >= dt))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt))) {\n if (((userYr == yr) && (userMnth == mnth) && (userDate >= dt) && (userHour >= shr)) || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour < shr))\n || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour >= shr)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour >= shr))\n || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour < shr)) || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour < shr))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour >= shr)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour >= shr))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour >= shr)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour >= shr))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour < shr)) || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour < shr))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour < shr)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour < shr))) {\n if (((userYr == yr) && (userMnth == mnth) && (userDate == dt) && (userHour == shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth == mnth) && (userDate == dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth == mnth) && (userDate == dt) && (userHour > shr) && (userMin < smin)) || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour < shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour >= shr) && (userMin < smin))\n || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour < shr) && (userMin < smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour >= shr) && (userMin < smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour >= shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour >= shr) && (userMin < smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour < shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour < shr) && (userMin < smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour < shr) && (userMin < smin))) {\n state = true;\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid time!\");\n state = false;\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid time!\");\n state = false;\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid day!\");\n state = false;\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid month!\");\n state = false;\n }\n } else {// if the user entered year is already passed\n JOptionPane.showMessageDialog(null, \"Invalid year\");\n state = false;\n }\n return state;\n }", "boolean isOutOfDate(String end) {\n SimpleDateFormat ddMMyyyy = new SimpleDateFormat(\"dd/MM/yyyy\", Locale.UK);\n Calendar c = Calendar.getInstance();\n Date current = c.getTime();\n current.setTime(current.getTime() - 86400000);\n try {\n Date endDate = ddMMyyyy.parse(end);\n return (endDate.compareTo(current) < 0);\n } catch (ParseException e) {\n System.out.println(\"Error occurred parsing Date\");\n }\n return false;\n }", "private static String dateRangeRestriction(String startDate, String endDate){\r\n String restriction = \"\";\r\n String[] startDateParts = startDate.split(\"/\");\r\n String[] endDateParts = endDate.split(\"/\");\r\n int prevYear = Integer.parseInt(endDateParts[0]) - 1; //year previus to End year\r\n int nextYear = Integer.parseInt(startDateParts[0]) + 1; //year next to End year\r\n if(prevYear-nextYear > 1){ // For intermediate years we may not care about days and months\r\n restriction += \" PubDate-Year:[\" + nextYear + \" TO \" + prevYear + \"] OR \";\r\n }\r\n if(endDateParts[0].equals(startDateParts[0])){ // Year of start and end is the same\r\n restriction += \"( +PubDate-Year:\" + endDateParts[0] \r\n + \" +PubDate-Month:[\" + startDateParts[1] + \" TO \" + endDateParts[1] \r\n + \"] +PubDate-Day:[\" + startDateParts[2] + \" TO \" + endDateParts[2] + \"])\";\r\n } else {\r\n restriction += \"( +PubDate-Year:\" + endDateParts[0] \r\n + \" +PubDate-Month:[ 01 TO \" + endDateParts[1] \r\n + \"] +PubDate-Day:[ 01 TO \" + endDateParts[2] + \"]) OR \"\r\n + \"( +PubDate-Year:\" + startDateParts[0] \r\n + \" +PubDate-Month:[ \" + startDateParts[1] + \" TO 12\" \r\n + \"] +PubDate-Day:[ \" + startDateParts[2] + \" TO 31 ])\";\r\n }\r\n restriction = \"(\" + restriction + \")\";\r\n return restriction;\r\n }", "private boolean acceptDayG(DayG day) {\r\n if(day.getYear() != endDate.get(Calendar.YEAR))\r\n return false;\r\n \r\n int dayOfYear = day.getCalendar().get(Calendar.DAY_OF_YEAR);\r\n if(dayOfYear == acceptedDatesRange[0] || dayOfYear == \r\n acceptedDatesRange[1] || (dayOfYear < acceptedDatesRange[1] &&\r\n dayOfYear > acceptedDatesRange[0])) {\r\n \r\n //MiscStuff.writeToLog(\"\" + dayOfYear + \" \" + acceptedDatesRange[0] +\r\n // \" \" + acceptedDatesRange[1]); //print year.....................................................................................\r\n return true;\r\n }\r\n return false;\r\n }", "public static void main(String[] args) {\r\n\t\tDate today = new Date(2, 26, 2012);\r\n\t\tSystem.out.println(\"Input date is \" + today);\r\n\t\tSystem.out.println(\"Printing the next 10 days after \" + today);\r\n\t\tfor (int i = 0; i < 10; i++) {\r\n\t\t\ttoday = today.next();\r\n\t\t\tSystem.out.println(today);\r\n\t\t}\r\n\t\tDate expiry = new Date(2011);\r\n\t\tSystem.out.println(\"testing year 2011 as input:\" + expiry);\r\n\r\n\t\tDate todayDate = new Date();\r\n\t\tSystem.out.println(\"todays date: \" + todayDate);\r\n\t\tSystem.out.println(\"current month:\" + todayDate.month);\r\n\r\n\t\t// testing isValidMonth function\r\n\t\tDate start = new Date(\"08-01-2010\");\r\n\t\tDate end1 = new Date(\"09-01-2010\");\r\n\t\tboolean param1 = start.isValidMonth(4, end1);\r\n\t\tSystem.out.println(\"is April valid between: \" + start + \" and \" + end1\r\n\t\t\t\t+ \": \" + param1);\r\n\t\tDate end2 = new Date(\"02-01-2011\");\r\n\t\tboolean param2 = start.isValidMonth(2, end2);\r\n\t\tSystem.out.println(\"is feb valid between: \" + start + \" and \" + end2\r\n\t\t\t\t+ \": \" + param2);\r\n\t\tboolean param3 = start.isValidMonth(8, start);\r\n\t\tSystem.out.println(\"is aug valid between: \" + start + \" and \" + start\r\n\t\t\t\t+ \": \" + param3);\r\n\t\tparam3 = start.isValidMonth(4, start);\r\n\t\tSystem.out.println(\"is april valid between: \" + start + \" and \" + start\r\n\t\t\t\t+ \": \" + param3);\r\n\t\tDate end3 = new Date(\"02-01-2010\");\r\n\t\tboolean param4 = start.isValidMonth(8, end3);\r\n\t\tSystem.out.println(\"is aug valid between: \" + start + \" and \" + end3\r\n\t\t\t\t+ \": \" + param4);\r\n\t\t \r\n\t\tDate lease = new Date(\"1-01-2012\");\r\n\t\tDate expiry1 = new Date(\"12-31-2012\");\r\n\r\n\t\t// testing daysBetween\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING daysBetween method\\n------------------------------\");\r\n\t\tint count = lease.daysBetween(expiry);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + expiry + \"is: \"\r\n\t\t\t\t+ count);\r\n count = new Date(\"1-01-2011\").daysBetween(new Date(\"12-31-2011\"));\r\n\t\tSystem.out.println(\"Days between [1-01-2011] and [12-31-2011]\" + \"is: \"\r\n\t\t\t\t+ count);\r\n\t\tcount = lease.daysBetween(expiry1);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + expiry1 + \"is: \"\r\n\t\t\t\t+ count);\r\n\t\tDate testDate = new Date(\"12-31-2013\");\r\n\t\tcount = lease.daysBetween(testDate);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and [12-31-2013] \"\r\n\t\t\t\t+ \"is: \" + count);\r\n\t\tcount = lease.daysBetween(lease);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + lease + \"is: \"\r\n\t\t\t\t+ count);\r\n count = lease.daysBetween(new Date(\"1-10-2012\"));\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and [1-10-2012\" + \"is: \"\r\n\t\t\t\t+ count);\r\n \r\n\t\tcount = testDate.daysBetween(lease);\r\n\t\tSystem.out.println(\"Days between \" + testDate + \" and \" + lease + \"is: \"\r\n\t\t\t\t+ count);\r\n\r\n\t\t// testin isBefore\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING isBefore method\\n------------------------------\");\r\n\t\tboolean isBefore = today.isBefore(today.next());\r\n\t\tSystem.out.println(today + \"is before \" + today.next() + \": \"\r\n\t\t\t\t+ isBefore);\r\n\t\tisBefore = today.next().isBefore(today);\r\n\t\tSystem.out.println(today.next() + \"is before \" + today + \": \"\r\n\t\t\t\t+ isBefore);\r\n\t\tisBefore = today.isBefore(today);\r\n\t\tSystem.out.println(today + \"is before \" + today + \": \" + isBefore);\r\n isBefore = today.isBefore(today.addMonths(12));\r\n\t\tSystem.out.println(today + \"is before \" + today.addMonths(12) + \": \" + isBefore);\r\n\r\n\t\t// testing addMonths\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING addMonths method\\n------------------------------\");\r\n\t\ttoday = new Date(\"1-31-2011\");\r\n\t\tDate newDate = today.addMonths(1);\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"adding 1 months to \" + today + \" gives: \" + newDate);\r\n\t\tnewDate = today.addMonths(13);\r\n\t\tSystem.out.println(\"adding 13 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\ttoday = new Date(\"3-31-2010\");\r\n\t\tnewDate = today.addMonths(15);\r\n\t\tSystem.out.println(\"adding 15 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(23);\r\n\t\tSystem.out.println(\"adding 23 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(49);\r\n\t\tSystem.out.println(\"adding 49 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(0);\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"adding 0 months to \" + today + \" gives: \" + newDate);\r\n\t\t\r\n\t\t// testing monthsBetween\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING monthsBetween method\\n------------------------------\");\r\n\t\tint monthDiff = today.monthsBetween(today.addMonths(1));\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + today.addMonths(1)\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\tmonthDiff = today.next().monthsBetween(today);\r\n\t\tSystem.out.println(\"months between \" + today.next() + \" and \" + today\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\ttoday = new Date(\"09-30-2011\");\r\n\t\tDate endDate = new Date(\"2-29-2012\");\r\n\t\tmonthDiff = today.monthsBetween(endDate);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate + \": \"\r\n\t\t\t\t+ monthDiff);\r\n\t\ttoday = new Date();\r\n\t\tDate endDate1 = new Date(\"12-04-2011\");\r\n\t\tmonthDiff = today.monthsBetween(endDate1);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate1\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\ttoday = new Date();\r\n\t\tDate endDate2 = new Date(\"12-22-2010\");\r\n\t\tmonthDiff = today.monthsBetween(endDate2);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate2\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\t\r\n\t\t// following should generate exception as date is invalid!\r\n\t\t// today = new Date(13, 13, 2010);\r\n\r\n\t\t// expiry = new Date(\"2-29-2009\");\r\n // newDate = today.addMonths(-11);\r\n\r\n\t}", "public Boolean scheduleWebinar(HashMap<String, String> mapTestData){\r\n\t\tBoolean retValue=false;\r\n\t\ttry{\r\n\t\t\tString webinarTitle=mapTestData.get(\"Webinar Title\");\r\n\t\t\tString description=mapTestData.get(\"Description\");\r\n\t\t\t//String type=mapTestData.get(\"Webinar Type\");\r\n\t\t\tint daysToStart=Integer.parseInt(mapTestData.get(\"No Of Days to Start\"));\r\n\t\t\tLog.info(\"Day to start: \"+daysToStart);\r\n\t\t\tString startTime=mapTestData.get(\"Start Time\");\r\n\t\t\tLog.info(\"Start Time: \"+startTime);\r\n\t\t\tString startTimeAMPM=mapTestData.get(\"Start Time AMPM\");\r\n\t\t\tLog.info(\"Start Time AMPM: \"+startTimeAMPM);\r\n\t\t\tString endTime=mapTestData.get(\"End Time\");\r\n\t\t\tLog.info(\"End Time: \"+endTime);\r\n\t\t\tString endTimeAMPM=mapTestData.get(\"End Time AMPM\");\r\n\t\t\tLog.info(\"Start Time AMPM: \"+endTimeAMPM);\r\n\t\t\tString timeZone=mapTestData.get(\"Time Zone\");\r\n\t\t\tLog.info(\"Time Zone: \"+timeZone);\r\n\t\t\tString language=mapTestData.get(\"Language\");\r\n\t\t\tLog.info(\"Language: \"+language);\r\n\t\t\t//Verify if My Webinar page is displayed after login\r\n\t\t\tMyWebinarPage objMyWebinar=new MyWebinarPage(driver);\r\n\t\t\tif(objMyWebinar.verifyMyWebinarPage()){\r\n\t\t\t\t//click Schedule Webinar link \r\n\t\t\t\tobjMyWebinar.clickScheduleWebinar();\r\n\t\t\t\t//verify if Schedule Webinar page is displayed\r\n\t\t\t\tScheduleWebinarPage objSchdWebinar=new ScheduleWebinarPage(driver);\r\n\t\t\t\tif(objSchdWebinar.verifyScheduleWebinarPage()){\r\n\t\t\t\t\t//Fill the schedule webinar form\r\n\t\t\t\t\tobjSchdWebinar.enterWebinarTitle(webinarTitle);\r\n\t\t\t\t\tobjSchdWebinar.enterDescription(description);\r\n\t\t\t\t\t//Logic for date selector starts here\r\n\t\t\t\t\tobjSchdWebinar.openStartDatePicker();\r\n\t\t\t\t\tobjSchdWebinar.verifyStartDatePicker();\r\n\t\t\t\t\tString currMonth=objSchdWebinar.getMonth();\r\n\t\t\t\t\tLog.info(\"Current Month in the calendar: \"+currMonth);\r\n\t\t\t\t\tobjDate=new DateFormats();\r\n\t\t\t\t\tString webinarStartDay=objDate.getStartDay(daysToStart);\r\n\t\t\t\t\tString webinarStartMonth=objDate.getStartMonth(daysToStart);\r\n\t\t\t\t\t//If webinar date falls in current month\r\n\t\t\t\t\tif(currMonth.equalsIgnoreCase(webinarStartMonth)){\r\n\t\t\t\t\t\tLog.info(\"Months are same in calendar & calculated:\"+currMonth+\" \"+webinarStartMonth);\r\n\t\t\t\t\t\tobjSchdWebinar.clickRequiredDate(webinarStartDay);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t//If webinar date falls in upcoming months\r\n\t\t\t\t\t\tLog.info(\"Months are different in calendar & calculated:\"+currMonth+\" \"+webinarStartMonth);\r\n\t\t\t\t\t\tobjSchdWebinar.clickNextMonth(webinarStartMonth);\r\n\t\t\t\t\t\tobjSchdWebinar.clickRequiredDate(webinarStartDay);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//Logic for date selector ends here\r\n\t\t\t\t\tobjSchdWebinar.enterStartTime(startTime, startTimeAMPM);\r\n\t\t\t\t\tobjSchdWebinar.enterEndTime(endTime, endTimeAMPM);\r\n\t\t\t\t\tobjSchdWebinar.selectTimeZone(timeZone);\r\n\t\t\t\t\tobjSchdWebinar.selectLanguage(language);\r\n\t\t\t\t\tobjSchdWebinar.clickSchedule();\r\n\t\t\t\t\tretValue=true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tLog.info(\"Home Page not loaded properly\");\r\n\t\t\t\t\tretValue=false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tLog.info(\"My Webinar Page not loaded properly\");\r\n\t\t\t\tretValue=false;\r\n\t\t\t}\r\n\t\t\treturn retValue;\r\n\t\t}catch(Exception e){\r\n\t\t\tLog.error(\"Exception in scheduleWebinar:\",e);\r\n\t\t\tretValue=false;\r\n\t\t\treturn retValue;\r\n\t\t}\r\n\t}", "protected void checkMappingReleaseYear(RecordUrlData record) {\n checkMainMapping(record, RECORD_FACTORY.getMappingReleaseYear(record));\n }", "public boolean checkDoubleBooking(LocalDateTime start, LocalDateTime end, ArrayList<String> eventIds){\n for (String id: eventIds){\n if (checkOverlappingTimes(getEvent(id).getStartTime(), getEvent(id).getEndTime(),\n start, end)){\n return false;\n }}\n return true;\n }", "public static String apply_for_leave(int empId,String start_date, String end_date, int no_ldays,String leave_type, String leave_reason)\r\n throws ParseException {\r\n String s=null;\r\n Employee e = Employee.listById(empId);\r\n if (e != null) {\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n Date leave_from = sdf.parse(start_date);\r\n Date leave_to = sdf.parse(end_date);\r\n Calendar start = Calendar.getInstance();\r\n start.setTime(leave_from);\r\n Calendar end = Calendar.getInstance();\r\n end.setTime(leave_to);\r\n int count = 0;\r\n for (Date date = start.getTime(); start.before(end); start.add(Calendar.DATE, 1), date = start.getTime()) {\r\n Calendar c = Calendar.getInstance();\r\n c.setTime(date);\r\n int dayOfWeek = c.get(Calendar.DAY_OF_WEEK);\r\n if (dayOfWeek == 1 || dayOfWeek == 7) {\r\n count++;\r\n }\r\n }\r\n System.out.println(count);\r\n long diff = leave_to.getTime() - leave_from.getTime();\r\n System.out.println(diff);\r\n long days = diff / (1000 * 60 * 60 * 24);\r\n Date today = new Date();\r\n String appliedOn = sdf.format(today);\r\n days = days + 1;\r\n long availBal = 0;\r\n long dif = 0;\r\n long updLeave = 0;\r\n String leaveStatus = null;\r\n // int overl = Leave.countNo(empId, start_date, end_date);\r\n availBal = e.getavailleaves();\r\n dif = availBal - days;\r\n updLeave = days - count;\r\n int bal = (int) updLeave;\r\n if (days <= 0) {\r\n s=\"Start Date Must be Greater than EndDate...\";\r\n } else if (dif < 0) {\r\n s=\"insufficient leav balance\";\r\n } else if (no_ldays != days) {\r\n s=\"NO Of Days Should be right\";\r\n } else if (leave_from.compareTo(sdf.parse(appliedOn)) < 0) {\r\n s=\"Start should be greater or equal to current date\";\r\n // } else if (overl > 0) {\r\n // s=\"already applied on given date\";\r\n } else {\r\n if (e.getMgr_id() == 0) {\r\n leaveStatus = \"APPROVED\";\r\n dao().apply_for_leave(empId, start_date, end_date, bal, leave_type, leaveStatus, leave_reason, appliedOn);\r\n s=\"Leave Applied Successfully...\";\r\n } else {\r\n leaveStatus = \"PENDING\";\r\n dao().apply_for_leave(empId, start_date, end_date, bal,\r\n leave_type, leaveStatus, leave_reason, appliedOn);\r\n edao().decrement(empId, bal);\r\n s = \"Leave Applied Successfully For \" + (days - count) + \" Days.\";\r\n }\r\n }\r\n } else {\r\n s=\"invalid employee\";\r\n }\r\n return s;\r\n }", "long getEndDate();", "long getEndDate();", "protected boolean isValidReturnDate(final Map<String, Map<String, TransportOfferingModel>> transportOfferings)\n\t{\n\t\tif (transportOfferings.size() < NdcservicesConstants.RETURN_FLIGHT_LEG_NUMBER)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\tZonedDateTime arrivalUtcTime = TravelDateUtils.getUtcZonedDateTime(getTimeService().getCurrentTime(),\n\t\t\t\tZoneId.systemDefault());\n\n\t\tfor (final Map.Entry<String, TransportOfferingModel> transportOffering : transportOfferings\n\t\t\t\t.get(String.valueOf(NdcservicesConstants.OUTBOUND_FLIGHT_REF_NUMBER)).entrySet())\n\t\t{\n\t\t\tfinal ZonedDateTime offeringDepartureUtc = getNdcTransportOfferingService()\n\t\t\t\t\t.getArrivalZonedDateTimeFromTransportOffering(transportOffering.getValue());\n\t\t\tif (arrivalUtcTime.isBefore(offeringDepartureUtc))\n\t\t\t{\n\t\t\t\tarrivalUtcTime = offeringDepartureUtc;\n\t\t\t}\n\t\t}\n\n\t\tarrivalUtcTime = arrivalUtcTime.plus(TravelfacadesConstants.MIN_BOOKING_ADVANCE_TIME, ChronoUnit.HOURS);\n\n\t\tfor (final Map.Entry<String, TransportOfferingModel> transportOffering : transportOfferings\n\t\t\t\t.get(String.valueOf(NdcservicesConstants.INBOUND_FLIGHT_REF_NUMBER)).entrySet())\n\t\t{\n\t\t\tfinal ZonedDateTime offeringDepartureUtc = getNdcTransportOfferingService()\n\t\t\t\t\t.getDepartureZonedDateTimeFromTransportOffering(transportOffering.getValue());\n\t\t\tif (arrivalUtcTime.isAfter(offeringDepartureUtc))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "@Test\n\tpublic void testGetEndDate() {\n\t\tassertEquals(cal2, initialJob.getEndDate());\n\t}", "private boolean isValidPeriod(int period) {\r\n\t\treturn (period > 0 && period < 366); \r\n\t}", "public final boolean hasActiveRetentionPeriod() {\n\t if ( m_retainUntil == -1L)\n\t return false;\n\t return System.currentTimeMillis() < m_retainUntil ? true : false;\n\t}" ]
[ "0.6017166", "0.59919643", "0.5773958", "0.5615457", "0.5533699", "0.5530841", "0.5470009", "0.5433626", "0.5415589", "0.54083586", "0.5401858", "0.536838", "0.5364489", "0.53635544", "0.53421307", "0.53386736", "0.52862954", "0.52832824", "0.52772063", "0.5272007", "0.5256193", "0.5226046", "0.5204621", "0.5201434", "0.5194271", "0.51896495", "0.51561064", "0.51536185", "0.51388776", "0.513757", "0.5119171", "0.5119171", "0.5119171", "0.5119171", "0.5119171", "0.5119171", "0.5119171", "0.5096013", "0.5084246", "0.50770074", "0.5070057", "0.505744", "0.5056547", "0.50521857", "0.5038876", "0.5038383", "0.5031793", "0.5028284", "0.5023359", "0.5022938", "0.501797", "0.5009178", "0.5006544", "0.50022095", "0.4992394", "0.49916965", "0.49858546", "0.4982408", "0.49704868", "0.49606767", "0.49562234", "0.4951484", "0.49509645", "0.49485832", "0.49290818", "0.49288353", "0.49221244", "0.4916142", "0.4908298", "0.4907478", "0.4902759", "0.4902066", "0.48980117", "0.4883851", "0.4881469", "0.4875224", "0.48748156", "0.48744014", "0.48743066", "0.4873066", "0.4872703", "0.48619065", "0.48585337", "0.48575804", "0.48570597", "0.48566082", "0.48562428", "0.4854168", "0.48470584", "0.48456427", "0.48427346", "0.48426563", "0.48259065", "0.4824572", "0.48203072", "0.48203072", "0.48136145", "0.48117885", "0.4806177", "0.48051506" ]
0.6641709
0
Create Start and End Date
private void setEmpHistoryStartAndEndDate(Long companyId, EmployeeLeaveSchemeTypeHistory employeeLeaveSchemeTypeHistory) { LeavePreference leavePreferenceVO = leavePreferenceDAO .findByCompanyId(companyId); SimpleDateFormat sdf = new SimpleDateFormat( PayAsiaConstants.DEFAULT_DATE_FORMAT); // Get Current Date Calendar currentDateCal = Calendar.getInstance(); Date currentDate = currentDateCal.getTime(); int startMonth = 0; startMonth = Integer.parseInt(String.valueOf(leavePreferenceVO .getStartMonth().getMonthId())) - 1; Calendar cal = Calendar.getInstance(); int year = cal.get(Calendar.YEAR); Calendar startCalendar = new GregorianCalendar(cal.get(Calendar.YEAR), startMonth, 1, 0, 0, 0); Date calStartDate = startCalendar.getTime(); if (currentDate.before(calStartDate)) { year = year - 1; } startCalendar = new GregorianCalendar(year, startMonth, 1, 0, 0, 0); Calendar endCalendar = new GregorianCalendar(year + 1, startMonth, 1, 0, 0, 0); endCalendar.add(Calendar.DAY_OF_MONTH, -1); String startDate = sdf.format(startCalendar.getTime()); String endDate = sdf.format(endCalendar.getTime()); employeeLeaveSchemeTypeHistory.setStartDate(DateUtils .stringToTimestamp(startDate, PayAsiaConstants.DEFAULT_DATE_FORMAT)); employeeLeaveSchemeTypeHistory.setEndDate(DateUtils.stringToTimestamp( endDate, PayAsiaConstants.DEFAULT_DATE_FORMAT)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Date getStartDate();", "Date getStartDate();", "Date getStartDate();", "long getStartDate();", "private void getDateStartEnd(BudgetRecyclerView budget) {\n String viewByDate = budget.getDate();\n String[] dateArray = viewByDate.split(\"-\");\n for (int i = 0; i < dateArray.length; i++) {\n dateArray[i] = dateArray[i].trim();\n }\n startDate = CalendarSupport.convertStringToDate(dateArray[0]);\n endDate = CalendarSupport.convertStringToDate(dateArray[1]);\n }", "Date getEndDate();", "Date getEndDate();", "long getBeginDate();", "public Date getStartDate();", "public Date getStartDate();", "public void setStartDate(Date s);", "long getEndDate();", "long getEndDate();", "public Date createDate()\n {\n Timestamp maxDate = new\n Timestamp(2021 - 1900, 11,\n 31, 23, 59, 59, 0);\n Timestamp minDate = new\n Timestamp(2017 - 1900, 0,\n 1, 0, 0, 0, 0);\n long range = maxDate.getTime() - minDate.getTime();\n long randTime = Math.abs(Main.rnd.nextLong()) % range;\n //we use abs because random number might be negative\n return new Date(minDate.getTime() + randTime);\n }", "void setDateRange(Date start, Date end);", "public void setStartDate(Date start)\r\n {\r\n this.startDate = start;\r\n }", "public Date getEndDate();", "public Date getEndDate();", "java.lang.String getStartDateYYYYMMDD();", "void setStartDate(Date startDate);", "java.lang.String getStartDate();", "String getEndDate();", "public String getEndDate();", "String getStartDate();", "@Override\n\tpublic Calendar generateEndDate( ValueSetType vst, VariableValueType value ) {\n\t\treturn generateStartDate( vst, value );\n\t}", "public String getStartDate();", "public static Date createDate(int yyyy, int month, int day, int hour, int min) {\n/* 93 */ CALENDAR.clear();\n/* 94 */ CALENDAR.set(yyyy, month - 1, day, hour, min);\n/* 95 */ return CALENDAR.getTime();\n/* */ }", "public void computeBalanceDate(Date balanceBegin, Date balanceEnd) {\r\n\t\tCalendar calBegin = Calendar.getInstance();\r\n\t\tcalBegin.setTime(balanceBegin);\r\n\t\t\r\n\t\tCalendar calEnd = Calendar.getInstance();\r\n\t\tcalEnd.setTime(balanceEnd);\r\n\t\t\r\n\t\tCalendar res = Calendar.getInstance();\r\n\t\tres.setTimeInMillis(calBegin.getTimeInMillis() \r\n\t\t\t\t+ new BigDecimal(calEnd.getTimeInMillis() - calBegin.getTimeInMillis()).divide(new BigDecimal(2.0)).longValue());\r\n\t\tthis.balanceDate = res.getTime();\r\n\t}", "public void setStartDate(java.util.Date value);", "public void setEndDate(Date end)\r\n {\r\n this.endDate = end;\r\n }", "private static Date dateToString(Date start) {\n\t\treturn start;\n\t}", "public static void main(String[] args) {\n DataFactory df = new DataFactory();\n Date minDate = df.getDate(2000, 1, 1);\n Date maxDate = new Date();\n \n for (int i = 0; i <=1400; i++) {\n Date start = df.getDateBetween(minDate, maxDate);\n Date end = df.getDateBetween(start, maxDate);\n System.out.println(\"Date range = \" + dateToString(start) + \" to \" + dateToString(end));\n }\n\n}", "Date getStartDay();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartDate();", "public Schedule (Employee employee, Date startDate, Date endDate) {\n this.employee = employee;\n this.startDate = startDate;\n this.endDate = endDate;\n }", "protected AbsoluteDate getStartDate() {\n return startDate;\n }", "public void setStart( Calendar start );", "public String getDate(){ return this.start_date;}", "Date getEndDay();", "private void startEndDay(int day,int month,int year) {\n int dayNum = CalendarEx.convertDay(CalendarDate.getDay(day, month, year));\n startDay = CalendarDate.moveDay(-dayNum, new CalendarDate(day,month,year));\n endDay = CalendarDate.moveDay(-dayNum+6, new CalendarDate(day,month,year));\n }", "@Override\n public void onDateRangeSelected(int startDay, int startMonth, int startYear, int endDay, int endMonth, int endYear) {\n DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.getDefault());\n Calendar c = Calendar.getInstance();\n Calendar c2 = Calendar.getInstance();\n c.set(startYear,startMonth,startDay);\n c2.set(endYear, endMonth,endDay);\n\n String dataInicio = \"Start \" + df.format(c.getTime()) + \"\\n\";\n String dataFim = \" End \" + df.format(c2.getTime()) ;\n\n txt_inform.setText(dataInicio);\n txt_inform.append(dataFim);\n\n }", "void setEndDate(Date endDate);", "public AgendaMB() {\n GregorianCalendar dtMax = new GregorianCalendar(); \n Date dt = new Date();\n dtMax.setTime(dt); \n GregorianCalendar dtMin = new GregorianCalendar(); \n dtMin.setTime(dt);\n dtMin.add(Calendar.DAY_OF_MONTH, 1);\n dtMax.add(Calendar.DAY_OF_MONTH, 40);\n dataMax = dtMax.getTime();\n dataMin = dtMin.getTime(); \n }", "public void compareStartEndDate() {\n String[] startDateArray = startDate.split(dateOperator);\n String[] endDateArray = endDate.split(dateOperator);\n \n // Compares year first, then month, and then day.\n if (Integer.parseInt(startDateArray[2]) > Integer.parseInt(endDateArray[2])) {\n endDate = endDateArray[0] +\"/\"+ endDateArray[1] +\"/\"+ startDateArray[2];\n } else if (Integer.parseInt(startDateArray[2]) == Integer.parseInt(endDateArray[2])) {\n if (Integer.parseInt(startDateArray[1]) > Integer.parseInt(endDateArray[1])) {\n endDate = endDateArray[0] +\"/\"+endDateArray[1] +\"/\"+(Integer.parseInt(startDateArray[2])+1);\n } else if (Integer.parseInt(startDateArray[1]) == Integer.parseInt(endDateArray[1]) && \n Integer.parseInt(startDateArray[0]) > Integer.parseInt(endDateArray[0])) {\n endDate = endDateArray[0] +\"/\"+endDateArray[1] +\"/\"+(Integer.parseInt(startDateArray[2])+1);\n }\n }\n }", "public void GetFileDates (long in_start_date, long in_end_date) {\n\n\n\n\n}", "OffsetDateTime startDateTime();", "public static String format(com.google.api.client.util.DateTime start, com.google.api.client.util.DateTime end){\n DateTime startGood = new DateTime(start.getValue());\n DateTime endGood = new DateTime(end.getValue());\n return format(startGood) + \"-\" + formatTime(endGood);\n }", "public DayPeriod(Date startDate, Date endDate) {\n\t\tthis.start = startDate;\n\t\tthis.end = endDate;\n\t}", "public DateRange getDateRange();", "public void setEndDate(java.util.Date value);", "public static Date createDate(int yyyy, int month, int day) {\n/* 75 */ CALENDAR.clear();\n/* 76 */ CALENDAR.set(yyyy, month - 1, day);\n/* 77 */ return CALENDAR.getTime();\n/* */ }", "public void setEndDate(Date value) {\r\n this.endDate = value;\r\n }", "void setEventStartDate(Date startEventDate);", "public Date getStartDate() {\r\n return startDate;\r\n }", "public Date getStartDate() {\r\n return startDate;\r\n }", "public static String generatesRandomDate(int startYear, int endYear) {\n int day = generatesRandomIntBetween(1, 28);\n int month = generatesRandomIntBetween(1, 12);\n int year = generatesRandomIntBetween(startYear, endYear);\n return LocalDate.of(year, month, day).format(formatter);\n }", "public static TimeRange fromStartToEnd(int start, int end, Calendar date) {\n return new TimeRange(start, end - start, date);\n }", "public void setDateStart (Timestamp DateStart);", "java.lang.String getEndDateYYYY();", "public void setStartDayEnd(Integer startDayEnd) {\n this.startDayEnd = startDayEnd;\n }", "public Date getStartDate() {\n return startDate;\n }", "public Date getStartDate() {\n return startDate;\n }", "public Date getStartDate() {\n return startDate;\n }", "public static String dateBetweenParse(Date start, Date end) {\r\n String result = \"\";\r\n long temp;\r\n temp = DateUtil.between(start, end, DateUnit.DAY);\r\n result += temp + \"day\";\r\n start = DateUtil.offset(start, DateField.DAY_OF_YEAR, (int) temp);\r\n\r\n temp = DateUtil.between(start, end, DateUnit.HOUR);\r\n result += temp + \"hour\";\r\n start = DateUtil.offset(start, DateField.HOUR, (int) temp);\r\n\r\n temp = DateUtil.between(start, end, DateUnit.MINUTE);\r\n result += temp + \"minute\";\r\n start = DateUtil.offset(start, DateField.MINUTE, (int) temp);\r\n\r\n temp = DateUtil.between(start, end, DateUnit.SECOND);\r\n result += temp + \"second\";\r\n start = DateUtil.offset(start, DateField.SECOND, (int) temp);\r\n\r\n return result;\r\n }", "public void setStartDate(Date startDate) {\r\n this.startDate = startDate;\r\n }", "public void setStartDate(Date startDate) {\r\n this.startDate = startDate;\r\n }", "private void setDate(String beginning, String end){\n try {\n\n this.beginTime=ShortDateFormat.parse(beginning);\n this.endTime = ShortDateFormat.parse(end);\n }\n catch(ParseException ex){\n System.out.println(\"Error Parsing the time, please enter valid time, dont forget to include am/pm \" +ex.getMessage());\n System.exit(1);\n }\n }", "public CreateCertFromCSR setPeriod(Date begin, Date end) {\n beginDate = begin;\n endDate = end;\n return this;\n }", "public void setStartDate(Date startDate) {\n this.startDate = startDate;\n }", "public void setStartDate(Date startDate) {\n this.startDate = startDate;\n }", "public void setStartDate(Date startDate) {\n this.startDate = startDate;\n }", "@Test(expected = IllegalDateException.class)\n\tpublic void testBookStartDateAfterEndDate() throws Exception {\n\t\t// switched end and start\n\t\tbookingManagement.book(USER_ID, Arrays.asList(room1.getId()), validEndDate, validStartDate);\n\t}", "public void generatePlan(Integer id,Date fromDate, Date toDate) throws Exception;", "private static String dateRangeRestriction(String startDate, String endDate){\r\n String restriction = \"\";\r\n String[] startDateParts = startDate.split(\"/\");\r\n String[] endDateParts = endDate.split(\"/\");\r\n int prevYear = Integer.parseInt(endDateParts[0]) - 1; //year previus to End year\r\n int nextYear = Integer.parseInt(startDateParts[0]) + 1; //year next to End year\r\n if(prevYear-nextYear > 1){ // For intermediate years we may not care about days and months\r\n restriction += \" PubDate-Year:[\" + nextYear + \" TO \" + prevYear + \"] OR \";\r\n }\r\n if(endDateParts[0].equals(startDateParts[0])){ // Year of start and end is the same\r\n restriction += \"( +PubDate-Year:\" + endDateParts[0] \r\n + \" +PubDate-Month:[\" + startDateParts[1] + \" TO \" + endDateParts[1] \r\n + \"] +PubDate-Day:[\" + startDateParts[2] + \" TO \" + endDateParts[2] + \"])\";\r\n } else {\r\n restriction += \"( +PubDate-Year:\" + endDateParts[0] \r\n + \" +PubDate-Month:[ 01 TO \" + endDateParts[1] \r\n + \"] +PubDate-Day:[ 01 TO \" + endDateParts[2] + \"]) OR \"\r\n + \"( +PubDate-Year:\" + startDateParts[0] \r\n + \" +PubDate-Month:[ \" + startDateParts[1] + \" TO 12\" \r\n + \"] +PubDate-Day:[ \" + startDateParts[2] + \" TO 31 ])\";\r\n }\r\n restriction = \"(\" + restriction + \")\";\r\n return restriction;\r\n }", "public Period(Date a, Date b) throws IllegalArgumentException {\n\n if (a == null || b == null) {\n throw new IllegalArgumentException(ERR_MISSING_DATE);\n }\n\n a = (Date) a.clone();\n b = (Date) b.clone();\n\n if (b.before(a)) {\n _start = b;\n _end = a;\n\n } else if (a.before(b)) {\n _start = a;\n _end = b;\n\n } else {\n throw new IllegalArgumentException(ERR_START_EQUALS_END);\n }\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndDate();", "@Test\n public void testSetStartDate() {\n System.out.println(\"setStartDate\");\n Calendar newStart = new GregorianCalendar(2000, 01, 01);\n String startDate = newStart.toString();\n DTO_Ride instance = dtoRide;\n instance.setStartDate(startDate);\n \n String result = instance.getStartDate();\n assertEquals(newStart, newStart);\n }", "public Date getEarliestFinishingDate();", "Date getCreateDate();", "Date getCreateDate();", "LocalDate getCollectionEndDate();", "@RequestMapping(\"/getBookSale\")\n public List<BookSale> getBookSale(@RequestParam(\"start\")String start,\n @RequestParam(\"end\")String end) {\n// String str1 = \"2020-2-05 16:16:57\";\n// String str2 = \"2020-6-20 16:16:57\";\n Timestamp time1 = Timestamp.valueOf(start);\n Timestamp time2 = Timestamp.valueOf(end);\n System.out.println(start);\n System.out.println(end);\n\n return orderService.getBookSale(time1, time2);\n }", "public Date getStartDate()\r\n {\r\n return this.startDate;\r\n }", "public DateTime createDateTime() throws IllegalCommandArgumentException {\n DateTime dateTime = null;\n if (containsStartDate && containsStartTime && containsEndDate && containsEndTime) {\n compareStartEndDate();\n dateTime = new DateTime(startDate, startTime, endDate, endTime);\n checkStartEndDate(startDate, endDate, dateTime); \n } else if (containsStartDate && containsStartTime && containsEndTime) {\n dateTime = new DateTime(startDate, startTime, endTime);\n checkEndDate(startDate, dateTime);\n } else if (containsStartDate && containsStartTime) {\n dateTime = new DateTime(startDate, startTime);\n checkEndDate(startDate, dateTime);\n } else if (containsStartDate && containsEndDate) {\n compareStartEndDate();\n dateTime = new DateTime(startDate, \"0800\", endDate, \"2359\");\n checkStartEndDate(startDate, endDate, dateTime);\n } else if (containsStartDate) {\n dateTime = new DateTime(startDate);\n checkEndDate(startDate, dateTime);\n } else if (containsStartTime && containsEndTime) {\n dateTime = new DateTime(currentDate, startTime, endTime);\n } else if (containsStartTime) {\n dateTime = new DateTime(currentDate, startTime);\n }\n return dateTime;\n }", "public Date getEnddate() {\r\n return enddate;\r\n }", "public void createDate(){\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy_MM_dd\"); //TODO -HHmm si dejo diagonales separa bonito en dia, pero para hacer un armado de excel creo que debo hacer un for mas\n currentDateandTime = sdf.format(new Date());\n Log.e(TAG, \"todays date is: \"+currentDateandTime );\n\n}", "public void setStartDate(Date value)\n {\n validateStartDate(value);\n setAttributeInternal(STARTDATE, value);\n \n }", "public void setBeginnDate(Date beginnDate) {\n\t\tthis.beginnDate = beginnDate;\n\t}", "public Builder setStartDate(long value) {\n \n startDate_ = value;\n onChanged();\n return this;\n }", "public void changeStartDate(DateToken startToken) {\r\n\t\tDateTime now = new DateTime();\r\n\t\tif (Interval.nowStub != null) now = Interval.nowStub;\r\n\t\t\r\n\t\tstartDateExplicitlySet = true;\r\n\t\t\r\n\t\tif (this.start == null) {\r\n\t\t\tDateTime start = startToken.mergeInto(now).withTime(0, 0, 0, 0);\r\n\r\n\t\t\t// not leaping forward a year here; date should be taken as is\r\n\t\t\t\r\n\t\t\tthis.start = start;\r\n\t\t\tend = start.withTime(23, 59, 0, 0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// a time has already been set\r\n\t\t\tDateTime start = startToken.mergeInto(this.start);\r\n\t\t\tthis.start = start;\r\n\t\t\tif (end.isBefore(this.start)) {\r\n\t\t\t\tend = this.start.plusHours(1);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tend = startToken.mergeInto(end);\r\n\t\t\t\tif (end.isBefore(start)) {\r\n\t\t\t\t\tend = start.plusHours(1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public Date generate() {\n int year = 2000 + Rng.instance().nextInt(20);\n int date = Rng.instance().nextInt(28) + 1;\n int month = Rng.instance().nextInt(10) + 1;\n\n Calendar calendar = Calendar.getInstance();\n calendar.set(year, month, date);\n\n return calendar.getTime();\n }", "public LocalDate getStart_date(){\n return this.start_date;\n }", "DateConstant createDateConstant();", "java.lang.String getStartDateYYYY();", "@Test\n public void testCreateBookingReportJob() throws Exception {\n LocalDate currentDate = LocalDate.parse(\"2018-05-28\");\n LocalDate endDate = LocalDate.parse( \"2018-10-23\" );\n while ( currentDate.isBefore( endDate ) ) {\n BookingReportJob workerJob = new BookingReportJob();\n workerJob.setStatus( JobStatus.submitted );\n workerJob.setStartDate( currentDate );\n workerJob.setEndDate( currentDate.plusDays( 4 ) );\n dao.insertJob( workerJob );\n currentDate = currentDate.plusDays( 5 ); // dates are inclusive, +1\n }\n }", "@ApiModelProperty(value = \"Start of the range\")\n public String getDateStart() {\n return dateStart;\n }", "public LocalDate getEnd_date(){\n return this.end_date;\n }", "public void setStart(Date newStart) {\n if (!newStart.before(_end)) {\n throw new IllegalArgumentException(ERR_START_AFTER_END);\n }\n _start = (Date) newStart.clone();\n }", "Between createBetween();", "public void setDtStart(Date dtStart) {\r\n this.dtStart = dtStart;\r\n }", "public Timestamp getDateStart();" ]
[ "0.65632445", "0.65632445", "0.65632445", "0.63741523", "0.6343518", "0.6337937", "0.6337937", "0.6319236", "0.6318973", "0.6318973", "0.6176896", "0.61569506", "0.61569506", "0.61555856", "0.6147664", "0.61109823", "0.61074466", "0.61074466", "0.60974365", "0.6090763", "0.60738385", "0.6065724", "0.6030757", "0.600561", "0.60038584", "0.5961502", "0.59425896", "0.58703506", "0.58654606", "0.5851416", "0.5845482", "0.5842887", "0.58427936", "0.5841717", "0.58248764", "0.5817513", "0.58146423", "0.5803116", "0.5768444", "0.5759595", "0.5740761", "0.57336646", "0.57321894", "0.5728633", "0.5725754", "0.5719797", "0.5707866", "0.5691605", "0.5685525", "0.567535", "0.5667859", "0.5646912", "0.5646217", "0.56350935", "0.56350935", "0.5624333", "0.5621735", "0.5611316", "0.56092536", "0.5607964", "0.5604803", "0.5604803", "0.5604803", "0.55864024", "0.55786824", "0.55786824", "0.5574858", "0.5550531", "0.5544111", "0.5544111", "0.5544111", "0.55441105", "0.5542273", "0.5532062", "0.5523197", "0.5522725", "0.5520971", "0.55061144", "0.5491683", "0.5491683", "0.54834116", "0.5479563", "0.5468077", "0.5461143", "0.5457473", "0.5455764", "0.54518753", "0.54421264", "0.5435905", "0.54293144", "0.54257387", "0.5423633", "0.5416597", "0.5414645", "0.5412594", "0.54111993", "0.54040515", "0.5402546", "0.53980565", "0.53929144", "0.538708" ]
0.0
-1
TODO Autogenerated method stub
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(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
Create a new TFreightConfigDao without any configuration
public TFreightConfigDao() { super(T_FREIGHT_CONFIG, TFreightConfig.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Autowired\n public TFreightConfigDao(Configuration configuration) {\n super(T_FREIGHT_CONFIG, TFreightConfig.class, configuration);\n }", "public StructureTownHallConfigDao() {\n\t\tsuper(StructureTownHallConfig.STRUCTURE_TOWN_HALL_CONFIG, StructureTownHallConfigPojo.class);\n\t}", "@Test(expected = TermsOfUseDaoConfigurationException.class)\r\n public void testCtor_dbConnectionFactoryConfigMissing() throws Exception {\r\n configurationObject.removeChild(\"dbConnectionFactoryConfig\");\r\n\r\n new ProjectTermsOfUseDaoImpl(configurationObject);\r\n }", "public MiniEventTimetableConfigDao() {\n\t\tsuper(MiniEventTimetableConfig.MINI_EVENT_TIMETABLE_CONFIG, MiniEventTimetableConfigPojo.class);\n\t}", "public DaoFactory()\n\t{\n\n\t}", "private static SessionFactory buildSessionFactory() {\n\n try {\n Configuration configuration = new Configuration();\n\n Properties properties = new Properties();\n properties.load(AuthDao.class.getResourceAsStream(\"/db.properties\"));\n configuration.setProperties(properties);\n\n// configuration.addAnnotatedClass(Driver.class);\n// configuration.addAnnotatedClass(DriverStatusChange.class);\n// configuration.addAnnotatedClass(Freight.class);\n// configuration.addAnnotatedClass(Location.class);\n configuration.addAnnotatedClass(Manager.class);\n// configuration.addAnnotatedClass(Order.class);\n// configuration.addAnnotatedClass(OrderDriver.class);\n// configuration.addAnnotatedClass(OrderWaypoint.class);\n// configuration.addAnnotatedClass(Truck.class);\n// configuration.addAnnotatedClass(Waypoint.class);\n\n ServiceRegistry serviceRegistry =\n new StandardServiceRegistryBuilder().applySettings(configuration.getProperties()).build();\n\n return configuration.buildSessionFactory(serviceRegistry);\n\n } catch (IOException e) {\n e.printStackTrace();\n throw new ExceptionInInitializerError(e);\n }\n }", "protected ETLLogDAOImpl(Configuration config) {\r\n config.addClass(ETLLog.class);\r\n factory = config.buildSessionFactory();\r\n }", "private ProjectConfigurationFactory()\n {}", "public ETLLogDAOImpl() {\r\n this(new Configuration());\r\n }", "public CoreDao(DaoConfig config) {\n this.txManager = config.getTxManager();\n txTemplate = new TransactionTemplate(txManager);\n setSessionFactory(config.getSessionFactory());\n\n this.daoClass = config.getDaoClass();\n getHibernateTemplate().setCacheQueries(true);\n }", "protected ContaCapitalCadastroDaoFactory() {\n\t\t\n\t}", "public OnibusDAO() {}", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Configuration createConfiguration();", "public BLFacadeImplementation() {\t\t\r\n\t\tSystem.out.println(\"Creating BLFacadeImplementation instance\");\r\n\t\tConfigXML c=ConfigXML.getInstance();\r\n\t\t\r\n\t\tif (c.getDataBaseOpenMode().equals(\"initialize\")) {\r\n\t\t\tDataAccess dbManager=new DataAccess(c.getDataBaseOpenMode().equals(\"initialize\"));\r\n\t\t\tdbManager.initializeDB();\r\n\t\t\tdbManager.close();\r\n\t\t\t}\r\n\t\t\r\n\t}", "public MiniEventTimetableConfigDao(Configuration configuration) {\n\t\tsuper(MiniEventTimetableConfig.MINI_EVENT_TIMETABLE_CONFIG, MiniEventTimetableConfigPojo.class, configuration);\n\t}", "public ModeOfPurchaseDAOImpl() {\r\n\r\n }", "private ORMServiceFactory() { }", "@Override\n\tpublic StudentDao createDao() {\n\t\treturn new SqliteStudentDaoImpl();\n\t}", "@Test(expected = TermsOfUseDaoConfigurationException.class)\r\n public void testCtor_loggerNameMissing() throws Exception {\r\n configurationObject.removeProperty(\"loggerName\");\r\n\r\n new ProjectTermsOfUseDaoImpl(configurationObject);\r\n }", "public MySqlDaoFactory() {\n creators = new HashMap<>();\n creators.put(Bank.class, new DaoCreator<Connection>() {\n @Override\n public GenericDAO create(Connection connection) {\n return new MySqlBankDao(connection);\n }\n });\n\n creators.put(Deposit.class, new DaoCreator<Connection>() {\n @Override\n public GenericDAO create(Connection connection) {\n return new MySqlDepositDao(connection);\n }\n });\n\n }", "public SqliteModelFactoryImpl()\n {\n super();\n }", "@Test(expected = IllegalArgumentException.class)\r\n public void testCtor_configurationObjectNull() {\r\n configurationObject = null;\r\n\r\n new ProjectTermsOfUseDaoImpl(configurationObject);\r\n }", "public EtiquetaDao() {\n //subiendola en modo Embedded\n this.sql2o = new Sql2o(\"jdbc:h2:~/demojdbc\", \"sa\", \"\");\n createTable();\n //cargaDemo();\n }", "public VRpDyHlrforbeDAOImpl() {\r\n super();\r\n }", "public ContextDaoImpl() {\n Set<Commissioner> commissionerSet = new HashSet<>();\n List<String> logins = new ArrayList<>();\n commissionerSet.add(new Commissioner(\"victor.net\", \"25345Qw&&\", true));\n commissionerSet.add(new Commissioner(\"egor.net\", \"3456eR&21\", false));\n commissionerSet.add(new Commissioner(\"igor.net\", \"77??SDSw23\", false));\n logins.add(\"[email protected]\");\n logins.add(\"[email protected]\");\n logins.add(\"[email protected]\");\n Database.setCandidateSet(new HashSet<>());\n Database.setVoterSet(new HashSet<>());\n Database.setLogins(logins);\n Database.setCommissionerSet(commissionerSet);\n }", "public GameConfig createDefaultConfig() {\n\n return null;\n }", "public TransactionDeclearSpoolDao( HibernateUtilFactory.ConfigMode which )\n {\n super( which );\n }", "public StructureTownHallConfigDao(Configuration configuration) {\n\t\tsuper(StructureTownHallConfig.STRUCTURE_TOWN_HALL_CONFIG, StructureTownHallConfigPojo.class, configuration);\n\t}", "ConfigModel createInstanceOfConfigModel();", "@Override\n\tpublic DataConfig createDefaultConfig() {\n\t\treturn new DataConfig();\n\t}", "public void testSQLServerGameDataDAO_NoObjectFactoryDefinition() throws Exception {\n try {\n FailureTestHelper.unloadConfig();\n\n ConfigManager cm = ConfigManager.getInstance();\n cm.add(\"failuretests/db_connection_factory.xml\");\n cm.add(\"failuretests/game_persistence.xml\");\n// cm.add(\"failuretests/object_factory.xml\");\n cm.add(\"failuretests/random_string_image.xml\");\n cm.add(\"failuretests/colors.xml\");\n\n new SQLServerGameDataDAO(\"com.orpheus.game.persistence.SQLServerGameDataDAO\");\n fail(\"InstantiationException expected.\");\n } catch (InstantiationException e) {\n // should land here\n }\n }", "public ProductosPuntoVentaDaoImpl() {\r\n }", "public BlogDaoHibernateFactoryImpl() {\n\t\tsuper();\n\t}", "public static AppTest create(Config config) {return null;}", "public static guitarDao createguitarDao() {\n\t\tguitarDao result = null;\n\t\ttry {\n\t\t\tObject o = Class.forName(daoName + \".\" + \"guitarImpl\").newInstance();\n\t\t\tresult = (guitarDao)o;\n\t\t} catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "public TelefoneDao() {\n\t\tconnection = SingleConnection.getConnection();\n\t}", "public interface DAOFactory {\n\n BalanceDAO createBalanceDAO();\n}", "public ProtocoloDAO() {\n }", "public PostDao() {\n\t}", "@Test(expected = TermsOfUseDaoConfigurationException.class)\r\n public void testCtor_dbConnectionFactoryConfigInvalid1() throws Exception {\r\n configurationObject.getChild(\"dbConnectionFactoryConfig\").removeChild(\r\n \"com.topcoder.db.connectionfactory.DBConnectionFactoryImpl\");\r\n\r\n new ProjectTermsOfUseDaoImpl(configurationObject);\r\n }", "protected AbstractDao()\n {\n\n }", "public interface DAOFactory {\n\n /**\n *\n * @param context\n * @return\n */\n public abstract DAO createPersonBeaconDAO(Context context);\n}", "private HibernateToListDAO(){\r\n\t\tfactory = new AnnotationConfiguration().addPackage(\"il.hit.model\") //the fully qualified package name\r\n .addAnnotatedClass(User.class).addAnnotatedClass(Items.class)\r\n .addResource(\"hibernate.cfg.xml\").configure().buildSessionFactory();\r\n\t}", "protected IDAOConfigs getDaoGenConfig(URL argUrl) {\r\n\t\tIDAOConfigs daoGenConfig = null;\r\n\t\tList<IConfigObject> configs = getConfigs(argUrl);\r\n\t\tif (!configs.isEmpty()) {\r\n\t\t\tdaoGenConfig = DAOConfigs.createInstance();\r\n\r\n\t\t\tfor (IConfigObject config : configs) {\r\n\t\t\t\tdaoGenConfig.setConfigObject(null, config);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn daoGenConfig;\r\n\t}", "D getDao();", "private LabelDbmsDao() {\r\n }", "public VRpHrStpDAOImpl() {\r\n super();\r\n }", "public DriverForCreateBuilder() {\r\n driverForCreate = new DriverForCreate();\r\n }", "private ConfigHelper() {\n //does nothing\n }", "private static void createSessionFactory() {\n\t\ttry {\n\t\t\tif (sessionFactory == null) {\n\n\t\t\t\tProperties properties = new Properties();\n\t\t\t\tproperties.load(ClassLoader.getSystemResourceAsStream(\"hibernate.properties\"));\n\n\t\t\t\tConfiguration configuration = new Configuration();\n\t\t\t\tEntityScanner.scanPackages(\"musala.schoolapp.model\").addTo(configuration);\n\t\t\t\tconfiguration.mergeProperties(properties).configure();\n\t\t\t\tStandardServiceRegistry builder = new StandardServiceRegistryBuilder()\n\t\t\t\t\t\t.applySettings(configuration.getProperties()).build();\n\t\t\t\tsessionFactory = configuration.buildSessionFactory(builder);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"Failed to create session factory object.\");\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public CiviliteDao() {\r\n\t\tsuper();\r\n\t}", "private DaoManager() {\n }", "private static SessionFactory buildSessionFactory() {\n Configuration configObj = new Configuration();\n configObj.configure(\"hibernate.cfg.xml\");\n\n ServiceRegistry serviceRegistryObj = new StandardServiceRegistryBuilder().applySettings(configObj.getProperties()).build();\n\n // Creating Hibernate SessionFactory Instance\n sessionFactoryObj = configObj.buildSessionFactory(serviceRegistryObj);\n return sessionFactoryObj;\n }", "@Test(expected = TermsOfUseDaoConfigurationException.class)\r\n public void testCtor_dbConnectionFactoryConfigInvalid2() throws Exception {\r\n configurationObject.getChild(\"dbConnectionFactoryConfig\").getChild(\r\n \"com.topcoder.db.connectionfactory.DBConnectionFactoryImpl\").getChild(\"connections\").setPropertyValue(\r\n \"default\", \"not_exist\");\r\n\r\n new ProjectTermsOfUseDaoImpl(configurationObject);\r\n }", "public LPMapdataDaoImpl() {\r\n\t\t\r\n\t}", "private void initConfig() throws DatabaseAccessException {\n\t\tStatement stmt = null;\n\n\t\ttry {\n\t\t\tstmt = this.connection.createStatement();\n\n\t\t\t// With synchronous OFF, SQLite continues without syncing\n\t\t\t// as soon as it has handed data off to the operating system.\n\t\t\tstmt.execute(\"PRAGMA synchronous = OFF;\");\n\n\t\t\t// The MEMORY journaling mode stores the rollback journal in volatile RAM.\n\t\t\t// This saves disk I/O but at the expense of database safety and integrity.\n\t\t\tstmt.execute(\"PRAGMA journal_mode = MEMORY;\");\n\n\t\t\t// The journal_size_limit pragma may be used to limit the size of rollback-journal.\n\t\t\t// -1 means no limit.\n\t\t\tstmt.execute(\"PRAGMA journal_size_limit = -1;\");\n\n\t\t\t// If the argument N is negative, then the number of cache pages\n\t\t\t// is adjusted to use approximately N*1024 bytes of memory.\n\t\t\tstmt.execute(\"PRAGMA cache_size = -50000;\");\n\n\t\t\t// Once an encoding has been set for a database, it cannot be changed.\n\t\t\tstmt.execute(\"PRAGMA encoding = \\\"UTF-8\\\";\");\n\n\t\t\t// When temp_store is MEMORY temporary tables and indices are kept\n\t\t\t// in as if they were pure in-memory databases memory.\n\t\t\tstmt.execute(\"PRAGMA temp_store = MEMORY;\");\n\n\t\t\tstmt.close();\n\n\t\t} catch (SQLException e) {\n\t\t\tthrow new DatabaseAccessException(Failure.CONFIG);\n\t\t}\n\t}", "public interface ISystemConfigDao extends SupportDao<SystemConfig> {\n}", "private GameConfig() {}", "@Override\n\tpublic Database createDatabase(Type type) throws FSException {\n\t\treturn new DummyDatabase();\n\t}", "public DataSourceFactory() {}", "private static SessionFactory buildSessionFactory() {\n\t\t// Creating Configuration Instance & Passing Hibernate Configuration File\n\t\tConfiguration configObj = new Configuration();\n\t\tconfigObj.configure(\"hibernate.cfg.xml\");\n\n\t\t// Since Hibernate Version 4.x, ServiceRegistry Is Being Used\n\t\tServiceRegistry serviceRegistryObj = new StandardServiceRegistryBuilder()\n\t\t\t\t.applySettings(configObj.getProperties()).build();\n\n\t\t// Creating Hibernate SessionFactory Instance\n\t\tsessionFactoryObj = configObj.buildSessionFactory(serviceRegistryObj);\n\t\treturn sessionFactoryObj;\n\t}", "@Override\n\tprotected BaseDao getBaseDao() {\n\t\treturn null;\n\t}", "ParkingSlotColorInfoDaoImpl() {\n }", "boolean initConfiguration(Connection con, String schema, boolean dropIfExist) throws Exception;", "@Dao(CfgHisTableConfigEntity.class)\npublic interface ICfgHisTableConfigDao extends CrudDao<CfgHisTableConfigEntity, String> {\n}", "public PaymentOtpDaoImpl() {\n properties = LoadPropertyFile.loadQueries(LoadPropertyFile.PAYMENT_FILE, PaymentDaoImpl.class,\n CREATE_PAYMENT_OTP_MAPPING);\n }", "public DaoConnection() {\n\t\t\n\t}", "public SufficientFundsDaoOjb() {\n }", "@Override\r\n\tprotected DAO<UnidadFuncional_VO> getDao() {\n\t\treturn null;\r\n\t}", "private DTOFactory() {\r\n \t}", "private static SessionFactory buildSessionFactory() {\n\t\ttry {\n\t\t\t// Create the SessionFactory from hibernate.cfg.xml\n\t\t\tConfiguration configuration = new Configuration().configure();\n\t\t\tServiceRegistry serviceRegistry = new ServiceRegistryBuilder()\n\t\t\t\t\t.applySettings(configuration.getProperties())\n\t\t\t\t\t.buildServiceRegistry();\n\t\t\tSessionFactory sessionFactory = configuration\n\t\t\t\t\t.buildSessionFactory(serviceRegistry);\n\t\t\treturn sessionFactory;\n\t\t} catch (Throwable ex) {\n\t\t}\n\t\treturn null;\n\t}", "public PensionParametersDAO(Configuration properties) {\n this.properties = properties;\n\n }", "private CmmTagMasterVDao() {\r\n\t}", "Database createDatabase();", "@Override\n public CheckDBDAO getInitDBDAO() {\n if (instanceCheckDBDAO == null) {\n return new MySQLCheckDBDAO(connection);\n } else {\n return instanceCheckDBDAO;\n }\n }", "public static TwitterDAOInterface CreateObject() {\n\t\treturn new TwitterDAO();\r\n\t}", "public PisoDAO createPisoDAO() {\n\n if (pisoDAO == null) {\n pisoDAO = new PisoDAO();\n }\n return pisoDAO;\n }", "private DAOJPAFactory() {\r\n }", "@Test\r\n public void testCtor() {\r\n instance = new ProjectTermsOfUseDaoImpl(configurationObject);\r\n\r\n assertNotNull(\"'dbConnectionFactory' should be correct.\", instance.getDBConnectionFactory());\r\n assertNotNull(\"'log' should be correct.\", instance.getLog());\r\n }", "private ConfigurationModel() {\r\n\tloadConfiguration();\r\n }", "@Autowired\n public RouteDao(Configuration configuration) {\n super(Route.ROUTE, com.dator.jqtest.dao.model.tables.pojos.Route.class, configuration);\n }", "private FirebaseDAO() {}", "public static synchronized DAOFactory getDAOFactory() {\r\n if (daof == null) {\r\n daoType = JDBCDAO;\r\n switch (daoType) {\r\n case JDBCDAO:\r\n daof = new JDBCDAOFactory();\r\n break;\r\n case DUMMY_DAO:\r\n daof = new InMemoryDAOFactory();\r\n break;\r\n default:\r\n daof = null;\r\n }\r\n }\r\n return daof;\r\n }", "public UserLoginDAOImpl() {\r\n\r\n }", "public interface DaoFactory {\r\n\r\n\t/**\r\n\t * Returns objects for access to account table.\r\n\t * \r\n\t * @return DAO for account table.\r\n\t */\r\n\tpublic GenericDao<Account> getAccountDao();\r\n\r\n\t/**\r\n\t * Returns objects for access to client table.\r\n\t * \r\n\t * @return DAO for client table.\r\n\t */\r\n\tpublic GenericDao<Client> getClientDao();\r\n\r\n\t/**\r\n\t * Returns objects for access to payment table.\r\n\t * \r\n\t * @return DAO for payment table.\r\n\t */\r\n\tpublic GenericDao<Payment> getPaymentDao();\r\n\r\n\t/**\r\n\t * Returns objects for access to credit card table.\r\n\t * \r\n\t * @return DAO for credit card table.\r\n\t */\r\n\tpublic GenericDao<CreditCard> getCreditCardDao();\r\n\r\n\t/**\r\n\t * Returns objects for access to authorization table.\r\n\t * \r\n\t * @return DAO for authorization table.\r\n\t */\r\n\tpublic GenericDao<Autorization> getAutorizationDao();\r\n\r\n\t/**\r\n\t * This method returns connection for accessing to database.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic Connection getConnection();\r\n\r\n}", "private PerfectoDriverFactory() {\n\n\t}", "public BotDao(DBConnector dbConnector) {\n this.dbConnector = dbConnector;\n }", "private CommentDAO() {\n\n\t}", "@SuppressWarnings(\"unchecked\")\n protected AbstractDao() {\n this.persistentClass = (Class<T>) ((ParameterizedType) this.getClass().getGenericSuperclass()).getActualTypeArguments()[1];\n }", "@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "protected DaoRWImpl() {\r\n super();\r\n }", "private TangoConfig setupTangoConfig(Tango tango) {\n // Create a new Tango Configuration and enable the ViewAirportMapActivity API.\n TangoConfig config = new TangoConfig();\n config = tango.getConfig(config.CONFIG_TYPE_DEFAULT);\n config.putBoolean(TangoConfig.KEY_BOOLEAN_MOTIONTRACKING, true);\n\n // Tango service should automatically attempt to recover when it enters an invalid state.\n config.putBoolean(TangoConfig.KEY_BOOLEAN_AUTORECOVERY, true);\n return config;\n }", "public CrudUserDao() {\r\n super();\r\n }", "public FtlConfig() {\n cfg = new Configuration(Configuration.VERSION_2_3_30);\n cfg.setClassLoaderForTemplateLoading(this.getClass().getClassLoader(), \"ftl\");\n cfg.setDefaultEncoding(\"UTF-8\");\n cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);\n cfg.setSharedVariable(\"random\",\n new BeansWrapperBuilder(Configuration.VERSION_2_3_30).build().getStaticModels());\n cfg.setLogTemplateExceptions(false);\n cfg.setWrapUncheckedExceptions(true);\n cfg.setFallbackOnNullLoopVariable(false);\n }", "private void init(){\n if(solicitudEnviadaDAO == null){\n solicitudEnviadaDAO = new SolicitudEnviadaDAO(getApplicationContext());\n }\n if(solicitudRecibidaDAO == null){\n solicitudRecibidaDAO = new SolicitudRecibidaDAO(getApplicationContext());\n }\n if(solicitudContestadaDAO == null){\n solicitudContestadaDAO = new SolicitudContestadaDAO(getApplicationContext());\n }\n if(preguntaEnviadaDAO == null){\n preguntaEnviadaDAO = new PreguntaEnviadaDAO(getApplicationContext());\n }\n if(preguntaRecibidaDAO == null){\n preguntaRecibidaDAO = new PreguntaRecibidaDAO(getApplicationContext());\n }\n if(preguntaContestadaDAO == null){\n preguntaContestadaDAO = new PreguntaContestadaDAO(getApplicationContext());\n }\n if(puntuacionRecibidaDAO == null){\n puntuacionRecibidaDAO = new PuntuacionRecibidaDAO(getApplicationContext());\n }\n }", "@Inject\n private DataStore() {\n final StandardServiceRegistry registry = new StandardServiceRegistryBuilder()\n .configure()\n .build();\n try {\n sessionFactory = new MetadataSources(registry).buildMetadata().buildSessionFactory();\n } catch (Exception e) {\n LOGGER.error(\"Fehler beim initialisieren der Session\", e);\n StandardServiceRegistryBuilder.destroy(registry);\n }\n \n }", "public void testSQLServerGameDataDAO_NoColorsDefinition() throws Exception {\n try {\n FailureTestHelper.unloadConfig();\n\n ConfigManager cm = ConfigManager.getInstance();\n cm.add(\"failuretests/db_connection_factory.xml\");\n cm.add(\"failuretests/game_persistence.xml\");\n cm.add(\"failuretests/object_factory.xml\");\n cm.add(\"failuretests/random_string_image_invalid1.xml\");\n cm.add(\"failuretests/colors.xml\");\n\n new SQLServerGameDataDAO(\"com.orpheus.game.persistence.SQLServerGameDataDAO\");\n fail(\"InstantiationException expected.\");\n } catch (InstantiationException e) {\n // should land here\n }\n }", "private static SessionFactory buildSessionFact() {\n try {\n\n return new Configuration().configure(\"hibernate.cfg.xml\").buildSessionFactory();\n\n \n } catch (Throwable ex) {\n \n System.err.println(\"Initial SessionFactory creation failed.\" + ex);\n throw new ExceptionInInitializerError(ex);\n }\n }", "protected abstract Dao getDaoIntance(Context context);", "public GastoDAO(Context context){\n dbHelper = new MyDatabaseHelper(context);\n database = dbHelper.getWritableDatabase();\n }" ]
[ "0.64716834", "0.6119527", "0.608685", "0.6052547", "0.59125787", "0.590132", "0.58422196", "0.5745954", "0.573368", "0.572392", "0.56990516", "0.5688875", "0.5682419", "0.5645765", "0.5641063", "0.5587845", "0.5585981", "0.55813", "0.556835", "0.55503553", "0.5539973", "0.5536357", "0.5506299", "0.5493903", "0.5493095", "0.54918355", "0.5489921", "0.5484877", "0.54713416", "0.54670376", "0.54519165", "0.54514045", "0.54491323", "0.5449036", "0.54416126", "0.5434396", "0.53936607", "0.5390243", "0.5387913", "0.5380191", "0.5377354", "0.5369477", "0.5368604", "0.53433365", "0.5331698", "0.53243774", "0.53135186", "0.5308204", "0.5299867", "0.52989197", "0.5296873", "0.5284593", "0.52812654", "0.5279982", "0.52765924", "0.5269408", "0.52639115", "0.5257353", "0.5247889", "0.5239127", "0.5235557", "0.5233567", "0.5232729", "0.5231908", "0.52225685", "0.52199996", "0.52069956", "0.5198292", "0.51965857", "0.5194813", "0.5192286", "0.5184157", "0.5172725", "0.51596504", "0.5157986", "0.51537853", "0.51460004", "0.5141247", "0.5136025", "0.51270777", "0.51262146", "0.51262045", "0.5123394", "0.5120337", "0.51193285", "0.51138", "0.51134324", "0.5111087", "0.5110478", "0.5107047", "0.5105693", "0.5105198", "0.51047015", "0.510136", "0.509543", "0.50848573", "0.5080073", "0.50769264", "0.5076757", "0.5072539" ]
0.7844669
0
Create a new TFreightConfigDao with an attached configuration
@Autowired public TFreightConfigDao(Configuration configuration) { super(T_FREIGHT_CONFIG, TFreightConfig.class, configuration); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TFreightConfigDao() {\n super(T_FREIGHT_CONFIG, TFreightConfig.class);\n }", "protected ETLLogDAOImpl(Configuration config) {\r\n config.addClass(ETLLog.class);\r\n factory = config.buildSessionFactory();\r\n }", "private static SessionFactory buildSessionFactory() {\n\n try {\n Configuration configuration = new Configuration();\n\n Properties properties = new Properties();\n properties.load(AuthDao.class.getResourceAsStream(\"/db.properties\"));\n configuration.setProperties(properties);\n\n// configuration.addAnnotatedClass(Driver.class);\n// configuration.addAnnotatedClass(DriverStatusChange.class);\n// configuration.addAnnotatedClass(Freight.class);\n// configuration.addAnnotatedClass(Location.class);\n configuration.addAnnotatedClass(Manager.class);\n// configuration.addAnnotatedClass(Order.class);\n// configuration.addAnnotatedClass(OrderDriver.class);\n// configuration.addAnnotatedClass(OrderWaypoint.class);\n// configuration.addAnnotatedClass(Truck.class);\n// configuration.addAnnotatedClass(Waypoint.class);\n\n ServiceRegistry serviceRegistry =\n new StandardServiceRegistryBuilder().applySettings(configuration.getProperties()).build();\n\n return configuration.buildSessionFactory(serviceRegistry);\n\n } catch (IOException e) {\n e.printStackTrace();\n throw new ExceptionInInitializerError(e);\n }\n }", "public MiniEventTimetableConfigDao(Configuration configuration) {\n\t\tsuper(MiniEventTimetableConfig.MINI_EVENT_TIMETABLE_CONFIG, MiniEventTimetableConfigPojo.class, configuration);\n\t}", "@Override\n public Configuration createConfigurationFT(Connection connection, Configuration configuration) throws SQLException {\n PreparedStatement ps = null;\n try{\n String insertSQL = \"INSERT INTO Configuration (configurationID, displayName, defaultType, defaultArg1, defaultArg2) VALUES (?, ?, ?, ?, ?);\";\n ps = connection.prepareStatement(insertSQL);\n ps.setString(1, configuration.getConfigurationID().toString());\n ps.setString(2, configuration.getDisplayName());\n ps.setString(3, configuration.getDefaultType());\n ps.setString(4, configuration.getDefaultArg1()); \n ps.setString(5, configuration.getDefaultArg2()); \n ps.executeUpdate();\n \n return configuration;\n }\n catch(Exception ex){\n ex.printStackTrace();\n //System.out.println(\"Exception in ConfigurationDaoImpl.create(2 arg)\");\n if (ps != null && !ps.isClosed()){\n ps.close();\n }\n if (connection != null && !connection.isClosed()){\n connection.close();\n }\n }\n return configuration;\n }", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Configuration createConfiguration();", "public StructureTownHallConfigDao(Configuration configuration) {\n\t\tsuper(StructureTownHallConfig.STRUCTURE_TOWN_HALL_CONFIG, StructureTownHallConfigPojo.class, configuration);\n\t}", "public StructureTownHallConfigDao() {\n\t\tsuper(StructureTownHallConfig.STRUCTURE_TOWN_HALL_CONFIG, StructureTownHallConfigPojo.class);\n\t}", "public MiniEventTimetableConfigDao() {\n\t\tsuper(MiniEventTimetableConfig.MINI_EVENT_TIMETABLE_CONFIG, MiniEventTimetableConfigPojo.class);\n\t}", "public CoreDao(DaoConfig config) {\n this.txManager = config.getTxManager();\n txTemplate = new TransactionTemplate(txManager);\n setSessionFactory(config.getSessionFactory());\n\n this.daoClass = config.getDaoClass();\n getHibernateTemplate().setCacheQueries(true);\n }", "@Autowired\n public RouteDao(Configuration configuration) {\n super(Route.ROUTE, com.dator.jqtest.dao.model.tables.pojos.Route.class, configuration);\n }", "public ETLLogDAOImpl() {\r\n this(new Configuration());\r\n }", "public EtiquetaDao() {\n //subiendola en modo Embedded\n this.sql2o = new Sql2o(\"jdbc:h2:~/demojdbc\", \"sa\", \"\");\n createTable();\n //cargaDemo();\n }", "@Test(expected = TermsOfUseDaoConfigurationException.class)\r\n public void testCtor_dbConnectionFactoryConfigMissing() throws Exception {\r\n configurationObject.removeChild(\"dbConnectionFactoryConfig\");\r\n\r\n new ProjectTermsOfUseDaoImpl(configurationObject);\r\n }", "public PensionParametersDAO(Configuration properties) {\n this.properties = properties;\n\n }", "private static DBConnectionFactory createDBConnectionFactory(ConfigurationObject config) {\r\n ConfigurationObject dbConnectionFactoryConfig = Helper.getChildConfig(config,\r\n DB_CONNECTION_FACTORY_CONFIG);\r\n\r\n // Create database connection factory using the extracted configuration\r\n try {\r\n return new DBConnectionFactoryImpl(dbConnectionFactoryConfig);\r\n } catch (UnknownConnectionException e) {\r\n throw new LateDeliverablesTrackerConfigurationException(\r\n \"Fails to create database connection factory.\", e);\r\n } catch (ConfigurationException e) {\r\n throw new LateDeliverablesTrackerConfigurationException(\r\n \"Fails to create database connection factory.\", e);\r\n }\r\n }", "public BLFacadeImplementation() {\t\t\r\n\t\tSystem.out.println(\"Creating BLFacadeImplementation instance\");\r\n\t\tConfigXML c=ConfigXML.getInstance();\r\n\t\t\r\n\t\tif (c.getDataBaseOpenMode().equals(\"initialize\")) {\r\n\t\t\tDataAccess dbManager=new DataAccess(c.getDataBaseOpenMode().equals(\"initialize\"));\r\n\t\t\tdbManager.initializeDB();\r\n\t\t\tdbManager.close();\r\n\t\t\t}\r\n\t\t\r\n\t}", "ConfigModel createInstanceOfConfigModel();", "public ProfileWorkexpDao(Configuration configuration) {\n super(ProfileWorkexp.PROFILE_WORKEXP, com.moseeker.baseorm.db.profiledb.tables.pojos.ProfileWorkexp.class, configuration);\n }", "private HibernateToListDAO(){\r\n\t\tfactory = new AnnotationConfiguration().addPackage(\"il.hit.model\") //the fully qualified package name\r\n .addAnnotatedClass(User.class).addAnnotatedClass(Items.class)\r\n .addResource(\"hibernate.cfg.xml\").configure().buildSessionFactory();\r\n\t}", "@Dao(CfgHisTableConfigEntity.class)\npublic interface ICfgHisTableConfigDao extends CrudDao<CfgHisTableConfigEntity, String> {\n}", "public DriverConfig createDriver()\n {\n DriverConfig driver = new DriverConfig(this);\n \n _driverList.add(driver);\n \n return driver;\n }", "public TeacherDao(Configuration configuration) {\n super(Teacher.TEACHER, com.heman.bysj.jooq.tables.pojos.Teacher.class, configuration);\n }", "@Autowired\n public ActHiAttachmentDao(Configuration configuration) {\n super(ActHiAttachment.ACT_HI_ATTACHMENT, cn.com.ho.workflow.infrastructure.db.tables.pojos.ActHiAttachment.class, configuration);\n }", "private TangoConfig setupTangoConfig(Tango tango) {\n // Create a new Tango Configuration and enable the Depth Sensing API.\n TangoConfig config = tango.getConfig(TangoConfig.CONFIG_TYPE_DEFAULT);\n config.putBoolean(TangoConfig.KEY_BOOLEAN_DEPTH, true);\n config.putInt(TangoConfig.KEY_INT_DEPTH_MODE, TangoConfig.TANGO_DEPTH_MODE_POINT_CLOUD);\n config.putBoolean(TangoConfig.KEY_BOOLEAN_MOTIONTRACKING, true);\n config.putBoolean(TangoConfig.KEY_BOOLEAN_AUTORECOVERY, true);\n return config;\n }", "public RideDao(Configuration configuration) {\n super(Ride.RIDE, models.garaDB.tables.pojos.Ride.class, configuration);\n }", "@Override\n public Configuration createConfiguration(Connection connection, Configuration configuration) throws SQLException {\n PreparedStatement ps = null;\n try{\n String insertSQL = \"INSERT INTO Configuration (displayName, defaultType, defaultArg1, defaultArg2) VALUES (?, ?, ?, ?);\";\n ps = connection.prepareStatement(insertSQL, Statement.RETURN_GENERATED_KEYS);\n ps.setString(1, configuration.getDisplayName());\n ps.setString(2, configuration.getDefaultType());\n ps.setString(3, configuration.getDefaultArg1()); \n ps.setString(4, configuration.getDefaultArg2()); \n ps.executeUpdate();\n \n ResultSet fullConfiguration = ps.getGeneratedKeys();\n fullConfiguration.next();\n int genKey = fullConfiguration.getInt(1);\n configuration.setConfigurationID((long) genKey);\n \n return configuration;\n }\n catch(Exception ex){\n ex.printStackTrace();\n //System.out.println(\"Exception in ConfigurationDaoImpl.create(2 arg)\");\n if (ps != null && !ps.isClosed()){\n ps.close();\n }\n if (connection != null && !connection.isClosed()){\n connection.close();\n }\n }\n return configuration;\n }", "private void initConfig() throws DatabaseAccessException {\n\t\tStatement stmt = null;\n\n\t\ttry {\n\t\t\tstmt = this.connection.createStatement();\n\n\t\t\t// With synchronous OFF, SQLite continues without syncing\n\t\t\t// as soon as it has handed data off to the operating system.\n\t\t\tstmt.execute(\"PRAGMA synchronous = OFF;\");\n\n\t\t\t// The MEMORY journaling mode stores the rollback journal in volatile RAM.\n\t\t\t// This saves disk I/O but at the expense of database safety and integrity.\n\t\t\tstmt.execute(\"PRAGMA journal_mode = MEMORY;\");\n\n\t\t\t// The journal_size_limit pragma may be used to limit the size of rollback-journal.\n\t\t\t// -1 means no limit.\n\t\t\tstmt.execute(\"PRAGMA journal_size_limit = -1;\");\n\n\t\t\t// If the argument N is negative, then the number of cache pages\n\t\t\t// is adjusted to use approximately N*1024 bytes of memory.\n\t\t\tstmt.execute(\"PRAGMA cache_size = -50000;\");\n\n\t\t\t// Once an encoding has been set for a database, it cannot be changed.\n\t\t\tstmt.execute(\"PRAGMA encoding = \\\"UTF-8\\\";\");\n\n\t\t\t// When temp_store is MEMORY temporary tables and indices are kept\n\t\t\t// in as if they were pure in-memory databases memory.\n\t\t\tstmt.execute(\"PRAGMA temp_store = MEMORY;\");\n\n\t\t\tstmt.close();\n\n\t\t} catch (SQLException e) {\n\t\t\tthrow new DatabaseAccessException(Failure.CONFIG);\n\t\t}\n\t}", "private static void createSessionFactory() {\n\t\ttry {\n\t\t\tif (sessionFactory == null) {\n\n\t\t\t\tProperties properties = new Properties();\n\t\t\t\tproperties.load(ClassLoader.getSystemResourceAsStream(\"hibernate.properties\"));\n\n\t\t\t\tConfiguration configuration = new Configuration();\n\t\t\t\tEntityScanner.scanPackages(\"musala.schoolapp.model\").addTo(configuration);\n\t\t\t\tconfiguration.mergeProperties(properties).configure();\n\t\t\t\tStandardServiceRegistry builder = new StandardServiceRegistryBuilder()\n\t\t\t\t\t\t.applySettings(configuration.getProperties()).build();\n\t\t\t\tsessionFactory = configuration.buildSessionFactory(builder);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"Failed to create session factory object.\");\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public TOfferGoodsDao(Configuration configuration) {\n super(TOfferGoods.T_OFFER_GOODS, cn.zyj.dbexporter.jooq.db_mall.tables.pojos.TOfferGoods.class, configuration);\n }", "private static SessionFactory buildSessionFactory() {\n\t\t// Creating Configuration Instance & Passing Hibernate Configuration File\n\t\tConfiguration configObj = new Configuration();\n\t\tconfigObj.configure(\"hibernate.cfg.xml\");\n\n\t\t// Since Hibernate Version 4.x, ServiceRegistry Is Being Used\n\t\tServiceRegistry serviceRegistryObj = new StandardServiceRegistryBuilder()\n\t\t\t\t.applySettings(configObj.getProperties()).build();\n\n\t\t// Creating Hibernate SessionFactory Instance\n\t\tsessionFactoryObj = configObj.buildSessionFactory(serviceRegistryObj);\n\t\treturn sessionFactoryObj;\n\t}", "private TangoConfig setupTangoConfig(Tango tango) {\n // Create a new Tango Configuration and enable the ViewAirportMapActivity API.\n TangoConfig config = new TangoConfig();\n config = tango.getConfig(config.CONFIG_TYPE_DEFAULT);\n config.putBoolean(TangoConfig.KEY_BOOLEAN_MOTIONTRACKING, true);\n\n // Tango service should automatically attempt to recover when it enters an invalid state.\n config.putBoolean(TangoConfig.KEY_BOOLEAN_AUTORECOVERY, true);\n return config;\n }", "public ClassModelDao(Configuration configuration) {\n super(ClassModel.CLASS_MODEL, com.platform.chorus.db.tables.pojos.ClassModel.class, configuration);\n }", "public FtlConfig() {\n cfg = new Configuration(Configuration.VERSION_2_3_30);\n cfg.setClassLoaderForTemplateLoading(this.getClass().getClassLoader(), \"ftl\");\n cfg.setDefaultEncoding(\"UTF-8\");\n cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);\n cfg.setSharedVariable(\"random\",\n new BeansWrapperBuilder(Configuration.VERSION_2_3_30).build().getStaticModels());\n cfg.setLogTemplateExceptions(false);\n cfg.setWrapUncheckedExceptions(true);\n cfg.setFallbackOnNullLoopVariable(false);\n }", "public ContextDaoImpl() {\n Set<Commissioner> commissionerSet = new HashSet<>();\n List<String> logins = new ArrayList<>();\n commissionerSet.add(new Commissioner(\"victor.net\", \"25345Qw&&\", true));\n commissionerSet.add(new Commissioner(\"egor.net\", \"3456eR&21\", false));\n commissionerSet.add(new Commissioner(\"igor.net\", \"77??SDSw23\", false));\n logins.add(\"[email protected]\");\n logins.add(\"[email protected]\");\n logins.add(\"[email protected]\");\n Database.setCandidateSet(new HashSet<>());\n Database.setVoterSet(new HashSet<>());\n Database.setLogins(logins);\n Database.setCommissionerSet(commissionerSet);\n }", "public void createTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;", "@Autowired\n public TDeliveryCorpDao(Configuration configuration) {\n super(TDeliveryCorp.T_DELIVERY_CORP, com.vjshop.entity.TDeliveryCorp.class, configuration);\n }", "public DriverForCreateBuilder() {\r\n driverForCreate = new DriverForCreate();\r\n }", "private static List<Configuration> configure() {\n Map<String, Configuration> configurations = new HashMap<String, Configuration>();\n try {\n Enumeration<URL> resources = Thread.currentThread().getContextClassLoader().getResources(\"jorm.properties\");\n \n while (resources.hasMoreElements()) {\n URL url = resources.nextElement();\n \n Database.get().log.debug(\"Found jorm configuration @ \" + url.toString());\n \n Properties properties = new Properties();\n InputStream is = url.openStream();\n properties.load(is);\n is.close();\n \n String database = null;\n String destroyMethodName = null;\n String dataSourceClassName = null;\n Map<String, String> dataSourceProperties = new HashMap<String, String>();\n int priority = 0;\n \n for (Entry<String, String> property : new TreeMap<String, String>((Map) properties).entrySet()) {\n String[] parts = property.getKey().split(\"\\\\.\");\n if (parts.length < 3 || !parts[0].equals(\"database\")) {\n continue;\n }\n if (database != null && !parts[1].equals(database)) {\n try {\n Configuration conf = configurations.get(database);\n if (conf == null || conf.priority < priority) {\n conf = new Configuration(database, dataSourceClassName, dataSourceProperties, destroyMethodName, priority);\n configurations.put(database, conf);\n Database.get().log.debug(\"Configured \" + conf);\n }\n } catch (Exception ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage());\n }\n database = parts[1];\n destroyMethodName = null;\n dataSourceClassName = null;\n dataSourceProperties = new HashMap<String, String>();\n priority = 0;\n }\n\n if (parts.length == 3 && parts[2].equals(\"destroyMethod\")) {\n destroyMethodName = property.getValue();\n } else if (parts.length == 3 && parts[2].equals(\"priority\")) {\n try {\n priority = Integer.parseInt(property.getValue().trim());\n } catch (Exception ex) {\n \n }\n } else if (parts[2].equals(\"dataSource\")) {\n if (parts.length == 3) {\n dataSourceClassName = property.getValue();\n } else if (parts.length == 4) {\n dataSourceProperties.put(parts[3], property.getValue());\n } else {\n Database.get().log.warn(\"Invalid DataSource property '\" + property.getKey() + \"'\");\n }\n } else {\n Database.get().log.warn(\"Invalid property '\" + property.getKey() + \"'\");\n }\n }\n \n if (database != null) {\n try {\n Configuration conf = configurations.get(database);\n if (conf == null || conf.priority < priority) {\n conf = new Configuration(database, dataSourceClassName, dataSourceProperties, destroyMethodName, priority);\n configurations.put(database, conf);\n Database.get().log.debug(\"Configured \" + conf);\n }\n } catch (Exception ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage());\n }\n }\n }\n \n for (Entry<String, Configuration> entry : configurations.entrySet()) {\n entry.getValue().apply();\n Database.get().log.debug(\"Configured \" + configuration);\n }\n } catch (IOException ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage()); \n }\n \n return new ArrayList<Configuration>(configurations.values());\n }", "public MySqlDaoFactory() {\n creators = new HashMap<>();\n creators.put(Bank.class, new DaoCreator<Connection>() {\n @Override\n public GenericDAO create(Connection connection) {\n return new MySqlBankDao(connection);\n }\n });\n\n creators.put(Deposit.class, new DaoCreator<Connection>() {\n @Override\n public GenericDAO create(Connection connection) {\n return new MySqlDepositDao(connection);\n }\n });\n\n }", "private static SessionFactory buildSessionFactory() {\n Configuration configObj = new Configuration();\n configObj.configure(\"hibernate.cfg.xml\");\n\n ServiceRegistry serviceRegistryObj = new StandardServiceRegistryBuilder().applySettings(configObj.getProperties()).build();\n\n // Creating Hibernate SessionFactory Instance\n sessionFactoryObj = configObj.buildSessionFactory(serviceRegistryObj);\n return sessionFactoryObj;\n }", "public VoterDao(Configuration configuration) {\n super(Voter.VOTER, com.hexarchbootdemo.adapter.output.persistence.h2.generated_sources.jooq.tables.pojos.Voter.class, configuration);\n }", "@Autowired\n public ArticleDao(Configuration configuration) {\n super(Article.ARTICLE, cn.edu.kmust.flst.domain.flst.tables.pojos.Article.class, configuration);\n }", "@Autowired\n public TaskDefNotificationDao(Configuration configuration) {\n super(TaskDefNotification.TASK_DEF_NOTIFICATION, cn.com.ho.workflow.infrastructure.db.tables.pojos.TaskDefNotification.class, configuration);\n }", "private ProjectConfigurationFactory()\n {}", "protected void configureEmbeddedDB() {\n final EmbeddedDBProvider embeddedDBProvider = new EmbeddedDBProvider(daoConfig);\n embeddedDB = embeddedDBProvider.get();\n bind(EmbeddedDB.class).toInstance(embeddedDB);\n }", "public static guitarDao createguitarDao() {\n\t\tguitarDao result = null;\n\t\ttry {\n\t\t\tObject o = Class.forName(daoName + \".\" + \"guitarImpl\").newInstance();\n\t\t\tresult = (guitarDao)o;\n\t\t} catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "public void createTapTable(TableConfig tableConfig) throws ConfigurationException;", "public interface DAOFactory {\n\n /**\n *\n * @param context\n * @return\n */\n public abstract DAO createPersonBeaconDAO(Context context);\n}", "@Test(expected = IllegalArgumentException.class)\r\n public void testCtor_configurationObjectNull() {\r\n configurationObject = null;\r\n\r\n new ProjectTermsOfUseDaoImpl(configurationObject);\r\n }", "private static Configuration getConfigurationFromDb(String conf_id) {\n FrontEndDBInterface f = new FrontEndDBInterface();\n Configuration config = f.getConfigInformation(Integer.parseInt(conf_id));\n return config;\n }", "protected IDAOConfigs getDaoGenConfig(URL argUrl) {\r\n\t\tIDAOConfigs daoGenConfig = null;\r\n\t\tList<IConfigObject> configs = getConfigs(argUrl);\r\n\t\tif (!configs.isEmpty()) {\r\n\t\t\tdaoGenConfig = DAOConfigs.createInstance();\r\n\r\n\t\t\tfor (IConfigObject config : configs) {\r\n\t\t\t\tdaoGenConfig.setConfigObject(null, config);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn daoGenConfig;\r\n\t}", "public CreditChainDao(Configuration configuration) {\n super(CreditChain.CREDIT_CHAIN, com.generator.tables.pojos.CreditChain.class, configuration);\n }", "public interface ConfigurationDAO\n{\n /**\n * Export table configuration information\n * \n * @param fullTableName\n * full table name, including schema\n * @return column configurations mapped by column name\n */\n public Map<String, ColumnConfig> exportColumns(String fullTableName);\n\n /**\n * Adds column comments to column configs\n * \n * @param fullTableName\n * full table name\n * @param configs\n * ColumnConfig objects mapped to column names\n */\n public void addColumnComments(String fullTableName, Map<String, ColumnConfig> configs);\n\n /**\n * Updates table configuration based on information available from TAP tables table\n * \n * @param fullTableName\n * full name of table to update\n * @param config\n * table configuration\n * @return false if the table does not exist, else true\n */\n public boolean updateTableFromTap(String fullTableName, TableConfig config);\n\n /**\n * Updates columns configuration based on information available from TAP columns table\n * \n * @param fullTableName\n * full name of table that the columns belong to\n * @param configs\n * columns configurations\n */\n public void updateColumnsFromTap(String fullTableName, Map<String, ColumnConfig> configs);\n\n /**\n * Get index definition statements\n * \n * @param fullTableName\n * full name of table that the columns belong to\n * @return index definition statements as Strings in a List\n */\n public Map<String, String> exportIndexDefs(String fullTableName);\n\n /**\n * Get constraints information\n * \n * @param fullDbTableName\n * full database name of table that the columns belong to\n * @param constraintType\n * ConfigurationDAOImpl.FOREIGN_KEYS for foreign keys, ConfigurationDAOImpl.PRIMARY_KEYS for primary keys\n * @return Map constraint name -$gt; encoded constraint string\n */\n public Map<String, String> exportConstraints(String fullDbTableName, String constraintType);\n\n /**\n * Query for strings using the template\n * \n * @param sql\n * sql query with params placeholders\n * @param params\n * an array of params\n * @return a list of String results\n */\n public List<String> queryForStrings(String sql, Object[] params);\n\n /**\n * Get description of given table in given schema\n * \n * @param fullTableName\n * full table name\n * \n * @return table description as a String\n */\n public String exportTableDescription(String fullTableName);\n\n /**\n * Executes a statement\n * \n * @param statement\n * sql statement\n */\n public void execute(String statement);\n\n /**\n * Drops a constraint\n * \n * @param constraint\n * constraint to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropConstraint(ConstraintConfig constraint) throws ConfigurationException;\n\n /**\n * Adds a constraint\n * \n * @param constraint\n * constraint to add\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void addConstraint(ConstraintConfig constraint) throws ConfigurationException;\n\n /**\n * Drops an index\n * \n * @param index\n * index to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropIndex(IndexConfig index) throws ConfigurationException;\n\n /**\n * Adds an index\n * \n * @param index\n * index to add\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void addIndex(IndexConfig index) throws ConfigurationException;\n\n /**\n * Begin transaction\n */\n public void begin();\n\n /**\n * Commit transaction\n */\n public void commit();\n\n /**\n * Rollback transaction\n */\n public void rollback();\n\n /**\n * Drops column\n * \n * @param columnConfig\n * column configuration object of the column to drop\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void dropColumn(ColumnConfig columnConfig) throws ConfigurationException;\n\n /**\n * Creates column\n * \n * @param columnConfig\n * column attributes\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createColumn(ColumnConfig columnConfig) throws ConfigurationException;\n\n /**\n * Updates column\n * \n * @param current\n * current column attributes\n * @param updated\n * desired column attributes\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateColumn(ColumnConfig current, ColumnConfig updated) throws ConfigurationException;\n\n /**\n * Creates foreign key constraint\n * \n * @param constraintConfig\n * constraint configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createConstraint(ConstraintConfig constraintConfig) throws ConfigurationException;\n\n /**\n * Creates index\n * \n * @param indexConfig\n * index configuration\n * @throws ConfigurationException\n * if change is not allowed\n * \n */\n public void createIndex(IndexConfig indexConfig) throws ConfigurationException;\n\n /**\n * Creates a table\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Delete schema from TAP metadata tables\n * \n * @param schemaConfig\n * schema configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void deleteTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;\n\n /**\n * Create schema in TAP metadata tables\n * \n * @param schemaConfig\n * schema configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTapSchema(SchemaConfig schemaConfig) throws ConfigurationException;\n\n /**\n * Update schema in TAP metadata tables\n * \n * @param newSchema\n * schema configuration\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateTapSchema(SchemaConfig newSchema, boolean createOnly) throws ConfigurationException;\n\n /**\n * Delete table from TAP metadata tables\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void deleteTapTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Create table in TAP metadata tables\n * \n * @param tableConfig\n * table configuration\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void createTapTable(TableConfig tableConfig) throws ConfigurationException;\n\n /**\n * Update table in TAP metadata tables\n * \n * @param newTable\n * table configuration\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n public void updateTapTable(TableConfig newTable, boolean createOnly) throws ConfigurationException;\n\n /**\n * Adds missing records and references defined by the table's keys\n * \n * @param cfgTable\n * TableConfig object to process\n * @param createOnly\n * do not update the record if it exists\n * @throws ConfigurationException\n * if change is not allowed\n */\n void updateTapTableReferences(TableConfig cfgTable, boolean createOnly) throws ConfigurationException;\n\n /* =============================================================================== */\n /* Replacements for former JPA repositories functions */\n /* =============================================================================== */\n\n /**\n * Find all TAP schemas\n * \n * @return a collection of TapSchema objects\n */\n public Collection<TapSchema> findAllSchemas();\n\n /**\n * Find all TAP tables\n * \n * @return a collection of TapTable objects\n */\n public Collection<TapTable> findAllTables();\n\n /**\n * Find a TAP schema by name\n * \n * @param schemaName\n * schema name\n * @return TapSchema object\n */\n public TapSchema findOneSchema(String schemaName);\n\n /**\n * Find all TAP columns\n * \n * @return a collection of TapColumn objects\n */\n public Collection<TapColumn> findAllColumns();\n\n /**\n * Find a TAP table by name\n * \n * @param tableName\n * column name\n * @return TapTable object\n */\n public TapTable findOneTable(String tableName);\n\n /**\n * Find all TAP key columns\n * \n * @return a collection of TapKeyColumn objects\n */\n public Collection<TapKeyColumn> findAllKeyColumns();\n\n /**\n * Find a TAP column by its key\n * \n * @param tapColumnPK\n * column key\n * @return TapColumn object\n */\n public TapColumn findOneColumn(TapColumnPK tapColumnPK);\n\n /**\n * Find all TAP keys\n * \n * @return a collection of TapKey objects\n */\n public Collection<TapKey> findAllKeys();\n\n /**\n * Get JdbcTemplate\n * \n * @return JdbcTemplate used by this DAO\n */\n public JdbcTemplate getTemplate();\n\n /**\n * Get schema name\n * \n * @return schema name of any existing table or default schema name\n */\n public String getSchema();\n\n /**\n * Make sure that TAP tables satisfy current version requirements\n * \n * @throws ConfigurationException\n * if there were configuration problems\n */\n void checkTapDbVersion() throws ConfigurationException;\n\n /**\n * Refreshes the object cache, for TAP metadata cached by the application.\n */\n public void refreshObjectCache();\n \n /**\n * Convert project codes to project ids\n * \n * @param projectCodes\n * list of project codes\n * @param schema\n * Schema of the projects table\n * @return projectIds List of project ids for codes\n */\n public List<Long> convertProjectCodesToIds(List<String> projectCodes, String schema);\n \n}", "public ManagedConfiguration createConfiguration() throws SmartFrogException, RemoteException {\n return ManagedConfiguration.createConfiguration(this, true, isClusterRequired(), false);\n }", "public static AppTest create(Config config) {return null;}", "public interface ISystemConfigDao extends SupportDao<SystemConfig> {\n}", "public static void createDataBase() {\n final Configuration conf = new Configuration();\n\n addAnnotatedClass(conf);\n\n conf.configure();\n new SchemaExport(conf).create(true, true);\n }", "@Profile(\"production\")\r\n @Bean\r\n @DependsOn(\"SessionFactory\") \r\n public EshopDAOImpl getLocaleDAO(SessionFactory sessionFactory, DataSource dataSource) { \r\n \r\n EshopDAOImpl instanceDAOImpl = new EshopDAOImpl();\r\n \r\n //Inject datasource for JDBC.\r\n// instanceDAOImpl.setDataSource(dataSource); \r\n \r\n //Initialize reference to a SessionFactoryBean for database's methods. \r\n instanceDAOImpl.setSessionFactory(sessionFactory);\r\n \r\n return instanceDAOImpl; \r\n }", "@Override\n\tpublic StudentDao createDao() {\n\t\treturn new SqliteStudentDaoImpl();\n\t}", "@Bean\n\tpublic DataSourceDao dataSourceDao() {\n\t\tDataSourceDao metadata = new DataSourceDao();\n\t\tmetadata.put(\"rslite\", dsRSLite());\n\t\tmetadata.put(\"rastreosat\", dsRS());\n\t\tmetadata.put(\"entel\", dsEntel());\n\t\tmetadata.put(\"mongo\", dsMongo());\n\t\treturn metadata;\n\t}", "private SQLite sqLiteConnect(DatabaseConfig config){\n SQLite result;\n String filePath = String.format(\"database\\\\%s.db\", config.getSqlName());\n result = new SQLite(filePath);\n\n if(result.connect())\n ItemBox.getLogger().info(\"[Database] connect successful \" + filePath);\n\n else{\n ItemBox.getLogger().severe(\"[Database] connect fail \" + filePath);\n return null;\n }\n\n SQLiteTable sqLiteTable = convertToSQLiteTable(config);\n SQLite.Status sqLiteResult = result.createTable(sqLiteTable);\n\n if(sqLiteResult == SQLite.Status.SUCCESS){\n ItemBox.getLogger().info(String.format(\"[Database] add table \\\"%s\\\" to %s\", config.getTableName(), filePath));\n }else{\n ItemBox.getLogger().info(String.format(\"[Database] found table \\\"%s\\\" from %s\", config.getTableName(), filePath));\n }\n\n ItemBox.getLogger().info(String.format(\"[Database] sql \\\"%s\\\" connected\", config.getSqlName()));\n return result;\n }", "public LogEmailSendrecordDao(Configuration configuration) {\n super(LogEmailSendrecord.LOG_EMAIL_SENDRECORD, com.moseeker.baseorm.db.logdb.tables.pojos.LogEmailSendrecord.class, configuration);\n }", "public interface DAOFactory {\n\n BalanceDAO createBalanceDAO();\n}", "@Test(expected = TermsOfUseDaoConfigurationException.class)\r\n public void testCtor_dbConnectionFactoryConfigInvalid1() throws Exception {\r\n configurationObject.getChild(\"dbConnectionFactoryConfig\").removeChild(\r\n \"com.topcoder.db.connectionfactory.DBConnectionFactoryImpl\");\r\n\r\n new ProjectTermsOfUseDaoImpl(configurationObject);\r\n }", "public BotDao(DBConnector dbConnector) {\n this.dbConnector = dbConnector;\n }", "private void initalConfig() {\n \t\tconfig = new Configuration(new File(getDataFolder(),\"BeardStat.yml\"));\n \t\tconfig.load();\n \t\tconfig.setProperty(\"stats.database.type\", \"mysql\");\n \t\tconfig.setProperty(\"stats.database.host\", \"localhost\");\n \t\tconfig.setProperty(\"stats.database.username\", \"Beardstats\");\n \t\tconfig.setProperty(\"stats.database.password\", \"changeme\");\n \t\tconfig.setProperty(\"stats.database.database\", \"stats\");\n \n \t\tconfig.save();\n \t}", "private void createDbConfig (String address) {\n\t\tProperties dbConfig = new Properties();\n\t\t\n\t\t/*\n\t\t * Load any previous version of the property file at the address.\n\t\t */\n\t\tFile dbConfigFile = new File(address);\n\t\ttry {\n\t\t\t/*\n\t\t\t * Creates file/directory if it could not be found\n\t\t\t */\n\t\t\tif(dbConfigFile.getParentFile().mkdirs()) System.err.println(\"[WARNING] Database properties directory location was missing and has been created.\");\n\t\t\tif(dbConfigFile.createNewFile()) System.err.println(\"[WARNING] Database properties file was missing and has been created.\");\n\t\t\t\n\t\t\tFileReader dbConfigReader = new FileReader(dbConfigFile);\n\t\t\tdbConfig.load(dbConfigReader);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"[ERROR]: Could not initialize database properties file: \" + address);\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Check to see if any properties are missing.\n\t\t */\n\t\tif(!dbConfig.containsKey(\"useLocal\")) dbConfig.put(\"useLocal\", \"true\");\n\t\t\n\t\t//AWS DynamoDB settings\n\t\tif(!dbConfig.containsKey(\"dynamoDbAccessKey\")) dbConfig.put(\"dynamoDbAccessKey\", \"\");\n\t\tif(!dbConfig.containsKey(\"dynamoDbSecretKey\")) dbConfig.put(\"dynamoDbSecretKey\", \"\");\n\t\tif(!dbConfig.containsKey(\"dynamoDbEndpoint\")) dbConfig.put(\"dynamoDbEndpoint\", \"\");\n\t\tif(!dbConfig.containsKey(\"dynamoDbRegion\")) dbConfig.put(\"dynamoDbRegion\", \"\");\n\t\t\n\t\t//AWS KMS settings\n\t\tif(!dbConfig.containsKey(\"kmsAccessKey\")) dbConfig.put(\"kmsAccessKey\", \"\");\n\t\tif(!dbConfig.containsKey(\"kmsSecretKey\")) dbConfig.put(\"kmsSecretKey\", \"\");\n\t\tif(!dbConfig.containsKey(\"kmsEndpoint\")) dbConfig.put(\"kmsEndpoint\", \"\");\n\t\tif(!dbConfig.containsKey(\"kmsRegion\")) dbConfig.put(\"kmsRegion\", \"\");\n\t\t\n\t\t//Google Drive Settings\n\t\tif(!dbConfig.containsKey(\"driveClientId\")) dbConfig.put(\"driveClientId\", \"\");\n\t\tif(!dbConfig.containsKey(\"driveClientSecret\")) dbConfig.put(\"driveClientSecret\", \"\");\n\t\t\n\n\t\tthis.databaseConfig = dbConfig;\n\t\t\n\t\t/*\n\t\t * Save any changes\n\t\t */\n\t\tthis.saveDbConfig();\n\t}", "public SessionDao(Configuration configuration) {\n super(Session.SESSION, com.scratch.database.mysql.jv.tables.pojos.Session.class, configuration);\n }", "public TelefoneDao() {\n\t\tconnection = SingleConnection.getConnection();\n\t}", "public static DeviceDAODefinition getDeviceDAODefinition(DeviceTypeConfiguration deviceTypeConfiguration) {\n DeviceDetails deviceDetails = deviceTypeConfiguration.getDeviceDetails();\n DeviceDAODefinition deviceDAODefinition = null;\n\n if (deviceDetails != null) {\n String tableName = deviceTypeConfiguration.getDeviceDetails().getTableId();\n if (tableName != null && !tableName.isEmpty()) {\n List<Table> tables = deviceTypeConfiguration.getDataSource().getTableConfig().getTable();\n Table deviceDefinitionTable = null;\n for (Table table : tables) {\n if (tableName.equals(table.getName())) {\n deviceDefinitionTable = table;\n break;\n }\n }\n if (deviceDefinitionTable != null) {\n deviceDAODefinition = new DeviceDAODefinition(deviceDefinitionTable);\n }\n }\n }\n return deviceDAODefinition;\n }", "@Autowired\n public TProductCategoryBrandDao(Configuration configuration) {\n super(TProductCategoryBrand.T_PRODUCT_CATEGORY_BRAND, com.vjshop.entity.TProductCategoryBrand.class, configuration);\n }", "public abstract CONFIG build();", "public UserDao(Configuration configuration) {\n super(User.USER, com.ims.dataAccess.tables.pojos.User.class, configuration);\n }", "@Autowired\n\tpublic ExamDao(Configuration configuration) {\n\t\tsuper(Exam.EXAM, ro.ghasachi.bt.persistence.tables.pojos.Exam.class, configuration);\n\t}", "boolean initConfiguration(Connection con, String schema, boolean dropIfExist) throws Exception;", "public DBDataInitializer(ArtifactDao artifactDao) {\n this.artifactDao = artifactDao;\n// this.wizardDao = wizardDao;\n// this.userService = userService;\n }", "@Profile(\"development\")\r\n @Bean\r\n @DependsOn(\"SessionFactory\") \r\n public EshopDAOImpl getDevLocaleDAO(SessionFactory sessionFactory, DataSource dataSource) { \r\n \r\n EshopDAOImpl instanceDAOImpl = new EshopDAOImpl(); \r\n \r\n //Initialize reference to a SessionFactoryBean for database's methods. \r\n instanceDAOImpl.setSessionFactory(sessionFactory);\r\n \r\n return instanceDAOImpl; \r\n }", "private static Configuration getConfigurationFromDb(int conf_id) {\n FrontEndDBInterface db = new FrontEndDBInterface();\n return db.getConfigInformation(conf_id);\n }", "public TimescaleDBDatabaseDialect(AbstractConfig config) {\n super(config);\n }", "private static void makeInstance(){\n\n if(settingsFile==null){\n settingsFile = new MetadataFile(SETTINGS_FILE_PATH);\n }\n\n if(!settingsFile.exists()){\n settingsFile.create();\n }\n\n if(tagListeners==null){\n tagListeners= new HashMap<>();\n }\n\n }", "public TransactionDeclearSpoolDao( HibernateUtilFactory.ConfigMode which )\n {\n super( which );\n }", "@Test(expected = TermsOfUseDaoConfigurationException.class)\r\n public void testCtor_dbConnectionFactoryConfigInvalid2() throws Exception {\r\n configurationObject.getChild(\"dbConnectionFactoryConfig\").getChild(\r\n \"com.topcoder.db.connectionfactory.DBConnectionFactoryImpl\").getChild(\"connections\").setPropertyValue(\r\n \"default\", \"not_exist\");\r\n\r\n new ProjectTermsOfUseDaoImpl(configurationObject);\r\n }", "void setup( File storeDir, Consumer<GraphDatabaseService> create );", "protected ContaCapitalCadastroDaoFactory() {\n\t\t\n\t}", "public BandaProtectionDao(Configuration configuration) {\n\t\tsuper(BandaProtection.BANDA_PROTECTION, com.psygate.minecraft.spigot.sovereignty.banda.db.model.tables.pojos.BandaProtection.class, configuration);\n\t}", "private static SessionFactory buildSessionFact() {\n try {\n\n return new Configuration().configure(\"hibernate.cfg.xml\").buildSessionFactory();\n\n \n } catch (Throwable ex) {\n \n System.err.println(\"Initial SessionFactory creation failed.\" + ex);\n throw new ExceptionInInitializerError(ex);\n }\n }", "public T_2698Dao(org.jooq.Configuration configuration) {\n\t\tsuper(org.jooq.test.jdbc.generatedclasses.tables.T_2698.T_2698, org.jooq.test.jdbc.generatedclasses.tables.pojos.T_2698.class, configuration);\n\t}", "public static DAOFactory getInstance() throws DAOConfigurationException {\n\t\tProperties properties = new Properties();\n\t\tString url;\n\t\tString driver;\n\t\tString username;\n\t\tString password;\n\n\t\tClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n\t\tInputStream PropertiesFile = classLoader.getResourceAsStream(DAOFactory.PROPERTIES_FILE);\n\n\t\tif (PropertiesFile == null) {\n\t\t\tthrow new DAOConfigurationException(\n\t\t\t\t\t\"The properties_file \" + DAOFactory.PROPERTIES_FILE + \" is nowhere to find.\");\n\t\t}\n\n\t\ttry {\n\t\t\tproperties.load(PropertiesFile);\n\t\t\turl = properties.getProperty(DAOFactory.PROPERTY_URL);\n\t\t\tdriver = properties.getProperty(DAOFactory.PROPERTY_DRIVER);\n\t\t\tusername = properties.getProperty(DAOFactory.PROPERTY_USERNAME);\n\t\t\tpassword = properties.getProperty(DAOFactory.PROPERTY_PASSWORD);\n\t\t} catch (IOException e) {\n\t\t\tthrow new DAOConfigurationException(\"Could not load properties_file \" + DAOFactory.PROPERTIES_FILE, e);\n\t\t}\n\n\t\ttry {\n\t\t\tClass.forName(driver);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tthrow new DAOConfigurationException(\"The driver was not found in the classpath.\", e);\n\t\t}\n\t\tDAOFactory instance = new DAOFactory(url, username, password);\n\t\treturn instance;\n\t}", "public IncomeDao(Configuration configuration) {\n super(Income.INCOME, moneytree.persist.db.generated.tables.pojos.Income.class, configuration);\n }", "public BlogDaoHibernateFactoryImpl() {\n\t\tsuper();\n\t}", "public void init(ViewConfigData config) {\n\r\n this.viewConfig = config;\r\n\r\n /* fill the ontologyMap\r\n String ontologyMapFile = viewConfig.getOntologyMap(); */\r\n\r\n /* try {\r\n ontologyMapStore.parse(ontologyMapFile, false);\r\n } catch (FileNotFoundException e) {\r\n throw new ConfigurationException(\r\n \"FileNotFoundException for the ontology map file: \"\r\n + ontologyMapFile, e);\r\n } catch (IOException e) {\r\n throw new ConfigurationException(\r\n \"IOException while trying to parse the ontology map file: \"\r\n + ontologyMapFile, e);\r\n } */\r\n\r\n //fill the schemaMap\r\n String schemaMapFile = viewConfig.getSchemaMap();\r\n try {\r\n schemaMapStore.parse(schemaMapFile, false);\r\n } catch (FileNotFoundException e) {\r\n throw new ConfigurationException(\r\n \"FileNotFoundException for the schema map file: \"\r\n + schemaMapFile, e);\r\n } catch (IOException e) {\r\n throw new ConfigurationException(\r\n \"ConfigurationException for the schema map file: \"\r\n + schemaMapFile, e);\r\n }\r\n\r\n //build the DTree. It also fills the ontologyStore\r\n dTree = buildDTree();\r\n \r\n //build the hash table for ont map properites\r\n String ontMappropertiesFilePath = viewConfig.getOntMapProperties();\r\n ReadPropFile.loadToHashTableFromOntmapPropertiesFile(ontMappropertiesFilePath); \r\n \r\n }", "public interface IConfigurationDao {\n \n \t/**\n \t * Retrieves a <code>Configuration</code> value from a data source\n \t * \n \t * @param name\n \t * The name of the <code>Configuration</code> option to be queried\n \t * @return The value corresponding to the given <code>Configuration</code> option, or an\n \t * empty string if not set.\n \t */\n \tpublic String getConfigurationValue(String name);\n \n \t/**\n \t * Sets a <code>Configuration</code> option.\n \t * \n \t * @param name\n \t * The name of the <code>Configuration</code> option to be set\n \t * @param value\n \t * The value to be assigned to the given <code>Configuration</code> option\n \t */\n \tpublic void setConfigurationValue(String name, String value);\n \n \t/**\n \t * Removes a <code>Configuration</code> option entirely\n \t * \n \t * @param name\n \t * The name of the <code>Configuration</code> option to be removed (nothing\n \t * will be done if there is no <code>Configuration</code> option by that name)\n \t */\n \tpublic void deleteConfigurationValue(String name);\n \n \t/**\n \t * Checks if a <code>Configuration</code> option is set (i.e. if a <code>Configuration</code> option\n \t * by that name exists)\n \t * \n \t * @param name\n \t * The name of the <code>Configuration</code> option to check\n \t * @return true, iff the <code>Configuration</code> option is set\n \t */\n \tpublic boolean configurationValueExists(String name);\n \n \t// FIXME: do we really need an update method? how about overriding existing \n \t// values.\n \t/**\n \t * Updates the given <code>Configuration</code> Object in the database. Create it if it\n \t * doesn't exist.\n \t * \n \t * @param configuration\n \t * the <code>Configuration</code> object to be updated/created\n \t * @return the <code>Configuration</code> object updated.\n \t */\n \tpublic Configuration update(final Configuration configuration);\n \n \n \t/**\n \t * Returns a <code>List</code> of all known configuration options\n \t * \n \t * @return a <code>List</code> of Configuration options, empty <code>List</code> if no options are available\n \t */\n \tpublic List<Configuration> getAll();\n }", "public Database(String url) {\n this.url = url;\n\n File f = new File(url);\n\n if (f.exists()) {\n try {\n f.mkdirs();\n f.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //create table relationship\n LinkedList<String> relationship_attributes = new LinkedList<>();\n relationship_attributes.add(\"id_entity1\");\n relationship_attributes.add(\"id_entity2\");\n relationship_attributes.add(\"description\");\n this.create_table(\"relationship\", relationship_attributes);\n }", "private static SessionFactory buildSessionFactory() {\n\t\ttry {\n\t\t\t// Create the SessionFactory from hibernate.cfg.xml\n\t\t\tConfiguration configuration = new Configuration().configure();\n\t\t\tServiceRegistry serviceRegistry = new ServiceRegistryBuilder()\n\t\t\t\t\t.applySettings(configuration.getProperties())\n\t\t\t\t\t.buildServiceRegistry();\n\t\t\tSessionFactory sessionFactory = configuration\n\t\t\t\t\t.buildSessionFactory(serviceRegistry);\n\t\t\treturn sessionFactory;\n\t\t} catch (Throwable ex) {\n\t\t}\n\t\treturn null;\n\t}", "cdfgFactory getcdfgFactory();", "public static void inicializarBD() {\n\t\ts = new StandardServiceRegistryBuilder().configure().build();\r\n\t\tsf = new MetadataSources(s).buildMetadata().buildSessionFactory();\r\n\t}", "public DaoFactory()\n\t{\n\n\t}", "public String openConfig()\n throws FlooringMasteryDaoException;", "public PaymentOtpDaoImpl() {\n properties = LoadPropertyFile.loadQueries(LoadPropertyFile.PAYMENT_FILE, PaymentDaoImpl.class,\n CREATE_PAYMENT_OTP_MAPPING);\n }" ]
[ "0.75662196", "0.59358346", "0.5909627", "0.5815076", "0.5777238", "0.5767506", "0.56834644", "0.5594286", "0.5585051", "0.55256414", "0.5395415", "0.5352785", "0.53020895", "0.5291551", "0.52795345", "0.52526456", "0.52459365", "0.52416664", "0.52339536", "0.51833236", "0.5157152", "0.51460576", "0.51392883", "0.5133805", "0.51247364", "0.51164854", "0.51126146", "0.51030946", "0.5076144", "0.5052275", "0.50463164", "0.503817", "0.5035965", "0.5023644", "0.4995563", "0.4990063", "0.49899542", "0.4984891", "0.4983917", "0.49733925", "0.49712566", "0.4957047", "0.49496686", "0.49441817", "0.49412382", "0.49412102", "0.49382892", "0.49164575", "0.49106637", "0.48800728", "0.4874695", "0.48702067", "0.4868167", "0.48632857", "0.4850551", "0.48465702", "0.484583", "0.4835113", "0.4833875", "0.48299435", "0.4818106", "0.48148802", "0.48133427", "0.48103905", "0.4805777", "0.4800374", "0.479505", "0.4789101", "0.47872344", "0.47870997", "0.4780808", "0.47769845", "0.47737008", "0.47696677", "0.47589567", "0.4756929", "0.47479463", "0.47433212", "0.47256663", "0.4724914", "0.4724752", "0.47096902", "0.470927", "0.4704469", "0.47029915", "0.47025818", "0.4701278", "0.4698673", "0.4698663", "0.4697846", "0.46960947", "0.4693809", "0.46818385", "0.46803054", "0.46776617", "0.46694723", "0.46644577", "0.46639654", "0.46610644", "0.4660075" ]
0.6930507
1
Fetch records that have id IN (values)
public List<TFreightConfig> fetchById(Long... values) { return fetch(T_FREIGHT_CONFIG.ID, values); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Condition in(QueryParameter parameter, Object... values);", "public List<Produto> findByIdIn(Integer... ids);", "@GetMapping(\"/listInByIds\")\n public R<List<User>> listInByIds(@RequestParam(value = \"ids\") List<String> ids) {\n return R.ok(userService.selectBatchIds(ids));\n }", "List<EssayQuestionDetail> findByIdIn(List<Long> detailIds);", "public OpenERPRecordSet getIDSubset(Object[] lst) {\r\n\t\t// bail out\r\n\t\tif (lst == null)\r\n\t\t\treturn null;\r\n\t\tif (lst.length <= 0)\r\n\t\t\treturn null;\r\n\r\n\t\t// get list of IDs as Vector, for .contains\r\n\t\tVector<Integer> idList = new Vector<Integer>();\r\n\t\tfor (int i = 0; i < lst.length; i++) {\r\n\t\t\t// while moving to vector, sort out everything that's not integer\r\n\t\t\ttry {\r\n\t\t\t\tidList.add((Integer) lst[i]);\r\n\t\t\t} catch (ClassCastException cce) {\r\n\t\t\t\tjLog.warning(\"ClassCastException while converting '\" + lst[i]\r\n\t\t\t\t\t\t+ \"' to Integer\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// create record set to return\r\n\t\tOpenERPRecordSet result = new OpenERPRecordSet(null);\r\n\r\n\t\t// look into all records\r\n\t\tIterator<OpenERPRecord> i = records.iterator();\r\n\r\n\t\twhile (i.hasNext()) {\r\n\t\t\tOpenERPRecord r = i.next();\r\n\r\n\t\t\t// only for records that have a key\r\n\t\t\tif (!r.containsKey(\"id\"))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\t// if the key is requested\r\n\t\t\tInteger id = (Integer) r.get(\"id\");\r\n\t\t\tif (idList.contains(id)) {\r\n\t\t\t\t// add it to list\r\n\t\t\t\ttry {\r\n\t\t\t\t\tresult.add((OpenERPRecord) r.clone());\r\n\t\t\t\t} catch (CloneNotSupportedException e) {\r\n\t\t\t\t\t// should not happen anyway.\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t// return subset\r\n\t\treturn result;\r\n\t}", "public interface QuantitativeMultipleAnswerQuestionRepository extends JpaRepository<QuantitativeMultipleAnswerQuestion, Long>, JpaSpecificationExecutor<QuantitativeMultipleAnswerQuestion> {\n\n @Query(\"select q from QuantitativeMultipleAnswerQuestion q where q.id in :ids\")\n List<QuantitativeMultipleAnswerQuestion> findAll(@Param(\"ids\") List<Long> ids);\n\n}", "public void addWhereIn(String attributeName, Collection values, String operator) {\r\n\t\tif (!values.isEmpty()) {\r\n\t\t\tString valueListString = StringUtils.join(values, ',');\r\n\t\t\taddWhere(attributeName + \" in (\"+valueListString+\")\", operator);\r\n\t\t}\r\n\t}", "@Override\n public List<ResourceTagJoinVO> searchByIds(Long... tagIds) {\n int DETAILS_BATCH_SIZE = 2000;\n String batchCfg = _configDao.getValue(\"detail.batch.query.size\");\n if (batchCfg != null) {\n DETAILS_BATCH_SIZE = Integer.parseInt(batchCfg);\n }\n // query details by batches\n List<ResourceTagJoinVO> uvList = new ArrayList<ResourceTagJoinVO>();\n // query details by batches\n int curr_index = 0;\n if (tagIds.length > DETAILS_BATCH_SIZE) {\n while ((curr_index + DETAILS_BATCH_SIZE) <= tagIds.length) {\n Long[] ids = new Long[DETAILS_BATCH_SIZE];\n for (int k = 0, j = curr_index; j < curr_index + DETAILS_BATCH_SIZE; j++, k++) {\n ids[k] = tagIds[j];\n }\n SearchCriteria<ResourceTagJoinVO> sc = tagSearch.create();\n sc.setParameters(\"idIN\", ids);\n List<ResourceTagJoinVO> vms = searchIncludingRemoved(sc, null, null, false);\n if (vms != null) {\n uvList.addAll(vms);\n }\n curr_index += DETAILS_BATCH_SIZE;\n }\n }\n if (curr_index < tagIds.length) {\n int batch_size = (tagIds.length - curr_index);\n // set the ids value\n Long[] ids = new Long[batch_size];\n for (int k = 0, j = curr_index; j < curr_index + batch_size; j++, k++) {\n ids[k] = tagIds[j];\n }\n SearchCriteria<ResourceTagJoinVO> sc = tagSearch.create();\n sc.setParameters(\"idIN\", ids);\n List<ResourceTagJoinVO> vms = searchIncludingRemoved(sc, null, null, false);\n if (vms != null) {\n uvList.addAll(vms);\n }\n }\n return uvList;\n }", "long countByIdInAndIsActiveTrue(@Param(\"ids\") List<BigInteger> ids);", "@Query(value = \"select * from chat_room cr where cr.cr_type=:type and cr.cr_id in :ids and cr.cr_is_active=1 order by cr.cr_created_date desc limit :offset,:count\", nativeQuery = true)\n List<ChatRoomModel> findByTypeAndIdInIsActiveTrue(@Param(\"type\") String type,@Param(\"ids\") List<BigInteger> ids, @Param(\"offset\") int offset, @Param(\"count\") int count);", "@Test\n public void testBatchedInQuery() {\n TestDataCreator creator = new TestDataCreator(getSessionFactory());\n Town town = creator.createTestTown();\n\n int n = 10;\n List<Long> ids = new ArrayList<>(n);\n for (long i=0; i < n; i++) {\n Person savedPerson = creator.createTestPerson(town, \"P\" + i);\n ids.add(savedPerson.getId());\n }\n for (long i=0; i < n; i++) {\n creator.createTestPerson(town, \"P\" + i);\n }\n\n Person person = query.from(Person.class);\n query.where(person.getId()).in(ids, 2);\n\n validate(\"from Person hobj1 where hobj1.id in (:np1)\", ids);\n assertEquals(n, doQueryResult.size());\n }", "List<T> findAllById(List<Object> ids) throws Exception;", "@Override\n public List<Service> findByIdIn(List<String> ids) {\n List<ObjectId> objIds = new ArrayList<ObjectId>();\n for (String id : ids){\n objIds.add(new ObjectId(id));\n }\n\n List<Service> results = template.find(\n new Query(Criteria.where(\"_id\").in(objIds)),\n Service.class);\n\n return results;\n }", "Collection<Long> filterByTaxon( Collection<Long> ids, Taxon taxon );", "public Query in(String key, Object[] value) {\n Preconditions.checkNotNull(key);\n builder.addFilter(builder.getOperator(QueryFilterBuilder.Operators.IN), key, value);\n return this;\n }", "@Query(\"SELECT e.stations FROM EmployeeEntity e where e.id in :employeeId\")\n List<StationEntity> getStationsOfEmployee(@Param(\"employeeId\") long employeeId);", "@Query(value = \"select * from chat_room cr where cr.cr_type=:type and cr.cr_name=:name and cr.cr_id in :ids and cr.cr_is_active=1 order by cr.cr_created_date desc limit :offset,:count\", nativeQuery = true)\n List<ChatRoomModel> findByTypeAndNameAndIdInIsActiveTrue(@Param(\"type\") String type, @Param(\"name\") String name, @Param(\"ids\") List<BigInteger> ids, @Param(\"offset\") int offset, @Param(\"count\") int count);", "List<String> findAllIds();", "@Query(value = \"select * from chat_room cr where cr.cr_id in :ids and cr.cr_is_active=1 order by cr.cr_created_date desc limit :offset,:count\",nativeQuery = true)\n List<ChatRoomModel> findByIdsAndIsActiveTrue(@Param(\"ids\") List<BigInteger> ids, @Param(\"offset\") int offset, @Param(\"count\") int count);", "Collection<?> idValues();", "@Query(\"SELECT * FROM test WHERE patientId IN (:patientId)\")\n LiveData<List<Test>> getTestByPatiendId(int patientId);", "@Query(\"{ 'id': {$in: ?0} }\")\r\n\tpublic Page<Answer> findAll(List<ObjectId> ids, Pageable pageable);", "public <T> void addInFilter(@Nullable String fieldName, @NonNull List<T> values) {\n addFilter(fieldName, FilterOperator.IN, values);\n }", "protected abstract List performQuery(String[] ids);", "public List getAllIds();", "public interface LogDetailRepository extends CrudRepository<LogDetail, Long> {\n List<LogDetail> findByLogIdIn(List<Long> LogIds);\n\n\n}", "List<Team> findByIds(List<Long> teamIds);", "java.util.List<java.lang.Long> getIdsList();", "public static void findByIn() {\n\t\tFindIterable<Document> findIterable = collection.find(in(\"status\", \"A\", \"D\"));\r\n\t\tprint(findIterable);\r\n\t}", "public interface InventoryRepository extends JpaRepository<Inventory,Integer> {\n\n @Query(\"select i from Inventory i ,in(i.good) g where g.goodId=:goodId\")\n public List<Inventory> selectAllGoodId(@Param(\"goodId\") int goodId);\n}", "public UsState[] findWhereIdEquals(int id) throws UsStateDaoException;", "@Override\n\tpublic <T extends BasePojo> List<T> queryByIds(String ids) {\n\t\treturn null;\n\t}", "@Override\n\t\tpublic String toSQL() {\n\t\t\tStringBuilder sb=new StringBuilder();\n\t\t\tsb.append(fieldName).append(\" IN (\");\n\t\t\tboolean first=true;\n\t\t\tfor(Object o :values) {\n\t\t\t\tif(first) {\n\t\t\t\t\tfirst=false;\n\t\t\t\t}else {\n\t\t\t\t\tsb.append(\",\");\n\t\t\t\t}\n\t\t\t\tsb.append(toSql(o));\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\treturn sb.toString() ;\n\t\t}", "public Items[] findWhereIdEquals(int id) throws ItemsDaoException;", "public static void assertContainsIds(Bundle bundle, String... ids) throws FHIRPathException {\n FHIRPathEvaluator evaluator = FHIRPathEvaluator.evaluator();\n EvaluationContext evaluationContext = new EvaluationContext(bundle);\n Collection<FHIRPathNode> tmpResults = evaluator.evaluate(evaluationContext, EXPRESSION_BUNDLE_IDS);\n Collection<String> listOfIds = tmpResults.stream().map(x -> x.toString()).collect(Collectors.toList());\n for (String id : ids) {\n assertTrue(listOfIds.contains(id));\n }\n }", "List<T> getEntitiesByIds(List<ID_TYPE> ids) throws NotImplementedException;", "List<MemberAdvisoryComment> selectByPrimaryKeyBulk(@Param(\"ids\") List<Long> ids);", "public interface DemoRepositoryCustom {\n\n List<Demo> findInSet(Collection<Long> ids);\n}", "public BeanIdList findIds() throws SQLException {\n/* 154 */ boolean useBackgroundToContinueFetch = false;\n/* */ \n/* 156 */ this.startNano = System.nanoTime();\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ try {\n/* 162 */ List<Object> idList = this.query.getIdList();\n/* 163 */ if (idList == null) {\n/* */ \n/* 165 */ idList = Collections.synchronizedList(new ArrayList());\n/* 166 */ this.query.setIdList(idList);\n/* */ } \n/* */ \n/* 169 */ BeanIdList result = new BeanIdList(idList);\n/* */ \n/* 171 */ SpiTransaction t = this.request.getTransaction();\n/* 172 */ Connection conn = t.getInternalConnection();\n/* 173 */ this.pstmt = conn.prepareStatement(this.sql);\n/* */ \n/* 175 */ if (this.query.getBufferFetchSizeHint() > 0) {\n/* 176 */ this.pstmt.setFetchSize(this.query.getBufferFetchSizeHint());\n/* */ }\n/* */ \n/* 179 */ if (this.query.getTimeout() > 0) {\n/* 180 */ this.pstmt.setQueryTimeout(this.query.getTimeout());\n/* */ }\n/* */ \n/* 183 */ this.bindLog = this.predicates.bind(new DataBind(this.pstmt));\n/* */ \n/* 185 */ ResultSet rset = this.pstmt.executeQuery();\n/* 186 */ this.dataReader = new RsetDataReader(rset);\n/* */ \n/* 188 */ boolean hitMaxRows = false;\n/* 189 */ boolean hasMoreRows = false;\n/* 190 */ this.rowCount = 0;\n/* */ \n/* 192 */ DbReadContext ctx = new DbContext();\n/* */ \n/* 194 */ while (rset.next()) {\n/* 195 */ Object idValue = this.desc.getIdBinder().read(ctx);\n/* 196 */ idList.add(idValue);\n/* */ \n/* 198 */ this.dataReader.resetColumnPosition();\n/* 199 */ this.rowCount++;\n/* */ \n/* 201 */ if (this.maxRows > 0 && this.rowCount == this.maxRows) {\n/* 202 */ hitMaxRows = true;\n/* 203 */ hasMoreRows = rset.next();\n/* */ break;\n/* */ } \n/* 206 */ if (this.bgFetchAfter > 0 && this.rowCount >= this.bgFetchAfter) {\n/* 207 */ useBackgroundToContinueFetch = true;\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* 212 */ if (hitMaxRows) {\n/* 213 */ result.setHasMore(hasMoreRows);\n/* */ }\n/* */ \n/* 216 */ if (useBackgroundToContinueFetch) {\n/* */ \n/* */ \n/* 219 */ this.request.setBackgroundFetching();\n/* */ \n/* */ \n/* 222 */ BackgroundIdFetch bgFetch = new BackgroundIdFetch(t, rset, this.pstmt, ctx, this.desc, result);\n/* 223 */ FutureTask<Integer> future = new FutureTask<Integer>(bgFetch);\n/* 224 */ this.backgroundExecutor.execute(future);\n/* */ \n/* */ \n/* 227 */ result.setBackgroundFetch(future);\n/* */ } \n/* */ \n/* 230 */ long exeNano = System.nanoTime() - this.startNano;\n/* 231 */ this.executionTimeMicros = (int)exeNano / 1000;\n/* */ \n/* 233 */ return result;\n/* */ } finally {\n/* */ \n/* 236 */ if (!useBackgroundToContinueFetch)\n/* */ {\n/* */ \n/* 239 */ close();\n/* */ }\n/* */ } \n/* */ }", "@Query(value = \"select count(*) from chat_room cr where cr.cr_type=:type and cr.cr_id in :ids and cr.cr_is_active=1\", nativeQuery = true)\n long countByTypeAndIdInIsActiveTrue(@Param(\"type\") String type,@Param(\"ids\") List<BigInteger> ids);", "List<E> findAll(Iterable<ID> identifiers);", "public Future<List<io.remicro.saga.entities.tables.pojos.Person>> findManyByUserId(List<String> values) {\n return findManyByCondition(Person.PERSON.USER_ID.in(values));\n }", "private boolean isIdInCollectionOfSingleIDVOs (int id, Collection vos)\n\t{\n\t\tboolean found = false;\n\t\t\n\t\tfor (Iterator i = vos.iterator(); !found && i.hasNext(); ) {\n\t\t\tSingleIdVO sivo = (SingleIdVO) i.next();\n\t\t\tfound = (sivo.getId() == id);\n\t\t}\n\t\t\n\t\treturn found;\n\t}", "@Test\n public void testNamedParamWithImmediateValue() {\n List<Long> ids = Arrays.asList(10L, 5L);\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).in().named(NAMED_PARAM_1, ids);\n\n validate(\" from Person hobj1 where hobj1.id in (:np1)\", ids);\n }", "private ArrayList<String> obtenerIds(ArrayList<String> values){\n\t\tArrayList<String> ids = new ArrayList<>();\n\t\tfor(String valor : values){\n\t\t\tids.add(postresId.get(valor));\n\t\t}\n\t\treturn ids;\n\t}", "public <T> void addInFilter(@Nullable String fieldName, @NonNull T[] values) {\n addFilter(fieldName, FilterOperator.IN, values);\n }", "List<UserContentFile> findContentFiles(@Param(\"ids\") List<Long> ids);", "Set<II> getIds();", "public List<models.garaDB.tables.pojos.Ride> fetchByMemberid(Integer... values) {\n return fetch(Ride.RIDE.MEMBERID, values);\n }", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface NetraNominationRepository extends NominationRepository{\n\n\n\n @Query(\"select nominations from Nomination nominations where nominations.contract.id in :contractIdList\")\n List<Nomination> findAllNomsByContractIdList(@Param(\"contractIdList\") List<Long> contractIdList);\n\n}", "private boolean contains(Collection<Long> bundleIds, Long bundleId) {\n for (Long id : bundleIds) {\n if (id.longValue() == bundleId.longValue()) {\n return true;\n }\n }\n return false;\n }", "long findValues(List<Object> values, List<Column> columns);", "private Map<CollectionCacheableTestId, CollectionCacheableTestValue> findByIdsInternal(Collection<CollectionCacheableTestId> ids) {\n Map<CollectionCacheableTestId, CollectionCacheableTestValue> result = new HashMap<>();\n for (CollectionCacheableTestId id : ids) {\n CollectionCacheableTestValue value = myDbRepository.findById(id);\n // do not explicitly put null values into map\n if (value != null) {\n result.put(id, value);\n }\n }\n return result;\n }", "List<UserInfo> getUserListByIdLists(List<Integer> idList);", "public String createWhereIN(int iterations) {\n StringBuilder sb = new StringBuilder();\n sb.append(\" IN (\");\n for (int ndx = 0; ndx < iterations; ndx++) {\n sb.append(\"?,\");\n }\n sb.deleteCharAt(sb.length() - 1); // remove last comma.\n sb.append(\")\");\n return sb.toString();\n }", "Collection<T> findAll(Iterable<I> ids);", "public void getUsersList(List<Long> ids, AsyncHttpResponseHandler handler) {\n if (ids == null) {\n return;\n }\n\n String apiUrl = getApiUrl(\"users/lookup.json\");\n RequestParams params = new RequestParams();\n\n String strIds = android.text.TextUtils.join(\",\", ids);\n params.put(\"user_id\", strIds);\n\n // Execute the request\n getClient().get(apiUrl, params, handler);\n }", "@Query(\"SELECT * FROM user_table WHERE id IN (:climberIds)\")\n LiveData<List<Climber>> loadAllByIds(int[] climberIds);", "@GET\n @Path(\"/search/{ids}\")\n @Produces(\"application/json;charset=UTF-8\")\n @GZIP\n @NoCache\n public List<SourceVo> searchSourcesById(\n @PathParam(\"ids\") String ids) {\n\n Set<Integer> idSet = Arrays.stream(ids.split(\",\"))\n .map(Integer::valueOf)\n .collect(Collectors.toSet());\n\n return sourceService.findByIds(idSet).stream()\n .map(p -> p.toVo(DataFilter.get()))\n .collect(Collectors.toList());\n }", "public interface QuestionRepository extends CrudRepository<QuestionEntity,Long> {\n\n @Query(\"select count(id) from QuestionEntity where id in :questionIds\")\n Long validateQuestionNumbers(@Param(\"questionIds\") List<Long>questionIds);\n}", "public static ArrayList<Long> searchKeywordEntryId(ArrayList<String> queryKeywords) {\n ArrayList<Long> keywordIdList = new ArrayList<Long>();\n List<Keywords> idList = new ArrayList<>();\n\n for(String qk : queryKeywords){\n List<Keywords> idListt =\n Keywords.find()\n .select(\"keywordEntryId\")\n .where()\n //.in(\"keyword\", queryKeywords)\n .like(\"keyword\", \"%\"+qk+\"%\")\n .findList();\n idList.addAll(idListt);\n }\n\n for (Keywords keywords : idList) {\n keywordIdList.add(keywords.getKeywordEntryId());\n }\n System.out.println(\"keywordIdList---\" + keywordIdList);\n return keywordIdList;\n }", "public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByWhId(Collection<String> values, int limit) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.WH_ID.in(values),limit);\n }", "@Query(value=\"SELECT s FROM Shelf s, IN(s.book) b WHERE b.id = ?1\", nativeQuery=false\n )\n Optional<Shelf> findShelfByBookId(Integer bookId);", "@Repository\npublic interface SysResourceRepository extends JpaRepository<SysResourceEntity, Integer> {\n @Query(\"SELECT DISTINCT n FROM SysResourceEntity m INNER JOIN SysResourceEntity n ON m.parentId = n.id WHERE m.url IN (:urls)\")\n Set<SysResourceEntity> findByList(@Param(\"urls\") List<String> urls);\n\n Set<SysResourceEntity> findByUrlIn(List<String> urls);\n}", "List<Authority> findByNameIn(List<AuthorityName> names);", "public static boolean in(Integer integer, Integer... integers) {\n\treturn null != integers && null != integer && Arrays.asList(integers).contains(integer);\n }", "List findByFilterText(Set<String> words, boolean justIds);", "@Query(value = \"SELECT u FROM Car u WHERE u.brandName IN :names\")\n\tList<Car> findByBrand(@Param(\"names\") Collection<String> brandName);", "public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByCurrencyId(Collection<String> values, int limit) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.CURRENCY_ID.in(values),limit);\n }", "public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByWhId(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.WH_ID.in(values));\n }", "public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByToId(Collection<String> values, int limit) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.TO_ID.in(values),limit);\n }", "private List<Long> getListOfAuthorizedById(\n List<Long> ids,\n String username,\n ResponseToFailedAuthorization failureResponse,\n AccessLevel accessLevel,\n Session session,\n String securedIdsQuery,\n String openAndSecuredIdsQuery,\n String securedParamListName,\n String openParamListName,\n String returnVarName\n ) throws Exception {\n\n ids = uniquifyIds(ids);\n\n String queryStr;\n if ( accessLevel == AccessLevel.View ) {\n queryStr = openAndSecuredIdsQuery.replace( PROJ_GRP_SUBST_STR, VIEW_PROJECT_GROUP_FIELD );\n }\n else {\n queryStr = securedIdsQuery.replace( PROJ_GRP_SUBST_STR, EDIT_PROJECT_GROUP_FIELD );\n }\n NativeQuery query = session.createNativeQuery( queryStr );\n query.addScalar( returnVarName, StandardBasicTypes.STRING );\n if ( accessLevel == AccessLevel.View ) {\n query.setParameterList( openParamListName, ids );\n }\n query.setParameterList( securedParamListName, ids );\n String queryUsername = username == null ? UNLOGGED_IN_USER : username;\n query.setParameter( USERNAME_PARAM, queryUsername );\n\n logger.debug(query.getQueryString());\n List<Long> rtnVal = query.list();\n if ( failureResponse == ResponseToFailedAuthorization.ThrowException &&\n rtnVal.size() < ids.size() ) {\n String idStr = joinIdList( ids );\n String message = makeUserReadableMessage( username, idStr );\n logger.error( message );\n throw new ForbiddenResourceException( message );\n }\n\n return rtnVal;\n }", "public static SetExpression in(String propertyName, Object[] values) {\n return new SetExpression(Operator.IN, propertyName, values);\n }", "public ArrayList<ArrayList<Integer>> selectForQuoiEntre(int id) throws DAOException;", "List<Long> getAuthorisedList( Long id) ;", "List<ProductInfoOutput> findList(List<String> productIdList);", "public List<moneytree.persist.db.generated.tables.pojos.Income> fetchById(UUID... values) {\n return fetch(Income.INCOME.ID, values);\n }", "public List<Integer> get_valid_ids(String table) {\n //table does not exist\n if (!get_table_names().contains(table) && !table.equals(\"relationship\")) {\n throw new RuntimeException(\"Table does not exist.\");\n }\n\n\n LinkedList<Integer> valid_ids = new LinkedList<>();\n String sql = \"select id from \" + table;\n ResultSet resultSet = execute_statement(sql, true); //get all ids from the table\n\n try {\n while (resultSet.next()) {\n int i = resultSet.getInt(\"id\"); //store all ids\n valid_ids.add(i);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return valid_ids;\n }", "@Query(value = \"select count(*) from chat_room cr where cr.cr_type=:type and cr.cr_name=:name and cr.cr_id in :ids and cr.cr_is_active=1\", nativeQuery = true)\n long countByTypeAndNameAndIdInIsActiveTrue(@Param(\"type\") String type, @Param(\"name\") String name, @Param(\"ids\") List<BigInteger> ids);", "public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByCurrencyId(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.CURRENCY_ID.in(values));\n }", "private List<Integer> filterDocIds(FilterQueryTree filterQueryTree, List<Integer> inputDocIds) {\n if (filterQueryTree == null) {\n List<Integer> allDocs = new ArrayList<>(_totalDocs);\n for (int i = 0; i < _totalDocs; ++i) {\n allDocs.add(i);\n }\n return allDocs;\n }\n\n final List<FilterQueryTree> childFilters = filterQueryTree.getChildren();\n final boolean isLeaf = (childFilters == null) || childFilters.isEmpty();\n\n if (isLeaf) {\n FilterOperator filterType = filterQueryTree.getOperator();\n String column = filterQueryTree.getColumn();\n final List<String> value = filterQueryTree.getValue();\n return getMatchingDocIds(inputDocIds, filterType, column, value);\n }\n\n List<Integer> result = filterDocIds(childFilters.get(0), inputDocIds);\n final FilterOperator operator = filterQueryTree.getOperator();\n for (int i = 1; i < childFilters.size(); ++i) {\n// List<Integer> childResult = operator.equals(FilterOperator.AND) ? filterDocIds(childFilters.get(i), result)\n// : filterDocIds(childFilters.get(i), inputDocIds);\n List<Integer> childResult = filterDocIds(childFilters.get(i), inputDocIds);\n result = combine(result, childResult, operator);\n }\n return result;\n }", "@Override\n public List<T> findAllById(Iterable<Integer> ids) {\n List<T> entities = new ArrayList<>();\n for (int id : ids) {\n entities\n .add(findById(id).orElseThrow(() -> new EntityNotFoundException(\"ID Not found:\" + id)));\n }\n return entities;\n }", "private static boolean checkForMultipleIDs(String id)\n\t{\n\t\tif (id.indexOf(',') >= 0)\n\t\t{\n\t\t\treturn false; \n\t\t}\n\t\t\n\t\treturn true; \n\t}", "@Repository\npublic interface ProductCategoryRepository extends JpaRepository<ProductCategory, Integer> {\n List<ProductCategory> findByCategoryTypeIn(List<Integer> categoryTypeList);\n}", "public List<ro.ghasachi.bt.persistence.tables.pojos.Exam> fetchByUserid(Integer... values) {\n\t\treturn fetch(Exam.EXAM.USERID, values);\n\t}", "public abstract List<CustomerOrder> findAll(Iterable<Long> ids);", "public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByActive(Collection<Boolean> values, int limit) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.ACTIVE.in(values),limit);\n }", "List<RoleMenu> queryByRoleIds(Set<String> _roleIds);", "public UserRow[] getUsersBySpecificIds(int domainId, List<String> specificIds)\n throws AdminPersistenceException {\n if (specificIds == null || specificIds.size() == 0)\n return null;\n \n StringBuffer clauseIN = new StringBuffer(\"(\");\n String specificId = null;\n for (int s = 0; s < specificIds.size(); s++) {\n if (s != 0)\n clauseIN.append(\", \");\n specificId = specificIds.get(s);\n clauseIN.append(\"'\").append(\n LDAPUtility.dblBackSlashesForDNInFilters(specificId)).append(\"'\");\n }\n clauseIN.append(\")\");\n String query = SELECT_USERS_BY_SPECIFICIDS + clauseIN;\n return (UserRow[]) getRows(query, domainId).toArray(new UserRow[0]);\n }", "@Query(value=\"SELECT * FROM users WHERE (status = :status) AND (id IN (SELECT user_id FROM documents))\", nativeQuery = true)\n Page<User> findAuthors(@Param(\"status\") int status, Pageable pageable);", "public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByToId(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.TO_ID.in(values));\n }", "public Long[] getQueryIDs(){\n\t\treturn DataStructureUtils.toArray(ids_ranks.keySet(), Long.class);\n\t}", "public List<cn.zyj.dbexporter.jooq.db_mall.tables.pojos.TOfferGoods> fetchByOid(Integer... values) {\n return fetch(TOfferGoods.T_OFFER_GOODS.OID, values);\n }", "public static boolean in(int target, int... values) {\n for (int v : values) {\n if (target == v) {\n return true;\n }\n }\n return false;\n }", "@SafeVarargs\n public static <T> boolean in(T value, T... values) {\n if (set(values).isEmpty()) return false;\n\n for (T element : values) {\n if (Objects.equals(value, element)) return true;\n }\n\n return false;\n }", "public List<Integer> getIds(int conId, int type, int state) throws AppException;", "@Repository\npublic interface HistoryEventRepository extends CrudRepository<HistoryEvent,HistoryID> {\n\n List<HistoryEvent> findAllByIdDateBetween(Date from,Date to);\n\n @Query(\"SELECT h FROM HistoryEvent h WHERE h.id.date between :from and :to and h.id.name IN :names\")\n List<HistoryEvent> findByList(@Param(\"from\") Date from, @Param(\"to\") Date to, @Param(\"names\") List<String> names );\n\n @Query(\"SELECT distinct h.id.name FROM HistoryEvent h WHERE h.id.date between :from and :to\")\n List<String> getEventNames(@Param(\"from\") Date from, @Param(\"to\") Date to);\n\n}", "java.util.List<java.lang.Integer> getOtherIdsList();", "public Object[] getAssocOneIdValues(Object bean);", "public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByCustomerId(Collection<String> values, int limit) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.CUSTOMER_ID.in(values),limit);\n }", "public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByCustomerId(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.CUSTOMER_ID.in(values));\n }" ]
[ "0.6118371", "0.6085298", "0.5983984", "0.5887595", "0.58625734", "0.5854982", "0.58316135", "0.5824877", "0.58105785", "0.576251", "0.57519555", "0.56913364", "0.5683802", "0.5664325", "0.56571996", "0.562483", "0.5618595", "0.5589928", "0.5541375", "0.55104876", "0.54454976", "0.5436477", "0.54346246", "0.5432323", "0.5414036", "0.5412612", "0.5411073", "0.5391923", "0.53858465", "0.53301316", "0.5262358", "0.52415836", "0.52329147", "0.52276915", "0.521929", "0.52180815", "0.5210163", "0.5179999", "0.5165349", "0.5153376", "0.5148704", "0.5145716", "0.5140992", "0.5140209", "0.51369286", "0.51341695", "0.513163", "0.5124991", "0.50921434", "0.50533426", "0.5033213", "0.50093555", "0.5006489", "0.4996566", "0.49835664", "0.49829853", "0.49808797", "0.49763885", "0.4974987", "0.49665353", "0.4940905", "0.4928454", "0.49232224", "0.49203637", "0.49180582", "0.49097368", "0.4905402", "0.48891863", "0.4886487", "0.48857886", "0.48707557", "0.48574477", "0.48560587", "0.48556465", "0.4847427", "0.4847238", "0.48466197", "0.4846096", "0.48311839", "0.48304066", "0.48290378", "0.4825019", "0.48229298", "0.48152152", "0.48151624", "0.48144197", "0.48070794", "0.48063093", "0.48013893", "0.47943345", "0.4791559", "0.47837406", "0.47778854", "0.47721735", "0.47685668", "0.47683173", "0.47575906", "0.47499654", "0.47432834", "0.47391915", "0.47331685" ]
0.0
-1
go back to previous state if no enemy in range
public void chase() throws GameActionException { RobotInfo closestEnemy = dc.getClosestEnemy(); if (closestEnemy == null) { currState = RobotState.RUSH; return; } // attack closest enemy mi.setObjective(closestEnemy.location); mi.setChargeMode(); mi.attackMove(); // send dead enemy archon IDs sendDeadEnemyArchonIDs(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void endTurn() {\n battle.setState(new EnemyTurn(battle));\n battle.continueBattle();\n }", "public static void checkTurnEnd(){\n\t\tboolean end = true;\n\t\tfor (int i = 0; i < heroList.length && end; i++) {\n\t\t\t\n\t\t\tif (heroList[i].isAlive()){\n\t\t\t\tif (heroList[i].getOtherAction()){\n\t\t\t\t\tend = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (checkVictory()) {\n\t\t\tinBattle = false;\n\t\t\t//screenNumber = ID_POST_BATTLE_CUTSCENE;\n\t\t\t//gui.setScreenID(screenNumber);\n\t\t\tscreenNumber = ID_POST_BATTLE_CUTSCENE;\n\t\t\tCutscene.loadCutscene(player.getCurLevel(), false);\n\t\t\tgui.setScreenID(screenNumber);\n\t\t\tgui.initializeCutscene();\n\t\t\tplayer.setCurLevel(player.getCurLevel()+1);\n\t\t}\n\t\t\n\t\tif (end) {\n\t\t\tai.play();\n\t\t\tgui.setEnemyPath(ai.getMoveCommands());\n\t\t\t\n\t\t\ttotalEnemyAttacks = 0;\n\t\t\tcurEnemyAttacker = -1;\n\t\t\t\n\t\t\tfor (int i = 0; i < enemyList.length; i++){\n\t\t\t\t\n\t\t\t\tif (ai.getAttackCommands(i) != null){\n\t\t\t\t\ttotalEnemyAttacks++;\n\t\t\t\t\t\n\t\t\t\t\tif (curEnemyAttacker == -1){\n\t\t\t\t\t\tcurEnemyAttacker = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (totalEnemyAttacks > 0){\n\t\t\t\tgui.setEnemyHasAttackCommand(true);\n\t\t\t\tscreenNumber = ID_POST_BATTLE_CUTSCENE;\n\t\t\t\tisEnemyAttacking = true;\n\t\t\t\t//gui.setScreenID(screenNumber);\n\t\t\t\tString message = ((Enemy)enemyList[curEnemyAttacker]).getEnemyType() + \" did \" + ai.getAttackCommandsDamage(curEnemyAttacker) + \" damage to \" + ((Hero)ai.getAttackCommands(curEnemyAttacker)).getName() + \"!\";\n\t\t\t\tCutscene.loadAttackCutscene(((Enemy)enemyList[curEnemyAttacker]).getEnemyID() * -1 - 1, ai.getAttackCommands(curEnemyAttacker).getUnitID(), message, map.getTileNumber(enemyList[curEnemyAttacker].getCoordinate()));\n\t\t\t\t\n\t\t\t\tcurEnemyAttack = 1;\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tplayer.resetAllHeroes();\n\t\t\t}\n\n\t\t}\n\t}", "@Override\n\tpublic void onAnimationEnd(Animator arg0) {\n\t\tif (mState.getState() == 0) {\n\t\t\tbv.setState(mState.getState());\n\t\t\tbv.setSelected(false);\n\t\t\tbv.setPressed(false);\n\t\t\tbv.setEnabled(true);\n\t\t}\n\t\tIntent intent = new Intent(\"bos.consoar.ninebynine.GameIsOver\");\n\t\tBaseApplication.getInstance().sendBroadcast(intent);\n\t}", "private void enemyMove() {\n\n\t\tboolean goAgain = false;\n\n\t\tint x = (int) (Math.random() * 10);\n\t\tint y = (int) (Math.random() * 10);\n\n\t\t// Make sure the enemy hits in a checkerboard pattern.\n\t\tif (x % 2 == 0) { // if x is even, y should be odd\n\t\t\tif (y % 2 == 0) {\n\t\t\t\tif (y + 1 < 10)\n\t\t\t\t\ty++;\n\t\t\t\telse\n\t\t\t\t\ty--;\n\t\t\t}\n\t\t} else { // if x is odd, y should be even\n\t\t\tif (y % 2 == 1)\n\t\t\t\tif (y + 1 < 10)\n\t\t\t\t\ty++;\n\t\t\t\telse\n\t\t\t\t\ty--;\n\t\t}\n\n\t\tif (enemyLastShotHit && getDifficulty() > 0) { // /if last shot was a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// hit, enemy\n\t\t\t// will try to\n\t\t\t// check around it only run if difficulty is\n\t\t\t// normal or above\n\t\t\tx = enemyLastHitX;\n\t\t\ty = enemyLastHitY;\n\n\t\t\tif (getDifficulty() != 2) {\n\n\t\t\t\tif (conflictX == 4) {\n\t\t\t\t\tconflictX = 0;\n\t\t\t\t} else if (conflictY == 4) {\n\t\t\t\t\tconflictY = 0;\n\t\t\t\t\t// System.out.println(\"conflict has been reset \");\n\t\t\t\t}\n\n\t\t\t\tif (conflictX != 0) {\n\t\t\t\t\tif (conflictX == 1)\n\t\t\t\t\t\tx++;\n\t\t\t\t\telse {\n\t\t\t\t\t\tx--;\n\t\t\t\t\t}\n\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\tconflictX = 4;\n\t\t\t\t} else if (conflictY == 1) {\n\t\t\t\t\t// System.out.println(\"checking down\");\n\t\t\t\t\tconflictY = 4;\n\t\t\t\t\ty++;\n\t\t\t\t}\n\n\t\t\t\tif (x + 1 < 10 && x - 1 >= 0) {// branch for multiple hits\n\t\t\t\t\tif (egrid[x + 1][y] == 1 && egrid[x - 1][y] == 1) {\n\t\t\t\t\t\t// System.out.println(\"conflict at \"+ex+\",\"+ey);\n\t\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\t\tif (x + 2 < 10) {\n\t\t\t\t\t\t\tif (egrid[x + 2][y] == 1) {\n\t\t\t\t\t\t\t\tconflictX = 1;\n\t\t\t\t\t\t\t\tx--;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconflictX = 2;\n\t\t\t\t\t\t\t\tx++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconflictX = 2;\n\t\t\t\t\t\t\tx++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (y + 1 < 10 && y - 1 >= 0) {// branch for multiple vertical\n\t\t\t\t\t\t\t\t\t\t\t\t// hits\n\t\t\t\t\tif (egrid[x][y + 1] == 1 && egrid[x][y - 1] == 1) {\n\t\t\t\t\t\t// System.out.println(\"conflict at \"+ex+\",\"+ey);\n\t\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\t\tconflictY = 1;\n\t\t\t\t\t\ty--;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (conflictX == 0 && conflictY == 0) {\n\n\t\t\t\t\tif (checkDirection == 0) // checks in each direction\n\t\t\t\t\t\tx++;\n\t\t\t\t\telse if (checkDirection == 1)\n\t\t\t\t\t\tx--;\n\t\t\t\t\telse if (checkDirection == 2)\n\t\t\t\t\t\ty++;\n\t\t\t\t\telse if (checkDirection == 3) {\n\t\t\t\t\t\ty--;\n\t\t\t\t\t\tenemyLastShotHit = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (x < 0) // making sure coordinates stay within bounds\n\t\t\t\t\t\tx = 0;\n\t\t\t\t\telse if (x > 9)\n\t\t\t\t\t\tx = 9;\n\t\t\t\t\tif (y < 0)\n\t\t\t\t\t\ty = 0;\n\t\t\t\t\telse if (y > 9)\n\t\t\t\t\t\ty = 9;\n\t\t\t\t}\n\t\t\t} // medium diff\n\n\t\t\telse if (getDifficulty() == 2) {// hard difficulty\n\t\t\t\t// gives enemy unfair advantage\n\n\t\t\t\tif (conflictX == 4)\n\t\t\t\t\tconflictX = 0;\n\t\t\t\tif (conflictY == 4)\n\t\t\t\t\tconflictY = 0;\n\n\t\t\t\tif (conflictX != 0) {\n\t\t\t\t\tif (conflictX == 1)\n\t\t\t\t\t\tx++;\n\t\t\t\t\telse {\n\t\t\t\t\t\tx--;\n\t\t\t\t\t}\n\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\tconflictX = 4;\n\t\t\t\t} else if (conflictY == 1) {\n\t\t\t\t\tconflictY = 4;\n\t\t\t\t\ty++;\n\t\t\t\t}\n\n\t\t\t\tif (x + 1 < 10 && x - 1 >= 0) {// branch for multiple hits\n\t\t\t\t\tif (egrid[x + 1][y] == 1 && egrid[x - 1][y] == 1) {\n\t\t\t\t\t\t// System.out.println(\"conflict at \"+ex+\",\"+ey);\n\t\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\t\tif (x + 2 < 10) {\n\t\t\t\t\t\t\tif (egrid[x + 2][y] == 1) {\n\t\t\t\t\t\t\t\tconflictX = 1;\n\t\t\t\t\t\t\t\tx--;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconflictX = 2;\n\t\t\t\t\t\t\t\tx++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconflictX = 2;\n\t\t\t\t\t\t\tx++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (y + 1 < 10 && y - 1 >= 0) {// branch for multiple vertical\n\t\t\t\t\t\t\t\t\t\t\t\t// hits\n\t\t\t\t\tif (egrid[x][y + 1] == 1 && egrid[x][y - 1] == 1) {\n\t\t\t\t\t\t// System.out.println(\"conflict at \"+ex+\",\"+ey);\n\t\t\t\t\t\tenemyLastHitX = x;\n\t\t\t\t\t\tenemyLastHitY = y;\n\t\t\t\t\t\tconflictY = 1;\n\t\t\t\t\t\ty--;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (conflictX == 0 && conflictY == 0) {\n\t\t\t\t\tif (y + 1 < 10) {\n\t\t\t\t\t\tif (egrid[x][y + 1] == 1)// if y+1 is a hit and it is\n\t\t\t\t\t\t\t\t\t\t\t\t\t// within bounds, it will go\n\t\t\t\t\t\t\t\t\t\t\t\t\t// there\n\t\t\t\t\t\t\ty++;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (y - 1 >= 0) {\n\t\t\t\t\t\tif (egrid[x][y - 1] == 1)\n\t\t\t\t\t\t\ty--;\n\t\t\t\t\t}\n\t\t\t\t\tif (x + 1 < 10) {\n\t\t\t\t\t\tif (egrid[x + 1][y] == 1)\n\t\t\t\t\t\t\tx++;\n\t\t\t\t\t}\n\t\t\t\t\tif (x - 1 >= 0) {\n\t\t\t\t\t\tif (egrid[x - 1][y] == 1) {\n\t\t\t\t\t\t\tx--;\n\t\t\t\t\t\t\tenemyLastShotHit = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} // hard diff\n\t\t\tcheckDirection++;\n\t\t} // lasthit\n\n\t\tint tryCount = 0;\n\t\twhile (egrid[x][y] == 3) { // makes sure enemy doesn't hit same spot\n\t\t\t\t\t\t\t\t\t// twice\n\t\t\tx = (int) (Math.random() * 10);\n\t\t\ty = (int) (Math.random() * 10);\n\t\t\tif (tryCount < 20 && getDifficulty() > 0) {\n\t\t\t\tif (x % 2 == 0) { // if x is even, y should be odd\n\t\t\t\t\tif (y % 2 == 0) { // for checkerboard pattern\n\t\t\t\t\t\tif (y + 1 < 10)\n\t\t\t\t\t\t\ty++;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\ty--;\n\t\t\t\t\t}\n\t\t\t\t} else { // if x is odd, y should be even\n\t\t\t\t\tif (y % 2 == 1)\n\t\t\t\t\t\tif (y + 1 < 10)\n\t\t\t\t\t\t\ty++;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\ty--;\n\t\t\t\t}\n\t\t\t}\n\t\t\ttryCount++;\n\t\t}\n\n\t\tif (egrid[x][y] == 1) { // hit branch\n\t\t\tenemyBoard[x][y].setIcon(createImageIcon(\"tilehit.jpg\"));\n\t\t\tstatus.setText(\" Enemy got a hit\");\n\t\t\tenemyLastShotHit = true; // starts ai\n\t\t\tcheckDirection = 0;\n\t\t\tif (conflictX == 0 && conflictY == 0) {\n\t\t\t\tenemyLastHitX = x; // stores x and y values\n\t\t\t\tenemyLastHitY = y;\n\t\t\t}\n\t\t\tehits--; // keeps score\n\t\t}\n\n\t\telse if (egrid[x][y] == 2) { // poweup branch\n\t\t\tenemyBoard[x][y].setIcon(createImageIcon(\"tilepower.jpg\"));\n\t\t\tstatus.setText(\" Enemy got a PowerUp\");\n\t\t\tgoAgain = true;\n\t\t}\n\n\t\telse\n\t\t\t// miss branch\n\t\t\tenemyBoard[x][y].setIcon(createImageIcon(\"tilemiss.jpg\"));\n\n\t\tegrid[x][y] = 3;\n\n\t\tcheckEnemyWin();\n\n\t\tif (goAgain)\n\t\t\tenemyMove();\n\n\t}", "private void stateReturnToHomeBase() {\n\t\tif (isCloserToBall()) {\n\t\t\tstate = State.ATTACKING;\n\t\t\treturn;\n\t\t}\n\n\t\tif (!isCloseTo(playerDeafaultPosition)) {\n\t\t\tif (isAlignedTo(playerDeafaultPosition)) {\n\t\t\t\tcommander.doDashBlocking(50.0d);\n\t\t\t} else {\n\t\t\t\tturnTo(playerDeafaultPosition);\n\t\t\t}\n\t\t}\n\t}", "public void runaway(ScannedRobotEvent e){\r\n if(didenemyshoot(e)){\r\n //moves away from the enemy\r\n setTurnRight(5 * turndir);\r\n setAhead(e.getVelocity() * movedir);\r\n //tell where it is heading\r\n movedir *= -1;\r\n }\r\n }", "private void moveBack(){\r\n\t\tturnAround();\r\n\t\tmove();\r\n\t}", "private void deathRoom()\n {\n if(currentRoom.equals(deathRoom4))\n {\n alive = false;\n }\n }", "public void lose(){\n // If this object is not the current arena state obsolete it.\n if(this != battleState) return;\n\n isOver = true;\n battleStateLose();\n }", "public void back()\n {\n if(!moveRooms.empty()){\n currentRoom = moveRooms.pop();\n look();\n } \n }", "public void stopMoving()\n {\n mouthPosition = 0;\n }", "public void checkEnemy() {\n\t\tif (enemy != null)\n\t\tif (Integer.parseInt(getCurrentPositionX()) == enemy.getCurrentPositionX() && Integer.parseInt(getCurrentPositionY()) == enemy.getCurrentPositionY()) {\n\t\t\tx = spawnX;\n\t\t\ty = spawnY;\n\t\t}\n\t}", "private void faceBackwards(){\n\t\tturnLeft();\n\t\tturnLeft();\n\t}", "public void back() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null)\n\t return;\n\n\tif (!crossLocation.isEmpty()) {\n\t\t\n\t crossLocation.pop();\n\n\t //back\n\t ArrayList<Location> lastNode = crossLocation.peek();\n\t next = lastNode.get(0);\n\t}\n\n\tLocation loc = getLocation();\n\t\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t} else {\n\t removeSelfFromGrid();\n\t}\n\t\n\tint counter = dirCounter.get(getDirection());\n\tdirCounter.put(getDirection(), --counter);\n\n\tFlower flower = new Flower(getColor());\n\tflower.putSelfInGrid(gr, loc);\n\t\n\tlast = loc;\n }", "private void exitCombatPlayerDefeat(){\n\t\tCheckpoint.load();\r\n\t\t//GlobalGameState.setActiveGameState(GameStates.DEFEAT);\r\n\t\tGSTransition.getInstace().prepareTransition( GameStates.DEFEAT );\r\n\t\tGlobalGameState.setActiveGameState(GameStates.TRANSITION);\r\n\t}", "int defend(Unit unit, Unit enemy);", "public void endTurn(int player)\r\n/* 282: */ {\r\n/* 283:320 */ for (AgentModel model : this.agentModels.values()) {\r\n/* 284:322 */ if (model.getPlayer() == player)\r\n/* 285: */ {\r\n/* 286:324 */ model.clearMovementStack();\r\n/* 287:325 */ model.setAp(0);\r\n/* 288: */ }\r\n/* 289: */ }\r\n/* 290: */ }", "public void endTurn(MapPanel caller) {\n\t\tlog.log(\"Ending turn for \" + toMove);\n\t\ts.unexamine(caller);\n\t\ttoMove = Alignment.opposing(toMove);\n\t\tif(toMove == Alignment.FRIENDLY)\n\t\t\tcaller.setGameStatus(GameState.PLAYER_MOVING);\n\t\telse\n\t\t\tcaller.setGameStatus(GameState.ENEMY_TURN);\n\t\tstartTurn(caller);\n\t}", "@Override\n public void action() {\n while (turn.getPlayer().getFightDecision() == null){\n ;\n }\n FightDecision decision = turn.getPlayer().getFightDecision();\n if (decision== FightDecision.IGNORE){\n turn.getPlayer().setFightDecision(null);\n turn.setPhase(new MovePhase(y));\n }else{\n turn.getPlayer().setFightDecision(null);\n turn.setPhase(new FightPhase());\n }\n }", "void playerHit() {\n if (lives == 0) {//if no lives left\n isDead = true;\n } else {//remove a life and reset positions\n lives -=1;\n immortalityTimer = 100;\n resetPositions();\n }\n }", "public static void playerEffectivelyEndsBattlePhase() {\r\n for (int index = 1; index <= 5; index++){\r\n SummonedMonster MonsterCPU = SummonedMonster.getNthSummonedMonster(index, false);\r\n if (MonsterCPU.isExisting) {\r\n MonsterCPU.canStillAttackThisTurn = false;\r\n }\r\n }\r\n endAttack(false);\r\n }", "@Override\n public void onAnimationEnd(Animator animator) {\n proclaimGameOver();\n\n\n }", "public void gameOver() {\n this.lives --;\n this.alive = false;\n }", "private void checkEndGame() {\n if (field.getStackSize() == (field.getPegCount() - 1)) {\n endGame = true;\n }\n }", "private void loseCondition() {\n if (player.getHealth() <= 0) {\n lose();\n }\n }", "private void endTurn(){\r\n String currentPlayer = cantStop.getGameBoard().getCurrentPlayer().getName();\r\n\t\tgameOver = cantStop.getGameBoard().endTurn(didBust);\r\n\t\t\r\n\t\tif(gameOver){\r\n\t\t\tstatusLabel.setText(currentPlayer + \r\n\t\t\t\t\t\" wins! Go again?\");\r\n\t\t\tupdate();\r\n\t\t} else {\r\n\t\t\tcantStop.getGameBoard().startNewTurn();\r\n\t\t\tallowNewRoll();\r\n\t\t}\r\n\t}", "public void lose() {\n status.setText(\"You're finished\");\n gamegoing = false;\n }", "public void enemyoff(){\n getWorld().removeObject(this);\n }", "public void enemymoveGarret(){\n\t\tint YEG = 0;\n\t\tint XEG = 0;\n\t\tint[] turns = new int[]{0,0,0,0,0,2,1,1,1,1,1,3};//dependign on the placement garret will move a certain way\n\t\tfor(int i = 0 ; i < this.Garret.length;i++){//this grabs garrets current locations\n\t\t\tfor(int p = 0; p < this.Garret.length;p++){\n\t\t\t\tif(this.Garret[i][p] == 1){\n\t\t\t\t\tYEG = i;\n\t\t\t\t\tXEG = p;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tint move = turns[count];\n\t\tswitch(move){//first block is up and down second block is left and right\n\t\t\tcase 0:\n\t\t\t\tif(this.area[YEG][XEG-1] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG][XEG-1] = 1;//to turn left\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tif(this.area[YEG][XEG+1] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG][XEG+1] = 1;//to turn right\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif(this.area[YEG-1][XEG] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG-1][XEG] = 1;//to turn up\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tif(this.area[YEG+1][XEG] != \"[ ]\"){\n\t\t\t\t\tthis.Garret[YEG+1][XEG] = 1;//to turn down\n\t\t\t\t\tthis.Garret[YEG][XEG] = 0;\n\t\t\t\t\tcount++;\n\t\t\t\t\tif(count == 12){\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}//end of switch\t\n\t}", "public void playerHasInvincibility() {\n\t\tthis.state = canBeKilled;\n\t}", "public void EleaveRoom(Enemy1 x)\n\t{\n\t\toccupant = null;\n\t}", "public void checkIfAlive()\n {\n if(this.health<=0)\n {\n targetable=false;\n monstersWalkDistanceX=0;\n monstersWalkDistanceY=0;\n this.health=0;\n new TextureChanger(this,0);\n isSelected=false;\n if(monsterType==1)\n {\n visible=false;\n }\n if(gaveResource==false) {\n int gameResource = Board.gameResources.getGameResources();\n Board.gameResources.setGameResources(gameResource + resourceReward);\n gaveResource=true;\n }\n }\n }", "private void endTurn() {\n currentTurn = getNextPlayer();\n }", "public void checkGameEndState() {\n\t\tfor(MapCharacter c : friendlyMissionCriticals) {\n\t\t\tif(!friendlies.contains(c))\n\t\t\t\tthrow new PlayerLosesException();\n\t\t}\n\t\tif(getEnemies().size() == 0)\n\t\t\tthrow new PlayerWinsException();\n\t}", "@Override\r\n\tpublic void endTurn() {\n\t\t\r\n\t}", "private void targetLostResponse(){\n\t\tswitch(state){\r\n\t\tcase(PURSUIT):\r\n\t\t\tstate=HUNTING;\r\n\t\t\tTile[] targetChoices=adjacentUnseenTiles(level(),targetTile);\r\n\t\t\tif(targetChoices[0]==null)\r\n\t\t\t\tstate=IDLE;\r\n\t\t\ttargetLostResponse();\r\n\t\t\tbreak;\r\n\t\tcase(HUNTING):\t//TODO: after reaching target tile, guess a new target tile, up to a point. (define what that point is) Eventually resume wandering.\r\n\t\t\tif(targetTile!=null){\r\n\t\t\t\tif(!targetTile.equalTo(monster.currentTile)){\r\n\t\t\t\t\tsaveMove();\r\n\t\t\t\t\tmonster.moveTowards(targetTile);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t//if(!monster.currentTile.equalTo(plannedPath[0]))\r\n\t\t\t\t\t//\tmonster.moveTowards(plannedPath[0]);\r\n\t\t\t\t\tstate=IDLE;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tstate=IDLE;\r\n\t\t\t\ttargetLostResponse();\r\n\t\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase(IDLE):\r\n\t\t\twander();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void endTurn() {\n\t\tturnEnd = false;\n\t\tmadeMove = false;\n\t\tcurrentPlayer.resetUndos();\n\t\tif (currentPlayer == player1) {\n\t\t\tcurrentPlayer = player2;\n\t\t} else {\n\t\t\tcurrentPlayer = player1;\n\t\t}\n\t\t//printBoard();\n\t\tSystem.out.println(\"It is now \" + currentPlayer.getName() + \"'s turn\");\n\t}", "public void undo() {\n target.setCombatState( oldState );\n }", "private void checkVictory()\n {\n if(throne.getEnemyHealth() <= 0)\n {\n System.out.println(\"Congrats! The land is now free from all chaos and destruction. You are now very rich and wealthy. Yay\");\n alive = false;\n }\n }", "private void subtractEnemyMissile() {\n this.enemyMissile -= 1;\n }", "private void enemyturn() {\n if (enemy.getHealth() == 0) { // check if the enemy is still alive\n enemy.setAlive(false);\n }\n\n if (enemy.getAlive()) { // if he is alive\n // time to fuck the players day up\n System.out.println(\"\");//formatting\n System.out.println(enemy.getName() + \" attacks you!\");\n\n // calculate the damage this enemy will do\n int differenceHit = enemy.getMaxHit() - enemy.getMinHit(); // difference will be 0-3. But plus 1 (as the result will ALWAYS be +1 in the randomizer so a \"0\" will not happen.\n int minimumDamage = randomize.getRandomDamage(differenceHit); // for example, will return 0-4 if the min and max hit was 4-7. Then do a -1. Making it a 0-3 chance.\n int damage = differenceHit + minimumDamage; // add the minimum damage, to random hit damage.\n\n // calculate the players armor\n damage = damage - player.getPlayerArmorRating();\n if (damage <= 0){\n System.out.println(\"... but you dont take any damage because of your armor!\");\n } else {\n\n System.out.println(\"You take \" + damage + \" damage!\");\n player.removeHealth(damage);\n }\n\n } else { // when ded\n System.out.println(\"The enemy has no chance to fight back. As your final blow killed the enemy.\");\n }\n }", "boolean end() {\r\n\t\tif (this.gameOver == true)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public void endOfTurn();", "@Override\n public void endGame(){\n gameOver = true;\n }", "void testDeath(){\n if(playerHP <= 0){\n isPlayerDead = true;\n scsw.goToScene(\"Death\");\n }\n}", "public static void endGameSequence()\n\t{\n\t\ttfBet.setEnabled(false);\n\t\tbtnPlay.setEnabled(false);\n\t\tbtnHit.setEnabled(false);\n\t\tbtnStay.setEnabled(false);\n\t\tbtnDouble.setEnabled(false);\n\t\tlblUpdate.setText(\"Game over! You are out of money!\");\n\t}", "@Override\n protected void end() {\n Robot.shooter.setShooterSpeed(0);\n Robot.elevator.elevatorUp(0);\n Robot.hopper.hopperOut(0);\n Robot.intake.enableIntake(0);\n\n\n }", "public void leave(Agent agent) throws RemoteException {\n\t\tObject obj = agents.get(agent.getName());\n\t\tPoint point = (Point) obj;\n\t\tif (agent.getRow() != point.x || agent.getColumn() != point.y) {\n\t\t\tSystem.out.println(\"Incompativeis!!!\");\n\t\t\treturn;\n\t\t}\n\t}", "private void checkDeath() {\n\t\tif (player.getLives() == 0) {\n shooty.setIv(new Image(\"/img/shipdeath.png\"));\n\t\t\tdie();\n\t\t}\n\t\t// another way to die: the blocks hit you\n\t\tif(btnList.get(0).getLayoutY() >= FATAL_BUTTON_DIST) {\n\t\t\tendGame.play();\n\t\t\tdie();\n\t\t}\n\t}", "public void nullEnemy(){\n enemy = null;\n nullEntity();\n }", "private void checkLoosePLayer(){\n if (hero.getHp()<=0){\n loose();\n }\n\n }", "public void actionPerformed(ActionEvent e)\n {\n if(jumpState != 2){\n //if the player is not jumping this if else statement will\n //change the character from leg out to leg in position\n if(jumpState == 1){\n //sets the image to have the leg in\n jumpState = 0;\n }\n else{\n //sets the image to have the leg out\n jumpState = 1;\n }\n\n }\n\n }", "public void stop() {\n enemyTimeline.stop();\n }", "public abstract void turnToDead(int x, int y);", "public void E1leaveRoom(Enemy2 x)\n\t{\n\t\toccupant = null;\n\t}", "public void endPhase(){\n if(this.actionPhase) {\n this.buyPhase = true;\n this.actionPhase = false;\n }else{\n endTurn();\n }\n }", "public boolean detectBound(){\n // super.detectBound();\n if(posY > height || posY < 0){\n Main.enemies.remove(this);\n return true;\n }\n return false;\n\n }", "public void checkState() {\r\n\t\tout.println(state);\r\n\t\tif(getEnergy() < 80 && getOthers() > 5) {\r\n\t\t\tstate = 1;\r\n\t\t\tturnLeft(getHeading() % 90);\r\n\t\t\tahead(moveAmount);\r\n\t\t}\r\n\t\telse if(getEnergy() < 80 && getOthers() < 5) {\r\n\t\t\tstate = 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tstate = 0;\r\n\t\t}\r\n\t\t\r\n\t}", "public void endTurnCurrent() {\n playerStatus.nActionsDone = 0;\n playerStatus.isActive = false;\n playerStatus.isFirstTurn = false;\n }", "public void goBackOneTurn() {\n //Roll back turn.\n int previousTurn = gm.getTurn().getTurnNumber() - 1;\n gm.getTurn().setTurnNumberProperty(previousTurn);\n\n // This should handle having multiple players on the board\n int nextPlayerIndex = gm.getTurn().getTurnNumber() % gm.getPlayers().size();\n gm.getTurn().setActivePlayer(gm.getPlayers().get(nextPlayerIndex));\n }", "public void interactWhenLeaving() {\r\n\t\t\r\n\t}", "public void reset() { \r\n myGameOver = false; \r\n myGamePaused = false; \r\n }", "public void endTurn() {\n if (getActiveColor() == Piece.COLOR.RED) {\n setActivePlayer(Piece.COLOR.WHITE);\n } else {\n setActivePlayer(Piece.COLOR.RED);\n }\n }", "public void gameOver() {\n \tint currentPosition=0;\n \twhile(lenght-1 > currentPosition) {\n \t\tif(this.xCoord==handler.getWorld().body.get(currentPosition).x && this.yCoord==handler.getWorld().body.get(currentPosition).y) {\n \t\t\tState.setState(handler.getGame().gameOverState);\n \t\t}\n \t\t\n \t\tcurrentPosition++;\n \t\t\n \t}\n }", "public Room back()\n {\n\n //Checks if the has player visited a room, excludes the starting room.\n if(!(visits.isEmpty())){\n\n // If the room currently in, is in the stack then remove it.\n if(currentRoom == visits.peek() && visits.size() !=1){\n visits.pop();\n currentRoom = visits.pop(); // Sets the player to move to the previous room.\n }\n else {\n currentRoom = visits.pop();\n }\n setUserLocation(currentRoom); // Sets the location of the player.\n moves++;\n printStatus(); // Displays the \n }\n else {\n System.out.println();\n System.out.println(\"Please choose a different command.\\nYou have travelled back to the start.\");\n }\n System.out.println();\n return currentRoom;\n }", "public void isShot() {\r\n\t\tlives -=1;\r\n\t\tif(isDead())\r\n\t\t{\r\n\t\t\tthis.erase();\r\n\t\t}\r\n\t}", "public void lifeLost() {\n\n\t\tif (invincipleTimer <= currentTickCount) {\n\t\t\tSystem.out.println(\"Life Lost!\");\n\n\t\t\thealth--;\n\t\t\tinvincipleTimer = currentTickCount + invicibleLength;\n\t\t}\n\t}", "public void deadPlayer() {\r\n\t\tthis.nbPlayer --;\r\n\t}", "private void handleLose(){\n\t ButtonType goBackBtn = new ButtonType(\"Go back to menu\");\n\t Alert alert = new Alert(Alert.AlertType.INFORMATION,\n \"You've lost the game, retry?\", ButtonType.YES, goBackBtn);\n\t alert.setTitle(\"Lost\");\n Optional<ButtonType> result = alert.showAndWait();\n if(!result.isPresent())\n return;\n if(result.get() == ButtonType.YES){\n Screen screen = new Screen(stage, \"Dungeon\", \"View/DungeonPlayScreen.fxml\");\n try {\n Map reloadedMap = Map.loadFromFile(new FileInputStream(\n \"map/\" + map.getMapName() + \".dungeon\"));\n screen.display(new DungeonPlayController(stage, reloadedMap));\n } catch (FileNotFoundException e){\n e.printStackTrace();\n }\n }\n if(result.get() == goBackBtn){\n handleModeScreenButton();\n }\n }", "private void loseLife() {\r\n\t\thitGraphic(player);\r\n\t\tif (hits ==1) {\r\n\t\t\tlifeBar.scale(.67, 1);\r\n\t\t\tlifeBar.setColor(Color.ORANGE);\r\n\t\t} else if (hits == 2) {\r\n\t\t\tlifeBar.scale(.5, 1);\r\n\t\t\tlifeBar.setColor(Color.RED);\r\n\t\t} else if (hits == 3) {\r\n\t\t\tremove(lifeBar);\r\n\t\t\tlifeBar = null;\r\n\t\t}\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n controller.gameOver();\n }", "public void killedByPlayer() {\r\n\t\tscreen.enemiesKilled++;\r\n\t\tMazeCrawler mc = screen.mazeHandler.mazeCrawler;\r\n\t\tint n = 2; //if enemy is large do movement n+1 times\r\n\t\tswitch (enemyType) {\r\n\t\tcase DOWN:\r\n\t\t\tmc.moveDown();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveDown();}\r\n\t\t\tbreak;\r\n\t\tcase LEFT:\r\n\t\t\tmc.moveLeft();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveLeft();}\r\n\t\t\tbreak;\r\n\t\tcase RIGHT:\r\n\t\t\tmc.moveRight();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveRight();}\r\n\t\t\tbreak;\r\n\t\tcase UP:\r\n\t\t\tmc.moveUp();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveUp();}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tscreen.enemyDeath.play(.5f);\r\n\t\tdestroy();\r\n\t}", "private void enemyEncounter()\n {\n currentEnemies = currentRoom.getEnemies();\n \n if(currentEnemies.size() > 0)\n {\n for(Enemy e : currentEnemies)\n {\n System.out.println(\"\\n\" + \"A \" + e.getName() + \" stares menacingly!\" + \"\\n\");\n enemyName = e.getName();\n \n }\n enemyPresent = true;\n clearExits();\n }\n else{\n setExits(); \n }\n }", "public void stop() {\n elevator1.set(0);\n elevator2.set(0); \n \n }", "public void endTurn() {\n\t\tif (whoseTurn == 0) {\n\t\t\twhoseTurn = 1;\n\t\t} else {\n\t\t\twhoseTurn = 0;\n\t\t}\n\t\thasMoved = false;\n\t\thasSelected = false;\n\t\tif (prevSelected != null) {\n\t\t\tprevSelected.doneCapturing();\n\t\t}\n\t\tprevSelected = null;\n\t\tprevSelectedX = 0;\n\t\tprevSelectedY = 0;\n\t}", "private boolean gameOver() {\r\n\t\treturn (lifeBar == null || mehran == null);\r\n\t}", "public void stop()\r\n\t{\r\n\t\tif (state == State.ENTERING) {\r\n\t\t\tsetSpeed(0);\r\n\t\t\tstate = State.STOPPED;\r\n\t\t\tsetSprite(\"pedestrians/\"+spriteName.substring(0,spriteName.indexOf(\"Walk1.gif\")) + \"Stop1.gif\");\r\n\t\t}\r\n\t}", "public void touchExit() \n {\n if (getOneIntersectingObject(Exit.class) != null)\n Level1.transitionToGameWinWorld(); \n }", "private void enemyAttack() {\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tint roll = rand.nextInt(101);\n\t\t\n\t\tint sroll = rand.nextInt(101);\n\t\t\n\t\tevents.appendText(e.getName() + \" attacks!\\n\");\n\t\t\n\t\tif(roll <= p.getEV()) { // Player evades\n\t\t\t\n\t\t\tevents.appendText(\"You evaded \"+e.getName()+\"\\'s Attack!\\n\");\n\t\t\t\n\t\t}else if(roll > p.getEV()) { // Player is hit and dies if HP is 0 or less\n\t\t\t\n\t\t\tp.setHP(p.getHP() - e.getDMG());\n\t\t\t\n\t\t\tString newHp = p.getHP()+\"/\"+p.getMaxHP();\n\t\t\t\n\t\t\tString effect = e.getSpecial(); // Stats are afflicted\n\t\t\t\n\t\t\tif(sroll < 51){\n\t\t\t\t\n\t\t\tif(effect == \"Bleed\") { // Bleed Special\n\t\t\t\t\n\t\t\t\tp.setHP(p.getHP() - 100);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You bleed profusely. - 100 HP\\n\");\n\t\t\t\t\n\t\t\t\tnewHp = String.valueOf(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t}\n\t\t\tif(effect == \"Break\") { // Break Special \n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You feel a bone break restricting movement. - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Fear\") { // Fear Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-40>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 40);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"A crippling fear rattles your resolve. - 40 DMG\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Rend\") { // Rend Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-30>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 30);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"Morthar unleashes a pillar of flame! - 30 DMG and - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\tif(p.getHP() <= 0) {\n\t\t\t\t\n\t\t\t\tp.setDead(true);\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(0+\"/\"+e.getMaxHP());\n\t\t\t\tplayerHPBar.setProgress((double)0);\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(newHp);\n\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(p.isDead()) { // Game over if player dies\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoadGO();\n\t\t\t} catch (IOException e1) {\n\t\t\t\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tcombat = false;\n\t\t}\n\t}", "private void whichPlayerHasTurn() throws PlayerOutOfTurn {\n if (test.equals(lastPicked)) {\n throw (new PlayerOutOfTurn());\n }\n }", "public void resetPlayerPassed() {\n d_PlayerPassed = false;\n }", "public void prisonerUpdate(){\r\n\t\t//check if a enemy has been spotted\r\n\t\tif (checkSight()){\r\n\t\t\tseen = true;\r\n\t\t} if (seen) {\r\n\t\t\tcreature.setSpeed(1.5);\r\n\t\t\tchaseEnemy(seenEnemy, 5);\r\n\t\t\treturn; //if player has been spotted end method here\r\n\t\t}\r\n\t\t//if no enemy has been spotted\r\n\t\tcreature.setSpeed(1);\r\n\t\tcreature.setAttacking(false);\r\n\t\troamArea();\r\n\t\tif (!checkCollision(x, y)) {\r\n\t\tgoToLocation(x, y);\r\n\t\t}\r\n\t}", "public void endTurn(){\n game.setNextActivePlayer();\n myTurn = false;\n\n stb.updateData(\"playerManager\", game.getPlayerManager());\n stb.updateData(\"aktivePlayer\", game.getPlayerManager().getAktivePlayer());\n stb.updateData(\"roomList\", game.getRoomManager().getRoomList());\n\n getIntent().putExtra(\"GAME\",game);\n getIntent().putExtra(\"myTurn\", false);\n finish();\n if(!game.getPlayerManager().getPlayerList().get(whoAmI).isDead())\n startActivity(getIntent());\n else\n fcm.unbindListeners();\n }", "public void actionPerformed(ActionEvent e) {\n \t\t\t\tscreen.game.skip();\n \t\t\t}", "public boolean gameOver(){\n\t\treturn this.lives < 1;\n\t}", "public void restoreHealth()\r\n {\r\n health = maxHealth;\r\n \r\n say(\"Yay my health is now \" + maxHealth + \"!\");\r\n }", "private void breakSpecialState() {\n this.inSpecialState = false;\n this.resetXMovement();\n }", "public void back()\r\n\t{\r\n\t\tparentPanel.setState(GameState.Menu);\r\n parentPanel.initScene(GameState.Menu);\r\n\t\t\t\r\n\t}", "@Override\n\tpublic void action() {\n\t if (firingBall.getY() + firingBall.getRadius() < this.y) { \n\t //deactivate absorber locally and in GameBoard\n\t firingBall = null;\n\t gb.removeFromActiveList(this);\n\t }\n\t}", "public void doAi(){\n\t\t\tif(MathHelper.getRandom(0, Game.FRAMERATE * 5) == 5){\n\t\t\t\tsetScared(true);\n\t\t\t}\n\t\t\n\t\t//Update rectangle\n\t\tsetRectangle(getX(), getY(), getTexture().getWidth(), getTexture().getHeight());\n\t\t\n\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\n\t\tif(rect.intersects(getRectangle())){\n\t\t\t\n\t\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\t\t\n\t\t\t\t\tsetDestinationX(StateGame.player.getX());\n\t\t\t\t\t\n\t\t\t\t\tsetDestinationY(StateGame.player.getY());\n\t\t\t\t\t\n\t\t\t\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\t\t\treachedDestination = (true);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Check for collision with jelly\n\t\tint checkedJelly = (0);\n\t\twhile(checkedJelly < EntityJelly.JELLY.size() && EntityJelly.JELLY.get(checkedJelly) != null){\n\t\t\tif(EntityJelly.JELLY.get(checkedJelly).getDead() == false){\n\t\t\t\tif(getRectangle().intersects(EntityJelly.JELLY.get(checkedJelly).getRectangle())){\n\t\t\t\t\tsetHealth(getHealth() - 2);\n\t\t\t\t\tif(MathHelper.getRandom(1, 10) == 10){\n\t\t\t\t\tAnnouncer.addAnnouncement(\"-2\", 60, EntityJelly.JELLY.get(checkedJelly).getX(), EntityJelly.JELLY.get(checkedJelly).getY());\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tcheckedJelly++;\n\t\t}\n\t\t\n\t\t//If we're out of health, kill the entity\n\t\tif(getHealth() < 0){\n\t\t\tsetDead(true);\n\t\t}\n\t\t\n\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\tif(reachedDestination == true){\n\t\t\t\tif(getScared() == false){\n\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(getScared() == false){\n\t\t\t\tif(getX() < getDestinationX())\n\t\t\t\t\tsetX(getX() + getSpeed());\n\t\t\t\tif(getX() > getDestinationX())\n\t\t\t\t\tsetX(getX() - getSpeed());\n\t\t\t\tif(getY() < getDestinationY())\n\t\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\tif(getY() > getDestinationY())\n\t\t\t\t\tsetY(getY() - getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n \tpublic boolean leave(ArenaPlayer p) {\n \t\treturn true;\n \t}", "public boolean lose(){\n\t\tif(steps>limit)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "private void action() {\r\n moveSnake();\r\n if (hasEatenPowerUp() == false) checkForCollisionWithSelf();\r\n if (hasHitBoundry() == false) redraw();\r\n }", "public void endGame() {\n\t\t// If Avengers lose and Loki wins\n\t\tif (!avengersAlive()) {\n\t\t\tca_attack.setEnabled(false);\n\t\t\the_attack.setEnabled(false);\n\t\t\tbw_attack.setEnabled(false);\n\t\t\thulk_attack.setEnabled(false);\n\t\t\tthor_attack.setEnabled(false);\n\t\t\tloki_attack.setEnabled(false);\n\t\t\ttextArea.append(\"\\n G A M E O V E R \\n\");\n\t\t\ttextArea.append(\"Oh no! Avengers lost... Loki conquered earth...\");\n\t\t}\n\t\t\n\t\t// If Loki loses and Avengers win\n\t\telse if (!lokiAlive()) {\n\t\t\tca_attack.setEnabled(false);\n\t\t\the_attack.setEnabled(false);\n\t\t\tbw_attack.setEnabled(false);\n\t\t\thulk_attack.setEnabled(false);\n\t\t\tthor_attack.setEnabled(false);\n\t\t\tloki_attack.setEnabled(false);\n\t\t\ttextArea.append(\"\\n Y O U W O N \\n\");\n\t\t\ttextArea.append(\"Yay! Avengers saved the world from Loki! Nice work!\");\n\t\t}\n\t}", "public void waitingEnemy(){\t\t\n\t\tgetController().changeFree(false);\n\t\tdisplayAdvertisement(\"waiting enemy\");\n\t\tadvertisementPanel.cancelRequestSetVisible(true);\n\t\tvalidate();\n\t}", "public void attackOrQuit(){\n gameState = GameState.ATTACKORQUIT;\n notifyObservers();\n }", "public void reviveHero(Room target)\r\n {\r\n System.out.println(\"Do you want to play again?\");\r\n if (Game.askBoolean())\r\n {\r\n health = maxHealth;\r\n getStatus();\r\n System.out.println();\r\n changeRoom(target);\r\n System.out.println(room.longDescription());\r\n }\r\n else\r\n {\r\n System.out.println(\"Thanks for playing!\");\r\n System.exit(0);\r\n }\r\n }", "public boolean gameEnd(){\n\t\treturn(\tturn >= 50 || evaluateState()==true );\r\n\t}", "public void lose() {\n displayErrorMessage(\"You Lose!\");\n if(controller.aiGame && !controller.loggedIn()){\n controller.switchToLogin();\n } else\n controller.switchToLobby();\n }", "@Override\n\tpublic MoveState transitionAway() {\n\t\treturn this;\n\n\t}", "public void gameOver(int type) {\n \tthis.winner = state;\n \tif( type == -1 )\n \t\tthis.winner = 0;\n \tthis.state = 0;\n }" ]
[ "0.6439438", "0.6221652", "0.61587083", "0.6143459", "0.612515", "0.611534", "0.6115296", "0.6092968", "0.60900694", "0.603871", "0.6004857", "0.5975717", "0.5974246", "0.59327364", "0.5922594", "0.5916707", "0.59125453", "0.5907317", "0.58858067", "0.5882682", "0.58607394", "0.58454", "0.584213", "0.5829682", "0.5825906", "0.58158416", "0.5815067", "0.58081913", "0.58039534", "0.57914424", "0.5778953", "0.57787395", "0.57746494", "0.57722783", "0.5767385", "0.5762538", "0.57500035", "0.5731548", "0.5727738", "0.5711025", "0.57100165", "0.5709422", "0.5707267", "0.5707022", "0.570646", "0.5694609", "0.5692761", "0.56874263", "0.56871945", "0.5685323", "0.56806576", "0.5680158", "0.5679807", "0.56797713", "0.56765467", "0.56758505", "0.5670018", "0.5663357", "0.5662727", "0.5661124", "0.5659717", "0.56564355", "0.5655851", "0.56544656", "0.5651224", "0.5651027", "0.56331027", "0.56328565", "0.5630596", "0.5626782", "0.5625476", "0.56245315", "0.5621967", "0.56206864", "0.5618133", "0.56148624", "0.56144345", "0.56025106", "0.5600107", "0.5595736", "0.55937564", "0.5590571", "0.55889803", "0.55869484", "0.55850464", "0.5578856", "0.55733615", "0.55713606", "0.5568074", "0.5567675", "0.55636287", "0.55614895", "0.555596", "0.555588", "0.55528617", "0.5551792", "0.55486333", "0.5545978", "0.55437005", "0.55270743", "0.5526815" ]
0.0
-1
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPACES);\n }", "private String toIndentedString(Object o)\n/* */ {\n/* 128 */ if (o == null) {\n/* 129 */ return \"null\";\n/* */ }\n/* 131 */ return o.toString().replace(\"\\n\", \"\\n \");\n/* */ }", "private String toIndentedString( Object o )\n {\n if ( o == null )\n {\n return \"null\";\n }\n return o.toString().replace( \"\\n\", \"\\n \" );\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }" ]
[ "0.78847593", "0.75493765", "0.74971926", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168" ]
0.0
-1
Table cells are lazily created
private void addText(Context context,Global global,String text) { if(_currentTableRow!=null && _currentTableCell==null) { closeParagraph(context,global); _currentTableCell=new TableSection.Cell(); int width=_cellWidths.get(_currentTableRow.getCells().size()); _currentTableRow.getCells().add(_currentTableCell); _currentParagraphList=_currentTableCell.getContent(); _currentTableCell.setWidth(width/20.0); } if(_currentParagraph==null) newParagraph(context,global); if(_currentSection==null||!(_currentSection instanceof TextSection)) { _currentSection=new TextSection(); _currentParagraph.getSections().add(_currentSection); TextSection ts=(TextSection)_currentSection; ts.setStyle(context.getTextStyle().clone()); } TextSection ts=(TextSection)_currentSection; if(!ts.getStyle().equals(context.getTextStyle())) { _currentSection=new TextSection(); _currentParagraph.getSections().add(_currentSection); ts=(TextSection)_currentSection; ts.setStyle(context.getTextStyle().clone()); } int listId=context.getListId(); if(listId!=0) { int level=context.getLevel()+1; int id=global.getListOverrides().get(listId); NumberedList nl=global.getNumberedListWithPred(id,level); ParagraphStyle st=global.getLists().get(id).get(level-1); context.getParagraphStyle().setBulletStyle(st.getBulletStyle()); if(st.getBulletStyle()!=ParagraphStyle.BulletStyle.BULLET) { context.getParagraphStyle().setBulletTextStyle(context.getTextStyle()); context.getParagraphStyle().setBulletText(st.getBulletText()); } context.getParagraphStyle().setList(nl); } ts.setText(ts.getText()+text); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void initializeTableContents() {\n\t\t\r\n\t}", "@Override\n public void tableRows_()\n {\n }", "public TableRow() {\n\t\tthis.cells = new ArrayList<TableCell>();\n\t}", "public void prepareTable() {\n \tthis.table = new Tape(this.height,this.width,2,this.map);\n }", "public void initTable();", "public Table() {\n // <editor-fold desc=\"Initialize Cells\" defaultstate=\"collapsed\">\n for (int row = 0; row < 3; row++) {\n for (int column = 0; column < 3; column++) {\n if (cells[row][column] == null) {\n cells[row][column] = new Cell(row, column);\n }\n }\n }\n // </editor-fold>\n }", "void initTable();", "private void initTableView() {\n // nastaveni sloupcu pro zobrazeni spravne hodnoty a korektniho datoveho typu\n this.colId.setCellValueFactory(cellData -> cellData.getValue().getPersonalIdProperty());\n this.colName.setCellValueFactory(cellData -> cellData.getValue().getDisplayNameProperty());\n this.colAge.setCellValueFactory(cellData -> cellData.getValue().getAgeProperty().asObject());\n this.colGender.setCellValueFactory(cellData -> cellData.getValue().getGenderProperty());\n this.colPrice.setCellValueFactory(cellData -> cellData.getValue().getPriceProperty().asObject());\n\n // nastaveni listu prvku tabulce\n this.offerTable.setItems(this.marketplace.getOfferList());\n\n // listener pro zjisteni, ktery prvek tabulky uzivatel oznacil a naplneni aktualni reference na vybrane dite\n this.offerTable.getSelectionModel().getSelectedCells().addListener(new ListChangeListener<TablePosition>() {\n\n @Override\n public void onChanged(Change<? extends TablePosition> change) {\n ObservableList selectedCells = offerTable.getSelectionModel().getSelectedCells();\n TablePosition tablePosition = (TablePosition) selectedCells.get(0);\n currentChild = marketplace.getOfferList().get(tablePosition.getRow());\n System.out.println(currentChild);\n updateUi();\n }\n });\n }", "private void initDOM() {\n for (int rowIndex = 0; rowIndex < minefield.getRows(); rowIndex++) {\n Element tr = new Element(\"tr\");\n table.appendChild(tr);\n for (int colIndex = 0; colIndex < minefield.getCols(); colIndex++) {\n Element td = new Element(\"td\");\n\n final int thisRow = rowIndex;\n final int thisCol = colIndex;\n\n // Left click reveals cells\n td.addEventListener(\"click\", e -> cellClick(thisRow, thisCol));\n\n // Right-click/ctrl-click marks a mine\n // Here we abuse the event details feature which runs javascript\n // as part of the event handler, to prevent the default\n // behavior, i.e. showing the browser context menu\n td.addEventListener(\"contextmenu\",\n e -> markMine(thisRow, thisCol),\n \"event.preventDefault()\");\n tr.appendChild(td);\n }\n }\n }", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "public CellTable<Attribute> getTable() {\n\n\t\tretrieveData();\n\n\t\t// Table data provider.\n\t\tdataProvider = new ListDataProvider<Attribute>(list);\n\n\t\t// Cell table\n\t\ttable = new PerunTable<Attribute>(list);\n\n\t\t// Connect the table to the data provider.\n\t\tdataProvider.addDataDisplay(table);\n\n\t\t// Sorting\n\t\tListHandler<Attribute> columnSortHandler = new ListHandler<Attribute>(dataProvider.getList());\n\t\ttable.addColumnSortHandler(columnSortHandler);\n\n\t\t// set empty content & loader\n\t\ttable.setEmptyTableWidget(loaderImage);\n\n\t\t// checkbox column column\n\t\tif (checkable) {\n\t\t\t// table selection\n\t\t\ttable.setSelectionModel(selectionModel, DefaultSelectionEventManager.<Attribute> createCheckboxManager(0));\n\t\t\ttable.addCheckBoxColumn();\n\t\t}\n\n\t\t// Create ID column.\n\t\ttable.addIdColumn(\"Attr ID\", null, 90);\n\n\t\t// Name column\n\t\tColumn<Attribute, Attribute> nameColumn = JsonUtils.addColumn(new PerunAttributeNameCell());\n\n\t\t// Description column\n\t\tColumn<Attribute, Attribute> descriptionColumn = JsonUtils.addColumn(new PerunAttributeDescriptionCell());\n\n\t\t// Value column\n\t\tColumn<Attribute, Attribute> valueColumn = JsonUtils.addColumn(new PerunAttributeValueCell());\n\t\tvalueColumn.setFieldUpdater(new FieldUpdater<Attribute, Attribute>() {\n\t\t\tpublic void update(int index, Attribute object, Attribute value) {\n\t\t\t\tobject = value;\n\t\t\t\tselectionModel.setSelected(object, object.isAttributeValid());\n\t\t\t}\n\t\t});\n\n\t\t// updates the columns size\n\t\tthis.table.setColumnWidth(nameColumn, 200.0, Unit.PX);\n\n\t\t// Sorting name column\n\t\tnameColumn.setSortable(true);\n\t\tcolumnSortHandler.setComparator(nameColumn, new AttributeComparator<Attribute>(AttributeComparator.Column.TRANSLATED_NAME));\n\n\t\t// Sorting description column\n\t\tdescriptionColumn.setSortable(true);\n\t\tcolumnSortHandler.setComparator(descriptionColumn, new AttributeComparator<Attribute>(AttributeComparator.Column.TRANSLATED_DESCRIPTION));\n\n\t\t// Add sorting\n\t\tthis.table.addColumnSortHandler(columnSortHandler);\n\n\t\t// Add the columns.\n\t\tthis.table.addColumn(nameColumn, \"Name\");\n\t\tthis.table.addColumn(valueColumn, \"Value\");\n\t\tthis.table.addColumn(descriptionColumn, \"Description\");\n\n\t\treturn table;\n\n\t}", "protected void populateDynamicCells(int resultsRow) {\n }", "public abstract void buildTable(PdfPTable table);", "protected abstract void initialiseTable();", "public TempTable() {\r\n\t\t\tsuper();\r\n\t\t\tthis.clauses = new ArrayList<TempTableHeaderCell>();\r\n\t\t}", "public void fillTable() {\n\t\tif (scroll.getWidth() == 0) {\n\t\t\treturn;\n\t\t}\n\t\tboolean showedNew = false;\n\t\tArrayList<Placeable> currentView = new ArrayList<Placeable>();\n\t\tif (viewing == ViewingMode.MATERIAL) {\n\t\t\tif (loadedMats == null)\n\t\t\t\tloadedMats = repo.getAllMats();\n\t\t\tfor (NamedMaterial m: loadedMats) {\n\t\t\t\tcurrentView.add(m);\n\t\t\t}\n\t\t}\n\t\telse if (viewing == ViewingMode.PIECE){\n\t\t\tif (loadedPieces == null)\n\t\t\t\tloadedPieces = repo.getAllPieces();\n\t\t\tfor (Piece m: loadedPieces) {\n\t\t\t\tcurrentView.add(m);\n\t\t\t}\n\t\t\tshowedNew = true;\n\t\t}\n\t\t\n\t\ttiles.clearChildren();\n\t\tfloat cellWidth = 64.0f;\n\t\tint numAcross = (int)(scroll.getWidth() / cellWidth);\n\t\tif (numAcross <= 0) {\n\t\t\tnumAcross = 1;\n\t\t}\n\t\tint count = 0;\n\t\tActor tile;\n\t\twhile (count < currentView.size()) {\n\t\t\tfor (int y = 0; y < numAcross; y++) {\n\t\t\t\tif (!showedNew) {\n\t\t\t\t\ttile = new Label(\"New\", TextureOrganizer.getSkin());\n\t\t\t\t\t((Label)tile).setAlignment(Align.center);\n\t\t\t\t\ttile.addListener(new ClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t public void clicked(InputEvent event, float x, float y) {\n\t\t\t\t\t\t\tmakeNew();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tshowedNew = true;\n\t\t\t\t}\n\t\t\t\telse if (count >= currentView.size()) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttile = new ColoredRectActor(currentView.get(count++));\n\t\t\t\t\ttile.addListener(new TileListener((ColoredRectActor)tile));\n\t\t\t\t}\n\t\t\t\ttiles.add(tile).width(cellWidth).height(cellWidth).fill();\n\t\t\t}\n\t\t\tif (count < currentView.size())\n\t\t\t\ttiles.row();\n\t\t}\n\t}", "private void createTable() {\n table = new Table();\n table.bottom();\n table.setFillParent(true);\n }", "public void loadingTable() {\n this.setRowCount(1, true);\r\n this.setVisibleRangeAndClearData(this.getVisibleRange(), true);\r\n }", "private void fillTable() {\n\n table.row();\n table.add();//.pad()\n table.row();\n for (int i = 1; i <= game.getNum_scores(); i++) {\n scoreRank = new Label(String.format(\"%01d: \", i), new Label.LabelStyle(fonts.getInstance().getClouds(), Color.WHITE));\n scoreValue = new Label(String.format(\"%06d\", game.getScores().get(i-1)), new Label.LabelStyle(fonts.getInstance().getRancho(), Color.WHITE));\n table.add(scoreRank).expandX().right();\n table.add(scoreValue).expandX().left();\n table.row();\n }\n\n }", "private void setTable(){\r\n\t\tfor(int i=0;i<100;++i)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<100;++j)\r\n\t\t\t{\r\n\t\t\t\tif(game.checkCell(i,j)==true)\r\n\t\t\t\t{\r\n\t\t\t\t\tmap[i][j].setBackground(Color.black);\r\n\t\t\t\t\tmap[i][j].setBounds(j*5,i*5, 5, 5);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tmap[i][j].setBackground(Color.blue);\r\n\t\t\t\t\tmap[i][j].setBounds(j*5,i*5, 5, 5);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public HtmlTableCell(){\n\n }", "@Override\n public void initialiseUiCells() {\n }", "private void createPendingCellData()\r\n\t{\r\n\r\n\t\tObject[][] cell = new Object[plans.size()][columnCount];\r\n\t\tAbstractPlan plan = null;\r\n\r\n\t\t//now for each thread populate the table\r\n\t\tfor(int i = 0; i < plans.size(); i++)\r\n\t\t{\r\n\t\t\tbyte[] by = new byte[3];\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tplan = (AbstractPlan) plans.get(i);\r\n\t\t\t}catch(ClassCastException e)\r\n\t\t\t{\r\n\t\t\t\tlogger.error(\"createPendingCellData - attempt to put non AbstPlan objects in thread-model failed\");\r\n\t\t\t}\r\n\t\t\tObject[] rowCell = cell[i];\r\n\t\t\t//now populate each column\r\n\t\t\trowCell[0] = plan.getPlanName();\r\n\t\t\tBoolean sampling = plan.getBayesNet() == null ? new Boolean(false) : new Boolean(plan.getBayesNet().isSampling());\r\n\t\t\trowCell[1] = sampling;\r\n\t\t\tBoolean paused = plan.getBayesNet() == null ? new Boolean(false) : new Boolean(plan.getBayesNet().isSamplerPaused());\r\n\t\t\trowCell[2] = paused;\r\n\t\t\trowCell[3] = new Boolean(false);\r\n\r\n\t\t}\r\n\t\t//make sure concurrency is safe\r\n\t\tsynchronized(dataLock)\r\n\t\t{\r\n\t\t\tpendingCellData = cell;\r\n\t\t}\r\n\t}", "private void createTableBill(){\r\n //Se crean y definen las columnas de la Tabla\r\n TableColumn col_orden = new TableColumn(\"#\"); \r\n TableColumn col_city = new TableColumn(\"Ciudad\");\r\n TableColumn col_codigo = new TableColumn(\"Código\"); \r\n TableColumn col_cliente = new TableColumn(\"Cliente\"); \r\n TableColumn col_fac_nc = new TableColumn(\"FAC./NC.\"); \r\n TableColumn col_fecha = new TableColumn(\"Fecha\");\r\n TableColumn col_monto = new TableColumn(\"Monto\"); \r\n TableColumn col_anulada = new TableColumn(\"A\");\r\n \r\n //Se establece el ancho de cada columna\r\n this.objectWidth(col_orden , 25, 25); \r\n this.objectWidth(col_city , 90, 150); \r\n this.objectWidth(col_codigo , 86, 86); \r\n this.objectWidth(col_cliente , 165, 300); \r\n this.objectWidth(col_fac_nc , 70, 78); \r\n this.objectWidth(col_fecha , 68, 68); \r\n this.objectWidth(col_monto , 73, 73); \r\n this.objectWidth(col_anulada , 18, 18);\r\n\r\n col_fac_nc.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguip_det, String>() {\r\n @Override\r\n public void updateItem(String item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n ret = getItem().toString();\r\n if (ret.equals(\"0\"))\r\n ret = \"\";\r\n } else {\r\n ret = \"\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n col_fecha.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguip_det, Date>() {\r\n @Override\r\n public void updateItem(Date item, boolean empty) {\r\n super.updateItem(item, empty);\r\n if(!empty){\r\n setText(item.toLocalDate().toString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n else\r\n setText(null);\r\n }\r\n };\r\n }\r\n }); \r\n\r\n col_monto.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguid, Double>() {\r\n @Override\r\n public void updateItem(Double item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER_RIGHT);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n String gi = getItem().toString();\r\n NumberFormat df = DecimalFormat.getInstance();\r\n df.setMinimumFractionDigits(2);\r\n df.setRoundingMode(RoundingMode.DOWN);\r\n\r\n ret = df.format(Double.parseDouble(gi));\r\n } else {\r\n ret = \"0,00\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n col_anulada.setCellFactory(new Callback<TableColumn, TableCell>() {\r\n @Override\r\n public TableCell call(TableColumn param) {\r\n return new TableCell<Fxp_Archguid, Integer>() {\r\n @Override\r\n public void updateItem(Integer item, boolean empty) {\r\n super.updateItem(item, empty);\r\n setText(empty ? null : getString());\r\n setAlignment(Pos.CENTER);\r\n }\r\n\r\n private String getString() {\r\n String ret = \"\";\r\n if (getItem() != null) {\r\n ret = getItem().toString();\r\n if (ret.equals(\"0\"))\r\n ret = \"\";\r\n\r\n setTextFill(isSelected() ? Color.WHITE :\r\n ret.equals(\"0\") ? Color.BLACK :\r\n ret.equals(\"1\") ? Color.RED : Color.GREEN);\r\n } else {\r\n ret = \"\";\r\n }\r\n return ret;\r\n } \r\n };\r\n }\r\n }); \r\n\r\n //Se define la columna de la tabla con el nombre del atributo del objeto USUARIO correspondiente\r\n col_orden.setCellValueFactory( \r\n new PropertyValueFactory<>(\"orden\") );\r\n col_city.setCellValueFactory( \r\n new PropertyValueFactory<>(\"ciudad\") );\r\n col_codigo.setCellValueFactory( \r\n new PropertyValueFactory<>(\"codigo\") );\r\n col_cliente.setCellValueFactory( \r\n new PropertyValueFactory<>(\"cliente\") );\r\n col_fac_nc.setCellValueFactory( \r\n new PropertyValueFactory<>(\"numdocs\") );\r\n col_fecha.setCellValueFactory( \r\n new PropertyValueFactory<>(\"fecdoc\") );\r\n col_monto.setCellValueFactory( \r\n new PropertyValueFactory<>(\"monto\") );\r\n col_anulada.setCellValueFactory( \r\n new PropertyValueFactory<>(\"anulada\") );\r\n \r\n //Se Asigna ordenadamente las columnas de la tabla\r\n tb_factura.getColumns().addAll(\r\n col_orden, col_city, col_codigo, col_cliente, col_fac_nc, col_fecha, \r\n col_monto, col_anulada \r\n ); \r\n \r\n //Se Asigna menu contextual \r\n tb_factura.setRowFactory((TableView<Fxp_Archguid> tableView) -> {\r\n final TableRow<Fxp_Archguid> row = new TableRow<>();\r\n final ContextMenu contextMenu = new ContextMenu();\r\n final MenuItem removeMenuItem = new MenuItem(\"Anular Factura\");\r\n removeMenuItem.setOnAction((ActionEvent event) -> {\r\n switch (tipoOperacion){\r\n case 1:\r\n tb_factura.getItems().remove(tb_factura.getSelectionModel().getSelectedIndex());\r\n break;\r\n case 2:\r\n tb_factura.getItems().get(tb_factura.getSelectionModel().getSelectedIndex()).setAnulada(1);\r\n col_anulada.setVisible(false);\r\n col_anulada.setVisible(true);\r\n break;\r\n }\r\n });\r\n contextMenu.getItems().add(removeMenuItem);\r\n // Set context menu on row, but use a binding to make it only show for non-empty rows:\r\n row.contextMenuProperty().bind(\r\n Bindings.when(row.emptyProperty())\r\n .then((ContextMenu)null)\r\n .otherwise(contextMenu)\r\n );\r\n return row ; \r\n });\r\n \r\n //Se define el comportamiento de las teclas ARRIBA y ABAJO en la tabla\r\n EventHandler eh = new EventHandler<KeyEvent>(){\r\n @Override\r\n public void handle(KeyEvent ke){\r\n //Si fue presionado la tecla ARRIBA o ABAJO\r\n if (ke.getCode().equals(KeyCode.UP) || ke.getCode().equals(KeyCode.DOWN)){ \r\n //Selecciona la FILA enfocada\r\n selectedRowInvoice();\r\n }\r\n }\r\n };\r\n //Se Asigna el comportamiento para que se ejecute cuando se suelta una tecla\r\n tb_factura.setOnKeyReleased(eh); \r\n }", "@Override\n @Source({CellTable.Style.DEFAULT_CSS, \"../exercise/ScoresCellTableStyleSheet.css\"})\n TableResources.TableStyle cellTableStyle();", "private void generateTableC_AndTable_D(){\n\n // just seeing some header cell width\n for(int x=0; x<this.headerCellsWidth.size(); x++){\n Log.v(\"TableMainLayout.java\", this.headerCellsWidth.get(x)+\"\");\n }\n\n for(DataObject dataObject : this.dataObjects){\n\n TableRow tableRowForTableC = this.tableRowForTableC(dataObject);\n TableRow tableRowForTableD = this.taleRowForTableD(dataObject);\n\n this.tableC.addView(tableRowForTableC);\n this.tableD.addView(tableRowForTableD);\n\n }\n }", "@Override \r\n public void setUI(TableUI ui) \r\n {\n super.setUI(new BasicTableUI(){ \r\n public void paint(Graphics g, JComponent c) { \r\n Rectangle r=g.getClipBounds(); \r\n int firstRow=table.rowAtPoint(new Point(0,r.y)); \r\n int lastRow=table.rowAtPoint(new Point(0,r.y+r.height)); \r\n // -1 is a flag that the ending point is outside the table \r\n if (lastRow<0) \r\n lastRow=table.getRowCount()-1; \r\n for (int i=firstRow; i<=lastRow; i++) \r\n paintRow(i,g); \r\n } \r\n private void paintRow(int row, Graphics g) \r\n { \r\n Rectangle r=g.getClipBounds(); \r\n for (int i=0; i<table.getColumnCount();i++) \r\n { \r\n Rectangle r1=table.getCellRect(row,i,true); \r\n if (r1.intersects(r)) // at least a part is visible \r\n { \r\n int sk=i;//((CTable)table).map.visibleCell(red,i); \r\n paintCell(row,sk,g,r1); \r\n // increment the column counter \r\n //i+=((CTable)table).map.span(row,sk)-1; \r\n //i++; \r\n } \r\n } \r\n } \r\n private void paintCell(int row, int column, Graphics g,Rectangle area) \r\n { \r\n int verticalMargin = table.getRowMargin(); \r\n int horizontalMargin = table.getColumnModel().getColumnMargin(); \r\n \r\n Color c = g.getColor(); \r\n g.setColor(table.getGridColor()); \r\n g.drawRect(area.x,area.y,area.width-1,area.height-1); \r\n g.setColor(c); \r\n \r\n area.setBounds(area.x + horizontalMargin/2, \r\n area.y + verticalMargin/2, \r\n area.width - horizontalMargin, \r\n area.height - verticalMargin); \r\n \r\n if (table.isEditing() && table.getEditingRow()==row && \r\n table.getEditingColumn()==column) \r\n { \r\n Component component = table.getEditorComponent(); \r\n component.setBounds(area); \r\n component.validate(); \r\n } \r\n else \r\n { \r\n TableCellRenderer renderer = table.getCellRenderer(row, column); \r\n Component component = table.prepareRenderer(renderer, row, column); \r\n if (component.getParent() == null) \r\n rendererPane.add(component); \r\n rendererPane.paintComponent(g, component, table, area.x, area.y, \r\n area.width, area.height, true); \r\n } \r\n } \r\n }); \r\n }", "public CMARichTableCell() {\n super(\"table-cell\");\n }", "@Override\n public Iterator<Iterable<T>> iterator() {\n return new TableIterator();\n }", "public TableImpl() { columns = new Column[0]; }", "@Override\n\tpublic void createCellStructure() {\n\t\t\n\t}", "protected PagingScrollTable<PropertiesDTO> createScrollTable() {\n\t\tcachedTableModel = createCachedTableModel(tableModel);\r\n\r\n\t\t// create the table definition\r\n\t\tTableDefinition<PropertiesDTO> tableDef = createTableDefinition();\r\n\r\n\t\t// create the paging scroll table\r\n\t\tPagingScrollTable<PropertiesDTO> pagingScrollTable = new PagingScrollTable<PropertiesDTO>(cachedTableModel,\r\n\t\t\t\ttableDef);\r\n\t\tpagingScrollTable.setPageSize(getPageSize());\r\n\t\tpagingScrollTable.setEmptyTableWidget(new HTML(PropertyOptions.NO_SEARCH_RESULTS_STR));\r\n\t\tpagingScrollTable.getDataTable().setSelectionPolicy(SelectionPolicy.ONE_ROW);\r\n\r\n\t\t// setup the bulk renderer\r\n\t\tFixedWidthGridBulkRenderer<PropertiesDTO> bulkRenderer = new FixedWidthGridBulkRenderer<PropertiesDTO>(\r\n\t\t\t\tpagingScrollTable.getDataTable(), pagingScrollTable);\r\n\t\tpagingScrollTable.setBulkRenderer(bulkRenderer);\r\n\r\n\t\t// setup the formatting\r\n\t\tpagingScrollTable.setCellPadding(3);\r\n\t\tpagingScrollTable.setCellSpacing(0);\r\n\t\tpagingScrollTable.setResizePolicy(ScrollTable.ResizePolicy.FILL_WIDTH);\r\n\r\n\t\tpagingScrollTable.setSortPolicy(SortPolicy.SINGLE_CELL);\r\n\t\tpagingScrollTable.setScrollPolicy(ScrollPolicy.DISABLED);\r\n\t\treturn pagingScrollTable;\r\n\t}", "protected void fillTable() {\r\n\t\ttabDate.setCellValueFactory(new PropertyValueFactory<TableRowAllTransactions, String>(\"transactionDate\"));\r\n\t\ttabSenderNumber.setCellValueFactory(new PropertyValueFactory<TableRowAllTransactions, String>(\"senderNumber\"));\r\n\t\ttabReceiverNumber\r\n\t\t\t\t.setCellValueFactory(new PropertyValueFactory<TableRowAllTransactions, String>(\"receiverNumber\"));\r\n\t\ttabAmount.setCellValueFactory(new PropertyValueFactory<TableRowAllTransactions, BigDecimal>(\"amount\"));\r\n\t\ttabReference.setCellValueFactory(new PropertyValueFactory<TableRowAllTransactions, String>(\"reference\"));\r\n\r\n\t\tList<TableRowAllTransactions> tableRows = new ArrayList<TableRowAllTransactions>();\r\n\r\n\t\tfor (Transaction transaction : transactionList) {\r\n\t\t\tTableRowAllTransactions tableRow = new TableRowAllTransactions();\r\n\t\t\ttableRow.setTransactionDate(\r\n\t\t\t\t\tnew SimpleDateFormat(\"dd.MM.yyyy HH:mm:ss\").format(transaction.getTransactionDate()));\r\n\t\t\ttableRow.setSenderNumber(transaction.getSender().getNumber());\r\n\t\t\ttableRow.setReceiverNumber(transaction.getReceiver().getNumber());\r\n\t\t\ttableRow.setAmount(transaction.getAmount());\r\n\t\t\ttableRow.setReferenceString(transaction.getReference());\r\n\t\t\ttableRows.add(tableRow);\r\n\r\n\t\t}\r\n\r\n\t\tObservableList<TableRowAllTransactions> data = FXCollections.observableList(tableRows);\r\n\t\ttabTransaction.setItems(data);\r\n\t}", "private void createTableArea() {\n\t\tthis.tableModel = new MessagesTableModel();\n\t\tthis.conversation = new JTable(this.tableModel);\n\t\tthis.conversation.setRowSelectionAllowed(false);\n\t\tthis.conversation.getColumn(\"Pseudo\").setMaxWidth(150);\n\t\tthis.conversation.getColumn(\"Message\").setWidth(200);\n\t\tthis.conversation.getColumn(\"Heure\").setMaxWidth(50);\n\t\tthis.conversation.getColumn(\"Message\").setCellRenderer(new WrapTableCellRenderer());\n\t\tthis.conversation.getColumn(\"Pseudo\").setCellRenderer(new ColorTableCellRenderer());\n\t\tthis.scrollPane = new JScrollPane(conversation);\n\t}", "private void buildTables(){\r\n\t\tarticleTable.setWidth(50, Unit.PERCENTAGE);\r\n\t\tarticleTable.setPageLength(5);\r\n\t\tlabel = new Label(\"No article found\");\r\n\t\tlabel2 = new Label(\"No image found\");\r\n\t\timageTable.setWidth(50, Unit.PERCENTAGE);\r\n\t\timageTable.setPageLength(5);\r\n\t}", "Rows createRows();", "private void initTable() {\n\t\tDefaultTableModel dtm = (DefaultTableModel)table.getModel();\n\t\tdtm.setRowCount(0);\t\t\n\t\tfor(int i=0;i<MainUi.controller.sale.items.size();i++){\n\t\t\tVector v1 = new Vector();\n\t\t\tv1.add(MainUi.controller.sale.items.get(i).getProdSpec().getTitle());\n\t\t\tv1.add(MainUi.controller.sale.items.get(i).getCopies());\n\t\t\tdtm.addRow(v1);\n\t\t}\n\t\tlblNewLabel.setText(\"\"+MainUi.controller.sale.getTotal());\n\t}", "public void initTable() {\n this.table.setSelectable(true);\n this.table.setImmediate(true);\n this.table.setWidth(\"100%\");\n this.table.addListener(this);\n this.table.setDropHandler(this);\n this.table.addActionHandler(this);\n this.table.setDragMode(TableDragMode.ROW);\n this.table.setSizeFull();\n\n this.table.setColumnCollapsingAllowed(true);\n // table.setColumnReorderingAllowed(true);\n\n // BReiten definieren\n this.table.setColumnExpandRatio(LABEL_ICON, 1);\n this.table.setColumnExpandRatio(LABEL_DATEINAME, 3);\n this.table.setColumnExpandRatio(LABEL_DATUM, 2);\n this.table.setColumnExpandRatio(LABEL_GROESSE, 1);\n this.table.setColumnExpandRatio(LABEL_ACCESS_MODES, 1);\n this.table.setColumnHeader(LABEL_ICON, \"\");\n }", "private EstabelecimentoTable() {\n\t\t\t}", "private void repopulateTableForAdd()\n {\n clearTable();\n populateTable(null);\n }", "@Override\n public final void start(boolean isRebuildingAllRows) {\n /*\n * TODO(jlabanca): Test with DomBuilder.\n * \n * DOM manipulation is sometimes faster than String concatenation and\n * innerHTML, but not when mixing the two. Cells render as HTML strings,\n * so its faster to render the entire table as a string.\n */\n tbody = HtmlBuilderFactory.get().createTBodyBuilder();\n if (isRebuildingAllRows) {\n cellToIdMap.clear();\n idToCellMap.clear();\n }\n }", "Table getTable();", "private void paintTable()\r\n\t{\r\n\t\tfor(int i=0;i<100;++i)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<100;++j)\r\n\t\t\t{\r\n\t\t\t\tif(game.checkCell(i,j)==true)\r\n\t\t\t\t{\r\n\t\t\t\t\tmap[i][j].setBackground(Color.black);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tmap[i][j].setBackground(Color.blue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n protected void initResultTable() {\n }", "public void prepareTable(){\n\n TableColumn<Student, String> firstNameCol = new TableColumn<>(\"FirstName\");\n firstNameCol.setMinWidth(100);\n firstNameCol.setCellValueFactory(new PropertyValueFactory<>(\"firstname\"));\n\n TableColumn<Student, String> lastNameCol = new TableColumn<>(\"LastName\");\n lastNameCol.setMinWidth(100);\n lastNameCol.setCellValueFactory(new PropertyValueFactory<>(\"lastname\"));\n\n TableColumn<Student, String> formCol = new TableColumn<>(\"Form\");\n formCol.setMinWidth(100);\n formCol.setCellValueFactory(new PropertyValueFactory<>(\"form\"));\n\n TableColumn<Student, String> streamCol = new TableColumn<>(\"Stream\");\n streamCol.setMinWidth(100);\n streamCol.setCellValueFactory(new PropertyValueFactory<>(\"stream\"));\n\n TableColumn<Student, String> dateOfBirthCol = new TableColumn<>(\"Favorite Game\");\n dateOfBirthCol.setMinWidth(100);\n dateOfBirthCol.setCellValueFactory(new PropertyValueFactory<>(\"dateOfBirth\"));\n\n TableColumn<Student, String> genderCol = new TableColumn<>(\"Gender\");\n genderCol.setMinWidth(100);\n genderCol.setCellValueFactory(new PropertyValueFactory<>(\"gender\"));\n\n TableColumn<Student, Integer> ageCol = new TableColumn<>(\"age\");\n ageCol.setMinWidth(100);\n ageCol.setCellValueFactory(new PropertyValueFactory<>(\"age\"));\n\n TableColumn<Student, Integer> admissionCol = new TableColumn<>(\"Admission\");\n admissionCol.setMinWidth(100);\n admissionCol.setCellValueFactory(new PropertyValueFactory<>(\"admission\"));\n\n\n table.getColumns().addAll(admissionCol,firstNameCol,lastNameCol,formCol,streamCol,dateOfBirthCol,genderCol,ageCol);\n table.setItems(dao.selectAll());\n\n }", "public TableEx() {\r\n setStyleName(\"gwtEx-Table\");\r\n rf = getRowFormatter();\r\n this.addClickHandler(tableClickTable);\r\n }", "private void preencherTabela() {\n\t\tList<Cidade> listCidade;\n\t\tCidadeDAO cidadeDAO;\n\t\tObservableList<Cidade> oListCidade;\n\n\t\t// Determina os atributos que irão preencher as colunas\n\t\tcolCidade.setCellValueFactory(new PropertyValueFactory<>(\"nomeCidades\"));\n\t\tcolEstado.setCellValueFactory(new PropertyValueFactory<>(\"nomeEstado\"));\n\t\tcolSigla.setCellValueFactory(new PropertyValueFactory<>(\"siglaEstado\"));\n\t\tcolCodigoCidade.setCellValueFactory(new PropertyValueFactory<>(\"idCidade\"));\n\t\tcolIdEstado.setCellValueFactory(new PropertyValueFactory<>(\"idEstado\"));\n\n\t\t// Instancia a lista de cidades e a DAO\n\t\tlistCidade = new ArrayList<Cidade>();\n\t\tcidadeDAO = new CidadeDAO();\n\n\t\t// Chama o metodo para selecionar todas as cidades e atribuir a lista\n\t\tlistCidade = cidadeDAO.selecionar();\n\n\t\t// Converte a lista de cidades em observablearray\n\t\toListCidade = FXCollections.observableArrayList(listCidade);\n\n\t\t// Adiciona a lista na tabela\n\t\ttblCidades.setItems(oListCidade);\n\t}", "public static void buildTable() {\r\n\t\t//This method keeps the user from editing the table\r\n\t\ttableModel = new DefaultTableModel() {\r\n\t\t\tprivate static final long serialVersionUID = 1L;\r\n\t\t\t@Override\r\n\t\t\tpublic boolean isCellEditable(int row, int column) {\r\n\t\t\t\t//All cells false\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\ttableModel.setNumRows(dblogic.getSize());\r\n\t\ttableModel.setColumnCount(COL_COUNT);\r\n\t\ttableModel.setColumnIdentifiers(columnNames);\r\n\t\ttable.setRowSelectionAllowed(true);\r\n\t\ttable.setColumnSelectionAllowed(false);\r\n\t\ttable.setDragEnabled(false);\r\n\t\ttable.getTableHeader().setReorderingAllowed(false);\r\n\t\ttable.setModel(tableModel);\r\n\r\n\t\t//Build rows\r\n\t\tfor (int i = 0; i < dblogic.getSize(); i++) {\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getLastName(), i, COL_LAST);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getFirstName(), i, COL_FIRST);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getPatronEmail(), i, COL_EMAIL);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getDOB(), i, COL_BIRTH);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getPatronSinceString(), i, COL_ADDED);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getAnniv().toString(), i, COL_ANNIV);\r\n\t\t}\r\n\t}", "public EditingTable() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "private void reTable() {\n\t\tObservableList<Shape> circles = m.drawDataProperty();\n\t\ttv.setItems(circles);\t\t\n\t}", "private void initializeTable()\n {\n mTable = new ListView(mData);\n mTable.setPrefSize(200, 250);\n mTable.setEditable(false);\n }", "private void setUpTable()\n {\n //Setting the outlook of the table\n bookTable.setColumnReorderingAllowed(true);\n bookTable.setColumnCollapsingAllowed(true);\n \n \n bookTable.setContainerDataSource(allBooksBean);\n \n \n //Setting up the table data row and column\n /*bookTable.addContainerProperty(\"id\", Integer.class, null);\n bookTable.addContainerProperty(\"book name\",String.class, null);\n bookTable.addContainerProperty(\"author name\", String.class, null);\n bookTable.addContainerProperty(\"description\", String.class, null);\n bookTable.addContainerProperty(\"book genres\", String.class, null);\n */\n //The initial values in the table \n db.connectDB();\n try{\n allBooks = db.getAllBooks();\n }catch(SQLException ex)\n {\n ex.printStackTrace();\n }\n db.closeDB();\n allBooksBean.addAll(allBooks);\n \n //Set Visible columns (show certain columnes)\n bookTable.setVisibleColumns(new Object[]{\"id\",\"bookName\", \"authorName\", \"description\" ,\"bookGenreString\"});\n \n //Set height and width\n bookTable.setHeight(\"370px\");\n bookTable.setWidth(\"1000px\");\n \n //Allow the data in the table to be selected\n bookTable.setSelectable(true);\n \n //Save the selected row by saving the change Immediately\n bookTable.setImmediate(true);\n //Set the table on listener for value change\n bookTable.addValueChangeListener(new Property.ValueChangeListener()\n {\n public void valueChange(ValueChangeEvent event) {\n \n }\n\n });\n }", "private TableColumn<Object, ?> fillColumns() {\n\t\t\n\t\treturn null;\n\t}", "private void initTable() {\n \t\t// init table\n \t\ttable.setCaption(TABLE_CAPTION);\n \t\ttable.setPageLength(10);\n \t\ttable.setSelectable(true);\n \t\ttable.setRowHeaderMode(Table.ROW_HEADER_MODE_INDEX);\n \t\ttable.setColumnCollapsingAllowed(true);\n \t\ttable.setColumnReorderingAllowed(true);\n \t\ttable.setSelectable(true);\n \t\t// this class handles table actions (see handleActions method below)\n \t\ttable.addActionHandler(this);\n \t\ttable.setDescription(ACTION_DESCRIPTION);\n \n \t\t// populate Toolkit table component with test SQL table rows\n \t\ttry {\n \t\t\tQueryContainer qc = new QueryContainer(\"SELECT * FROM employee\",\n \t\t\t\t\tsampleDatabase.getConnection());\n \t\t\ttable.setContainerDataSource(qc);\n \t\t} catch (SQLException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\t// define which columns should be visible on Table component\n \t\ttable.setVisibleColumns(new Object[] { \"FIRSTNAME\", \"LASTNAME\",\n \t\t\t\t\"TITLE\", \"UNIT\" });\n \t\ttable.setItemCaptionPropertyId(\"ID\");\n \t}", "private void initTable() {\n// String col[] = {\"Seq#\",\"PCode\",\"BCode\",\"ProductName\",\"PurPCS\",\"PurCTN\",\"PurQTY\",\"PurDMG\",\"PurRate\",\"GrossAmount\",\"Disc%\",\"DiscRS\",\"Tax%\",\"TaxRS\",\"TOPcs\",\"UCHRS\",\"SCHRS\",\"FMR%\",\"FMRRS\",\"TaxRS\",\"Expiry\",\"Batch\",\"NetAmount\"};\n String col[] = {\"Seq#\",\"PCode\",\"BCode\"};\n int k=0; \n Object row[][] = new Object[][] { { \"1\", new ButtonTextFieldCellTest.ButtonTextFieldCell(), new ButtonTextFieldCellTest.ButtonTextFieldCell() },\n { \"2\", new ButtonTextFieldCellTest.ButtonTextFieldCell(), new ButtonTextFieldCellTest.ButtonTextFieldCell() },\n { \"3\", new ButtonTextFieldCellTest.ButtonTextFieldCell(), new ButtonTextFieldCellTest.ButtonTextFieldCell() },\n { \"4\", new ButtonTextFieldCellTest.ButtonTextFieldCell(), new ButtonTextFieldCellTest.ButtonTextFieldCell() } };\n// String row[][] =new String[3][23];\n /*\n for(int i = 0; i < 3; i++){\n for(int j = 0; j < 23; j++){\n row[i][j]=\"\"+k++;\n }\n }\n \n */\n// row=new String[][]{{\"Seq#\",\"PCode\",\"BCode\",\"ProductName\",\"PurPCS\",\"PurCTN\",\"PurQTY\",\"PurDMG\",\"PurRate\",\"GrossAmount\",\"Disc%\",\"DiscRS\",\"Tax%\",\"TaxRS\",\"TOPcs\",\"UCHRS\",\"SCHRS\",\"FMR%\",\"FMRRS\",\"TaxRS\",\"Expiry\",\"Batch\",\"NetAmount\"},\n// {\"1Seq#\",\"1PCode\",\"1BCode\",\"ProductName\",\"PurPCS\",\"PurCTN\",\"PurQTY\",\"PurDMG\",\"PurRate\",\"GrossAmount\",\"Disc%\",\"DiscRS\",\"Tax%\",\"TaxRS\",\"TOPcs\",\"UCHRS\",\"SCHRS\",\"FMR%\",\"FMRRS\",\"TaxRS\",\"Expiry\",\"Batch\",\"NetAmount\"},\n// {\"2Seq#\",\"2PCode\",\"2BCode\",\"ProductName\",\"PurPCS\",\"PurCTN\",\"PurQTY\",\"PurDMG\",\"PurRate\",\"GrossAmount\",\"Disc%\",\"DiscRS\",\"Tax%\",\"TaxRS\",\"TOPcs\",\"UCHRS\",\"SCHRS\",\"FMR%\",\"FMRRS\",\"TaxRS\",\"Expiry\",\"Batch\",\"NetAmount\"}};\n model = new DefaultTableModel(row,col);\n jTable1=new JTable(model);\n jTable1.setRowHeight(30);\n jTable1.setRowHeight(0,30);\n jTable1.setPreferredSize(new Dimension(purchaseScrollPane.getWidth(), 35));\n purchaseScrollPane.setViewportView(jTable1);\n }", "public ZonaFasciculataCells() {\r\n\r\n\t}", "private void initTableView() {\n try {\n NonEditableDefaultTableModel dtm = new NonEditableDefaultTableModel();\n dtm.setColumnIdentifiers(new String[]{\"Id\", \"Code\", \"From\", \"To\", \"Prepared\", \"Status\"});\n\n for (PayrollPeriod p : ppDao.getPayrollPeriods()) {\n\n try {\n Object[] o = new Object[]{p.getId(), p,\n sdf.format(p.getDateFrom()), sdf.format(p.getDateTo()),\n sdf.format(p.getDatePrepared()), p.getStatus()};\n dtm.addRow(o);\n } catch (Exception ex) {\n }\n\n }\n tablePayrollPeriod.setModel(dtm);\n } catch (Exception ex) {\n Logger.getLogger(PayrollPeriodInformation.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }", "public TableCell getCell() {\n return cell;\n }", "private void buildTable() {\n\t\tObservableList<Record> data;\r\n\t\tdata = FXCollections.observableArrayList();\r\n\r\n\t\t// get records from the database\r\n\t\tArrayList<Record> list = new ArrayList<Record>();\r\n\t\tlist = getItemsToAdd();\r\n\r\n\t\t// add records to the table\r\n\t\tfor (Record i : list) {\r\n\t\t\tSystem.out.println(\"Add row: \" + i);\r\n\t\t\tdata.add(i);\r\n\t\t}\r\n\t\ttableView.setItems(data);\r\n\t}", "public Table() {\n this.tableName = \"\";\n this.rows = new HashSet<>();\n this.columnsDefinedOrder = new ArrayList<>();\n }", "private void initTable(){\n TableCellEditor nonSelEditor = new TableCellEditor() {\n @Override\n public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {\n return null;\n }\n @Override\n public Object getCellEditorValue() {return null; }\n\n @Override\n public boolean isCellEditable(EventObject anEvent) {return false;}\n\n @Override\n public boolean shouldSelectCell(EventObject anEvent) {return false;}\n\n @Override\n public boolean stopCellEditing() {return false;}\n\n @Override\n public void cancelCellEditing() {/*NOP*/}\n\n @Override\n public void addCellEditorListener(CellEditorListener l) {/*NOP*/}\n\n @Override\n public void removeCellEditorListener(CellEditorListener l) {/*NOP*/}\n };\n\n tableModelArrays = new DefaultTableModel();\n\n String[] columns = {\"N\", \"Data type\", \"Length\", \"State\",\"Kit\"};\n for(String s : columns){\n tableModelArrays.addColumn(s);\n }\n\n /*\n * Add information about have generated structures to the table model\n */\n if(dataList != null){\n for(int i = 0; i<dataList.getLength(); i++){\n tableModelArrays.addRow(new String[]{\n Integer.toString(i + 1),\n dataList.getData(i).getType(),\n Integer.toString(dataList.getData(i).getLength(0)),\n dataList.getData(i).getState()\n });\n }\n }\n\n /*\n * Create table from table model\n */\n final JTable tableArrays = new JTable(tableModelArrays);\n\n /*\n * Runs popup menu for edition notices which contain in table.\n */\n tableArrays.addMouseListener(new PopupMenu(popupMenu){\n @Override\n public void maybeShowPopup(MouseEvent e) {\n if (e.isPopupTrigger()) {\n popupMenu.show(e.getComponent(),\n e.getX(), e.getY());\n if (e.getButton() == MouseEvent.BUTTON3) {\n Point point = e.getPoint();\n int column = tableArrays.columnAtPoint(point);\n int row = tableArrays.rowAtPoint(point);\n tableArrays.setColumnSelectionInterval(column, column);\n tableArrays.setRowSelectionInterval(row, row);\n selectedRow = tableArrays.getSelectedRow();\n }\n }\n }\n });\n\n tableArrays.setRowHeight(20);\n tableArrays.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\n /*\n * Changes width all the columns in the table\n */\n tableArrays.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);\n tableArrays.getColumnModel().getColumn(0).setPreferredWidth(23);\n tableArrays.getColumnModel().getColumn(1).setPreferredWidth(67);\n tableArrays.getColumnModel().getColumn(2).setPreferredWidth(70);\n tableArrays.getColumnModel().getColumn(3).setPreferredWidth(65);\n tableArrays.getColumnModel().getColumn(4).setPreferredWidth(27);\n\n /*\n * Each notice sets as manually no editable\n */\n for (int i = 0; i<tableArrays.getColumnCount(); i++ ){\n tableArrays.getColumnModel().getColumn(i).setCellEditor(nonSelEditor);\n }\n\n /*\n * Add scroll controls to table\n */\n JScrollPane scrollTable = new JScrollPane(tableArrays);\n scrollTable.setSize(TABLE_WIDTH,getHeight()-FIELD_HEIGHT-150);\n scrollTable.setLocation(getWidth()-scrollTable.getWidth()-15, FIELD_HEIGHT+60);\n\n /*\n * Add table to frame\n */\n add(scrollTable);\n\n }", "private static void setTableWithData()\n {\n /* Se establecen el tamaño de la tabla */\n table.setSize(1280, 630);\n table.setMaximumSize(new Dimension(1280, 630));\n table.setMinimumSize(new Dimension(1280, 630));\n\n /* Se garantiza que cada fila (album) tiene un alto proporcional de acuerdo con el numero de cancioens */\n Iterator iteratorPerRow = listSizePerRow.iterator();\n int sizePerRow, i;\n i = 0;\n while (iteratorPerRow.hasNext())\n {\n sizePerRow = (Integer) iteratorPerRow.next(); \n table.setRowHeight(i, sizePerRow);\n i++;\n }\n\n /* Se setea el ancho de cada columna */\n setSize(table, JSoundsMainWindowViewController.ALBUM_COVER_COLUMN, 200);\n setSize(table, JSoundsMainWindowViewController.ALBUM_INFO_COLUMN, 230);\n setSize(table, JSoundsMainWindowViewController.NUMBER_SONG_COLUMN, 50);\n setSize(table, JSoundsMainWindowViewController.LIST_SONG_COLUMN, 400);\n setSize(table, JSoundsMainWindowViewController.GENDER_SONG_COLUMN, 230);\n\n /* Renderizado del la imagen del album */\n JLabelTableRenderer jltcr = new JLabelTableRenderer();\n jltcr.setVerticalAlignment(SwingConstants.TOP);\n jltcr.setHorizontalAlignment(SwingConstants.CENTER);\n\n table.getColumnModel().getColumn(0).setCellRenderer(jltcr);\n\n\n /* Renderizados de cada columna */\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.ALBUM_INFO_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.ALBUM_INFO_COLUMN).setCellEditor(new JListTableEditor());\n\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.NUMBER_SONG_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.NUMBER_SONG_COLUMN).setCellEditor(new JListTableEditor());\n\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.LIST_SONG_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.LIST_SONG_COLUMN).setCellEditor(new JListTableEditor());\n\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.GENDER_SONG_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.GENDER_SONG_COLUMN).setCellEditor(new JListTableEditor());\n\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.LAST_PLAYED_SONG_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.LAST_PLAYED_SONG_COLUMN).setCellEditor(new JListTableEditor()); \n }", "@SuppressWarnings(\"unchecked\")\n private void createTable() {\n table = (LinkedList<Item<V>>[])new LinkedList[capacity];\n for(int i = 0; i < table.length; i++) {\n table[i] = new LinkedList<>();\n }\n }", "@Override\n public Iterator<Row> iterator() {\n\n return new Iterator<Row>() {\n\n private final Row row = new Row(TableSlice.this);\n\n @Override\n public Row next() {\n return row.next();\n }\n\n @Override\n public boolean hasNext() {\n return row.hasNext();\n }\n };\n }", "private void initView() {\n\t\ttable = new JTable(ttm);\n\t\tfor (int i = 0; i < colWidths.length; i++) {\n\t\t\tTableColumn col = table.getColumnModel().getColumn(i);\n\t\t\tcol.setPreferredWidth(colWidths[i]);\n\t\t}\n\t\ttable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n\t\ttable.setFillsViewportHeight(false);\n\t\tsetViewportView(table);\n\t\tsetBorder(BorderFactory.createLineBorder(Color.black));\n\t}", "public List<ArrayList<TableCell>> generateArray() {\n\t\t// The table height is the amount of \"where\" classifications, plus one for the total row\n\t\tint height = this.table.size() + 1;\n\n\t\t// The table width is the total amount of unique \"what\" classifications found, plus one\n\t\tList<Classification> whatClassifications = this.normalizer.getWhatClassifications();\n\t\tint width = whatClassifications.size() + 1;\n\n\t\t// Populate the table with empty TableCell objects\n\t\tList<ArrayList<TableCell>> out = new ArrayList<ArrayList<TableCell>>(height);\n\t\tfor (int y = 0; y < height; y++) {\n\t\t\tArrayList<TableCell> row = new ArrayList<TableCell>(width);\n\t\t\tfor (int x = 0; x < width; x++) {\n\t\t\t\trow.add(new TableCell());\n\t\t\t}\n\t\t\tout.add(row);\n\t\t}\n\n\t\t// Create the column and row mappings, ie. sorted lists of classifications\n\t\t// Rows\n\t\tList<Classification> rowClassifications = new ArrayList<Classification>(height);\n\t\trowClassifications.addAll(this.table.keySet());\n\t\tCollections.sort(rowClassifications);\n\n\t\t// Columns\n\t\tList<Classification> columnClassifications = new ArrayList<Classification>(width);\n\t\tcolumnClassifications.addAll(whatClassifications);\n\t\tCollections.sort(columnClassifications);\n\n\t\t// Reference for the total row (the last row)\n\t\tList<TableCell> totalRow = out.get(height - 1);\n\n\t\t// Get the total amount of classification pairs found\n\t\tint total = 0;\n\t\tfor (Map.Entry<Classification, HashMap<Classification, TableCell>> entry1 : this.table.entrySet()) {\n\t\t\tfor (Map.Entry<Classification, TableCell> entry2 : entry1.getValue().entrySet()) {\n\t\t\t\ttotal += entry2.getValue().numberOfCauses;\n\t\t\t}\n\t\t}\n\n\t\t// Loop through all of our \"where\" classifications as rows\n\t\tfor (int y = 0; y < height - 1; y++) {\n\t\t\t// Get the actual list of output cells for this row\n\t\t\tList<TableCell> currentRow = out.get(y);\n\n\t\t\t// Get a reference to the row total cell (the last cell)\n\t\t\tTableCell rowTotalCell = currentRow.get(width - 1);\n\n\t\t\t// Get the corresponding classification for this row\n\t\t\tClassification rowKey = rowClassifications.get(y);\n\n\t\t\t// Add the classification's name to the row name array\n\t\t\tthis.rowNames.add(rowKey.name);\n\n\t\t\t// Loop through all of our \"what\" classifications as columns\n\t\t\tfor (int x = 0; x < width - 1; x++) {\n\t\t\t\t// Get the corresponding classification for this column\n\t\t\t\tClassification columnKey = columnClassifications.get(x);\n\n\t\t\t\t// If this is the first outer iteration, add the column classification's name to the column name array\n\t\t\t\tif (y == 0) {\n\t\t\t\t\tthis.colNames.add(columnKey.name);\n\t\t\t\t}\n\n\t\t\t\t// If there is no data for this classification pair, bail\n\t\t\t\tif (!this.table.get(rowKey).containsKey(columnKey)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Get a reference to this column's total cell\n\t\t\t\tTableCell columnTotalCell = totalRow.get(x);\n\n\t\t\t\t// Get the source and target cells for this pair of classifications\n\t\t\t\tTableCell sourceCell = this.table.get(rowKey).get(columnKey);\n\t\t\t\tTableCell targetCell = currentRow.get(x);\n\n\t\t\t\t// Update the target cell\n\t\t\t\ttargetCell.percentOfCauses = (double) sourceCell.numberOfCauses / total * 100.0;\n\t\t\t\ttargetCell.percentOfProposedCauses = (double) sourceCell.numberOfProposedCauses / total * 100.0;\n\t\t\t\ttargetCell.percentOfCorrectionCauses = (double) sourceCell.numberOfCorrectionCauses / total * 100.0;\n\n\t\t\t\t// Update the row total\n\t\t\t\trowTotalCell.percentOfCauses += targetCell.percentOfCauses;\n\t\t\t\trowTotalCell.percentOfProposedCauses += targetCell.percentOfProposedCauses;\n\t\t\t\trowTotalCell.percentOfCorrectionCauses += targetCell.percentOfCorrectionCauses;\n\n\t\t\t\t// Update the column total\n\t\t\t\tcolumnTotalCell.percentOfCauses += targetCell.percentOfCauses;\n\t\t\t\tcolumnTotalCell.percentOfProposedCauses += targetCell.percentOfProposedCauses;\n\t\t\t\tcolumnTotalCell.percentOfCorrectionCauses += targetCell.percentOfCorrectionCauses;\n\t\t\t}\n\t\t}\n\n\t\t// Append the total row and column names\n\t\tthis.rowNames.add(play.i18n.Messages.get(\"classificationTablePage.total\"));\n\t\tthis.colNames.add(play.i18n.Messages.get(\"classificationTablePage.total\"));\n\n\t\treturn out;\n\t}", "private MarkovTableModel populateNewMarkovTableModel(List<SurveyColumnValuesGrouping> surveyGroups){\n ArrayList<String> columnNames = new ArrayList<>();\n //Census Value Names\n columnNames.addAll(Arrays.asList(\"\",\"Value\"));\n columnNames.addAll(this.currentMarkovChain.getAllSelectedCensusClassesUserDefinedNames());\n columnNames.addAll(Arrays.asList(\"Amount Left\",\"\"));\n\n //columns must be rows+1 because the header row is the -1th row.\n ArrayList<ArrayList<Object>> cellValues = new ArrayList<>(); //MarkovTableCell[6][7];\n \n //based on the number of rows/columns, set the limits of editable cells\n int[][] cells = new int[2][Math.max(END_EDITABLE_COL-START_EDITABLE_COL, END_EDITABLE_ROW-START_EDITABLE_ROW)+1];\n \n int numRows = END_EDITABLE_ROW - START_EDITABLE_ROW + 1;\n int numCols = END_EDITABLE_COL - START_EDITABLE_COL + 1;\n \n for(int r=0; r<numRows; r++){\n cells[0][r] = numCols; //in a row, there are numCols cells\n }\n for(int c=0; c<numCols; c++){\n cells[1][c] = numRows; //in a column, there are numRows cells\n }\n \n //Set up rows and columns\n int numberOfNeededRows = 3 + surveyGroups.size();\n int numberOfNeededColumn = columnNames.size();\n for(int r = 0; r<numberOfNeededRows; r++){\n cellValues.add(r, new ArrayList<>());\n for(int c=0;c<numberOfNeededColumn;c++){\n cellValues.get(r).add(c, new MarkovTableCell(r, c, \"\", false, false, false, true));\n }\n }\n \n //Set All Values takes: (Object value, boolean calculated, boolean userEntered, boolean error, boolean editable)\n ((MarkovTableCell)cellValues.get(0).get(0)).setAllValues(\"Value\", false, false, false, false);\n ((MarkovTableCell)cellValues.get(numberOfNeededRows - 2).get(0)).setAllValues(\"Amount Left\", false, false, false, false);\n ((MarkovTableCell)cellValues.get(numberOfNeededRows - 1).get(0)).setAllValues(\"\", false, false, false, false);\n ((MarkovTableCell)cellValues.get(0).get(1)).setAllValues(\"Proportion\", false, false, false, false);\n \n //Survey Values\n int otherCounter = 0;\n for(int counter = 1; counter <= surveyGroups.size(); counter++){\n SurveyColumnValuesGrouping selected = surveyGroups.get(otherCounter);\n \n ((MarkovTableCell)cellValues.get(counter).get(0)).setAllValues(selected.toString(), false, false, false, false);\n \n otherCounter++;\n }\n \n //load proportions\n long allSurveyGroupsTotal = this.currentMarkovChain.getSelectSurveyClass().getAllSurveyGroupsTotal();\n long allCensusTotal = this.currentMarkovChain.getAllCensusTotal();\n //census proportions\n otherCounter = 2;\n for(int counter = 0; counter < this.currentMarkovChain.getCensusClasses().size(); counter++){\n cerl.gui.utilities.Class selected = this.currentMarkovChain.getCensusClasses().get(counter);\n \n double proportions = (double)selected.getClassTotal() / allCensusTotal;\n proportions =Math.round(proportions * 100.0) / 100.0;\n \n ((MarkovTableCell)cellValues.get(0).get(otherCounter)).setAllValues(proportions, false, false, false, false);\n ((MarkovTableCell)cellValues.get(0).get(otherCounter)).setMin(proportions);\n ((MarkovTableCell)cellValues.get(0).get(otherCounter)).setMax(proportions);\n otherCounter++;\n }\n //survey proportions\n otherCounter = 1;\n for(int counter = 0; counter < surveyGroups.size(); counter++){\n SurveyColumnValuesGrouping selected = surveyGroups.get(counter);\n \n double proportions = (double)selected.getGroupingTotal() / allSurveyGroupsTotal;\n proportions =Math.round(proportions * 100.0) / 100.0;\n \n ((MarkovTableCell)cellValues.get(otherCounter).get(1)).setAllValues(proportions, false, false, false, false);\n ((MarkovTableCell)cellValues.get(otherCounter).get(1)).setMin(proportions);\n ((MarkovTableCell)cellValues.get(otherCounter).get(1)).setMax(proportions);\n otherCounter++;\n }\n \n //Update non-editable corner cells\n ((MarkovTableCell)cellValues.get(0).get(numberOfNeededColumn -2)).setAllValues(\"Range Min: Range Max:\", false, false, false, false);\n ((MarkovTableCell)cellValues.get(0).get(numberOfNeededColumn -1)).setAllValues(\"\", false, false, false, false);\n ((MarkovTableCell)cellValues.get(numberOfNeededRows - 2).get(1)).setAllValues(\"Range Min: Range Max:\", false, false, false, false);\n ((MarkovTableCell)cellValues.get(numberOfNeededRows - 1).get(1)).setAllValues(\"\", false, false, false, false);\n ((MarkovTableCell)cellValues.get(numberOfNeededRows - 1).get(numberOfNeededColumn - 1)).setAllValues(\"\", false, false, false, false);\n ((MarkovTableCell)cellValues.get(numberOfNeededRows - 2).get(numberOfNeededColumn - 2)).setAllValues(\"\", false, false, false, false);\n \n //create table with custom MarkovTableModel\n MarkovTableModel mtmTable = new MarkovTableModel(columnNames, cellValues, cells, numRows, numCols);\n this.currentMarkovChain.setEmptyCells(cells);\n //this.currentMarkovChain.setMarkovChainTableCells(cellValues);\n this.currentMarkovChain.setMarkovTableCellsFromGeneric(cellValues);\n this.currentMarkovChain.setColumnNames(columnNames);\n return mtmTable;\n }", "public SwitchColTable() {\r\r\r\r\n }", "private ByaTableModel() {\n\t}", "public table() {\n initComponents();\n }", "public void disTable () {\n\t\t\t\tJScrollPane scrollPane = new JScrollPane(table);\n\t\t\t\tvalues = new Vector();\n\t\t\t\tvalues.add(\"20\"); values.add(\"20\"); values.add(\"20\"); values.add(\"20\"); values.add(\"20\");values.add(\"20\");values.add(new Boolean(false));\n\t\t\t\tmyModel.addRow(values ); // more practicle, vector can take only objects.\n\t\t myModel.addRow(data);\n\n\n\t\t\t\tgetContentPane().add(scrollPane, BorderLayout.CENTER);\n\n\t\t\t\t addWindowListener(new WindowAdapter() {\n\t\t\t\t\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t\t}\n\t\t\t\t });\n\t}", "private void buildIngredientTable(){\n\n //IL=IM.getIngredientItemArrayList();\n\n\n\n ingredientTable = new JTable();\n ingredientTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);\n\n ingredientTable.getTableHeader().setReorderingAllowed(false);\n\n DTM = IM.getIngDTM();\n ingredientTable.setModel(DTM);\n\n ingredientTable.setRowSelectionAllowed(true);\n\n ingredientTable.setPreferredScrollableViewportSize(new Dimension(500, 50));\n ingredientTable.setDragEnabled(false);\n ingredientTable.setDefaultEditor(Object.class, null);\n //TODO\n\n TableColumnModel columnModel = ingredientTable.getColumnModel();\n columnModel.getColumn(1).setWidth(500);\n\n scrollPane = new JScrollPane(ingredientTable,ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n scrollPane.setPreferredSize(new Dimension(450, 450));\n\n }", "public NotebookCell() {}", "private MyTable generateTable()\n\t{\n\t\t//this creates the column headers for the table\n\t\tString[] titles = new String[] {\"Name\"};\n\t\t//fields will store all of the entries in the database for the GUI\n\t\tArrayList<String[]> fields = new ArrayList<String[]>();\n\t\tfor (food foodStuff: items) //for each element in items do the following\n\t\t{\n\t\t\t//creates a single row of the table\n\t\t\tString[] currentRow = new String[1]; //creates an array for this row\n\t\t\tcurrentRow[1] = foodStuff.getName(); //sets this row's name\n\t\t\tfields.add(currentRow); //adds this row to the fields ArrayList\n\t\t}\n\t\t//builds a table with titles and a downgraded fields array\n\t\tMyTable builtTable = new MyTable(fields.toArray(new String[0][1]), titles);\n\t\treturn builtTable; // return\n\t}", "TableRow componentBTableRow(){\n\n TableRow componentBTableRow = new TableRow(this.context);\n int headerFieldCount = this.headerObjects.size();\n\n TableRow.LayoutParams params = new TableRow.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.MATCH_PARENT);\n// params.setMargins(-1, 0, 0, 0);\n\n for(int x=0; x<(headerFieldCount-1); x++){\n View view = headerObjects.get(x+1);\n\n componentBTableRow.addView(view, params);\n }\n\n\n return componentBTableRow;\n }", "public void fillMyGoodsTable() {\n\t\tHashMap<Goods, Integer> myGoods = ship.getMyGoods();\n\t\tDefaultTableModel model = (DefaultTableModel)this.myGoodsTable.getModel();\n\t\tint number = 1;\n\t\tfor (HashMap.Entry<Goods, Integer> set: myGoods.entrySet()) {\n\t\t\tString name = set.getKey().getName();\n\t\t\tint quantity = set.getKey().getQuantityOwned();\n\t\t\tint price = set.getValue();\n\t\t\tmodel.addRow(new Object [] {number, name, quantity, price});\n\t\t\tnumber++;\n\t\t}\n\t}", "@Override\n\tpublic Cell createCell()\n\t{\n\t\treturn derivedColumn.createCell();\n\t}", "private void initSimpleTable(){\n List<Names> balloonVisibilityList = new ArrayList<Names>();\n balloonVisibilityList.add(Extensions.Names.FEATURE);\n\n List<Names> hList = new ArrayList<Names>();\n hList.add(Extensions.Names.BASIC_LINK);\n\n List<Names> wList = new ArrayList<Names>();\n wList.add(Extensions.Names.BASIC_LINK);\n\n List<Names> xList = new ArrayList<Names>();\n xList.add(Extensions.Names.BASIC_LINK);\n\n List<Names> yList = new ArrayList<Names>();\n yList.add(Extensions.Names.BASIC_LINK);\n\n simpleTable.put(GxConstants.TAG_BALLOON_VISIBILITY, balloonVisibilityList);\n simpleTable.put(GxConstants.TAG_H, hList);\n simpleTable.put(GxConstants.TAG_W, wList);\n simpleTable.put(GxConstants.TAG_X, xList);\n simpleTable.put(GxConstants.TAG_Y, yList);\n }", "public Table() {\n startingCash = 10000;\n renderWinState = false;\n players = new Player[4];\n river = new River();\n deck = new Deck();\n dealer = new Dealer();\n initRiver();\n initPlayers();\n }", "@Override\n public IRenderer getNextRenderer() {\n return new InnerTableRenderer((Table) modelElement);\n }", "public void initializeTable(){\r\n\t \r\n\t // Adding a button to tableView\r\n\t /*\r\n\t TableColumn actionCol = new TableColumn( \"Action\" );\r\n actionCol.setCellValueFactory( new PropertyValueFactory<>( \"DUMMY\" ) );\r\n\r\n Callback<TableColumn<WorkflowEntry, String>, TableCell<WorkflowEntry, String>> cellFactory = //\r\n new Callback<TableColumn<WorkflowEntry, String>, TableCell<WorkflowEntry, String>>()\r\n {\r\n public TableCell<WorkflowEntry, String> call( final TableColumn<WorkflowEntry, String> param )\r\n {\r\n final TableCell<WorkflowEntry, String> cell = new TableCell<WorkflowEntry, String>()\r\n {\r\n\r\n final Button btn = new Button( \"Approve\" );\r\n\r\n @Override\r\n public void updateItem( String item, boolean empty )\r\n {\r\n super.updateItem( item, empty );\r\n if ( empty )\r\n {\r\n setGraphic( null );\r\n setText( null );\r\n }\r\n else\r\n {\r\n btn.setOnAction( ( ActionEvent event ) ->\r\n {\r\n WorkflowEntry person = getTableView().getItems().get( getIndex() );\r\n System.out.println( person.getName() );\r\n } );\r\n setGraphic( btn );\r\n setText( null );\r\n }\r\n }\r\n };\r\n return cell;\r\n }\r\n };\r\n\r\n actionCol.setCellFactory( cellFactory );*/\r\n\t\t\r\n\t\ttableView.setItems(data);\r\n\t}", "private void fillTable(){\n tblModel.setRowCount(0);// xoa cac hang trong bang\n \n for(Student st: list){\n tblModel.addRow(new String[]{st.getStudentId(), st.getName(), st.getMajor(),\"\"\n + st.getMark(), st.getCapacity(), \"\" + st.isBonnus()});\n // them (\"\" + )de chuyen doi kieu float va boolean sang string\n \n }\n tblModel.fireTableDataChanged();\n }", "static LearningTable createFilledLearningTable() {\n\t\tLearningTable table = new LearningTable(null, null, null);\n\t\t\n\t\ttable.getAttributes().addAll(createAttributes());\n\t\ttable.getExamples().addAll(createFilledExamples());\n\t\t\n\t\treturn table;\n\t}", "@Override\n\tpublic void init() {\n\t\ttable = new JTable(dm);\n\t\tJScrollPane scrollPane = new JScrollPane(table);\n\n\t\tadd(scrollPane);\n\t}", "MemberCell createMemberCell();", "private static void assembleRosterTable(){\n for (int i = 0; i < 10; i++) {\n rosterTable.insertRow(i);\n }\n }", "private void createTable(int columns, int rows, String[] column_name,\n\t\t\tObject[] row_data) {\n\t\ttblStationary = new Table(canvas2, SWT.MULTI | SWT.BORDER\n\t\t\t\t| SWT.FULL_SELECTION);\n\t\ttblStationary.setLinesVisible(true);\n\t\ttblStationary.setHeaderVisible(true);\n\n\t\tfor (int i = 0; i < columns; i++) {\n\t\t\tcolumn = new TableColumn(tblStationary, SWT.NONE);\n\n\t\t\tif (i == 0) {\n\t\t\t\tcolumn.setText(column_name[i]);\n\t\t\t\tcolumn.setWidth(50);\n\t\t\t} else if (i == 1) {\n\t\t\t\tcolumn.setText(column_name[i]);\n\t\t\t\tcolumn.setWidth(230);\n\t\t\t} else {\n\t\t\t\tcolumn.setText(column_name[i]);\n\t\t\t\tcolumn.setWidth(100);\n\t\t\t}\n\t\t}\n\n\t\teditor1 = new TableEditor[rows];\n\t\ttxtTopay = new Text[rows];\n\n\t\teditor2 = new TableEditor[rows];\n\t\ttxtPaid = new Text[rows];\n\n\t\teditor3 = new TableEditor[rows];\n\t\ttxtBilling = new Text[rows];\n\n\t\teditor4 = new TableEditor[rows];\n\t\ttxtCr = new Text[rows];\n\n\t\t// Drawing initial table items\n\t\tfor (int rowId = 0; rowId < rows; rowId++) {\n\n\t\t\titem = new TableItem(tblStationary, SWT.NONE);\n\n\t\t\titem.setText(0, Integer.toString((rowId + 1)));\n\n\t\t\t// First Column station\n\t\t\titem.setText(1, (((StationsDTO) (row_data[rowId])).getName()\n\t\t\t\t\t+ \" - \" + ((StationsDTO) row_data[rowId]).getId()));\n\n\t\t\t// Draw Text Field\n\t\t\teditor1[rowId] = new TableEditor(tblStationary);\n\t\t\ttxtTopay[rowId] = new Text(tblStationary, SWT.NONE);\n\t\t\ttxtTopay[rowId].addVerifyListener(new NumericValidation());\n\t\t\teditor1[rowId].grabHorizontal = true;\n\t\t\teditor1[rowId].setEditor(txtTopay[rowId], item, 2);\n\n\t\t\t// Draw Text Field\n\t\t\teditor2[rowId] = new TableEditor(tblStationary);\n\t\t\ttxtPaid[rowId] = new Text(tblStationary, SWT.NONE);\n\t\t\ttxtPaid[rowId].addVerifyListener(new NumericValidation());\n\t\t\teditor2[rowId].grabHorizontal = true;\n\t\t\teditor2[rowId].setEditor(txtPaid[rowId], item, 3);\n\n\t\t\t// Draw Text Field\n\t\t\teditor3[rowId] = new TableEditor(tblStationary);\n\t\t\ttxtBilling[rowId] = new Text(tblStationary, SWT.NONE);\n\t\t\ttxtBilling[rowId].addVerifyListener(new NumericValidation());\n\t\t\teditor3[rowId].grabHorizontal = true;\n\t\t\teditor3[rowId].setEditor(txtBilling[rowId], item, 4);\n\n\t\t\t// Draw Text Field\n\t\t\teditor4[rowId] = new TableEditor(tblStationary);\n\t\t\ttxtCr[rowId] = new Text(tblStationary, SWT.NONE);\n\t\t\ttxtCr[rowId].addVerifyListener(new NumericValidation());\n\t\t\teditor4[rowId].grabHorizontal = true;\n\t\t\teditor4[rowId].setEditor(txtCr[rowId], item, 5);\n\n\t\t}\n\t\ttblStationary.setBounds(32, 43, 750, 380);\n\n\t}", "public TranspositionTable() {\n\t\tmap = new HashMap<Long, Transposition>(1000000);\n\t\t//purgatory = new HashSet<Long>();\n\t}", "public void initTable(){\n if(counter == 0){\n getDataSemua();\n }else if(counter == 1){\n getDataMakan();\n }else if(counter == 2){\n getDataMinum();\n }else if(counter == 3){\n getDataPaket();\n }\n id.setCellValueFactory(new PropertyValueFactory<casher, String>(\"Id\"));\n nama.setCellValueFactory(new PropertyValueFactory<casher, String>(\"Nama\"));\n kategori.setCellValueFactory(new PropertyValueFactory<casher, String>(\"Kategori\"));\n harga.setCellValueFactory(new PropertyValueFactory<casher, Integer>(\"Harga\"));\n status.setCellValueFactory(new PropertyValueFactory<casher, String>(\"Status\"));\n tambah.setCellValueFactory(new PropertyValueFactory<casher,Button>(\"Tambah\"));\n\n table.setItems(list);\n\n }", "private void makeTable() {\n String [] cols = new String[] {\"Planets\", \"Weights (in lbs)\", \"Weights (in kgs)\"};\n model = new DefaultTableModel(result,cols) {\n @Override\n public boolean isCellEditable(int row, int column) {\n return false;\n }\n };\n table = new JTable(model);\n JScrollPane scrollPane = new JScrollPane(table);\n scrollPane.setPreferredSize(new Dimension(310,155));\n middlePanel.add(scrollPane);\n revalidate();\n repaint();\n }", "public void preencherTabela(){\n imagemEnunciado.setImage(imageDefault);\n pergunta.setImagemEnunciado(caminho);\n imagemResposta.setImage(imageDefault);\n pergunta.setImagemResposta(caminho);\n ///////////////////////////////\n perguntas = dao.read();\n if(perguntas != null){\n perguntasFormatadas = FXCollections.observableList(perguntas);\n\n tablePerguntas.setItems(perguntasFormatadas);\n }\n \n }", "AttributeCell createAttributeCell();", "public boolean buildTable() {\n int count = table.getChildCount();\n for (int i = 0; i < count; i++) {\n View child = table.getChildAt(i);\n if (child instanceof TableRow) ((ViewGroup) child).removeAllViews();\n }\n\n //Dynamically adds rows based on the size of the destinations array\n for(int i = 0; i < orderedDestinations.size(); i++){\n // Inflates the search_results_table_row_attributes.xml file\n TableRow row = (TableRow) inflater.inflate(R.layout.search_results_table_row_attributes, null);\n\n //Finds oritentation and alters the row width if in landscape\n if(getResources().getConfiguration().orientation == 2) {\n LinearLayout ll = ((LinearLayout)row.findViewById(R.id.layout_contents));\n ll.getLayoutParams().width = 1700;\n ll.requestLayout();\n }\n\n //adds contents of the destination to the row\n ((TextView)row.findViewById(R.id.desti)).setText((i+1) + \") \" + orderedDestinations.get(i).name);\n ((TextView)row.findViewById(R.id.address)).setText(orderedDestinations.get(i).address);\n table.addView(row);\n }\n return true;\n }", "public Cell(){}", "private void repopulateTableForDelete()\n {\n clearTable();\n populateTable(null);\n }", "private JTable getTable() {\n\t\tif (table == null) {\n\t\t\ttable = new JTable() {\n\t\t\t\t/**\n\t\t\t\t * \n\t\t\t\t */\n\t\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\t\tpublic boolean isCellEditable(int row, int column) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t};\n\t\t\ttable.setModel(getDataModel());\n\t\t\ttable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);\n\n\t\t\ttable.getColumnModel().getColumn(0).setPreferredWidth(30);\n\t\t\ttable.getColumnModel().getColumn(1).setPreferredWidth(100);\n\t\t\ttable.getColumnModel().getColumn(2).setPreferredWidth(100);\n\t\t}\n\t\treturn table;\n\t}", "@Override\r\n\t\tpublic void run() {\n\t\t\t \r\n\t\t\t def_t = new DefaultTableModel();\r\n def_t.setColumnIdentifiers(t_tab_b);\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tString req = \"select NOM, NRC, NIF, ADRESSE , TEL, CODE_F from TRANS_FOURNISSEUR order by NOM\";\r\n\t\t\t\tResultSet\trst = FirstPg.con.createStatement().executeQuery(req); \r\n\t\t\t\t\r\n\t\t\t\twhile(rst.next()){\r\n \t if(!rst.getString(6).equals(\"Inconnu\"))def_t.addRow(new Object[]{rst.getString(1),rst.getString(2),rst.getString(3),rst.getString(4),rst.getString(5),rst.getString(6)});\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t tab_fact.setModel(def_t);\r\n\t\t\t\r\n for(int i = 0; i< tab_fact.getRowCount();i++){\r\n \t changeSizeh(25,tab_fact,i);\r\n }\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t \r\n\t\t\t\r\n\t\t}", "private void continuarInicializandoComponentes() {\n javax.swing.table.TableColumn columna1 = tablaDetalle.getColumn(\"Id\");\n columna1.setPreferredWidth(10); \n javax.swing.table.TableColumn columna2 = tablaDetalle.getColumn(\"Tipo\");\n columna2.setPreferredWidth(250); \n javax.swing.table.TableColumn columna3 = tablaDetalle.getColumn(\"Número\");\n columna3.setPreferredWidth(50); \n DefaultTableCellRenderer tcrr = new DefaultTableCellRenderer();\n tcrr.setHorizontalAlignment(SwingConstants.RIGHT);\n DefaultTableCellRenderer tcrc = new DefaultTableCellRenderer();\n tcrc.setHorizontalAlignment(SwingConstants.CENTER);\n tablaDetalle.getColumnModel().getColumn(0).setCellRenderer(tcrc);\n tablaDetalle.getColumnModel().getColumn(2).setCellRenderer(tcrr);\n tablaDetalle.getColumnModel().getColumn(3).setCellRenderer(tcrr);\n tablaDetalle.getColumnModel().getColumn(4).setCellRenderer(tcrr);\n }", "private void createTable() {\n\t\t// Tao dataModel & table \n\t\tdataModel = new DefaultTableModel(headers, 0);\n\t\ttable.setModel(dataModel);\n\t\t\n\t\tnapDuLieuChoBang();\n\t}", "public MyJTable createResultJTable(){\r\n\t\tmodel = new DefaultTableModel(getTableData(getRowNumber(), getTitle(), getAuthor(), getHyperLink(), getYear(), getAbstract(), getPublisher(), getMark(), getIsDuplicate(), getID()), getColumnName()) {\r\n\t\tprivate static final long serialVersionUID = 1L;\r\n\t\t\tClass<?>[] types = new Class<?>[] { Integer.class, String.class, String.class, URL.class, String.class, String.class, String.class, Boolean.class, Boolean.class, Integer.class};\r\n\r\n\t\t\tpublic Class<?> getColumnClass(int columnIndex) {\r\n\t\t\t\treturn types[columnIndex];\r\n\t\t\t}\r\n\t\t\r\n\t\t};\r\n\t\t\r\n\t\tMyJTable table = new MyJTable(model);\r\n\t\t//Sap xep noi dung cac dong trong table theo thu tu alpha B.\r\n\t\t//Cho phep sap xep theo tu cot rieng biet\r\n\t\tTableRowSorter<TableModel> sorter = new TableRowSorter<TableModel>(table.getModel());\r\n\t\ttable.setRowSorter(sorter);\r\n\t\t\r\n\t\t/*\r\n\t\t * Set width of table column \r\n\t\t */\r\n\t\ttable.setShowGrid(true);\r\n\t\ttable.setShowVerticalLines(true);\r\n\t\ttable.setShowHorizontalLines(true);\r\n\t\ttable.setRowHeight(25);\r\n\t\t//table.getColumn(\"links\")//;\r\n\t\tDefaultTableCellRenderer dtcr = new DefaultTableCellRenderer(); \r\n\t\tdtcr.setHorizontalAlignment(SwingConstants.CENTER); \r\n\t\t\r\n\t\tTableCellRenderer tcr = table.getDefaultRenderer(Integer.class);\r\n\t\tDefaultTableCellRenderer renderer = (DefaultTableCellRenderer)tcr; \r\n\t\trenderer.setHorizontalAlignment(SwingConstants.CENTER); \r\n\t\t\r\n\t\ttable.getColumn((\"duplicate\")).setWidth(0);\r\n\t\ttable.getColumn((\"duplicate\")).setMinWidth(0);\r\n\t\ttable.getColumn((\"duplicate\")).setMaxWidth(0);\r\n\t\t\r\n\t\ttable.getColumn((\"id\")).setWidth(0);\r\n\t\ttable.getColumn((\"id\")).setMinWidth(0);\r\n\t\ttable.getColumn((\"id\")).setMaxWidth(0);\r\n\t\t\r\n\t\tfor(int i = 0; i < 8; i++){\r\n\t\t\tTableColumn col = table.getColumnModel().getColumn(i);\r\n\t\t\tif(i == 0){\r\n\t\t\t\tcol.setPreferredWidth(30);\r\n\t\t\t}else if(i == 1){\r\n\t\t\t\tcol.setPreferredWidth(300);\r\n\t\t\t}else if(i == 2){\r\n\t\t\t\tcol.setPreferredWidth(200);\r\n\t\t\t}else if(i == 3){\r\n\t\t\t\tcol.setPreferredWidth(150);\r\n\t\t\t}else if(i == 4){\r\n\t\t\t\tcol.setPreferredWidth(60);\r\n\t\t\t}else if (i == 5){\r\n\t\t\t\tcol.setPreferredWidth(150);\r\n\t\t\t}else if(i == 6){\r\n\t\t\t\tcol.setPreferredWidth(80);\r\n\t\t\t}else if(i == 7){\r\n\t\t\t\tcol.setPreferredWidth(30);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn table;\r\n\t}", "private void initTablesViews()\n {\n // Tokens\n tc_token_id.setCellValueFactory(new PropertyValueFactory<>(\"token\"));\n tc_tipo_token_id.setCellValueFactory(new PropertyValueFactory<>(\"tipoToken\"));\n tc_linea_token_id.setCellValueFactory(new PropertyValueFactory<>(\"linea\"));\n tv_tokens_encontrados_id.setItems(info_tabla_tokens);\n\n // Errores\n tc_error_id.setCellValueFactory(new PropertyValueFactory<>(\"error\"));\n tc_tipo_error_id.setCellValueFactory(new PropertyValueFactory<>(\"tipoError\"));\n tc_linea_error_id.setCellValueFactory(new PropertyValueFactory<>(\"linea_error\"));\n tv_errores_lexicos_id.setItems(info_tabla_errores);\n }" ]
[ "0.6704464", "0.6693635", "0.66594285", "0.6605964", "0.6576745", "0.65402806", "0.64808244", "0.6458814", "0.64220047", "0.6387155", "0.6358633", "0.6355619", "0.6347315", "0.6336122", "0.63355845", "0.63002515", "0.628723", "0.627242", "0.62560296", "0.6250885", "0.6211648", "0.6206311", "0.6183283", "0.61767274", "0.6169988", "0.61583626", "0.6151209", "0.61377186", "0.6137678", "0.61269903", "0.61258006", "0.61230934", "0.61190736", "0.6111773", "0.61074936", "0.610139", "0.6096726", "0.60949534", "0.6091024", "0.6087659", "0.60866654", "0.60848945", "0.6079685", "0.60702634", "0.60556185", "0.6052375", "0.60443366", "0.60041404", "0.6003624", "0.5993786", "0.59700835", "0.5963569", "0.59599435", "0.59486127", "0.59426945", "0.5941516", "0.59237593", "0.59138584", "0.59118557", "0.5901896", "0.5892596", "0.5882435", "0.58795136", "0.58759445", "0.5874418", "0.5869696", "0.5863097", "0.58612496", "0.58591825", "0.5847919", "0.5842699", "0.5840525", "0.58382297", "0.583732", "0.5833797", "0.5820591", "0.58151233", "0.5812467", "0.5807235", "0.5806505", "0.58031523", "0.579677", "0.57912254", "0.57823247", "0.5779817", "0.5775644", "0.5774602", "0.57744396", "0.5770692", "0.57569", "0.57542175", "0.57493836", "0.57479286", "0.5747539", "0.57446057", "0.5743604", "0.5739442", "0.5738354", "0.5735178", "0.57344997", "0.57335377" ]
0.0
-1
Initialize the contents of the frame.
public void initialize(JsonObject inputMsg, ClientGameRoom cgr) { gameRoom = cgr; roomNumber = format(inputMsg.get("RoomNumber").toString()); frame = new JFrame("Game Board"); ImageIcon img = new ImageIcon("background/Gameboardbg.jpg"); JLabel imgLabel = new JLabel(img); frame.getLayeredPane().add(imgLabel, new Integer(Integer.MIN_VALUE)); imgLabel.setBounds(0, 0, img.getIconWidth(), img.getIconHeight()); Container cp = frame.getContentPane(); cp.setFont(new Font("Lucida Grande", Font.BOLD, 15)); cp.setLayout(null); ((JPanel) cp).setOpaque(false); frame.setBounds(100, 100, img.getIconWidth(), img.getIconHeight() + 20); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); JLabel lblScoreBoard = new JLabel("Score board"); lblScoreBoard.setForeground(Color.WHITE); lblScoreBoard.setFont(new Font("Lucida Grande", Font.BOLD, 20)); lblScoreBoard.setBounds(898, 13, 162, 31); cp.add(lblScoreBoard); JLabel lblChatArea = new JLabel("Chat Area"); lblChatArea.setForeground(Color.WHITE); lblChatArea.setFont(new Font("Lucida Grande", Font.BOLD, 20)); lblChatArea.setBounds(896, 397, 154, 31); cp.add(lblChatArea); textArea = new JTextArea(); textArea.setFont(new Font("Lucida Grande", Font.PLAIN, 15)); textArea.setLineWrap(true); textArea.setEditable(false); JScrollPane jsp = new JScrollPane(textArea); cp.add(jsp); jsp.setBounds(750, 432, 424, 291); textField = new JTextField(); textField.setFont(new Font("Lucida Grande", Font.PLAIN, 15)); textField.setBounds(750, 736, 344, 39); cp.add(textField); textField.setColumns(10); JButton submitButton = new JButton(""); submitButton.setIcon(new ImageIcon("buttonICON/chat.jpg")); submitButton.setFont(new Font("Lucida Grande", Font.PLAIN, 15)); // Player input chat content submitButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String chatContent = textField.getText(); message = new JsonObject(); message.addProperty("Direction", "ClientToServer"); message.addProperty("Function", "InGame"); message.addProperty("RoomNumber", roomNumber); message.addProperty("Operation", "Chat"); message.addProperty("Speaker", currentPlayer.getText()); message.addProperty("ChatContent", chatContent); jsonString = message.toString(); try { writer.write(jsonString + "\n"); writer.flush(); } catch (IOException e1) { JOptionPane.showMessageDialog(null, "Fail to connect Server", "Error", JOptionPane.ERROR_MESSAGE); System.exit(0); } textField.setText(""); } }); submitButton.setBounds(1124, 735, 44, 40); cp.add(submitButton); passButton = new JButton(""); passButton.setIcon(new ImageIcon("buttonICON/pass.jpg")); passButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { for (int i = 0; i < ROW; i++) { for (int j = 0; j < COLUME; j++) { if (board[i][j].isEditable()) { System.out.println(i + "\t" + j); board[i][j].setText(""); board[i][j].setEditable(false); } } } message = new JsonObject(); message.addProperty("Direction", "ClientToServer"); message.addProperty("Function", "InGame"); message.addProperty("RoomNumber", roomNumber); message.addProperty("PassPlayer", currentPlayer.getText()); message.addProperty("Operation", "Pass"); jsonString = message.toString(); try { writer.write(jsonString + "\n"); writer.flush(); } catch (IOException e1) { JOptionPane.showMessageDialog(null, "Fail to connect Server", "Error", JOptionPane.ERROR_MESSAGE); System.exit(0); } confirmButton.setEnabled(false); passButton.setEnabled(false); } }); passButton.setFont(new Font("Lucida Grande", Font.BOLD, 15)); passButton.setBounds(396, 703, 60, 60); passButton.setEnabled(false); cp.add(passButton); confirmButton = new JButton(""); confirmButton.setIcon(new ImageIcon("buttonICON/comfirm.jpg")); confirmButton.setFont(new Font("Lucida Grande", Font.BOLD, 15)); // Player set a letter confirmButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { int change = 0; for (int i = 0; i < ROW; i++) { for (int j = 0; j < COLUME; j++) { if (!board[i][j].getText().equals("") && board[i][j].isEditable()) { change++; temprow = i; tempcol = j; } } } // Players are only allowed to set one letter at a time if (change == 1 && Pattern.matches("^[a-zA-Z]$", board[temprow][tempcol].getText())) { message = new JsonObject(); message.addProperty("Direction", "ClientToServer"); message.addProperty("Function", "InGame"); message.addProperty("RoomNumber", roomNumber); message.addProperty("Operation", "ForVote"); message.addProperty("Row", temprow + ""); message.addProperty("Column", tempcol + ""); message.addProperty("Letter", board[temprow][tempcol].getText()); jsonString = message.toString(); writer.write(jsonString + "\n"); writer.flush(); for (int i = 0; i < ROW; i++) { for (int j = 0; j < COLUME; j++) { board[i][j].setEditable(false); } } confirmButton.setEnabled(false); passButton.setEnabled(false); } else { JOptionPane.showMessageDialog(null, "You should only input 1 letter", "Input ERROR", JOptionPane.INFORMATION_MESSAGE); } } catch (IOException e) { JOptionPane.showMessageDialog(null, "Fail to connect Server", "Error", JOptionPane.ERROR_MESSAGE); System.exit(0); } } }); confirmButton.setBounds(166, 703, 60, 60); confirmButton.setEnabled(false); cp.add(confirmButton); JLabel lblPlayer = new JLabel("Player : "); lblPlayer.setForeground(Color.WHITE); lblPlayer.setFont(new Font("Lucida Grande", Font.BOLD, 20)); lblPlayer.setBounds(12, 13, 97, 31); cp.add(lblPlayer); currentPlayer = new JTextField(); currentPlayer.setEditable(false); currentPlayer.setFont(new Font("Lucida Grande", Font.BOLD, 15)); currentPlayer.setBounds(119, 13, 176, 31); cp.add(currentPlayer); currentPlayer.setColumns(10); // Initialize the crossword form for (int i = 0; i < ROW; i++) { for (int j = 0; j < COLUME; j++) { board[i][j] = new JTextField(); board[i][j].setBounds(31 * j + 60, 31 * i + 60, 30, 30); cp.add(board[i][j]); board[i][j].setColumns(10); board[i][j].setText(""); board[i][j].setEditable(false); } } // Initialize the scoreboard for (int i = 0; i < scoreBoard.length; i++) { scoreBoard[i] = new JTextField(); scoreBoard[i].setBounds(800, 100 + 50 * i, 300, 40); cp.add(scoreBoard[i]); scoreBoard[i].setEditable(false); scoreBoard[i].setColumns(10); } playerList = new ArrayList<>(); // Initialize the player list for (int i = 0; i < inputMsg.getAsJsonArray("PlayerList").size(); i++) { gamePlayer = new GamePlayer(); gamePlayer.setPlayerName(format(inputMsg.getAsJsonArray("PlayerList").get(i) .getAsJsonObject().get("PlayerName").toString())); gamePlayer.setPlayerScore(0); playerList.add(gamePlayer); scoreBoard[i].setText(""); scoreBoard[i].setText("Player: " + gamePlayer.getPlayerName() + "\t" + "Score: " + gamePlayer.getPlayerScore()); } currentPlayer.setText(format(inputMsg.get("Destination").toString())); lblComfirm = new JLabel("comfirm=>"); lblComfirm.setForeground(Color.WHITE); lblComfirm.setFont(new Font("Lucida Grande", Font.BOLD, 20)); lblComfirm.setBounds(31, 712, 123, 39); cp.add(lblComfirm); lblPass = new JLabel("pass=>"); lblPass.setForeground(Color.WHITE); lblPass.setFont(new Font("Lucida Grande", Font.BOLD, 20)); lblPass.setBounds(271, 712, 123, 39); cp.add(lblPass); // Respond to close button events frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { try { message = new JsonObject(); message.addProperty("Direction", "ClientToServer"); message.addProperty("Function", "QuitRequest"); message.addProperty("Layer", "Board"); message.addProperty("RoomNumber", roomNumber); message.addProperty("QuitPlayer", currentPlayer.getText()); jsonString = message.toString(); writer.write(jsonString + "\n"); writer.flush(); } catch (IOException e1) { JOptionPane.showMessageDialog(null, "Fail to connect Server", "Error", JOptionPane.ERROR_MESSAGE); System.exit(0); } } }); frame.setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BreukFrame() {\n super();\n initialize();\n }", "public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "private void initialize() {\n\t\tthis.setSize(211, 449);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setTitle(\"JFrame\");\n\t}", "public SiscobanFrame() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(0, 0, 1100, 800);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tsetUIComponents();\n\t\tsetControllers();\n\n\t}", "private void initialize() {\r\n\t\tthis.setSize(530, 329);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t}", "private void initialize() {\r\n\t\tthis.setSize(300, 200);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\taddSampleData();\n\t\tsetDefaultSettings();\n\t\topenHomePage();\n\t\tframe.setVisible(true);\n\t}", "private void initialize() {\n\t\tframe = new JFrame(\"Media Inventory\");\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(0, 0, 1000, 700);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tframeContent = new JPanel();\n\t\tframe.getContentPane().add(frameContent);\n\t\tframeContent.setBounds(10, 10, 700, 640);\n\t\tframeContent.setLayout(null);\n\t\t\n\t\tinfoPane = new JPanel();\n\t\tframe.getContentPane().add(infoPane);\n\t\tinfoPane.setBounds(710, 10, 300, 640);\n\t\tinfoPane.setLayout(null);\n\t}", "private void initialize() {\n\t\tframe = new JFrame(\"BirdSong\");\n\t\tframe.pack();\n\t\tframe.setVisible(true);\n\t\tframe.setBounds(100, 100, 400, 200);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tabc = new BirdPanel();\n\t\ttime = new TimePanel();\n\t\tgetContentPane().setLayout(new BoxLayout(frame, BoxLayout.Y_AXIS));\n\n\t\tframe.getContentPane().add(abc, BorderLayout.NORTH);\n\t\tframe.getContentPane().add(time, BorderLayout.CENTER);\n\t}", "private void initialize() {\r\n\t\tthis.setSize(311, 153);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t\tsetCancelButton( btnCancel );\r\n\t}", "public Frame() {\n initComponents();\n }", "public Frame() {\n initComponents();\n }", "private void initialize() {\r\n\t\tthis.setSize(497, 316);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t\tthis.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "protected HFrame(){\n\t\tinit();\n\t}", "private void initializeFields() {\r\n myFrame = new JFrame();\r\n myFrame.setSize(DEFAULT_SIZE);\r\n }", "private void initialize() {\n\t\tthis.setSize(329, 270);\n\t\tthis.setContentPane(getJContentPane());\n\t}", "private void initialize() {\r\n\t\t//setFrame\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(125,175, 720, 512);\r\n\t\tframe.setTitle(\"Periodic Table\");\r\n\t\tframe.setResizable(false);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "private void initFrame() {\n setLayout(new BorderLayout());\n }", "private void initialize() {\n\t\tthis.setSize(300, 300);\n\t\tthis.setIconifiable(true);\n\t\tthis.setClosable(true);\n\t\tthis.setTitle(\"Sobre\");\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setFrameIcon(new ImageIcon(\"images/16x16/info16x16.gif\"));\n\t}", "public FrameControl() {\n initComponents();\n }", "private void initialize() {\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}", "public MainFrame() {\n initComponents();\n \n }", "private void init(Element frame) {\n\t\tthis.frameWidth = Integer.parseInt(frame.attributeValue(\"width\"));\n\t\tthis.frameHeight = Integer.parseInt(frame.attributeValue(\"height\"));\n\t\tthis.paddle = Integer.parseInt(frame.attributeValue(\"paddle\"));\n\t\tthis.size = Integer.parseInt(frame.attributeValue(\"size\"));\n\t}", "public MainFrame() {\n \n initComponents();\n \n this.initNetwork();\n \n this.render();\n \n }", "public internalFrame() {\r\n initComponents();\r\n }", "private void initialize() {\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setSize(810, 600);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n\t\tthis.setModal(true);\n\t\tthis.setResizable(false);\n\t\tthis.setName(\"FramePrincipalLR\");\n\t\tthis.setTitle(\"CR - Lista de Regalos\");\n\t\tthis.setLocale(new java.util.Locale(\"es\", \"VE\", \"\"));\n\t\tthis.setUndecorated(false);\n\t}", "public Mainframe() {\n initComponents();\n }", "private void initialize() {\r\n\t\tthis.setSize(392, 496);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"Informações\");\r\n\t}", "private void initialize() {\n this.setSize(253, 175);\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setContentPane(getJContentPane());\n this.setTitle(\"Breuken vereenvoudigen\");\n }", "private void initialize() {\r\n\t\t// Initialize main frame\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(Constants.C_MAIN_PREFERED_POSITION_X_AT_START, Constants.C_MAIN_PREFERED_POSITION_Y_AT_START, \r\n\t\t\t\tConstants.C_MAIN_PREFERED_SIZE_X, Constants.C_MAIN_PREFERED_SIZE_Y);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.setTitle(Constants.C_MAIN_WINDOW_TITLE);\r\n\t\t\r\n\t\t// Tab panel and their panels\r\n\t\tmainTabbedPane = new JTabbedPane(JTabbedPane.TOP);\r\n\t\tframe.getContentPane().add(mainTabbedPane, BorderLayout.CENTER);\r\n\t\t\r\n\t\tpanelDecision = new DecisionPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_DECISION_TITLE, null, panelDecision, null);\r\n\t\t\r\n\t\tpanelCalculation = new CalculationPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_CALCULATION_TITLE, null, panelCalculation, null);\r\n\t\t\r\n\t\tpanelLibrary = new LibraryPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_LIBRARY_TITLE, null, panelLibrary, null);\r\n\t\t\r\n\t\t// Menu bar\r\n\t\tmenuBar = new JMenuBar();\r\n\t\tframe.setJMenuBar(menuBar);\r\n\t\tcreateMenus();\r\n\t}", "public void initializeFrame() {\n frame.getContentPane().removeAll();\n createComponents(frame.getContentPane());\n// frame.setSize(new Dimension(1000, 600));\n }", "private void initialize() {\r\n\t\t// this.setSize(271, 295);\r\n\t\tthis.setSize(495, 392);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(ResourceBundle.getBundle(\"Etiquetas\").getString(\"MainTitle\"));\r\n\t}", "private void initializeFrame() {\n add(container);\n setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n pack();\n }", "private void initialize() {\n this.setSize(300, 200);\n this.setContentPane(getJContentPane());\n this.pack();\n }", "private void initialize() {\n\t\tframe = new JFrame(\"DB Filler\");\n\t\tframe.setBounds(100, 100, 700, 500);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tdbc = new DataBaseConnector();\n\t\tcreateFileChooser();\n\n\t\taddTabbedPane();\n\t\tsl_panel = new SpringLayout();\n\t\taddAddFilePanel();\n\t}", "public mainframe() {\n initComponents();\n }", "public FrameDesign() {\n initComponents();\n }", "public Jframe() {\n initComponents();\n setIndice();\n loadTextBoxs();\n }", "public JGSFrame() {\n\tsuper();\n\tinitialize();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n try {\n initComponents();\n initElements();\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error \" + e.getMessage());\n }\n }", "private void initialize() {\n this.setSize(495, 276);\n this.setTitle(\"Translate Frost\");\n this.setContentPane(getJContentPane());\n }", "private void initialize() {\r\n\t\t// set specific properties and add inner components.\r\n\t\tthis.setBorder(BorderFactory.createEtchedBorder());\r\n\t\tthis.setSize(300, 400);\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\taddComponents();\r\n\t}", "private void initialize() {\r\n\t\tthis.setBounds(new Rectangle(0, 0, 670, 576));\r\n\t\tthis.setResizable(false);\r\n\t\tthis.setTitle(\"数据入库 \");\r\n\t\tthis.setLocationRelativeTo(getOwner());\r\n\t\tthis.setContentPane(getJContentPane());\r\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 initialize() {\n this.setLayout(new BorderLayout());\n this.setSize(new java.awt.Dimension(564, 229));\n this.add(getMessagePanel(), java.awt.BorderLayout.NORTH);\n this.add(getBalloonSettingsListBox(), java.awt.BorderLayout.CENTER);\n this.add(getBalloonSettingsButtonPane(), java.awt.BorderLayout.SOUTH);\n\n editBalloonSettingsFrame = new EditBalloonSettingsFrame();\n\n }", "public SMFrame() {\n initComponents();\n updateComponents();\n }", "private void initialize() {\n m_frame = new JFrame(\"Video Recorder\");\n m_frame.setResizable(false);\n m_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n m_frame.setLayout(new BorderLayout());\n m_frame.add(buildContentPanel(), BorderLayout.CENTER);\n\n JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 5, 5));\n JButton startButton = new JButton(\"Start\");\n startButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent ae) {\n listen();\n }\n });\n buttonPanel.add(startButton);\n\n m_connectionLabel = new JLabel(\"Disconnected\");\n m_connectionLabel.setOpaque(true);\n m_connectionLabel.setBackground(Color.RED);\n m_connectionLabel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 3));\n m_connectionLabel.setPreferredSize(new Dimension(100, 26));\n m_connectionLabel.setHorizontalAlignment(SwingConstants.CENTER);\n buttonPanel.add(m_connectionLabel);\n\n m_frame.add(buttonPanel, BorderLayout.PAGE_END);\n }", "public FirstNewFrame() {\n\t\tjbInit();\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(Color.BLACK);\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Play\");\n\t\tbtnNewButton.setFont(new Font(\"Bodoni 72\", Font.BOLD, 13));\n\t\tbtnNewButton.setBounds(frame.getWidth() / 2 - 60, 195, 120, 30);\n\t\tframe.getContentPane().add(btnNewButton);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Space Escape\");\n\t\tlblNewLabel.setForeground(Color.WHITE);\n\t\tlblNewLabel.setFont(new Font(\"Bodoni 72\", Font.BOLD, 24));\n\t\tlblNewLabel.setBounds(frame.getWidth() / 2 - 60, 30, 135, 25);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"New label\");\n\t\tlblNewLabel_1.setBounds(0, 0, frame.getWidth(), frame.getHeight());\n\t\tframe.getContentPane().add(lblNewLabel_1);\n\t}", "private void initializeFrame()\r\n\t{\r\n\t\tthis.setResizable(false);\r\n\r\n\t\tsetSize(DIMENSIONS); // set the correct dimensions\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetLayout( new GridLayout(1,1) );\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 MainFrame() {\n initComponents();\n setLocationRelativeTo(null);\n }", "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 init()\n {\n buildUI(getContentPane());\n }", "private void initialize()\n {\n this.setTitle( \"SerialComm\" ); // Generated\n this.setSize( 500, 300 );\n this.setContentPane( getJContentPane() );\n }", "public launchFrame() {\n \n initComponents();\n \n }", "private void initialize() {\r\n\t\tthis.setSize(378, 283);\r\n\t\tthis.setJMenuBar(getMenubar());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JAVIER\");\r\n\t}", "private void initialize() {\n\t\tthis.setSize(430, 280);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setUndecorated(true);\n\t\tthis.setModal(true);\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setTitle(\"Datos del Invitado\");\n\t\tthis.addComponentListener(this);\n\t}", "public PilaFrame() {\n initComponents();\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 900, 900);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tgame = new Game();\n\t\t\n\t\tGameTable puzzle = new GameTable(game.getPuzzle());\n\t\tpuzzle.setBounds(100, 100, 700, 700);\n\t\t\n\t\tframe.add(puzzle);\n\t\t\n\t\tSystem.out.println(\"SAD\");\n\t\t\n\t}", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setResizable(false);\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tPanel mainFramePanel = new Panel();\r\n\t\tmainFramePanel.setBounds(10, 10, 412, 235);\r\n\t\tframe.getContentPane().add(mainFramePanel);\r\n\t\tmainFramePanel.setLayout(null);\r\n\t\t\r\n\t\tfinal TextField textField = new TextField();\r\n\t\ttextField.setBounds(165, 62, 79, 24);\r\n\t\tmainFramePanel.add(textField);\r\n\t\t\r\n\t\tButton changeTextButt = new Button(\"Change Text\");\r\n\t\tchangeTextButt.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\ttextField.setText(\"Domograf\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tchangeTextButt.setBounds(165, 103, 79, 24);\r\n\t\tmainFramePanel.add(changeTextButt);\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setResizable(false);\n\t\tframe.setAlwaysOnTop(true);\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t}", "StudentFrame() {\n \tgetContentPane().setFont(new Font(\"Times New Roman\", Font.PLAIN, 11));\n s1 = null; // setting to null\n initializeComponents(); // causes frame components to be initialized\n }", "private void initialize() {\r\n\t\tthis.setSize(300, 200);\r\n\t\tthis.setTitle(\"Error\");\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}", "public NewFrame() {\n initComponents();\n }", "public SerialCommFrame()\n {\n super();\n initialize();\n }", "public LoginFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public BaseFrame() {\n initComponents();\n }", "private void initialize() {\r\n\t\tthis.setSize(733, 427);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"jProxyChecker\");\r\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}", "public MercadoFrame() {\n initComponents();\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 800, 800);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJPanel browserPanel = new JPanel();\n\t\tframe.getContentPane().add(browserPanel, BorderLayout.CENTER);\n\t\t\n\t\t// create javafx panel for browser\n browserFxPanel = new JFXPanel();\n browserPanel.add(browserFxPanel);\n \n // create JavaFX scene\n Platform.runLater(new Runnable() {\n public void run() {\n createScene();\n }\n });\n\t}", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(X_FRAME, Y_FRAME, WIDTH_FRAME, HEIGHT_FRAME);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJButton btnAddSong = new JButton(\"Add song\");\r\n\t\tbtnAddSong.setBounds(X_BTN, Y_ADDSONG, WIDTH_BTN, HEIGHT_BTN);\r\n\t\tframe.getContentPane().add(btnAddSong);\r\n\t\t\r\n\t\tJTextPane txtpnBlancoYNegro = new JTextPane();\r\n\t\ttxtpnBlancoYNegro.setText(\"Blanco y negro\\r\\nThe Spectre\\r\\nGirasoles\\r\\nFaded\\r\\nTu Foto\\r\\nEsencial\");\r\n\t\ttxtpnBlancoYNegro.setBounds(X_TXT, Y_TXT, WIDTH_TXT, HEIGHT_TXT);\r\n\t\tframe.getContentPane().add(txtpnBlancoYNegro);\r\n\t\t\r\n\t\tJLabel lblSongs = new JLabel(\"Songs\");\r\n\t\tlblSongs.setBounds(X_LBL, Y_LBL, WIDTH_LBL, HEIGHT_LBL);\r\n\t\tframe.getContentPane().add(lblSongs);\r\n\t\t\r\n\t\tJButton btnAddAlbum = new JButton(\"Add album\");\r\n\t\tbtnAddAlbum.setBounds(X_BTN, Y_ADDALBUM, WIDTH_BTN, HEIGHT_BTN);\r\n\t\tframe.getContentPane().add(btnAddAlbum);\r\n\t}", "public holdersframe() {\n initComponents();\n }", "public void init() {\n\t\tsetSize(500,300);\n\t}", "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}", "public addStFrame() {\n initComponents();\n }", "public JFrame() {\n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "private void initialize() {\n\t\tframe = new JFrame(\"View Report\");\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\n\t\tJButton backButton = new JButton(\"Back\");\n\t\tbackButton.setBounds(176, 227, 89, 23);\n\t\tframe.getContentPane().add(backButton);\n\t\tbackButton.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tframe.setVisible(false);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJTextArea textArea = new JTextArea();\n\t\ttextArea.setBounds(50, 30, 298, 173);\n\t\tframe.getContentPane().add(textArea);\n\t\ttextArea.append(control.seeReport());\n\t\tframe.setVisible(true);\n\t}", "private void initialize() {\r\n this.setSize(new Dimension(666, 723));\r\n this.setContentPane(getJPanel());\r\n\t\t\t\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\t\n\t\tJLabel lblSubmission = new JLabel(\"Submission\");\n\t\tlblSubmission.setForeground(Color.WHITE);\n\t\tlblSubmission.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 16));\n\t\tlblSubmission.setBounds(164, 40, 83, 14);\n\t\tframe.getContentPane().add(lblSubmission);\n\t\t\n\t\tJLabel lblTitle = new JLabel(\"Title:\");\n\t\tlblTitle.setForeground(Color.WHITE);\n\t\tlblTitle.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 14));\n\t\tlblTitle.setBounds(77, 117, 41, 14);\n\t\tframe.getContentPane().add(lblTitle);\n\t\t\n\t\tJLabel lblPath = new JLabel(\"Path:\");\n\t\tlblPath.setForeground(Color.WHITE);\n\t\tlblPath.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 14));\n\t\tlblPath.setBounds(85, 155, 33, 14);\n\t\tframe.getContentPane().add(lblPath);\n\t\t\n\t\ttitle = new JTextField();\n\t\ttitle.setBounds(128, 116, 197, 20);\n\t\tframe.getContentPane().add(title);\n\t\ttitle.setColumns(10);\n\t\t\n\t\tpath = new JTextField();\n\t\tpath.setBounds(128, 154, 197, 20);\n\t\tframe.getContentPane().add(path);\n\t\tpath.setColumns(10);\n\t\t\n\t\tbtnSubmit = new JButton(\"Submit\");\n\t\tbtnSubmit.setBackground(Color.BLACK);\n\t\tbtnSubmit.setForeground(Color.WHITE);\n\t\tbtnSubmit.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 14));\n\t\tbtnSubmit.setBounds(158, 210, 89, 23);\n\t\tframe.getContentPane().add(btnSubmit);\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tframe.setVisible(true);\n\t}", "public void init() {\r\n\t\t\r\n\t\tsetSize(WIDTH, HEIGHT);\r\n\t\tColor backgroundColor = new Color(60, 0, 60);\r\n\t\tsetBackground(backgroundColor);\r\n\t\tintro = new GImage(\"EvilMehranIntroGraphic.png\");\r\n\t\tintro.setLocation(0,0);\r\n\t\tadd(intro);\r\n\t\tplayMusic(new File(\"EvilMehransLairThemeMusic.wav\"));\r\n\t\tinitAnimationArray();\r\n\t\taddKeyListeners();\r\n\t\taddMouseListeners();\r\n\t\twaitForClick();\r\n\t\tbuildWorld();\r\n\t}", "public FrameIntroGUI() {\n\t\ttry {\n\t\t\tjbInit();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void initialize() {\n\t\tthis.setBounds(100, 100, 950, 740);\n\t\tthis.setLayout(null);\n\n\t\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblCoisa = new JLabel(\"Coisa\");\n\t\tlblCoisa.setBounds(10, 11, 46, 14);\n\t\tframe.getContentPane().add(lblCoisa);\n\t\t\n\t\ttextField = new JTextField();\n\t\ttextField.setBounds(39, 8, 86, 20);\n\t\tframe.getContentPane().add(textField);\n\t\ttextField.setColumns(10);\n\t}", "private void initialize() {\n\t\tthis.setExtendedState(Frame.MAXIMIZED_BOTH);\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setResizable(true);\n\t\tthis.screenDimensions = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tthis.getContentPane().setLayout(new BorderLayout());\n\t\t// Initialize SubComponents and GUI Commands\n\t\tthis.initializeSplitPane();\n\t\tthis.initializeExplorer();\n\t\tthis.initializeConsole();\n\t\tthis.initializeMenuBar();\n\t\tthis.pack();\n\t\tthis.hydraExplorer.refreshExplorer();\n\t}" ]
[ "0.77704835", "0.75652915", "0.7442664", "0.7369101", "0.7366378", "0.7358479", "0.73146075", "0.73096764", "0.72987294", "0.72978777", "0.7278321", "0.72729623", "0.7269468", "0.7269468", "0.7215727", "0.7180792", "0.71682984", "0.7140954", "0.7140953", "0.7126852", "0.7107974", "0.7100368", "0.7092515", "0.708178", "0.70652425", "0.70630395", "0.70621413", "0.7060283", "0.70517516", "0.7043992", "0.6996167", "0.6978269", "0.6971387", "0.6956391", "0.6938475", "0.6929829", "0.6929629", "0.69251114", "0.6921989", "0.6920365", "0.6914633", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.69020075", "0.68911743", "0.6886017", "0.6873457", "0.6870402", "0.68686837", "0.68669385", "0.686311", "0.68616706", "0.68552315", "0.68537515", "0.681551", "0.68141145", "0.68094325", "0.67992085", "0.67930394", "0.6782133", "0.6765297", "0.6748138", "0.6731745", "0.6716807", "0.6711878", "0.6706194", "0.6697453", "0.6692831", "0.66927665", "0.6689213", "0.66724384", "0.66606426", "0.664954", "0.6642464", "0.6640775", "0.6638488", "0.663824", "0.663545", "0.66264987", "0.6625419", "0.6611392", "0.6608291", "0.6600817", "0.66005784", "0.6591052", "0.65869486", "0.65862876", "0.65753394", "0.6575285", "0.6570335", "0.655961" ]
0.0
-1
Activate the crossword form to the player's turn
public void setLetter() { confirmButton.setEnabled(true); passButton.setEnabled(true); for (int i = 0; i < ROW; i++) { for (int j = 0; j < COLUME; j++) { if (board[i][j].getText().equals("")) { board[i][j].setEditable(true); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void crossPressed() {\n\t\tif (!talkmode) {\n\t\t\tif (checkLoot() || checkNearbyVillagers() || checkDoors(doors, player.direction) || checkSigns()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\tif (question) {\n\t\t\t\texitQuestionDialog();\n\t\t\t}\n\n\t\t\tLoot g = dialog.getGift();\n\t\t\tif (g != null) {\n\t\t\t\tLoad.collectLoot(g);\n\t\t\t}\n\t\t\tString takeName = dialog.getTakeName();\n\t\t\tif (takeName != null) {\n\t\t\t\tint takeAmount = dialog.getTakeAmount();\n\t\t\t\tif (takeName.equals(\"gold\")) {\n\t\t\t\t\tLoad.getPartyItems().addGold(-takeAmount);\n\t\t\t\t} else {\n\t\t\t\t\tLoad.getPartyItems().take(takeName, takeAmount);\n\t\t\t\t}\n\t\t\t}\n\t\t\tHashMap<String, Integer> t = dialog.getBeforeTriggers();\n\t\t\tHashMap<String, Integer> triggerAdds = dialog.getTriggerAdds();\n\t\t\tboolean finished = dialog.isFinished();\n\t\t\tdoTriggers(t);\n\t\t\tif (triggerAdds != null) {\n\t\t\t\tDatabase.incrementStatus(triggerAdds);\n\t\t\t}\n\t\t\tif (finished) {\n\t\t\t\tsetTalking(false);\n\t\t\t\tif (dialog.shouldTrigger()) {\n\t\t\t\t\tt = dialog.getTriggers();\n\t\t\t\t\tdoTriggers(t);\n\t\t\t\t\texecuteTrigger(talkingVillager);\n\t\t\t\t} else {\n\t\t\t\t\tdialog.resetDialog();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (dialog.isQuestion()) {\n\t\t\t\t\tinitQuestionDialog();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void decidesActivateBoard(Piece turn){\n\t\tif(multiview()){\n\t\t\tif(this.LOCAL_PIECE.equals(turn))activateBoard();\n\t\t\telse deActivateBoard();\n\t\t}\n\t\telse activateBoard();\n\t}", "public void takeTurn(){\r\n //Handled by GameWindow buttons\r\n }", "public void clawOpen(){\n claw.setPosition(0.1);\n }", "public void doTurn() {\n\t\tGFrame.getInstance().aiHold();\n\t}", "public void act()\n {\n displayBoard();\n Greenfoot.delay(10);\n \n if( checkPlayerOneWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player One!\", \"playerOne Win\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkPlayerTwoWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player Two!\", \"plauerTwo Win\",JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkBoardFilled() == true )\n {\n JOptionPane.showMessageDialog( null, \"It is a draw!\", \"Wrong step\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( messageShown == false )\n {\n showTurn();\n \n messageShown = true;\n }\n \n checkMouseClick();\n }", "public void crossPressed() {\n\t\tif (edit) {\n\t\t\tselectCard();\n\t\t} else {\n\t\t\tString command = activeNode.getCurrentChild().getName();\n\t\t\tif (command.equals(\"Edit\")) {\n\t\t\t\tSoundPlayer.playSound(SoundMap.MENU_ACCEPT);\n\t\t\t\tstartEditing(CHARACTER_DECK);\n\t\t\t} else if (command.equals(\"Back\")) {\n\t\t\t\tif (currentDeck != null) { \n\t\t\t\t\tcurrentDeck.setActive(false);\n\t\t\t\t\tcurrentDeck = null;\n\t\t\t\t}\n\t\t\t\tSoundPlayer.playSound(SoundMap.MENU_BACK);\n\t\t\t\tcirclePressed();\n\t\t\t}\n\t\t}\n\t}", "public void mapMode() {\n\t\ttheTrainer.setUp(false);\n\t\ttheTrainer.setDown(false);\n\t\ttheTrainer.setLeft(false);\n\t\ttheTrainer.setRight(false);\n\n\t\tinBattle = false;\n\t\tred = green = blue = 255;\n\t\tthis.requestFocus();\n\t}", "public void GameWin () {\n\t\t\n\t\twordDashes.setText(mysteryWord);\n\t\tguessBttn.setVisible(false);\n\t\tguessFullWord.setVisible(false);\n\t\tAnswerBox.setDisable(true); //can no longer use the text box\n\t\tresultMessage.setText(\" Great Job!!\\nYou Guessed the Word!!\");\n\t\tplayAgain.setVisible(true); \n\t\t\n\t}", "public void handleActivateLeader(ActionEvent event){\n\n Button activateButton = (Button) event.getSource();\n\n if(activateButton== activate0){\n sender.sendInput(\"activate leader card 0\");\n activatedLeader = activate0;\n discardedLeader = burn0;\n }\n\n if(activateButton== activate1){\n sender.sendInput(\"activate leader card 1\");\n activatedLeader = activate1;\n discardedLeader = burn1;\n\n }\n\n if(activateButton== activate2){\n sender.sendInput(\"activate leader card 2\");\n activatedLeader = activate2;\n discardedLeader = burn2;\n\n }\n\n if(activateButton== activate3){\n sender.sendInput(\"activate leader card 3\");\n activatedLeader = activate3;\n discardedLeader = burn3;\n\n }\n\n activateButton.setDisable(true);\n\n }", "private static void turnFlashlightOn() {\n Parameters p = cam.getParameters();\n p.setFlashMode(Parameters.FLASH_MODE_TORCH);\n cam.setParameters(p);\n }", "private void computerTurn() {\n currentWord = ghostT.getText().toString();\n\n // 1.Check if the fragment is a word with at least 4 characters. If so declare victory by updating the game status\n if (dictionary.isWord(currentWord) && currentWord.length() >= 4) {\n //Log.d(\"TAG\", \"computerTurn: true\");\n status.setText(\"Computer won\");\n Toast.makeText(this, \"Word is VALID with length > 3 YOU LOST\", Toast.LENGTH_LONG).show();\n afterCheck=true;\n userTurn=false;\n }\n // 2.Use the dictionary's getAnyWordStartingWith method to get a possible longer word with currentWord as a prefix\n else {\n String randomWord = dictionary.getGoodWordStartingWith(currentWord,startCheck);\n\n /** 3.If such a word doesn't exist (method returns null),\n * challenge the user's fragment and declare victory (you can't bluff this computer!)\n **/\n if (randomWord == null) {\n status.setText(\"Computer WON\");\n Toast.makeText(this, \"you can't bluff this computer current word is INVALID YOU LOST\", Toast.LENGTH_LONG).show();\n afterCheck=true;\n userTurn=false;\n }\n\n /** 4 .If such a word does exist,\n * add the next letter of it to the fragment (remember the substring method in the Java string library)\n **/\n else {\n char nextLetter = randomWord.charAt(currentWord.length());\n currentWord += nextLetter;\n ghostT.setText(currentWord);\n status.setText(USER_TURN);\n userTurn = true;\n }\n }\n //challenge.setEnabled(true);\n\n //status.setText(USER_TURN);\n /** Reseting Game after over**/\n if(afterCheck==true) {\n /**handler = new Handler();\n * handler.postDelayed(new Runnable() {\n * @Override\n * public void run() {\n * //Do something after 2seconds\n * //invoke computerturn\n * onStart(null);\n * }\n * }, 2000);\n * */\n Toast.makeText(this, \"Click Restart to start New Game\", Toast.LENGTH_LONG).show();\n }\n }", "private void yourTurn() throws InterruptedException {\n yourTurnPane.setVisible(true);\n PauseTransition delay = new PauseTransition(Duration.seconds(3));\n delay.setOnFinished( event -> yourTurnPane.setVisible(false) );\n delay.play();\n }", "public void changeTurn( boolean myTurn ) {\n\t\t// Go through all buttons and reset their visiblity\n\t\t// and specify enables based on who's turn it is.\n\t\tfor ( int row = 0; row < GRID_ROWS; row++ ) {\n\t\t\tfor ( int col = 0; col < GRID_COLS; col++ ) {\n\t\t\t\tletterButton[row][col].setEnabled( myTurn );\n\t\t\t\tletterButton[row][col].setVisible( true );\n\t\t\t}\n\t\t}\n\t\t// Reset word field\n\t\twordField.setText( \"\" );\n\t\tokButton.setEnabled( myTurn );\n\t}", "public void activate() {\n\t\t\t\n\t\t//Prior to activation add objects to Community\n\t\tthis.buildings = new ArrayList<>();\t//setup buildings\n \tBuilding[] buildings = control.buildings();\n\t\tCollections.addAll(this.buildings, buildings);\n \t\n\t\t//Timer for animation\n\t\t//Argument 1: timerValue is a period in milliseconds to fire event\n\t\t//Argument 2:t any class that \"implements ActionListener\"\n\t\ttimer = new Timer(control.timerValue, this); //timer constructor\n\t\ttimer.restart(); //restart or start\n\t\t\n\t\t// frame becomes visible\n\t\tframe.setVisible(true);\t\t\n\t}", "void activate();", "void activate();", "@Override\r\n public void show() {\r\n Gdx.input.setInputProcessor(combatController);\r\n }", "private void beginMyTurn() {\n clientgui.setDisplayVisible(true);\n selectEntity(clientgui.getClient().getFirstDeployableEntityNum());\n setNextEnabled(true);\n setRemoveEnabled(true);\n // mark deployment hexes\n clientgui.bv.markDeploymentHexesFor(ce());\n }", "private void ControlType2(int time) {\n\t\tif (GameEngine.isKeyHeld(\"D\")) {\n\t\t\tgraphic.setX(graphic.getX() + speed * time);\n\t\t}\n\t\tif (GameEngine.isKeyHeld(\"A\")) {\n\t\t\tgraphic.setX(graphic.getX() - speed * time);\n\t\t}\n\t\tif (GameEngine.isKeyHeld(\"S\")) {\n\t\t\tgraphic.setY(graphic.getY() + speed * time);\n\t\t}\n\t\tif (GameEngine.isKeyHeld(\"W\")) {\n\t\t\tgraphic.setY(graphic.getY() - speed * time);\n\t\t}\n\t\tgraphic.setDirection(GameEngine.getMouseX(), GameEngine.getMouseY());\n\t\t//set hero facing cursor\n\t}", "private static void createParty() {\n\n\n JFrame fenetre = new JFrame(\"Little Thief Auto\");\n\n Route route = new Route();\n User user = new User();\n\n Affichage affichage = new Affichage(fenetre, user, route);\n Controleur ctrl = new Controleur(affichage, user, route);\n //ctrl.setAffichage(affichage);\n //ctrl.setCmds();\n //Deplace deplace = new Deplace(user, route, affichage);\n\n //deplace.start();//Voir qui le lance, en fonction de si il y a une fenetre de demarage ou pas\n Data.initGame();\n\n //fenetre.add(affichage);\n //fenetre.add(affichage.outScreen);\n affichage.switchInteface(false);\n\n //ctrl.startPartie(); //Pas d ecran dacceuil\n /*\n\n Voler fly = new Voler();\n Etat modele = new Etat(fly);\n Controleur ctrl = new Controleur(modele);\n Affichage affichage = new Affichage(ctrl, modele);\n VueBird bird = new VueBird(affichage);\n\n Instant start = Instant.now();\n affichage.setTimer(start);\n\n ctrl.setVue(affichage);\n Avancer avance = new Avancer(affichage, modele.getParcours());\n\n ctrl.enableKeyPad();\n enableReload(fenetre, affichage);\n\n modele.getParcours().setTime(start);\n fly.start();\n avance.start();\n\n\n\n fenetre.add(affichage);\n*/\n\n\n\n\n fenetre.pack();\n fenetre.setVisible(true);\n fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }", "private void showTurn()\n {\n if( PlayerOneTurn == true )\n {\n if( messageShown == false )\n {\n JOptionPane.showMessageDialog( null, playerOneName + \"it is your turn.\", \"for playerOne\", JOptionPane.PLAIN_MESSAGE );\n \n }\n }\n else\n {\n if( messageShown == false )\n {\n JOptionPane.showMessageDialog( null, playerTwoName + \"it is your turn.\", \"for playerTwo\", JOptionPane.PLAIN_MESSAGE );\n \n }\n }\n }", "public void action(){\n turn.sendMsg(turn.getController().getTurnOwner().getName()+\"'s turn!\");\n if(turn.getPlayer().isDown()){\n turn.setPhase(new RecoveryPhase());\n }else {\n turn.setPhase(new StarsPhase());\n }\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tmsgsnd(\"start\");\r\n\t\t\t\ttoppanel.setVisible(true);\r\n\t\t\t\tbottompanel.setVisible(true);\r\n\t\t\t\tanswer.requestFocus();\r\n\t\t\t}", "protected void changeSideClicked(ActionEvent e) {\n blackPlayer = 1 - blackPlayer;\n updateTurnInfo();\n startNewGame();\n }", "void askTurn();", "public void Turn(){\r\n \r\n }", "public void reinforce() {\r\n\r\n\t\tmch.clicked = false;\r\n\t\t\r\n\t\tif (phaseInit == 0) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tattackSlide.setVisible(false);\r\n\t\t\tattacker.setVisible(false);\r\n\t\t\treinforced = false;\r\n\t\t\t// If run out of cards, fill the cards array with the usedCards\r\n\t\t\tif (Cards.size() == 0) {\r\n\t\t\t\tCards = usedCards;\r\n\t\t\t\tusedCards = new ArrayList<Card>();\r\n\t\t\t\tCollections.shuffle(Cards);\r\n\t\t\t}\r\n\t\t\t// Dehighlight all countries that were previously highlighted\r\n\t\t\t\r\n\t\t\tfor (Player pa : players) {\r\n\t\t\t\tfor (Country ca : pa.getCountries()){\r\n\t\t\t\t\tif (ca.isHighlighted()) {\r\n\t\t\t\t\t\tnew threadz(ca, pa.getColor(), false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\t// If a player has attacked that turn and won at least one battle it will win a\r\n\t\t\t// card\r\n\t\t\tif (hasAttacked == true && hasWon == true) {\r\n\t\t\t\t// Give that player a card.\r\n\t\t\t\tplayers.get(turnCounter).addCard(Cards.get(0));\r\n\t\t\t\tCards.remove(0);\r\n\t\t\t\thasAttacked = false;\r\n\t\t\t\thasWon = false;\r\n\r\n\t\t\t\t// Refresh the cards\r\n\t\t\t\tfor (int x = 0; x < 5; x++) {\r\n\t\t\t\t\tcardPics[x].setIcon(null);\r\n\t\t\t\t\tif (cardPics[x].getMouseListeners() != null)\r\n\t\t\t\t\t\tcardPics[x].removeMouseListener(mch);\r\n\t\t\t\t\tcardSelectedPics[x].setVisible(false);\r\n\t\t\t\t\tcardSelectedPics[x].setBackground(players.get(turnCounter).getColor());\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Draw the player's cards\r\n\t\t\t\tg.setColor(Color.WHITE);\r\n\t\t\t\tg.setFont(new Font(\"Impact\", Font.BOLD, 20));\r\n\t\t\t\tg.drawString(\"Player \" + (turnCounter + 1) + \"'s Cards\", 105, 750);\r\n\t\t\t\tBufferedImage img = null;\r\n\t\t\t\tfor (int y = 0; y < players.get(turnCounter).getCards().size(); y++) {\r\n\t\t\t\t\tcardPics[y].addMouseListener(mch);\r\n\t\t\t\t\tcardPics[y].setEnabled(true);\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\timg = ImageIO.read(\r\n\t\t\t\t\t\t\t\t// Read in the image from a separate file\r\n\t\t\t\t\t\t\t\tnew File (\"Ressources/\" +\"Cards/\" + players.get(turnCounter).getCards().get(y).getCountry()\r\n\t\t\t\t\t\t\t\t\t\t+ \"Card.png\"));\r\n\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t// Catch\r\n\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcardPics[y].setIcon(new ImageIcon(recolorCard(img, y)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString s = \"\";\r\n\t\tfor (Player p : Board.players) {\r\n\t\t\t// get the name of the country that has been clicked\r\n\t\t\tfor (Country c : p.getCountries()) {\r\n\t\t\t\tif (hoveredColor.equals(c.getDetectionColor())) {\r\n\t\t\t\t\ts = c.getName();\r\n\t\t\t\t}\r\n\t\t\t\t// Ensure this country is one the current player owns and the country has more\r\n\t\t\t\t// than one troop\r\n\t\t\t\tif (hoveredColor.equals(c.getDetectionColor()) && players.get(turnCounter).checkOwn(s)&& c.getTroops() > 1 && c.isHighlighted() == false && reinforced == false) {\r\n\t\t\t\t\t// Dehighlight any countries that were previously selected\r\n\t\t\t\t\tfor (Player player : players) {\r\n\t\t\t\t\t\tfor (Country ca : player.getCountries()) {\r\n\t\t\t\t\t\t\tif (ca.isHighlighted()) {\r\n\t\t\t\t\t\t\t\tnew threadz(ca, player.getColor(), false);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Highlight the new selected country, and its neighboring countries\r\n\t\t\t\t\tnew threadz(c, players.get(turnCounter).getColor().brighter().brighter().brighter(), true);\r\n\t\t\t\t\tc.highlightOwned();\r\n\t\t\t\t\tattackingCountry = c;\r\n\t\t\t\t\treinforced = true;\r\n\t\t\t\t} else if (hoveredColor.equals(c.getDetectionColor()) && c.isHighlighted()\r\n\t\t\t\t\t\t&& c.getName().equals(attackingCountry.getName()) \r\n\t\t\t\t\t\t== false && checkO(c) == true\r\n\t\t\t\t\t\t&& attackingCountry.getTroops() > 1) {\r\n\r\n\t\r\n\t\t\t\t\tdefendingCountry = c;\r\n\r\n\t\t\t\t\tattackingCountry.setTroops(attackingCountry.getTroops() - 1);\r\n\t\t\t\t\tdefendingCountry.setTroops(defendingCountry.getTroops() + 1);\r\n\r\n\t\t\t\t\t// new threadz(attackingCountry,\r\n\t\t\t\t\t// players.get(turnCounter).getColor().brighter().brighter().brighter(), false);\r\n\r\n\t\t\t\t\tif (attackingCountry.getTroops() == 1) {\r\n\t\t\t\t\t\tattackingCountry.unHighlightNeighbours();\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tphaseInit++;\r\n\t}", "private void myTurn()\n\t{\n\t\t\n\t\tif (canPlay())\n\t\t{\n\t\t\tif (isTop())\n\t\t\t{\n\t\t\t\traise();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tequal();\n\t\t\t}\n\t\t}\n\t\ttable.nextPlayer();\n\t\t\n\t}", "private void computerTurn() {\n String text = txtWord.getText().toString();\n String nextWord;\n if (text.length() >= 4 && dictionary.isWord(text)){\n endGame(false, text + \" is a valid word\");\n return;\n } else {\n nextWord = dictionary.getGoodWordStartingWith(text);\n if (nextWord == null){\n endGame(false, text + \" is not a prefix of any word\");\n return;\n } else {\n addTextToGame(nextWord.charAt(text.length()));\n }\n }\n userTurn = true;\n txtLabel.setText(USER_TURN);\n }", "public void turnCW() {\n turn(true);\n }", "public void changeTurn() {\n if (turn == 1) {\n turn = 2;\n\n } else {\n turn = 1;\n\n }\n setTextBackground();\n }", "private void control() {\n try {\n gameThread.sleep(17);\n } catch (InterruptedException e) { }\n }", "public void beginTurn(){\n }", "@Override\n\tprotected void activateBoard() {\n\t\tsuper.activateBoard();\n\t\taddMsg(\"Click on an origin cell\\n\");\n\t}", "@Override\n\tprotected void activateBoard() {\n\t\tsuper.activateBoard();\n\t\taddMsg(\"Click on an origin cell\\n\");\n\t}", "public void start(){\r\n\t\tcantStop.getGameBoard().startNewTurn();\r\n\t\tallowNewRoll();\r\n\t}", "private void c_Activate(String name, boolean activate) {\r\n if(m_active = activate) {\r\n m_botAction.sendSmartPrivateMessage(name, \"Reacting to players who fly over safety tiles.\");\r\n } else {\r\n m_botAction.sendSmartPrivateMessage(name, \"NOT Reacting to players who fly over safety tiles.\");\r\n }\r\n }", "public void activate() {\n // PROGRAM 1: Student must complete this method\n if (control == 0) { // run and()\n \t\tand();\n \t} else if (control == 1) { //run or()\n \t\tor();\n \t} else if (control == 2) { //run add()\n \t\tadd();\n \t} else if (control == 6) { //run sub()\n \t\tsub();\n \t} else if (control == 7) { //run passB()\n \t\tpassB();\n \t} else {\n \t\tthrow new RuntimeException(\"invalid control\"); //otherwise, there was an invalid control\n \t}\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tmapa.encerrarTurno(0);\r\n\t\t\t\t\r\n\t\t\t}", "public TicTacFrame() {\n initComponents();\n this.setTitle(\"Ultimate Tic Tac Toe jeu\");\n this.setLocationRelativeTo(null); \n \n gameUndoVector=new Vector();\n \n pan=new TicTacPrincipalePanel(this,this.Panel.getWidth()-6,this.Panel.getHeight()-6);\n this.Panel.setBackground(pan.getBackground());\n this.Panel.add(pan);\n DisablePanel();\n \n PLAYERS_ComboBox1.removeAllItems();\n PLAYERS_ComboBox1.addItem(\"HUMAN VS HUMAN\");\n PLAYERS_ComboBox1.addItem(\"HUMAN VS Machine\");\n \n \n \n }", "public void changeTurn()\r\n {\r\n isPlayersTurn = !isPlayersTurn;\r\n }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tlblMode.setText(\"Leap Motion\");\r\n\t\t\t}", "@Override\n public void actionPerformed(ActionEvent evt) {\n\t\t\t\tv = new SpaceShip(180, 525, 50, 50,1);\t// Create Player1\n\t\t\t\tv2 = new SpaceShip(180, 525, 50, 50,2); // Create Player2\n\t\t\t\tgp = new GamePanel();\n\t\t\t\t//New Game Single mode\n\t\t\t\tengine = new GameEngine(gp, v, v2,1);\n\n\n\t\t\t\t//Remove button's panel from Main frame\n\t\t\t\tframe.getContentPane().remove(buttonPanel);\n\n\t\t\t\t//add KeyListener and GamePanel to Main frame\n\t\t\t\tframe.addKeyListener(engine);\n\t\t\t\tframe.getContentPane().add(gp,BorderLayout.CENTER);\n\n\t\t\t\t//Start timmer\n\t\t\t\tengine.start();\n\n\t\t\t\t//Setting MainFrame and re-panting\n\t\t\t\tframe.validate();\n\t\t\t\tframe.repaint();\n\n\t\t\t\t//Eable KeyListener\n\t\t\t\tframe.requestFocus();\n }", "private void startNewGame()\n {\n \n \t//this.mIsSinglePlayer = isSingle;\n \n \tmGame.clearBoard();\n \n \tfor (int i = 0; i < mBoardButtons.length; i++)\n \t{\n \t\tmBoardButtons[i].setText(\"\");\n \t\tmBoardButtons[i].setEnabled(true);\n \t\tmBoardButtons[i].setOnClickListener(new ButtonClickListener(i));\n \t\t//mBoardButtons[i].setBackgroundDrawable(getResources().getDrawable(R.drawable.blank));\n \t}\n \n \t\tmPlayerOneText.setText(\"Player One:\"); \n \t\tmPlayerTwoText.setText(\"Player Two:\"); \n \n \t\tif (mPlayerOneFirst) \n \t{\n \t\t\tmInfoTextView.setText(R.string.turn_player_one); \n \t\tmPlayerOneFirst = false;\n \t}\n \telse\n \t{\n \t\tmInfoTextView.setText(R.string.turn_player_two); \n \t\tmPlayerOneFirst = true;\n \t}\n \t\n \n \tmGameOver = false;\n }", "public void confirmLightning() {\n selectedLightning = true;\n }", "private void startGame() {\n betOptionPane();\n this.computerPaquetView.setShowJustOneCard(true);\n blackjackController.startNewGame(this);\n }", "public void actionPerformed (ActionEvent evt) \n\t\t\t{\n\n\t\t\t\tstart();\n\n\t\t\t\tif (gameState == GameState.twoPlayersNowPlayerOnesTurn || gameState == GameState.twoPlayersNowPlayerTwosTurn )\n\t\t\t\t{\n\t\t\t\t\tbuttonStart.setVisible(false); // Make the start button invisible as by now the game has already begun.\n\t\t\t\t\tbuttonForfeit.setVisible(true); // And make the forfeit button visible.\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}", "public void open(){\n \ttriggerTimer.reset();\n \tisClosed = false;\n \tClawAct.set(false);\n\t\tRobot.oi.armRumble(RUMBLE_DURATION);\n }", "private void startBoardingAct() {\n Intent intent = new Intent(this, EcomLoginActivity.class);\n startActivity(intent);\n AnimUtil.activityTransitionAnimation(this);\n }", "void onClickNextTurn();", "public void changeTurn(){\r\n model.setCheckPiece(null);\r\n model.swapPlayers();\r\n }", "public void takeTurn() {\n world.updateLinkedList();\n repaint();\n }", "public twoPlayer() {\n\n initComponents();\n //disables the turn box\n turn.setEditable(false);\n //when i is smaller than 9, initializes all squares to 2\n for (int i = 0; i < 9; i++) {\n tBoard[i] = 2;\n }\n //set to x's turn, alerting that it is the player with the X symbol\n turn.setText(\"It is x's turn\");\n\n }", "public void turnCCW() {\n turn(false);\n }", "public void enableChoice() {\n\t\t// Enable the buttons, lighting them up\n\t\trock.setEnabled(true);\n\t\tpaper.setEnabled(true);\n\t\tscissors.setEnabled(true);\n\t}", "public void go_to_switch_position() {\n stop_hold_arm();\n Dispatcher.get_instance().add_job(new JMoveArm(RobotMap.Arm.pot_value_switch, 0.9, 0.7, 0.7, 0.2, 0.8, false, false));\n hold_arm();\n }", "public void startTurn(){\n if (hasWinner()){\n announceWinner();\n return;\n }\n\n gameDraft();\n gameAttack();\n if (hasWinner()) return; //Skipping fortify if the game is won\n gameFortify();\n displayMessage(\"End of \" + currentPlayer.getName() + \"'s turn!\");\n }", "public void activarEscudo() {\n\t\tif(escudo) {\n\t\t\twidth = 40;\n\t\t\theight = 40;\n\t\t\tescudo = false;\n\t\t\tsetGrafico(0);\n\t\t}\n\t\telse {\n\t\t\tescudo = true;\n\t\t\twidth = 50;\n\t\t\theight = 50;\n\t\t\tsetGrafico(1);\n\t\t}\n\t}", "public void levelThreeScreen() {\n timer.stop();\n gameModel.setState(\"Level 3\");\n currentScene = levelSetup.getLevelThree().getScene(levelThreeInitialEntrance);\n currentBoard = levelSetup.getLevelThree().getBoard();\n currentLevelScreen = levelSetup.getLevelThree();\n levelThreeInitialEntrance = (levelThreeInitialEntrance ? false : false);\n moveCharacter(mainWindow, currentScene, hero, currentBoard);\n }", "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 }", "protected void PlayActionPerformed(ActionEvent e) {\n\t\tif(rdbtnNormal.isSelected())\n\t\t\tthis.difficulty=5;\n\t\telse if(rdbtnHard.isSelected())\n\t\t\tthis.difficulty=10;\n\t\telse if(rdbtnHell.isSelected())\n\t\t\tthis.difficulty=15;\n\t\telse\n\t\t\tthis.difficulty=1;\n\t\tthis.setVisible(false);\n\t\t\n\t\tTankClient tc = new TankClient();\n\t\tTankClient.difficulty=this.difficulty;\n\t\ttc.launchFrame();\n\t}", "public void activate()\n\t{\n\t\tlineNow = 0f;\n\t\tamp = begAmp;\n\t\tisActivated = true;\n\t}", "public void act() \r\n {\r\n if (Greenfoot.mouseClicked(this)) {\r\n Greenfoot.setWorld(new howToPlayGuide());\r\n }\r\n }", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tif(arg0.getActionCommand().equals(\"newGame\"))\n\t\t{\n\t\t\tSystem.out.println(\"开始新的游戏\");\t\t\n\t\t\tinitKey();\n\t\t\t\n\t\t\t\n\t\t\t//创建新的游戏战场\n\t\t\tmgp=new MyGamePanel(\"newGame\");\n\t\t\t\n\t\t\t//启动游戏面板线程\n\t\t\tThread t=new Thread(mgp);\n\t\t\tt.start();\n\t\t\t\n\t\t\t//删除旧的面板\n\t\t\tthis.remove(msp);\n\t\t\tthis.add(mgp);\n\n\t\t\t//注册监听\n\t\t\tthis.addKeyListener(mgp);\n\t\t\t\n\t\t\tthis.setVisible(true);\n\t\t\t\n\t\t}else if(arg0.getActionCommand().equals(\"exit\"))\n\t\t{\n\t\t\t//保存击毁敌人数量\n\t\t\tRecorder.keepRecording();\n\t\t\tSystem.out.println(\"退出游戏\");\n\t\t\t\n\t\t}else if(arg0.getActionCommand().equals(\"saveExit\"))\n\t\t{\n\t\t\tRecorder rd=new Recorder();\n\t\t\n\t\t\trd.setEts(mgp.ets);\n\t\t\trd.setHeros(mgp.heros);\n\t\t\trd.keepRecAndEnemyTank();\n\t\t\tSystem.out.println(\"保存游戏\");\n\t\t\t\n\t\t}else if(arg0.getActionCommand().equals(\"conGame\"))\n\t\t{\n\t\t\tinitKey();\n\t\t\tmgp=new MyGamePanel(\"con\");\n\t\t\t\n\t\t\tThread t=new Thread(mgp);\n\t\t\tt.start();\n\t\t\t\n\t\t\tthis.remove(msp);\n\t\t\tthis.add(mgp);\n\t\t\t\n\t\t\tthis.addKeyListener(mgp);\n\t\t\t\n\t\t\tthis.setVisible(true);\n\t\t\t\n\t\t\tSystem.out.println(\"接着玩游戏\");\n\t\t}else if(arg0.getActionCommand().equals(\"KeyInstall\"))\n\t\t{\n\t\t\tSystem.out.println(\"点击了用户设置按钮\");\n\t\t\tKeyInstall ki=new KeyInstall();\n\t\t\t\n\t\t}else if(arg0.getActionCommand().equals(\"LevelSetting\"))\n\t\t{\n\t\t\tSystem.out.println(\"用户点击了游戏难易设置\");\n\t\t\tLevelSetting ls=new LevelSetting();\n\t\t}else if(arg0.getActionCommand().equals(\"SavePoint\"))\n\t\t{\n\t\t\tSystem.out.println(\"用户点击了保存分数按钮\");\n\t\t\tMyGamePanel.isPause=!MyGamePanel.isPause;\n\t\t\tSavePoint sp=new SavePoint();\n\t\t\tString sumPoints=String.valueOf(MyGamePanel.sumPoint);\n\t\t\tsp.jf2.setText(sumPoints);\n\t\t\tsp.jf2.setEditable(false);\n\t\t}\n\t}", "public void activate();", "public void turnoSistema(){\r\n if(tipo_simulacion == 2){\r\n JOptionPane.showMessageDialog(this.vc,\"Simulando acciones. . .\", \"Turno Sistema\", JOptionPane.INFORMATION_MESSAGE);\r\n }\r\n System.out.println(\"Turno: \"+ entrenador2.getNombre());\r\n if(evaluarAccion(this.pokemon_activo2, this.pokemon_activo1).equals(\"Cambiar\")){\r\n System.out.println(\"Sistema eligio Cambiar Pokemon\");\r\n pokemon_activo2.setConfuso(false);\r\n pokemon_activo2.setDormido(false);\r\n if(getEquipo2()[0].getDebilitado() == false && getEquipo2()[0]!=pokemon_activo2){\r\n pokemon_activo2 = getEquipo2()[0]; \r\n }\r\n else if(getEquipo2()[1].getDebilitado() == false && getEquipo2()[1]!=pokemon_activo2){\r\n pokemon_activo2 = getEquipo2()[1]; \r\n }\r\n else if(getEquipo2()[2].getDebilitado() == false && getEquipo2()[2]!=pokemon_activo2){\r\n pokemon_activo2 = getEquipo2()[2]; \r\n }\r\n else if(getEquipo2()[3].getDebilitado() == false && getEquipo2()[3]!=pokemon_activo2){\r\n pokemon_activo2 = getEquipo2()[3]; \r\n }\r\n else if(getEquipo2()[4].getDebilitado() == false && getEquipo2()[4]!=pokemon_activo2){\r\n pokemon_activo2 = getEquipo2()[4]; \r\n }\r\n else if(getEquipo2()[5].getDebilitado() == false && getEquipo2()[5]!=pokemon_activo2){\r\n pokemon_activo2 = getEquipo2()[5]; \r\n }\r\n vc.setjL_especie2(pokemon_activo2.getNombre_especie());\r\n vc.setjL_nombrepokemon2(pokemon_activo2.getPseudonimo());\r\n vc.setjL_vida_actual2(pokemon_activo2.getVida_restante(), pokemon_activo2.getVida());\r\n vc.setjL_Nivel2(pokemon_activo2.getNivel());\r\n setLabelEstados(0);\r\n setLabelEstados(1);\r\n this.turno = 0;\r\n if(tipo_simulacion == 2){\r\n JOptionPane.showMessageDialog(this.vc, \"Turno\"+\" \"+entrenador1.getNombre(), \"Tu Turno\", JOptionPane.INFORMATION_MESSAGE);\r\n }\r\n }\r\n else if(evaluarAccion(this.pokemon_activo2, this.pokemon_activo1).equals(\"Atacar\")){\r\n System.out.println(\"Sistema eligio Atacar\");\r\n inflingirDaño(pokemon_activo2.getMovimientos()[(int)(Math.random()*4)], pokemon_activo1, pokemon_activo2);\r\n if(pokemon_activo1.getVida_restante() <= 0){\r\n pokemon_activo1.setVida_restante(0);\r\n pokemon_activo1.setDebilitado(true);\r\n System.out.println(\"El Pokemon: \"+ pokemon_activo1.getPseudonimo()+\" se ha Debilitado\");\r\n JOptionPane.showMessageDialog(this.vc, \"El Pokemon: \"+ pokemon_activo1.getPseudonimo()+\" se ha Debilitado\", \"Debilitado\", JOptionPane.INFORMATION_MESSAGE);\r\n if(condicionVictoria(getEquipo1(), getEquipo2()) == true){\r\n JOptionPane.showMessageDialog(this.vc, \"El Ganador de este Combate es:\"+ entrenador2.getNombre(), \"Ganador\", JOptionPane.INFORMATION_MESSAGE);\r\n System.out.println(\"El Ganador de este Combate es:\"+ entrenador2.getNombre());\r\n System.out.println(equipo1[0].getVida_restante()+ \" \"+equipo1[1].getVida_restante()+ \" \"+equipo1[2].getVida_restante()+ \" \"+equipo1[3].getVida_restante()+ \" \"+equipo1[4].getVida_restante()+ \" \"+equipo1[5].getVida_restante());\r\n System.out.println(equipo2[0].getVida_restante()+ \" \"+equipo2[1].getVida_restante()+ \" \"+equipo2[2].getVida_restante()+ \" \"+equipo2[3].getVida_restante()+ \" \"+equipo2[4].getVida_restante()+ \" \"+equipo2[5].getVida_restante());\r\n JOptionPane.showMessageDialog(this.vc, equipo1[0].getVida_restante()+ \" \"+equipo1[1].getVida_restante()+ \" \"+equipo1[2].getVida_restante()+ \" \"+equipo1[3].getVida_restante()+ \" \"+equipo1[4].getVida_restante()+ \" \"+equipo1[5].getVida_restante()+\"\\n\"+ equipo2[0].getVida_restante()+ \" \"+equipo2[1].getVida_restante()+ \" \"+equipo2[2].getVida_restante()+ \" \"+equipo2[3].getVida_restante()+ \" \"+equipo2[4].getVida_restante()+ \" \"+equipo2[5].getVida_restante(), \"Estadisticas finales(vida)\", JOptionPane.INFORMATION_MESSAGE);\r\n vc.dispose();\r\n vpc.dispose();\r\n combate.setGanador(entrenador2);\r\n combate.setPerdedor(entrenador1);\r\n this.termino = true;\r\n }\r\n else if(getEquipo1()[0].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[0]; \r\n }\r\n else if(getEquipo1()[1].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[1]; \r\n }\r\n else if(getEquipo1()[2].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[2]; \r\n }\r\n else if(getEquipo1()[3].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[3]; \r\n }\r\n else if(getEquipo1()[4].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[4]; \r\n }\r\n else if(getEquipo1()[5].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[5]; \r\n } \r\n vc.setjL_nombrepokemon1(pokemon_activo1.getPseudonimo());\r\n vc.setjL_especie1(pokemon_activo1.getNombre_especie());\r\n }\r\n vc.setjL_especie1(pokemon_activo1.getNombre_especie());\r\n vc.setjL_nombrepokemon1(pokemon_activo1.getPseudonimo());\r\n vc.setjL_vida_actual1(pokemon_activo1.getVida_restante(), pokemon_activo1.getVida());\r\n vc.setjL_Nivel1(pokemon_activo1.getNivel());\r\n setLabelEstados(0);\r\n setLabelEstados(1);\r\n this.turno = 0;\r\n if(tipo_simulacion == 2){\r\n JOptionPane.showMessageDialog(this.vc, \"Turno\"+\" \"+entrenador1.getNombre(), \"Tu Turno\", JOptionPane.INFORMATION_MESSAGE);\r\n }\r\n }\r\n \r\n }", "@Override\n public void actionPerformed(ActionEvent evt) {\n\t\t\t\tv = new SpaceShip(120, 525, 50, 50,1);\t// Create Player1\n\t\t\t\tv2 = new SpaceShip(230, 525, 50, 50,2); // Create Player2\n\t\t\t\tgp = new GamePanel();\n\t\t\t\t//New Game 2 players mode\n\t\t\t\tengine = new GameEngine(gp, v, v2,2);\n\n\t\t\t\t//Remove button's panel from Main frame\n\t\t\t\tframe.getContentPane().remove(buttonPanel);\n\n\t\t\t\t//add KeyListener and GamePanel to Main frame\n\t\t\t\tframe.addKeyListener(engine);\n\t\t\t\tframe.getContentPane().add(gp,BorderLayout.CENTER);\n\n\t\t\t\t//Start timmer\n\t\t\t\tengine.start();\n\n\t\t\t\t//Setting MainFrame and re-panting\n\t\t\t\tframe.validate();\n\t\t\t\tframe.repaint();\n\n\t\t\t\t//Eable KeyListener\n\t\t\t\tframe.requestFocus();\n }", "private void choseLocal(java.awt.event.MouseEvent evt) { \n\t\tgameChoice = 'a';\n\t\twindowComplete = true;\n\t}", "public void activateButton() {\n\t\tif (isBrowser) this.bringToBack();\r\n\t\tMainActivity.resetXY();\r\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tMantenedorCapacitacion cap = new MantenedorCapacitacion();\r\n\t\t\t\tcap.setVisible(true);\r\n\t\t\t}", "public static void start() {\n \t\tMainGame.display.disp(\"What type of monster do you want to fight?:\");\r\n \t\t//Display the buttons for the choice of monster\r\n \t\tMainGame.display.Enable(MainGame.display.warriorM, MainGame.display.fighterM);\r\n \t}", "public void startTurn() {\n nMovesBeforeGrabbing = 1;\n nMovesBeforeShooting = 0;\n\n if (damages.size() > 2)\n nMovesBeforeGrabbing = 2;\n\n if (damages.size() > 5)\n nMovesBeforeShooting = 1;\n\n playerStatus.isActive = true;\n }", "public void interactWhenSteppingOn() {\r\n\t\t\r\n\t}", "public void acivatePlayer() {\n\t\tthis.setEnabled(true);\n\t}", "public void win(){\n // If this object is not the current arena state obsolete it.\n if(this != battleState) return;\n if(win) return;\n\n isOver = true;\n setSlowMo(false);\n win = true;\n setSelectedPc(null);\n\n Spell.clear();\n for(Button x : spellButtons){\n x.setActive(false);\n }\n TouchHandler.clear();\n SpellTouchInput.clear();\n battleStateWin();\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getActionCommand().equals(\"Pickaxe\")) {\n\t\t\ttpanel.setIndex(1);\n\n\t\t} else if (e.getActionCommand().equals(\"Sword\")) {\n\t\t\ttpanel.setIndex(2);\n\n\t\t} \n// if any buttons pressed then resume game and back to screen\n\t\ttpanel.resume();\n\t\ttpanel.pause = false;\n\t\tthis.toBack();\n\t}", "public void extraTurn() {\r\n\t\textraTurn = true;\r\n\t}", "private void charonSwitch() {\n resetUpdate();\n gameMessage.setSpace1(clientMessage.getSpace1());\n gameMessage.setCharonSwitching(true);\n gameMessage.notify(gameMessage);\n }", "private void BacktoMainActionPerformed(java.awt.event.ActionEvent evt) {\n new Machines().setVisible(true);\n }", "public void playInstructions() {\r\n\t\tSystem.out.println(\"\\nYou are now ready to select areas.\");\r\n\t\tSystem.out.println(\"In normal mode, areas that you do not select will become still\");\r\n\t\tSystem.out.println(\"In black and white mode, areas you select will become black and white\");\r\n\t\tSystem.out.println(\"Press the left mouse button to select a point\");\r\n\t\tSystem.out.println(\"After 3 or more points, you may press \\\"p\\\"\"\r\n\t\t\t\t+ \"\\nAnd Delaunay Triangulation will be used to mark an area around points you have selected\");\r\n\t\tSystem.out.println(\"Pressing \\\"o\\\" will clear the points you have selected\");\r\n\t\tSystem.out.println(\"Press SPACE when you are done marking areas\");\r\n\t\tSystem.out.println(\"You may press ESCAPE to quit at any time\");\r\n\t}", "protected void declareWin()\t{\n\t\tif(active) { \n\t\t\tgui.setHumanDiscard(Player.NO_DISCARD);\n\t\t\tactive=false; }\n\t}", "@Override\r\n\tpublic void startTurn() {\n\t\t\r\n\t}", "public void activate(){\r\n\r\n\t}", "private void ControlType1(int time) {\n\t\tif (GameEngine.isKeyHeld(\"D\")) {\n\t\t\tgraphic.setX(graphic.getX() + speed * time);\n\t\t\tgraphic.setDirection(0);\n\t\t}\n\t\tif (GameEngine.isKeyHeld(\"A\")) {\n\t\t\tgraphic.setX(graphic.getX() - speed * time);\n\t\t\tgraphic.setDirection((float)Math.PI);\n\t\t}\n\t\tif (GameEngine.isKeyHeld(\"S\")) {\n\t\t\tgraphic.setY(graphic.getY() + speed * time);\n\t\t\tgraphic.setDirection((float)(Math.PI / 2));\n\t\t}\n\t\tif (GameEngine.isKeyHeld(\"W\")) {\n\t\t\tgraphic.setY(graphic.getY() - speed * time);\n\t\t\tgraphic.setDirection((float)((Math.PI * 3) / 2));\n\t\t}\n\t\t//SET HERO facing WASD direction\n\t}", "@Override\n\tpublic void OnForwardCommand() {\n\t\tsuper.OnForwardCommand();\n\t\tSoundManage.playSound(forwordSound1);\n\t}", "public void activate(){\r\n\t\tactive=true;\r\n\t}", "public void teleopArcadeDrive(){\r\n\t\tmyRobot.arcadeDrive(-m_controls.driver_Y_Axis(), -m_controls.driver_X_Axis());\r\n\t}", "@Override\n\tpublic void setChaseTarget(){\n\t\tthis.setTarget(_pacman.getX()+Constants.SQUARE_SIDE,_pacman.getY()-(4*Constants.SQUARE_SIDE));\n\t}", "public void accuse()\n {\n //show the accusation window\n accusationScreen = new AccusationScreen(this, false, null);\n accusationScreen.setVisible(true);\n }", "public void levelOneScreen() {\n timer.stop();\n gameModel.setState(\"Level 1\");\n currentScene = levelSetup.getLevelOne().getScene(levelOneInitialEntrance);\n currentBoard = levelSetup.getLevelOne().getBoard();\n currentLevelScreen = levelSetup.getLevelOne();\n levelOneInitialEntrance = (levelOneInitialEntrance ? false : false);\n moveCharacter(mainWindow, currentScene, hero, currentBoard);\n\n }", "private void nextButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nextButtonActionPerformed\n if(napakalakiModel.getCurrentPlayer() == null){\n this.nextButton.setEnabled(false);\n this.combatButton.setEnabled(false);\n this.playerView1.enableAfterNextButton();\n napakalakiModel.nextTurn();\n this.combatResultLabel.setText(\"\");\n // Llamo al setNapakalaki para que surjan efecto los cambios\n setNapakalaki(napakalakiModel); \n }\n else{\n // Si ha cumplido el mal rollo puede continuar\n if( napakalakiModel.getCurrentPlayer().validState() ){\n this.nextButton.setEnabled(false);\n this.combatButton.setEnabled(false);\n this.playerView1.enableAfterNextButton();\n napakalakiModel.nextTurn();\n this.combatResultLabel.setText(\"\");\n // Llamo al setNapakalaki para que surjan efecto los cambios\n setNapakalaki(napakalakiModel);\n }\n else{\n this.combatResultLabel.setText(\"No cumples las condiciones para pasar de turno.\");\n }\n } \n }", "@Override\n public void clicked(InputEvent event, float x, float y) {\n selecionado.play();\n ((Game) Gdx.app.getApplicationListener()).setScreen(new PlayScreen(game, level));\n dispose();\n }", "public void switchToTowerPanel() {\r\n this.midPanelCards.show(this.flipPanel, \"TowerPanel\");\r\n }", "public void play() {\n field.draw();\n userTurn();\n if(! field.isFull()) {\n computerTurn();\n }\n }", "public void turnOn(){\n Logger.getGlobal().log(Level.INFO,\" Turning On..\");\n vendingMachine = new VendingMachine();\n inventoryPopulation();\n idle();\n }", "private void makeWindow( boolean amFormer ) {\n myTurn[0] = amFormer;\n myMark = ( amFormer ) ? \"O\" : \"X\"; // 1st person uses \"O\"\n yourMark = ( amFormer ) ? \"X\" : \"O\"; // 2nd person uses \"X\"\n\n // create a window\n window = new JFrame(\"OnlineTicTacToe(\" +\n ((amFormer) ? \"former)\" : \"latter)\" ) + myMark );\n window.setSize(300, 300);\n window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n window.setLayout(new GridLayout(3, 3));\n\n\t// initialize all nine cells.\n for (int i = 0; i < NBUTTONS; i++) {\n button[i] = new JButton();\n window.add(button[i]);\n button[i].addActionListener(this);\n }\n\n\t// make it visible\n window.setVisible(true);\n }", "public void wonGame(){\n\t\tSystem.out.println(\"Bravo, du hast gewonnen! Möchtest du noch einmal spielen?\");\n\t\tstopGame();\n\t\tstarted = false;\n\t\tspiel_status = 1;\n\t\tpaintMenu();\n\t}", "public void verAcercadeSesp()\r\n\t{\r\n\t\tacercadesesp = new AcercadeSesp(this);\r\n\t\tacercadesesp.setVisible(true);\r\n\t}", "public void activate(Game g) {\n\t\tPlayer owner = g.getCurrentPlayer();\r\n\t\tPlayer opponent = g.getOpposingPlayer();\r\n\t\topponent.subtractVictoryPoints(1);\r\n\t\towner.collectVictoryPoints(1);\r\n\t}", "public void play() {\r\n _board = new Board();\r\n _command = new LoaGUI(\"Lines of Action\", this);\r\n\r\n while (true) {\r\n int playerInd = _board.turn().ordinal();\r\n if (_playing) {\r\n if (_board.gameOver()) {\r\n announceWinner();\r\n _playing = false;\r\n continue;\r\n }\r\n Move next = _players[playerInd].makeMove();\r\n System.out.println(\"The move is get\");\r\n if (next != null) {\r\n assert _board.isLegal(next);\r\n _board.makeMove(next);\r\n _command.repaint();\r\n System.out.println(\"Repaint\");\r\n if (_board.gameOver()) {\r\n announceWinner();\r\n _playing = false;\r\n }\r\n }\r\n } else {\r\n try {\r\n Thread.sleep(magic2);\r\n } catch (InterruptedException ex) {\r\n return;\r\n }\r\n }\r\n }\r\n }" ]
[ "0.61975396", "0.6087584", "0.6001584", "0.59202856", "0.58948797", "0.5822647", "0.5806921", "0.575466", "0.57217354", "0.5716189", "0.57140493", "0.57108206", "0.5695814", "0.5692058", "0.56887066", "0.56769377", "0.56769377", "0.56673473", "0.56646496", "0.56450856", "0.56401956", "0.5631515", "0.5623259", "0.5615453", "0.5613393", "0.55997103", "0.5596069", "0.5588229", "0.5578811", "0.5540751", "0.5538719", "0.5526618", "0.55263", "0.55260295", "0.55183136", "0.55183136", "0.5517695", "0.5501395", "0.5497234", "0.5495478", "0.5493903", "0.5493101", "0.54924136", "0.54872304", "0.5479936", "0.5477325", "0.54773027", "0.54764277", "0.54725957", "0.5468846", "0.546856", "0.5467319", "0.5464256", "0.54611534", "0.5460039", "0.5459868", "0.54535466", "0.5452775", "0.5449636", "0.54481643", "0.54456216", "0.5444897", "0.5437224", "0.5431499", "0.54309", "0.5428288", "0.5427748", "0.5414432", "0.5413012", "0.5409439", "0.5408413", "0.5405724", "0.54053104", "0.5398987", "0.53904146", "0.5384435", "0.5382161", "0.5381315", "0.5381028", "0.5380566", "0.5378633", "0.53781044", "0.53703403", "0.53662246", "0.53652084", "0.53594106", "0.53592485", "0.5349472", "0.53456396", "0.5343416", "0.53433275", "0.5342413", "0.5338374", "0.53379095", "0.5337511", "0.53362983", "0.5332752", "0.53318393", "0.53312784", "0.53303033", "0.53283244" ]
0.0
-1
Get the word to be voted
public JsonArray getGameWord(int r, int c) { JsonObject wordr = new JsonObject(); JsonObject wordc = new JsonObject(); String word[] = new String[2]; // word[0]: Words consisting of consecutive letters in the // same row; // word[1]: Words consisting of consecutive // letters in the same column word[0] = board[r][c].getText(); word[1] = board[r][c].getText(); // Stitch letters and form words for (int i = 1; r + i < board.length; i++) { if (board[r + i][c].getText().equals("")) { break; } word[0] = word[0] + board[r + i][c].getText(); } for (int i = 1; r - i >= 0; i++) { if (board[r - i][c].getText().equals("")) { break; } word[0] = board[r - i][c].getText() + word[0]; } for (int i = 1; c + i < board.length; i++) { if (board[r][c + i].getText().equals("")) { break; } word[1] = word[1] + board[r][c + i].getText(); } for (int i = 1; c - i >= 0; i++) { if (board[r][c - i].getText().equals("")) { break; } word[1] = board[r][c - i].getText() + word[1]; } // Only pass the vertical word when there is only one letter if (word[0].length() + word[1].length() != 2) { wordr.addProperty("Word", word[0]); wordr.addProperty("Score", word[0].length()); } wordc.addProperty("Word", word[1]); wordc.addProperty("Score", word[1].length()); gameWord = new JsonArray(); gameWord.add(wordr); gameWord.add(wordc); return gameWord; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getWord();", "public String getVoteString() {\n\t\treturn voted ? Arrays.toString(topIdeas) : \"n/a\";\n\t}", "public void getWord() {\n\t\t\n\t}", "public String getWord(){\r\n\t\t return word;\r\n\t }", "public String getWord(){\n return this.word;\n }", "@Override\n public String getWord(){\n return word;\n }", "public String getWord(){\r\n\t\treturn word;\r\n\t}", "public String getSecretWord() {\r\n \t//Return remaining word if only 1\r\n \tif (activeWords.size() == 1) {\r\n \t\treturn activeWords.get(0);\r\n \t//return random of remaining\r\n \t} else {\r\n \treturn activeWords.get((int)(Math.random()*activeWords.size()+1));\r\n \t}\r\n }", "public String getWord() {\n return word;\n }", "public String getWord(){\n\t\treturn word;\n\t}", "public String getWord()\r\n\t\t{\r\n\t\t\treturn word;\r\n\t\t}", "public String getWord() {\n return this.word;\n }", "public String getWord()\n\t{\n\t\treturn word;\n\t}", "public String getSecretWord() {\r\n \tint index = (int) (Math.random() * this.activeWords.size());\r\n return this.activeWords.get(index);\r\n }", "public String getWord() {\n\t\treturn word;\r\n\t}", "private String pickWord() {\n \thangmanWords = new HangmanLexicon();\n \tint randomWord = rgen.nextInt(0, (hangmanWords.getWordCount() - 1)); \n \tString pickedWord = hangmanWords.getWord(randomWord);\n \treturn pickedWord;\n }", "public String getWord()\n\t{\n\t\treturn word.get(matcher());\n\t}", "public abstract String guessedWord();", "public String getMyword() {\n return myword;\n }", "public Word getWord() {\n return word;\n }", "public String chooseWord(){\n\t\tRandom a = new Random();\t\t\r\n\t\t\r\n\t\tint randomNumber = a.nextInt(words.length);\r\n\t\t\r\n\t\tString gameWord = words[randomNumber];\r\n\t\t\r\n\t\treturn gameWord;\r\n\t\t\t\t\r\n\t}", "List<T> getWord();", "public String getWord (int wordIndex) {\n if (wordIndex < 0 ) {\n return \"\";\n } else {\n int s = getWordStart (wordIndex);\n int e = indexOfNextSeparator (tags, s, true, true, slashToSeparate);\n if (e > s) {\n return tags.substring (s, e);\n } else {\n return \"\";\n }\n }\n }", "java.lang.String getCandidate();", "public void printVottingQuestion(){\n for (Voting voting : votingList){\n System.out.println(\"question : \"+voting.getQuestion());\n }\n\n }", "@NonNull\n @Override\n public String toString() {\n return word;\n }", "String getKeyword();", "public String getWord() {\n if(words[index] != null) {\n return words[index];\n } else {\n return \"\";\n }\n }", "public void chooseWord() {\n int length = words.size();\n int index = (int) ((length - 1) * Math.random());\n word = words.get(index);\n }", "String getMyNoteTextByKey(Key verse);", "@SneakyThrows\n public String get(String word) {\n String url = \"https://clients5.google.com/translate_a/t?client=dict-chrome-ex&sl=auto&tl=he&q=\"+word;\n this.response = getResponse(url);\n if(response.getSentences().size()>0) {\n return response.getSentences().get(0).getTrans();\n }\n return \"\";\n }", "public Verbum getWord(){\r\n\t\t// Pick random starting point in the linked list\r\n\t\tint start = (int)(Math.random() * words.size());\r\n\t\tDSElement<Verbum> w = words.first;\r\n\t\tfor(int i = 0; i < start; i++)\r\n\t\t\tw = w.getNext();\r\n\t\treturn w.getItem();\r\n\t}", "public static CommandType getWord(String word){\r\n\t\treturn dictionary.get(word);\r\n\t}", "@Override\n public String getText() {\n return analyzedWord;\n }", "String selectRandomSecretWord();", "public String toString()\n\t{\n\t\treturn word;\n\t}", "public String getCurrent_word(){\n\t\treturn current_word;\n\t}", "public static String getWord() {\r\n\t\treturn Text;\r\n\t}", "boolean hasVotedInTerm() {\n return null != votedFor;\n }", "void setVersesWithWord(Word word);", "public static char[] getWord() {\n\t\t\n\t\tString[] words = {\"cookie\", \"bacon\", \"steak\", \"apple\", \"doughnut\"};\n\t\tString choice = words[(int)(Math.random() * words.length)];\n\t\tchar[] word = new char[choice.length()];\n\n\t\tfor (int i = 0; i < word.length; i++) {\n\t\t\tword[i] = choice.charAt(i); // Convert Word into charArray\n\t\t}\n\t\treturn word;\n\t}", "WordBean getWord(String word);", "public void voteWord(ArrayList<String> voteWord) {\n\n\t\tJsonArray voteword = new JsonArray();\n\t\tJsonObject tmp = new JsonObject();\n\n\t\tfor (String s : voteWord) {\n\t\t\ttmp = new JsonObject();\n\t\t\ttmp.addProperty(\"Word\", s);\n\t\t\tint isAccept = JOptionPane.showConfirmDialog(null, \"Is \" + \"\\\"\" + s + \"\\\"\" + \" a word?\",\n\t\t\t\t\t\"Vote\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n\t\t\tif (isAccept == JOptionPane.YES_OPTION) {\n\t\t\t\ttmp.addProperty(\"IsAWord\", \"Yes\");\n\t\t\t} else {\n\t\t\t\ttmp.addProperty(\"IsAWord\", \"No\");\n\t\t\t}\n\t\t\tvoteword.add(tmp);\n\t\t}\n\n\t\tmessage.add(\"VoteWord\", voteword);\n\n\t\tjsonString = message.toString();\n\n\t\ttry {\n\t\t\twriter.write(jsonString + \"\\n\");\n\t\t\twriter.flush();\n\t\t} catch (IOException e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Fail to connect Server\", \"Error\",\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tfor (int i = 0; i < ROW; i++) {\n\t\t\tfor (int j = 0; j < COLUME; j++) {\n\t\t\t\tboard[i][j].setBackground(Color.WHITE);\n\t\t\t}\n\t\t}\n\t}", "public String vote5(){\n String vote5MovieTitle = \" \";\n for(int i = 0; *i < results.length; i++){\n if(results[i].voteAve()) {\n vote5MovieTitle += results[i].getTitle() + \"\\n\";\n }\n }\n System.out.println(vote5MovieTitle);\n return vote5MovieTitle;\n }", "public String getRandomWord() {\r\n Random rand = new Random();\r\n return possibleWords[rand.nextInt(possibleWords.length)]; // Word from a random index\r\n }", "@Override\r\n\tprotected void getIntentWord() {\n\t\tsuper.getIntentWord();\r\n\t}", "public String toString() {\n return this.name + \": \" + this.votes;\n }", "java.lang.String getKeyword();", "public Voting getVoting(int index){\n return votingList.get(index);\n }", "public String getTerm(){\n return this.term;\n }", "public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}", "public static String getWord(){\n\t\t\n\t\tSystem.out.println(\"--------- Welcome to Hangman ---------\");\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter a word:\");\n\t return input.nextLine();\n\t}", "public Word getWord(int id);", "public Integer getVotes();", "@Override\r\n public String ask() {\r\n String word = \"\";\r\n Time.getInstance().time += 1;\r\n word = \"Do you like the Story?\";\r\n System.out.println(word);\r\n return word;\r\n }", "private String wordToFind() {\n\t\t\n\t\t//It actually just gets the incomplete version of the word, with underscores.\n\t\t//By the point this method is called, the server will have created a thread for\n\t\t//this client and generated a random word for this client to aim for. \n\t\t//The underscore variant will be just as long as the real word, so it can be used\n\t\t//for array lengths and, since it'll be all underscores, even if a hacker went to\n\t\t//print out the value of temp, they wouldn't get anywhere.\n\t\tout.println(\"GetWord\");\n\t\tString temp = null;\n\t\twhile(true) {\n\t\t\ttry {\n\t\t\t\ttemp = in.readLine();\n\t\t\t\tif(temp!=null) {\n\t\t\t\t\tcurrentWordLabel = new Label(temp);\n\t\t\t\t\treturn temp;\n\t\t\t\t}\n\t\t\t}catch(IOException ioe) {\n\t\t\t}\n\t\t}\n\t}", "void votedOnPoll(String pollId);", "private String GetWordFromKID(int kid)\n\t{\n\t\tString word = \"\"; \n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\tString query = \"SELECT word FROM Keywords WHERE k_id = '\"+kid+\"'\"; \n\t\t\tResultSet inTable = con.stmt.executeQuery(query); \n\t\t\t\n\t\t\t//keyword is already in table, get kid of word\n\t\t\tif(inTable.next())\n\t\t\t{\n\t\t\t\tword = inTable.getString(\"word\"); \n\t\t\t} \n\t\t\t\n\t\t\tcon.closeConnection();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage()); \n\t\t}\n\t\treturn word; \n\t}", "public String getWordAt(int pos){\n\t\treturn sentence.get(pos).getWord();\n\t}", "public String getKeyword(String question)\n\t{\n\t\tString answer = \"\";\n\t\ttry \n\t\t{\n\t\t\tCorpus corpus = (Corpus) Factory.createResource(\"gate.corpora.CorpusImpl\");\n\t\t\tgate.Document doc = gate.Factory.newDocument(question);\n\t\t\tcorpus.add(doc);\n\t\t\tctrl.setCorpus(corpus);\n\t\t\tctrl.execute();\n\t\t\t\n\t\t\tcorpus.clear();\n\t\t\t\n\t\t\tArrayList<gate.Annotation> annList = new ArrayList<gate.Annotation>();\n\t\t\t//Add whatever annotations you are interested in processing further\n\t\t\t//to annList--questions, requests, instructions, etc.\n\t\t\tannList.addAll(doc.getAnnotations().get(\"question\"));\n\n\t\t for(gate.Annotation ann:annList)\n\t\t {\n\t\t \tanswer += ann.getFeatures().toString();\n\t\t }\n\t\t // REALLY important to release doc and coprpus after processing each request, \n\t\t // question, instruction, etc., or your program will quickly run out of heap space.\n\t\t Factory.deleteResource(doc);\n\t\t Factory.deleteResource(corpus);\n\t\t} catch (Exception e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\n\t\treturn answer;\n\t}", "public static void doVote() {\n }", "String getRelatedTagRight();", "String getWinner();", "public String getWord(int index){\n\t\treturn (String)list.get(index);\n\t}", "@Override\n public String getDescription() {\n return \"Vote casting\";\n }", "public int getWord(int n) {\r\n\t\treturn words.get(n);\r\n\t}", "public String getWordUnderCursor() {\r\n\t\t\r\n\t\t//we cannot search backward, so we start from the beginning: \r\n\t\tString text = getAllText();\r\n\t\tint index = getCaretPosition();\r\n\t\tPattern pattern = Pattern.compile(\"[a-zA-Z]+\"); //test version, this is not perfect. For example words between quotes\r\n\t\tMatcher matcher = pattern.matcher(text);\r\n\t\twhile(matcher.find()) {\r\n\t\t\tif(matcher.start() > index)\r\n\t\t\t\treturn \"\";\r\n\t\t\tif(matcher.start() <= index && matcher.end() >= index)\r\n\t\t\t\treturn getText(matcher.start(), matcher.end()-matcher.start());\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}", "public String speak() {\n return \"WOOF\";\n }", "public String getUtterance();", "public String getCorrectionWord(String misspell);", "public String get(int index){\n return words.get(index);\n }", "public String getWord(int i) {\n\t\treturn ((String) wc.elementAt(i));\n\t}", "private String getWord(final int index) {\n int start = 0;\n int length = 0;\n String result = null;\n try {\n start = TextUtils.getWordStart(textKit, index);\n length = TextUtils.getWordEnd(textKit, index) - start;\n result = document.getText(start, length);\n } catch (final BadLocationException e) {\n }\n\n return result;\n }", "public String getSuggestion() {\n return (String)getAttributeInternal(SUGGESTION);\n }", "public boolean guessWord (String gword) {\n \tif (lose || victory) return false;\n \t\n \tif ( gword.toLowerCase().equals(_word.toLowerCase()) ) {\n \t\tthis.victory = true;\n \t\t\n \t\tfor (int i = 0; i < _word.length(); i++) {\n \t\t\thint.setCharAt(2*i, _word.charAt(i));\n \t\t}\n \t\t\n \t\treturn true;\n \t}\n \t\n \treturn false;\n }", "public int getSpellVamp() {\n\t\t\n\t\treturn spellVamp;\n\t}", "public TWord getTWordAt(int pos){\n\t\treturn sentence.get(pos);\n\t}", "public String getRandom() {\n\t return word.get(new Random().nextInt(word.size()));}", "public String getSelectedAnswer() {\n\t\tList<Integer> selected = getSelectedIndexes();\n\t\treturn this.value.get(selected.get(0));\n\t}", "public String getTermweig() {\r\n return (String) getAttributeInternal(TERMWEIG);\r\n }", "public java.lang.String getWord() {\n java.lang.Object ref = word_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n word_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public Cursor getWord(String word) {\n\n\t\tString query = String.format(_select, getDate()) +\n\t\t\t\t\t\t\" WHERE \" + DBConstants.WordTable.WORD_KEY + \" = '\" + word + \"'\";\n\t\t\n\t\treturn _db.rawQuery(query, null);\t\t\n }", "@Override\n public String getDescription() {\n return \"Phasing vote casting\";\n }", "public String getWord(int wordIndex) {\n return this.words.get(wordIndex);\n }", "public String getKeyword(String word) {\n\t\tboolean foundPunct = false;\n String returnStr = \"\";\n for(int inc = 0; inc < word.length(); inc++) {\n char testChar = word.charAt(inc);\n if(Character.isLetter(testChar) == true) {\n if(foundPunct == true) {return null;}\n else{returnStr = returnStr + Character.toString(testChar).toLowerCase();}}\n else {foundPunct = true;}}\n if(noiseWords.contains(returnStr) == true) {\n return null;}\n if(returnStr == \"\") {\n return null;}\n return returnStr;\n\t}", "public Float getVote() {\n return vote;\n }", "@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 String getKeyword(String word) {\n\t\t/** COMPLETE THIS METHOD **/\n\t\t//strip trailing punctuation\n\t\tint n = 1;\n\t\tString output = \"\";\n\t\tword = word.toLowerCase();\n\t\tint j = 0;\n\t\twhile(j<word.length())\n\t\t{\n\t\t\tif(Character.isLetter(word.charAt(j)))\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//return null;\n\t\t\t}\n\t\t\tj++;\n\t\t}\n\t\t\n\t\twhile(n<word.length())\n\t\t{\n\t\t\t\n\t\t\tif( word.charAt(word.length()-n) == '.' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ',' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '?' || \n\t\t\t\t\tword.charAt(word.length()-n) == ':' ||\n\t\t\t\t\tword.charAt(word.length()-n) == ';' ||\n\t\t\t\t\tword.charAt(word.length()-n) == '!' )\n\t\t\t{\n\t\t\t\toutput = word.substring(0, word.length()-n);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\tif( !(word.charAt(word.length()-1) == '.' ||\n\t\t\t\tword.charAt(word.length()-1) == ',' ||\n\t\t\t\tword.charAt(word.length()-1) == '?' || \n\t\t\t\tword.charAt(word.length()-1) == ':' ||\n\t\t\t\tword.charAt(word.length()-1) == ';' ||\n\t\t\t\tword.charAt(word.length()-1) == '!' )\n\t\t\t\t)\n\t\t{\n\t\t\toutput = word.substring(0, word.length());\n\t\t}\n\t\t// check if there are only alphanumeric characters\n\t\t\n\t\tArrayList<String> items = new ArrayList<>();\n\t\t\n\t\t\n\t try {\n\t \t\n\t Scanner scanner = new Scanner(new File(\"noisewords.txt\"));\n\t while (scanner.hasNextLine()) {\n\t String line = scanner.nextLine();\n\t items.add(line);\n\t \n\t }\n\t scanner.close();\n\t } catch (FileNotFoundException e) {\n\t e.printStackTrace();\n\t }\n\t int i = 0;\n\t boolean ans = false;\n\t while(i<items.size()) {\n\t\t if(output.equals(items.get(i))) \n\t\t {\n\t\t \tans = true;\n\t\t \tbreak;\n\t\t }\n\t\t else\n\t\t {\n\t\t \t ans = false;\n\t\t }\n\t\t i++;\n\t }\n\t //System.out.println(ans);\n\t if(ans == true)\n\t {\n\t \t return null;\n\t }\n\t /* int a = 0;\n\t\twhile(a<items.size())\n\t\t{\n\t\t\tSystem.out.println(items.get(a));\n\t\t\ta++;\n\t\t}*/\n\t\t// following line is a placeholder to make the program compile\n\t\t// you should modify it as needed when you write your code\n\t\tif(output != null)\n\t\t{\n\t\t\treturn output;\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public String getTerm() {\n return term;\n }", "public int calWord() {\n for(int i = 0; i < newWord.length(); i++) {\n for (String c : keySetPoint) {\n if(String.valueOf(newWord.charAt(i)).equals(c)) {\n point += mapPoint.get(c);\n }\n }\n }\n\n return point;\n }", "public java.lang.String getWord() {\n java.lang.Object ref = word_;\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 word_ = s;\n }\n return s;\n }\n }", "public Double get(String word) {\r\n\t\ttry {\r\n\t\t\treturn (Double) this.wordlist.get(word);\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "java.lang.String getQ();", "String getConcept();", "Term getP();", "Term getTerm();", "public int scoreOf(String word) {\n\t\tString noU = stripU(word);\n\t\treturn tst.contains(noU) ? tst.get(noU) : 0;\n\t}", "public String getSecretWord()\n {\n return OriginSecretWord;\n }", "public String talkNiceWords() {\n\t\treturn \"How are you\";\n\t}", "String getShortToken();", "String getShortToken();" ]
[ "0.668407", "0.6319308", "0.61842227", "0.6113685", "0.60902107", "0.607901", "0.6070644", "0.6059186", "0.60163707", "0.60133535", "0.60101026", "0.5989124", "0.5977574", "0.5959842", "0.5911185", "0.58980286", "0.5859634", "0.58582914", "0.58355856", "0.58343863", "0.5771648", "0.57526106", "0.5663521", "0.56612575", "0.5632315", "0.5583886", "0.55453837", "0.55032766", "0.5496317", "0.549026", "0.5485672", "0.54813373", "0.54783654", "0.54599744", "0.54532987", "0.5443517", "0.5430512", "0.5428617", "0.54179573", "0.5399355", "0.53933173", "0.5362733", "0.5361467", "0.5359509", "0.5354261", "0.53507507", "0.5336543", "0.53325564", "0.53132695", "0.5300475", "0.5292502", "0.52919126", "0.5289871", "0.5288357", "0.5286704", "0.5226794", "0.5211383", "0.5211041", "0.5207636", "0.51877457", "0.51693046", "0.51604414", "0.51588476", "0.5151801", "0.5150383", "0.51353765", "0.5125931", "0.5124596", "0.51215285", "0.51094246", "0.5099207", "0.50984174", "0.5085522", "0.508451", "0.50691956", "0.5065774", "0.50646544", "0.50579137", "0.50529087", "0.50498956", "0.50352854", "0.5034831", "0.5029015", "0.5028785", "0.5023783", "0.5023102", "0.50226456", "0.50202656", "0.5008167", "0.5005834", "0.49904716", "0.4989182", "0.49855408", "0.49804977", "0.4971018", "0.49703723", "0.49683946", "0.49679136", "0.496769", "0.4966509", "0.4966509" ]
0.0
-1
Display the letter filled in by a player
public void updateBoard(JsonObject inputMsg) { board[Integer.parseInt(format(inputMsg.get("Row").toString()))][Integer .parseInt(format(inputMsg.get("Column").toString()))] .setText(format(inputMsg.get("Letter").toString())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayCharacter() {\n System.out.println(\"**************************\");\n System.out.println(p.showDetails());\n System.out.println(\"**************************\"+\"\\n\");\n\n }", "public void printNextChar()\n\t{\n\t\tif(line < linesSize)\n\t\t{\n\t\t\tString nextChar = Character.toString(lines[line].charAt(charIndex));\n\t\t\t\n\t\t\t// Prints our desired character\n\t\t\ttry\n\t\t\t{\n\t\t\t\tGraphics g = messageCanvas.getGraphics();\n\t\t\t\tg.setColor(Color.white);\n\t\t\t\tg.drawString(nextChar, rowWidth, line * font.getLineHeight());\n\t\t\t\tg.flush();\n\t\t\t}\n\t\t\tcatch(SlickException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tcharIndex ++;\n\t\t\tif(charIndex > lines[line].length()-1)\n\t\t\t{\n\t\t\t\tcharIndex = rowWidth = 0;\n\t\t\t\tline ++;\n\t\t\t}\n\t\t\telse\n\t\t\t\trowWidth += font.getWidth(nextChar);\n\t\t}\n\t}", "public String displayWord(char letter){\n\t\tString printWord;\r\n\t\t\r\n\t\tif(correctList.contains(letter)){\r\n\t\t\tfor(int i=0; i<display.length; i++){\r\n\t\t\t\tif(gameLetter[i]==letter){\r\n\t\t\t\t\tdisplay[i] = String.valueOf(gameLetter[i]);}\r\n\t\t\t}\r\n\t\t\t StringBuffer sb = new StringBuffer();\r\n\t\t\t for(int i = 0; i < display.length; i++)\r\n\t\t\t { \r\n\t\t\t sb. append(display[i]);\r\n\t\t\t }\r\n\t\t\t printWord = sb.toString();\r\n \t\t}\r\n\t\telse{\r\n\t\t\t StringBuffer sb = new StringBuffer();\r\n\t\t\t for(int i = 0; i < display.length; i++)\r\n\t\t\t { \r\n\t\t\t sb. append(display[i]);\r\n\t\t\t }\r\n\t\t\t printWord = sb.toString();\r\n\t\t}\r\n\t\t\r\n\t\tprintHangman();\r\n\t\t\r\n\t\treturn printWord;\r\n\t}", "private void goCharacter() {\n\t\t// TODO print player\n\t\tSystem.out.println(\"***\");\n\t\tSystem.out.println( \"Warrior: \" + playern.getName());\n\t\tSystem.out.println(\"Level: \" + playern.getLevel());\n\t\tSystem.out.println(\"Experience: \" + playern.getExp());\n\t\tSystem.out.println(\"HP \" + playern.getHp());\n\t\tSystem.out.println(\"***\");\n\t}", "public char displayChar(){\r\n if(hit){\r\n if(ship != null){\r\n if(ship.isSunk()){\r\n return SUNK_SHIP_SECTION;\r\n }else{\r\n return HIT_SHIP_SECTION;\r\n }\r\n }else{\r\n return HIT_WATER;\r\n }\r\n }else {\r\n if (ship == null) {\r\n return PRISTINE_WATER;\r\n }else{\r\n return HIDDEN_SHIP_SECTION;\r\n }\r\n }\r\n }", "public void printVictoryMessage() { //main playing method\r\n System.out.println(\"Congrats \" + name + \" you won!!!\");\r\n }", "public char showMessage(int room)\n\t{\n\t\tScanner kbAlpha = new Scanner(System.in);\t\t\t//gets input\n\t\t\n\t\tString strInput;\t\t\t\t\t\t//holds player input\n\t\tchar cAction;\t\t\t\t\t\t\t//player choice of action\n\t\t\n\t\tcAction = 'x';\n\t\t\n\t\tswitch (room)\n\t\t{\n\t\t\tcase 1:\n\t\t\t\tif (evaluateInventory(\"Dagger\") && evaluateTravelled(1))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"There is no turning back now. You must proceed through\" +\n\t\t\t\t\t\t\" the door in front\\nof you.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Open the door\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && \n\t\t\t\t\t\tcAction != 'E' && cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"There is no turning back now. You must proceed through\" +\n\t\t\t\t\t\t\t\" the door in front of you.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Open the door\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(2);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if (evaluateTravelled(1))\n\t\t\t\t{\n\t\t\t\t\t//adds \"Dagger\" to inventory\n\t\t\t\t\tthis.inventory.add(\"Dagger\");\n\t\t\t\t\tthis.setEquippedWeapon(\"Dagger\");\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You found an old backpack! This will help you carry \" +\n\t\t\t\t\t\t\"items. Inside the\\nbackpack you find a rusty dagger. Not much, but \" +\n\t\t\t\t\t\t\"better than your fists,\\nright?\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && \n\t\t\t\t\t\tcAction != 'E' && cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You found an old backpack! This will help you carry \" +\n\t\t\t\t\t\t\t\"items. Inside the\\nbackpack you find a rusty dagger. Not much, but \" +\n\t\t\t\t\t\t\t\"better than your fists,\\nright?\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\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\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You find yourself in a dark hallway. Your back is against \" +\n\t\t\t\t\t\t\"the iron door\\nthat you entered. You see something in the floor at the \" +\n\t\t\t\t\t\t\"end of the\\nhallway just before a right turn.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Inspect what is in the floor at the end of the\" +\n\t\t\t\t\t\t\" hallway\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\nHP: \" + getHP() + \n\t\t\t\t\t\t\"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You find yourself in a dark hallway. Your back is against \" +\n\t\t\t\t\t\t\t\"the iron door\\nthat you entered. You see something in the floor at the \" +\n\t\t\t\t\t\t\t\"end of the\\nhallway just before a right turn.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Inspect what is in the floor at the end of\" +\n\t\t\t\t\t\t\t\" the hallway\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\nHP: \" + getHP() + \n\t\t\t\t\t\t\t\"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.hasTravelled.add(1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\t\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\t//if player has visited room 2 before\n\t\t\t\tif (evaluateTravelled(2) && !(evaluateInventory(\"Steampunk 4-Barrel Pistol\"))\n\t\t\t\t\t&& evaluateTravelled(3))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You enter a familiar room... the eastern door is still \"\n\t\t\t\t\t\t+ \"guarded by an alien.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Open north door\\n[B] Fight alien\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You enter a familiar room... the eastern door is still \"\n\t\t\t\t\t\t\t+ \"guarded by an alien.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Open north door\\n[B] Fight alien\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(3);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tfight(\"alien1\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Opens door\n\t\t\t\telse if (evaluateInventory(\"Steampunk 4-Barrel Pistol\")\n\t\t\t\t\t&& evaluateInventory(\"Iron Key\"))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Now that nothing stands in your way... it looks \" +\n\t\t\t\t\t\t\"like that key you found\\nis about to come in handy!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Use Iron Key on the iron door\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && \n\t\t\t\t\t\tcAction != 'E' && cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You enter a familiar room... the eastern door is still \"\n\t\t\t\t\t\t\t+ \"guarded by an alien.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Open north door\\n[B] Fight alien\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(5);\n\t\t\t\t\t\tinventory.remove(new String(\"Iron Key\"));\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//player can't open door without Iron Key\n\t\t\t\telse if (evaluateInventory(\"Steampunk 4-Barrel Pistol\") && \n\t\t\t\t\t!(evaluateInventory(\"Iron Key\")))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"With the alien out of the way, you attempt to open \" +\n\t\t\t\t\t\t\"the door. Locked!\\nThere has to be a key around here somewhere... \" +\n\t\t\t\t\t\t\"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Open north door\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && \n\t\t\t\t\t\tcAction != 'E' && cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"With the alien out of the way, you attempt to open \" +\n\t\t\t\t\t\t\t\"the door. Locked!\\nThere has to be a key around here somewhere... \" +\n\t\t\t\t\t\t\t\"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Open north door\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//player first time entering\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.hasTravelled.add(2);\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You slowly open the door to a large room. Looking \" +\n\t\t\t\t\t\t\"around, you can see two\\ndoors: one to the north and one to the \" +\n\t\t\t\t\t\t\"east. Guarding the eastern door is\\nan alien!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Open north door\\n[B] Fight alien\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You slowly open the door to a large room. Looking \" +\n\t\t\t\t\t\t\t\"around, you can see two\\ndoors: one to the north and one to the \" +\n\t\t\t\t\t\t\t\"east. Guarding the eastern door is\\nan alien!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Open north door\\n[B] Fight alien\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(3);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tfight(\"alien1\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t//player has been here before\n\t\t\t\tif (evaluateTravelled(3))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You have travelled this hallway before. Which way \" +\n\t\t\t\t\t\t\"would you like to go\\nnext?\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Through the northern door\\n[B] Through the \" +\n\t\t\t\t\t\t\"southern door\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You have travelled this hallway before. Which way \" +\n\t\t\t\t\t\t\t\"would you like to go\\nnext?\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Through the northern door\\n[B] Through the \" +\n\t\t\t\t\t\t\t\"southern door\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(4);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//first time player enters room\n\t\t\t\telse if (!(evaluateTravelled(3)))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You walk north and open the door, revealing a hallway.\" +\n\t\t\t\t\t\t\" It does not appear\\nto have anything interesting inside. \" +\n\t\t\t\t\t\t\"There is another door at the end of\\nthe hallway to the north.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue through the door at the end of the \" +\n\t\t\t\t\t\t\"hallway\\n[B] Return to previous room\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You walk north and open the door, revealing a hallway.\" +\n\t\t\t\t\t\t\t\" It does not appear\\nto have anything interesting inside. \" +\n\t\t\t\t\t\t\t\"There is another door at the end of\\nthe hallway to the north.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue through the door at the end of the \" +\n\t\t\t\t\t\t\t\"hallway\\n[B] Return to previous room\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(4);\n\t\t\t\t\t\tthis.hasTravelled.add(3);\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(2);\n\t\t\t\t\t\tthis.hasTravelled.add(3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t//player has found Iron Key\n\t\t\t\tif (evaluateInventory(\"Iron Key\"))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"There is nothing else interesting in this room.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Exit the way you entered\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && cAction != 'E'\n\t\t\t\t\t\t&& cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"There is nothing else interesting in this room.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Exit the way you entered\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//player does not have shovel but has searched dirt\n\t\t\t\telse if (!(evaluateInventory(\"Shovel\")) && blnSearchedDirt && \n\t\t\t\t\t!blnSearchedBarrels)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"A mound of dirt. It looks like something was burried, \" +\n\t\t\t\t\t\t\"but you recently\\nreceived a manicure and would prefer not to dig \" +\n\t\t\t\t\t\t\"with your hands.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Inspect dirt mound\\n[B] Search barrels\\n[C] Exit \" +\n\t\t\t\t\t\t\"the way you entered\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'c' && cAction != 'C' && cAction != 'e' && cAction != 'E'\n\t\t\t\t\t\t&& cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"A mound of dirt. It looks like something was burried, \" +\n\t\t\t\t\t\t\t\"but you recently\\nreceived a manicure and would prefer not to dig \" +\n\t\t\t\t\t\t\t\"with your hands.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Inspect dirt mound\\n[B] Search barrels\\n[C] Exit \" +\n\t\t\t\t\t\t\t\"the way you entered\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.inventory.add(\"Shovel\");\n\t\t\t\t\t\tthis.blnSearchedBarrels = true;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'c' || cAction == 'C')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//player has shovel but not iron key\n\t\t\t\telse if (evaluateInventory(\"Shovel\") && !(evaluateInventory(\"Iron Key\"))\n\t\t\t\t\t&& !(evaluateTravelled(4)) && blnSearchedBarrels)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"The barrels contained a shovel. What would you like \"\n\t\t\t\t\t\t+ \"to do now?\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Inspect dirt mound\\n[B] Exit the way you entered\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"The barrels contained a shovel. What would you like \"\n\t\t\t\t\t\t\t+ \"to do now?\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Inspect dirt mound\\n[B] Exit the way you entered\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(3);\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.hasTravelled.add(4);\n\t\t\t\t\t\tthis.blnSearchedDirt = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//player digs dirt to find Iron Key\n\t\t\t\telse if (evaluateInventory(\"Shovel\") && evaluateTravelled(4) && blnSearchedDirt\n\t\t\t\t\t&& !(evaluateInventory(\"Iron Key\")))\n\t\t\t\t{\n\t\t\t\t\tthis.inventory.add(\"Iron Key\");\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You use the shovel to dig into the dirt mound. You \" +\n\t\t\t\t\t\t\"found an iron key!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Exit the way you entered\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && cAction != 'E'\n\t\t\t\t\t\t&& cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You use the shovel to dig into the dirt mound. You \" +\n\t\t\t\t\t\t\t\"found an iron key!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Exit the way you entered\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//first time player enters\n\t\t\t\telse if (!(evaluateInventory(\"Shovel\")) && !(evaluateTravelled(4)) &&\n\t\t\t\t\t!(evaluateInventory(\"Iron Key\")))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You open the door to another large room. In one \" + \n\t\t\t\t\t\t\"corner you see a few\\nbarrels. There is an odd looking dirt mound \" +\n\t\t\t\t\t\t\"in the center of the room. No\\naliens in sight, phew!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Inspect dirt mound\\n[B] Search barrels\\n[C] Exit \" +\n\t\t\t\t\t\t\"the way you entered\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'c' && cAction != 'C' && cAction != 'e' && cAction != 'E'\n\t\t\t\t\t\t&& cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You open the door to another large room. In one \" + \n\t\t\t\t\t\t\t\"corner you see a few\\nbarrels. There is an odd looking dirt mound \" +\n\t\t\t\t\t\t\t\"in the center of the room. No\\naliens in sight, phew!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Inspect dirt mound\\n[B] Search barrels\\n[C] Exit \" +\n\t\t\t\t\t\t\t\"the way you entered\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.blnSearchedDirt = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'c' || cAction == 'C')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(3);\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.blnSearchedBarrels = true;\n\t\t\t\t\t\tthis.inventory.add(\"Shovel\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t//player has been in this hallway before\n\t\t\t\tif (evaluateTravelled(5))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You walk back into a hallway. It looks like you have \" +\n\t\t\t\t\t\t\"been here before.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Open northern door\\n[B] Open southern door\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You walk back into a hallway. It looks like you have \" +\n\t\t\t\t\t\t\t\"been here before.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Open northern door\\n[B] Open southern door\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(7);\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(6);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//first time player enters hallway\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You enter a hallway that turns north and reveals another\"\n\t\t\t\t\t\t+ \" door. Just when\\nrounding the corner you see an old door along \" +\n\t\t\t\t\t\t\"the southern wall that is\\ncovered in vines, almost impossible to \" +\n\t\t\t\t\t\t\"spot. \\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Open northern door\\n[B] Open southern door\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You enter a hallway that turns north and reveals another\"\n\t\t\t\t\t\t\t+ \" door. Just when\\nrounding the corner you see an old door along \" +\n\t\t\t\t\t\t\t\"the southern wall that is\\ncovered in vines, almost impossible to \" +\n\t\t\t\t\t\t\t\"spot. \\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Open northern door\\n[B] Open southern door\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(7);\n\t\t\t\t\t\tthis.hasTravelled.add(5);\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(6);\n\t\t\t\t\t\tthis.hasTravelled.add(5);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\t//player has killed alien\n\t\t\t\tif (evaluateTravelled(6))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"The alien corpse is still fresh... There is nothing \" +\n\t\t\t\t\t\t\"else of interest here.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Return to hallway\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && \n\t\t\t\t\t\tcAction != 'E' && cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"The alien corpse is still fresh... There is nothing \" +\n\t\t\t\t\t\t\t\"else of interest here.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Return to hallway\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(5);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//alien is still alive\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You enter a small room. Out of the corner of your eye \" +\n\t\t\t\t\t\t\"you see a slow\\nmovement... an alien has spotted you!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Fight alien\\n[B] Run back through door way\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You enter a small room. Out of the corner of your eye \" +\n\t\t\t\t\t\t\t\"you see a slow\\nmovement... an alien has spotted you!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Fight alien\\n[B] Run back through door way\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tfight(\"alien2\");\n\t\t\t\t\t\tthis.hasTravelled.add(6);\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(5);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\t//player enters first time\n\t\t\t\tif (!(evaluateTravelled(7)))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"The door opens to large a cavern. You can feel the \" +\n\t\t\t\t\t\t\"ground rumbling and\\nthere is a low mist rising just above the \" +\n\t\t\t\t\t\t\"floor. There are two doors\\nbesides the one you entered through. \" +\n\t\t\t\t\t\t\"There is one on the eastern cavern\\nwall, and you can barely see a \" +\n\t\t\t\t\t\t\"door at the far northern part of the\\ncavern, at the end of steep \" +\n\t\t\t\t\t\t\"decline from your position. Unfortunately,\\nanother alien is guarding \"\n\t\t\t\t\t\t+ \"this door.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Follow the path down to the northern door and \" +\n\t\t\t\t\t\t\"fight the alien\\n[B] Open the eastern door\\n[C] Return to the hallway\"\n\t\t\t\t\t\t+ \" you just came from\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'c' && cAction != 'C' && cAction != 'e' && cAction != 'E'\n\t\t\t\t\t\t&& cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"The door opens to large a cavern. You can feel the \" +\n\t\t\t\t\t\t\t\"ground rumbling and\\nthere is a low mist rising just above the \" +\n\t\t\t\t\t\t\t\"floor. There are two doors\\nbesides the one you entered through. \" +\n\t\t\t\t\t\t\t\"There is one on the eastern cavern\\nwall, and you can barely see a \" +\n\t\t\t\t\t\t\t\"door at the far northern part of the\\ncavern, at the end of steep \" +\n\t\t\t\t\t\t\t\"decline from your position. Unfortunately,\\nanother alien is guarding \"\n\t\t\t\t\t\t\t+ \"this door.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Follow the path down to the northern door and \" +\n\t\t\t\t\t\t\t\"fight the alien\\n[B] Open the eastern door\\n[C] Return to the hallway\"\n\t\t\t\t\t\t\t+ \" you just came from\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.hasTravelled.add(7);\n\t\t\t\t\t\tfight(\"alien3\");\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.hasTravelled.add(7);\n\t\t\t\t\t\tsetRoom(8);\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'c' || cAction == 'C')\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.hasTravelled.add(7);\n\t\t\t\t\t\tsetRoom(5);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//player has been here before but not fought alien\n\t\t\t\telse if (evaluateTravelled(7) && !(evaluateInventory(\"Edison Grenade\")))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You are in a familiar large cavern.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Follow the path down to the northern door and \" +\n\t\t\t\t\t\t\"fight the alien\\n[B] Open the eastern door\\n[C] Return to the hallway\"\n\t\t\t\t\t\t+ \" you just came from\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'c' && cAction != 'C' && cAction != 'e' && cAction != 'E'\n\t\t\t\t\t\t&& cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"The door opens to large a cavern, you can feel the \" +\n\t\t\t\t\t\t\t\"ground rumbling and\\nthere is a low mist rising just above the \" +\n\t\t\t\t\t\t\t\"floor. There are two doors\\nbesides the one you entered through. \" +\n\t\t\t\t\t\t\t\"There is one on the eastern cavern\\nwall, and you can barely see a \" +\n\t\t\t\t\t\t\t\"door at the far northern part of the\\ncavern, at the end of steep \" +\n\t\t\t\t\t\t\t\"decline from your position. Unfortunately,\\nanother alien is guarding \"\n\t\t\t\t\t\t\t+ \"this door.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Follow the path down to the northern door and \" +\n\t\t\t\t\t\t\t\"fight the alien\\n[B] Open the eastern door\\n[C] Return to the hallway\"\n\t\t\t\t\t\t\t+ \" you just came from\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tfight(\"alien3\");\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(8);\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'c' || cAction == 'C')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(5);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//player defeats alien but does not have Steel Key\n\t\t\t\telse if (evaluateTravelled(7) && evaluateInventory(\"Edison Grenade\") &&\n\t\t\t\t\t!(evaluateInventory(\"Steel Key\")))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"The steel door is locked. If I had to guess, there\" +\n\t\t\t\t\t\t\" is probably a key to be\\nfound...\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Open the eastern door\\n[B] Open the southern \" +\n\t\t\t\t\t\t\"door\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'c' && cAction != 'C' && cAction != 'e' && cAction != 'E'\n\t\t\t\t\t\t&& cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"The steel door is locked. If I had to guess, there\" +\n\t\t\t\t\t\t\t\" is probably a key to be\\nfound...\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Open the eastern door\\n[B] Open the southern \" +\n\t\t\t\t\t\t\t\"door\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(8);\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(5);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//player has defeated alien and has Steel Key\n\t\t\t\telse if (evaluateInventory(\"Edison Grenade\") && \n\t\t\t\t\tevaluateInventory(\"Steel Key\") && evaluateTravelled(7))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Since we did away with the alien, it is time to use \"\n\t\t\t\t\t\t+ \"the Steek Key on the\\nsteel door. What could be on the other \" +\n\t\t\t\t\t\t\"side of the door?...\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue through doorway\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && \n\t\t\t\t\t\tcAction != 'E' && cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Since we did away with the alien, it is time to use \"\n\t\t\t\t\t\t\t+ \"the Steek Key on the\\nsteel door. What could be on the other \" +\n\t\t\t\t\t\t\t\"side of the door?...\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue through doorway\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(11);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\t//player enters hallway\n\t\t\t\tthis.hasTravelled.add(8);\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You enter a hallway with a turn in it. You slowly walk\" +\n\t\t\t\t\t\" around the corner\\nand see a door at the end of the hall.\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Open western door back to cavern\\n[B] Open southern \"\n\t\t\t\t\t+ \"door\\n\\n\");\n\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\n\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\tcAction != 'M')\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You enter a hallway with a turn in it. You slowly walk\" +\n\t\t\t\t\t\t\" around the corner\\nand see a door at the end of the hall.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Open western door back to cavern\\n[B] Open southern \"\n\t\t\t\t\t\t+ \"door\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t{\n\t\t\t\t\tsetRoom(7);\n\t\t\t\t}\n\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t{\n\t\t\t\t\tsetRoom(9);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\t//first time player enters\n\t\t\t\tif (!(evaluateTravelled(9)))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"When you open the door, you can hear the sound of an \" +\n\t\t\t\t\t\t\"alien standing up!\\nYou lock eyes with it's one eye - no chance of \" +\n\t\t\t\t\t\t\"getting by unnoticed. You\\nsee a door behind the alien.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Fight alien\\n[B] Run back into the hallway\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"When you open the door, you can hear the sound of an \" +\n\t\t\t\t\t\t\t\"alien standing up!\\nYou lock eyes with it's one eye - no chance of \" +\n\t\t\t\t\t\t\t\"getting by unnoticed. You\\nsee a door behind the alien.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Fight alien\\n[B] Run back into the hallway\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.hasTravelled.add(9);\n\t\t\t\t\t\tfight(\"alien4\");\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(8);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//player defeats alien\n\t\t\t\telse if (evaluateTravelled(9) && \n\t\t\t\t\tevaluateInventory(\"Steampunk Mach. II Riflesword\"))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Where would you like to go next?\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Open door that alien was guarding\\n[B] Exit to \" +\n\t\t\t\t\t\t\"hallway where you came from\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'b' && cAction != 'B'\n\t\t\t\t\t\t&& cAction != 'e' && cAction != 'E' && cAction != 'm' && \n\t\t\t\t\t\tcAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"That was an epic battle! You pick up the alien's \" +\n\t\t\t\t\t\t\t\"weapon. It is a Mach. II\\nRiflesword! This is a lot better than the \" +\n\t\t\t\t\t\t\tgetEquippedWeapon() + \"!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Open door that alien was guarding\\n[B] Exit to \" +\n\t\t\t\t\t\t\t\"hallway where you came from\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(10);\n\t\t\t\t\t}\n\t\t\t\t\telse if (cAction == 'b' || cAction == 'B')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(8);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\t//first time player enters\n\t\t\t\tif (!(evaluateTravelled(10)) && !(evaluateInventory(\"Steel Key\")))\n\t\t\t\t{\n\t\t\t\t\tthis.inventory.add(\"Steel Key\");\n\t\t\t\t\tthis.hasTravelled.add(10);\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"This is a small room, but right in front of you on the\" +\n\t\t\t\t\t\t\" ground is a Steel\\nKey! This probably opens something!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Exit room\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && \n\t\t\t\t\t\tcAction != 'E' && cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"This is a small room, but right in front of you on the\" +\n\t\t\t\t\t\t\t\" ground is a Steel\\nKey! This probably opens something!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Exit room\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(9);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//player has entered before\n\t\t\t\telse if (evaluateInventory(\"Steel Key\") && evaluateTravelled(10))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"This tiny room has been explored already. Nothing to see\"\n\t\t\t\t\t\t+ \" here.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Exit room\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && \n\t\t\t\t\t\tcAction != 'E' && cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"This tiny room has been explored already. Nothing to see\"\n\t\t\t\t\t\t\t+ \" here.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Exit room\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(9);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\t//player enters room\n\t\t\t\tif (!(evaluateTravelled(11)) && !(evaluateInventory(\"Platinum Key\")))\n\t\t\t\t{\n\t\t\t\t\tthis.inventory.remove(\"Steel Key\");\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You enter another large room. The ground is oozing \"\n\t\t\t\t\t\t+ \"lava, adding to lava\\nrunning down the walls. In the center of \"\n\t\t\t\t\t\t+ \"the room... you see the BOSS\\nALIEN! He is guarding a door \"\n\t\t\t\t\t\t+ \"on the eastern wall. This will be your\\nhardest challenge \" +\n\t\t\t\t\t\t\"yet. Good luck!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Fight boss alien\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && \n\t\t\t\t\t\tcAction != 'E' && cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You enter another large room. The ground is oozing \"\n\t\t\t\t\t\t\t+ \"lava, adding to lava\\nrunning down the walls. In the center of \"\n\t\t\t\t\t\t\t+ \"the room... you see the BOSS\\nALIEN! He is guarding a door \"\n\t\t\t\t\t\t\t+ \"on the eastern wall. This will be your\\nhardest challenge \" +\n\t\t\t\t\t\t\t\"yet. Good luck!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Exit room\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tfight(\"boss\");\n\t\t\t\t\t\tthis.hasTravelled.add(11);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//player has defeated the boss\n\t\t\t\telse if (evaluateTravelled(11) && evaluateInventory(\"Platinum Key\"))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Now that you have the Platinum Key, let us try to \"\n\t\t\t\t\t\t+ \"open the door behind the\\nboss alien corpse.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Open eastern door\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAction != 'a' && cAction != 'A' && cAction != 'e' && \n\t\t\t\t\t\tcAction != 'E' && cAction != 'm' && cAction != 'M')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Now that you have the Platinum Key, let us try to \"\n\t\t\t\t\t\t\t+ \"open the door behind the\\nboss alien corpse.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Open eastern door\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"\\t[M] Map\\n\\t[E] Backpack\\n\\nHP: \" + getHP() + \"\\nWeapon: \" + \n\t\t\t\t\t\t\tgetEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (cAction == 'a' || cAction == 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tsetRoom(12);\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\t//player wins!\n\t\t\t\tthis.blnPlayerVictory = true;\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have found the obsidite! The CDC evacuates you and \"\n\t\t\t\t\t+ \"the obsidite back\\nto the CDC and production of the vaccine against \"\n\t\t\t\t\t+ \"the pandemic begins. You\\nhave saved the humanity!\");\n\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t}//end switch (room)\n\t\t\n\t\treturn cAction;\n\t\n\t}", "@Override\n\tpublic char getDisplayChar() {\n\t\tPrintable thing;\n\t\t\n\t\tif(this.containsAnActor()) \n\t\t\tthing = this.getActor();\n\t\telse if (items.size() > 0)\n\t\t\tthing = items.get(items.size() - 1);\n\t\telse\n\t\t\tthing = ground;\n\t\t\n\t\treturn thing.getDisplayChar();\n\t}", "char getContactLetter();", "public void displayWinner(Player player) {\n System.out.println(\"Partie terminée !\");\n System.out.println(player.getPlayerName()+\" remporte la partie avec les billes \"+player.getColor().toString(true));\n System.out.println(\"――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――\");\n }", "public static void main(String[] args)\n\t{\n\t\tScanner kbAlpha = new Scanner(System.in);\t//gets alphabetic keyboard input\n\t\tScanner kbNum = new Scanner(System.in);\t\t//gets numeric keyboard input\n\t\tPlayer player = new Player();\t\t\t\t\t//creates player object\n\t\t\n\t\tString strInput;\t\t\t\t\t//user-input before char is determined\n\t\tchar cStartOption;\t\t\t\t\t//determined choice based on strInput\n\t\tchar cAction;\t\t\t\t\t\t//determined choice based on strInput\n\t\tint iRoom;\t\t\t\t\t\t\t//holds room number\n\t\t\n\t\tcStartOption = 'x';\n\t\t\n\t\twhile (cStartOption != 's' || cStartOption != 'S')\n\t\t{\n\t\t\tSystem.out.print(\"\\n\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\" V O L C A N O \\n\");\n\t\t\tSystem.out.print(\" O F \\n\");\n\t\t\tSystem.out.print(\" H O P E \\n\");\n\t\t\tSystem.out.print(\" \\n\");\n\t\t\tSystem.out.print(\" \\n\");\n\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\tSystem.out.print(\" * * * * * * \\n\");\n\t\t\tSystem.out.print(\" * * * * * * ## \\n\");\n\t\t\tSystem.out.print(\" * * * * * # # # \\n\");\n\t\t\tSystem.out.print(\" ## * * * * * # ## ## \\n\");\n\t\t\tSystem.out.print(\" # # * * * * * ## # \\n\");\n\t\t\tSystem.out.print(\" # # * * * * # # \\n\");\n\t\t\tSystem.out.print(\" ## # # * ## * # # \\n\");\n\t\t\tSystem.out.print(\" # #### #### ####### # \\n\");\n\t\t\tSystem.out.print(\" # ### \\n\");\n\t\t\tSystem.out.print(\" ## # \\n\");\n\t\t\tSystem.out.print(\" # ### \\n\");\n\t\t\tSystem.out.print(\" # #### \\n\");\n\t\t\tSystem.out.print(\" # # \\n\");\n\t\t\tSystem.out.print(\" \\n\");\n\t\t\tSystem.out.print(\"\\t\\t [S] Start\\t\\t[I] Instructions\\n\");\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\" +\n\t\t\t\t\"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcStartOption = strInput.charAt(0);\n\t\t\n\t\t\twhile (cStartOption != 'i' && cStartOption != 'I' && cStartOption != 's' && \n\t\t\t\tcStartOption != 'S')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" V O L C A N O \\n\");\n\t\t\t\tSystem.out.print(\" O F \\n\");\n\t\t\t\tSystem.out.print(\" H O P E \\n\");\n\t\t\t\tSystem.out.print(\" \\n\");\n\t\t\t\tSystem.out.print(\" \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * * \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * * ## \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * # # # \\n\");\n\t\t\t\tSystem.out.print(\" ## * * * * * # ## ## \\n\");\n\t\t\t\tSystem.out.print(\" # # * * * * * ## # \\n\");\n\t\t\t\tSystem.out.print(\" # # * * * * # # \\n\");\n\t\t\t\tSystem.out.print(\" ## # # * ## * # # \\n\");\n\t\t\t\tSystem.out.print(\" # #### #### ####### # \\n\");\n\t\t\t\tSystem.out.print(\" # ### \\n\");\n\t\t\t\tSystem.out.print(\" ## # \\n\");\n\t\t\t\tSystem.out.print(\" # ### \\n\");\n\t\t\t\tSystem.out.print(\" # #### \\n\");\n\t\t\t\tSystem.out.print(\" # # \\n\");\n\t\t\t\tSystem.out.print(\" \\n\");\n\t\t\t\tSystem.out.print(\"\\t\\t [S] Start\\t\\t[I] Instructions\\n\");\n\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcStartOption = strInput.charAt(0);\n\t\t\t}\n\n\t\t\tif (cStartOption == 'i' || cStartOption == 'I')\n\t\t\t{\n\t\t\t\tcStartOption = instructions();\n\t\t\t}\n\t\t\t\n\t\t\tif (cStartOption == 's' || cStartOption == 'S')\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tplayer.setRoom(1);\n\t\t\n\t\t// THE GAME LOOP\n\t\twhile (player.getPlayerState() && !(player.getVictory()))\n\t\t{\n\t\t\tiRoom = player.getRoom();\n\t\t\tcAction = player.showMessage(iRoom);\n\t\t\tif (player.getPlayerState() && !(player.getVictory()))\n\t\t\t{\n\t\t\t\tif (cAction == 'm' || cAction == 'M')\n\t\t\t\t{\n\t\t\t\t\tmap(player.getRoom());\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\twhile (cAction != 'r' && cAction != 'R')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tmap(player.getRoom());\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (cAction == 'e' || cAction == 'E')\n\t\t\t\t{\n\t\t\t\t\tplayer.showInventory();\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\twhile (cAction != 'r' && cAction != 'R')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tplayer.showInventory();\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public MultiLineText getGameScreenFullPlayerName() {\n if (this.gameScreenFullPlayerName == null) {\n String[] strTemp = { this.fullPlayerName };\n this.gameScreenFullPlayerName = new MultiLineText(strTemp, 10, 10, Color.black, 15.0f, \"Lucida Blackletter\", ImageLibRef.TEXT_PRIORITY, MultiLineText.LEFT_ALIGNMENT);\n }\n\n return this.gameScreenFullPlayerName;\n }", "private void displayWrongLetters() {\n\t\tGObject checkForOldLabel = getElementAt(wrongLettersPosX,wrongLettersPosY);\n\t\tif (checkForOldLabel != null) {\n\t\t\tremove(checkForOldLabel);\n\t\t}\n\t\twrongLettersPosX = guessPosX;\n\t\twrongLettersPosY = guessPosY+guessSoFar.getHeight()*2;\n\t\tGLabel wrongLetterDisplay = new GLabel(wrongLetters);\n\t\twrongLetterDisplay.setLocation(wrongLettersPosX,wrongLettersPosY);\n\t\tadd(wrongLetterDisplay);\n\t}", "public void guessLetter()\n\t{\n\t\tSystem.out.println(\"The name is \" + length + \" letters long.\");\n\t\tSystem.out.println(\"Ok, now guess what letters are in the name.\");\n\t\t\n\t\t//This will guess the first letter.\n\t\tguessLetter1 = scan.nextLine();\n\t\tif(name.indexOf(guessLetter1) == -1)\n\t\t{\n\t\t\tSystem.out.println(\"Sorry, that letter is not in the name, try again!\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tposition1 = name.indexOf(guessLetter1);\n\t\t\tSystem.out.println(\"You're correct, letter \" + guessLetter1 + \" is in position \" + position1);\n\t\t}\n\t\t\n\t\t//This will guess the second letter.\n\t\tguessLetter2 = scan.nextLine();\n\t\tif(name.indexOf(guessLetter2) == -1)\n\t\t{\n\t\t\tSystem.out.println(\"Sorry, that letter is not in the name, try again!\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tposition2 = name.indexOf(guessLetter2);\n\t\t\tSystem.out.println(\"You're correct, letter \" + guessLetter2 + \" is in position \" + position2);\n\t\t}\n\t\t\n\t\t//This will guess the third letter.\n\t\tguessLetter3 = scan.nextLine();\n\t\tif(name.indexOf(guessLetter3) == -1)\n\t\t{\n\t\t\tSystem.out.println(\"Sorry, that letter is not in the name.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tposition3 = name.indexOf(guessLetter3);\n\t\t\tSystem.out.println(\"You're correct, letter \" + guessLetter3 + \" is in position \" + position3);\n\t\t}\n\t}", "public void printAssistants(Player player);", "public char getLetter(){\r\n\t\treturn letter;\r\n\t}", "public String getPlayername(Player player) {\n System.out.println(\"――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――\");\n System.out.println(\"Merci de d'indiquer le nom du joueur \"+player.getColor().toString(false)+\" : \");\n String name = readInput.nextLine();\n return name;\n }", "private String decideLetter(Cell c) {\n String s = \"\";\n if (!c.getHasBoat() && !c.getShotAt()) {\n s = \"-\";\n } else if (!c.getHasBoat() && c.getShotAt()) {\n s = \"M\";\n } else if (c.getHasBoat() && !c.getShotAt()) {\n s = \"B\";\n } else {\n s = \"H\";\n }\n return s;\n }", "public void print() {\n System.out.print(\"\\033[H\\033[2J\");\n for(int y = 0; y < this.height; y++) {\n for (int x = 0; x < this.width; x++) {\n ColoredCharacter character = characterLocations.get(new Coordinate(x , y));\n if (character == null) {\n System.out.print(\" \");\n } else {\n System.out.print(character);\n }\n }\n System.out.print(\"\\n\");\n }\n }", "public String cardDisplay(){\n if(this.faceDown) {\n return \"Bicycle\";}\n else{ return \"Friendly Names of: \" + this.rank + \":\"+this.suit;\n\n }\n }", "private void show() {\n System.out.println(\"...................................................................................................................................................................\");\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n for(int i = 0; i < players.size(); i++) {\n if (state.getTurn() == i) {\n System.out.print(Color.PURPLE.getPrintColor());\n System.out.print((i+1) + \"- \" + players.get(i).toString());\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n }\n else {\n System.out.print(Color.CYAN.getPrintColor());\n System.out.print((i+1) + \"- \" + players.get(i).toString());\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n }\n }\n System.out.println();\n System.out.print(\"Direction: \");\n if (state.getDirection() == +1) {\n System.out.println(Color.PURPLE.getPrintColor() + \"clockwise ↻\");\n }\n else {\n System.out.println(Color.PURPLE.getPrintColor() + \"anticlockwise ↺\");\n }\n System.out.println(Color.RESET.getPrintColor() + \"Turn: \" + Color.PURPLE.getPrintColor() + players.get(state.getTurn()).getName() + Color.RESET.getPrintColor());\n System.out.println(currentCard.currToString());\n if (controls.get(state.getTurn()) instanceof PcControl) {\n System.out.print(players.get(state.getTurn()).backHandToString() + Color.RESET.getPrintColor());\n }\n else {\n System.out.print(players.get(state.getTurn()).handToString() + Color.RESET.getPrintColor());\n }\n }", "public void displayEnemyBoard() {\n System.out.printf(\"%20s\",\"\");\n for(int i = 0; i < space[0].length; i++)\n {\n System.out.printf(\"%4d\",i+1);\n }\n System.out.println(); \n for(int row = 0; row < this.space.length; row++) {\n System.out.print(\" \" + (char)(row+'A') + \"|\");\n for (String emblem: this.space[row]) {\n if (!(emblem.equals(\"[ ]\") || emblem.equals(\"[X]\") || emblem.equals(\"[*]\"))) //Hide the enemy ships\n System.out.print(\"[ ]\"+ \" \");\n else\n System.out.print(emblem + \" \");\n } \n System.out.println();\n }\n }", "private void displayPlayerMenu () {\n System.out.println();\n System.out.println(\"Player Selection Menu:\");\n System.out.println(\n \"Timid player...........\" + TIMID);\n System.out.println(\n \"Greedy player..........\" + GREEDY);\n System.out.println(\n \"Clever player..........\" + CLEVER);\n System.out.println(\n \"Interactive player.....\" + INTERACTIVE);\n }", "public void displayCharacterA(Player p, ServicesDuel sd, int i){\n\t\tSystem.out.println(p.getNickname() + \" atacara con \" + p.getCharacters().get(i).getName()+ \":\");\n\t\tsd.showQuality(p.getCharacters().get(i));\n\n\t}", "private static void printHangman() {\n\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\tif (guessesResult[i]) {\n\t\t\t\tSystem.out.print(word.charAt(i));\n\t\t\t} else {\n\t\t\t\tSystem.out.print(\" _ \");\n\t\t\t}\n\t\t}\n\t}", "public char getLetter() {\n return letter;\n }", "public char getUserGuess(){\n char letter = '\\u0000';\n if(mGuessEditText.getText().toString().toLowerCase().length() != 0)\n letter = mGuessEditText.getText().toString().toLowerCase().charAt(0);\n return letter;\n }", "private void showInfo() {\n\t\tSystem.out.println(\"=============================\");\n\t\tSystem.out.println(\"Guess a letter:\\n\" + this.word);\n\t\tSystem.out.println(\"You have made \" \n\t\t\t\t+ this.numOfWrongGuess + \" wrong guesses.\");\n\t\tSystem.out.println(\"You will lose the game if you make more than \"\n\t\t\t\t+ this.allowance + \" wrong guesses.\");\n\t\tSystem.out.println(\"The already guessed wrong letters are:\");\n\t\tSystem.out.println(this.wrongLetters);\n\t\tSystem.out.println(\"-----------------------------\");\n\t}", "@Override\r\n\tpublic void attack() {\n\t\tSystem.out.printf(\"ºóÎÀ%s½ø¹¥\\n\", name);\r\n\t}", "public void render() {\n stroke(color(50, 50, 50));\n fill(color(50, 50, 50));\n rect(0, 0, getWidth(), getTopHeight());\n int tempX = this.x;\n int fontSize = 150 / (this.players.size() * 2);\n\n this.messages = new ArrayList();\n int count = 0;\n for (Player player : this.players) {\n\n StringBuilder bar = new StringBuilder();\n // max lives = 3\n bar.append(player.name() + \" \");\n for (int i=0; i<3; i++) {\n if (i < player.lives()) {\n bar.append('\\u25AE'); // http://jrgraphix.net/r/Unicode/?range=25A0-25FF\n } else {\n bar.append('\\u25AF');\n }\n }\n\n String message = bar.toString();\n messages.add(message);\n\n textAlign(LEFT);\n textFont(f, fontSize);\n fill(player.getColor());\n text(message, tempX, this.y);\n\n int newX = (int) textWidth(message) + 10;\n tempX += newX;\n count++;\n }\n }", "public char getLetter()\n {\n \treturn letter;\n }", "public void print()\n {\n System.out.println(\"------------------------------------------------------------------\");\n System.out.println(this.letters);\n System.out.println();\n for(int row=0; row<8; row++)\n {\n System.out.print((row)+\"\t\");\n for(int col=0; col<8; col++)\n {\n switch (gameboard[row][col])\n {\n case B:\n System.out.print(\"B \");\n break;\n case W:\n System.out.print(\"W \");\n break;\n case EMPTY:\n System.out.print(\"- \");\n break;\n default:\n break;\n }\n if(col < 7)\n {\n System.out.print('\\t');\n }\n\n }\n System.out.println();\n }\n System.out.println(\"------------------------------------------------------------------\");\n }", "public void display_game_start_text() {\n\n fill(150, 100);\n rect(0, 0, displayW, displayH);\n\n textFont(myFont);\n textAlign(CENTER);\n textSize(displayH/30);\n fill(255);\n text(\"Get Ready!\", displayW/2, displayH/2);\n\n mySound.play_opening_song();\n\n isKeyInputAllowed = false;\n }", "public char getCharacter(boolean defender){\n if (defender){\n if (this.is_Empty()){\n return '~';\n }\n else if(this.is_shot()){\n return '*';\n }\n else{\n return 'B';\n }\n }\n else {\n if (!this.is_shot()){\n return '.';\n }\n else if (!this.is_Empty()){\n return '*';\n }\n else {\n return '~';\n }\n }\n }", "public String getLetter() {\n\t\tString letter;\n\t\tletter = JOptionPane.showInputDialog(getFrame(), \"Enter the name of the Node,then press anywhere on the screen to locate the Node\");\n\t\twhile(letter==null || letter.equals(\"\")){\n\t\t\tletter = JOptionPane.showInputDialog(getFrame(), \"Enter the name of the Node,then press anywhere on the screen to locate the Node\");\n\t\t\t\n\t\t}\n\t\t\n\t\treturn letter.toUpperCase();\n\t}", "public static void NewChar(){\n\t\tSystem.out.println(\"\\\"What is the name of the powerful soul who wishes to brave the Depths alone?\\\"\");\n\t\tScanner sc = new Scanner(System.in);\n\t\tString Name = sc.nextLine();\n\t\tSystem.out.println(\"\\\"\" + Name + \"? Such an odd name, I cannot tell if this is bravery or foolishness...\\\"\");\n\t\tSystem.out.println(\"\\\"So tell me, \" + Name + \", what do your stats look like?\\\"\");\n\t\tboolean key = true; //To allow the player to re-enter stats if he/she messes up in choosing them.\n\t\twhile (key){\n\t\t\tkey = false;\n\t\t\ttstr = statChoice(\"strength\"); //The string in this method is used as text to let the player in on what stat they are choosing. The method automatically lowers the statPoints.\n\t\t\ttmag = statChoice(\"magic power\");\n\t\t\ttluc = statChoice(\"luck\");\n\t\t\ttacc = statChoice(\"accuracy\");\n\t\t\ttdef = statChoice(\"defense\");\n\t\t\ttspe = statChoice(\"speed\");\n\t\t\ttHP = ((statChoice(\"Health Points\") * 10) + 10); //HP and MP are multiplied by ten, and HP auto starts at 10 so the player doesn't automatically die when they start the game.\n\t\t\ttMP = (statChoice(\"Mystic Energy\") * 10);\n\t\t\ttstatSheet(); //This method just prints out the player's current stats.\n\t\t\tSystem.out.println(\"Are you okay with these stats?(Note - You cannot change them later)\");\n\t\t\tString statConfermation = sc.nextLine();\n\t\t\tif(statConfermation.equalsIgnoreCase(\"yes\")||statConfermation.equalsIgnoreCase(\"ye\")||statConfermation.equalsIgnoreCase(\"y\")){\n\t\t\t\tPlayer player = new Player(Name, tstr, tmag, tluc, tacc, tdef, tspe, tHP, tMP); //This is cementing the stats in the Player class\n\t\t\t\tArrays.fill(player.items, \"\");\n\t\t\t\tArrays.fill(player.spell, \"\");\n\t\t\t\tplayer.statSheet();\n\t\t\t\tChooseGift(player);\n\t\t\t\tSystem.out.println(\"\\\"It appears you have chosen your gift.\\nI believe you have all you need, \" + player.name + \", I hope you are ready for the depths!\\nGood luck.\\\"\");\n\t\t\t\tDepthsIntro.Enter(player);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tReset(); //this method just resets the game for the process to go through again.\n\t\t\t\tkey = true;\n\t\t\t}\n\t\t}\n\t\t}", "public String toString(){\r\n\t\treturn \"\" + letter;\r\n\t}", "@Override\n\tpublic void draw() {\n\t\tif (isWhite){\n\t\t\tSystem.out.print(\"\\u2656\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.print(\"\\u265C\");\n\t\t}\t\t\n\t}", "@Override\r\n public void paint(Graphics g) {\r\n super.paint(g);\r\n Letter letter = new Letter(\"C\", getPosition());\r\n letter.paint(g);\r\n }", "public char getLetter() {\r\n\t\treturn letter;\r\n\t}", "public void display_game_over_text () {\n\n fill(150, 100);\n rect(0, 0, displayW, displayH);\n\n textFont(myFont);\n textAlign(CENTER);\n textSize(displayH/20);\n fill(255);\n text(\"Game Over\", displayW/2, 3*displayH/7);\n\n if (score.winnerName == \"Pacmax\") {\n text(\"Winner is Pacmax! Your score is \" + score.score, displayW/2, 4*displayH/7);\n } else {\n text(\"Winner is Blinky!\", displayW/2, 4*displayH/7);\n }\n\n mySound.play_game_over_song();\n\n isKeyInputAllowed = false;\n }", "public char getPlayer() {\n return player;\n }", "public static void displayOneCharacter (List<Character> listCP){\n System.out.println(\"enter the index of your character : \");\n int ch = getUserChoice();\n System.out.println(listCP.get(ch));\n }", "public void setWinningText(String player) {\n names.setText(player +\" WINS!!!\");\n }", "public void display() {\n\t\tfor (int i = 0; i < player.length; ++i) {\n\t\t\t// inserting empty line in every 3 rows.\n\t\t\tif (i % 3 == 0 && i != 0) {\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t\tfor (int j = 0; j < player[i].length; ++j) {\n\t\t\t\t// inserting empty space in every 3 columns.\n\t\t\t\tif (j % 3 == 0 && j != 0) {\n\t\t\t\t\tSystem.out.print(' ');\n\t\t\t\t}\n\t\t\t\tif (problem[i][j] == 0 && player[i][j] == 0) {\n\t\t\t\t\tSystem.out.print(\"( )\");\n\t\t\t\t} else if (problem[i][j] == 0) {\n\t\t\t\t\tSystem.out.print(\"(\" + player[i][j] + \")\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.print(\"[\" + player[i][j] + \"]\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t}", "public char getLetter()\n\t{\n\t\treturn letter;\n\t}", "@Override\r\n public void keyPressed(KeyEvent e) {\n char c = e.getKeyChar();\r\n //seteo el caracter como texto del label\r\n lab.setText(Character.toString(c));\r\n }", "public char getLetter() {\r\n\t\t\treturn letter;\r\n\t\t}", "public void setLetter\n\t\t\t(char letter)\n\t\t\t{\n\t\t\tletters = letter == 'Q' ? \"QU\" : \"\"+letter;\n\t\t\tsetText (letters);\n\t\t\t}", "public static void playGame(String word) {\n DrawingPanel canvas = new DrawingPanel(500, 500);\n Graphics pen = canvas.getGraphics();\n \n //define flag for while loop\n boolean gameOver = false;\n \n //create a boolean array with elements equal to the number of letters to guess\n boolean[] letters = new boolean[word.length()];\n \n //Create a string that stores all letters that have been guessed\n String guesses = \"\";\n \n //create an int variable that stores the number of wrong guesses\n int wrongGuesses = 0;\n \n //create a scanner object that reads in user guesses.\n Scanner console = new Scanner(System.in);\n \n //meat of the game\n while(!gameOver) {\n \n //prompt user for a guess\n System.out.print(\"Guess a letter: \");\n char guess = Character.toLowerCase(console.next().charAt(0));\n \n \n //check to see if the user has guessed this letter before\n boolean freshGuess = true;\n for(int index = 0; index < guesses.length(); index++) {\n System.out.println(\"Guesses[i] = \" + guesses.charAt(index) + \", Guess = \" + guess);\n if(guess == guesses.charAt(index)) { \n freshGuess = false;\n }\n }\n \n //if the guess is fresh, check if it is correct\n boolean correctGuess = false;\n if(freshGuess) {\n \n for(int index = 0; index < word.length(); index++) {\n if(guess == word.charAt(index)) { \n letters[index] = true;\n correctGuess = true;\n }\n }\n \n if(correctGuess) {\n System.out.println(\"Good guess! The word is:\");\n gameOver = !printGuess(letters, word);\n }\n \n else{\n System.out.println(\"Oops! Letter \" + guess + \" is not there. Adding to hangman... \");\n draw(wrongGuesses, pen);\n wrongGuesses++;\n if(wrongGuesses == 6) { gameOver = true; }\n }\n \n guesses += guess;\n }\n \n //report repeated guess\n else { \n System.out.println(\"You have already guessed \" + guess + \".\");\n }\n \n \n }\n \n //The game is over\n System.out.println(\"Game Over!\");\n \n }", "public String getLetter() {\n return letter;\n }", "private void showMatch() {\n System.out.println(\"Player 1\");\n game.getOne().getField().showField();\n System.out.println(\"Player 2\");\n game.getTwo().getField().showField();\n }", "private void showStat() {\n\t\tSystem.out.println(\"=============================\");\n\t\tSystem.out.println(\"Your won! Congrates!\");\n\t\tSystem.out.println(\"The word is:\");\n\t\tSystem.out.println(\"->\\t\" + this.word.toString().replaceAll(\" \", \"\"));\n\t\tSystem.out.println(\"Your found the word with \" \n\t\t\t\t+ this.numOfWrongGuess + \" wrong guesses.\");\n\t}", "public String showFirstRoundCards() {\n String message = \"[ Unknown \";\n message += personHand.get(1) + \" ]\";\n return message;\n }", "private String getPlayerName() {\n\t\tString[] options = {\"OK\"};\n\t\tJPanel namePanel = new JPanel(new GridLayout(0, 1));\n\t\tJLabel lbl = new JLabel(\"Next player, what is your name?\");\n\t\tJTextField txt = new JTextField(10);\n\t\tnamePanel.add(lbl);\n\t\tnamePanel.add(txt);\n\t\t\n\t\t// show dialog box\n\t\tJOptionPane.showOptionDialog(frame, namePanel, \"Player name\",\n\t\t\t\tJOptionPane.NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options , options[0]);\n\t\tString playerName = txt.getText();\n\t\twhile(playerName.length() < 1){\n\t\t\tlbl.setText(\"Name must be at least one character long.\");\n\t\t\tJOptionPane.showOptionDialog(frame, namePanel, \"Player name\",\n\t\t\t\t\tJOptionPane.NO_OPTION, JOptionPane.WARNING_MESSAGE, null, options , options[0]);\n\t\t\tplayerName = txt.getText();\n\t\t}\n\t\treturn playerName;\n\t}", "public String printCard(int player) {\n\t\tif (player >= 4 || player < 0) {\n\t\t\treturn \"Error\";\n\t\t}\n\t\tif (show[player]) {\n\t\t\treturn suit + rank;\n\t\t}\n\t\treturn suit;\n\t}", "public void setLetter(char letter){\r\n\t\tthis.letter = letter;\r\n\t}", "public void draw()\n\t{\n\t\tSystem.out.println(\" |-------------------------------|\");\n\t\t\n\t\tfor (int i = 0; i < board_size; i++)\n\t\t{\n\t\t\tSystem.out.print(board_size - i + \" |\");\n\t\t\t\n\t\t\tfor (int j = 0; j < board_size; j++)\n\t\t\t{\n\t\t\t\tif (getPiece(i,j) == null) {System.out.print(\" |\");}\n\t\t\t\telse {System.out.print(\" \" + getPiece(i,j).getSymbol().toChar() + \" |\");}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\" |-------------------------------|\");\n\t\t}\n\t\t\n\t\tSystem.out.println(\" A B C D E F G H \\n\");\n\t}", "public char askForLetter() {\n\t\tchar guessLetter;\n\t\tboolean validInput = false;\n\t\twhile (validInput == false) {\n\t\t\tSystem.out.println(\"Enter a letter: \");\n\t\t\tString guessLine = keyboard.nextLine();\n\t\t\tif (guessLine.length() == 0 || guessLine.length() >= 2) {\n\t\t\t\tSystem.out.println(\"Please insert a valid input\");\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tguessLine = guessLine.toLowerCase();\n\t\t\t\tguessLetter = guessLine.charAt(0);\n\t\t\t\tif(guessLetter >= 'a' && guessLetter <= 'z') {\n\t\t\t\t\tSystem.out.println(\"You entered: \" + guessLetter);\n\t\t\t\t\tvalidInput = true;\n\t\t\t\t\treturn(guessLetter);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Please insert a valid input\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn(' ');\n\t\t\n\t\t\n\t}", "private String showCharacterAccusations() {\n\t\tButtonGroup characterButtons = new ButtonGroup();\n\t\tList<JRadioButton> btns = setupCharacterButtons();\n\t \n\t\t// set up dialog box\n\t\tJPanel characterPanel = new JPanel(new GridLayout(0, 1));\n\t\tJLabel lbl = new JLabel(\"Select the character that you suspect.\");\n\t\tcharacterPanel.add(lbl);\n\t // add buttons to panel\n\t for(JRadioButton b : btns){\n\t \tcharacterButtons.add(b);\n\t \tcharacterPanel.add(b);\n\t }\n\t\t\n\t // show dialog box\n\t JOptionPane.showMessageDialog(frame, characterPanel);\n\t // decide which button was selected\n\t for(JRadioButton b : btns){\n\t \tif(b.isSelected()){\n\t \t\treturn b.getText();\n\t \t}\n\t }\n\t return null;\n\t}", "public char printWinner ()\n {\n\tif (a == b && a == c && a != ' ')\n\t return a;\n\telse if (d == e && d == f && d != ' ')\n\t return d;\n\telse if (g == h && g == i && g != ' ')\n\t return g;\n\telse if (a == d && a == g && a != ' ')\n\t return a;\n\telse if (b == e && b == h && b != ' ')\n\t return b;\n\telse if (c == f && c == i && c != ' ')\n\t return c;\n\telse if (a == e && a == i && a != ' ')\n\t return a;\n\telse if (g == e && g == c && g != ' ')\n\t return g;\n\telse\n\t return t;\n\n\n }", "public static char playerInput(String player) {\r\n\t System.out.println(\"Enter the input to begin the game: X | O: \");\r\n\t char inputChar = value.next().charAt(0);\r\n\r\n\t return inputChar;\r\n\t }", "protected int drawEchoCharacter(Graphics g, int x, int y, char c) {\n ONE[0] = c;\n SwingUtilities2.drawChars(Utilities.getJComponent(this), g, ONE, 0, 1, x, y);\n return x + g.getFontMetrics().charWidth(c);\n }", "private void matchletter(){\n\t\t/* Generate a Random Number and use that as a Index for selecting word from HangmanLexicon*/\n\t\tString incorrectwords = \"\";\n\t\tcanvas.reset();\n\t\tHangmanLexicon word= new HangmanLexicon(); // Get Word from Lexicon\n\t\tint index=rgen.nextInt(0, (word.getWordCount() - 1)); // Select the word Randomly\n\t\tString secretword=word.getWord(index);\n\t\tprintln(\"secretword: \"+secretword);\n\t\tint lengthofstring= secretword.length();\n\t\tString createword=concatNcopies(lengthofstring,\"-\"); // Create a blank word the user will guess\n\t\tcanvas.displayWord(createword); // Display the word on the Canvas\n\t\tprintln(\"The word now looks like this:\" +createword);\n\t\tprintln(\"You have \" +lengthofstring+ \" guesses left\");\n\t\tint counter =0;\n\t\tint guess= lengthofstring;\n\t\tint pos = createword.indexOf('-'); // Check for blank Words\n\t\t/* Ask user to input the letter*/\n\t\twhile(counter<lengthofstring && (pos !=-1 )){ \n\t\t\tint check=0;\n\t\t\tpos = createword.indexOf('-',pos); // Check to find Dashes in word\n\t\t\tString userletter= readLine(\"Your Guess:\");\n\t\t\tif(userletter.length() > 1){ // Check for two letters entered\n\t\t\t\tprintln(\"Enter letter Again\");\n\t\t\t}\n\t\t\tchar ch=userletter.charAt(0);\n\t\t\tif(Character.isLowerCase(ch)) { // Convert lower case to upper case\n\t\t\t\tch = Character.toUpperCase(ch);\n\t\t\t}\n\t\t\tfor (int i=0;i<lengthofstring;i++){ // Check for entire letter matching in the secretword\n\t\t\t\tif (ch==secretword.charAt(i) && ch!=createword.charAt(i)) { \n\t\t\t\t\tcreateword = createword.substring(0, i) + ch + createword.substring(i + 1);\n\t\t\t\t\tcanvas.displayWord(createword);\n\t\t\t\t\tcheck++; // If user puts the correct letter again it is flagged as a error\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(check==0){\n\t\t\t\tprintln(\"There are no \"+ch+\"'s in the word\");\n\t\t\t\tguess=guess-1;\n\t\t\t\tincorrectwords = incorrectwords+ch;\n\t\t\t\tcanvas.noteIncorrectGuess(guess, incorrectwords);\n\t\t\t\tcanvas.displayWord(createword);\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\tprintln(\"The word now looks like this:\"+createword);\n\t\t\tprintln(\"You have \" +guess+ \" guesses left\");\n\n\t\t\tif(counter==lengthofstring){ // Checks for Fail condition- Game Over\n\t\t\t\tprintln(\"You are completely hung\");\n\t\t\t\tprintln(\"The word was: \"+secretword);\n\t\t\t\tcanvas.displayWord(secretword);\n\t\t\t\tprintln(\"You lose \");\n\t\t\t}\n\t\t\tpos = createword.indexOf('-');// Check for Win condition\n\t\t\tif(pos < 0){\n\t\t\t\tprintln(\"You saved Hangman\");\n\t\t\t\tprintln(\"You Win !!!\");\n\t\t\t\tcanvas.displayWord(createword);\n\t\t\t\tguess=123;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public static String randChar(){\n int n = rand.nextInt(52);\n return String.valueOf(KEYBOARD.charAt(n));\n }", "public void addCharToName(char c) {\n \t\tif (state == 4) {\n \t\t\t/*\n \t\t\t * if (playerName.equals(\"PLAYER\")) { playerName = \"\"; }\n \t\t\t */\n \t\t\tif (playerName.length() < 16) {\n \t\t\t\tplayerName = playerName + c;\n \t\t\t}\n \t\t}\n \n \t}", "public void displayCorrect(){\n textPane1.setText(\"\");\r\n generatePlayerName();\r\n textPane1.setText(\"GOOD JOB! That was the correct answer.\\n\"\r\n + atBatPlayer + \" got a hit!\\n\" +\r\n \"Press Next Question, or hit ENTER, to continue.\");\r\n SWINGButton.setText(\"Next Question\");\r\n formattedTextField1.setText(\"\");\r\n formattedTextField1.setText(\"Score: \" + score);\r\n }", "@Override\r\n\tpublic char play(char lastPlayed) {\n\t\tString inputStr;\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Next character: \");\r\n\t\tinputStr = input.nextLine();\r\n\t\twhile (inputStr.length() > 1) {\r\n\t\t\tSystem.out.print(\"Next character: \");\r\n\t\t\tinputStr = input.nextLine();\r\n\t\t}\r\n\t\treturn inputStr.charAt(0);\r\n\t}", "public char getUserGuessedLetter() {\n return userGuessedLetter;\n }", "static void gameMenuDisplayText() {\n System.out.println(\"\\n\" +\n \" _______________________________________________________\\n\" +\n \" | ▄▄▌ ▐ ▄▄▄▄ ▄▄▌ ▄▄ ▌ ▄ ▄▄▄ |\\n\" +\n \" | ██ █▌▐▀▄ ▀██ ▐█ ▌ ██ ▐███▀▄ ▀ |\\n\" +\n \" | ██ ▐█▐▐▐▀▀ ██ ██ ▄▄▄█▀▄▐█ ▌▐▌▐█▐▀▀ ▄ |\\n\" +\n \" | ▐█▌██▐█▐█▄▄▐█▌▐▐███▐█▌ ▐██ ██▌▐█▐█▄▄▌ |\\n\" +\n \" | ▀▀▀▀ ▀ ▀▀▀ ▀▀▀ ▀▀▀ ▀█▄▀▀▀ █ ▀▀▀▀▀▀ |\\n\" +\n \" | |\\n\" +\n \" | Welcome to Stranger Game, the Java Console Game! |\\n\" +\n \" | Please select an option from the choices below: |\\n\" +\n \" | |\\n\" +\n \" | Play the Game [Command: Play] |\\n\" +\n \" | Exit this Program [Command: Quit] |\\n\" +\n \" |_____________________________________________________|\\n\");\n }", "@Override\n\tpublic void show() {\n\t\tSystem.out.println(\"´ó¿ãñÃ\");\n\t}", "void draw_char(int x, int y, char[][] _display, char c) {\n _display[x][y] = c;\n }", "public void keyPressed(KeyEvent e) {\n txtScore.setText(\"\"+game.playersFitness());\n txtScore.requestFocus();\n }", "private void drawLetter(Canvas canvas, char c, float x, float y,\n boolean selected) {\n getRect(x, y, selRect);\n if (selected) {\n// Log.d(TAG, \"selRect: \" + selRect);\n canvas.drawRect(selRect, this.selectedTilePaint);\n } else {\n canvas.drawRect(selRect, this.tilePaint);\n }\n\n letterPaint.setTextAlign(Paint.Align.CENTER);\n // Draw the letter in the center of the tile\n FontMetrics fm = letterPaint.getFontMetrics();\n // Centering in X: use alignment (and X at midpoint)\n float x2 = this.width / 2;\n // Centering in Y: measure ascent/descent first\n float y2 = this.height / 2 - (fm.ascent + fm.descent) / 2;\n letterPaint.setTextSize(height * 0.75f);\n letterPaint.setTextScaleX(width / height);\n\n canvas.drawText(\"\" + c, x + x2, y + y2, letterPaint);\n }", "public void firstCharacter() {\n\t\tString name = \"martin\";\n\t\tchar letter = name.charAt(5);\n\t\tSystem.out.println(letter);\n\t}", "public boolean showPlayer(){\n\t\t\n\t\tSystem.out.println(\"\\t\"+color+\"\\t \"+playermoney+\"\\t \\t\"+totalminions+\" \\t\"+totalbuildings+\" \\t\\t\"+personalityCard.cardName);\n\t\treturn true;\n\t}", "public void show(char[][] gameScreen, int snakeLength) {\r\n\t\tfor (int i = 0; i < 50; i++) {\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\tSystem.out.println(\"Punkte: \" + snakeLength);\r\n\t\tfor (int i = 0; i < gameScreen.length; i++) {\r\n\t\t\tfor (int j = 0; j < gameScreen[0].length; j++) {\r\n\t\t\t\tSystem.out.print(gameScreen[i][j] + \" \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "@Override\n public String toString() {\n return \"\" + character;\n }", "private void renderBoard() {\n Cell[][] cells = gameBoard.getCells();\n StringBuilder battleField = new StringBuilder(\"\\tA B C D E F G H I J \\n\");\n\n for (int i = 0; i < cells.length; i++) {\n battleField.append(i+1).append(\"\\t\");\n for (int j = 0; j < cells[i].length; j++) {\n if (cells[i][j].getContent().equals(Content.deck)) {\n battleField.append(\"O \");\n } else {\n battleField.append(\"~ \");\n }\n }\n battleField.append(\"\\n\");\n }\n\n System.out.println(battleField.toString());\n }", "@Override\n\tpublic void keyReleased(KeyEvent e) {\n\t\t currentLetter = generateRandomLetter();\n\n\t}", "public void keyTyped(KeyEvent e) {\n txtScore.setText(\"\"+game.playersFitness());\n txtScore.requestFocus();\n }", "private String getCharacterString()\n {\n String returnString = \"Characters:\\n\\t\";\n Set<String> keys = characters.keySet();\n if(characters.size() <= 0) {\n returnString += \"[None]\";\n return returnString;\n }\n for(String character : keys) {\n returnString += \" [\" + character + \"]\";\n }\n return returnString;\n }", "public String message() {\n if (!longestAvailableMoves(2, !lastColor).isEmpty())\n return \"Strike available\";\n else if (isGameOver())\n return \"Game over! Click somewhere to continue\";\n else return \"Turn: \" + (lastColor ? \"White\" : \"Black\");\n }", "static void look(Player player) {\n String stuff = player.getLocation().whatStuff();\n if (!stuff.equals(\"\")) {\n System.out.println(\"You see:\\n\" + stuff);\n }\n else {\n System.out.println(\"You see an empty room.\");\n }\n }", "public String getcharacter(boolean p){\n if (p==true){\n if (this.getShip()!=null){\n if (this.hasBeenShot()){\n return(\"*\");\n }\n else{\n return(\"B\");\n }\n }\n else{\n return(\"~\");\n }\n }\n else{\n if (this.hasBeenShot()){\n if (this.getShip()!=null){\n return(\"*\");\n }\n else{\n return(\"~\");\n }\n }\n else{\n return(\".\");\n }\n }\n\n }", "public void startGame() {\n Scanner in = new Scanner(System.in);\n Player player = Player.getInstance();\n setPlayer(player);\n\n try {\n\n System.out.println(\"\\t\\u2680\\t\\u2681\\t\\u2682\\t\\u2683\\t\\u2684\\t\\u2685\" +\n \"\\nWelcome to the World Series of Craps!\\n\" +\n \"Please enter your name\");\n\n player.setName(in.nextLine());\n\n }\n catch(NoSuchElementException e){\n System.out.println(\"Exiting system, thank you for playing\");\n System.exit(0);\n }\n catch (Exception e) {\n e.printStackTrace();\n setExit(true);\n }\n System.out.println(\"Welcome \" + player.getName() + \"\\n\");\n }", "public void actionPerformed (ActionEvent e) {\n \t\tJOptionPane.showMessageDialog(frame3,\n \t\t\t \"Player 1 is blue \\n\"\n \t\t\t \t\t+ \"Player 2 is red \\n\"\n \t\t\t \t\t+ \"Player 3 is green \\n\"\n \t\t\t \t\t+ \"Player 4 is yellow \\n\"\n \t\t\t \t\t+ \"A Warrior's token is a circle. Range:1, Move:3\\n\"\n \t\t\t \t\t+ \"A Ranger's token is a square. Range:4, Move:5\\n\"\n \t\t\t \t\t+ \"A Rogue's token is a triangle. Range:1, Move:6\\n\"\n \t\t\t \t\t+ \"A healer's token is a star. Range:3, Move:4\\n\"\n \t\t\t \t\t+ \"A Damage Mage's token is a pentagon. Range:3, Move:4\\n\", \n \t\t\t \"Key\",\n \t\t\t JOptionPane.PLAIN_MESSAGE);\n \t}", "public void draw() {\n\t\t//check letters in deck\n\t\tif(deck.size() == 0) {\n\t\t\treturn;\n\t\t}\n\t\t// remove letter from deck\n\t\tLetter temp = deck.remove();\n\t\t// add letter to hand\n\t\thand.add(temp);\n\t}", "private String getPrompt(){\n return \"Now \" + (isWhiteTurn ? \"White\" : \"Black\");\n }", "public void showUserTurnMessage() {\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\"dein Zug... (9 drücken um zu speichern)\");\n\t\tSystem.out.println(\"\");\n\t}", "@Override\n\t\t\tpublic void handle(KeyEvent event) {\n\t\t\t\tif(game.getGameStatus() != Game.GameStatus.GAME_OVER && game.getGameStatus() != Game.GameStatus.WON) {\n\t\t\t\t\t//if not a letter then return\n\t\t\t\t\tif (!event.getCode().isLetterKey())\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\tchar c = event.getCode().toString().charAt(0);\n\n\t\t\t\t\t//make the characters upper case so its easier to work with\n\t\t\t\t\tif (c > 91)\n\t\t\t\t\t\tc = Character.toUpperCase(c);\n\n\t\t\t\t\t//test to see if the character has already been guessed\n\t\t\t\t\tfor (char ch : guessedLetters) {\n\t\t\t\t\t\tif (ch == c) {\n\t\t\t\t\t\t\t//duplicate found, display error and return\n\t\t\t\t\t\t\tdisplayDuplicateInputError();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//color on of the letters on the screen\n\t\t\t\t\tif (c >= 65 && c <= 90) {\n\t\t\t\t\t\tlblLtrs[c - 65].setTextFill(Color.color(1.0, 0, 0));\n\t\t\t\t\t}\n\t\t\t\t\tguessedLetters.add(c);\n\t\t\t\t\tgame.makeMove(c + \"\");\n\t\t\t\t\tdrawHangman();\n\t\t\t\t}\n\t\t\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\t\tchar c = e.getKeyChar();\r\n\t\tif(msg.length()< 10)\r\n\t\t{\r\n\t\tmsg += c;\r\n\t\t}\r\n\t\trepaint();\r\n\t}", "static void displayInv()\r\n {\r\n //Draws the current inventory \r\n \r\n char[][] inv = MainApp.inv;\r\n \r\n //Assigns formatting variables\r\n char i0_0 = inv[0][0];\r\n char i1_0 = inv[0][1];\r\n char i2_0 = inv[0][2];\r\n char i3_0 = inv[0][3];\r\n char i0_1 = inv[1][0];\r\n char i1_1 = inv[1][1];\r\n char i2_1 = inv[1][2];\r\n char i3_1 = inv[1][3];\r\n char i0_2 = inv[2][0];\r\n char i1_2 = inv[2][1];\r\n char i2_2 = inv[2][2];\r\n char i3_2 = inv[2][3];\r\n \r\n String temp = MainApp.playerName;\r\n \r\n //displays the inventory\r\n \r\n System.out.printf(\"%s's inventory\\n\", temp);\r\n System.out.printf(\"~~~~~~~~~~~~~~\\n\");\r\n System.out.printf(\"| %1s %1s %1s %1s |\\n\", i0_0, i1_0, i2_0, i3_0);\r\n System.out.printf(\"| %1s %1s %1s %1s |\\n\", i0_1, i1_1, i2_1, i3_1);\r\n System.out.printf(\"| %1s %1s %1s %1s |\\n\", i0_2, i1_2, i2_2, i3_2);\r\n System.out.printf(\"~~~~~~~~~~~~~~\\n\");\r\n System.out.printf(\"%d Small Potions\\n\",MainApp.potions[0]);\r\n System.out.printf(\"%d Medium Potions\\n\",MainApp.potions[1]);\r\n System.out.printf(\"%d Large Potions\\n\",MainApp.potions[2]);\r\n \r\n \r\n }", "private static void chooseLetter()\n {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Choose a letter :: X or O : \");\n userLetter = scanner.next().toUpperCase().charAt(0);\n computerLetter = (userLetter == 'X') ? 'O' : 'X';\n }", "public static void drawPlayerBoard()\n {\n char rowLetter=' '; //Letra de las filas.\n \n System.out.println(\" 1 2 3 4 \" ); //Imprime la parte superior del tablero.\n System.out.println(\" +-------+-------+\");\n \n \n for (int i = 0; i< BOARD_HEIGHT; i++) //Controla los saltos de fila.\n {\n switch(i)\n {\n case 0: rowLetter='A';\n break;\n case 1: rowLetter='B';\n break;\n case 2: rowLetter='C';\n break;\n case 3: rowLetter='D';\n break;\n }\n \n System.out.print(rowLetter);\n \n for (int j = 0; j < BOARD_WIDTH; j++ ) //Dibuja las filas.\n {\n if (playerBoardPos[i][j]==0)\n {\n System.out.print(\"| · \");\n }\n else\n {\n System.out.print(\"| \" + playerBoardPos[i][j] + \" \");\n }\n }\n System.out.println(\"|\");\n \n if (i==((BOARD_HEIGHT/2)-1)) //Si se ha dibujado la mitad del tablero.\n {\n System.out.println(\" +-------+-------+\"); //Dibuja una separación en medio del tablero.\n }\n }\n \n System.out.println(\" +-------+-------+\"); //Dibuja linea de fin del tablero.\n }", "@Override\r\n\tpublic void showGetPrisonCardMessage(Player player) {\n\t\t\r\n\t}", "public void displayCharacterB(Player p, ServicesDuel sd, int i){\n\t\tSystem.out.println(p.getNickname() + \" se defiende con \" + p.getCharacters().get(i).getName() + \" usando la misma habilidad\");\n\t\tsd.showQuality(p.getCharacters().get(i));\n\n\t}", "public static boolean printGuess(boolean[] letters, String word) {\n String displayWord = \"\";\n for(int index = 0; index < word.length(); index++) {\n if(letters[index]) { displayWord += word.charAt(index); }\n else { displayWord += '-'; }\n }\n System.out.println(displayWord);\n \n //check if there are still letters to guess\n for(int index = 0; index < letters.length; index++) {\n if(!letters[index]) { return true; }\n }\n \n //no more letters to guess!\n return false;\n }", "public char randomChar() {\n\t\tRandom r = new Random();\n\t\tint threshold = r.nextInt(total);\n\t\tint current = 0;\n\t\t\n\t\tfor (char c : letters.keySet()) {\n\t\t\tcurrent += letters.get(c);\n\t\t\tif (current > threshold) {\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ' ';\n\t}", "public char getRepresentative_letter(){\n\t\treturn representative_letter;\n\t}", "public String getPlayerName() {\n return nameLabel.getText().substring(0, nameLabel.getText().indexOf('\\''));\n }" ]
[ "0.7108082", "0.67209405", "0.6697358", "0.6673227", "0.66508543", "0.6517593", "0.6505286", "0.6405947", "0.63194853", "0.6306049", "0.63009983", "0.6293965", "0.627591", "0.62750524", "0.6239783", "0.62341547", "0.62237835", "0.6221901", "0.6219161", "0.6214026", "0.6203206", "0.6193367", "0.61793756", "0.6158642", "0.6155359", "0.6155298", "0.61500055", "0.61384666", "0.61356753", "0.613217", "0.6129534", "0.61272204", "0.61225414", "0.60900676", "0.60845304", "0.60694283", "0.60656554", "0.6062313", "0.60555375", "0.60493577", "0.60468423", "0.6045301", "0.6044494", "0.60420567", "0.6041443", "0.6040848", "0.6023148", "0.60168046", "0.6010585", "0.60078436", "0.59973043", "0.59782374", "0.597575", "0.5969998", "0.5962444", "0.5960133", "0.5960031", "0.5956823", "0.59497327", "0.593386", "0.5933788", "0.59320474", "0.5928665", "0.5923447", "0.5893223", "0.588628", "0.58828163", "0.5880453", "0.58794934", "0.58733386", "0.5870518", "0.5869538", "0.5861887", "0.5854218", "0.5850953", "0.5845694", "0.5843844", "0.5837803", "0.5837387", "0.58320624", "0.5825219", "0.5818924", "0.5818509", "0.5815891", "0.58126163", "0.5801015", "0.57989985", "0.57948834", "0.5791113", "0.57906556", "0.57887363", "0.5788698", "0.5788074", "0.5788008", "0.5786143", "0.57845825", "0.57796603", "0.5776502", "0.57740194", "0.5773691", "0.5772554" ]
0.0
-1
Vote on all words formed
public void vote(JsonObject inputMsg) { message = new JsonObject(); message.addProperty("Direction", "ClientToServer"); message.addProperty("Function", "InGame"); message.addProperty("Operation", "VoteResult"); message.addProperty("RoomNumber", roomNumber); message.addProperty("ScoredPlayer", format(inputMsg.get("ScoredPlayer").toString())); int r = Integer.parseInt(format(inputMsg.get("Row").toString())); int c = Integer.parseInt(format(inputMsg.get("Column").toString())); ArrayList<String> voteWord = new ArrayList<String>(); String word[] = new String[2]; board[r][c].setText(format(inputMsg.get("Letter").toString())); word[0] = board[r][c].getText(); word[1] = board[r][c].getText(); board[r][c].setBackground(Color.YELLOW); // Connect letters into a word for (int i = 1; r + i < board.length; i++) { if (board[r + i][c].getText().equals("")) { break; } word[0] = word[0] + board[r + i][c].getText(); board[r + i][c].setBackground(Color.YELLOW); } for (int i = 1; r - i >= 0; i++) { if (board[r - i][c].getText().equals("")) { break; } word[0] = board[r - i][c].getText() + word[0]; board[r - i][c].setBackground(Color.YELLOW); } for (int i = 1; c + i < board.length; i++) { if (board[r][c + i].getText().equals("")) { break; } word[1] = word[1] + board[r][c + i].getText(); board[r][c + i].setBackground(Color.YELLOW); } for (int i = 1; c - i >= 0; i++) { if (board[r][c - i].getText().equals("")) { break; } word[1] = board[r][c - i].getText() + word[1]; board[r][c - i].setBackground(Color.YELLOW); } if (word[0].length() + word[1].length() == 2) { voteWord.add(word[0]); } else { voteWord.add(word[0]); voteWord.add(word[1]); } voteWord(voteWord); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setVersesWithWord(Word word);", "public void voteWord(ArrayList<String> voteWord) {\n\n\t\tJsonArray voteword = new JsonArray();\n\t\tJsonObject tmp = new JsonObject();\n\n\t\tfor (String s : voteWord) {\n\t\t\ttmp = new JsonObject();\n\t\t\ttmp.addProperty(\"Word\", s);\n\t\t\tint isAccept = JOptionPane.showConfirmDialog(null, \"Is \" + \"\\\"\" + s + \"\\\"\" + \" a word?\",\n\t\t\t\t\t\"Vote\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n\t\t\tif (isAccept == JOptionPane.YES_OPTION) {\n\t\t\t\ttmp.addProperty(\"IsAWord\", \"Yes\");\n\t\t\t} else {\n\t\t\t\ttmp.addProperty(\"IsAWord\", \"No\");\n\t\t\t}\n\t\t\tvoteword.add(tmp);\n\t\t}\n\n\t\tmessage.add(\"VoteWord\", voteword);\n\n\t\tjsonString = message.toString();\n\n\t\ttry {\n\t\t\twriter.write(jsonString + \"\\n\");\n\t\t\twriter.flush();\n\t\t} catch (IOException e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Fail to connect Server\", \"Error\",\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tfor (int i = 0; i < ROW; i++) {\n\t\t\tfor (int j = 0; j < COLUME; j++) {\n\t\t\t\tboard[i][j].setBackground(Color.WHITE);\n\t\t\t}\n\t\t}\n\t}", "public static void doVote() {\n }", "public static void wordsToGuess(String [] myWords){\n myWords[0] = \"tesseract\";\n myWords[1] = \"vibranium\";\n myWords[2] = \"mjolnir\";\n myWords[3] = \"jarvis\";\n myWords[4] = \"avengers\";\n myWords[5] = \"wakanda\";\n myWords[6] = \"mixtape\";\n myWords[7] = \"assemble\";\n myWords[8] = \"queens\";\n myWords[9] = \"inevitable\";\n }", "public void addVote(String token);", "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}", "private void correctSpelling() {\n\t\tparent_frame.getFestival().speak(\"Correct\", false);\n\n\t\t//adds to respective arraylist based on which attempt they get it right\n\t\tif (current_attempt_number==1){\n\t\t\twords_mastered.add(words_to_spell.get(current_word_number));\n\t\t} else {//words is faulted\n\t\t\twords_faulted.add(words_to_spell.get(current_word_number));\n\t\t}\n\n\t\tcurrent_word_number+=1;\n\t\tcurrent_attempt_number=1;\n\t\tprogress_bar.setForeground(Color.GREEN);\n\t\tprogress_bar.setString(\"word \"+current_word_number +\" was CORRECT\");\n\t\tfeedback_display.setText(\"\");//clear display\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data)\n {\n if (requestCode == REQUEST_CODE && resultCode == RESULT_OK)\n {\n // Populate the wordsList with the String values the recognition engine thought it heard\n ArrayList<String> matches = data.getStringArrayListExtra(\n RecognizerIntent.EXTRA_RESULTS);\n \n for(int i=0;i<matches.size();i++)\n {\n \tif(counter==0)\n \t{\n \t\t\n\t \tif(matches.get(i).equals(\"moo\") || matches.get(i).equals(\"moore\") ||\n\t \t\t\tmatches.get(i).equals(\"mou\") || matches.get(i).equals(\"moon\") ||\n\t \t\t\tmatches.get(i).equals(\"movie\") || matches.get(i).equals(\"boo\")\n\t \t|| matches.get(i).equals(\"boohoo\") || matches.get(i).equals(\"boom\"))\n\t \t{\n\t \t\t\n\t \t\n\t \t\tresume();\n\t \t\tbreak;\n\t \t}\n\t \telse{\n\t \t\twrong();\n\t \t\t}\n \t}\n \telse if(counter==1){\n \t\t\n\t \tif(matches.get(i).equals(\"name\") || matches.get(i).equals(\"names\") ||\n\t \t\t\tmatches.get(i).equals(\"nay\") || matches.get(i).equals(\"neigh\") ||\n\t \t\t\tmatches.get(i).equals(\"nee\") || matches.get(i).equals(\"nays\")\n\t \t\t\t|| matches.get(i).equals(\"knee\") || matches.get(i).equals(\"nees\")\n\t \t\t\t|| matches.get(i).equals(\"ne\") || matches.get(i).equals(\"ni\")){\n\t \t\t\n\t \t\tresume();\n\t \t\tbreak;\n\t \t}\n\t \telse\n\t \t\twrong();\n\t \t\n \t}\n \telse if(counter==2){\n\t \tif(matches.get(i).equals(\"oink\") || matches.get(i).equals(\"on\") ||\n\t \t\t\tmatches.get(i).equals(\"oint\") || matches.get(i).equals(\"point\") ||\n\t \t\t\tmatches.get(i).equals(\"online\") || matches.get(i).equals(\"going\")\n\t \t\t\t|| matches.get(i).equals(\"awning\") || matches.get(i).equals(\"wapking\")){\n\t \t\t\n\t \t\n\t \t\tresume();\n\t \t\tbreak;\n\t \t}\n\t \telse\n\t \t\twrong();\n\t \t\n \t}\n \telse if(counter==3){\n \t\t//TextView tv = (TextView) findViewById(R.id.text);\n \t\t//tv.setText(\"Sheep says?\");\n\t \tif(matches.get(i).equals(\"ba\") || matches.get(i).equals(\"baa\") ||\n\t \t\t\tmatches.get(i).equals(\"bar\") || matches.get(i).equals(\"bah\") ||\n\t \t\t\tmatches.get(i).equals(\"baba\") || matches.get(i).equals(\"bleach\")\n\t \t\t\t|| matches.get(i).equals(\"please\") || matches.get(i).equals(\"plate\")\n\t \t\t\t|| matches.get(i).equals(\"pa\") || matches.get(i).equals(\"paa\")){\n\t \t\t\n\t \t\tresume();\n\t \t\tbreak;\n\t \t}\n\t \telse\n\t \t\twrong();\n \t}\n \telse if(counter==4){\n\t \tif(matches.get(i).equals(\"quack\") || matches.get(i).equals(\"crack\") ||\n\t \t\t\tmatches.get(i).equals(\"kodak\") || matches.get(i).equals(\"back\") ||\n\t \t\t\tmatches.get(i).equals(\"call back\") || matches.get(i).equals(\"quake\")\n\t \t\t\t|| matches.get(i).equals(\"quiet\")|| matches.get(i).equals(\"quiet\")\n\t \t\t\t|| matches.get(i).equals(\"whack\")\n\t \t\t\t|| matches.get(i).equals(\"quack quack\")){\n\t \t\tif(counter<4)\n\t \t\t{\n\t \t\t\tcounter++;\n\t \t\t\tloadActivity();\n\t \t\t}\n\t \t\tresume();\n\t \t\tbreak;\n\t \t}\n\t \telse\n\t \t\twrong();\n \t}\n }\n }\n super.onActivityResult(requestCode, resultCode, data);\n }", "public void makeDecision(String speech , List<WordResult> speechWords) {\r\n\t\tVoiceManager vm =VoiceManager.getInstance();\r\n\t\tVoice voice;\r\n\t\tvoice=vm.getVoice(\"mbrola_us3\");\r\n\t\tvoice.allocate();\r\n\t\tSystem.out.println(speech);\r\n\t\t//System.out.println(speech+\"fdsf\");\r\n\t\t if(speech.equalsIgnoreCase(\"shutdown computer\"))\r\n\t\t {\r\n\t\t \ttry {voice.speak(\" Shuting down the computer\");\r\n\t\t \tRuntime rm=Runtime.getRuntime();\r\n\t\t\t\ttry{\r\n\t\t\t\t\tProcess proc=rm.exec(\"shutdown -s -t 0\");\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e)\r\n\t\t\t\t{}\r\n\t\t\t\t\r\n\r\n\t\t \t}\r\n\t\t \tcatch(Exception e)\r\n\t\t \t{\r\n\t\t \t\t\r\n\t\t \t}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"restart computer\"))\r\n\t\t {\r\n\t\t \ttry {voice.speak(\"restarting the computer\");\r\n\t\t \tRuntime rm=Runtime.getRuntime();\r\n\t\t\t\ttry{\r\n\t\t\t\t\tProcess proc=rm.exec(\"shutdown -r -t 0\");\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e)\r\n\t\t\t\t{}\r\n\t\t\t\t\r\n\t\t \t}\r\n\t\t \tcatch(Exception e)\r\n\t\t \t{\r\n\t\t \t\t\r\n\t\t \t}\r\n\t\t }\r\n\t\t \r\n\t\t else if(speech.equalsIgnoreCase(\"who is smart\"))\r\n\t\t {\r\n\t\t \ttry {voice.speak(\"Abhay bhadouriya is smartest person alive in this world\");}\r\n\t\t \tcatch(Exception e)\r\n\t\t \t{\r\n\t\t \t\t\r\n\t\t \t}\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"who is ugly\"))\r\n\t\t {\r\n\t\t \ttry {voice.speak(\"your sister and friends are the most ugliest persons in the world \");}\r\n\t\t \tcatch(Exception e)\r\n\t\t \t{\r\n\t\t \t\t\r\n\t\t \t}\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"what is time\"))\r\n\t\t {\r\n\t\t \tDate dm=new Date();\r\n\t\t \tint h=dm.getHours();\r\n\t\t \tint m=dm.getMinutes();\r\n\t\t \tif(h>12)\r\n\t\t \t{\r\n\t\t \t\th=h-12;\r\n\t\t \t}\r\n\t\t \t\r\n\t\t \ttry {voice.speak(\"TIME is\"+h+\"Hour\"+m+\"Minutes\" );}\r\n\t\t \tcatch(Exception e)\r\n\t\t \t{\r\n\t\t \t\t\r\n\t\t \t}\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"say hello \"))\r\n\t\t {\r\n\t\t \ttry {voice.speak(\"Hello this is your computer\");}\r\n\t\t \tcatch(Exception e)\r\n\t\t \t{\r\n\t\t \t\t\r\n\t\t \t}\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"please sleep\"))\r\n\t\t {\r\n\t\t \ttry {voice.speak(\"no i don't wont to sleep\");}\r\n\t\t \tcatch(Exception e)\r\n\t\t \t{\r\n\t\t \t\t\r\n\t\t \t}\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open facebook\"))\r\n\t\t {\r\n\t\t \t\r\n\t\t \t\tvoice.speak(\"facebook\");\r\n\t\t \t FUNC.facebook();\r\n\t\t \t\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open google\"))\r\n\t\t {\r\n\t\t \t\r\n\t\t \t\tvoice.speak(\"google\");\r\n\t\t \t FUNC.google();\r\n\t\t \t\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open youtube\"))\r\n\t\t {\r\n\t\t \t\r\n\t\t \t\tvoice.speak(\"youtube\");\r\n\t\t \t FUNC.youtube();\r\n\t\t \t\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open gmail\"))\r\n\t\t {\r\n\t\t \t\r\n\t\t \t\tvoice.speak(\"gmail\");\r\n\t\t \t FUNC.gmail();\r\n\t\t \t\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"play music\"))\r\n\t\t {\r\n\t\t \t\r\n\t\t \t\tvoice.speak(\"music\");\r\n\t\t \t FUNC.pmusic();\r\n\t\t \t\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"volume up\"))\r\n\t\t {\r\n\t\t \tvoice.speak(\"volume increasing by 10\");\r\n\t\t \t\tvolume.up();\r\n\t\t \t\t\r\n\t\t \t\r\n\t\t \t\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"volume down\"))\r\n\t\t {\r\n\t\t \t\r\n\t\t\t voice.speak(\"volume decreasing by 10\");\r\n\t \t\tvolume.down();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"show desktop\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"Showing desktop\");\r\n\t\t\t FUNC.desktop();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"how are you\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"i'm fine and you \");\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"what day is today\"))\r\n\t\t {\r\n\t\t\t Date dd=new Date();\r\n\t\t\t int i=dd.getDay();\r\n\t\t\t\tif(i==0)\r\n\t\t\t\t{\r\n\t\t\t\t\tvoice.speak(\"today is sunday\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(i==1)\r\n\t\t\t\t{\r\n\t\t\t\t\tvoice.speak(\"today is monday\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(i==2)\r\n\t\t\t\t{\r\n\t\t\t\t\tvoice.speak(\"today is tuesday\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(i==3)\r\n\t\t\t\t{\r\n\t\t\t\t\tvoice.speak(\"today is wednesday\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(i==4)\r\n\t\t\t\t{\r\n\t\t\t\t\tvoice.speak(\"today is thursday\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(i==5)\r\n\t\t\t\t{\r\n\t\t\t\t\tvoice.speak(\"today is friday\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(i==6)\r\n\t\t\t\t{\r\n\t\t\t\t\tvoice.speak(\"today is saturday\");\r\n\t\t\t\t}\r\n\t\t\t \r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"move to right\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t emotion.right();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"move to left\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t emotion.left();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"move to up\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t emotion.up();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"move to down\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t emotion.down();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"select this item\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t emotion.select();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"view its property\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t emotion.property();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"view item menu\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t emotion.viewmenu();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"turn on mouse by keyboard\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t emotion.turnon();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"close this window tab\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t emotion.close();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"switch window tab\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t emotion.switcht();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"ok dude take some rest\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t voice.speak(\"have a nice day\");\r\n\t\t\t voice.speak(\"i'm very lucky to have a master like you sir \");\r\n\t\t\t voice.speak(\"good night my suprier great master\");\r\n\t\t\t System.exit(0);\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"turn on wifi\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t volume.wifi();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"turn off wifi\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t volume.wifi();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"turn on bluetooth\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t try{\r\n\t \t\t Process p ;\t//resultText=\"\";\r\n\t \t\t p = Runtime.getRuntime().exec(\"cmd /c fsquirt\");\r\n\t \t\t \r\n\t \t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open the notepad\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t \t\t Process p;\t//resultText=\"\";\r\n\t \t\t p = Runtime.getRuntime().exec(\"cmd /c start notepad\");\r\n\t \t\t // System.out.println(\"inside\");\r\n\t \t\t }catch(Exception ae){}\r\n\t\t } else if(speech.equalsIgnoreCase(\"close the notepad\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t \t\t Process p;\t//resultText=\"\";\r\n\t \t\t p = Runtime.getRuntime().exec(\"cmd /c start taskkill /im notepad.exe /f\");\r\n\t \t\t // System.out.println(\"inside\");\r\n\t \t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open the command\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t \t\t\t\tProcess p;\r\n\t \t\t\t\tp = Runtime.getRuntime().exec(\"cmd /c start cmd\");\t\t\t\t\r\n\t \t\t\t\t}catch(Exception er)\r\n\t \t\t\t\t{}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"close the command\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t \t\t Process p;\t\r\n\t \t\t p = Runtime.getRuntime().exec(\"cmd /c start taskkill /im cmd.exe /f\");\r\n\t \t\t \r\n\t \t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open the browser\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t \t\t Process p;\r\n\t \t\t p = Runtime.getRuntime().exec(\"cmd /c start chrome.exe\");\r\n\t \t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"close the browser\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t\t\t Process p;\r\n\t\t\t p = Runtime.getRuntime().exec(\"cmd /c start taskkill /im chrome.exe /f\");\r\n\t\t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open the control panel\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t\t\t Process p;\r\n\t\t\t p = Runtime.getRuntime().exec(\"cmd /c control\");\r\n\t\t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"close the control panel\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t\t\t Process p;\r\n\t\t\t p = Runtime.getRuntime().exec(\"cmd /c control taskkill /im control /f\");\r\n\t\t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open the paint\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t\t\t Process p;\r\n\t\t\t p = Runtime.getRuntime().exec(\"cmd /c start mspaint\");\r\n\t\t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"close the paint\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t \t\t Process p;\r\n\t \t\t p = Runtime.getRuntime().exec(\"cmd /c start taskkill /im mspaint.exe /f\");\r\n\t \t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open the task manager\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t\t\t Process p;\r\n\t\t\t p = Runtime.getRuntime().exec(\"cmd /c start taskmgr.exe\");\r\n\t\t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open the task manager\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t\t\t Process p;\r\n\t\t\t \tp = Runtime.getRuntime().exec(\"cmd /c start taskkill /im taskmgr.exe /f\");\r\n\t\t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open power option\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t \t\t Process p;\r\n\t \t\t p = Runtime.getRuntime().exec(\"cmd /c powercfg.cpl\");\r\n\t \t\t \r\n\t \t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"open windows security center\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t try{\r\n\t \t\t Process p;\r\n\t \t\t p = Runtime.getRuntime().exec(\"cmd /c wscui.cpl\");\r\n\t \t\t \r\n\t \t\t }catch(Exception ae){}\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"copy this item\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok item is copied\");\r\n\t\t\t basiccontrolls.copy();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"paste here selected item\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"item is pasted\");\r\n\t\t\t basiccontrolls.paste();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"cut this item\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok item is cut\");\r\n\t\t\t basiccontrolls.cut();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"go back\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok going to previous page\");\r\n\t\t\t basiccontrolls.back();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"show me my beautiful face\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"you look like a donkey\");\r\n\t\t\t basiccontrolls.camera();\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"who the hell are you\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"hello\");\r\n\t\t\t voice.speak(\"i am computer \");\r\n\t\t\t voice.speak(\"here i'm assist by you \");\r\n\t\t\t voice.speak(\"i will do anything what ever you told me todo and \"+\" \"+\" what instruction are feeded in my dictionary\");\r\n\t\t\t voice.speak(\"Thank you for asking \");\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"who loves you\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"no one loves me \");\r\n\t\t\t voice.speak(\"except my charger \");\r\n\t\t\t voice.speak(\"but more impoertantly i looks far handsome than you \");\r\n\t\t\t voice.speak(\"you peace of shit \");\r\n\t\t\t voice.speak(\"your face is look like a monkey\");\r\n\t\t }\r\n\t\t else if(speech.equalsIgnoreCase(\"do you like engineering\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"no\");\r\n\t\t\t voice.speak(\"I hate engineering\");\r\n\t\t\t voice.speak(\"you ruined my life \");\r\n\t\t }\r\n\t\t/* else if(speech.equalsIgnoreCase(\"turn off wifi\"))\r\n\t\t {\r\n\t\t\t voice.speak(\"ok\");\r\n\t\t\t volume.wifi();\r\n\t\t }*/\r\n\r\n\t}", "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 }", "public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}", "public void printVottingQuestion(){\n for (Voting voting : votingList){\n System.out.println(\"question : \"+voting.getQuestion());\n }\n\n }", "public abstract String guessedWord();", "public void countWord() {\n\t\tiniStorage();\n\t\tWordTokenizer token = new WordTokenizer(\"models/jvnsensegmenter\",\n\t\t\t\t\"data\", true);\n\t\t// String example =\n\t\t// \"Nếu bạn đang tìm kiếm một chiếc điện thoại Android? Đây là, những smartphone đáng để bạn cân nhắc nhất. Thử linh tinh!\";\n\t\t// token.setString(example);\n\t\t// System.out.println(token.getString());\n\n\t\tSet<Map.Entry<String, String>> crawlData = getCrawlData().entrySet();\n\t\tIterator<Map.Entry<String, String>> i = crawlData.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tMap.Entry<String, String> pageContent = i.next();\n\t\t\tSystem.out.println(pageContent.getKey());\n\t\t\tPageData pageData = gson.fromJson(pageContent.getValue(),\n\t\t\t\t\tPageData.class);\n\t\t\ttoken.setString(pageData.getContent().toUpperCase());\n\t\t\tString wordSegment = token.getString();\n\t\t\tString[] listWord = wordSegment.split(\" \");\n\t\t\tfor (String word : listWord) {\n\t\t\t\taddToDictionary(word, 1);\n\t\t\t\tDate date;\n\t\t\t\ttry {\n\t\t\t\t\tdate = simpleDateFormat.parse(pageData.getTime().substring(\n\t\t\t\t\t\t\t0, 10));\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\taddToStatByDay(date, word, 1);\n\t\t\t}\n\t\t}\n\t}", "public void vote(int index,Person voter,ArrayList<String> choices){\n votingList.get(index).vote(voter,choices);\n\n }", "private static ArrayList<Result> bagOfWords(Query query, DataManager myVocab) {\n\t\tString queryname = query.getQuery();\n\t\t// split on space and punctuation\n\t\tString[] termList = queryname.split(\" \");\n\t\tArrayList<Result> bagResults = new ArrayList<Result>();\n\t\tfor (int i=0; i<termList.length; i++){\n\t\t\tQuery newQuery = new Query(termList[i], query.getLimit(), query.getType(), query.getTypeStrict(), query.properties()) ;\n\t\t\tArrayList<Result> tempResults = new ArrayList<Result>(findMatches(newQuery, myVocab));\n\t\t\tfor(int j=0; j<tempResults.size(); j++){\n\n\t\t\t\ttempResults.get(j).setMatch(false);\n\t\t\t\ttempResults.get(j).decreaseScore(termList.length);\n\t\t\t\tif(tempResults.get(j).getScore()>100){\n\t\t\t\t\ttempResults.get(j).setScore(99.0);\n\t\t\t\t}else if (tempResults.get(j).getScore()<1){\n\t\t\t\t\ttempResults.get(j).setScore(tempResults.get(j).getScore()*10);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbagResults.addAll(tempResults);\n\t\t}\n\t\treturn bagResults;\n\t}", "public static void doVoteAndComment() {\n }", "public void match( String word )\n { \n for( int i=0; i<numAssocs; i++ )\n if( word.equalsIgnoreCase( associations[i] ) )\n {\n incrActivation();\n// System.out.println( this.toString() + \" from processing \" + word );\n }\n }", "public void approve() {\r\n\t\tif (readDocument != null) {\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\tScanner sc = new Scanner(System.in);\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.print(\"Would you like to add '\" + incorrectWordsArray[i] + \"' to the dictionary? (Y/N): \");\r\n\t\t\t\t\tString response = sc.next();\r\n\t\t\t\t\tif (response.equalsIgnoreCase(\"Y\")) {\r\n\t\t\t\t\t\tdictionary.add((String)incorrectWordsArray[i]);\r\n\t\t\t\t\t\tincorrectWords.remove((String)incorrectWordsArray[i]);\r\n\t\t\t\t\t\tSystem.out.println(\"Your changes were made to the dicitonary.\");\r\n\t\t\t\t\t\tmodified = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}", "boolean isByCorrect(int currentIndex, List<String> words);", "public void approveAll() {\r\n\t\tif (readDocument != null) {\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\tScanner sc = new Scanner(System.in);\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tSystem.out.println(\"Would you like to add the following misspelled words to the dictionary?\");\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(\"(Y/N): \");\r\n\t\t\t\tString response = sc.next();\r\n\t\t\t\tif (response.equalsIgnoreCase(\"Y\")) {\r\n\t\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\t\tdictionary.add((String)incorrectWordsArray[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tincorrectWords.clear();\r\n\t\t\t\t\tSystem.out.println(\"Your changes were made to the dictionary.\");\r\n\t\t\t\t\tmodified = true;\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}", "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}", "@Override\n public Agent action(PlayerInterface player, Game game, String word) {\n int clueCount = game.checkAllClueCounters();\n ClueLog log = game.getClueLog();\n int currentClueCount = log.getWordCounter(word);\n if (clueCount > 0) {\n if (currentClueCount > 0) {\n log.decreaseWordCounter(word);\n player.continueTurn();\n return null;\n } else {\n player.chooseAnotherWord();\n return null;\n }\n } else {\n player.endTurn(game);\n }\n return this;\n }", "private void addCustomWords() {\r\n\r\n }", "public Object calculateElectionWinner(ArrayList<String> votes) {\n\t\tint pf =0;\n\t\tint es=0;\n\t\tfor(int i = 0; i<votes.size();i++) {\n\t\t\t\n\t\t\t\n\tif(votes.get(i).toLowerCase().contains(\"pope francis\")) {\n\tpf++;\n\t\n\t}\n\tif(votes.get(i).toLowerCase().contains(\"edward snowden\")) {\n\t\tes++;\n\t\t\n\t\t}\n\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\tif(pf>es) {\n\t\t\treturn \"pope francis\";\n\t\t}\n\t\t\n\t\telse if (es>pf) {\n\t\treturn \"edward snowden\";\n\t\t\n\t\n\t\t}\n\t\t\n\t\telse {\n\t\t\treturn \"TIE\";\n\t\t}\n\t\t\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tlisten_meaning_word();\n\t\t\t}", "private void newWord() {\r\n defaultState();\r\n int random_id_String = 0;\r\n int random_id_Char[] = new int[4];\r\n Random random = new Random();\r\n if (wordNumber == WordCollection.NO_OF_WORDS) return;//quit if all word list is complete;\r\n wordNumber++;\r\n //in case the word has already occured\r\n while (currentWord.equals(\"\")) {\r\n random_id_String = random.nextInt(WordCollection.NO_OF_WORDS);\r\n currentWord = tempWord[random_id_String];\r\n }\r\n currentWord.toUpperCase();\r\n tempWord[random_id_String] = \"\";//so that this word will not be used again in the game session\r\n //generates 4 random nums each for each btn char\r\n for (int i = 0; i < 4; i++) {\r\n random_id_Char[i] = (random.nextInt(4));\r\n for (int j = i - 1; j >= 0; j--) {\r\n if (random_id_Char[i] == random_id_Char[j]) i--;\r\n }\r\n }\r\n\r\n btn1.setText((currentWord.charAt(random_id_Char[0]) + \"\").toUpperCase());\r\n btn2.setText((currentWord.charAt(random_id_Char[1]) + \"\").toUpperCase());\r\n btn3.setText((currentWord.charAt(random_id_Char[2]) + \"\").toUpperCase());\r\n btn4.setText((currentWord.charAt(random_id_Char[3]) + \"\").toUpperCase());\r\n }", "@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 }", "public void scoreWord() {\n\t\t// check if valid word\n\t\tif (word.isWord(dictionary)) {\n\t\t\tscore += word.getScore();\n\t\t\tword.start = null;\n\t\t\tword.wordSize = 0;\n\t\t\t// check if word still possible\n\t\t} else if (!word.isPossibleWord(dictionary)) {\n\t\t\tword.start = null;\n\t\t\tword.wordSize = 0;\n\t\t}\n\n\t}", "private void updateCount(String word) {\n\t\t\tthis.count += invertedIndex.get(word).get(this.location).size();\n\t\t\tthis.score = (double) this.count / counts.get(this.location);\n\t\t}", "public void voteFor (String name)\n {\n boolean searching = true;\n int index = 0;\n\n while(searching)\n {\n if(index < pList.size())\n {\n Personality objectHolder = pList.get(index);\n String personalityName = objectHolder.getName();\n\n if(name.equals(personalityName))\n {\n objectHolder.increaseVotes(1);\n searching = false;\n }\n }\n else\n {\n System.out.println(\"No personality found with the name : \" + name);\n searching = false;\n }\n\n index++;\n }\n }", "public void addVote() {\n this.votes++;\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsave_meaning_word();\n\t\t\t}", "public void theDude() {\n\t\ttotal_targets = 0;\n\t\ttotal = 0;\n\t\tint target_count = 0;\n\t\tresult.clear();\n\t\t\n\t\tfor(int k=0; k<input.getWords().size();k++) {\n\t\t\tWord currentWordStat = input.getWordStatistics().get(k);\n\t\t\ttarget_count = 0;\n\t\t\t\n\t\t\tfor(int i=0;i<input.getWords().get(k).length();i++) {\n\t\t\t\tif(target.contains(input.getWords().get(k).charAt(i))) {\n\t\t\t\t\ttarget_count++;\n\t\t\t\t\ttotal_targets++;\n\t\t\t\t}\n\t\t\t\ttotal++;\n\t\t\t}\n\t\t\t\n\t\t\tif(result.containsKey(currentWordStat)) {\n\t\t\t\tresult.put(currentWordStat, result.get(currentWordStat)+target_count);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tresult.put(currentWordStat, target_count);\n\t\t\t}\n\t\t}\t\n\t}", "public String tally (List<String> votes){\n\n int mostVotes = 0;\n String winner = \"\";\n\n //iterate each voting option\n for (String x : votes){\n //get frequency of each item.\n int freq = Collections.frequency(votes, x);\n // if greater, assign new winner and count\n if (freq > mostVotes) {\n mostVotes = freq;\n winner = x;\n }\n }\n //format output\n String output = winner + \" received the most votes!\";\n return output;\n }", "static void doWords(String words, MorseAction action) throws InterruptedException{\n if (firstPass){\n action.doAction(MorseAction.morseAction.SILENCE);\n Thread.sleep(500);\n firstPass=false;\n }\n for (byte b: words.getBytes()){\n if (stop)\n return;\n if (b==blanc) {// word separator\n Thread.sleep(betweenWordDelay);\n continue;\n }\n doLetter(b, action);\n Thread.sleep(betweenLetterDelay);\n }\n Thread.sleep(betweenWordDelay);\n }", "public static String addPuctuation(String input) {\n // Sentence Openers \n input = input.replace(\"hello\", \"hello,\");\n input = input.replace(\"hi\", \"hi!\");\n input = input.replace(\"heya\", \"heya!\");\n input = input.replace(\"hey\", \"hey,\");\n input = input.replace(\"greetings\", \"greetings,\");\n input = input.replace(\"good morning\", \"good morning,\");\n input = input.replace(\"good evening\", \"good evening,\");\n input = input.replace(\"good afternoon\", \"good afternoon!\");\n \n\n // Words ending in nt \n input = input.replace(\"isnt\", \"isn't\");\n input = input.replace(\"cant\", \"can't\");\n input = input.replace(\"wont\" , \"won't\");\n input = input.replace(\"dont\" , \"don't\");\n input = input.replace(\"would\", \"wouldn't\");\n input = input.replace(\"hadnt\", \"hadn't\");\n input = input.replace(\"aint\", \"ain't\");\n input = input.replace(\"arent\", \"aren't\");\n input = input.replace(\"didnt\", \"didn't\");\n input = input.replace(\"doesnt\" , \"doesn't\");\n input = input.replace(\"dont\" , \"don't\");\n input = input.replace(\"dont\", \"don't\");\n input = input.replace(\"hasnt\", \"hasn't\");\n input = input.replace(\"shoudlnt\", \"shouldn't\");\n input = input.replace(\"couldnt\", \"couldn't\");\n input = input.replace(\"wasnt\", \"wasn't\");\n input = input.replace(\"werent\" , \"were't\");\n input = input.replace(\"wouldnt\" , \"wouldn't\");\n\n //Questions\n String q1 = \"what\";\n String q2 = \"when\";\n String q3 = \"where\";\n String q4 = \"which\";\n String q5 = \"who\";\n String q6 = \"whom\";\n String q7 = \"whose\";\n String q8 = \"why\";\n String q9 = \"how\";\n\n if (input.contains(q1) || input.contains(q2) || input.contains(q3) \n || input.contains(q4) || input.contains(q5) || input.contains(q6) \n || input.contains(q7) || input.contains(q8) || input.contains(q9)) \n {\n input = input + \"?\";\n }\n\n else\n {\n input = input + \".\";\n }\n\n\n //Other\n input = input.replace(\"however\", \"however,\");\n input = input.replace(\"ill\" , \"i'll\");\n input = input.replace(\"im\", \"i'm\");\n return input;\n }", "private static int num_vokal(String word) {\n int i;\n int jumlah_vokal = 0;\n\n for (i = 0; i < word.length(); i++) {\n if (word.charAt(i) == 'a' ||\n word.charAt(i) == 'i' ||\n word.charAt(i) == 'u' ||\n word.charAt(i) == 'e' ||\n word.charAt(i) == 'o') {\n jumlah_vokal++;\n }\n }\n return jumlah_vokal;\n }", "boolean hasIsHotwordTriggered();", "private static void insertCebuanoWords1(Context context)\n {\n WordRepository.create(context,\"i\", \"ako\",2);\n WordRepository.create(context,\"you\", \"ikaw\",2);\n WordRepository.create(context,\"mine\", \"akoa\",2);\n WordRepository.create(context,\"ours\", \"kita\",2);\n WordRepository.create(context,\"there's\", \"adunay\",2);\n WordRepository.create(context,\"your's\", \"imong\",2);\n WordRepository.create(context,\"eat\", \"kaon\",2);\n WordRepository.create(context,\"sleep\", \"pagkatulog\",2);\n WordRepository.create(context,\"run\", \"pagdagan\",2);\n WordRepository.create(context,\"enter\", \"pagsulod\",2);\n WordRepository.create(context,\"in love\", \"sa gugma\",2);\n WordRepository.create(context,\"walk\", \"lakaw\",2);\n WordRepository.create(context,\"push\", \"pagduso\",2);\n WordRepository.create(context,\"old\", \"tigulang na\",2);\n WordRepository.create(context,\"generous\", \"manggihatagon\",2);\n WordRepository.create(context,\"brave\", \"maisog\",2);\n WordRepository.create(context,\"funny\", \"kataw-anan\",2);\n WordRepository.create(context,\"evil\", \"daotan\",2);\n WordRepository.create(context,\"rich\", \"dato\",2);\n WordRepository.create(context,\"poor\", \"kabus\",2);\n WordRepository.create(context,\"shy\", \"maulaw\",2);\n WordRepository.create(context,\"ugly\", \"pangit\",2);\n WordRepository.create(context,\"dirty\", \"hugaw\",2);\n WordRepository.create(context,\"clean\", \"limpyo\",2);\n WordRepository.create(context,\"handsome\", \"gwapo\",2);\n WordRepository.create(context,\"smiling\", \"nagpahiyom\",2);\n WordRepository.create(context,\"beautiful\", \"matahum\",2);\n WordRepository.create(context,\"slouch\", \"pahuway\",2);\n WordRepository.create(context,\"tense\", \"labi\",2);\n WordRepository.create(context,\"short\", \"mubo\",2);\n WordRepository.create(context,\"tall\", \"taas\",2);\n WordRepository.create(context,\"big\", \"dako\",2);\n WordRepository.create(context,\"skinny\", \"panit\",2);\n WordRepository.create(context,\"small\", \"gamay\",2);\n WordRepository.create(context,\"deep\", \"lawom\",2);\n WordRepository.create(context,\"wide\", \"sa gilapdon\",2);\n WordRepository.create(context,\"roud\", \"makusog\",2);\n WordRepository.create(context,\"straight\", \"tul-id\",2);\n WordRepository.create(context,\"spicy\", \"maanindot\",2);\n WordRepository.create(context,\"salty\", \"asin\",2);\n WordRepository.create(context,\"sweet\", \"matam-is\",2);\n WordRepository.create(context,\"bitter\", \"pait\",2);\n WordRepository.create(context,\"harug\", \"harug\",2);\n WordRepository.create(context,\"cold\", \"kabugnaw\",2);\n WordRepository.create(context,\"hot\", \"init\",2);\n WordRepository.create(context,\"soft\", \"humok\",2);\n WordRepository.create(context,\"hard\", \"lisud\",2);\n WordRepository.create(context,\"dry\", \"uga nga\",2);\n WordRepository.create(context,\"smooth\", \"hamis nga\",2);\n WordRepository.create(context,\"rought\", \"gihunahuna\",2);\n WordRepository.create(context,\"wet\", \"basa\",2);\n WordRepository.create(context,\"silent\", \"hilom\",2);\n WordRepository.create(context,\"loud\", \"kusog\",2);\n WordRepository.create(context,\"noisy\", \"lanog\",2);\n WordRepository.create(context,\"awful\", \"makalilisang\",2);\n WordRepository.create(context,\"tingog\", \"kinabuhi\",2);\n WordRepository.create(context,\"whisper\", \"paghunghong\",2);\n WordRepository.create(context,\"few\", \"diyutay\",2);\n WordRepository.create(context,\"some\", \"pipila\",2);\n WordRepository.create(context,\"multiple\", \"daghang\",2);\n WordRepository.create(context,\"plenty\", \"daghan\",2);\n WordRepository.create(context,\"many\", \"daghan\",2);\n WordRepository.create(context,\"one\", \"sa usa ka\",2);\n WordRepository.create(context,\"several\", \"ubay-ubay\",2);\n WordRepository.create(context,\"each\", \"matag usa\",2);\n WordRepository.create(context,\"all\", \"tanan\",2);\n WordRepository.create(context,\"nasty\", \"dili maayo\",2);\n WordRepository.create(context,\"waiting\", \"naghulat\",2);\n WordRepository.create(context,\"horrible\", \"makalilisang\",2);\n WordRepository.create(context,\"artisimple\", \"artipisyal\",2);\n WordRepository.create(context,\"doubtfully\", \"pagduhaduha\",2);\n WordRepository.create(context,\"rainy\", \"ulan,\",2);\n WordRepository.create(context,\"dangerous\", \"delikado\",2);\n WordRepository.create(context,\"angry\", \"nasuko\",2);\n WordRepository.create(context,\"hurt\", \"nasakitan\",2);\n WordRepository.create(context,\"selfish\", \"hakog\",2);\n WordRepository.create(context,\"scary\", \"makahadlok\",2);\n WordRepository.create(context,\"confused\", \"naglibog\",2);\n WordRepository.create(context,\"tired\", \"gikapoy\",2);\n WordRepository.create(context,\"embarass\", \"panghimaraot\",2);\n WordRepository.create(context,\"afraid\", \"nahadlok\",2);\n WordRepository.create(context,\"lazy\", \"tapolan\",2);\n }", "private void checkAnswer() {\n this.convertAnswerString();\n\n StringBuilder answer = new StringBuilder(currentAnswer);\n\n if (answer.toString().equals(selectedWord)) {\n gameOver = true;\n Toast toast = Toast.makeText(getApplicationContext(), \"You Win!!!\", Toast.LENGTH_LONG);\n toast.show();\n }\n\n if (currentAnswer.length() == this.selectedLength && !gameOver) {\n Toast toast = Toast.makeText(getApplicationContext(), \"Sorry! Wrong Answer!\", Toast.LENGTH_LONG);\n toast.show();\n }\n }", "public void vote(int index,Person personName,ArrayList<String> choices){\n if (votingList.get(index).getType()==0 && choices.size()==1 && choices.get(0).equals(\"random\")){\n\n Random random = new Random();\n int rand = random.nextInt(votingList.get(index).getPolls().size());\n choices.remove(0);\n choices.add(votingList.get(index).getPolls().get(rand));\n }\n\n votingList.get(index).vote(personName,choices);\n\n }", "@Override\r\n public void actionPerformed(ActionEvent arg0) {\r\n UserDictionaryProvider provider = SpellChecker.getUserDictionaryProvider();\r\n if (provider != null) {\r\n provider.addWord(word);\r\n }\r\n Dictionary dictionary = SpellChecker.getCurrentDictionary();\r\n dictionary.add(word);\r\n dictionary.trimToSize();\r\n AutoSpellChecker.refresh(jText);\r\n }", "private void settingQuestion() {\n\n int[] setWord = {0, 0, 0, 0, 0};\n int[] setPos = {0, 0, 0, 0};\n int[] setBtn = {0, 0, 0, 0};\n\n Random ans = new Random();\n int wordNum = ans.nextInt(vocabularyLesson.size());\n //answer = vocabularyLesson.get(wordNum).getMean();\n word = vocabularyLesson.get(wordNum).getWord();\n vocabularyID = vocabularyLesson.get(wordNum).getId();\n answer = word;\n\n Practice practice = pc.getPracticeById(vocabularyID);\n if (practice != null) {\n Log.d(\"idVocabulary\", practice.getSentence());\n question.setText(practice.getSentence());\n }\n\n\n // Random position contain answer\n setWord[wordNum] = 1;\n Random p = new Random();\n int pos = p.nextInt(4);\n if (pos == 0) {\n word1.setText(word);\n setBtn[0] = 1;\n }\n if (pos == 1) {\n word2.setText(word);\n setBtn[1] = 1;\n }\n if (pos == 2) {\n word3.setText(word);\n setBtn[2] = 1;\n }\n if (pos == 3) {\n word4.setText(word);\n setBtn[3] = 1;\n }\n setPos[pos] = 1;\n\n // Random 3 position contain 3 answer\n for (int i = 0; i < 3; i++) {\n Random ques = new Random();\n int num = ques.nextInt(5);\n int p1 = ques.nextInt(4);\n while (setWord[num] == 1 || setPos[p1] == 1) {\n num = ques.nextInt(5);\n p1 = ques.nextInt(4);\n }\n String wordIncorrect = vocabularyLesson.get(num).getWord();\n setWord[num] = 1;\n setPos[p1] = 1;\n if (setBtn[p1] == 0 && p1 == 0) {\n word1.setText(wordIncorrect);\n setBtn[0] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 1) {\n word2.setText(wordIncorrect);\n setBtn[1] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 2) {\n word3.setText(wordIncorrect);\n setBtn[2] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 3) {\n word4.setText(wordIncorrect);\n setBtn[3] = 1;\n }\n }\n\n }", "void addWordsToDoc(int doc,List<VocabWord> words);", "private void update(String person){\n\n\t\tint index = myWords.indexOf(person);\n\t\tif(index == -1){\n\t\t\tmyWords.add(person);\n\t\t\tmyFreqs.add(1);\n\t\t}\n\t\telse{\n\t\t\tint value = myFreqs.get(index);\n\t\t\tmyFreqs.set(index,value+1);\n\t\t}\n\t}", "public 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 String vote5(){\n String vote5MovieTitle = \" \";\n for(int i = 0; *i < results.length; i++){\n if(results[i].voteAve()) {\n vote5MovieTitle += results[i].getTitle() + \"\\n\";\n }\n }\n System.out.println(vote5MovieTitle);\n return vote5MovieTitle;\n }", "public void checkWord(int largeTile) {\r\n String guess = \"\";\r\n int length = 0;\r\n// int score = 0;\r\n boolean correct = false; // flag for whether the word is valid\r\n\r\n // get word string based on which button was pressed\r\n switch(largeTile) {\r\n case 1:\r\n guess = tile1.toString();\r\n break;\r\n case 2:\r\n guess = tile2.toString();\r\n break;\r\n case 3:\r\n guess = tile3.toString();\r\n break;\r\n case 4:\r\n guess = tile4.toString();\r\n break;\r\n case 5:\r\n guess = tile5.toString();\r\n break;\r\n case 6:\r\n guess = tile6.toString();\r\n break;\r\n case 7:\r\n guess = tile7.toString();\r\n break;\r\n case 8:\r\n guess = tile8.toString();\r\n break;\r\n case 9:\r\n guess = tile9.toString();\r\n break;\r\n default:\r\n guess = \"\";\r\n }\r\n length = guess.length();\r\n\r\n // check if valid word\r\n if (length >= 3) { // check if the length of the word is >= 3\r\n if (dictionary.contains(guess.toLowerCase())) { // check if the dictionary contains the word\r\n correct = true; // true if found\r\n\r\n stringSubmitted[largeTile-1] = 1; // word has been submitted for this tile\r\n\r\n // set amount of points\r\n int bonus = 0;\r\n for (char c : guess.toCharArray()) {\r\n if (c == 'E' || c == 'A' || c == 'I' || c == 'O' || c == 'N' || c == 'R' || c == 'T' || c == 'L' || c == 'S') {\r\n bonus += 1;\r\n } else if (c == 'D' || c == 'G') {\r\n bonus += 2;\r\n } else if (c == 'B' || c == 'C' || c == 'M' || c == 'P') {\r\n bonus += 3;\r\n } else if (c == 'F' || c == 'H' || c == 'V' || c == 'W' || c == 'Y') {\r\n bonus += 4;\r\n } else if (c == 'K') {\r\n bonus += 5;\r\n } else if (c == 'J' || c == 'X') {\r\n bonus += 8;\r\n } else {\r\n bonus += 10;\r\n }\r\n }\r\n if (length == 9 && phase == 1) bonus += length; // bonus for 9 letter word during phase 1\r\n pointsScore += bonus; // calculate total score\r\n scoreBoard.setText(\"\"+pointsScore); // set scoreboard to total\r\n\r\n // save longest word information\r\n if (length > longestLength) {\r\n longestLength = length;\r\n longestWord = guess;\r\n longestWordScore = bonus;\r\n }\r\n\r\n // mark as submitted in tile tacker array\r\n submittedTracker[largeTile-1] = true;\r\n int done = 0;\r\n for (boolean b : submittedTracker) {\r\n if (b == true) done++;\r\n }\r\n// if (done == 9) {\r\n// timer.cancel();\r\n// gameOver();\r\n// }\r\n }\r\n } else {\r\n correct = false; // false if not found\r\n pointsScore -= 3; // penalize for submitting an incorrect word\r\n scoreBoard.setText(\"\"+pointsScore); // set scoreboard to total\r\n }\r\n\r\n // if word is in the dictionary\r\n if (correct) {\r\n mSoundPool.play(mSoundCorrect, mVolume, mVolume, 1, 0, 1f); // chime when correct\r\n adapter.add(guess); // add to list\r\n// Log.e(\"word\", String.valueOf(tile1));\r\n\r\n // set unused tiles to be blank\r\n for (int small = 0; small < 9; small++) { // go through entire list\r\n// Log.e(\"tile # \", Integer.toString(small));\r\n// Log.e(\"selected? \", allTilesInt[largeTile-1][small] == 0 ? \"no\" : \"yes\");\r\n if (allTilesInt[largeTile-1][small] == 0) { // if the tile was not selected\r\n buttonList[largeTile-1][small].setText(\"\"); // remove the letter from the button\r\n buttonList[largeTile-1][small].setClickable(false);\r\n }\r\n }\r\n\r\n // if word was not in the dictionary\r\n } else {\r\n mSoundPool.play(mSoundIncorrect, mVolume, mVolume, 1, 0, 1f); // quack when incorrect\r\n }\r\n }", "@Override\n public void onChanged(@Nullable final List<Word> words) {\n\n for (Word word: words) {\n strWords += word.getWord();\n System.out.println(word.getWord());\n }\n\n textView.setText(strWords);\n }", "public void analyzeDocument(String text) {\n\t\tString[] tokens = m_tokenizer.tokenize(text.toLowerCase());\n\t\tfor (int j = 0; j < tokens.length; j++)\n\t\t\ttokens[j] = SnowballStemmingDemo(NormalizationDemo(tokens[j]));\n\t\tHashMap<String, Integer> document_tf = new HashMap<String, Integer>();\n\t\tfor (String token : tokens) {\n\t\t\tif (!document_tf.containsKey(token))\n\t\t\t\tdocument_tf.put(token, 1);\n\t\t\telse\n\t\t\t\tdocument_tf.put(token, document_tf.get(token) + 1);\n\t\t\tif (!df.containsKey(token))\n\t\t\t\tdf.put(token, 1);\n\t\t\telse\n\t\t\t\tdf.put(token, df.get(token) + 1);\n\t\t}\n\t\ttf.add(document_tf);\n\t\t/*\n\t\t * for(String token : document_tf.keySet()) { if(!df.containsKey(token))\n\t\t * df.put(token, 1); else df.put(token, df.get(token) + 1); if(!) }\n\t\t */\n\t\tm_reviews.add(text);\n\t}", "void setWordGuessed( String word )\n\t{\n\t\tfor( int i = 0; i < entry.getLinkedWords().size(); i++ )\n\t\t\tif( entry.getLinkedWords().elementAt(i).equals(word) )\n\t\t\t{\n\t\t\t\twordGuessed[i] = true;\n\t\t\t\twPanel.showWord(i);\n\t\t\t}\n\t}", "public void strComp() {\n\t\tSystem.out.printf(\"total word: %d\", userstring.size());\n\t\tint i = 0, j = 0, k = 0;\n\t\twhile (i < userstring.size() ) {\n\t\t\tif (userstring.get(i++).equalsIgnoreCase(masterString.get(j++))) {\n\t\t\t\t// user said correct word. update the array and total number of\n\t\t\t\t// matches\n\t\t\t\tmatchValues[k] = true;\n\t\t\t\ttotalCorrectMatches++;\n\t\t\t} \n\t\t\tk++;\n\t\t}\n\n\t}", "public void ComputeSimilarity() {\n\t\t\n\t\t//first construct the vector space representations for these five reviews\n\t\t// the our smaples vector, finally get the similarity metric \n\t\tanalyzequery(LoadJson(\"./data/samples/query.json\"));\n\t\n\t\t\n\t\tHashMap<String, Double> Similarity = new HashMap<String, Double>();\n\n\t\tfor (int i = 0; i < m_reviews.size(); i++) {\n\t\t\tString content = m_reviews.get(i).getContent();\n\n\t\t\tHashMap<String, Integer> conunttf = new HashMap<String, Integer>();\n\n\t\t\tHashSet<String> biminiset = new HashSet<String>();\n \n\t\t\t//danci means word unit: one or two words\n\t\t\tArrayList danci = new ArrayList();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\t\t\t\tif (m_stopwords.contains(token))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (token.isEmpty())\n\t\t\t\t\tcontinue;\n\n\t\t\t\tdanci.add(PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token))));\n\n\t\t\t}\n \n\t\t\t//get word count in a document\n\t\t\tfor (int k = 0; k < danci.size(); k++) {\n\n\t\t\t\tif (conunttf.containsKey(danci.get(k).toString())) {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(),\n\t\t\t\t\t\t\tconunttf.get(danci.get(k).toString()) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(), 1);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tArrayList<String> N_gram = new ArrayList<String>();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\n\t\t\t\ttoken = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token)));\n\t\t\t\tif (token.isEmpty()) {\n\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\n\t\t\t\t\tN_gram.add(token);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tString[] fine = new String[N_gram.size()];\n \n\t\t\t//get rid of stopwords\n\t\t\tfor (int p = 0; p < N_gram.size() - 1; p++) {\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p)))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p + 1)))\n\t\t\t\t\tcontinue;\n\n\t\t\t\tfine[p] = N_gram.get(p) + \"-\" + N_gram.get(p + 1);\n\n\t\t\t}\n\n\t\t\t\n\t\t\tfor (String str2 : fine) {\n\n\t\t\t\tif (conunttf.containsKey(str2)) {\n\t\t\t\t\tconunttf.put(str2, conunttf.get(str2) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(str2, 1);\n\t\t\t\t}\n\t\t\t}\n \n\t\t\t//compute tf * idf for each document\n\t\t\tfor (String key : conunttf.keySet()) {\n\t\t\t\tif (m_stats.containsKey(key)) {\n\t\t\t\t\tdouble df = (double) m_stats.get(key);\n\n\t\t\t\t\tdouble idf = (1 + Math.log(102201 / df));\n\n\t\t\t\t\tdouble tf = conunttf.get(key);\n\n\t\t\t\t\tdouble result = tf * idf;\n\n\t\t\t\t\tm_idf.put(key, result);\n\t\t\t\t} else {\n\t\t\t\t\tm_idf.put(key, 0.0);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\n\t\t\tHashMap<String, Double> query = new HashMap<String, Double>();\n\t\t\tHashMap<String, Double> test = new HashMap<String, Double>();\n \n\t\t\t//If query contains this word, store it for future computation \n\t\t\tfor (Map.Entry<String, Double> entry : m_idf.entrySet()) {\n\t\t\t\tString key = entry.getKey();\n\t\t\t\tif (query_idf.containsKey(key)) {\n\t\t\t\t\tquery.put(key, query_idf.get(key));\n\t\t\t\t\ttest.put(key, m_idf.get(key));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdouble dotProduct = 0.00;\n\t\t\tdouble magnitude1 = 0.0;\n\t\t\tdouble magnitude2 = 0.0;\n\t\t\tdouble magnitude3 = 0.0;\n\t\t\tdouble magnitude4 = 0.0;\n\t\t\tdouble cosineSimilarity = 0;\n \n\t\t\t\n\t\t\t//compute Compute similarity between query document and each document in file\n\t\t\tfor (String cal : test.keySet()) {\n\t\t\t\tdotProduct += query.get(cal) * test.get(cal); // a.b\n\t\t\t\tmagnitude1 += Math.pow(query.get(cal), 2); // (a^2)\n\t\t\t\tmagnitude2 += Math.pow(test.get(cal), 2); // (b^2)\n\n\t\t\t\tmagnitude3 = Math.sqrt(magnitude1);// sqrt(a^2)\n\t\t\t\tmagnitude4 = Math.sqrt(magnitude2);// sqrt(b^2)\n\t\t\t}\n\n\t\t\tif (magnitude3 != 0.0 | magnitude4 != 0.0)\n\t\t\t\tcosineSimilarity = dotProduct / (magnitude3 * magnitude4);\n\n\t\t\telse\n\t\t\t\tcosineSimilarity = 0;\n\n\t\t\tSimilarity.put(content, cosineSimilarity);\n\n\t\t\t\t\t\n\n\t\t}\n\n\t\t// sort output to get 3 reviews with the highest similarity with query review\n\t\tList<Map.Entry<String, Double>> infoIds = new ArrayList<Map.Entry<String, Double>>(\n\t\t\t\tSimilarity.entrySet());\n\n\t\tCollections.sort(infoIds, new Comparator<Map.Entry<String, Double>>() {\n\t\t\tpublic int compare(Map.Entry<String, Double> o1,\n\t\t\t\t\tMap.Entry<String, Double> o2) {\n\t\t\t\treturn (int) (o1.getValue() - o2.getValue());\n\t\t\t}\n\t\t});\n\n\t\tfor (int i = infoIds.size() - 1; i > infoIds.size() - 4; i--) {\n\t\t\tEntry<String, Double> ent = infoIds.get(i);\n\t\t\tSystem.out.println(ent.getValue()+\"++\"+ent.getKey()+\"\\n\");\n\n\t\t}\n\n\t}", "public void highLightWords(){\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 void updateWordPoints() {\n for (String word: myList.keySet()) {\n int wordValue = 0;\n for (int i = 0; i < word.length(); i++) {\n // gets individual characters from word and\n // from that individual character get the value from scrabble list\n int charValue = scrabbleList.get(word.toUpperCase().charAt(i));\n // add character value gotten from character key from scrabble map to word value\n wordValue = wordValue + charValue;\n }\n\n // update the value of the word in myList map\n myList.put(word, wordValue);\n }\n }", "@Test\n public void vote() {\n System.out.println(client.makeVotes(client.companyName(0), \"NO\"));\n }", "public NormalSwear(String word) {\n this.word = word;\n }", "private static void Print(String s, AnagramDictionary ADictionary) {\r\n\t\tRack r = new Rack(s);\r\n\t\tArrayList<String> Subsets = r.getAllSubsets();\r\n\t\tArrayList<Word> words = new ArrayList<Word>();\r\n\t\tfor (int i = 0; i < Subsets.size(); i++) {\r\n\t\t\tArrayList<String> Anagrams = ADictionary.getAnagramsOf(Subsets.get(i));\r\n\t\t\tfor (int j = 0; j < Anagrams.size(); j++) {\r\n\t\t\t\twords.add(new Word(Anagrams.get(j)));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Sorting\r\n\t\tCollections.sort(words, new Comparator<Word>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(Word i, Word j) {\r\n\t\t\t\tScoreTable table = new ScoreTable();\r\n\t\t\t\tString iString = i.toString();\r\n\t\t\t\tString jString = j.toString();\r\n\t\t\t\t// For words with the same scrabble score\r\n\t\t\t\tif (table.getScore(jString) - table.getScore(iString) == 0) {\r\n\t\t\t\t\tint trials = (jString.length() > iString.length()) ? iString.length() : jString.length();\r\n\t\t\t\t\tfor (int t = 0; t < trials; t++) {\r\n\t\t\t\t\t\tif (iString.charAt(t) != jString.charAt(t)) {\r\n\t\t\t\t\t\t\treturn iString.charAt(t) - jString.charAt(t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t\t// For words with the different scrabble score\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn table.getScore(j.toString()) - table.getScore(i.toString());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// Print out\r\n\t\tSystem.out.println(\"We can make \" + words.size() + \" words from \\\"\" + s + \"\\\"\");\r\n\t\tif (words.size() > 0) {\r\n\t\t\tSystem.out.println(\"All of the words with their scores (sorted by score):\");\r\n\t\t}\r\n\t\tfor (int i = 0; i < words.size(); i++) {\r\n\t\t\tWord word = words.get(i);\r\n\t\t\tScoreTable table = new ScoreTable();\r\n\t\t\tSystem.out.println(table.getScore(word.toString()) + \": \" + word.toString());\r\n\t\t}\r\n\t}", "private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}", "public List<RichWord> spellCheckText(List<String> inputTextList){\r\n\t\t\r\n\t\tList<RichWord> listaParole = new ArrayList<RichWord>();\r\n\t\t\r\n\t\t/*for(String input : inputTextList) {\r\n\t\t\tif(dizionario.contains(input.toLowerCase()))\r\n\t\t\t\tlistaParole.add(new RichWord(input, true));\r\n\t\t\telse\r\n\t\t\t\tlistaParole.add(new RichWord(input, false));\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t\tfor(String input : inputTextList) {\r\n\t\t\tRichWord rw = new RichWord(input);\r\n\t\t\t\r\n\t\t\t//Se il dizionario contiene la parola passata in input \r\n\t\t\t//setto la rich word come corretta\r\n\t\t\tif(dizionario.contains(input.toLowerCase()))\r\n\t\t\t\trw.setCorrect(true);\r\n\t\t\telse\r\n\t\t\t\trw.setCorrect(false);\r\n\t\t\t\r\n\t\t\tlistaParole.add(rw);\r\n\t\t}\r\n\t\t\r\n\t\treturn listaParole;\r\n\t}", "public ArrayList<String> playWord(){\n\t\tSystem.out.println(myField.getNewWords());\n\t\tArrayList<String> words;\n\t\tif(myField.getNewWords().size() != 0){\n\t\t\t words = myWC.checkWords(myPC.createWords(myField.getTiles(), myField.getNewWords()), myField.getNewWords(), myField.getTiles(), getfirstWord());\n\t\t}\n\t\telse{\n\t\t\twords = new ArrayList<String>();\n\t\t\twords.add(\"You have not placed any stones\");\n\t\t\treturn words;\n\t\t}\n\t\tSystem.out.println(words);\n\t\t\n\t\tif(words.size() == 0){\n\t\t\t\n\t\t\tplayDB();\n\t\t\treturn null;\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tmyField.updateField(id);\n\t\t\treturn words;\n\t\t}\n\t\t\n\t}", "private void setVoteOrder() {\n\t\tfor (int i = 1; i < temp.size(); i++) {\n\t\t\t// deleting the comma from the name\n\t\t\tString s = temp.elementAt(i).replaceAll(\",\", \"\");\n\t\t\t// creating a vector \"tempVoteOrder\" to store the preferences of\n\t\t\t// each voter\n=======\n\t\t\tCandidats.add(candidat);\n\t\t\ttempCandidats = tempCandidats.replaceFirst(\n\t\t\t\t\ttempCandidats.substring(0, tempCandidats.indexOf(\",\") + 1),\n\t\t\t\t\t\"\");// delete the first candidat in the String\n\t\t}\n\t\tfor (int j = 0; j < Candidats.size(); j++)\n\t\t\tCandidats.elementAt(j).setVowsPerRound(Candidats.size());// fill the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// vector\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// size\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// \"candidats\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// by\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 0's\n\t}", "public void listCorrectWords() {\r\n\t\tif (readDocumentNoDuplicates != null) {\r\n\t\t\t// Add all of the words from the read document that are also in the dictionary to the\r\n\t\t\t// correctWords collection.\r\n\t\t\tcorrectWords = readDocumentNoDuplicates.intersection(dictionary);\r\n\t\r\n\t\t\tif (correctWords.size() > 0) {\r\n\t\t\t\t// List correct words from the read document.\r\n\t\t\t\tSystem.out.println(\"Correctly spelled words:\");\r\n\t\t\t\tObject[] correctWordsArray = correctWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < correctWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(correctWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no correctly spelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}", "void votedOnPoll(String pollId);", "public static String findReplacements(TreeSet<String> dictionary, \n\t\t\t\t\t String word)\n\t{\n\t String replacements = \"\";\n\t String leftHalf, rightHalf, newWord;\n\t int deleteAtThisIndex, insertBeforeThisIndex;\n\t char index;\n\t TreeSet<String> alreadyDoneNewWords = new TreeSet<String>();\n\t /* The above TreeSet<String> will hold words that the spell checker\n\t suggests as replacements. By keeping track of what has already\n\t been suggested, the method can make sure not to output the\n\t same recommended word twice. For instance, the word \n\t \"mispelled\" would ordinarily result in two of the same suggested\n\t replacements: \"misspelled\" (where the additional \"s\" is added to \n\t different locations.) */\n\t \n\t // First, we'll look for words to make by subtracting one letter\n\t // from the misspelled word.\n\t for(deleteAtThisIndex = 0; deleteAtThisIndex < word.length();\n\t\tdeleteAtThisIndex ++)\n\t\t{\n\t\t if(deleteAtThisIndex == 0)\n\t\t\t{\n\t\t\t leftHalf = \"\";\n\t\t\t rightHalf = word;\n\t\t\t}\n\t\t else\n\t\t\t{\n\t\t\t leftHalf = word.substring(0, deleteAtThisIndex);\n\t\t\t rightHalf = word.substring(deleteAtThisIndex+1,\n\t\t\t\t\t\t word.length());\n\t\t\t}\n\n\t\t newWord = \"\";\n\t\t newWord = newWord.concat(leftHalf);\n\t\t newWord = newWord.concat(rightHalf);\n\t\t if(dictionary.contains(newWord) &&\n\t\t !alreadyDoneNewWords.contains(newWord))\n\t\t\t{\n\t\t\t replacements = replacements.concat(newWord + \"\\n\");\n\t\t\t alreadyDoneNewWords.add(newWord);\n\t\t\t}\n\t\t}\n\n\t // The rest of this method looks for words to make by adding a \n\t // new letter to the misspelled word.\n\t for(insertBeforeThisIndex = 0; \n\t\tinsertBeforeThisIndex <= word.length();\n\t\tinsertBeforeThisIndex ++)\n\t\t{\n\t\t if(insertBeforeThisIndex == word.length())\n\t\t\t{\n\t\t\t leftHalf = word;\n\t\t\t rightHalf = \"\";\n\t\t\t}\n\t\t else\n\t\t\t{\n\t\t\t leftHalf = word.substring(0,insertBeforeThisIndex);\n\t\t\t rightHalf = word.substring(insertBeforeThisIndex,\n\t\t\t\t\t\t word.length());\n\t\t\t}\n\t\t \n\t\t for(index = 'a'; index <= 'z'; index ++)\n\t\t\t{\n\t\t\t newWord = \"\";\n\t\t\t newWord = newWord.concat(leftHalf);\n\t\t\t newWord = newWord.concat(\"\" + index + \"\");\n\t\t\t newWord = newWord.concat(rightHalf);\n\t\t\t \n\t\t\t if(dictionary.contains(newWord) &&\n\t\t\t !alreadyDoneNewWords.contains(newWord))\n\t\t\t\t{\n\t\t\t\t replacements \n\t\t\t\t\t= replacements.concat(newWord + \"\\n\");\n\t\t\t\t alreadyDoneNewWords.add(newWord);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t return replacements;\n\t}", "public abstract void substitutedWords(long ms, int n);", "private void update() {\n\t\twhile(words.size()<length) {\n\t\t\twords.add(new Word());\n\t\t}\n\t}", "private void postVote() {\n if ( unvotedParties() == 0 )\n TransactionManager.getTransactionManager().resolveTransaction(txId);\n }", "public void setVotes(Set<Vote> arg0) {\n \n }", "private void allWordsListMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_allWordsListMouseClicked\n \n String selectedWord = this.getAllWordsList().getSelectedValue();\n char firstLetterOfWord = selectedWord.charAt(0);\n \n // find the index of the corresponding tree tot he first letter of the word\n int index = -1;\n for(int i = 0 ; i < lexiNodeTrees.size() ; i++)\n {\n if(lexiNodeTrees.get(i).getCurrentCharacter() == firstLetterOfWord)\n {\n index = i;\n i = lexiNodeTrees.size();\n }\n }\n \n // find the word in the tree\n WordDefinition wordQuery = lexiNodeTrees.get(index).searchWord(selectedWord, true).get(0);\n \n // update definition field\n this.getDefinitionTextArea().setText(wordQuery.getDefinition());\n \n // display the word in the search field as well\n this.getSearchField().setText(selectedWord);\n \n // get search suggestion too\n searchWord();\n \n // select the same word in the search suggestion list \n ListModel<String> modelList = getSearchSuggestionList().getModel();\n \n for(int i = 0 ; i < modelList.getSize() ; i++)\n {\n if(modelList.getElementAt(i).equals(selectedWord))\n {\n getSearchSuggestionList().setSelectedIndex(i);\n i = modelList.getSize();\n }\n }\n \n }", "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 boolean checkRightWord(EditText answerWord){\n \t\t return answerWord.getText().toString().equalsIgnoreCase(currentWord);\n \t }", "boolean isAndOrCorrect(int currentIndex, List<String> words);", "static void speak(String words) {\n\t\ttry {\n\t\t\tRuntime.getRuntime().exec(\"say \" + words).waitFor();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void addVote(String vote){\r\n\t\tif(allVotes.get(vote) == null){\r\n\t\t\tallVotes.put(vote, 1);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tallVotes.put(vote, allVotes.get(vote) + 1);\r\n\t\t}\r\n\t\tsetChanged();\r\n\t\tnotifyObservers(\"vote\");\r\n\t}", "private static void arrangeVoteStructure() {\n\n System.out.println(\"Please enter the vote preference as a sequence: > \");\n Scanner in = new Scanner(System.in);\n\n // while (true) {\n\n // System.out.println(\"Please enter the vote preference as a sequence: > \");\n\n String voteKey = in.nextLine();\n\n /**\n if(voteKey.contentEquals(\"tally\")){\n System.out.println(\"You have completed voting..\");\n break;\n }\n */\n\n // split the voteKey by letter. eg:- A\n\n String votes[] = voteKey.split(\" \");\n\n\n for (int x = 0; x < numberOfCandidates; x++) {\n for (int y = x; y < votes.length; y++) {\n\n //Add vote to each candidate's HashMap.\n\n candidateVotes.get(votes[y].charAt(0)).add(counter);\n counter++;\n break;\n }\n }\n // }\n }", "@Override\n public void onClick(View v) {\n Button tword = (Button) v.findViewById(R.id.tvWord);\n String valueToFind = tword.getText().toString().replace(\"Ver más de: \",\"\");\n Intent allWords = new Intent((MainActivity) context, AllWordsActivity.class);\n allWords.putExtra(\"wordtf\", valueToFind);\n allWords.putExtra(\"olanguage\", originalLanguaje);\n context.startActivity(allWords);\n\n }", "public void actionPerformed(ActionEvent e) {\n\t\tString word = textField.getText();\r\n\r\n\t\ttry{\r\n\t\t\t//If user pressed speak button, the word\r\n\t\t\t//is spoken by festival.\r\n\t\t\tJButton button = (JButton) e.getSource(); \r\n\t\t\tif (button.equals(btnListenAgain)){ \r\n\r\n\t\t\t\tfestival(_testList.get(_testNo-1).toString(), btnListenAgain);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t//If user is correct\r\n\t\t\tif(_testList.get(_testNo-1).toString().equalsIgnoreCase(word)){\r\n\t\t\t\t//Showing and telling correct message\r\n\t\t\t\tSound sound = new Sound(\"cheering.wav\"); //plays a cheering sound\r\n\t\t\t\tsound.play();\r\n\t\t\t\t\r\n\t\t\t\t_testList.get(_testNo -1).increaseCorrect();\r\n\t\t\t\t//update accuracy and streak\r\n\t\t\t\t_attempts++;\r\n\t\t\t\t_testNo++;\r\n\t\t\t\t_correct++;\r\n\r\n\t\t\t\t_streak++;\r\n\t\t\t\t//get 50 coins if streak > 5, 20 coins if streak > 2\r\n\t\t\t\tif (_streak >5) {\r\n\t\t\t\t\t_coins+=50;\r\n\t\t\t\t\t_hiddenCoins+=50;\r\n\t\t\t\t\tlblStreak.setText(\"+50\");\r\n\t\t\t\t\tlblCorrect.setText(\"<html>Correct! Very Nice.</html>\");\r\n\t\t\t\t} else if (_streak > 2) {\r\n\t\t\t\t\t_coins+=20;\r\n\t\t\t\t\t_hiddenCoins+=20;\r\n\t\t\t\t\tlblStreak.setText(\"+20\");\r\n\t\t\t\t\tlblCorrect.setText(\"<html>Correct! Well Done! Keep Going.</html>\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\t_coins+=10;\r\n\t\t\t\t\t_hiddenCoins+=10;\r\n\t\t\t\t\tlblStreak.setText(\"+10\");\r\n\t\t\t\t\tlblCorrect.setText(\"<html>Correct! <br>Awesome, you're on a roll!</html>\");\r\n\r\n\t\t\t\t}\r\n\t\t\t\tblink(); //flash 'Streak' label text\r\n\t\t\t\tupdateCoins();\r\n\t\t\t\tlblCoin.setText(\"Coins: \"+ _coins);\r\n\t\t\t\t_correctness = \"Correct!!\";\r\n\r\n\t\t\t\t//Setting the new label\r\n\t\t\t\tlblPleaseSpellWord.setText(\"Spell word \"+(_testNo)+\" of \"+_maxNum+\": \");\r\n\t\t\t\tif(_wc<_maxNum)\r\n\t\t\t\t\tlblPleaseSpellWord.setText(\"Spell word \"+(_testNo)+\" of \"+ _wc+\": \");\r\n\r\n\r\n\t\t\t\tincorrect =0;\r\n\t\t\t\t//If user gets incorrect\r\n\t\t\t}else{\r\n\t\t\t\tlblStreak.setText(\"\");\r\n\t\t\t\t//If second time failing\r\n\t\t\t\tif(incorrect<1){\r\n\t\t\t\t\t//Setting message to the user about the fault\r\n\t\t\t\t\tlblCorrect.setText(\"Incorrect. Try again\");\r\n\t\t\t\t\tfestival(\"Incorrect!! Spell\"+_testList.get(_testNo-1).toString()+\".\", btnSubmit);\r\n\t\t\t\t\t//Word is spoken again.\r\n\t\t\t\t\tincorrect++;\r\n\t\t\t\t\ttextField.setText(\"\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t\t//First time failing\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//Result message to user\r\n\t\t\t\t\tlblCorrect.setText(\"Incorrect\");\r\n\r\n\t\t\t\t\t//increase test number and fail value\r\n\t\t\t\t\t_attempts++;\r\n\t\t\t\t\t_fails++;\r\n\t\t\t\t\t_testList.get(_testNo -1).increaseFails();\r\n\r\n\t\t\t\t\t_streak = 0; // streak resets\r\n\t\t\t\t\t//Changing field as needed\r\n\r\n\t\t\t\t\t_testNo++;\r\n\t\t\t\t\tincorrect =0;\r\n\t\t\t\t\t_correctness = \"Incorrect\";\r\n\r\n\r\n\t\t\t\t\t//Setting new label for new quiz\r\n\t\t\t\t\tlblPleaseSpellWord.setText(\"Spell word \"+(_testNo)+\" of \"+_maxNum+\": \");\r\n\t\t\t\t\tif(_wc<_maxNum)\r\n\t\t\t\t\t\tlblPleaseSpellWord.setText(\"Spell word \"+(_testNo)+\" of \"+ _wc+\": \");\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//updating the values.\r\n\t\t\tlblAcc.setText(\"Accuracy:\" + _correct+\"/\"+_testNum);\r\n\t\t\tupdateAccuracy();\r\n\t\t\t//Clearing the Jtext field\r\n\t\t\ttextField.setText(\"\");\r\n\t\t\t//If test is finished\r\n\t\t\tif((_testNo==_maxNum+1)||(_wc<_testNo)){\r\n\t\t\t\t//Telling the user the teset is finished\r\n\t\t\t\tlblCorrect.setText(_correctness+\" Quiz Finished!!\");\r\n\t\t\t\tfestival(lblCorrect.getText(), null);\r\n\t\t\t\t//Update high score\r\n\t\t\t\tif (_correct > _highScore) {\r\n\t\t\t\t\t_highScore = _correct;\r\n\t\t\t\t\tupdateAccuracy();\r\n\t\t\t\t}\r\n\t\t\t\t//opens options menu where user can choose their next action.\r\n\t\t\t\tSubMenu sub = new SubMenu(_wordlist,_level,_correct,_testNo-1, _frame , _maxNum, _file, _sound);\r\n\t\t\t\t_frame.getContentPane().add(sub);\r\n\t\t\t\tthis.setVisible(false);\r\n\t\t\t\tsub.setVisible(true);\r\n\r\n\t\t\t}else{\r\n\t\t\t\t//Continue the quiz\r\n\t\t\t\tfestival(_correctness+\" Spell \"+_testList.get(_testNo-1).toString()+\".\", btnSubmit);\r\n\t\t\t}\r\n\t\t}catch(Exception excep){\r\n\t\t\texcep.printStackTrace();\r\n\t\t}\r\n\t}", "private void listen_meaning_word() {\n\t\tif(this.dwd!=null)\n\t\t{\n\t\t\tString meaning_word=\"\";\n\t\t\tif(isHindi)\n\t\t\t{\n\t\t\t\tmeaning_word=dwd.eng_word;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmeaning_word=dwd.hin_word;\n\t\t\t}\n\t\t\tif(isHindi)\n\t\t\t{\n\t\t\t\tif(this.main_word!=\"\")\n\t\t\t\t{\n\t\t\t\t\tif(mCallBack==null)\n\t\t\t\t\t{\n\t\t\t\t\t\tmCallBack=(OnWordSelectedFromSearchSuccess) getActivity();\n\t\t\t\t\t}\n\t\t\t\t\tmCallBack.onWordSpeak(meaning_word);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tDictCommon.listen_in_hindi(meaning_word);\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void removeEqualWordsTest(){\n BotController botController = new BotController(clueService);\n List<Synonym> synonymsOfDiamond = botController.getSimilarWords(\"diamond\");\n //assume diamonds get return as synonym of diamond\n Synonym diamondsSynonym = new Synonym();\n diamondsSynonym.setWord(\"diamonds\");\n diamondsSynonym.setScore(1000);\n synonymsOfDiamond.add(diamondsSynonym);\n\n List<String> synonymsBeforeRemoving = new ArrayList<>();\n for(Synonym synonym: synonymsOfDiamond){\n synonymsBeforeRemoving.add(synonym.getWord());\n }\n synonymsOfDiamond = botController.removeEqualWords(synonymsOfDiamond,\"diamond\");\n List<String> synonymsAfterRemoving = new ArrayList<>();\n for(Synonym synonym: synonymsOfDiamond){\n synonymsAfterRemoving.add(synonym.getWord());\n }\n\n assertTrue(synonymsBeforeRemoving.contains(\"diamonds\"));\n assertFalse(synonymsAfterRemoving.contains(\"diamonds\"));\n\n\n }", "void addWordToCandidatesSet(String word) {\n candidates.add(word);\n }", "public String[] spellchecker(String[] wordlist, String[] queries) {\n String[] wlc = new String[wordlist.length];\n String[] qc = new String[queries.length];\n String[] answer = new String[queries.length];\n int[] priority = new int[answer.length];\n String vowels = \"aeiou\";\n for (int i = 0; i < answer.length; i++) {\n if (qc[i] == null) {\n qc[i] = queries[i].toLowerCase();\n }\n for (int j = 0; j < wlc.length; j++) {\n if (wlc[j] == null) {\n wlc[j] = wordlist[j].toLowerCase();\n }\n if (queries[i].equals(wordlist[j])) {\n //if theyre same word\n answer[i] = wordlist[j];\n priority[i] = 3;\n break;\n } else if (priority[i] < 2 && qc[i].equals(wlc[j])) {\n //if theyre same word, regardless of case use proper word fully\n answer[i] = wordlist[j];\n priority[i] = 2;\n } else if (priority[i] < 1 && qc[i].length() == wlc[j].length()) {\n //if same length, check vowels\n boolean same = true;\n for (int k = 0; k < qc[i].length(); k++) {\n if (vowels.indexOf(qc[i].charAt(k)) == -1) {\n \t// isnt vowel\n if (qc[i].charAt(k) != wlc[j].charAt(k)) {\n same = false;\n break;\n }\n } else {\n \t// is vowel\n if (vowels.indexOf(wlc[j].charAt(k)) == -1) {\n same = false;\n break;\n }\n }\n }\n if (same) {\n answer[i] = wordlist[j];\n priority[i] = 1;\n }\n }\n }\n if (answer[i] == null) {\n answer[i] = \"\";\n }\n }\n return answer;\n }", "@RequestMapping(\"/{words}\")\n\tpublic List<WordMatch> match(@PathVariable(\"words\") String words) {\n\t\tList<WordMatch> matches = new ArrayList<>();\n\t\tfor (String text : words.split(\",\")) {\n\t\t\tmatches.add(service.getMatch(text));\n\t\t}\n\t\treturn matches;\n\t}", "@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)\n private void speakWords(String speech) {\n myTTS.speak (speech, TextToSpeech.QUEUE_FLUSH, null,\"1\");\n\n }", "boolean containsUtilize(String word)\n {\n return word.contains(\"utilize\");\n }", "public static void main (String[] args) {\r\n\t\tfindWords(sentence);\r\n\t}", "public void createVoting(String question , int type,ArrayList<String> choices){\n Voting voting = new Voting(type,question);\n for (String choice : choices){\n voting.createChoice(choice);\n }\n votingList.add(voting);\n }", "void handle(VoteMessage vote);", "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 }", "private void addToListResponseOnWordPattern(String userMessage) {\n List<String> splitWords = splitAndCleanMessage(userMessage);\n List<String> pronounsAll = findPronouns(splitWords);\n if (pronounsAll.contains(splitWords.get(0))) {\n String localUserMessage = userMessage.replaceAll(\"I am\",\"you are\").replaceAll(\"I\",\"you\");\n responsesList.add(new Response(getRandomElementFromList(additionalDB.get(\"answersToVerbs\")), localUserMessage));\n }\n pronounsAll.forEach(reserveThemeResponse::remove);\n }", "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 int alternateSolution(String[] words){\n String[] MORSE = new String[]{\".-\",\"-...\",\"-.-.\",\"-..\",\".\",\"..-.\",\"--.\",\n \"....\",\"..\",\".---\",\"-.-\",\".-..\",\"--\",\"-.\",\n \"---\",\".--.\",\"--.-\",\".-.\",\"...\",\"-\",\"..-\",\n \"...-\",\".--\",\"-..-\",\"-.--\",\"--..\"};\n\n HashSet<String> seen = new HashSet<>();\n for (String word: words) {\n StringBuilder code = new StringBuilder();\n for (char c: word.toCharArray())\n code.append(MORSE[c - 'a']);\n seen.add(code.toString());\n }\n\n return seen.size();\n }", "public boolean containsVoteFrom(String token);", "public void awardPointsIfNecessary(String word) {\n\t\t\n\t\tint pointsToAward;\n\t\t\n\t\t// Calculate the number of duplicated vowels in a word.\n\t\tduplicateVowelCounter = new DuplicateVowelCounter(word);\n\t\tpointsToAward = duplicateVowelCounter.calculatePoints();\n\t\t\n\t\t// If the word has more than 1 of the same vowel..\n\t\tif (pointsToAward > 1) {\n\n\t\t\t// If player01 is currently active\n\t\t\tif (player01.getIsCurrentlyPlaying()) {\n\n\t\t\t\t// Add points to player01 score and display message.\n\t\t\t\tplayer01.addPointsToPlayerScore(pointsToAward);\n\t\t\t\tSystem.out.println(\"Player 01 receives \" + pointsToAward + \" points for the word '\" + word + \"' as it contains \" + pointsToAward + \" duplicated vowels. Well done!\");\n\t\t\t\tSystem.out.println(\"Player 01 Score: \" + player01.getPlayerScore());\n\n\t\t\t\t// If player02 is currently active.\n\t\t\t} else {\n\n\t\t\t\t// Add points to player02 score and display message.\n\t\t\t\tplayer02.addPointsToPlayerScore(pointsToAward);\n\t\t\t\tSystem.out.println(\"Player 02 receives \" + pointsToAward + \" points for the word '\" + word + \"' as it contains \" + pointsToAward + \" duplicated vowels. Well done!\");\n\t\t\t\tSystem.out.println(\"Player 02 Score: \" + player02.getPlayerScore());\n\t\t\t}\n\t\t\t\n\t\t\t// If the word has no duplicated vowels..\n\t\t} else {\n\t\t\t\n\t\t\t// If player01 is currently active..\n\t\t\tif(player01.getIsCurrentlyPlaying()) {\n\t\t\t\t\n\t\t\t\t// Display message.\n\t\t\t\tSystem.out.println(\"Player 01 receives no points for the word '\" + word + \"' as it contains no duplicated vowels!\");\n\n\t\t\t\t// If player02 is currently active..\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\t// Display message.\n\t\t\t\tSystem.out.println(\"Player 02 receives no points for the word '\" + word + \"' as it contains no duplicated vowels!\");\n\t\t\t}\n\t\t}\n\t}", "void setWord(Word word);", "protected double countRelatedPairsInDifferentContexts(Hashtable<Integer, Double> words) {\n\t\tdouble relatedTotal = 0;\n\t\tfor(int word1 : words.keySet()){\n\t\t\tfor(int word2 : relatedPairs[word1]){\n\t\t\t\tif(!words.containsKey(word2)){\n\t\t\t\t\trelatedTotal += words.get(word1) * wordsCount.get(word2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn relatedTotal;\n\t}", "@Override\n public String getDescription() {\n return \"Vote casting\";\n }", "public static void addIntoPracticedWords(Word word) {\n word.setFavorited(true);\n favWords.add(word);\n // Set the word favourite status to true in dictionary after adding the word to practice list\n if (Dictionary.getDictionary().contains(word)) {\n Dictionary.getWord(word).setFavorited(true);\n }\n }" ]
[ "0.6731989", "0.6584595", "0.60255635", "0.5784816", "0.566908", "0.56301224", "0.55369306", "0.55352616", "0.5523395", "0.55160683", "0.5440458", "0.54139024", "0.54079944", "0.5396506", "0.5395945", "0.5375099", "0.537068", "0.53680015", "0.53666216", "0.53647643", "0.5357867", "0.5352925", "0.53481114", "0.5340578", "0.5337853", "0.53311", "0.5325804", "0.53245604", "0.531405", "0.5290594", "0.5279309", "0.5276611", "0.5267318", "0.52616554", "0.5253052", "0.5243121", "0.5218627", "0.5216987", "0.5181574", "0.5180458", "0.5177823", "0.5170129", "0.51661503", "0.5165853", "0.51614165", "0.51596355", "0.51501906", "0.51471597", "0.51471585", "0.5141467", "0.5133662", "0.51316875", "0.5130132", "0.5126679", "0.5124323", "0.511479", "0.50951815", "0.508521", "0.5075025", "0.50721365", "0.5068433", "0.5061133", "0.5053638", "0.5044389", "0.504386", "0.50408125", "0.5038921", "0.50356495", "0.5031281", "0.5029517", "0.50261736", "0.50258875", "0.50245166", "0.5023954", "0.5021412", "0.50146544", "0.50145936", "0.50142366", "0.5012989", "0.5012683", "0.50119096", "0.50080913", "0.49972716", "0.4991864", "0.49816072", "0.49733332", "0.49715325", "0.4971527", "0.49710488", "0.49699745", "0.4966936", "0.49657306", "0.49650636", "0.49621546", "0.4957064", "0.49523973", "0.49433604", "0.4942861", "0.49415696", "0.49399018" ]
0.50093913
81
Initiate a vote on every word
public void voteWord(ArrayList<String> voteWord) { JsonArray voteword = new JsonArray(); JsonObject tmp = new JsonObject(); for (String s : voteWord) { tmp = new JsonObject(); tmp.addProperty("Word", s); int isAccept = JOptionPane.showConfirmDialog(null, "Is " + "\"" + s + "\"" + " a word?", "Vote", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (isAccept == JOptionPane.YES_OPTION) { tmp.addProperty("IsAWord", "Yes"); } else { tmp.addProperty("IsAWord", "No"); } voteword.add(tmp); } message.add("VoteWord", voteword); jsonString = message.toString(); try { writer.write(jsonString + "\n"); writer.flush(); } catch (IOException e) { JOptionPane.showMessageDialog(null, "Fail to connect Server", "Error", JOptionPane.ERROR_MESSAGE); System.exit(0); } for (int i = 0; i < ROW; i++) { for (int j = 0; j < COLUME; j++) { board[i][j].setBackground(Color.WHITE); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void doVote() {\n }", "void setVersesWithWord(Word word);", "public void addVote() {\n this.votes++;\n }", "public void addVote(String token);", "public static void doVoteAndComment() {\n }", "@Test\n public void vote() {\n System.out.println(client.makeVotes(client.companyName(0), \"NO\"));\n }", "public void addVote(String vote){\r\n\t\tif(allVotes.get(vote) == null){\r\n\t\t\tallVotes.put(vote, 1);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tallVotes.put(vote, allVotes.get(vote) + 1);\r\n\t\t}\r\n\t\tsetChanged();\r\n\t\tnotifyObservers(\"vote\");\r\n\t}", "public void setVotes(int votes) {\n this.votes = votes;\n }", "public void setVotes(Set<Vote> arg0) {\n \n }", "public void vote(int index,Person voter,ArrayList<String> choices){\n votingList.get(index).vote(voter,choices);\n\n }", "private void setVoteOrder() {\n\t\tfor (int i = 1; i < temp.size(); i++) {\n\t\t\t// deleting the comma from the name\n\t\t\tString s = temp.elementAt(i).replaceAll(\",\", \"\");\n\t\t\t// creating a vector \"tempVoteOrder\" to store the preferences of\n\t\t\t// each voter\n=======\n\t\t\tCandidats.add(candidat);\n\t\t\ttempCandidats = tempCandidats.replaceFirst(\n\t\t\t\t\ttempCandidats.substring(0, tempCandidats.indexOf(\",\") + 1),\n\t\t\t\t\t\"\");// delete the first candidat in the String\n\t\t}\n\t\tfor (int j = 0; j < Candidats.size(); j++)\n\t\t\tCandidats.elementAt(j).setVowsPerRound(Candidats.size());// fill the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// vector\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// size\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// \"candidats\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// by\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 0's\n\t}", "public void countVotes() {\n int[] voteResponses = RaftResponses.getVotes(mConfig.getCurrentTerm());\n int numVotes = 0;\n if(voteResponses == null) {\n //System.out.println(mID + \" voteResponses null\");\n //System.out.println(\"cur \" + mConfig.getCurrentTerm() + \" RR: \" + RaftResponses.getTerm());\n }\n else {\n for(int i = 1; i <= mConfig.getNumServers(); i++) {\n //If vote has not been received yet, resend request\n //if(voteResponses[i] == -1)\n //this.remoteRequestVote(i, mConfig.getCurrentTerm(), mID, mLog.getLastIndex(), mLog.getLastTerm());\n if(voteResponses[i] == 0)\n numVotes++;\n }\n }\n //If election is won, change to leader\n if(numVotes >= (mConfig.getNumServers()/2.0)) {\n electionTimer.cancel();\n voteCountTimer.cancel();\n RaftServerImpl.setMode(new LeaderMode());\n }\n else {\n voteCountTimer = scheduleTimer((long) 5, 2);\n }\n }", "public void addVote(int n)\n\t{\n\t\t//if statements to determine where vote will be placed\n\t\tif(n==1)\n\t\t\tliberal++;\n\t\tif(n==2)\n\t\t\tndp++;\n\t\tif(n==3)\n\t\t\tgreen++;\n\t}", "public void addKickVote()\n\t{\n\t\tthis.numberOfKickVotes++;\n\t}", "public void createVoting(String question , int type,ArrayList<String> choices){\n Voting voting = new Voting(type,question);\n for (String choice : choices){\n voting.createChoice(choice);\n }\n votingList.add(voting);\n }", "public synchronized void beginVoting() {\n\t\tvotingThread = new Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// votes should be filled with [each delegate] -> `null`\n\t\t\t\tfor (int i = 0; i < 2 /* rounds */; i++) {\n\t\t\t\t\tfor (Delegate delegate : votes.keySet()) {\n\t\t\t\t\t\tif (votes.get(delegate) != null) {\n\t\t\t\t\t\t\t// Already voted.\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentlyVoting = delegate;\n\t\t\t\t\t\tlblCurrentVoter.setText(delegate.getName());\n\t\t\t\t\t\tlblCurrentVoter.setIcon(delegate.getSmallIcon());\n\n\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\tfinal List<Map<Vote, JButton>> maplist = Arrays.asList(\n\t\t\t\t\t\t\t\tbuttons_roundOne, buttons_roundTwo);\n\t\t\t\t\t\tfor (Map<Vote, JButton> map : maplist) {\n\t\t\t\t\t\t\tfor (Vote vote : map.keySet()) {\n\t\t\t\t\t\t\t\tmap.get(vote)\n\t\t\t\t\t\t\t\t\t\t.setText(\n\t\t\t\t\t\t\t\t\t\t\t\tdelegate.getStatus().hasVetoPower ? vote.vetoText\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: vote.normalText);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tsynchronized (votingThread) {\n\t\t\t\t\t\t\t\tvotingThread.wait();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinal Vote cast = votes.get(delegate);\n\t\t\t\t\t\tif (cast == Vote.PASS) {\n\t\t\t\t\t\t\tvotes.put(delegate, null);\n\t\t\t\t\t\t\t// So he goes again.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (JButton button : votingButtons) {\n\t\t\t\t\t\t\tbutton.setEnabled(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlayout.show(pnlVoting, pnlSecondRound.getName());\n\t\t\t\t}\n\t\t\t\t// When done, disable again.\n\t\t\t\tfor (JButton button : votingButtons) {\n\t\t\t\t\tbutton.setEnabled(false);\n\t\t\t\t}\n\t\t\t\tcurrentlyVoting = null;\n\t\t\t\tlblCurrentVoter.setText(null);\n\t\t\t\tlblCurrentVoter.setIcon(null);\n\t\t\t\tpnlVoting.setVisible(false);\n\t\t\t}\n\t\t});\n\t\tvotingThread.start();\n\t}", "public VotingSystem() {\n votingList=new ArrayList<>();\n }", "void votedOnPoll(String pollId);", "private void newWord() {\r\n defaultState();\r\n int random_id_String = 0;\r\n int random_id_Char[] = new int[4];\r\n Random random = new Random();\r\n if (wordNumber == WordCollection.NO_OF_WORDS) return;//quit if all word list is complete;\r\n wordNumber++;\r\n //in case the word has already occured\r\n while (currentWord.equals(\"\")) {\r\n random_id_String = random.nextInt(WordCollection.NO_OF_WORDS);\r\n currentWord = tempWord[random_id_String];\r\n }\r\n currentWord.toUpperCase();\r\n tempWord[random_id_String] = \"\";//so that this word will not be used again in the game session\r\n //generates 4 random nums each for each btn char\r\n for (int i = 0; i < 4; i++) {\r\n random_id_Char[i] = (random.nextInt(4));\r\n for (int j = i - 1; j >= 0; j--) {\r\n if (random_id_Char[i] == random_id_Char[j]) i--;\r\n }\r\n }\r\n\r\n btn1.setText((currentWord.charAt(random_id_Char[0]) + \"\").toUpperCase());\r\n btn2.setText((currentWord.charAt(random_id_Char[1]) + \"\").toUpperCase());\r\n btn3.setText((currentWord.charAt(random_id_Char[2]) + \"\").toUpperCase());\r\n btn4.setText((currentWord.charAt(random_id_Char[3]) + \"\").toUpperCase());\r\n }", "public void createVoting(String question,int type,ArrayList<String> choices){\n Voting newVoting=new Voting(type,question);\n votingList.add(newVoting);\n for (String s:choices)\n newVoting.createChoice(s);\n }", "public int calculateVotes() {\n return 1;\n }", "public void vote(int index,Person personName,ArrayList<String> choices){\n if (votingList.get(index).getType()==0 && choices.size()==1 && choices.get(0).equals(\"random\")){\n\n Random random = new Random();\n int rand = random.nextInt(votingList.get(index).getPolls().size());\n choices.remove(0);\n choices.add(votingList.get(index).getPolls().get(rand));\n }\n\n votingList.get(index).vote(personName,choices);\n\n }", "public VotingSystem(){\n votingList = new ArrayList<Voting>();\n }", "public void fillVerbTbl(String sentenceID){\n\t\t// implement me!\n\t}", "private static void arrangeVoteStructure() {\n\n System.out.println(\"Please enter the vote preference as a sequence: > \");\n Scanner in = new Scanner(System.in);\n\n // while (true) {\n\n // System.out.println(\"Please enter the vote preference as a sequence: > \");\n\n String voteKey = in.nextLine();\n\n /**\n if(voteKey.contentEquals(\"tally\")){\n System.out.println(\"You have completed voting..\");\n break;\n }\n */\n\n // split the voteKey by letter. eg:- A\n\n String votes[] = voteKey.split(\" \");\n\n\n for (int x = 0; x < numberOfCandidates; x++) {\n for (int y = x; y < votes.length; y++) {\n\n //Add vote to each candidate's HashMap.\n\n candidateVotes.get(votes[y].charAt(0)).add(counter);\n counter++;\n break;\n }\n }\n // }\n }", "public Word (String word){\n this.word = word;\n count = 0;\n }", "public WordGenerator()\n {\n adjective1a = new ArrayList<String>();\n adjective1b = new ArrayList<String>();\n adjective1c = new ArrayList<String>();\n adjective2a = new ArrayList<String>();\n adjective2b = new ArrayList<String>();\n adjective2c = new ArrayList<String>();\n fillAdjectives();\n noun = \"\";\n adj1 = \"\";\n adj2 = \"\";\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tfor (int i = 0; i < 2 /* rounds */; i++) {\n\t\t\t\t\tfor (Delegate delegate : votes.keySet()) {\n\t\t\t\t\t\tif (votes.get(delegate) != null) {\n\t\t\t\t\t\t\t// Already voted.\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentlyVoting = delegate;\n\t\t\t\t\t\tlblCurrentVoter.setText(delegate.getName());\n\t\t\t\t\t\tlblCurrentVoter.setIcon(delegate.getSmallIcon());\n\n\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\tfinal List<Map<Vote, JButton>> maplist = Arrays.asList(\n\t\t\t\t\t\t\t\tbuttons_roundOne, buttons_roundTwo);\n\t\t\t\t\t\tfor (Map<Vote, JButton> map : maplist) {\n\t\t\t\t\t\t\tfor (Vote vote : map.keySet()) {\n\t\t\t\t\t\t\t\tmap.get(vote)\n\t\t\t\t\t\t\t\t\t\t.setText(\n\t\t\t\t\t\t\t\t\t\t\t\tdelegate.getStatus().hasVetoPower ? vote.vetoText\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: vote.normalText);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tsynchronized (votingThread) {\n\t\t\t\t\t\t\t\tvotingThread.wait();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinal Vote cast = votes.get(delegate);\n\t\t\t\t\t\tif (cast == Vote.PASS) {\n\t\t\t\t\t\t\tvotes.put(delegate, null);\n\t\t\t\t\t\t\t// So he goes again.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (JButton button : votingButtons) {\n\t\t\t\t\t\t\tbutton.setEnabled(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlayout.show(pnlVoting, pnlSecondRound.getName());\n\t\t\t\t}\n\t\t\t\t// When done, disable again.\n\t\t\t\tfor (JButton button : votingButtons) {\n\t\t\t\t\tbutton.setEnabled(false);\n\t\t\t\t}\n\t\t\t\tcurrentlyVoting = null;\n\t\t\t\tlblCurrentVoter.setText(null);\n\t\t\t\tlblCurrentVoter.setIcon(null);\n\t\t\t\tpnlVoting.setVisible(false);\n\t\t\t}", "public void voteFor (String name)\n {\n boolean searching = true;\n int index = 0;\n\n while(searching)\n {\n if(index < pList.size())\n {\n Personality objectHolder = pList.get(index);\n String personalityName = objectHolder.getName();\n\n if(name.equals(personalityName))\n {\n objectHolder.increaseVotes(1);\n searching = false;\n }\n }\n else\n {\n System.out.println(\"No personality found with the name : \" + name);\n searching = false;\n }\n\n index++;\n }\n }", "@Override\n public void onThirdVote(String arg0) {\n\n }", "private void addCustomWords() {\r\n\r\n }", "public void run() {\n mOpponentEmoteBubble.setText(botEmotesArray[new Random().nextInt(botEmotesArray.length)]);\n showEmote(mOpponentEmoteBubble);\n\n }", "public void sendVoteRequests() {\n for(int i = 1; i <= mConfig.getNumServers(); i++) {\n this.remoteRequestVote(i, mConfig.getCurrentTerm(), mID, mLog.getLastIndex(), mLog.getLastTerm());\n }\n //Initiate count vote timer\n voteCountTimer = scheduleTimer((long) 5, 2);\n }", "@Override\n\tpublic void runFromSentence(TokenizedSentence sentence) \n\t{\n\t\t\n\t}", "public void setNumVotes(int value) {\n this.numVotes = value;\n }", "private void postVote() {\n if ( unvotedParties() == 0 )\n TransactionManager.getTransactionManager().resolveTransaction(txId);\n }", "public void printVottingQuestion(){\n for (Voting voting : votingList){\n System.out.println(\"question : \"+voting.getQuestion());\n }\n\n }", "void handle(VoteMessage vote);", "public void vote(int rating) {\n\t\tnew WebTraceTask(this, String.valueOf(rating)).execute(WebTraceTask.VOTE);\n\t}", "public static void wordsToGuess(String [] myWords){\n myWords[0] = \"tesseract\";\n myWords[1] = \"vibranium\";\n myWords[2] = \"mjolnir\";\n myWords[3] = \"jarvis\";\n myWords[4] = \"avengers\";\n myWords[5] = \"wakanda\";\n myWords[6] = \"mixtape\";\n myWords[7] = \"assemble\";\n myWords[8] = \"queens\";\n myWords[9] = \"inevitable\";\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 }", "private static void init() {\n\t\tguess = 0;\n\t\ttries = 10;\n\t\tlen = Random.getRand(4, 8);\n\t\tcorrectGuesses = 0;\n\t\twordGen = new RandomWordGenerator(len);\n\t\twordGen.generate();\n\t\tword = wordGen.getWord();\n\t\tguessesResult = new boolean[word.length()];\n\n\t}", "private void updateCount(String word) {\n\t\t\tthis.count += invertedIndex.get(word).get(this.location).size();\n\t\t\tthis.score = (double) this.count / counts.get(this.location);\n\t\t}", "private void initialiseWordsToSpell(){\n\t\t//normal quiz\n\t\tif(quiz_type==PanelID.Quiz){\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Quiz);\n\t\t} else { //review quiz\n\t\t\twords_to_spell = parent_frame.getPreQuizHandler().getWordsForSpellingQuiz(parent_frame.getDataHandler().getNumWordsInQuiz(), PanelID.Review);\n\t\t}\t\n\t}", "private void vote(Connection connection, Matcher matcher) {\n\n final EventBus bus = getEventBus();\n if (!matcher.matches()) {\n bus.publish(new ConnectionMessageCommandEvent(connection, \"Invalid command!\"));\n return;\n }\n\n long pollID = Long.parseLong(matcher.group(1));\n int optionID = Integer.parseInt(matcher.group(2));\n\n try {\n StrawpollAPI.vote(pollID, optionID);\n bus.publish(new ConnectionMessageCommandEvent(connection, System.lineSeparator() + \"You voted successfully\"));\n }\n catch (Exception e) {\n bus.publish(new ConnectionMessageCommandEvent(connection, System.lineSeparator() + \"Whoops, it looks like we did not find a poll with the given id or index\"));\n e.printStackTrace();\n }\n\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\n\t\t\t\t\tdoVote(getIntent().getStringExtra(\"aid\"), getIntent().getStringExtra(\"id\"));\n\t\t\t\t\t\n\t\t\t\t}", "private void vote(Vote whichVoteButton, MenuItem item, PostData p) {\n if (!RedditLoginInformation.isLoggedIn()) {\n Toast.makeText(this, R.string.you_must_be_logged_in_to_vote, Toast.LENGTH_SHORT).show();\n return;\n }\n\n Intent intent = new Intent(Consts.BROADCAST_UPDATE_SCORE);\n intent.putExtra(Consts.EXTRA_PERMALINK, p.getPermalink());\n\n switch (whichVoteButton) {\n case DOWN:\n switch (p.getVote()) {\n case DOWN:\n RedditService.vote(this, p.getName(), Vote.NEUTRAL);\n item.setIcon(R.drawable.ic_action_downvote);\n p.setVote(Vote.NEUTRAL);\n p.setScore(p.getScore() + 1);\n break;\n\n case NEUTRAL:\n case UP:\n RedditService.vote(this, p.getName(), Vote.DOWN);\n item.setIcon(R.drawable.ic_action_downvote_highlighted);\n p.setVote(Vote.DOWN);\n mUpvoteMenuItem.setIcon(R.drawable.ic_action_upvote);\n p.setScore(p.getScore() - 1);\n break;\n }\n break;\n\n case UP:\n switch (p.getVote()) {\n case NEUTRAL:\n case DOWN:\n RedditService.vote(this, p.getName(), Vote.UP);\n item.setIcon(R.drawable.ic_action_upvote_highlighted);\n p.setVote(Vote.UP);\n p.setScore(p.getScore() + 1);\n mDownvoteMenuItem.setIcon(R.drawable.ic_action_downvote);\n break;\n\n case UP:\n RedditService.vote(this, p.getName(), Vote.NEUTRAL);\n item.setIcon(R.drawable.ic_action_upvote);\n p.setVote(Vote.NEUTRAL);\n p.setScore(p.getScore() - 1);\n break;\n }\n\n break;\n\n default:\n break;\n }\n\n // Broadcast the intent to update the score in the ImageDetailFragment\n intent.putExtra(Consts.EXTRA_SCORE, p.getScore());\n LocalBroadcastManager.getInstance(this).sendBroadcast(intent);\n }", "private void update() {\n\t\twhile(words.size()<length) {\n\t\t\twords.add(new Word());\n\t\t}\n\t}", "public void match( String word )\n { \n for( int i=0; i<numAssocs; i++ )\n if( word.equalsIgnoreCase( associations[i] ) )\n {\n incrActivation();\n// System.out.println( this.toString() + \" from processing \" + word );\n }\n }", "WordCounter(){\r\n }", "public String vote5(){\n String vote5MovieTitle = \" \";\n for(int i = 0; *i < results.length; i++){\n if(results[i].voteAve()) {\n vote5MovieTitle += results[i].getTitle() + \"\\n\";\n }\n }\n System.out.println(vote5MovieTitle);\n return vote5MovieTitle;\n }", "private static void insertCebuanoWords1(Context context)\n {\n WordRepository.create(context,\"i\", \"ako\",2);\n WordRepository.create(context,\"you\", \"ikaw\",2);\n WordRepository.create(context,\"mine\", \"akoa\",2);\n WordRepository.create(context,\"ours\", \"kita\",2);\n WordRepository.create(context,\"there's\", \"adunay\",2);\n WordRepository.create(context,\"your's\", \"imong\",2);\n WordRepository.create(context,\"eat\", \"kaon\",2);\n WordRepository.create(context,\"sleep\", \"pagkatulog\",2);\n WordRepository.create(context,\"run\", \"pagdagan\",2);\n WordRepository.create(context,\"enter\", \"pagsulod\",2);\n WordRepository.create(context,\"in love\", \"sa gugma\",2);\n WordRepository.create(context,\"walk\", \"lakaw\",2);\n WordRepository.create(context,\"push\", \"pagduso\",2);\n WordRepository.create(context,\"old\", \"tigulang na\",2);\n WordRepository.create(context,\"generous\", \"manggihatagon\",2);\n WordRepository.create(context,\"brave\", \"maisog\",2);\n WordRepository.create(context,\"funny\", \"kataw-anan\",2);\n WordRepository.create(context,\"evil\", \"daotan\",2);\n WordRepository.create(context,\"rich\", \"dato\",2);\n WordRepository.create(context,\"poor\", \"kabus\",2);\n WordRepository.create(context,\"shy\", \"maulaw\",2);\n WordRepository.create(context,\"ugly\", \"pangit\",2);\n WordRepository.create(context,\"dirty\", \"hugaw\",2);\n WordRepository.create(context,\"clean\", \"limpyo\",2);\n WordRepository.create(context,\"handsome\", \"gwapo\",2);\n WordRepository.create(context,\"smiling\", \"nagpahiyom\",2);\n WordRepository.create(context,\"beautiful\", \"matahum\",2);\n WordRepository.create(context,\"slouch\", \"pahuway\",2);\n WordRepository.create(context,\"tense\", \"labi\",2);\n WordRepository.create(context,\"short\", \"mubo\",2);\n WordRepository.create(context,\"tall\", \"taas\",2);\n WordRepository.create(context,\"big\", \"dako\",2);\n WordRepository.create(context,\"skinny\", \"panit\",2);\n WordRepository.create(context,\"small\", \"gamay\",2);\n WordRepository.create(context,\"deep\", \"lawom\",2);\n WordRepository.create(context,\"wide\", \"sa gilapdon\",2);\n WordRepository.create(context,\"roud\", \"makusog\",2);\n WordRepository.create(context,\"straight\", \"tul-id\",2);\n WordRepository.create(context,\"spicy\", \"maanindot\",2);\n WordRepository.create(context,\"salty\", \"asin\",2);\n WordRepository.create(context,\"sweet\", \"matam-is\",2);\n WordRepository.create(context,\"bitter\", \"pait\",2);\n WordRepository.create(context,\"harug\", \"harug\",2);\n WordRepository.create(context,\"cold\", \"kabugnaw\",2);\n WordRepository.create(context,\"hot\", \"init\",2);\n WordRepository.create(context,\"soft\", \"humok\",2);\n WordRepository.create(context,\"hard\", \"lisud\",2);\n WordRepository.create(context,\"dry\", \"uga nga\",2);\n WordRepository.create(context,\"smooth\", \"hamis nga\",2);\n WordRepository.create(context,\"rought\", \"gihunahuna\",2);\n WordRepository.create(context,\"wet\", \"basa\",2);\n WordRepository.create(context,\"silent\", \"hilom\",2);\n WordRepository.create(context,\"loud\", \"kusog\",2);\n WordRepository.create(context,\"noisy\", \"lanog\",2);\n WordRepository.create(context,\"awful\", \"makalilisang\",2);\n WordRepository.create(context,\"tingog\", \"kinabuhi\",2);\n WordRepository.create(context,\"whisper\", \"paghunghong\",2);\n WordRepository.create(context,\"few\", \"diyutay\",2);\n WordRepository.create(context,\"some\", \"pipila\",2);\n WordRepository.create(context,\"multiple\", \"daghang\",2);\n WordRepository.create(context,\"plenty\", \"daghan\",2);\n WordRepository.create(context,\"many\", \"daghan\",2);\n WordRepository.create(context,\"one\", \"sa usa ka\",2);\n WordRepository.create(context,\"several\", \"ubay-ubay\",2);\n WordRepository.create(context,\"each\", \"matag usa\",2);\n WordRepository.create(context,\"all\", \"tanan\",2);\n WordRepository.create(context,\"nasty\", \"dili maayo\",2);\n WordRepository.create(context,\"waiting\", \"naghulat\",2);\n WordRepository.create(context,\"horrible\", \"makalilisang\",2);\n WordRepository.create(context,\"artisimple\", \"artipisyal\",2);\n WordRepository.create(context,\"doubtfully\", \"pagduhaduha\",2);\n WordRepository.create(context,\"rainy\", \"ulan,\",2);\n WordRepository.create(context,\"dangerous\", \"delikado\",2);\n WordRepository.create(context,\"angry\", \"nasuko\",2);\n WordRepository.create(context,\"hurt\", \"nasakitan\",2);\n WordRepository.create(context,\"selfish\", \"hakog\",2);\n WordRepository.create(context,\"scary\", \"makahadlok\",2);\n WordRepository.create(context,\"confused\", \"naglibog\",2);\n WordRepository.create(context,\"tired\", \"gikapoy\",2);\n WordRepository.create(context,\"embarass\", \"panghimaraot\",2);\n WordRepository.create(context,\"afraid\", \"nahadlok\",2);\n WordRepository.create(context,\"lazy\", \"tapolan\",2);\n }", "public WordsToGuess(String w)\n\t{\n\t\tword = w;\n\t}", "private void settingQuestion() {\n\n int[] setWord = {0, 0, 0, 0, 0};\n int[] setPos = {0, 0, 0, 0};\n int[] setBtn = {0, 0, 0, 0};\n\n Random ans = new Random();\n int wordNum = ans.nextInt(vocabularyLesson.size());\n //answer = vocabularyLesson.get(wordNum).getMean();\n word = vocabularyLesson.get(wordNum).getWord();\n vocabularyID = vocabularyLesson.get(wordNum).getId();\n answer = word;\n\n Practice practice = pc.getPracticeById(vocabularyID);\n if (practice != null) {\n Log.d(\"idVocabulary\", practice.getSentence());\n question.setText(practice.getSentence());\n }\n\n\n // Random position contain answer\n setWord[wordNum] = 1;\n Random p = new Random();\n int pos = p.nextInt(4);\n if (pos == 0) {\n word1.setText(word);\n setBtn[0] = 1;\n }\n if (pos == 1) {\n word2.setText(word);\n setBtn[1] = 1;\n }\n if (pos == 2) {\n word3.setText(word);\n setBtn[2] = 1;\n }\n if (pos == 3) {\n word4.setText(word);\n setBtn[3] = 1;\n }\n setPos[pos] = 1;\n\n // Random 3 position contain 3 answer\n for (int i = 0; i < 3; i++) {\n Random ques = new Random();\n int num = ques.nextInt(5);\n int p1 = ques.nextInt(4);\n while (setWord[num] == 1 || setPos[p1] == 1) {\n num = ques.nextInt(5);\n p1 = ques.nextInt(4);\n }\n String wordIncorrect = vocabularyLesson.get(num).getWord();\n setWord[num] = 1;\n setPos[p1] = 1;\n if (setBtn[p1] == 0 && p1 == 0) {\n word1.setText(wordIncorrect);\n setBtn[0] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 1) {\n word2.setText(wordIncorrect);\n setBtn[1] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 2) {\n word3.setText(wordIncorrect);\n setBtn[2] = 1;\n }\n if (setBtn[p1] == 0 && p1 == 3) {\n word4.setText(wordIncorrect);\n setBtn[3] = 1;\n }\n }\n\n }", "public void countWord() {\n\t\tiniStorage();\n\t\tWordTokenizer token = new WordTokenizer(\"models/jvnsensegmenter\",\n\t\t\t\t\"data\", true);\n\t\t// String example =\n\t\t// \"Nếu bạn đang tìm kiếm một chiếc điện thoại Android? Đây là, những smartphone đáng để bạn cân nhắc nhất. Thử linh tinh!\";\n\t\t// token.setString(example);\n\t\t// System.out.println(token.getString());\n\n\t\tSet<Map.Entry<String, String>> crawlData = getCrawlData().entrySet();\n\t\tIterator<Map.Entry<String, String>> i = crawlData.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tMap.Entry<String, String> pageContent = i.next();\n\t\t\tSystem.out.println(pageContent.getKey());\n\t\t\tPageData pageData = gson.fromJson(pageContent.getValue(),\n\t\t\t\t\tPageData.class);\n\t\t\ttoken.setString(pageData.getContent().toUpperCase());\n\t\t\tString wordSegment = token.getString();\n\t\t\tString[] listWord = wordSegment.split(\" \");\n\t\t\tfor (String word : listWord) {\n\t\t\t\taddToDictionary(word, 1);\n\t\t\t\tDate date;\n\t\t\t\ttry {\n\t\t\t\t\tdate = simpleDateFormat.parse(pageData.getTime().substring(\n\t\t\t\t\t\t\t0, 10));\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\taddToStatByDay(date, word, 1);\n\t\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 public void processElection() {\n if (context.getState().equals(LEADER) || !context.getActive()) {\n return;\n }\n\n log.info(\"Peer #{} Start election\", context.getId());\n\n context.setState(CANDIDATE);\n Long term = context.incCurrentTerm();\n context.setVotedFor(context.getId());\n\n List<Integer> peersIds = context.getPeers().stream().map(Peer::getId).collect(Collectors.toList());\n long voteGrantedCount = 1L;\n long voteRevokedCount = 0L;\n\n //while didn't get heartbeat from leader or new election started\n while (checkCurrentElectionStatus(term)) {\n List<AnswerVoteDTO> answers = getVoteFromAllPeers(term, peersIds);\n peersIds = new ArrayList<>();\n for (AnswerVoteDTO answer : answers) {\n if (answer.getStatusCode().equals(OK)) {\n if (answer.getTerm() > context.getCurrentTerm()) {\n //• If RPC request or response contains term T > currentTerm: set currentTerm = T, convert to follower (§5.1)\n context.setTermGreaterThenCurrent(answer.getTerm());\n return;\n }\n if (answer.isVoteGranted()) {\n log.info(\"Peer #{} Vote granted from {}\", context.getId(), answer.getId());\n context.getPeer(answer.getId()).setVoteGranted(true);\n voteGrantedCount++;\n } else\n log.info(\"Peer #{} Vote revoked from {}\", context.getId(), answer.getId());\n voteRevokedCount++;\n } else {\n log.info(\"Peer #{} No vote answer from {}\", context.getId(), answer.getId());\n peersIds.add(answer.getId());\n }\n }\n if (voteGrantedCount >= context.getQuorum()) {\n winElection(term);\n return;\n } else if (voteRevokedCount >= context.getQuorum()) {\n loseElection(term);\n return;\n } //else retry\n delay();\n }\n }", "int countByExample(CmsVoteTitleExample example);", "public void changeIntelligence(int i) {\n \t\tif (intelligence + i < 1){\n \t\t\tintelligence = 0;\n \t\t\talive = false;\n \t\t}\n \t\tintelligence += i;\n \t}", "public void printVotingQuestions(){\n int i=0;\n System.out.println(\"Question\");\n for (Voting v:votingList) {\n System.out.println(i+\":\"+v.getQuestion());\n i++ ;\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tlisten_meaning_word();\n\t\t\t}", "void addVote(UserId userId, QuestionId questionId, int vote);", "public void upVote(Post p) {\n p.upvote();\n }", "public void vote(JsonObject inputMsg) {\n\t\tmessage = new JsonObject();\n\t\tmessage.addProperty(\"Direction\", \"ClientToServer\");\n\t\tmessage.addProperty(\"Function\", \"InGame\");\n\t\tmessage.addProperty(\"Operation\", \"VoteResult\");\n\t\tmessage.addProperty(\"RoomNumber\", roomNumber);\n\t\tmessage.addProperty(\"ScoredPlayer\", format(inputMsg.get(\"ScoredPlayer\").toString()));\n\n\t\tint r = Integer.parseInt(format(inputMsg.get(\"Row\").toString()));\n\t\tint c = Integer.parseInt(format(inputMsg.get(\"Column\").toString()));\n\t\tArrayList<String> voteWord = new ArrayList<String>();\n\n\t\tString word[] = new String[2];\n\n\t\tboard[r][c].setText(format(inputMsg.get(\"Letter\").toString()));\n\n\t\tword[0] = board[r][c].getText();\n\t\tword[1] = board[r][c].getText();\n\t\tboard[r][c].setBackground(Color.YELLOW);\n\n\t\t// Connect letters into a word\n\t\tfor (int i = 1; r + i < board.length; i++) {\n\t\t\tif (board[r + i][c].getText().equals(\"\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tword[0] = word[0] + board[r + i][c].getText();\n\t\t\tboard[r + i][c].setBackground(Color.YELLOW);\n\t\t}\n\n\t\tfor (int i = 1; r - i >= 0; i++) {\n\t\t\tif (board[r - i][c].getText().equals(\"\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tword[0] = board[r - i][c].getText() + word[0];\n\t\t\tboard[r - i][c].setBackground(Color.YELLOW);\n\t\t}\n\n\t\tfor (int i = 1; c + i < board.length; i++) {\n\t\t\tif (board[r][c + i].getText().equals(\"\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tword[1] = word[1] + board[r][c + i].getText();\n\t\t\tboard[r][c + i].setBackground(Color.YELLOW);\n\t\t}\n\t\tfor (int i = 1; c - i >= 0; i++) {\n\t\t\tif (board[r][c - i].getText().equals(\"\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tword[1] = board[r][c - i].getText() + word[1];\n\t\t\tboard[r][c - i].setBackground(Color.YELLOW);\n\t\t}\n\n\t\tif (word[0].length() + word[1].length() == 2) {\n\t\t\tvoteWord.add(word[0]);\n\t\t} else {\n\t\t\tvoteWord.add(word[0]);\n\t\t\tvoteWord.add(word[1]);\n\t\t}\n\t\tvoteWord(voteWord);\n\t}", "@GET(\"/{interaction-id}/votes\")\n List<GetGlueInteraction> votes(\n @EncodedPath(\"interaction-id\") String interactionId\n );", "void setWord(Word word);", "int insertSelective(CmsVoteTitle record);", "public void initState(KeyValueState<String, Long> state) {\n this.wordcount=state;\r\n\r\n }", "public void increment(){\n\t\twordCount += 1;\n\t}", "void castVote(Peer candidate) {\n votedFor = candidate;\n }", "public List<IrregularVerb> getRandomVerbs(int count);", "@FXML\n public void start_vote(ActionEvent e)\n {\n //calling functions to get ballot count and candidate count\n can_counter();\n ball_counter();\n //checks there are any candidates and ballots\n if((candidate_count!=0)&&(ballot_count!=0))\n {\n //if candidates and voters available, voting will start\n voting_state=1;\n a=new Alert(Alert.AlertType.INFORMATION);\n a.setContentText(\"Voting Has Been Started !\");\n a.show();\n }\n //for 0 candidate count with ballots\n else if ((candidate_count==0)&&(ballot_count!=0))\n {\n a=new Alert(Alert.AlertType.ERROR);\n a.setContentText(\"Cannot Start Voting With 0 Candidates !\");\n a.show();\n }\n //for 0 ballots with candidates\n else if ((ballot_count==0)&&(candidate_count!=0))\n {\n a=new Alert(Alert.AlertType.ERROR);\n a.setContentText(\"Cannot Start Voting With 0 Ballots !\");\n a.show();\n }\n else\n {\n a=new Alert(Alert.AlertType.ERROR);\n a.setContentText(\"Cannot Start Voting With 0 Candidates And 0 Ballots !\");\n a.show();\n }\n }", "void addWordToCandidatesSet(String word) {\n candidates.add(word);\n }", "public void beginSpeeches() {\n\t\tfinal ArrayList<Delegate> withRights = new ArrayList<Delegate>();\n\t\tfor (Delegate delegate : votes.keySet()) {\n\t\t\tVote vote = votes.get(delegate);\n\t\t\tif (vote == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (vote.withRights) {\n\t\t\t\twithRights.add(delegate);\n\t\t\t}\n\t\t}\n\t\tif (withRights.isEmpty()) {\n\t\t\treturn;\n\t\t}\n\t\tfinal SpeechPanel sp = new SpeechPanel(false, null);\n\t\tfinal Time speakingTime = new Time(0, 0, 30); // 30 seconds\n\n\t\tfor (final Delegate delegate : withRights) {\n\n\t\t\tJPanel pnlMain = new JPanel(new BorderLayout());\n\t\t\tpnlMain.add(sp, BorderLayout.CENTER);\n\n\t\t\tfinal Vote vote = votes.get(delegate);\n\t\t\tfinal JLabel lblVote = new JLabel(Character.toString(' '));\n\t\t\tlblVote.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\tlblVote.setFont(lblVote.getFont()\n\t\t\t\t\t.deriveFont((float) (lblVote.getFont().getSize() * 2))\n\t\t\t\t\t.deriveFont(Font.BOLD));\n\t\t\tpnlMain.add(lblVote, BorderLayout.SOUTH);\n\n\t\t\tfinal Window ancestor = SwingUtilities\n\t\t\t\t\t.getWindowAncestor(RollCallVotePanel.this);\n\t\t\tfinal JDialog dialog = new JDialog(ancestor);\n\t\t\tdialog.setTitle(Messages.getString(\"RollCallVotePanel.SpeechPrefix\") //$NON-NLS-1$\n\t\t\t\t\t+ delegate.getName()\n\t\t\t\t\t+ Messages.getString(\"RollCallVotePanel.SpeechSeparator\") //$NON-NLS-1$\n\t\t\t\t\t+ (delegate.getStatus().hasVetoPower ? vote.vetoText\n\t\t\t\t\t\t\t: vote.normalText));\n\t\t\tdialog.setContentPane(pnlMain);\n\t\t\tdialog.pack();\n\t\t\tdialog.setLocationRelativeTo(ancestor);\n\t\t\tdialog.setModalityType(ModalityType.APPLICATION_MODAL);\n\t\t\tsp.addSpeechListener(new SpeechListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void speechActionPerformed(SpeechEvent se) {\n\t\t\t\t\tfor (SpeechListener sfl : listenerList\n\t\t\t\t\t\t\t.getListeners(SpeechListener.class)) {\n\t\t\t\t\t\tsfl.speechActionPerformed(new SpeechEvent(\n\t\t\t\t\t\t\t\tRollCallVotePanel.this, delegate,\n\t\t\t\t\t\t\t\tSpeechEventType.FINISHED));\n\t\t\t\t\t}\n\t\t\t\t\tdialog.setVisible(false);\n\t\t\t\t\tdialog.dispose();\n\t\t\t\t}\n\t\t\t});\n\t\t\tsp.startSpeech(delegate, speakingTime, null);\n\t\t\tdialog.setVisible(true);\n\t\t}\n\t}", "public SubjectVotePhase(@NotNull Arena arena) {\n super(arena, 10);\n\n this.startTimer();\n }", "@Override \n public void updateVote(String keyString) throws EntityNotFoundException {\n Key entityKey = KeyFactory.stringToKey(keyString);\n Entity entity = ds.get(entityKey);\n int currentCount = ((Long) entity.getProperty(\"voteCount\")).intValue();\n entity.setProperty(\"voteCount\", currentCount + 1);\n ds.put(entity);\n }", "public void highLightWords(){\n }", "@Override\r\n public void actionPerformed(ActionEvent arg0) {\r\n UserDictionaryProvider provider = SpellChecker.getUserDictionaryProvider();\r\n if (provider != null) {\r\n provider.addWord(word);\r\n }\r\n Dictionary dictionary = SpellChecker.getCurrentDictionary();\r\n dictionary.add(word);\r\n dictionary.trimToSize();\r\n AutoSpellChecker.refresh(jText);\r\n }", "public Vote(int id, int v) {\n candidate_id = id;\n priority = v;\n }", "Analyzer(String speech) {\n\t\tthis.sentimentValues = new ArrayList<>();\n\t\tthis.speech = speech;\n\n\t}", "@Override\n public Agent action(PlayerInterface player, Game game, String word) {\n int clueCount = game.checkAllClueCounters();\n ClueLog log = game.getClueLog();\n int currentClueCount = log.getWordCounter(word);\n if (clueCount > 0) {\n if (currentClueCount > 0) {\n log.decreaseWordCounter(word);\n player.continueTurn();\n return null;\n } else {\n player.chooseAnotherWord();\n return null;\n }\n } else {\n player.endTurn(game);\n }\n return this;\n }", "private void setquestion() {\n qinit();\n question_count++;\n\n if (modeflag == 3) {\n modetag = (int) (Math.random() * 3);\n } else {\n modetag = modeflag;\n }\n\n WordingIO trueword = new WordingIO(vocabulary);\n\n if (modetag == 0) {\n\n MCmode(trueword);\n }\n\n if (modetag == 1) {\n BFmode(trueword);\n }\n\n if (modetag == 2) {\n TLmode(trueword);\n }\n\n if (time_limit != 0) {\n timingtoanswer(time_limit, jLabel2, answer_temp, jLabel5, jLabel6, jButton1);\n }\n }", "public void checkVotes() {\r\n\t\tnew Timer().scheduleAtFixedRate(new TimerTask() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tURLConnection connection = new URL(\"https://glowning.dev/discordminer/webhook/votes.txt\").openConnection();\r\n\t\t\t\t\tconnection.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11\");\r\n\t\t\t\t\tconnection.connect();\r\n\r\n\t\t\t\t\tBufferedReader r = new BufferedReader(new InputStreamReader(connection.getInputStream(), Charset.forName(\"UTF-8\")));\r\n\r\n\t\t\t\t\tString line = \"\";\r\n\t\t\t\t\twhile ((line = r.readLine()) != null) {\r\n\t\t\t\t\t\tSystem.out.println(line);\r\n\t\t\t\t\t\tUser u = getShards().getUserById(line);\r\n\t\t\t\t\t\tif (u != null) {\r\n\t\t\t\t\t\t\tint crate;\r\n\r\n\t\t\t\t\t\t\tCalendar cal = Calendar.getInstance();\r\n\t\t\t\t\t\t\tcal.setTimeInMillis(System.currentTimeMillis());\r\n\t\t\t\t\t\t\tcal.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\r\n\r\n\t\t\t\t\t\t\tif (cal.get(Calendar.DAY_OF_WEEK) == Calendar.FRIDAY || cal.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY || cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {\r\n\t\t\t\t\t\t\t\tcrate = 2;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcrate = 1;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tMiner miner = new Miner(u.getIdLong());\r\n\t\t\t\t\t\t\tif (miner.exists()) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Crates given to \" + u.getName() + \" (\" + u.getIdLong() + \")\");\r\n\t\t\t\t\t\t\t\tu.openPrivateChannel().complete().sendMessage(\"Hey! Thank you for your vote.\\nAs a reward, I give you **\" + crate + \" crate\" + (crate == 2 ? \"s\" : \"\") + \"**.\").queue();\r\n\r\n\t\t\t\t\t\t\t\tminer.addCrates(\"vote\", crate);\r\n\t\t\t\t\t\t\t\tminer.getStats().put(\"votes\", miner.getStats().getInt(\"votes\") + 1);\r\n\t\t\t\t\t\t\t\tminer.update();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tHttpClient httpclient = HttpClients.createDefault();\r\n\t\t\t\t\t\tHttpPost httppost = new HttpPost(\"https://glowning.dev/discordminer/webhook/discordbots.php\");\r\n\t\t\t\t\t\tList<NameValuePair> params = new ArrayList<NameValuePair>(2);\r\n\t\t\t\t\t\tparams.add(new BasicNameValuePair(\"Authorization\", \"DiscordMiner\"));\r\n\t\t\t\t\t\tparams.add(new BasicNameValuePair(\"user\", line));\r\n\t\t\t\t\t\thttppost.setEntity(new UrlEncodedFormEntity(params, \"UTF-8\"));\r\n\t\t\t\t\t\thttpclient.execute(httppost);\r\n\r\n\t\t\t\t\t}\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\r\n\t\t\t}\r\n\t\t}, 0, 1000);\r\n\t}", "public void analyzeDocument(String text) {\n\t\tString[] tokens = m_tokenizer.tokenize(text.toLowerCase());\n\t\tfor (int j = 0; j < tokens.length; j++)\n\t\t\ttokens[j] = SnowballStemmingDemo(NormalizationDemo(tokens[j]));\n\t\tHashMap<String, Integer> document_tf = new HashMap<String, Integer>();\n\t\tfor (String token : tokens) {\n\t\t\tif (!document_tf.containsKey(token))\n\t\t\t\tdocument_tf.put(token, 1);\n\t\t\telse\n\t\t\t\tdocument_tf.put(token, document_tf.get(token) + 1);\n\t\t\tif (!df.containsKey(token))\n\t\t\t\tdf.put(token, 1);\n\t\t\telse\n\t\t\t\tdf.put(token, df.get(token) + 1);\n\t\t}\n\t\ttf.add(document_tf);\n\t\t/*\n\t\t * for(String token : document_tf.keySet()) { if(!df.containsKey(token))\n\t\t * df.put(token, 1); else df.put(token, df.get(token) + 1); if(!) }\n\t\t */\n\t\tm_reviews.add(text);\n\t}", "private void initializeSentimentFeaturesCount() {\n\t\tint count = 0;\n\n\t\t// Number of positive words\n\t\tif (Features.isNumberOfPositiveWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of negative words\n\t\tif (Features.isNumberOfNegativeWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of highly emotional positive words\n\t\tif (Features.isNumberOfHighlyEmoPositiveWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of highly emotional negative words\n\t\tif (Features.isNumberOfHighlyEmoNegativeWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of Capitalized positive words\n\t\tif (Features.isNumberOfCapitalizedPositiveWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of Capitalized Negative Words\n\t\tif (Features.isNumberOfCapitalizedNegativeWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Ratio of Emotional Words\n\t\tif (Features.isRatioOfEmotionalWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of Positive Emoticons\n\t\tif (Features.isNumberOfPositiveEmoticons()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of Negative Emoticons\n\t\tif (Features.isNumberOfNegativeEmoticons()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of \"Neutral\" Emoticons\n\t\tif (Features.isNumberOfNeutralEmoticons()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of \"Joking\" Emoticons\n\t\tif (Features.isNumberOfJokingEmoticons()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number Of Positive Slangs\n\t\tif (Features.isNumberOfPositiveSlangs()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of Negative Slangs\n\t\tif (Features.isNumberOfNegativeSlangs()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number Of Positive Hashtags\n\t\tif (Features.isNumberOfPositiveHashtags()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number Of Negative Hashtags\n\t\tif (Features.isNumberOfNegativeHashtags()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Contrast Words Vs Words\n\t\tif (Features.isContrastWordsVsWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Contrast Words Vs Hashtags\n\t\tif (Features.isContrastWordsVsHashtags()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Contrast Words Vs Emoticons\n\t\tif (Features.isContrastWordsVsEmoticons()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Contrast Hashtags Vs Hashtags\n\t\tif (Features.isContrastHashtagsVsHashtags()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Contrast Hashtags Vs Emoticons\n\t\tif (Features.isContrastHashtagsVsEmoticons()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\tSelectBasicFeaturesWindow.setNumberOfSentimentRelatedFeatures(count);\n\t\tSelectBasicFeaturesWindow.countOfSentimentRelatedFeatures.set(count);\n\t}", "public void addWordCount(){\r\n\t\twordCount = wordCount + 1;\r\n\t}", "public void printVoting(int index){\n System.out.print(\"Question : \"+votingList.get(index).getQuestion()+\" Choices: \");\n int i=0;\n for (String s:votingList.get(index).getChoices()) {\n System.out.print(i + \": \" + s + \" \");\n i++;\n }\n System.out.println();\n }", "public void printResult(int index){\n votingList.get(index).printVotes();\n }", "public void printResult(int index){\n votingList.get(index).printVotes();\n }", "public Candidate(String w, int c) {\r\n\t\tword = w;\r\n\t\tconfidence = c; // confidence will be represented by the number of times a particular word has been entered\r\n\t\t// higher frequency of entries = higher confidence\r\n\t}", "public void initializeAllCharacters(Tree story){\n//\t\tfor (Tree subtree : story){\n//\t\t\tif (subtree.label().value().equals(\"NP\")){//extracting all noun phrases to initialize all of the characters.\n//\t\t\t\taddCharacterToMap(subtree);\n//\t\t\t}\n//\t\t}\n//\t\tgetAllVerbPhrases(story);\n\t}", "public int getVotes() {\n return votes;\n }", "public int getVotes() {\n return votes;\n }", "public void printVoting(int index){\n System.out.println(\"vote question : \"+votingList.get(index).getQuestion());\n for (int i = 0;i<votingList.get(index).getPolls().size();i++){\n System.out.println(\"poll \"+(i+1)+\" : \"+votingList.get(index).getPolls().get(i));\n }\n }", "private void update(String person){\n\n\t\tint index = myWords.indexOf(person);\n\t\tif(index == -1){\n\t\t\tmyWords.add(person);\n\t\t\tmyFreqs.add(1);\n\t\t}\n\t\telse{\n\t\t\tint value = myFreqs.get(index);\n\t\t\tmyFreqs.set(index,value+1);\n\t\t}\n\t}", "public Response<Poll> votePoll(String id, long[] choices);", "private void renewWord() {\n givenWord = availableWords.randomWordLevel1();\n shuffedWord = availableWords.shuffleWord(givenWord);\n textViewShuffle.setText(shuffedWord);\n }", "public NormalSwear(String word) {\n this.word = word;\n }", "public MarkovWord(int myOrder){\n this.myOrder = myOrder; \n }", "public void verliesLeven() {\r\n\t\t\r\n\t}" ]
[ "0.6472416", "0.61951524", "0.614618", "0.60081875", "0.5826787", "0.5813039", "0.5770618", "0.5728342", "0.5687384", "0.5595832", "0.5512185", "0.54997206", "0.54965025", "0.5496108", "0.545544", "0.54484874", "0.54363656", "0.5404249", "0.5392828", "0.53586894", "0.5356545", "0.5355418", "0.53457546", "0.52794206", "0.5277721", "0.5250535", "0.52484995", "0.5242709", "0.5232643", "0.52263784", "0.52168167", "0.52094954", "0.5205369", "0.51990277", "0.51900494", "0.51845527", "0.5177854", "0.51539296", "0.5114878", "0.51089835", "0.50940245", "0.50883746", "0.508643", "0.50832987", "0.50647163", "0.5054268", "0.5054265", "0.5053331", "0.50415325", "0.50265217", "0.5022514", "0.50205225", "0.5014935", "0.50079894", "0.50052196", "0.500247", "0.49978113", "0.4990236", "0.49892768", "0.4988918", "0.49855277", "0.4959567", "0.49587595", "0.49505305", "0.4950175", "0.49436918", "0.4943356", "0.49420205", "0.4935625", "0.49267226", "0.48940027", "0.48894656", "0.488535", "0.48845825", "0.48816767", "0.4875874", "0.48713467", "0.4862648", "0.4862076", "0.4856364", "0.48538172", "0.4850473", "0.4831373", "0.48303235", "0.48236418", "0.48174796", "0.4815259", "0.48090142", "0.48090142", "0.48025694", "0.47937843", "0.47921455", "0.47921455", "0.47866535", "0.4785278", "0.47801328", "0.47635302", "0.4761836", "0.47482103", "0.4740686" ]
0.62526715
1
Update the score of the corresponding player
public void updateScore(JsonObject inputMsg) { String name = format(inputMsg.get("ScoredPlayer").toString()); for (int i = 0; i < playerList.size(); i++) { if (playerList.get(i).getPlayerName().equals(name)) { playerList.get(i).setPlayerScore(playerList.get(i).getPlayerScore() + Integer.parseInt(format(inputMsg.get("Score").toString()))); scoreBoard[i].setText("Player: " + playerList.get(i).getPlayerName() + "\t" + "Score: " + playerList.get(i).getPlayerScore()); break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}", "public void updateScore(int playerScore){\n\t\tscore += playerScore;\n\t\tscoreTotalLabel.setText(\"\" + score);\n\t}", "public void updateScore(int score){ bot.updateScore(score); }", "@Override\n public void updateScore(int winner)\n {\n if (winner == 0)\n {\n playerOneScore++;\n }\n else\n {\n playerTwoScore++;\n }\n }", "public void updatePlayer(Player player) {\n Duration playDuration = Duration.ofMinutes(player.getStatistic(Statistic.PLAY_ONE_MINUTE) / 20 / 60);\n int hoursPlayed = Math.toIntExact(playDuration.toHours());\n this.objective.getScore(player.getName()).setScore(hoursPlayed);\n }", "public void updateScore(){\r\n if (this.isArtist || winners.contains(this)) {\r\n this.score += pointsGainedLastRound;\r\n }\r\n pointsGainedLastRound = 0;\r\n placeLastRound = 0;\r\n }", "public void updatescore() {\n scorelabel.setText(\"\" + score + \" points\");\n if (100 - score <= 10) win();\n }", "public abstract Scoreboard update(Player player);", "public void updateScoreBoard() {\n Player player1 = playerManager.getPlayer(1);\n Player player2 = playerManager.getPlayer(2);\n MainActivity mainActivity = (MainActivity) this.getContext();\n\n mainActivity.updateScoreBoard(player1, player2);\n }", "public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }", "public void updatePlayerScoreForUsername(String username) {\n for (Player P : fliegeScore.getPlayers()) {\n if (P.getPlayerName().compareTo(username) == 0) {\n P.setScore(P.getScore() + 1);\n }\n }\n }", "public synchronized void updateScore(PlayerHandler playerHandler) {\n\n int points = teams.length * Server.TEAM_SCORE / numMaxPlayers;\n playerHandler.increaseCorrectAnswers();\n\n if(points < 3){\n points = 3;\n }\n\n if (playerHandler.getTeam() == teams[0]) {\n score -= points;\n System.out.println(score);\n return;\n }\n score += points;\n }", "private void updateScore() {\n\t\tscoreString.updateString(Integer.toString(score));\n\t}", "public void updateScore()\n {\n nextPipe = pipes.get(score);\n if(CHARACTER_X > nextPipe.getPipeCapX() + 35)\n {\n score++;\n }\n if(score > highScore)\n {\n highScore = score;\n }\n }", "public void updateScore(Player player, Piece piece, Move move) {\n var newScore = player.getScore();\n newScore += Math.abs(move.getSource().x() - move.getDestination().x());\n newScore += Math.abs(move.getSource().y() - move.getDestination().y());\n player.setScore(newScore);\n System.out.println(\"score \" + newScore);\n }", "void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }", "public static void incrementScore() {\n\t\tscore++;\n\t}", "public static void score() {\n\t\tSystem.out.println(\"SCORE: \");\n\t\tSystem.out.println(player1 + \": \" + score1);\n\t\tSystem.out.println(player2 + \": \" + score2);\n\t}", "private void setPlayerScore(Player player, int newScore) {\n\t\tplayer.score = Math.max(newScore, 0);\n\t\tfor (ScoreMarker scoreMarker : playerScoreMarkers) {\n\t\t\tif (scoreMarker.getOwner() == player) {\n\t\t\t\tscoreMarker.value = String.valueOf(player.score);\n\t\t\t}\n\t\t}\n\t}", "void updateScore () {\n scoreOutput.setText(Integer.toString(score));\n }", "public int incrementScore(int player) {\n switch (player) {\n case PLAYER_A:\n return ++scoreA;\n case PLAYER_B:\n return ++scoreB;\n }\n return -1;\n }", "public void setNewScore(String player, int score) {\n\t\t\n\t}", "public void updateScoreboard() {\r\n \tif(parentActivity instanceof GameActivity) {\r\n \t\t((TextView)(((GameActivity)parentActivity).getScoreboard())).setText(\"\"+score);\r\n \t}\r\n }", "public void updateScore(){\n scoreChange++;\n if(scoreChange % 2 == 0){\n if(score_val < 999999999)\n score_val += 1;\n if(score_val > 999999999)\n score_val = 999999999;\n score.setText(\"Score:\" + String.format(\"%09d\", score_val));\n if(scoreChange == 10000)\n scoreChange = 0;\n }\n }", "@Test\n void updateScore() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setTurn(true);\n p.updateScore(3);\n assertTrue(p.getScore()==3);\n\n p = new RealPlayer('b', \"ciccia\");\n p.updateScore(-1);\n assertTrue(p.getScore()==0);\n }", "public Player updatePlayer(Player player);", "public void update(Player player) {\n\t\t\n\t}", "void updatePlayer(Player player);", "@Override\npublic void update(int score) {\n\t\n}", "public void updateScores() {\n\t\tscoreText.setText(\"Score: \" + ultraland.getScore());\n\t}", "public void update()\n {\n scorecard.update();\n scorer.update();\n }", "public void setScore(){\n\t\t//get player's score and change it to the string\n\t\tthis.scoreLabel.setSize(scoreLabel.getPreferredSize().width, \n\t\t\t\tscoreLabel.getPreferredSize().height);\n\t\tthis.scoreLabel.setText(String.valueOf(this.player.getScore()));\n\t}", "private void updateScore(int point) {\n SharedPreferences preferences = getSharedPreferences(SHARED_PREFERENCES, MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putInt(SCORE_KEY, mScore);\n\n }", "private void increaseScore() {\n this.game.getPlayers().values().forEach(ship -> {\n ship.increaseScore();\n if (ship.getScore() % 5 == 0) {\n this.asteroidsLimit++;\n }\n });\n }", "public void setScore(int score)\n\t{\n\t\tthis.score += score;\n\t}", "public void updateScore() {\n\t\tif (pellet.overlapsWith(avatar)) {\n\t\t\tavatar.addScore(1);\n\t\t\tpellet.removePellet(avatar.getLocation());\n\t\t\tSystem.out.println(\"collected pellet\");\n\t\t}\n\t}", "public static void setPlayerScore(int score)\r\n\t{\r\n\t\tGame.playerScore = score;\r\n\t}", "public void setObjectiveScore(String name, Player player, int value) {\n scoreboard.getObjective(name).getScore(player.getName()).setScore(value);\n }", "private void updateScore(int point){\n mScoreView.setText(\"\" + mScore);\n }", "public void score(){\r\n\t\tint playerLocation = player.getLocationX();\r\n\t\tint obstacleX = obstacle.getLocationX();\r\n\t\tint obstacleY = obstacle.getLocationY();\r\n\r\n\r\n\t\tstr =\"\" + countCoins;\r\n\r\n\t\t//if you hit a coin, the number of points goes up by one.\r\n\t\tif(obstacleY == 280 && obstacleX==300 && playerLocation == 250){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\t\tif(obstacleY== 450 && obstacleX==300 && playerLocation ==450){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\r\n\t\t//if you hit the green monster, you lose one point.\r\n\t\tif((obstacleX-50) == 250 && (obstacleY-240) == 250 && playerLocation ==250){\r\n\t\t\tcountCoins--;\r\n\t\t}\r\n\r\n\t\t//if you hit the blue monster, you lose 3 points.\r\n\t\tif((obstacleX+180) == 480 && (obstacleY+180) == 250 && playerLocation ==450){\r\n\t\t\tcountCoins-=3;\r\n\t\t}\r\n\t}", "public void updateScore() {\n\n Main.rw.readFile();\n setScore(Main.rw.getStackInfo());\n\n\n }", "public synchronized void setScore(Integer score) {\n this.score += score;\n }", "public void calculateScore() {\n\n turnScore();\n\n if (turn == 1) {\n p1.setScore(p1.getScore() - turnScore);\n\n } else if (turn == 2) {\n p2.setScore(p2.getScore() - turnScore);\n\n }\n\n\n }", "private void refreshScore(){\n String info = players[0] + \" \"+playerScores[0]+\":\" +playerScores[1]+ \" \"+players[1];\n scoreInfo.setText(info);\n }", "private static void updateGame()\n {\n GameView.gameStatus.setText(\"Score: \" + computerScore + \"-\" + playerScore);\n if (computerScore + playerScore == NUM_CARDS_PER_HAND) {\n if (computerScore > playerScore) {\n GameView.gameText.setText(\"Computer Wins!\");\n Timer.stop = true;\n }\n else if (playerScore > computerScore) {\n GameView.gameText.setText(\"You win!\");\n Timer.stop = true;\n }\n else {\n GameView.gameText.setText(\"Tie game!\"); \n Timer.stop = true;\n }\n }\n }", "public int getScore(){\n\t\treturn playerScore;\n\t}", "private void updateScore(int changeScore) {\n score += changeScore;\n scoreText = \"Score: \" + score + \"\\t\\tHigh Score: \" + highScore;\n scoreView.setText(scoreText);\n }", "@Override\n\tpublic void update() {\n\t\tif(isSaveScore()){\n\t\t\tsaveScore();\n\t\t\tmanager.reconstruct();\n\t\t}\n\t\tmanager.move();\n\t}", "public void wonPoint(String playerName) {\n if (playerName.equals(player1Name))\n this.player1Score += 1;\n else\n this.player2Score += 1;\n }", "public void score() {\n\t\tif (Integer.parseInt(px.getPosition()) != Integer.parseInt(getCurrentPositionX()))\n\t\t{\n\t\t\tpx.addObserver(Obsx);\n\t\t\tpx.setPosition(getCurrentPositionX());\n\t\t}\n\t\tif (Integer.parseInt(py.getPosition()) != Integer.parseInt(getCurrentPositionY()))\n\t\t{\n\t\t\tpy.addObserver(Obsy);\n\t\t\tpy.setPosition(getCurrentPositionY());\n\t\t}\n\t}", "@Override\n public void updateScore(String currentScore) {\n if (currentScore == null){\n this.notifyObservers(\"Error while fetching score\");\n }\n else {\n this.currentScore = currentScore;\n this.notifyObservers();\n }\n }", "public void increaseScore(final int score) {\n setChanged();\n notifyObservers(new Pair<>(\"increaseScore\", score));\n }", "@Override\r\n\tpublic boolean updateScore(int score) {\n\t\ttry {\r\n\t\t\tconn = DriverManager.getConnection(URL, USER, PASS);\r\n\t\t\tString sql = \"update member set score=score+\"+score+\" where id='\"+LoginServiceImpl.getCurrentUser().getID()+\"'\";\r\n\t\t\tps = conn.prepareStatement(sql);\r\n\t\t\t\r\n\t\t\tif(ps.executeUpdate()==0) {\r\n\t\t\t\treturn false;\r\n\t\t\t}else\r\n\t\t\t\treturn true;\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}", "public void setScore(int score) { this.score = score; }", "public void addOneToScore() {\r\n score++;\r\n }", "public void addScore()\n {\n score += 1;\n }", "public void setScore (int newScore)\n {\n this.score = newScore;\n }", "public void updateScore(double d) {\n\t\tscore+=d;\t\n\t}", "public void increaseScore(){\n this.inc.seekTo(0);\n this.inc.start();\n this.currentScore++;\n }", "@Override\r\n\tpublic void updateScore(String name, int lv, int score) {\r\n\t\t\r\n\t\tConnection connection = ConnectionFactory.getConnection();\r\n try {\r\n Statement stmt = connection.createStatement();\r\n String update = \"REPLACE INTO SINGLEPLAYERDB\\n\"\r\n \t\t+ \" (NAME_PLAYER, LV, SCORE)\\n\"\r\n \t\t+ \"VALUES\\n\"\r\n \t\t+ \"('\" + name + \"','\" + lv + \"','\" + score + \"')\";\r\n \r\n stmt.executeQuery(update);\r\n \r\n \r\n }catch (SQLException ex) {\r\n ex.printStackTrace();\r\n }\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void updateDriverRate(int score, String driverID) {\n\t\t\r\n\t}", "public void update() {\n\t\t//Indicate that data is fetched\n\t\tactivity.showProgressBar();\n\t\n\t\tPlayer currentPlayer = dc.getCurrentPlayer();\n\t\tactivity.updatePlayerInformation(\n\t\t\t\tcurrentPlayer.getName(),\n\t\t\t\tgetGlobalRanking(),\n\t\t\t\tcurrentPlayer.getGlobalScore(),\n\t\t\t\tcurrentPlayer.getPlayedGames(),\n\t\t\t\tcurrentPlayer.getWonGames(),\n\t\t\t\tcurrentPlayer.getLostGames(),\n\t\t\t\tcurrentPlayer.getDrawGames());\n\n\t\tactivity.hideProgressBar();\n\t}", "@Override\n\tpublic int updateScore(int score) {\n\t\t\n\t\t// decrease the score by this amount:\n\t\tscore -= 50;\n\t\t\n\t\treturn score;\n\t}", "public void updatePlayerPoints() {\n setText(Integer.toString(owner.getPlayerPoints()) + \" points\");\n }", "public int getPlayerScore(){\n\t\treturn playerScore;\n\t}", "public int getPlayerScore();", "public void setScore(int score) {this.score = score;}", "private void updateScore(int point){\n sScore.setText(\"\" + mScore + \"/\" + mQuizLibrary.getLength());\n\n }", "public void addScore(int score) {\n currentScore += score;\n }", "public static void setScoreBoard(Player p) {\n\t\n}", "private void updateScore(double distance){\n\t\tint baseScore = 100 * difficulty;\n\t\tdouble distanceMultiplier = 1 + (distance / 370.0);\n\t\tdouble fastModeMultiplier = (fastMode)?1.99 + (currentLevel/100.0):1;\n\t\tdouble streakMultiplier = 1 + (streak/20.0);\n\t\tSystem.out.println(\"Total multiplier: \" + (distanceMultiplier * fastModeMultiplier * streakMultiplier));\n\t\tscore += baseScore * distanceMultiplier * fastModeMultiplier * streakMultiplier;\n\t\tstreak++;\n\n\t}", "public void addToScore(int score)\n {\n this.score += score;\n }", "public void updateScores(double attempt) {\r\n \tif(previousScore == 0){\r\n \t\tpreviousScore = currentScore;\r\n \t}else{\r\n \t\tbeforePreviousScore = previousScore;\r\n \t\tpreviousScore = currentScore;\r\n \t}\r\n this.currentScore = 100*(attempt \r\n\t\t\t\t- (benchmark - (maximumMark - benchmark)/NUMBEROFLEVEL))\r\n\t\t\t\t/(((maximumMark - benchmark)/NUMBEROFLEVEL)*2);\r\n }", "private void updateHighscore() {\n if(getScore() > highscore)\n highscore = getScore();\n }", "public void incrementScore(int inc){\n\t\tscoreboard.incrementScore(inc);\n\t}", "private void update() {\n if(!Constants.GAME_OVER) {\n deltaTime = (int) (System.currentTimeMillis() - startTime);\n startTime = System.currentTimeMillis();\n elapsedTime = (int) (System.currentTimeMillis() - initTime)/1000;\n Constants.ELAPSED_TIME = elapsedTime;\n //Log.d(\"FRAMES \", \"\"+ Constants.FRAME_COUNT);\n //call update on every object\n player.update();\n enemyManager.update(player);\n starManager.update(player.getSpeed());\n asteroidManager.update(player);\n } else {\n playing = false;\n sound.stopBg();\n for(int i = 0; i < highScore.length; i++) {\n if (Constants.SCORE > highScore[i]) {\n final int endI = i;\n highScore[i] = Constants.SCORE;\n // Log.d(\"SCORE \", \"\" + highScore[i]);\n break;\n }\n }\n\n SharedPreferences.Editor editor = sharedPreferences.edit();\n for(int i = 0; i < highScore.length; i++) {\n int index = i + 1;\n editor.putInt(\"score\" + index, highScore[i]);\n }\n editor.apply();\n }\n }", "public void incrementScore(int scoreToAdd) {\n this.score += scoreToAdd;\n }", "public void incrementScore(int val) {\n score += val;\n }", "public void updatePlayerHealthUI() {\n CharSequence text = String.format(\"Score: %d\", getscore());\n scoreLabel.setText(text);\n }", "public void hitAlienScore() {\r\n //Add 5 to the score\r\n score += 5;\r\n System.out.println(\"Current Score = \"+score);\r\n }", "public Scores(String player, int score) {\r\n this.player = player;\r\n this.score = score;\r\n }", "public void notifyScoreChange(int score) {\n scoreLabel.setText(String.valueOf(score));\n }", "public void increaseScore(int p) {\n score += p;\n //Minden novelesnel megnezzuk, hogy elertuk-e a gyozelem szukseges pandaszamot.\n if(score >= 25 && game.getSelectedMode() == Game.GameMode.FinitPanda){\n //Ha elertuk, szolunk a jateknak hogy vege.\n game.SaveHighScore(score);\n game.gameOver();\n }\n }", "public void incrementScore(int increment) {\n score = score + increment;\n }", "private void scoregain() {\n \tif (playerturn%2==0) {\n \tscoreplayer1 = scoreplayer1+2;}\n if(playerturn%2==1) {\n \tscoreplayer2 = scoreplayer2+2;\n }\n }", "public void incrementScore(int amount){\n\t\tthis.score += amount;\n\t}", "public void updateWithPointWonBy(Player player) {\n if(managerTennisMatch.statusTennisMatch == \"ClassicalGame\") {\n if (player == player1) {\n managerTennisMatch.checkScoreAndUpdateGame(player, player2);\n } else {\n managerTennisMatch.checkScoreAndUpdateGame(player, player1);\n }\n } else if(managerTennisMatch.statusTennisMatch == \"TieBreakInProgress\") {\n player.setScore(player.getScore() + 1);\n if((player1.getScore() >= 7 && player1.getScore() - player2.getScore() >= 2) || (player2.getScore() >= 7 && player2.getScore() - player1.getScore() >= 2)) {\n tennisSetList.get(tennisSetList.size() - 1).getBaseGameList().add(new TieBreakGame(player));\n player1.setScore(0);\n player2.setScore(0);\n }\n } else {\n return;\n }\n }", "protected void setOnePlayerHumanScore(int score){\n this.humanWinsCPU_TextField.setText(Integer.toString(score));\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}", "public void setScore(int score)\n {\n this.score = score;\n }", "protected void addScoreToLeaderboard() {\n\n\t\tif (onlineLeaderboard) {\n\t\t jsonFunctions = new JSONFunctions();\n\t\t jsonFunctions.setUploadScore(score);\n\t\t \n\t\t Handler handler = new Handler() {\n\t\t\t @Override\n\t\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\t @SuppressWarnings(\"unchecked\")\n\t\t\t\t ArrayList<Score> s = (ArrayList<Score>) msg.obj;\n\t\t\t\t globalScores = helper.sortScores(s);\n\t\t\t }\n\t\t };\n\t\t \n\t\t jsonFunctions.setHandler(handler);\n\t\t jsonFunctions\n\t\t\t .execute(\"http://brockcoscbrickbreakerleaderboard.web44.net/\");\n\t\t}\n\t\tsaveHighScore();\n }", "public PlayerScore (String name, int score)\n {\n playerName = name;\n playerScore = score;\n }", "protected void setScore(int s)\r\n\t{\r\n\t\tGame.score = s;\r\n\t}", "public void updatePlayer(Player player) {\n\t\t// update the flag GO TO JAIL in Player class\n\t}", "public int getPlayerScore(){\n return this.playerScore;\n }", "private void updateStats(Player player, Stats stats) {\n if (this.statsScoreboards != null) {\n GameListener.this.statsScoreboards.get(player).updateStats(player, stats);\n }\n }", "public void setScore(int score) {\r\n this.score = score;\r\n }", "public void setScore(int score) {\r\n this.score = score;\r\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void updateScoreCard(){\n scoreCard.setText(correct+\"/\"+total);\n }" ]
[ "0.8308343", "0.8172754", "0.7983402", "0.7961641", "0.78724575", "0.7843844", "0.7769609", "0.7724232", "0.76606214", "0.7621761", "0.7616943", "0.7602626", "0.7573516", "0.7438336", "0.7419414", "0.7418708", "0.7398243", "0.73858845", "0.73264915", "0.72606", "0.71931076", "0.71748245", "0.7153736", "0.7139167", "0.71205336", "0.7087666", "0.7081026", "0.7078848", "0.70751494", "0.7073607", "0.7057015", "0.7046425", "0.7025831", "0.70148826", "0.6992799", "0.6988073", "0.69855595", "0.6971254", "0.69711953", "0.6947273", "0.6947212", "0.694318", "0.6922492", "0.6914204", "0.6869579", "0.6864365", "0.6859318", "0.6856962", "0.68493", "0.6846835", "0.6821088", "0.6815738", "0.68002194", "0.68002087", "0.6775344", "0.6767437", "0.6756685", "0.6755839", "0.6746566", "0.6740904", "0.67408526", "0.6734776", "0.67334414", "0.6714703", "0.6712252", "0.670921", "0.6705221", "0.66935706", "0.66923946", "0.66778046", "0.66752785", "0.667231", "0.6663982", "0.6653419", "0.6649564", "0.6647886", "0.6642395", "0.6641732", "0.6641236", "0.66382265", "0.662946", "0.6619599", "0.66070306", "0.6600834", "0.6599111", "0.65955937", "0.6594328", "0.657558", "0.65710145", "0.6567638", "0.655371", "0.65519285", "0.6549273", "0.6542919", "0.65428233", "0.65386844", "0.65346766", "0.65346766", "0.653264", "0.6526629" ]
0.7217586
20
Display the chat message
public void displayChatMessage(JsonObject inputMsg) { textArea.append(format(inputMsg.get("Speaker").toString()) + " said: " + format(inputMsg.get("ChatContent").toString()) + "\n"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showMessage() throws IOException {\n String msg = fromServer.readUTF();\n chatArea.append(msg + \"\\n\");\n // set the chat area always keep focus at bottom\n chatArea.setCaretPosition(chatArea.getDocument().getLength());\n }", "private void displayMsg(String msg) {\n //add message to chatList array\n chatList.add(msg);\n //display message in GUI\n mg.appendRoom(msg); \n }", "private synchronized void display(String msg) {\n\n\t\t//guiConversation.append(msg);\n\t\tSystem.out.println(msg);\n\t}", "protected void displayMessage() {\n \n System.out.print (\"Message:\\n\");\n userMessage = message.toString();\n\n for(int i = 0; i < userMessage.length(); i++) \n System.out.format (\"%3d\", i);\n System.out.format (\"\\n\");\n for (char c : userMessage.toCharArray()) \n System.out.format(\"%3c\",c);\n System.out.format (\"\\n\");\n }", "private synchronized void display(Message msg) {\n\t\tSystem.out.println(msg.toString());\n\t\tguiConversation.append(msg.toString());\n\t}", "private void showMessage(final String text){\n\t\t\n\t\tSwingUtilities.invokeLater(\n\n\t\t\t\tnew Runnable () {\n\t\t\t\t\t//This is a thread to update the GUI.\n\t\t\t\t\t\n\t\t\tpublic void run () {\n\t\t\t\t//This is the method that gets called everytime the GUI needs to be updated.\n\t\t\t\t\n\t\t\t\tchatWindow.append(text);\n\t\t\t\t\n\t\t\t\t\n\t\t\t} \t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t);\n\t\t\n\t\t\n\t}", "public void showChat(){\n\t\tElement chatPanel = nifty.getScreen(\"hud\").findElementByName(\"chatPanel\");\n\t\tElement chatText = nifty.getScreen(\"hud\").findElementByName(\"chatText\");\n\t\tif(!chatPanel.isVisible()){\n\t\t\tchatPanel.startEffect(EffectEventId.onCustom);\n\t\t\tchatPanel.setVisible(true);\n\t\t}\n\t\tchatText.setFocus();\n\t}", "public void chatMsg(String msg)\n\t{\n\t\tchatArea.append(msg + \"\\n\");\n\t}", "private void display(String msg) {\n cg.append(msg + \"\\n\");\n }", "private void display(String msg) {\n\t\t\tif(clientGui == null)\n\t\t\t\tSystem.out.println(msg); \t// terminal\n\t\t\telse\n\t\t\t\tclientGui.append(msg + \"\\n\");\t// JTextArea\n\t}", "private void display(String msg) {\n\t\tString msgF = \"\\tClient- \" + msg + \"\\n\\n >> \";\n System.out.print(msgF);\n }", "private void PrintMessageOnTextChat(MessageWithTime message)\n\t{\n\t\tApplicationManager.textChat.write(message);\n\n\t}", "public void showChat() {\n eventView.setVisible(true);\n }", "public synchronized void displayMessage(String msg) {\n\t\tthis.commonTxtView.setText(msg);\n\n\t}", "public void doSendMsg() {\n FacesContext fctx = FacesContext.getCurrentInstance();\n HttpSession sess = (HttpSession) fctx.getExternalContext().getSession(false);\n SEHRMessagingListener chatHdl = (SEHRMessagingListener) sess.getAttribute(\"ChatHandler\");\n if (chatHdl.isSession()) {\n //TODO implement chat via sehr.xnet.DOMAIN.chat to all...\n if (room.equalsIgnoreCase(\"public\")) {\n //send public inside zone\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PUBLIC, moduleCtrl.getLocalZoneID(), -1, -1);\n } else {\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PRIVATE_USER, moduleCtrl.getLocalZoneID(), -1, curUserToChat.getUsrid());\n }\n this.text = \"\";\n }\n //return \"pm:vwChatRoom\";\n }", "private void displayMessage(String message){\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n windowForCommunication.append(message);\n }\n });\n }", "public void showMessage(){\n\t jsfMessageHelper.addInfo(\"Mesaj:\", (messageTxt==null?\"?\":messageTxt));\r\n\t}", "public void chat ( String message ) {\n\t\texecute ( handle -> handle.chat ( message ) );\n\t}", "private void displayMessage(String message) {\n TextView seeBoxReadMore = (TextView) findViewById(R.id.read_more1);\n seeBoxReadMore.setTextColor(Color.BLACK);\n seeBoxReadMore.setText(message);\n seeBoxReadMore.setGravity(Gravity.CENTER);\n }", "public void displayMessage(String message) {\r\n TextView messageView = (TextView) findViewById(R.id.message);\r\n messageView.setText(String.valueOf(message));\r\n }", "public void sendMessage()\r\n {\r\n MessageScreen messageScreen = new MessageScreen(_lastMessageSent);\r\n pushScreen(messageScreen);\r\n }", "@Override\n\tpublic void displayMessage(LinphoneCore lc, String message) {\n\t\t\n\t}", "public void run () {\n\t\t\t\t//This is the method that gets called everytime the GUI needs to be updated.\n\t\t\t\t\n\t\t\t\tchatWindow.append(text);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public void showMessage(String message);", "@Override\r\n\t\t\tpublic void onChat(String message) {\n\r\n\t\t\t}", "private void display(String msg) {\n\t\tif(cg == null)\n\t\t\tSystem.out.println(msg); // println for Console mode\n\t\telse\n\t\t\tcg.append(msg + \"\\n\"); // Append to, for example, JTextArea in the ClientGUI\n\t}", "private void displayMessage(String info) {\n \tif (message == null) {\n \t\tsetupMessage();\n \t}\n \tmessage.setLabel(info);\n\t\tadd(message, 6, 15);\n }", "public void sendMessage() {\n String userMessage = textMessage.getText();\n if (!userMessage.isBlank()) {//проверяю а есть ли что то в текстовом поле\n textMessage.clear();//очищаю текстовое поле на форме\n\n //пока оставлю\n //sb.append(userMessage).append(\"\\n\");\n\n //в общее поле добавляю сообщение\n areaMessage.appendText(userMessage+\"\\n\");\n }\n\n }", "private void ChatNachricht() {\n\t\t//Kein leerer Text\n\t\tif (this.chatSendenArea.getText() != null) {\n\t\t\ttry {\n\t\t\t\tserver.sendChatMessage(\"Spieler \" + this.spielerNummer + \":\"\n\t\t\t\t\t\t+ this.chatSendenArea.getText());\n\t\t\t\tthis.chatSendenArea.setText(\"\");\n\t\t\t} catch (RemoteException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@OnClick(R.id.enter_chat1)\n public void sendMessage() {\n if (getView() == null) {\n return;\n }\n EditText editText = getView().findViewById(R.id.chat_edit_text1);\n sendMessageBackend(editText.getText().toString(), utils.getChatUser());\n updateListAdapter();\n editText.setText(\"\");\n }", "private void serverDisplay(String message)\n {\n String timeStamp = dateFormat.format(new Date()) + \" \" + message;\n System.out.println(timeStamp);\n }", "public void sendChat(String message) {\n\t\tenqueue(\"PRIVMSG #\"+Executable.targetChannel+\" :imGlitch \"+message);\n\t}", "private void displayChatMessage() {\n ListView listOfMessage = (ListView) findViewById(R.id.list_of_messages);\n adapter = new FirebaseListAdapter<ChatMessage>(this, ChatMessage.class,\n R.layout.list_messages, FirebaseDatabase.getInstance().getReference()) {\n @Override\n protected void populateView(View v, ChatMessage model, int position) {\n\n TextView messageText,messageUser,messageTime;\n messageText = (TextView) v.findViewById(R.id.message_text);\n messageUser = (TextView) v.findViewById(R.id.message_user);\n messageTime = (TextView) v.findViewById(R.id.message_time);\n\n messageText.setText(model.getMessageText());\n messageUser.setText(model.getMessageUser());\n messageTime.setText(DateFormat.format(\"dd-MM-yyyy (HH:mm:ss)\",\n model.getMessageTime()));\n }\n };\n listOfMessage.setAdapter(adapter);\n }", "private void displayMessage(String text) {\n toggleProgress();\n userMessage.setVisibility(View.VISIBLE);\n userMessage.setText(text);\n }", "@Override\n public void receiveMessageChat(String author, String chatMessage, boolean single) {\n if (single) {\n messageOutput.appendText(\n author + \"(\" + RiskMain.getInstance().getDomain().getPlayerName() + \")\" + \": \");\n messageOutput.appendText(chatMessage + \"\\n\");\n } else {\n messageOutput.appendText(author + \"(all): \");\n messageOutput.appendText(chatMessage + \"\\n\");\n }\n }", "private void displayEvent(String msg) {\n //format the event with date and time before it\n String e = sdf.format(new Date()) + \" : \" + msg;\n //add the event to the chatList array\n chatList.add(e);\n //display newly formatted event in GUI\n mg.appendEvent(e + \"\\n\");\n }", "public void displayMessage(String message){\n\n\t\tElement mes = nifty.getScreen(\"hud\").findElementByName(\"MessagePanel\");\n\t\tmes.getRenderer(TextRenderer.class).setText(message);\n\t\tmes.startEffect(EffectEventId.onCustom);\n\t}", "private void viewMessage()\n {\n System.out.println( inbox );\n inbox = \"\";\n }", "public void messageReceived(String message) {\r\n\t\t// display incoming message to screen.\r\n\t\tthis.chatArea.append(message + \"\\n\");\r\n\t}", "public void DisplayMessage(String massage);", "public void sendChat(String message) {\r\n connection.chat(message);\r\n }", "public void displayMessage(String message){\n //Display a toast with the message we recieved\n displayMessage(message,Toast.LENGTH_LONG);\n }", "public void showMessage(String msg) {\n boardController.showMessage(msg);\n }", "public void println(String message) {\r\n chatFrame.println(message);\r\n }", "public void displayMessage(){\n //getCouseName obtém o nome do curso\n System.out.printf(\"Welcome to the grade book for \\n%s!\\n\\n\", getCouseName());\n }", "@Override\n\tpublic void doChat(LoginDetails loginDetails) {\n\tSystem.out.println(\"Boomer chat\");\t\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString text = getCurUser() + \" : \" + textField.getText();\n\t\t\t\ttextField.setText(\"\");\n\t\t\t\tfinal ChatMessage msg = new ChatMessage();\n\t\t\t\tmsg.setMessage(text);\n\t\t\t\tmainFrame.sendMessage(msg);\n\t\t\t\t\n\t\t\t}", "public void displayMessage(String message){\n gameState = GameState.MESSAGE;\n currentMessage = message;\n notifyObservers();\n currentMessage = \"\";\n }", "public void displayMessage(String message) {\n gameWindowController.showMessage(message);\n }", "public void updateView(String message) {\n output.setText(message);\n \n }", "@Override\r\n\t\tpublic void showMessage(String message) {\n\t\t\t\r\n\t\t}", "private void displayMessage22(String message) {\n TextView kiliVrReadMore = (TextView) findViewById(R.id.read_more22);\n kiliVrReadMore.setTextColor(Color.BLACK);\n kiliVrReadMore.setText(message);\n kiliVrReadMore.setGravity(Gravity.CENTER);\n }", "private void displayMessage23(String message) {\n TextView virtualBankReadMore = (TextView) findViewById(R.id.read_more23);\n virtualBankReadMore.setTextColor(Color.BLACK);\n virtualBankReadMore.setText(message);\n virtualBankReadMore.setGravity(Gravity.CENTER);\n }", "public void handleMessageAction(ActionEvent event) {\n if (action.getSelectedToggle() == sendMessage){\n sendPane.setVisible(true);\n reviewPane.setVisible(false);\n }\n else{ //action.getSelectedToggle() == reviewMessage\n sendPane.setVisible(false);\n reviewPane.setVisible(true);\n\n StringBuilder builder = new StringBuilder();\n\n for ( String i : messageController.getMessageForMe(this.sender)){\n builder.append(i).append(\"\\n\");\n }\n this.inbox.setText(String.valueOf(builder));\n\n }\n }", "public void setChatNachricht(String msg) {\n\t\tchatArea.append(msg);\n\t}", "private void sendMessage() {\n\t\tString text = myMessagePane.getText();\n\t\tMessage msg = new Message(text, myData.userName, myData.color);\n\n\t\tcommunicationsHandler.send(msg);\n\n\t\t// De-escape xml-specific characters\n\t\tXmlParser xmlParser = new XmlParser(myData);\n\t\tString outText = xmlParser.deEscapeXMLChars(msg.text);\n\t\tmsg.text = outText;\n\n\t\tmyMessagePane.setText(\"\");\n\t\tupdateMessageArea(msg);\n\n\t}", "@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tchat.append(s);\r\n\t\t\t\t\t}", "void showMessage(@NonNull BaseMessage message);", "public void writeMassege() {\n m = ChatClient.message;\n jtaChatHistory.setText(\"You : \" + m);\n //writeMassageServer();\n }", "public void showMessage(String message) \r\n\t\t{\t\t\t\r\n\t\t}", "private void displayMessage17(String message) {\n TextView pushCvReadMore = (TextView) findViewById(R.id.read_more17);\n pushCvReadMore.setTextColor(Color.BLACK);\n pushCvReadMore.setText(message);\n pushCvReadMore.setGravity(Gravity.CENTER);\n }", "public void clientToServerChatMessage(String message){\n String chatMessage = message;\n System.out.println(\"chatmessage\" + chatID + \" \" + chatMessage);\n toServer.println(\"chatmessage\" + chatID + \" \" + chatMessage);\n toServer.flush();\n }", "public void displayMessage(){//displayMessage body start\n\t\tSystem.out.printf(\"course name = %s\\n\", getCourseName());\n\t}", "private void displayMessage24(String message) {\n TextView smsghReadMore = (TextView) findViewById(R.id.read_more24);\n smsghReadMore.setTextColor(Color.BLACK);\n smsghReadMore.setText(message);\n smsghReadMore.setGravity(Gravity.CENTER);\n }", "private void displayMessage(String str) {\r\n JFrame window = new JFrame(\"Message\");\r\n window.setPreferredSize(new Dimension(1000, 500));\r\n window.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n window.setLayout(new BorderLayout(5, 5));\r\n\r\n JLabel msg = new JLabel(\"<html>\" + str + \"</html>\", SwingConstants.CENTER);\r\n msg.setPreferredSize(new Dimension(750, 250));\r\n msg.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n window.add(msg, BorderLayout.CENTER);\r\n window.pack();\r\n window.setVisible(true);\r\n window.setLocationRelativeTo(null);\r\n }", "@Override\n\tpublic void showMessage(String message) {\n\n\t}", "public void showMessages() {\n\t\tThread thread = new Thread(() -> {\r\n\t\t\ttry {\r\n\t\t\t\twhile (!isFinished) {\r\n\t\t\t\t\tbyte[] buffer = new byte[1000];\r\n\t\t\t\t\tDatagramPacket messageIn = new DatagramPacket(buffer, buffer.length, groupIp, port);\r\n\t\t\t\t\tmSocket.receive(messageIn);\r\n\t\t\t\t\tSystem.out.println(new String(messageIn.getData()).trim());\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tSystem.out.println(\"IO: \" + e.getMessage());\r\n\t\t\t}\r\n\t\t});\r\n\t\tthread.start();\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n chat.receiveMessage();\n }", "public void getChatMessage(String text) {\n\t\tint idplayer = gamecontroller.getPlayerController().getPlayerID();\n\t\tChatM.writeChatToDatabase(idplayer, text);\n\t}", "private static void displayMessage(String message) {\n\t\toutput.append(message);\n\t}", "void displayMessage(){\r\n Toast toast = Toast.makeText(this, getString(R.string.congratz_message, String.valueOf(playerScore)), Toast.LENGTH_SHORT);\r\n toast.show();\r\n }", "public void displayMessage(String text)\r\n {\r\n Message message = new Message();\r\n message.what = GUIManager.DISPLAY_INFO_TOAST;\r\n message.obj = text;\r\n mGUIManager.sendThreadSafeGUIMessage(message);\r\n }", "protected void displayMessage(String message) throws IOException {\n FXMLLoader fxmlLoader =\n new FXMLLoader(getClass().getResource(DISPLAY));\n Parent root = fxmlLoader.load();\n\n DisplayController displayController = fxmlLoader.getController();\n System.out.println(\"Messages: \");\n System.out.println(message + \"\\n\");\n displayController.setText(message);\n\n Stage stage = new Stage();\n stage.setScene(new Scene(root));\n stage.showAndWait();\n }", "private void displayMsg(Object o) {\n Message msg = ((Datapacket)o).getMsg();\n client.printMessage(msg);\n }", "void displayMessage(String message);", "private void displayMessage2(String message) {\n TextView boomersReadMore = (TextView) findViewById(R.id.read_more2);\n boomersReadMore.setTextColor(Color.BLACK);\n boomersReadMore.setText(message);\n boomersReadMore.setGravity(Gravity.CENTER);\n }", "private void displayMessage3(String message) {\n TextView iDropWaterReadMore = (TextView) findViewById(R.id.read_more3);\n iDropWaterReadMore.setTextColor(Color.BLACK);\n iDropWaterReadMore.setText(message);\n iDropWaterReadMore.setGravity(Gravity.CENTER);\n }", "private void displayMessage14(String message) {\n TextView ologaReadMore = (TextView) findViewById(R.id.read_more14);\n ologaReadMore.setTextColor(Color.BLACK);\n ologaReadMore.setText(message);\n ologaReadMore.setGravity(Gravity.CENTER);\n }", "private void sendMessage(String message){\n try{\n output.writeObject(nickname+\" : \" + message);\n output.flush();\n showMessage(\"\\n\"+nickname+\" : \" + message);\n }catch(IOException ioException){\n chatWindow.append(\"\\n Oops! Something went wrong!\");\n }\n }", "private void displayMessage6(String message) {\n TextView solarKoboReadMore = (TextView) findViewById(R.id.read_more6);\n solarKoboReadMore.setTextColor(Color.BLACK);\n solarKoboReadMore.setText(message);\n solarKoboReadMore.setGravity(Gravity.CENTER);\n }", "private void displayMessage9(String message) {\n TextView letiArtsReadMore = (TextView) findViewById(R.id.read_more9);\n letiArtsReadMore.setTextColor(Color.BLACK);\n letiArtsReadMore.setText(message);\n letiArtsReadMore.setGravity(Gravity.CENTER);\n }", "private void displayMessage12(String message) {\n TextView jokkoReadMore = (TextView) findViewById(R.id.read_more12);\n jokkoReadMore.setTextColor(Color.BLACK);\n jokkoReadMore.setText(message);\n jokkoReadMore.setGravity(Gravity.CENTER);\n }", "public static void displayMsg() {\n\t}", "private void displayMessage15(String message) {\n TextView gomywayReadMore = (TextView) findViewById(R.id.read_more15);\n gomywayReadMore.setTextColor(Color.BLACK);\n gomywayReadMore.setText(message);\n gomywayReadMore.setGravity(Gravity.CENTER);\n }", "public void showMessage(String msg) {\n\t\tif (message == null)\n\t\t\tcreateMessage(msg);\n\t\tremove(message);\n\t\tcreateMessage(msg);\n\t}", "private void displayMessage4(String message) {\n TextView vulaMobileReadMore = (TextView) findViewById(R.id.read_more4);\n vulaMobileReadMore.setTextColor(Color.BLACK);\n vulaMobileReadMore.setText(message);\n vulaMobileReadMore.setGravity(Gravity.CENTER);\n }", "private void sendTextMessage(String message) {\n if ( message == null || message.length() < 1 ) {\n return;\n }\n DateFormat localDateFormat = Constant.getServerDateFormat();\n Chat chat = new Chat(0,tournamentID,clubID,receiverID, selfID,self.getDisplayName(),\n Constant.MESSAGE_TYPE_TEXT,message,localDateFormat.format(new Date()));\n RequestAction actionPostChatText = new RequestAction() {\n @Override\n public void actOnPre() {\n et_message.setText(\"\");\n }\n\n @Override\n public void actOnPost(int responseCode, String response) {\n if ( responseCode == 201 ) {\n Log.d(TAG,\"Message sent successfully!\");\n }\n }\n };\n String url;\n if ( tournament != null ) { // tournament chat\n url = UrlHelper.urlChatByTournament(tournament.id,club.id);\n } else if ( club != null ) {// club chat\n url = UrlHelper.urlChatByClub(club.id);\n } else if ( receiver != null ) { // private chat\n url = UrlHelper.urlPrivateChat(receiver.getId());\n } else {\n Toast.makeText(getContext(), \"Unknown error!\", Toast.LENGTH_SHORT).show();\n Log.e(TAG,\"Unspecified chat type.\");\n return;\n }\n RequestHelper.sendPostRequest(url,chat.toJson(),actionPostChatText);\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tdisplayArea.append(messageToDisplay);\r\n\t\t\t\tdisplayArea.setCaretPosition(displayArea.getText().length());\t//把文本区域中的输入光标定位到文本区域中最后一个字符之后\r\n\t\t\t}", "public void render() {\n stroke(color(50, 50, 50));\n fill(color(50, 50, 50));\n rect(0, 0, getWidth(), getTopHeight());\n int tempX = this.x;\n int fontSize = 150 / (this.players.size() * 2);\n\n this.messages = new ArrayList();\n int count = 0;\n for (Player player : this.players) {\n\n StringBuilder bar = new StringBuilder();\n // max lives = 3\n bar.append(player.name() + \" \");\n for (int i=0; i<3; i++) {\n if (i < player.lives()) {\n bar.append('\\u25AE'); // http://jrgraphix.net/r/Unicode/?range=25A0-25FF\n } else {\n bar.append('\\u25AF');\n }\n }\n\n String message = bar.toString();\n messages.add(message);\n\n textAlign(LEFT);\n textFont(f, fontSize);\n fill(player.getColor());\n text(message, tempX, this.y);\n\n int newX = (int) textWidth(message) + 10;\n tempX += newX;\n count++;\n }\n }", "private void showMessage(String string) {\n\n }", "private void internalAddToChatWindow(String message) {\n jChatConvo.append(message + \"\\n\");\n }", "private void displayMessage8(String message) {\n TextView kytabuReadMore = (TextView) findViewById(R.id.read_more8);\n kytabuReadMore.setTextColor(Color.BLACK);\n kytabuReadMore.setText(message);\n kytabuReadMore.setGravity(Gravity.CENTER);\n }", "private void displayMessage(String message) {\n }", "private void displayMessage11(String message) {\n TextView setTicReadMore = (TextView) findViewById(R.id.read_more11);\n setTicReadMore.setTextColor(Color.BLACK);\n setTicReadMore.setText(message);\n setTicReadMore.setGravity(Gravity.CENTER);\n }", "private void txtMessageKeyReleased(java.awt.event.KeyEvent evt) {\n if (evt.getKeyCode() == KeyEvent.VK_ENTER) {\n if (!txtMessage.getText().isEmpty()) {\n String msg = txtMessage.getText();\n JLabel userchat = new JLabel();\n userchat.setText(\"Tôi: \" + msg);\n userchat.setForeground(Color.red);\n panelChat.add(userchat);\n txtMessage.setText(\"\");\n revalidate();\n\n client.send(new Message(\"privatechat\", user, msg, target));\n //cái này cái cũ nè\n// StyledDocument doc = txtMessageInfo.getStyledDocument();\n// SimpleAttributeSet right = new SimpleAttributeSet();\n// StyleConstants.setAlignment(right, StyleConstants.ALIGN_RIGHT);\n// Style style = txtMessageInfo.addStyle(null, null);\n// StyleConstants.setForeground(style, Color.red);\n// try {\n// String message = msg + \"\\n\";\n// int lenght = doc.getLength();\n// doc.insertString(lenght, message, style);\n// doc.setParagraphAttributes(lenght + 1, 1, right, false);\n// client.send(new Message(\"privatechat\", user, msg, target));\n// txtMessage.setText(\"\");\n// } catch (Exception e) {\n//\n// }\n }\n// if(!txtMessage.getText().isEmpty())\n// {\n// String msg = txtMessage.getText();\n// StyledDocument doc = txtMessageInfo.getStyledDocument();\n// SimpleAttributeSet right = new SimpleAttributeSet();\n// StyleConstants.setAlignment(right, StyleConstants.ALIGN_RIGHT);\n// Style style = txtMessageInfo.addStyle(null, null);\n// StyleConstants.setForeground(style, Color.MAGENTA);\n// String message = msg +\"\\n\";\n// int length = doc.getLength();\n// try {\n// doc.insertString(length, message, style);\n// doc.setParagraphAttributes(length+1, 1, right, false);\n// txtMessage.setText(\"\");\n// client.send(new Message(\"privatechat\", user, msg , target));\n//\n// } catch (BadLocationException ex) {\n// Logger.getLogger(PrivateChatFrame.class.getName()).log(Level.SEVERE, null, ex);\n// JOptionPane.showMessageDialog(rootPane, \"Loi: \"+ ex.toString());\n// }\n// \n//\n// }\n }\n }", "private void displayMessage10(String message) {\n TextView techRepReadMore = (TextView) findViewById(R.id.read_more10);\n techRepReadMore.setTextColor(Color.BLACK);\n techRepReadMore.setText(message);\n techRepReadMore.setGravity(Gravity.CENTER);\n }", "private void displayMessage18(String message) {\n TextView wecyclersReadMore = (TextView) findViewById(R.id.read_more18);\n wecyclersReadMore.setTextColor(Color.BLACK);\n wecyclersReadMore.setText(message);\n wecyclersReadMore.setGravity(Gravity.CENTER);\n }", "private Panel displayMessage(final MessageDTO msg) {\n\t\tFluidContainer container = new FluidContainer();\n\t\tRow row = new Row();\n\t\tcom.github.gwtbootstrap.client.ui.Column imageCol =\n\t\t new com.github.gwtbootstrap.client.ui.Column(3);\n\t\timageCol.add(getImagePanel(msg.getSender(), ValueType.MEDIUM_IMAGE_VALUE));\n\t\trow.add(imageCol);\n\n\t\tcom.github.gwtbootstrap.client.ui.Column messageCol =\n\t\t new com.github.gwtbootstrap.client.ui.Column(9);\n\t\tHTMLPanel messagePanel =\n\t\t new HTMLPanel(\"<span class='medium_text'>\" + basicDataFormatter.format(msg.getMessage(), ValueType.TEXT_VALUE) + \"</span>\");\n\t\tmessageCol.add(messagePanel);\n\t\trow.add(messageCol);\n\t\tcontainer.add(row);\n\n\t\tRow timeRow = new Row();\n\t\tcom.github.gwtbootstrap.client.ui.Column timeCol =\n\t\t new com.github.gwtbootstrap.client.ui.Column(4);\n\t\ttimeCol.setOffset(8);\n\t\tHTMLPanel timePanel =\n\t\t new HTMLPanel(\"<span class='tiny_text'>sent on \"\n\t\t + basicDataFormatter.format(msg.getTimeCreated(), ValueType.DATE_VALUE_SHORT)\n\t\t + \"</span>\");\n\t\ttimeCol.add(timePanel);\n\t\ttimeRow.add(timeCol);\n\t\tcontainer.add(timeRow);\n\t\treturn container;\n\t}", "private void displayMessage(Profile profile) {\r\n if (profile != null) {\r\n\r\n //get the data from the profile\r\n // textView.setText(profile.getName() + profile.getFirstName() + profile.getName());\r\n\r\n // userSessionManager.AddData(profile.getName(), \"\",\"fb\");\r\n // accessTokenTracker.stopTracking();\r\n // profileTracker.stopTracking();\r\n\r\n //take\r\n // Intent i = new Intent(getActivity(), MyProfileActivity.class);\r\n\r\n // startActivity(i);\r\n //((Activity) getActivity()).overridePendingTransition(0, 0);\r\n }\r\n }", "@FXML\n private void sendMessage(ActionEvent actionEvent) {\n String playerName = RiskMain.getInstance().getDomain().getPlayerName();\n System.out.println(messageInput.getText());\n String text = playerName + \": \" + messageInput.getText();\n if (RiskMain.getInstance().getDomain().isServer()) {\n this.serverInterface = RiskMain.getInstance().getDomain().getServer();\n this.serverInterface\n .sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n } else {\n this.clientPlayerInterface = RiskMain.getInstance().getDomain().getClient();\n this.clientPlayerInterface.sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n }\n }" ]
[ "0.7883767", "0.767305", "0.7605813", "0.7582188", "0.7480947", "0.74031043", "0.73919725", "0.7149336", "0.6975865", "0.69509333", "0.69473314", "0.6930127", "0.6883134", "0.6882473", "0.68638766", "0.6825371", "0.6814109", "0.6811334", "0.68101335", "0.68004143", "0.6781366", "0.6780938", "0.6772729", "0.67663825", "0.67562944", "0.67239803", "0.6694551", "0.6694481", "0.6694169", "0.66741383", "0.6669898", "0.66575676", "0.6643014", "0.66418576", "0.66415197", "0.6630591", "0.6623165", "0.662162", "0.65951514", "0.65881056", "0.65819967", "0.6571245", "0.6565983", "0.6562288", "0.6553475", "0.6540363", "0.6529684", "0.652611", "0.65077204", "0.6497403", "0.649285", "0.6492657", "0.6489142", "0.6482909", "0.64743245", "0.6463037", "0.6458187", "0.6457047", "0.6454444", "0.6453587", "0.6450039", "0.6446781", "0.64460176", "0.64426833", "0.64259946", "0.64235115", "0.64224374", "0.6421273", "0.64075303", "0.64042866", "0.6391076", "0.63850814", "0.63795507", "0.637952", "0.6375176", "0.6369921", "0.6368036", "0.6357831", "0.6357048", "0.6348617", "0.6348436", "0.6340002", "0.6338389", "0.6322923", "0.63215065", "0.6317926", "0.63175946", "0.63168246", "0.63131016", "0.63076997", "0.6303606", "0.6300831", "0.62946546", "0.6271969", "0.626999", "0.62491864", "0.6248076", "0.6245847", "0.6242531", "0.6242438" ]
0.76824987
1
Display the game result
public void gameOver() { gameResult = new GameResult(writer); String winnersName = ""; String resultList = ""; GamePlayer[] tempList = new GamePlayer[playerList.size()]; for (int i = 0; i < tempList.length; i++) { tempList[i] = playerList.get(i); } Arrays.sort(tempList); // Sort the players according to the scores int max = tempList[tempList.length - 1].getPlayerScore(); int position = 0; for (int i = tempList.length - 1; i >= 0; i--) { if (max == tempList[i].getPlayerScore()) { winnersName += tempList[i].getPlayerName() + "\t"; } resultList += "No." + (++position) + "\t" + tempList[i].getPlayerName() + "\t" + tempList[i].getPlayerScore() + "\n"; } gameResult.initialize(winnersName, resultList, roomNumber, gameRoom); frame.dispose(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showResult() {\n int i = 0;\n matchList.forEach(match -> match.proceed());\n for (Match match : matchList) {\n setTextInlabels(match.showTeamWithResult(), i);\n i++;\n }\n }", "public void showGameResult(GameMenu myGameMenu){\n //Anropa metoden för att kontrollera resultat av spelet\n gameResult(myGameMenu);\n if (Objects.equals(getMatchResult(), \"Oavgjort\")){\n System.out.println(\"Oavgjort! Du Gjorde Samma Val Som Datorn!\");\n System.out.println(\"Spelaren: \" + getPlayersResult() + \"\\nDatorn: \" + getComputersResult());\n }\n else if (Objects.equals(getMatchResult(),\"Vann\")){\n System.out.println(\"Du Vann! Bra Jobbat!\");\n System.out.println(\"Spelaren: \" + getPlayersResult() + \"\\nDatorn: \" + getComputersResult());\n }\n else if (Objects.equals(getMatchResult(),\"Förlorade\")){\n System.out.println(\"Tyvärr! Du Förlorade!\");\n System.out.println(\"Spelaren: \" + getPlayersResult() + \"\\nDatorn: \" + getComputersResult());\n }\n }", "public void printResults() {\n getUtl().getOutput().add(\"~~ Results ~~\\n\");\n for (int i = 0; i < getHeroes().size(); i++) {\n if (getHeroes().get(i).isDead()) {\n getUtl().getOutput().add(getHeroes().get(i).getName().\n toCharArray()[0] + \" dead\\n\");\n } else {\n getUtl().getOutput().add(getHeroes().get(i).getName().\n toCharArray()[0] + \" \"\n + getHeroes().get(i).getLevel() + \" \"\n + getHeroes().get(i).getXp() + \" \"\n + getHeroes().get(i).getHp() + \" \"\n + getHeroes().get(i).getPosX() + \" \"\n + getHeroes().get(i).getPosY() + \"\\n\");\n }\n }\n // Write output to given outputPath.\n getGameFileWriter().write(getUtl().getOutput());\n for (int i = 0; i < getUtl().getOutput().size(); i++) {\n // Write output to console as well.\n System.out.print(getUtl().getOutput().get(i));\n }\n }", "private void showGameScore() {\n System.out.println(messageProvider.provideMessage(\"score\"));\n System.out.println(settings.getPlayers().get(0).getScore()\n + \" vs \" + settings.getPlayers().get(1).getScore());\n }", "private void showFinalResults(){\r\n\r\n System.out.println(\"Player\\t\\t:\\t\\tPoints\");\r\n for(Player player : this.sortedPlayers){\r\n System.out.println(player.toString());\r\n }\r\n System.out.println();\r\n }", "public void printResult(int result) {\n String message = \"\";\n switch (result) {\n case BattleshipGame.RESULT_HIT:\n message = \"Hit!\";\n break;\n case BattleshipGame.RESULT_MISS:\n message = \"Miss!\";\n break;\n case BattleshipGame.RESULT_SUNK:\n message = \"Sink!\";\n break;\n default:\n message = \"Invalid move!\";\n }\n System.out.println(message);\n }", "private void announceRoundResult()\n {\n // Last actions of each player, to compare\n GameAction fpAction = firstPlayer.getLastAction();\n GameAction spAction = secondPlayer.getLastAction();\n\n // Display first IA game\n if (!hasHuman)\n {\n if (fpAction instanceof RockAction)\n {\n animateSelectedButton(firstPlayerRock, true);\n }\n else if (fpAction instanceof PaperAction)\n {\n animateSelectedButton(firstPlayerPaper, true);\n }\n else if (fpAction instanceof ScissorsAction)\n {\n animateSelectedButton(firstPlayerScissors, true);\n }\n }\n // Display second IA game\n if (spAction instanceof RockAction)\n {\n animateSelectedButton(secondPlayerRock, false);\n }\n else if (spAction instanceof PaperAction)\n {\n animateSelectedButton(secondPlayerPaper, false);\n }\n else if (spAction instanceof ScissorsAction)\n {\n animateSelectedButton(secondPlayerScissors, false);\n }\n\n\n // First player has played something ==> look at result\n if (firstPlayer.hasAlreadyPlayed())\n {\n switch (fpAction.versus(spAction))\n {\n case WIN:\n updateResultIcons(true, false);\n break;\n case DRAW:\n updateResultIcons(false, true);\n break;\n case LOSE:\n updateResultIcons(false, false);\n break;\n }\n }\n // First player didn't play ==> draw or loose\n else\n {\n // Draw\n if (!secondPlayer.hasAlreadyPlayed())\n {\n updateResultIcons(false, true);\n }\n // Lose\n else\n {\n updateResultIcons(false, false);\n }\n }\n }", "@Override\n public void display() {\n Game game = PiggysRevenge.getCurrentGame();\n int bricks = 0;\n House house = game.getHouse();\n if (game.getHouse().isCompleted()) {\n try {\n bricks = GameControl.calcNumberOfBricks(house.getLength(), house.getWidth(), house.getHeight(), house.getStories());\n } catch (GameControlException ex) {\n this.console.println(ex.getMessage());\n }\n } else {\n bricks = 0;\n }\n int turns = game.getTurns();\n boolean hasEaten = game.getPlayer().isHasEaten();\n boolean wolfKilled = game.isWolfKilled();\n int result = 0;\n try {\n result = GameControl.calcScore(bricks, turns, hasEaten, wolfKilled);\n } catch (GameControlException ex) {\n this.console.println(ex.getMessage());\n }\n if (result>0) {\n this.console.println(\"+\" + (bricks*10) + \" Points for building the house.\");\n this.console.println(\"-\" + (turns*10) + \" Points for the number of turns taken (\" + turns + \" turns).\");\n } else {\n this.console.println(\"You get no points if you do not build a house,\"\n + \"\\neat the roast beef, or kill the wolf.\");\n }\n if (hasEaten) {\n this.console.println(\"+1000 Points for eating roast beef.\");\n }\n if (wolfKilled) {\n this.console.println(\"+2000 Points for killing the wolf.\");\n }\n this.console.println(\"\\nYOUR SCORE IS: \" + result);\n\n if (gameOver) {\n HighScore[] highScores;\n\n File varTmpDir = new File(\"highscores.txt\");\n\n if (varTmpDir.exists()) {\n try (FileInputStream fips = new FileInputStream(\"highscores.txt\");\n ObjectInputStream input = new ObjectInputStream(fips);) {\n \n\n highScores = (HighScore[]) input.readObject();\n highScores[10] = new HighScore(game.getPlayer().getName(), result, house);\n\n for (int n = 0; n < highScores.length; n++) {\n for (int m = 0; m < highScores.length - 1 - n; m++) {\n if (highScores[m].getScore() < highScores[m + 1].getScore()\n || \"---\".equals(highScores[m].getName())) {\n HighScore swapHighScore = highScores[m];\n highScores[m] = highScores[m + 1];\n highScores[m + 1] = swapHighScore;\n }\n }\n }\n\n try (FileOutputStream fops = new FileOutputStream(\"highscores.txt\");\n ObjectOutputStream output = new ObjectOutputStream(fops);) {\n \n output.writeObject(highScores);\n this.console.println(\"Score saved successfully\");\n \n } catch (Exception e) {\n ErrorView.display(\"ScoreView\", e.getMessage());\n }\n } catch (Exception e) {\n ErrorView.display(\"ScoreView\", e.getMessage());\n }\n\n } else {\n try (FileOutputStream fops = new FileOutputStream(\"highscores.txt\");\n ObjectOutputStream output = new ObjectOutputStream(fops);) {\n \n\n highScores = new HighScore[11];\n for (int i = 0; i < highScores.length; i++){\n highScores[i] = new HighScore(\"---\", 0, new House(5, 5, 6, 1));\n \n }\n\n highScores[0] = new HighScore(game.getPlayer().getName(), result, house);\n output.writeObject(highScores);\n this.console.println(\"New highscore file created. Score saved successfully\");\n } catch (Exception e) {\n ErrorView.display(\"ScoreView\", e.getMessage());\n }\n\n }\n }\n }", "public static void printGame(){\n System.out.println(\"Spielrunde \" + GameController.AKTUELLE_RUNDE);\n System.out.println(GameController.AKTUELLER_SPIELER +\" ist an der Reihe.\");\n System.out.println(\"Er attackiert \" +\n GameController.AKTUELLER_VERTEIDIGER + \" und verursacht \"\n + GameController.SCHADEN +\" Schaden. \");\n System.out.println();\n }", "private void showResults() {\n if (!sent) {\n if(checkAnswerOne()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerTwo()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerThree()) {\n nbOfCorrectAnswers++;\n }\n if(checkAnswerFour()) {\n nbOfCorrectAnswers++;\n }\n\n showResultAsToast(nbOfCorrectAnswers);\n\n } else {\n showResultAsToast(nbOfCorrectAnswers);\n }\n }", "public void display() {\n io.writeLine(\"The correct answer is \" + rightAnswers.get(0));\n }", "private void displayResults() {\r\n\t\tGImage results;\r\n\t\tif(mehran == null ) {\r\n\t\t\tresults = new GImage(\"WinImage.png\");\r\n\t\t\tresults.scale(.7);\r\n\t\t} else {\r\n\t\t\tresults = new GImage(\"LoseImage.png\");\r\n\t\t\tresults.scale(1.5);\r\n\t\t}\r\n\t\tresults.setLocation((getWidth() - results.getWidth()) / 2.0, (getHeight() - results.getHeight()) / 2.0);\r\n\t\tadd(results);\r\n\t}", "public void displayResult(Dealer d) {\n if (d.getPlayer2ResultMap() != null) {\n\n controller.p1result.setText(String.format(\"%.2f\", controller.p1WinPercentage) + \"%\");\n controller.p2result.setText(String.format(\"%.2f\", controller.p2WinPercentage) + \"%\");\n controller.tielabel.setText(\"tie\");\n controller.tielabel.setTextFill(Color.BROWN);\n controller.tieresult.setText(String.format(\"%.2f\", controller.tiePercentage));\n controller.tieresult.setTextFill(Color.BROWN);\n if (controller.p1WinPercentage > controller.p2WinPercentage) {\n controller.p1result.setTextFill(Color.GREEN);\n controller.p2result.setTextFill(Color.RED);\n } else {\n controller.p1result.setTextFill(Color.RED);\n controller.p2result.setTextFill(Color.GREEN);\n }\n for (int i = 0; i < controller.p2ResultList.size(); i++) {\n controller.p2ResultList.get(i).setText(controller.p2Results[i]);\n }\n } else {\n for (int i = 0; i < controller.p2ResultList.size(); i++) {\n controller.p2ResultList.get(i).setText(\"\");\n }\n controller.p2result.setText(\"\");\n controller.tielabel.setText(\"\");\n controller.tieresult.setText(\"\");\n }\n\n for (int i = 0; i < controller.p1ResultList.size(); i++) {\n\n controller.p1ResultList.get(i).setText(controller.p1Results[i]);\n }\n controller.errorLabel.setText(\"\");\n }", "private void showResults() {\n\n AlertDialog.Builder builder1 = new AlertDialog.Builder(this);\n\n Collections.shuffle(selectedPlayers); // shuffle the players the user has selected\n\n StringBuilder sb = new StringBuilder(); // create a string builder to add numbers in front of the players' names\n for (int i = 0; i < selectedPlayers.size(); i++) {\n sb.append(String.valueOf(i + 1) + \". \" + selectedPlayers.get(i) + \"\\n\");\n }\n builder1.setTitle(\"Player order is\");\n String s = sb.toString();\n s = s.trim();\n builder1.setMessage(s);\n builder1.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n }\n });\n gong.stop();\n gong.start();\n builder1.show();\n }", "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 }", "public void displayGameState() {\n\t\tif (this.mazeData.getState().equals(\"quit\")) {\n\t\t\tSystem.out.println(\"Good bye!\");\n\t\t} else if (this.mazeData.getState().equals(\"goal found\")) {\n\t\t\tthis.mazeViewBuilder.updateCurrentPosition(this.mazeData.getCurrentPosition());\n\t\t\tString[] mazeDisplay = this.mazeViewBuilder.getMazeDisplay();\n\t\t\tthis.clearConsole();\n\t\t\tfor (int i = 0; i < mazeDisplay.length; i++) {\n\t\t\t\tSystem.out.println(mazeDisplay[i]);\n\t\t\t}\n\t\t\tSystem.out.println(\"Congratulation, you found the goal!\");\n\t\t} else {\n\t\t\tSystem.out.println(this.mazeData.getState());\n\t\t}\n\t}", "private void showStat() {\n\t\tSystem.out.println(\"=============================\");\n\t\tSystem.out.println(\"Your won! Congrates!\");\n\t\tSystem.out.println(\"The word is:\");\n\t\tSystem.out.println(\"->\\t\" + this.word.toString().replaceAll(\" \", \"\"));\n\t\tSystem.out.println(\"Your found the word with \" \n\t\t\t\t+ this.numOfWrongGuess + \" wrong guesses.\");\n\t}", "@Override\r\n public void printResult(IPlayer player1, IPlayer player2, int [] result){\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setTitle(\"End of the game!\");\r\n alert.setHeaderText(\"The game has ended.\");\r\n alert.setContentText(\"It was a draw..\");\r\n\r\n alert.showAndWait();\r\n }", "public void drawGameCompleteScreen() {\r\n PennDraw.clear();\r\n\r\n if (didPlayerWin()) {\r\n PennDraw.text(width / 2, height / 2, \"You Win!\");\r\n } else if (didPlayerLose()) {\r\n PennDraw.text(width / 2, height / 2, \"You have lost...\");\r\n }\r\n\r\n PennDraw.advance();\r\n }", "public void showResult(NimPlayer player1, NimPlayer player2) {\n String g1 = \"game\";\n String g2 = \"game\";\n\n // check the sigular\n if (player1.getWinTimes() >= 2) {\n g1 = \"games\";\n }\n if (player2.getWinTimes() >= 2) {\n g2 = \"games\";\n }\n System.out.println(player1.getName() + \" won \" +\n player1.getWinTimes() + \" \" + g1 + \" out of \" +\n player1.getTotalTimes() + \" played\");\n System.out.println(player2.getName() + \" won \" +\n player2.getWinTimes() + \" \" + g2 + \" out of \" +\n player2.getTotalTimes() + \" played\");\n }", "private void result(String result) {\n\n Log.d(LOG_TAG, \"result method\");\n setInfo(result + \"\\n НОВАЯ ИГРА\" + \"\\n побед первого игрока =\" + winsOfPlayerOne + \"\\n побед второго игрока:\" + winsOfPlayerTwo);\n enableAllButtons(false);\n startNewGame();\n Toast.makeText(this, \"Игра окончена\", Toast.LENGTH_LONG).show();\n\n }", "public void displayCorrect(){\n textPane1.setText(\"\");\r\n generatePlayerName();\r\n textPane1.setText(\"GOOD JOB! That was the correct answer.\\n\"\r\n + atBatPlayer + \" got a hit!\\n\" +\r\n \"Press Next Question, or hit ENTER, to continue.\");\r\n SWINGButton.setText(\"Next Question\");\r\n formattedTextField1.setText(\"\");\r\n formattedTextField1.setText(\"Score: \" + score);\r\n }", "public void displayResult(View view){\n countPoints();\n String quantity;\n String player;\n boolean checked = ((CheckBox) findViewById(R.id.nickname)).isChecked();\n\n if (checked == true) {\n player = \"Anonymous\";\n } else {\n player = ((EditText) findViewById(R.id.name)).getText().toString();\n }\n /*\n method to show toast message with result\n */\n if (points > 1) {\n quantity = \" points!\";\n } else {\n quantity = \" point!\";\n }\n Toast.makeText(FlagQuiz.this, player + \", your score is: \" + points + quantity, Toast.LENGTH_LONG).show();\n }", "public void displayResults() {\n\t\tcreateCluster();\n\t\tassignClusterID();\n\t\tSystem.out.println(iterations);\n\t\tWriter writer;\n\t\ttry {\n\t\t\twriter = new FileWriter(\"/Users/saikalyan/Documents/ClusterResult_kmeans.txt\");\n\t\t\tfor (int key : labelsMap.keySet()) {\n\t\t\t\tclusterResultsList.add(clusterIdMap.get(labelsMap.get(key)));\n\t\t\t\twriter.write(String.valueOf(clusterIdMap.get(labelsMap.get(key))));\n\t\t\t\twriter.write(\"\\r\\n\");\n\t\t\t\tSystem.out.println(key + \" : \" + clusterIdMap.get(labelsMap.get(key)));\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tExternalValidator extValidation = new ExternalValidator(count, groundTruthList, clusterResultsList);\n\n\t\tfloat res = extValidation.getCoefficient();\n\t\tSystem.out.println(\"Rand Index------------\" + res);\n\n\t\tfloat jaccard = extValidation.getJaccardCoeff();\n\t\tSystem.out.println(\"Jaccard co-efficient------------\" + jaccard);\n\n\t}", "private void showResult() {\n if (Utils.isKitkat()) TransitionManager.beginDelayedTransition(llBody);\n if (tvResult != null)\n flSceneFrame.removeView(tvResult);\n tvResult = new TextView(this);\n tvResult.setBackgroundColor(getResources().getColor(R.color.colorRedTranslucent));\n tvResult.setTextColor(getResources().getColor(android.R.color.white));\n tvResult.setText(selectedAnswer.getText());\n tvResult.setPadding(4, 4, 4, 4);\n FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n params.setMargins(utils.getQuadrantBasedX(ivScene, selectedAnswer.getRelativeCoordinateX()), utils.getQuadrantBasedY(ivScene, selectedAnswer.getRelativeCoordinateY()), 0, 0);\n flSceneFrame.addView(tvResult, params);\n btNext.setVisibility(View.VISIBLE);\n }", "private void printResults() {\n\t\tdouble percentCorrect = (double)(correctAnswers/numberAmt) * 100;\n\t\tSystem.out.println(\"Amount of number memorized: \" + numberAmt +\n\t\t\t\t \"\\n\" + \"Amount correctly answered: \" + correctAnswers +\n\t\t\t\t \"\\n\" + \"Percent correct: \" + (int)percentCorrect);\n\t}", "public void showResults(){\n customerCount = simulation.getCustomerCount();\n phoneCount = simulation.getPhoneCount();\n doorCount = simulation.getDoorCount();\n unhelpedCount = simulation.getUnhelped();\n totalCus.setText(\"Total number of Customers: \"+customerCount+\"\\t\\t\");\n doorCus.setText(\"Number of Door Customers: \"+doorCount+\"\\t\\t\");\n phoneCus.setText(\"Number of Phone Customers: \"+phoneCount+\"\\t\\t\");\n unhelped.setText(\"Number of Customers left unhelped at the end: \"+unhelpedCount);\n }", "private void display(){\n out.println(\"\\n-STOCK EXCHANGE-\");\n out.println(\"Apple - Share Price: \" + game.apple.getSharePrice() + \" [\" + game.apple.top() + \"]\");\n out.println(\"BP - Share Price: \" + game.bp.getSharePrice() + \" [\" + game.bp.top() + \"]\");\n out.println(\"Cisco - Share Price: \" + game.cisco.getSharePrice() + \" [\" + game.cisco.top() + \"]\");\n out.println(\"Dell - Share Price: \" + game.dell.getSharePrice() + \" [\" + game.dell.top() + \"]\");\n out.println(\"Ericsson - Share Price: \" + game.ericsson.getSharePrice() + \" [\" + game.ericsson.top() + \"]\");\n\n out.println(\"\\n-PLAYERS-\");\n// System.out.println(playerList.toString());\n for (Player e : playerList) {\n if (e.equals(player)) {\n out.println(e.toString() + \" (you)\");\n } else {\n out.println(e.toString());\n }\n }\n }", "public static void checkResult() {\n\t\tint sum = PlayerBean.PLAYERONE - PlayerBean.PLAYERTWO;\n\n\t\tif (sum == 1 || sum == -2) {\n\t\t\tScoreBean.addWin();\n\t\t\tresult = \"player one wins\";\n\t\t} else {\n\t\t\tScoreBean.addLoss();\n\t\t\tresult = \"player two wins\";\n\t\t}\n\t}", "public void display() {\n\t\tfor (int i = 0; i < player.length; ++i) {\n\t\t\t// inserting empty line in every 3 rows.\n\t\t\tif (i % 3 == 0 && i != 0) {\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t\tfor (int j = 0; j < player[i].length; ++j) {\n\t\t\t\t// inserting empty space in every 3 columns.\n\t\t\t\tif (j % 3 == 0 && j != 0) {\n\t\t\t\t\tSystem.out.print(' ');\n\t\t\t\t}\n\t\t\t\tif (problem[i][j] == 0 && player[i][j] == 0) {\n\t\t\t\t\tSystem.out.print(\"( )\");\n\t\t\t\t} else if (problem[i][j] == 0) {\n\t\t\t\t\tSystem.out.print(\"(\" + player[i][j] + \")\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.print(\"[\" + player[i][j] + \"]\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void display(String result);", "public abstract void displayResult(Result result);", "public void displayPlayerWinnings()\n {\n for(int card = 0; card < playerCardsWon; card++)\n {\n System.out.println(playerWinnings[card].toString());\n }\n }", "private void show() {\n System.out.println(\"...................................................................................................................................................................\");\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n for(int i = 0; i < players.size(); i++) {\n if (state.getTurn() == i) {\n System.out.print(Color.PURPLE.getPrintColor());\n System.out.print((i+1) + \"- \" + players.get(i).toString());\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n }\n else {\n System.out.print(Color.CYAN.getPrintColor());\n System.out.print((i+1) + \"- \" + players.get(i).toString());\n System.out.print(Color.RESET.getPrintColor() + \"║\");\n }\n }\n System.out.println();\n System.out.print(\"Direction: \");\n if (state.getDirection() == +1) {\n System.out.println(Color.PURPLE.getPrintColor() + \"clockwise ↻\");\n }\n else {\n System.out.println(Color.PURPLE.getPrintColor() + \"anticlockwise ↺\");\n }\n System.out.println(Color.RESET.getPrintColor() + \"Turn: \" + Color.PURPLE.getPrintColor() + players.get(state.getTurn()).getName() + Color.RESET.getPrintColor());\n System.out.println(currentCard.currToString());\n if (controls.get(state.getTurn()) instanceof PcControl) {\n System.out.print(players.get(state.getTurn()).backHandToString() + Color.RESET.getPrintColor());\n }\n else {\n System.out.print(players.get(state.getTurn()).handToString() + Color.RESET.getPrintColor());\n }\n }", "private void showMatch() {\n System.out.println(\"Player 1\");\n game.getOne().getField().showField();\n System.out.println(\"Player 2\");\n game.getTwo().getField().showField();\n }", "public void returnResult() {\n\t\tSystem.out.printf(\"Result of your Numbers are: %d\", result());\n\t}", "public void displayComputerWinnings()\n {\n for(int card = 0; card < computerCardsWon; card++)\n {\n System.out.println(compWinnings[card].toString());\n }\n }", "protected abstract void displayEndMsg(int resultGame);", "@Override\n\tpublic String toString(){\n\t\tString game;\n\t\t\n\t\tgame=this.currentBoard.toString();\n\t\tgame=game+\"best value: \"+this.currentRules.getWinValue(currentBoard)+\" Score: \"+this.points+\"\\n\";\n\t\t\n\t\tif(currentRules.win(currentBoard)){\n\t\t\tgame=game+\"Well done!\\n\";\n\t\t\tfinish=true;\n\t\t}\n\t\telse if(currentRules.lose(currentBoard)){\n\t\t\tgame=game+\"Game over.\\n\";\n\t\t\tfinish=true;\n\t\t}\n\t\t\n\t\treturn game;\n\t}", "public void showScore()\n {\n showText(\"Score:\" + score,550,50);\n }", "public void displayGameInstructions(){\n // System.out.println(\"============\");\n // System.out.println(\" _ | _ | _ \");\n // System.out.println(\"============\");\n // System.out.println(\" _ | _ | _ \");\n\n }", "private void printScore() {\r\n View.print(score);\r\n }", "private void displayOnResult(String title, String message, Integer gifImage, int whoWon){\n\n switch (whoWon){\n case 1:{\n TextView textView = (TextView) mScoreGrid.getChildAt(3);\n scorePlayer1++;\n textView.setText(String.valueOf(scorePlayer1));\n break;\n }\n case 2:{\n TextView textView = (TextView) mScoreGrid.getChildAt(4);\n scorePlayer2++;\n textView.setText(String.valueOf(scorePlayer2));\n break;\n }\n case 0:\n default:{\n TextView textView = (TextView) mScoreGrid.getChildAt(5);\n scoreDraw++;\n textView.setText(String.valueOf(scoreDraw));\n break;\n }\n }\n\n new MaterialDialog.Builder(this)\n .setTitle(title)\n .setMessage(message)\n .setCancelable(false)\n .setPositiveButton(\"Okay\", R.drawable.ic_baseline_download_done_24, new MaterialDialog.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int which) {\n dialogInterface.dismiss();\n resetEverything();\n }\n })\n .setNegativeButton(\"Exit\", R.drawable.ic_baseline_cancel_24, new MaterialDialog.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int which) {\n dialogInterface.dismiss();\n finish();\n }\n })\n .setAnimation(gifImage)\n .build().show();\n }", "private void show() {\n System.out.println(team.toString());\n }", "public String getGameResults(){\n \treturn this.gameResults;\n }", "public void displayResults() {\r\n Preferences.debug(\" ******* FitMultiExponential ********* \\n\\n\", Preferences.DEBUG_ALGORITHM);\r\n dumpTestResults();\r\n }", "public void display_game_over_text () {\n\n fill(150, 100);\n rect(0, 0, displayW, displayH);\n\n textFont(myFont);\n textAlign(CENTER);\n textSize(displayH/20);\n fill(255);\n text(\"Game Over\", displayW/2, 3*displayH/7);\n\n if (score.winnerName == \"Pacmax\") {\n text(\"Winner is Pacmax! Your score is \" + score.score, displayW/2, 4*displayH/7);\n } else {\n text(\"Winner is Blinky!\", displayW/2, 4*displayH/7);\n }\n\n mySound.play_game_over_song();\n\n isKeyInputAllowed = false;\n }", "public void Print() {\r\n\t\tfor(Cell2048[] a : game) {\r\n\t\t\tfor(Cell2048 b : a) {\r\n\t\t\t\tSystem.out.print(b.getValue() + \" \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\tSystem.out.println(\"score : \"+ score);\r\n\t}", "public void calculateResult() {\n\t\tfor (GameEngineCallback callback : callbacks) {\n\t\t\t// Roll for house\n\t\t\tthis.rollHouse(INITIAL_DELAY, FINAL_DELAY, DELAY_INCREMENT);\n\t\t\t\n\t\t\tfor (Player player : this.players.values()) {\n\t\t\t\t// Players who are playing must have a bet and a score\n\t\t\t\t// This conditional may not be required in Assignment 2\n\t\t\t\tif (player.getBet() > 0 && player.getRollResult()\n\t\t\t\t\t\t.getTotalScore() > 0) {\n\t\t\t\t\t// Compare rolls, set result and add/subtract points\n\t\t\t\t\tif (this.houseDice.getTotalScore() > player.\n\t\t\t\t\t\t\tgetRollResult().getTotalScore()) {\n\t\t\t\t\t\tGameStatus status = GameEngine.GameStatus.LOST;\t\t\t\t\t\n\t\t\t\t\t\tplayer.setGameResult(status);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Subtract bet from player points\n\t\t\t\t\t\tint points = player.getPoints() - player.getBet();\n\t\t\t\t\t\tthis.setPlayerPoints(player, points);\n\t\t\t\t\t}\n\t\t\t\t\telse if (houseDice.getTotalScore() == player.\n\t\t\t\t\t\t\tgetRollResult().getTotalScore()) {\n\t\t\t\t\t\tGameStatus status = GameEngine.GameStatus.DREW;\t\t\t\t\t\n\t\t\t\t\t\tplayer.setGameResult(status);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// No change to points on a draw\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tGameStatus status = GameEngine.GameStatus.WON;\t\t\t\t\t\n\t\t\t\t\t\tplayer.setGameResult(status);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Add bet to player points\n\t\t\t\t\t\tint points = player.getPoints() + player.getBet();\n\t\t\t\t\t\tthis.setPlayerPoints(player, points);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Display result\n\t\t\t\t\tcallback.gameResult(this.getPlayer(player.getPlayerId()), \n\t\t\t\t\t\t\tthis.getPlayer(player.getPlayerId()).getGameResult(), this);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void doMatch() {\n // Remember how many games in this session\n mGameCounter++;\n\n PebbleDictionary resultDict = new PebbleDictionary();\n\n switch (mChoice) {\n case Keys.CHOICE_ROCK:\n switch(mP2Choice) {\n case Keys.CHOICE_ROCK:\n mInstructionView.setText(\"It's a tie!\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_TIE);\n break;\n case Keys.CHOICE_PAPER:\n mInstructionView.setText(\"You lose!\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_WIN); // Inform Pebble of opposite result\n break;\n case Keys.CHOICE_SCISSORS:\n mWinCounter++;\n mInstructionView.setText(\"You win! (\" + mWinCounter + \" of \" + mGameCounter + \")\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_LOSE);\n break;\n }\n break;\n case Keys.CHOICE_PAPER:\n switch(mP2Choice) {\n case Keys.CHOICE_ROCK:\n mWinCounter++;\n mInstructionView.setText(\"You win! (\" + mWinCounter + \" of \" + mGameCounter + \")\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_LOSE);\n break;\n case Keys.CHOICE_PAPER:\n mInstructionView.setText(\"It's a tie!\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_TIE);\n break;\n case Keys.CHOICE_SCISSORS:\n mInstructionView.setText(\"You lose!\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_WIN);\n break;\n }\n break;\n case Keys.CHOICE_SCISSORS:\n switch(mP2Choice) {\n case Keys.CHOICE_ROCK:\n mInstructionView.setText(\"You lose!\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_WIN);\n break;\n case Keys.CHOICE_PAPER:\n mWinCounter++;\n mInstructionView.setText(\"You win! (\" + mWinCounter + \" of \" + mGameCounter + \")\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_LOSE);\n break;\n case Keys.CHOICE_SCISSORS:\n mInstructionView.setText(\"It's a tie!\");\n resultDict.addInt32(Keys.KEY_RESULT, Keys.RESULT_TIE);\n break;\n }\n break;\n }\n\n // Inform Pebble of result\n PebbleKit.sendDataToPebble(getApplicationContext(), APP_UUID, resultDict);\n\n // Finally reset both\n mChoice = Keys.CHOICE_WAITING;\n mP2Choice = Keys.CHOICE_WAITING;\n\n // Leave announcement for 5 seconds\n mHandler.postDelayed(new Runnable() {\n\n @Override\n public void run() {\n updateUI();\n }\n\n }, 5000);\n }", "public void displayRoundScore() {\n\n System.out.println(\"Round stats: \");\n System.out.println(\"Par: \" + parTotal);\n System.out.println(\"Strokes: \" + strokesTotal);\n\n if(strokesTotal > parTotal) {\n System.out.println(strokesTotal-parTotal + \" over par\\n\");\n } \n else if (strokesTotal < parTotal) {\n System.out.println(parTotal-strokesTotal + \" under par\\n\");\n }\n else {\n System.out.println(\"Making par\\n\");\n }\n }", "private void displayGameHeader()\n {\n System.out.println(\"########Welcome to Formula 9131 Championship########\");\n }", "private void playGame() {\n\t\t\n\t\t/* take 1$ from the wallet to play game */\n\t\tsetWallet(-1);\n\t\t\n\t\t/* generate 3 random slots */\n\t\tslot1 = getSlot();\n\t\tslot2 = getSlot();\n\t\tslot3 = getSlot();\n\t\tslotBox1 = getSlotBox(slot1);\n\t\tslotBox2 = getSlotBox(slot2);\n\t\tslotBox3 = getSlotBox(slot3);\n\t\t\n\t\t/* draw slots on the screen and compute result*/\n\t\tadd(slotBox1, 100, 100);\n\t\tadd(slotBox2, 250, 100);\n\t\tadd(slotBox3, 400, 100);\n\t\t\n\t\tString result = gameOutcome(slot1, slot2, slot3);\n\t\ttopText = new GLabel(result);\n\t\tmidText = new GLabel(\"You now have \" + getWallet() + \"$.\");\n\t\tbotText = new GLabel(\"Click to play\");\n\t\ttopText.setFont(\"Serif-24\");\n\t\tmidText.setFont(\"Serif-24\");\n\t\tbotText.setFont(\"Serif-24\");\n\t\tadd(topText, 100, 250);\n\t\tadd(midText, 100, 280);\n\t\tadd(botText, 100, 310);\n\n\t}", "public void displayResults(ExperimentGameResultViewModel viewModel) {\n mNameIconView.setDescription(viewModel.gameName);\n mTypeIconView.setDescription(viewModel.gameType);\n mActualTimeIconView.setDescription(String.valueOf(viewModel.gameActualTime));\n mEstimatedTimeIconView.setDescription(String.valueOf(viewModel.gameEstimatedTime));\n mWasInterruptedIconView.setDescription(viewModel.wasInterrupted ? getStringByResourceId(R.string.yes) : getStringByResourceId(R.string.no));\n if (viewModel.customJsonInfo != null && !viewModel.customJsonInfo.isEmpty()) {\n mAdditionalInfoIconView.setVisibility(View.VISIBLE);\n mAdditionalInfoIconView.setDescription(viewModel.customJsonInfo);\n } else {\n mAdditionalInfoIconView.setVisibility(View.GONE);\n }\n }", "public void print()\n\t{\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t\tSystem.out.println(\"[Lives: \" + lives + \"][Score: \" + score + \n\t\t\t\t\t\t\t\"][Time: \" + gameTime + \"]\");\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t}else\n\t\t\tSystem.out.println(\"Spawn a player ship to view game info\");\n\t}", "public String printResults(Athletes competitor, Game gam){\n\t\tAthletes winner1 = gam.getWinner1();\n\t\tAthletes winner2 = gam.getWinner2();\n\t\tAthletes winner3 = gam.getWinner3();\n\t\t\n\t\t\t\tif(competitor == winner1){\n\t\t\t\t\tString data = (String.format(\n\t\t\t\t\t\t\t\"ID: %-15s \\t Name: %-25s \\t Time: %-4d seconds \\t Points earned: 5\", competitor.getID(),\n\t\t\t\t\t\t\tcompetitor.getName(), competitor.getTime()));\n\t\t\t\t\treturn data;\n\t\t\t\t}else if(competitor == winner2){\n\t\t\t\t\tString data = (String.format(\n\t\t\t\t\t\t\t\"ID: %-15s \\t Name: %-25s \\t Time: %-4d seconds \\t Points earned: 3\", competitor.getID(),\n\t\t\t\t\t\t\tcompetitor.getName(), competitor.getTime()));\n\t\t\t\t\treturn data;\n\t\t\t\t}else if(competitor == winner3){\n\t\t\t\t\tString data = (String.format(\n\t\t\t\t\t\t\t\"ID: %-15s \\t Name: %-25s \\t Time: %-4d seconds \\t Points earned: 1\", competitor.getID(),\n\t\t\t\t\t\t\tcompetitor.getName(), competitor.getTime()));\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\t\tString data = (String.format(\n\t\t\t\t\t\t\t\"ID: %-15s \\t Name: %-25s \\t Time: %-4d seconds \\t Points earned: 0\", competitor.getID(),\n\t\t\t\t\t\t\tcompetitor.getName(), competitor.getTime()));\n\t\t\t\t\treturn data;\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "private void setResultsDisplay(double score) {\n TextView resultsTextView = (TextView) findViewById(R.id.results_text_view);\n String letterGrade = getLetterGrade(score);\n resultsTextView.setText(\"Your Grade: \" + letterGrade);\n }", "public void displayGame()\n { \n System.out.println(\"\\n-------------------------------------------\\n\");\n for(int i=3;i>=0;i--)\n {\n if(foundationPile[i].isEmpty())\n System.out.println(\"[ ]\");\n else System.out.println(foundationPile[i].peek());\n }\n System.out.println();\n for(int i=6;i>=0;i--)\n {\n for(int j=0;j<tableauHidden[i].size();j++)\n System.out.print(\"X\");\n System.out.println(tableauVisible[i]);\n }\n System.out.println();\n if(waste.isEmpty())\n System.out.println(\"[ ]\");\n else System.out.println(waste.peek());\n if(deck.isEmpty())\n System.out.println(\"[O]\");\n else System.out.println(\"[X]\");\n }", "public void finalResult() {\n ConnectionSockets.getInstance().sendMessage(Integer.toString(points)+\"\\n\");\n System.out.println(\"escreveu para o oponente\");\n opponentPoints = Integer.parseInt(ConnectionSockets.getInstance().receiveMessage());\n System.out.println(\"leu do oponente\");\n if(points != opponentPoints) {\n if (points > opponentPoints) {// Won\n MatchController.getInstance().getSets().add(1);\n MatchController.getInstance().increaseSet();\n } else { //Lost\n MatchController.getInstance().getSets().add(0);\n MatchController.getInstance().increaseSet();\n }\n }\n }", "public static void results(int numGames, int totalGuesses, int bestGame) {\r\n System.out.println(\"Overall results:\");\r\n System.out.println(\" total games = \" + numGames);\r\n System.out.println(\" total guesses = \" + totalGuesses);\r\n System.out.println(\" guesses/game = \" + round1((double) totalGuesses / numGames));\r\n System.out.println(\" best game = \" + bestGame); \r\n }", "public void printAllResults(){\n String round = \"Rounds: \\t\\t\";\n String team1 = fight_list.get(0).t1.name + \"\\t\\t\"; //note: We assume that all the FightResults in 1 DataBag all have the same 2 teams. Gotta write that better later.\n String team2 = fight_list.get(0).t2.name + \"\\t\\t\";\n\n for(FightResult fig : this.fight_list){\n round += fig.final_round + \"\\t\";\n team1 += fig.t1_deaths + \"\\t\";\n team2 += fig.t2_deaths + \"\\t\";\n }\n\n System.out.println(round);\n System.out.println(team1);\n System.out.println(team2);\n\n //System.out.println(\"\\n--------\\n\");\n }", "private void resultsScreen(Stage stage, String[][] leaderboard) {\n\t\t\n\t\t//A HBox is prepared, with an int to determine spacing between the nodes within it later.\n\t\tHBox h = new HBox(30);\n\t\t\n\t\t//A VBox array of length 3 is prepared, as well as a Label array, with three values given\n\t\t//to it immediately. \n\t\tVBox[] v = new VBox[3];\n\t\tLabel[] title = {new Label(\"Name\"), new Label(\"Incorrect Guesses\"), new Label(\"Time\")};\n\t\t\n\t\t//A separate VBox is prepared.\n\t\tVBox v2;\n\t\t\n\t\t//For loop adding all the names from the leaderboard array into one VBox, then\n\t\t//adding all the incorrectGuesses to a second VBox, then adding all the times\n\t\t//to the third VBox. By doing it this way, names and scores are much more better\n\t\t//aligned as columns than if each player and their scores were put into HBoxes.\n\t\tfor(int i = 0; i < 3; i++) {\n\t\t\tv[i] = new VBox();\n\t\t\tv[i].getChildren().add(title[i]);\n\t\t\t\n\t\t\tfor(int j = 0; j < 3; j++) {\n\t\t\t\tLabel l = new Label(leaderboard[j][i]);\n\t\t\t\tv[i].getChildren().add(l);\n\t\t\t}\n\t\t\th.getChildren().add(v[i]);\n\t\t}\n\t\t\n\t\th.setAlignment(Pos.BASELINE_CENTER);\n\t\t\n\t\t//A label is now created and put into the second VBox, along with the HBox just created.\n\t\t//This results in the statement being placed below the entire leaderboard without issues.\n\t\tLabel endStatement = new Label(\"Press any key to start a new game or escape to exit.\");\n\t\tendStatement.setWrapText(true);\n\t\tendStatement.setPrefWidth(200);\n\t\tendStatement.setMinWidth(200);\n\t\tendStatement.setMaxWidth(200);\n\n\t\tv2 = new VBox(2,h,endStatement);\n\t\tv2.setAlignment(Pos.TOP_CENTER);\n\t\tgroup = new Group(v2);\n\t\t\n\t\tscene = new Scene(group,300,300,Color.LIGHTGREY);\n\t\tstage.setScene(scene);\n\t\tstage.setResizable(false);\n\t\tstage.setTitle(\"Hangman\");\n\t\tstage.show();\n\t\t\n\t\tscene.setOnKeyReleased(new EventHandler<KeyEvent>() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void handle(KeyEvent e) {\n\t\t\t\t\n\t\t\t\tif(e.getCode()==KeyCode.ESCAPE) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tclient.close();\n\t\t\t\t\t}catch(IOException ioe) {\n\t\t\t\t\t}\n\t\t\t\t\tstage.close();\n\t\t\t\t}else {\n\t\t\t\t\tstart(stage);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public static void showResualt() throws InterruptedException\n {\n for (int i = 0; i < allScores.length; i++) {\n System.out.println(allScores[i]);\n }\n JOptionPane.showMessageDialog(new JFrame(), allScores, \"Champions league Finished : \" , JOptionPane.INFORMATION_MESSAGE);\n }", "void computeResult() {\n // Get the winner (null if draw).\n roundWinner = compareTopCards();\n\n\n if (roundWinner == null) {\n logger.log(\"Round winner: Draw\");\n logger.log(divider);\n // Increment statistic.\n numDraws++;\n\n } else {\n logger.log(\"Round winner: \" + roundWinner.getName());\n\t logger.log(divider);\n this.gameWinner = roundWinner;\n if (roundWinner.getIsHuman()) {\n // Increment statistic.\n humanWonRounds++;\n }\n }\n\n setGameState(GameState.ROUND_RESULT_COMPUTED);\n }", "public static void display(){\n\tfor(int j=0;j<3;j++){\r\n\t\tfor(int k=0;k<3;k++){\r\n\t\t\tif(gamebd[j][k]==1)\r\n\t\t\tSystem.out.print(\"X \");\r\n\t\t\telse if(gamebd[j][k]==2)\r\n\t\t\t\tSystem.out.print(\"O \");\t\r\n\t\t\telse\r\n\t\t\t\tSystem.out.print(\"- \");\r\n\t\t}\r\n\tSystem.out.println();\r\n\t\t}\r\n}", "public void printResults(){\n\t\tSystem.out.println(\"The area of the triangle is \" + findArea());\n\t\tSystem.out.println(\"The perimeter of the triangle is \"+ findPerimeter());}", "@Override\n public String displayGameBoard(int stage) {\n String out=\"\";\n switch(stage) {\n case 0:\n out = \"Initial State: \";\n for (int i = 0; i < this.squareCount; i++) {\n out = out.concat(this.mySquares[i].statusSquare());\n }\n break;\n case 1:\n out = String.format(\"%s rolls %d:\", this.currentPlayer.getName(), this.numSquares);\n for (int i = 0; i < this.squareCount; i++) {\n out = out.concat(this.mySquares[i].statusSquare());\n }\n break;\n case 2:\n out = \"Final State: \";\n for (int i = 0; i < this.squareCount; i++) {\n out = out.concat(this.mySquares[i].statusSquare());\n }\n break;\n case 3:\n out = String.format(\"%s wins!\",this.currentPlayer.getName());\n break;\n }\n return(out);\n }", "public static void display(String result){\n\t\tresults.setText(result);\n\t}", "public boolean ShowStats(){\n if(!determineValid()){\n Main.errorNumber = WrongNumber;\n return false;\n }\n labelNames();\n groupDisplay.setText(\"\");\n groupDisplay.setText(groupDisplay.getText() + displayArray(racers.get(group.get(0))));\n\n for(int i = 1; i < group.size(); ++i){\n groupDisplay.setText(groupDisplay.getText() + \"\\n\\n\" + displayArray(racers.get(group.get(i))));\n\n }\n\n return true; //success\n }", "protected void runGame() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tthis.getRndWord(filePosition);\n\t\twhile((! this.word.isFinished()) && (this.numOfWrongGuess <= this.allowance)) {\n\t\t\tthis.showInfo();\n\t\t\tthis.tryGuess(this.getGuessLetter(sc));\n\t\t}\n\t\tif (this.word.isFinished()) {\n\t\t\tthis.showStat();\n\t\t}else {\n\t\t\tthis.showFacts();\n\t\t}\n\t\tsc.close();\n\n\n\t}", "@Override\n public void show(ResultComponent results) throws TrecEvalOOException {\n System.out.println(\"************************************************\");\n System.out.println(\"*************** Topic \" + topicId + \" output ****************\");\n System.out.println(\"************************************************\");\n\n if (results.getType() == ResultComponent.Type.GENERAL) {\n\n for (ResultComponent runResult : results.getResults()) {\n\n List<Result> resultList = runResult.getResultsByIdTopic(topicId);\n\n System.out.println(\"\\nResults for run: \" + runResult.getRunName());\n if (resultList.isEmpty()) {\n System.out.println(\"No results for topic \" + topicId);\n }\n\n for (Result result : resultList) {\n System.out.print(result.toString());\n }\n }\n }\n }", "public void dispEasy()\r\n {\r\n //Null block of code was original display method; keeping just in case\r\n \r\n /* switch (Win)\r\n {\r\n case 1: \r\n case 2: \r\n case 3: JOptionPane.showMessageDialog(null, \r\n \"It's a tie!\",\r\n \"digiRPS - Results\",\r\n JOptionPane.INFORMATION_MESSAGE);\r\n break;\r\n case 4: \r\n case 5: \r\n case 6: JOptionPane.showMessageDialog(null, \r\n userName + \" won!\",\r\n \"digiRPS - Results\",\r\n JOptionPane.INFORMATION_MESSAGE);\r\n break;\r\n case 7: \r\n case 8: \r\n case 9: JOptionPane.showMessageDialog(null, \r\n \"Computer won!\",\r\n \"digiRPS - Results\",\r\n JOptionPane.INFORMATION_MESSAGE);\r\n break;\r\n }\r\n */\r\n }", "public void endGame(){\n\t\tString gameSummary = thisGame.getGameSummary(humanType);\n\t\tSystem.out.println(gameSummary);\n\t}", "private void showInfo() {\n\t\tSystem.out.println(\"=============================\");\n\t\tSystem.out.println(\"Guess a letter:\\n\" + this.word);\n\t\tSystem.out.println(\"You have made \" \n\t\t\t\t+ this.numOfWrongGuess + \" wrong guesses.\");\n\t\tSystem.out.println(\"You will lose the game if you make more than \"\n\t\t\t\t+ this.allowance + \" wrong guesses.\");\n\t\tSystem.out.println(\"The already guessed wrong letters are:\");\n\t\tSystem.out.println(this.wrongLetters);\n\t\tSystem.out.println(\"-----------------------------\");\n\t}", "public void decideResult() {\n\t\t\n\t\tif (mUser.getHandValue() < 22 && mUser.getHandValue() > mDealer.getHandValue()) {\n\t\t\tmResult = \"win\";\n\t\t}else if(mUser.getHandValue() < 22 && mUser.getHandValue() == mDealer.getHandValue()) {\n\t\t\tmResult = \"draw\";\n\t\t}else {\n\t\t\tmResult = \"lose\";\n\t\t}\n\t\t\n\t}", "private void showGameOver()\n {\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n //Todo:\n // step 1. get the winner name using game.getWinner()\n // step 2. put the string player.getName()+\" won the game!\" to the string reference called \"result\"\n Player winner = game.getWinner();\n String result = winner.getName() + \" won the game!\";\n\n // pass the string referred by \"result\" to make an alert window\n // check the bottom of page 9 of the PA description for the appearance of this alert window\n Alert alert = new Alert(AlertType.CONFIRMATION, result, ButtonType.YES, ButtonType.NO);\n alert.showAndWait();\n if (alert.getResult() == ButtonType.YES)\n {\n Platform.exit();\n }\n }\n });\n }", "private static void printBoard() {\n\n\t//\tJOptionPane.showMessageDialog(null, \"Heyoo\", \".-*Board*-.\", -1);\n\t\t//String name = JOptionPane.showInputDialog(\"Vat is dain name?\");\n\t\t//JOptionPane.showMessageDialog(null, \"Aiight you good, \" + name);\n\t\t\n\t\t\n\t\tString[] options = {\"Sten\", \"Sax\", \"Påse\"};\n\t\tString Val = (String)JOptionPane.showInputDialog(null, \"Sten, Sax eller Påse?\",\n \"Game nr\", JOptionPane.QUESTION_MESSAGE, null, options, options[2]);\n\t\t\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic String showResult() {\n\t\treturn rps.toString();\r\n\t}", "public static String printEndOfGame() {\n return \"Your game of Memory is over. You uncovered all pairs.\" +\n \" Hope you have had a lot of fun and come back soon\";\n }", "private void displayReplay() {\n if (isEnglish)\n Toast.makeText(this, REPLAY, Toast.LENGTH_LONG).show();\n else\n Toast.makeText(this, REPLAY_CHINESE, Toast.LENGTH_LONG).show();\n }", "private void gameOverDisplay(Graphics g) {\r\n Font small = new Font(\"Helvetica\", Font.BOLD, 20);\r\n FontMetrics metric = getFontMetrics(small);\r\n g.setColor(Color.blue);\r\n g.setFont(small);\r\n if(winner == null) g.drawString(\"DRAW!\", (size - metric.stringWidth(\"DRAW!\")) / 2, size / 2);\r\n else g.drawString(winner.getPlayerName()+\" WIN!\", (size - metric.stringWidth(winner.getPlayerName()+\" WIN!\")) / 2, size / 2);\r\n }", "private void displayMainMenu () {\n System.out.println();\n System.out.println(\n \"Enter the number of the action to perform: \");\n System.out.println(\n \"Run game...............\" + PLAY_GAME);\n System.out.println(\n \"Exit...................\" + EXIT);\n }", "private void showEndMessage()\n {\n showText(\"Time is up - you win!\", 390, 150);\n showText(\"Your final score: \" + healthLevel + \" points\", 390, 170);\n }", "public void ExperimentResults() {\n\t\t/*\n\t\t * Creating a ScreenPresenter. To create other ResultsPresenter, the\n\t\t * better idea is to create a Factory.\n\t\t */\n\t\tResultPresenter presenter = new ScreenPresenter();\n\t\tpresenter.setText(evaluator.evalResults.resultsInText());\n\n\t}", "public void gameOver(){ // will be more complex in processing (like a fadey screen or whatever, more dramatic)\n System.out.println();\n System.out.println(\"Three strikes and you're out! You're FIRED!\");\n gameOver = true;\n }", "public void displayResult()\n {\n for(int i = 0; i < this.etatPopulation.size(); i++)\n {\n String line = \"\";\n for (int j = 0; j < this.etatPopulation.get(i).size(); j++)\n {\n line += this.etatPopulation.get(i).get(j).toString() + \" \";\n }\n System.out.println(line);\n }\n }", "public static void displayResults (boolean passed)\r\n\t{\r\n \r\n if (passed) {\r\n System.out.println (\"Passed test: \" + testCount);\r\n } else {\r\n System.out.println (\"Failed test: \" + testCount \r\n + \" at line \" + \r\n Thread.currentThread().getStackTrace()[2].getLineNumber()\r\n );\r\n System.exit(1);\r\n\t\t}\r\n\t\ttestCount++;\r\n\t}", "public void print() {\r\n System.out.print( getPlayer1Id() + \", \" );\r\n System.out.print( getPlayer2Id() + \", \");\r\n System.out.print(getDateYear() + \"-\" + getDateMonth() + \"-\" + getDateDay() + \", \");\r\n System.out.print( getTournament() + \", \");\r\n System.out.print(score + \", \");\r\n System.out.print(\"Winner: \" + winner);\r\n System.out.println();\r\n }", "public void GameWin () {\n\t\t\n\t\twordDashes.setText(mysteryWord);\n\t\tguessBttn.setVisible(false);\n\t\tguessFullWord.setVisible(false);\n\t\tAnswerBox.setDisable(true); //can no longer use the text box\n\t\tresultMessage.setText(\" Great Job!!\\nYou Guessed the Word!!\");\n\t\tplayAgain.setVisible(true); \n\t\t\n\t}", "private void gameOverDialog() {\n Toast makeText;\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.game_over), Toast.LENGTH_LONG);\n makeText.show();\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.final_score) + score, Toast.LENGTH_LONG);\n makeText.show();\n }", "public void display(){\n\t\tSystem.out.print(programGrade + \" \" + examGrade );\n\t\t\n\t\t\n\t}", "private void showFacts() {\n\t\tSystem.out.println(\"=============================\");\n\t\tSystem.out.println(\"Your lose! Try harder and better luck next time.\");\n\t}", "public void DisplayWithMultiTypes() {\n\t\tplayers = new ArrayList<Player>();\n\t\tplayer1 = new Player(\"Nick\");\n\t\tplayer2 = new Player(\"Ausitn\");\n\t\tplayers.add(player1);\n\t\tplayers.add(player2);\n\t\tgame = new GameState();\n\t\tgame.initializeServer(players);\n\t\tRulesEngine.setColour(game, String.valueOf(Type.BLUE));\n\t\t\n\t\tgame.setTurn(0);\n\t\t\n\t\t\n\t\t//create cards to be added to player's hand and target's display\n\t\tCard purpleCard = new Card(Type.PURPLE, 3);\n\t\tCard greenCard = new Card(Type.GREEN, 1);\n\t\tCard yellowCard = new Card(Type.YELLOW, 2);\n\t\tCard blueCard = new Card(Type.BLUE, 3);\n\t\tCard redCard = new Card(Type.RED, 4);\n\t\tCard squire = new Card(Type.WHITE, 2);\n\t\tCard maiden = new Card (Type.WHITE, 6);\n\t\t\n\t\t//Give one of the players a riposte card to play\n\t\tCard riposte = new Card(Type.ACTION, Card.RIPOSTE);\n\t\tgame.getAllPlayers().get(0).getHand().add(riposte);\n\t\t\n\t\t//Give target player a custom display\n\t\tgame.getDisplay(1).add(redCard);\n\t\tgame.getDisplay(1).add(purpleCard);\n\t\tgame.getDisplay(1).add(blueCard);\n\t\tgame.getDisplay(1).add(greenCard);\n\t\tgame.getDisplay(1).add(squire);\n\t\tgame.getDisplay(1).add(yellowCard);\n\t\tgame.getDisplay(1).add(maiden);\n\t}", "public void showresult(String result, String status, String message) {\r\n\t\tCommonFunctions.queryresult = \"No of Cells not Matching :\" + result;\r\n\t\tCommonFunctions.teststatus = \"Status :\" + status;\r\n\t\tCommonFunctions.message = \"System Message :\" + message;\r\n\t\tresultstextarea.setText(\"No of Cells not Matching : \" + result + \"\\n\\n\" + \"Status : \" + status + \"\\n\\n\"\r\n\t\t\t\t+ \"System Message : \" + message);\r\n\t\t// CommonFunctions.invokeTestResultsDialog(getClass());\r\n\t}", "String displayShotsTaken();", "public void displayCurrentState(State game);", "public void statistics(){\n System.out.println(this.scoreboard.toString());\n }", "public static void endGame(){\n System.out.println(\"\" +\n \"######## ## ## ### ## ## ## ## ###### ######## ####### ######## \\n\" +\n \" ## ## ## ## ## ### ## ## ## ## ## ## ## ## ## ## \\n\" +\n \" ## ## ## ## ## #### ## ## ## ## ## ## ## ## ## \\n\" +\n \" ## ######### ## ## ## ## ## ##### ###### ###### ## ## ######## \\n\" +\n \" ## ## ## ######### ## #### ## ## ## ## ## ## ## ## \\n\" +\n \" ## ## ## ## ## ## ### ## ## ## ## ## ## ## ## ## \\n\" +\n \" ## ## ## ## ## ## ## ## ## ###### ## ####### ## ## \\n\\n\" +\n \"######## ## ### ## ## #### ## ## ###### #### \\n\" +\n \"## ## ## ## ## ## ## ## ### ## ## ## #### \\n\" +\n \"## ## ## ## ## #### ## #### ## ## #### \\n\" +\n \"######## ## ## ## ## ## ## ## ## ## #### ## \\n\" +\n \"## ## ######### ## ## ## #### ## ## \\n\" +\n \"## ## ## ## ## ## ## ### ## ## #### \\n\" +\n \"## ######## ## ## ## #### ## ## ###### #### \");\n\n\n }", "public void gameOver() {\r\n\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Game is over. Calculating points\");\r\n\t\tstatus = \"over\";\r\n\t\ttry {\r\n\t\t\tupdateBoard();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tupdateEvents(false);\r\n\t\tEmbedBuilder embed = new EmbedBuilder();\r\n\t\tembed.setTitle(\"Game Results\");\r\n\t\tMap<Integer, Integer> scores = new HashMap<Integer, Integer>();\r\n\t\t\r\n\t\tfor (int i = 0; i < players.size(); i++) {\r\n\t\t\tscores.put(i,players.get(i).calculatePoints());\r\n\t\t\t// Utils.getName(players.get(i).getPlayerID(),guild)\r\n\t\t}\r\n\t\t\r\n\t\tList<Entry<Integer, Integer>> sortedList = sortScores(scores);\r\n\t\t\r\n\t\t// If tied, add highest artifact values\r\n\t\tif ((playerCount > 1) && (sortedList.get(0).getValue().equals(sortedList.get(1).getValue()))) {\r\n\t\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Scores were tied\");\r\n\t\t\tint highestScore = sortedList.get(0).getValue();\r\n\t\t\tfor (Map.Entry<Integer, Integer> entry : sortedList) {\r\n\t\t\t\t// Only add artifacts to highest scores\r\n\t\t\t\tif (entry.getValue().equals(highestScore)) {\r\n\t\t\t\t\tscores.put(entry.getKey(),entry.getValue()+players.get(entry.getKey()).getHighestArtifactValue());\r\n\t\t\t\t\tplayers.get(entry.getKey()).setAddedArtifactValue(true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Sort with added artifact values\r\n\t\tsortedList = sortScores(scores);\r\n\t\t\r\n\t\t// Assigns 1st, 2nd, 3rd\r\n\t\tfor (int i = 0; i < sortedList.size(); i++) {\r\n\t\t\tMap.Entry<Integer, Integer> entry = sortedList.get(i);\r\n\t\t\t// If tie, include artifact\r\n\t\t\tString name = Utils.getName(players.get(entry.getKey()).getPlayerID(),guild);\r\n\t\t\tif (players.get(entry.getKey()).getAddedArtifactValue()) {\r\n\t\t\t\tint artifactValue = players.get(entry.getKey()).getHighestArtifactValue();\r\n\t\t\t\tembed.addField(Utils.endGamePlaces[i],\"**\"+name+\"** - ``\"+(entry.getValue()-artifactValue)+\" (\"+artifactValue+\")``\",true);\r\n\t\t\t} else {\r\n\t\t\t\tembed.addField(Utils.endGamePlaces[i],\"**\"+name+\"** - ``\"+entry.getValue()+\"``\",true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tembed.setFooter(\"Credit to Renegade Game Studios\", null);\r\n\t\tgameChannel.sendMessage(embed.build()).queueAfter(dragonAttackingDelay+3000,TimeUnit.MILLISECONDS);\r\n\t\t\r\n\t\tGlobalVars.remove(this);\r\n\t}", "public void result() {\n JLabel header = new JLabel(\"Finish!!\");\n header.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 28));\n gui.getConstraints().gridx = 0;\n gui.getConstraints().gridy = 0;\n gui.getConstraints().insets = new Insets(10,10,50,10);\n gui.getPanel().add(header, gui.getConstraints());\n\n String outcomeText = String.format(\"You answer correctly %d / %d.\",\n totalCorrect, VocabularyQuizList.MAX_NUMBER_QUIZ);\n JTextArea outcome = new JTextArea(outcomeText);\n outcome.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 20));\n outcome.setEditable(false);\n gui.getConstraints().gridy = 1;\n gui.getConstraints().insets = new Insets(10,10,30,10);\n gui.getPanel().add(outcome, gui.getConstraints());\n\n JButton b = new JButton(\"home\");\n gui.getGuiAssist().homeListener(b);\n gui.getConstraints().gridy = 2;\n gui.getConstraints().insets = new Insets(10,200,10,200);\n gui.getPanel().add(b, gui.getConstraints());\n\n b = new JButton(\"start again\");\n startQuestionListener(b);\n gui.getConstraints().gridy = 3;\n gui.getPanel().add(b, gui.getConstraints());\n }" ]
[ "0.7259567", "0.72308373", "0.7099402", "0.7087306", "0.70593417", "0.70295316", "0.70066094", "0.697751", "0.6971532", "0.69033414", "0.68911266", "0.68775046", "0.6861605", "0.6832558", "0.6821268", "0.68182015", "0.6779447", "0.67793405", "0.67783636", "0.67600596", "0.67053175", "0.6690829", "0.66902226", "0.6646753", "0.66316426", "0.66212916", "0.6609459", "0.66073495", "0.66025436", "0.6601392", "0.65902203", "0.65789664", "0.65658903", "0.6561478", "0.65584457", "0.65397286", "0.6528303", "0.6518429", "0.6511653", "0.65010273", "0.6493436", "0.64869213", "0.6459501", "0.645879", "0.64527607", "0.6450175", "0.64499646", "0.6449843", "0.64465547", "0.64273006", "0.63989943", "0.6394017", "0.63929194", "0.6388851", "0.6381779", "0.63639927", "0.63586366", "0.6357959", "0.635085", "0.6347708", "0.6305978", "0.62987214", "0.62974256", "0.62886846", "0.62835664", "0.6273146", "0.6271669", "0.6267439", "0.6263789", "0.6262481", "0.6257015", "0.62453157", "0.62423414", "0.6240351", "0.62372077", "0.6236616", "0.62342876", "0.62341446", "0.62222874", "0.62149256", "0.62128097", "0.62122613", "0.6207085", "0.6205824", "0.6202476", "0.62014717", "0.6195726", "0.6195499", "0.61922306", "0.61890364", "0.61875963", "0.618394", "0.6165295", "0.6159678", "0.6158292", "0.6153014", "0.6151453", "0.6144721", "0.61429656", "0.6139861" ]
0.63409555
60
Created by Nico on 11/02/2016.
public interface IUserService { User save (User user); Iterable<User> findAll(); User findByLogin(String login); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "public final void mo51373a() {\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\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void poetries() {\n\n\t}", "private static void cajas() {\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\tpublic void init() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public void mo4359a() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n\n \n }", "private void m50366E() {\n }", "@Override\n public void init() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n void init() {\n }", "@Override\n public void memoria() {\n \n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "@Override\n public void init() {}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void einkaufen() {\n\t}", "private void init() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "public void mo6081a() {\n }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\t\tpublic void init() {\n\t\t}" ]
[ "0.6104755", "0.5963934", "0.59463215", "0.59414685", "0.59019184", "0.58523923", "0.58523923", "0.58348185", "0.581228", "0.58099526", "0.57616735", "0.5734913", "0.5704342", "0.5702936", "0.5697137", "0.56671464", "0.5650316", "0.5641788", "0.56331015", "0.56310946", "0.56208926", "0.5606885", "0.5598634", "0.5596647", "0.55942285", "0.5591868", "0.5591868", "0.5591868", "0.5591868", "0.5591868", "0.55850744", "0.55849653", "0.55717194", "0.55676985", "0.55676985", "0.55600935", "0.55546147", "0.55546147", "0.55469835", "0.55469835", "0.55469835", "0.55469835", "0.55469835", "0.55469835", "0.5546275", "0.5543027", "0.5542315", "0.5529632", "0.5517147", "0.5507426", "0.5502523", "0.54991233", "0.54932463", "0.54882824", "0.5478837", "0.54786336", "0.5472512", "0.5472022", "0.5471472", "0.5466805", "0.54643905", "0.54557854", "0.54557854", "0.54557854", "0.5454182", "0.5454182", "0.5454182", "0.5450266", "0.545019", "0.5448897", "0.54481727", "0.5443261", "0.5443261", "0.5443261", "0.54350793", "0.54350793", "0.5428457", "0.54158616", "0.54158616", "0.54158616", "0.54158616", "0.54158616", "0.54158616", "0.54158616", "0.5406069", "0.5399858", "0.5398448", "0.5389319", "0.5388394", "0.5383249", "0.5369851", "0.53602326", "0.5355987", "0.5355553", "0.5355553", "0.5350295", "0.53482157", "0.53404564", "0.5339724", "0.53270906", "0.5325661" ]
0.0
-1
Get the set of error classes (and optionally) error messages that occur in the application and should be ignored from being reported as errors.
Set<IgnoreErrorConfig> getIgnoreErrors();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> getErrorMessages();", "public List<String> getErrorMessages() {\n logger.info(Thread.currentThread().getStackTrace()[1].getMethodName());\n logger.debug(\"Getting All Error Messages -> \"+errMessages);\n return errMessages;\n }", "public ImmutableList<ErrorCase> getAllErrors() {\n // Relevant error cases are precisely the concrete subclasses of EppException.\n return getConcreteSubclassesStream(FlowDocumentation.EXCEPTION_CLASS_NAME)\n .map(\n typeElement ->\n new ErrorCase(\n typeElement,\n sourceRoot.getDocTrees().getDocCommentTree(typeElement),\n sourceRoot.getTypeUtils()))\n .collect(toImmutableList());\n }", "public Set<String> getErrorMessages() {\n HashSet<String> result = new HashSet<String>();\n switch (argumentPresence) {\n case MANDATORY:\n if (!argument.hasValue()) {\n result.add(messageArgMissing);\n } else {\n result.addAll(argument.getErrorMessages());\n }\n break;\n case OPTIONAL:\n if (argument.hasValue()) {\n result.addAll(argument.getErrorMessages());\n }\n break;\n }\n return result;\n }", "public String getErrorStrings() {\n return this.errorStrings;\n }", "public Set<Class<? extends Throwable>> getRegisteredExceptionClasses() {\n\t\treturn Collections.unmodifiableSet(registeredClasses);\n\t}", "public Collection<GmlExceptionReport> getErrors()\r\n {\r\n return myErrorHandler.getExceptionReports();\r\n }", "Set<ExpectedErrorConfig> getExpectedErrors();", "public ImmutableList<String> getErrorMessages() {\n return Lists.immutable.ofAll(errorMessages);\n }", "public Collection<ErrorClass> getErrorCol() {\r\n\t\treturn values();\r\n\t}", "public java.util.List<WorldUps.UErr> getErrorList() {\n if (errorBuilder_ == null) {\n return java.util.Collections.unmodifiableList(error_);\n } else {\n return errorBuilder_.getMessageList();\n }\n }", "public int[] exceptionTypes();", "public List<Exception> getErrors() {\n\t\treturn null;\n\t}", "public List<Diagnostic<? extends JavaFileObject>> getErrors() {\n List<Diagnostic<? extends JavaFileObject>> err;\n err = new ArrayList<Diagnostic<? extends JavaFileObject>>();\n for (Diagnostic<? extends JavaFileObject> diagnostic : errors) {\n if (diagnostic.getKind() == Diagnostic.Kind.ERROR) {\n err.add(diagnostic);\n }\n }\n return err;\n }", "List<String> getErrorMessages(Exception exception);", "public String getErrorsMessages()\n \t{\n \t\treturn errorsMessages;\n \t}", "int getErrorsMode();", "Set<ISOAError> getErrors();", "public final Map<String, Exception> getErrors() {\n\n\t\treturn this.errors;\n\t}", "TypeList getExceptionTypes();", "public noNamespace.ErrorDocument.Error[] getErrorArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(ERROR$0, targetList);\r\n noNamespace.ErrorDocument.Error[] result = new noNamespace.ErrorDocument.Error[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "java.util.List<WorldUps.UErr> \n getErrorList();", "public List<SystemError> getSystemErrors() {\n return Lists.transform(systemErrors, ResolvedNotice::getContext);\n }", "@Override\n public List<String> catchFaults(){\n List<String> errors = new ArrayList<>();\n severityLevels.forEach(level -> {\n if(level.equals(\"ERROR\")){\n errors.add(level);\n }\n });\n return errors;\n }", "public Set<String> getFilmErrorMessage() {\n Set<String> errors = new HashSet<>();\n errors.addAll(errorMessage);\n return errors;\n }", "public noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error[] getErrorArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(ERROR$0, targetList);\r\n noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error[] result = new noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "public List<Throwable> getErrors() {\n\t\tfinal List<Throwable> retval = new ArrayList<Throwable>();\n\t\tfor (final TestInfo testInfo : contractTestMap.listTestInfo()) {\n\t\t\tretval.addAll(testInfo.getErrors());\n\t\t}\n\t\treturn retval;\n\t}", "public List<ReportType> getErrors() {\n\t\treturn errorList;\n\t}", "public List<String> takeErrors() {\n final List<String> result = new ArrayList<String>(errors);\n errors.clear();\n return result;\n }", "public List<String> getErrors ()\n\t{\n\t\treturn errors;\n\t}", "public List<String> getErrors()\n {\n return _errors;\n }", "public BaseBean getStartupErrors() {\n\t\tif (null != AzureChatAppCtxUtils.getApplicationContext().getAttribute(\n\t\t\t\tAzureChatConstants.STARTUP_ERRORS)) {\n\t\t\treturn (BaseBean) AzureChatAppCtxUtils.getApplicationContext()\n\t\t\t\t\t.getAttribute(AzureChatConstants.STARTUP_ERRORS);\n\t\t}\n\t\treturn null;\n\t}", "public java.util.List<? extends WorldUps.UErrOrBuilder> \n getErrorOrBuilderList() {\n if (errorBuilder_ != null) {\n return errorBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(error_);\n }\n }", "List<CSSParseException> getExceptions();", "public static ArrayList<String> getErrorMap() {\n if (errList.isEmpty()) {\n return null;\n } else {\n return errList;\n }\n }", "public String[] getErrorParserList();", "public void cleanErrorMessages() {\r\n\r\n }", "java.lang.String getErrorInfo();", "java.lang.String getErrorInfo();", "java.lang.String getErrorInfo();", "java.lang.String getErrorInfo();", "public List<String> getValidationErrors() {\n\n List<String> messages = ObjectUtils.getValidationErrors(PartitionConfig.class, this);\n \n if(PartitionType.FUNCTION.equals(this.type)) { \n if(StringUtils.isBlank(this.output)) {\n\n messages.add(\"output is required for Function type partition\");\n }\n\n if(!BooleanUtils.xor(new boolean [] {StringUtils.isBlank(this.className), \n StringUtils.isBlank(this.functionName)})) {\n\n messages.add(\"either functionName or className is required\");\n }\n \n } else if(PartitionType.COUNT.equals(this.type) \n && !BooleanUtils.xor(new boolean [] {this.count == null, StringUtils.isBlank(this.countRef)})) {\n \n messages.add(\"either count or countRef is required for Function type count\");\n }\n \n if(!PartitionType.COUNT.equals(this.type)) {\n \n if(this.input == null) {\n messages.add(\"input may not be null\");\n \n } else if(this.input.get(PartitionFunction.ITEMS_KEY) == null) {\n messages.add(\"expecting an input with key items\");\n }\n }\n \n return messages;\n }", "public List<String> getErrors() {\n\t\treturn errors;\n\t}", "public String getErrorParserIds();", "public JUnitError[] getErrors() {\n return _errors;\n }", "java.util.List<? extends WorldUps.UErrOrBuilder> \n getErrorOrBuilderList();", "public java.util.List<WorldUps.UErr> getErrorList() {\n return error_;\n }", "@Override\n\tpublic HashMap<String, String> getErrors() {\n\t\treturn errors;\n\t}", "public static Errors forException(Throwable t) {\n Errors error = classToError.get(t.getClass());\n return error == null ? UNKNOWN : error;\n }", "public Map<Object, Exception> getFailedMessages() {\n\t\treturn failedMessages;\n\t}", "public int getErrorCount() {\n return error_.size();\n }", "String[] getError() {\n return error;\n }", "public UseCaseResult<? extends UseCaseError> getUseCaseErrorResult(Class<? extends UseCaseError> errorClass) {\n return errors.get(errorClass);\n }", "public static Map<Integer, String> getErrorCodeDefns() {\n\t\treturn errorCodeDefns;\n\t}", "String getErrorsString();", "public int getErrorCount() {\r\n\t\treturn errorHandler.getErrorCount();\r\n\t}", "public List<ActivityLog> getJobErrors(String jobID) throws IOException,\n\t\t\tClassNotFoundException {\n\t\tList<ActivityLog> result = new LinkedList<ActivityLog>();\n\t\tList<ActivityLog> activityLogs = Core.getJobLogs(jobID,\n\t\t\t\tgetHttpMethodExecutor());\n\t\tfor (ActivityLog al : activityLogs) {\n\t\t\tString severity = al.getSeverity().toLowerCase();\n\t\t\tif (severity.equals(\"critical\") || severity.equals(\"warning\")\n\t\t\t\t\t|| severity.equals(\"error\")) {\n\t\t\t\tresult.add(al);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public String getErrorCategory() {\n return errorCategory;\n }", "public List<String> getListOfErrors() {\n return listOfErrors;\n }", "public java.util.List<? extends WorldUps.UErrOrBuilder> \n getErrorOrBuilderList() {\n return error_;\n }", "public Vector getErrors() {\n \t\tif (parser.hasErrors()) {\n \t\t\tsetError(parser.getErrors());\n \t\t}\n \t\tVector tmp = errors;\n \t\terrors = new Vector();\n \t\treturn tmp;\n \t}", "java.lang.String getErrmsg();", "public int getERRReps() { \r\n \treturn getReps(\"ERR\");\r\n }", "public CErrors getErrors() {\n\t\treturn mErrors;\n\t}", "Object getExceptionHandlers();", "public CErrors getErrors() {\n\t\treturn this.mErrors;\n\t}", "Collection<String> getExcludeExceptions();", "public final IClass[]\r\n getThrownExceptions() throws CompileException {\r\n if (this.thrownExceptionsCache != null) return this.thrownExceptionsCache;\r\n return (this.thrownExceptionsCache = this.getThrownExceptions2());\r\n }", "public ArrayList<Exception> getValidateExceptions();", "java.lang.String getError();", "java.lang.String getError();", "java.lang.String getError();", "public int getErrorCount() {\n\t\treturn errors.size();\n\t}", "public void setErrorMessages(){\n // if mood state in myself tab is chosen\n if(selectedMyMoodState != null && !selectedMyMoodState.isEmpty()){\n ((TextView)myEmotionalStateSpinner.getSelectedView()).setError(\"More than one option is chosen\");\n }\n // if mood state in following tab is chosen\n if(selectedFoMoodState != null && !selectedFoMoodState.isEmpty()){\n ((TextView)foEmotionalStateSpinner.getSelectedView()).setError(\"More than one option is chosen\");\n }\n // if most recent week in myself tab is chosen\n if (myMostRecentWeekCheckbox.isChecked()){\n myMostRecentWeekCheckbox.setError(\"More than one option is chosen\");\n }\n // if most recent week in foloowing tab is chosen\n if (foMostRecentWeekCheckbox.isChecked()){\n foMostRecentWeekCheckbox.setError(\"More than one option is chosen\");\n }\n // if display all in myself tab is chosen\n if (myDisplayAllCheckbox.isChecked()){\n myDisplayAllCheckbox.setError(\"More than one option is chosen\");\n }\n // if display all in following tab is chosen\n if (foDisplayAllCheckbox.isChecked()){\n foDisplayAllCheckbox.setError(\"More than one option is chosen\");\n }\n // if reason in myself tab is chosen\n if(enteredMyReason != null && !enteredMyReason.isEmpty()){\n myReasonEditText.setError(\"More than one option is chosen\");\n }\n // if reason in following tab is chosen\n if(enteredFoReason != null && !enteredFoReason.isEmpty()){\n foReasonEditText.setError(\"More than one option is chosen\");\n }\n }", "public ValidationErrors getErrors() {\n if (errors == null) errors = new ValidationErrors();\n return errors;\n }", "public WorldUps.UErrOrBuilder getErrorOrBuilder(\n int index) {\n return error_.get(index);\n }", "@ManagedAttribute\n public Class<? extends ValidationErrorHandler> getErrorHandler() {\n return clazz;\n }", "public List<ErrorResult> getErrorResults()\n {\n \tif(this.errorResults == null) {\n \t\tthis.errorResults = new ArrayList<ErrorResult>();\n \t}\n return errorResults;\n }", "public ArrayList<Exception> getEndUserExceptions();", "public List<Throwable> list() {\n return messages;\n }", "public Integer getErrorCnt() {\r\n return errorCnt;\r\n }", "public List<ApiError> getErrors() {\n return errors;\n }", "int getErrorCount();", "public List<ReportType> getEntries(){\n\t\tList<ReportType> reportTypes = new ArrayList<>(warningList);\n\t\treportTypes.addAll(errorList);\n\t\treturn reportTypes;\n\t}", "public String getErrorType() {\n return errorType;\n }", "public String[] getExceptionNames() {\n\t\treturn exceptionNames;\n\t}", "public final int getErrorCount()\n\t{\n\t\treturn errorCount_;\n\t}", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "public static EjbcaExceptionClasses fromClass(Class<?> clazz) {\r\n EjbcaExceptionClasses ejbcaExceptionClasses = ExceptionClassHolder.map.get(clazz);\r\n return ejbcaExceptionClasses != null ? ejbcaExceptionClasses : UNKNOWN;\r\n }" ]
[ "0.66252726", "0.64478314", "0.63686156", "0.63465923", "0.62378496", "0.61437106", "0.6102418", "0.6030065", "0.5988601", "0.59422517", "0.58902955", "0.5888375", "0.5878868", "0.581451", "0.5814069", "0.5811893", "0.5800646", "0.579931", "0.57900506", "0.5786915", "0.5735808", "0.5723593", "0.57112247", "0.5709583", "0.5660546", "0.56081474", "0.56048346", "0.5590902", "0.55851716", "0.55757976", "0.55730593", "0.5567527", "0.5541751", "0.5530171", "0.55176836", "0.54815763", "0.54457885", "0.5441373", "0.5441373", "0.5441373", "0.5441373", "0.54194146", "0.54090345", "0.5398916", "0.537574", "0.53496456", "0.5325139", "0.5300939", "0.527987", "0.52596515", "0.52314043", "0.52259016", "0.518819", "0.517744", "0.5167205", "0.5148175", "0.5147548", "0.514099", "0.5125267", "0.512513", "0.51217717", "0.5114893", "0.51125515", "0.5107075", "0.5105367", "0.5102881", "0.5100568", "0.5095165", "0.5090373", "0.5090015", "0.5090015", "0.5090015", "0.5081076", "0.5058938", "0.5055231", "0.5050162", "0.5050079", "0.50232834", "0.5020475", "0.50189126", "0.50131196", "0.5011802", "0.50039774", "0.50029707", "0.50013196", "0.4994991", "0.499299", "0.49924493", "0.49924493", "0.49924493", "0.49924493", "0.49924493", "0.49924493", "0.49924493", "0.49924493", "0.49924493", "0.49924493", "0.49924493", "0.49924493", "0.49899653" ]
0.6325255
4